[...]
>>
>> This is due to the fact that during export Org-mode copies the entire
>> buffer contents into a new export buffer (which is not associated with
>> any file, hence `buffer-file-name' returning nothing).  This is done so
>> that the exporter can operate destructively on the file contents without
>> affecting the original buffer.
>
> Ideally this should be an implementation detail that is completely
> hidden from the user. So I'd say that the fact that execution on export
> does not behave like interactive execution is a bug. Should we consider
> fixing this?
>

I'd push back on considering this a bug.

Babel currently makes no guarantees about the location in which
evaluation takes place (other than the :dir header argument), and I
would consider it an implementation detail that evaluation of emacs-lisp
does sometimes take place inside the Org-mode buffer (this is not true,
nor could it be for any other language).  By contrast Babel *does*
guarantee that header arguments are resolved in the original Org-mode
buffer, a guarantee that we explicitly maintain during export despite
the Org-mode buffer shuffling.

Best -- Eric

_______________________________________________
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