emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: coroa@online.de (Jonas Hörsch)
To: emacs-orgmode@gnu.org
Subject: babel: is it possible to cache #+call executed blocks
Date: Thu, 28 Jun 2012 16:34:35 +0200	[thread overview]
Message-ID: <87hatv4i9w.fsf@online.de> (raw)

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	other threads:[~2012-06-28 14:35 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-06-28 14:34 Jonas Hörsch [this message]
2012-08-03 16:04 ` babel: is it possible to cache #+call executed blocks Arne Köhn
2012-08-03 19:30   ` Eric Schulte

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87hatv4i9w.fsf@online.de \
    --to=coroa@online.de \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).