[Top][All Lists]

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

[O] babel result chain outdated/inconsistent using var

From: Daniele Pizzolli
Subject: [O] babel result chain outdated/inconsistent using var
Date: Wed, 06 Apr 2016 14:01:45 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4 (gnu/linux)


is possible to update the “#+RESULTS: pid” when the block “#+NAME:
echo-pid” is evaluated in the following snippet?

This will lead to a consistent document generation with “M-x
org-babel-execute-buffer” or by hitting “C-c C-c” on “#+NAME:
echo-pid”.  Using the cache does not make sense: the process is
generating different output every time.

The info at “M-: (info "(org) Specific header arguments")” does not
mention something useful.

* Intro

** pid

#+NAME: pid
#+BEGIN_SRC shell :results value :cache no
printf '%s' "${$}"

The following result is usually outdated/inconsistent!

#+RESULTS: pid
: 25272

** echo pid

#+NAME: echo-pid
#+BEGIN_SRC shell :var DATA=pid :results value
printf '%s' "${DATA}"

#+RESULTS: echo-pid
: 25273

The code block in pid is evaluated every time, but the results are
used only to populate the pid variable and non for updating the
results in the buffer:

executing Shell code block (pid)...
Wrote /tmp/babel-4889iZN/ob-input-4889CyZ
executing Shell code block (echo-pid)...
Wrote /tmp/babel-4889iZN/ob-input-48892ay
Code block evaluation complete.

This was tested with Org-mode version 8.3.4 release_8.3.4-705-g716e33.

Thanks in advance for your suggestions,

reply via email to

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