[email protected] (Arne Köhn) writes:
> [email protected] (Jonas Hörsch) writes:
>
>> i'm looking for a possibilty to call lengthy codeblocks a few times with
>> different parameters, but would like the results to be cached.
>
Use #+call lines with the :cache header argument set. With a recent
version of Org-mode the following should work as expected.
#+Title: An Example of Using the Cache Header Argument with Call Lines
A long running code block.
#+name: foo
#+begin_src emacs-lisp :var bar="baz"
(sit-for 5)
(message "bar=%S" bar)
#+end_src
#+RESULTS: foo
: bar="baz"
This returns immediately thanks to the cached result.
#+call: foo("qux") :cache yes
#+RESULTS[49bbb37e59694c557889ca8fd4b06fe0d4fb6b25]: foo("qux"):cache yes
: bar="qux"
This does not return immediately, because the block must execute.
#+call: foo("quxxx")
--
Eric Schulte
http://cs.unm.edu/~eschulte