From mboxrd@z Thu Jan 1 00:00:00 1970 From: coroa@online.de (Jonas =?utf-8?Q?H=C3=B6rsch?=) Subject: babel: is it possible to cache #+call executed blocks Date: Thu, 28 Jun 2012 16:34:35 +0200 Message-ID: <87hatv4i9w.fsf@online.de> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([208.118.235.92]:36745) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SkFoJ-0001oC-Lp for emacs-orgmode@gnu.org; Thu, 28 Jun 2012 10:35:17 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SkFo9-0007E1-C3 for emacs-orgmode@gnu.org; Thu, 28 Jun 2012 10:35:07 -0400 Received: from plane.gmane.org ([80.91.229.3]:58005) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SkFo9-0007DU-4p for emacs-orgmode@gnu.org; Thu, 28 Jun 2012 10:34:57 -0400 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1SkFo4-00066N-D9 for emacs-orgmode@gnu.org; Thu, 28 Jun 2012 16:34:52 +0200 Received: from zae21.pia.fu-berlin.de ([87.77.174.33]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 28 Jun 2012 16:34:52 +0200 Received: from coroa by zae21.pia.fu-berlin.de with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 28 Jun 2012 16:34:52 +0200 List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org 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