emacs-orgmode
[Top][All Lists]
Advanced

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

Re: [O] [BUG] Dynamic scoping of project-plist in preparation-function


From: Nicolas Goaziou
Subject: Re: [O] [BUG] Dynamic scoping of project-plist in preparation-function
Date: Tue, 21 Jun 2016 22:15:47 +0200

Hello,

Arun Isaac <address@hidden> writes:

> The org mode manual says "The project property list is scoped into this
> call as the variable project-plist". But, ox-publish.el has lexical
> binding enabled, and the variable project-plist doesn't seem to be
> accessible from the executed preparation-function. When I try to access
> the variable, I get a (void-variable project-plist) error.
>
> Please find attached a minimal elisp file to reproduce the bug.
>
> emacs -Q -l preparation-function-dynamic-scoping.el
>
> My understanding of dynamic and lexical binding is a little foggy. So,
> do let me know if I'm missing something.

There are two ways to handle this.

1. Create a new global variable, with appropriate prefix, to hold
   project plist, e.g., `org-publish-project-plist';

2. Require preparation functions to accept one parameter, the project
   plist.

I'd favor the second one. In any case, the manual should be updated
accordingly.

WDYT?

Regards,

-- 
Nicolas Goaziou



reply via email to

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