emacs-orgmode
[Top][All Lists]
Advanced

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

Re: [Orgmode] org-babel caching question


From: Eric Schulte
Subject: Re: [Orgmode] org-babel caching question
Date: Sun, 19 Sep 2010 15:50:00 -0600
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux)

Hi Ista,

You're correct, currently the caching mechanism employed by Babel only
checks that the same code blocks are used to assign variable, and
doesn't check that the results of those code blocks are the same.

I'll look into what would be required to include variable values in
cache hash calculation.  Any fix to this will require changing when
variable references are resolved and will most likely involve slight
changes to many of the language-specific file, and therefore may take
some time to implement.

Thanks for raising this issue.

Best -- Eric

Ista Zahn <address@hidden> writes:

> 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<---



reply via email to

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