emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Ista Zahn <izahn@psych.rochester.edu>
To: Emacs-orgmode mailing list <emacs-orgmode@gnu.org>
Subject: org-babel caching question
Date: Sat, 18 Sep 2010 16:17:33 +0000	[thread overview]
Message-ID: <AANLkTimuMedHuXojBr6hMz2214kYokcCcwitR7ZVj7T6@mail.gmail.com> (raw)

Hi all,
I am just starting to get org-babel figured out, but I've run into an
issue that I could use help with. Basically, with :cache yes turned
on, subsequent code blocks to not pick up changes in earlier code
blocks. I would like to know if there is a way to make org babel pick
up these changes. An example follows.

---8<------------------begin example------------------8<---
Test org-babel caching mechanism

* Instructions
1. Assign the value 1 to variable a in source block1.
2. Run org-babel-execute-buffer.
3. Change variable a by assigning it the value 2 in source block1.
4. Run org-babel-execute-buffer, and notice that a is still equal to
1, 2 in source block2, when it "should" be 2, 2.

* Create R object "a"
#+srcname block1
#+begin_src R :session R1 :cache yes
a <- 1
#+end_src

* Change the value of "a"
#+srcname block2
#+begin_src R :session R1 :cache yes
a <- c(a, 2)
#+end_src

* Commentary
It appears that the org-babel caching mechanism does not notice that
input values have changed. This is inconvenient, because if I make a
mistake in an earlier code block I have to turn caching off in order
to get the values to be updated in subsequent code blocks. Is there
any way to make babel check to see if the input values have changed?

---8<------------------end example------------------8<---


-- 
Ista Zahn
Graduate student
University of Rochester
Department of Clinical and Social Psychology
http://yourpsyche.org

             reply	other threads:[~2010-09-18 16:17 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-09-18 16:17 Ista Zahn [this message]
2010-09-19 21:50 ` org-babel caching question 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=AANLkTimuMedHuXojBr6hMz2214kYokcCcwitR7ZVj7T6@mail.gmail.com \
    --to=izahn@psych.rochester.edu \
    --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).