Bastien <bastien.gue...@wikimedia.fr> writes:

> Hi Dan,
>
> Dan Davison <dandavis...@gmail.com> writes:
>
>> I was about to make a temporary fix but I see Bastien's just fixed
>> it. Bastien -- should we give that `backend' variable a name within the
>> org-* namespace (and maybe defvar it in org.el?) so that it is a more
>> respectable way to test for "am I doing export now?"? (This issue just
>> came up in a separate babel thread).
>
> backend is dynamically scoped, so I think there is no need to defvar it
> in org.el -- only in org-*-blocks.el, to avoid compilation warnings.
>
> Let me know if you think otherwise.

Hi Bastien,

I was thinking that if it were defvard in org.el, say as

(defvar org-export-current-backend nil)

then any code could use (null org-export-current-backend) to test
whether org is currently exporting or not. Otherwise, the code has to be
certain that it has been called during export if it is going to access
the variable.

For example, babel code can get called both during interactive
evaluation with C-c C-c, and also during export. It might be helpful for
that code to be able to inspect the value of org-export-current-backend
to see what the current context is.

Dan

>
> But it's a good idea to rename it to org-export-backend.  Can you do it?

_______________________________________________
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode

Reply via email to