From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nicolas Goaziou Subject: Re: Bug: :cache doesn't [9.1.14 (9.1.14-3-geb9955a-elpa @ /home/charpent/.emacs.d/elpa/org-20180924/)] Date: Mon, 22 Oct 2018 10:39:35 +0200 Message-ID: <87va5uz86w.fsf@nicolasgoaziou.fr> References: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:59419) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gEVkY-0000H1-4v for emacs-orgmode@gnu.org; Mon, 22 Oct 2018 04:39:46 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gEVkT-0003QO-7L for emacs-orgmode@gnu.org; Mon, 22 Oct 2018 04:39:46 -0400 Received: from relay7-d.mail.gandi.net ([217.70.183.200]:56861) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gEVkS-0003Oj-VH for emacs-orgmode@gnu.org; Mon, 22 Oct 2018 04:39:41 -0400 In-Reply-To: (Emmanuel Charpentier's message of "Sun, 30 Sep 2018 08:44:55 +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" To: Emmanuel Charpentier Cc: emacs-orgmode@gnu.org Hello, Emmanuel Charpentier writes: > But I stumble on a slight difficulty : I am unable to get org-mode to > cache results. > > Minimal (non-)working example : > > 1) Org source : > > #+author: > #+options: toc:nil > > > #+name: toto > #+BEGIN_SRC R :cache yes :eval no-expand > ## Simulate a (not too) long computation > Sys.sleep(3) > Sys.time() > #+END_SRC > > #+RESULTS[6b7eeb22cb3d78d2af82298b4aef0eda5043bcee]: toto > : 2018-09-30 08:01:23 > > #+name: titi > #+call: toto() :cache is per source block. CALL keyword generates a new source block, so it gets its own cache. So Org actually does cache results =E2=80=94 try, e.g., to re-eval the first source block =E2=80=94 in a very basic way, and you're mis-using the feature. HTH, --=20 Nicolas Goaziou