emacs-orgmode
[Top][All Lists]
Advanced

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

Re: [O] Bug: :cache doesn't [9.1.14 (9.1.14-3-geb9955a-elpa @ /home/char


From: Nicolas Goaziou
Subject: Re: [O] 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
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux)

Hello,

Emmanuel Charpentier <address@hidden> 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 — try,
e.g., to re-eval the first source block — in a very basic way, and
you're mis-using the feature.

HTH,

-- 
Nicolas Goaziou



reply via email to

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