emacs-orgmode
[Top][All Lists]
Advanced

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

Re: [O] Buffer local value lost when exporting? (was Evaluate all org ta


From: Kaushal Modi
Subject: Re: [O] Buffer local value lost when exporting? (was Evaluate all org tables in file before exporting)
Date: Fri, 13 May 2016 16:22:53 +0000

On Fri, May 13, 2016 at 3:04 AM Eric S Fraga <address@hidden> wrote:
It's not a bug but a known design feature.  A new buffer is created as
part of the export process and this buffer does not inherit local
variable values. 

Hi Eric, I think this is a bug because the comments in the code say that the buffer local values should be preserved.

The org-export-before-processing-hook is called in ox.el in the org-export-with-buffer-copy macro form ( http://orgmode.org/cgit.cgi/org-mode.git/tree/lisp/ox.el?id=1c923b9ae734304b0dc6688ee056864facb7c3b8#n3002 )  and org-export-with-buffer-copy macro docstring says:

Apply BODY in a copy of the current buffer.
The copy preserves local variables, visibility and contents of
the original buffer.  Point is at the beginning of the buffer
when BODY is applied.

So I was led to believe that the local variables will be preserved.. Or are they lost at a later stage?
 
What you need to do is tell org to set specific
variables upon export.  You can use the #+BIND: directive to do this.

I don't know where this is documented but there is mention of whether to
allow this to happen in the org info manual:

   If ‘org-export-allow-bind-keywords’ is non-‘nil’, Emacs variables can
   become buffer-local during export by using the BIND keyword.  Its
   syntax is ‘#+BIND: variable value’.  This is particularly useful for
   in-buffer settings that cannot be changed using specific keywords.

Give this a try.

I'll dig into this and get back to you. 

Thanks.
--

--
Kaushal Modi


reply via email to

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