emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: More use of lexical-binding in ox.el


From: Stefan Monnier
Subject: Re: More use of lexical-binding in ox.el
Date: Tue, 27 Apr 2021 18:51:41 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

> It looks great but it introduces a test failure, however.
>
> `org-export-expand-include-keyword' is called from within
> `org-export-with-buffer-copy'.
>
> At the very beginning of `org-export-expand-include-keyword', there is
>
>   (buffer-file-name (buffer-base-buffer))
>
> Before the patch, it returned the source file name. After the patch it
> returns nil.
>
> Actually I'm a bit surprised it used to work, since we're evaluating
> this from a new buffer, not an existing one. But hey, it worked!

That's because the "buffer copy" also copies the local vars, and indeed
that's where I made a typo.

> Do you know what could cause this?

Yes:

                        (push (cons var val) varvals))))
               varvals)))

should be

                        (push (cons var val) varvals)))))
             varvals))

so that the final `varvals` is outside the `dolist` (it's the thing we
want to return to store it in the outer `varvals` variable).

Sorry 'bout that,


        Stefan




reply via email to

[Prev in Thread] Current Thread [Next in Thread]