emacs-orgmode
[Top][All Lists]
Advanced

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

Re: [O] [Babel] org-babel-execute-buffer gives different results than or


From: Nicolas Goaziou
Subject: Re: [O] [Babel] org-babel-execute-buffer gives different results than org-babel-exp-non-block-elements
Date: Fri, 23 Aug 2013 01:06:44 +0200

Nicolas Girard <address@hidden> writes:

> I'm ashamed... but this time I swear I started a minimal emacs session
> and got it to work. The instructions have slightly changed and are
> written at the very beginning of the attached minimal document.

I see.

There is an important difference between evaluating a buffer and
evaluating a buffer during export. In the latter, Babel has to deal with
replacement values, i.e., code block is replaced by its results. See the
difference between `org-export-execute-babel-code' and
`org-babel-execute-buffer' in a buffer containing only

  src_emacs-lisp[:results raw]{(+ 1 2)}

In this case, your code removes the code (and much more) as
a side-effect. This confuses `org-babel-exp-non-block-elements', which
also tries to remove it. As this fails, it removes a random part of the
buffer instead (probably as a mean revenge).

`org-babel-exp-non-block-elements' and `org-babel-exp-process-buffer'
could probably check if code still exists before trying to remove (and
replace) it.


Regards,

-- 
Nicolas Goaziou



reply via email to

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