From: Nicolas Goaziou <mail@nicolasgoaziou.fr>
To: Arun Isaac <arunisaac@systemreboot.net>
Cc: "Emacs-orgmode@gnu.org" <emacs-orgmode@gnu.org>
Subject: Re: [BUG] Dynamic scoping of project-plist in preparation-function
Date: Tue, 21 Jun 2016 22:15:47 +0200 [thread overview]
Message-ID: <87pora9u30.fsf@saiph.selenimh> (raw)
In-Reply-To: <87oa6u1k6c.fsf@systemreboot.net> (Arun Isaac's message of "Tue, 21 Jun 2016 23:46:59 +0530")
Hello,
Arun Isaac <arunisaac@systemreboot.net> 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
next prev parent reply other threads:[~2016-06-21 20:16 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-06-21 18:16 [BUG] Dynamic scoping of project-plist in preparation-function Arun Isaac
2016-06-21 20:15 ` Nicolas Goaziou [this message]
2016-06-22 6:07 ` Arun Isaac
2016-06-22 13:34 ` Nicolas Goaziou
2016-06-22 14:37 ` Arun Isaac
2016-06-22 16:37 ` Nicolas Goaziou
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87pora9u30.fsf@saiph.selenimh \
--to=mail@nicolasgoaziou.fr \
--cc=arunisaac@systemreboot.net \
--cc=emacs-orgmode@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.