emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Nicolas Goaziou <mail@nicolasgoaziou.fr>
To: Emmanuel Charpentier <emm.charpentier@free.fr>
Cc: emacs-orgmode@gnu.org
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	[thread overview]
Message-ID: <87va5uz86w.fsf@nicolasgoaziou.fr> (raw)
In-Reply-To: <f74bd3b9e6a722fcdbee7278d1e7a3c8b1633783.camel@free.fr> (Emmanuel Charpentier's message of "Sun, 30 Sep 2018 08:44:55 +0200")

Hello,

Emmanuel Charpentier <emm.charpentier@free.fr> 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	other threads:[~2018-10-22  8:39 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-09-30  6:44 Bug: :cache doesn't [9.1.14 (9.1.14-3-geb9955a-elpa @ /home/charpent/.emacs.d/elpa/org-20180924/)] Emmanuel Charpentier
2018-10-22  8:39 ` Nicolas Goaziou [this message]

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=87va5uz86w.fsf@nicolasgoaziou.fr \
    --to=mail@nicolasgoaziou.fr \
    --cc=emacs-orgmode@gnu.org \
    --cc=emm.charpentier@free.fr \
    /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).