On Wed, Apr 06 2016, Nicolas Goaziou wrote: > Daniele Pizzolli writes: > >> Thanks Nicolas for the reply. Ok, but `org-babel-execute-buffer' >> produces an inconsistent document right now. > > This is because you ask it to. See below. > >> Mmm, the same reasoning can be used for arguing about the current >> behaviour: If I C-c C-c on a block, I expect only the code of the >> block to be executed, not some other part of the document I am >> editing. This behaviour will fix my issue. > > You are explicitly asking for a re-execution of a remote source block: > > :var DATA=pid > > If you are only interested in the results, you should name them, and use > that instead, e.g.
Hello, Oh, thanks Nicolas for the tip. But it does not work in a reliable manner. Calling `org-babel-execute-buffer' in the following snippet, raises: (error "Reference `pid-result' not found in this buffer") #+NAME: pid #+BEGIN_SRC shell :results value :cache no printf '%s' "${$}" #+END_SRC #+NAME: pid-result #+RESULTS: pid #+NAME: echo-pid #+BEGIN_SRC shell :var DATA=pid-result :results value printf '%s' "${DATA}" #+END_SRC #+RESULTS: echo-pid Using the C-c C-c on the blocks also does not work... unless you also do a C-c C-c on `#+NAME: pid-result' which is cumbersome if you have a chain of blocks and results. Do you think that this can be fixed easily? Thanks in advance, Daniele