emacs-orgmode
[Top][All Lists]
Advanced

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

[O] babel: is it possible to cache #+call executed blocks


From: Jonas Hörsch
Subject: [O] babel: is it possible to cache #+call executed blocks
Date: Thu, 28 Jun 2012 16:34:35 +0200
User-agent: Gnus/5.130006 (Ma Gnus v0.6) Emacs/24.1.50 (gnu/linux)

Hello everyone,

i'm looking for a possibilty to call lengthy codeblocks a few times with
different parameters, but would like the results to be cached.

hopefully wiw becomes clear enough with a minimal example.

the code block speak, if directly evaluated, produces the correct result
hallo on the first run. all subsequent runs just return immediately,
until the code block is changed.

if one evaluates the #+call line, as expected the right result is
returned and the hash necessary for caching is added to #+RESULTS.
but subsequent evaluations always seem to evaluate the code block again,
i.e. one has to wait the 5 seconds.

is there a way to avoid this?

thanks,
jonas

#+begin_src org

* Test
#+name: speak
#+begin_src sh :var say="hallo" :results output :cache yes
echo $say
sleep 5
#+end_src

#+RESULTS[4370bde991d63488bcb6d297718919fcf2b4fa1f]: speak
: hallo

#+call: speak('welt') :cache yes

#+RESULTS[c393aea840734e972880a4a38512765d345e7125]: speak('welt'):cache yes
: welt

#+end_src




reply via email to

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