emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* :cache documentation patch
@ 2011-01-01 21:33 Thomas S. Dye
  2011-01-05 16:27 ` Eric Schulte
  0 siblings, 1 reply; 7+ messages in thread
From: Thomas S. Dye @ 2011-01-01 21:33 UTC (permalink / raw)
  To: Org Mode

[-- Attachment #1: Type: text/plain, Size: 105 bytes --]

Aloha all,

The attached patch documents the behavior of the :cache header argument.

All the best,
Tom


[-- Attachment #2: babel-cache-doc.patch --]
[-- Type: application/octet-stream, Size: 1063 bytes --]

Changes in HEAD
	Modified doc/org.texi
diff --git a/doc/org.texi b/doc/org.texi
index f324d04..35e79b7 100644
--- a/doc/org.texi
+++ b/doc/org.texi
@@ -12150,6 +12150,30 @@ executions of the code block.  If the code block has not
 changed since the last time it was evaluated, it will not be re-evaluated.
 @end itemize
 
+Code block caches notice if the value of a variable argument
+to the code block has changed. If this is the case, the cache is
+invalidated and the code block is re-run.  In the following example,
+@code{caller} will not be re-run unless the results of @code{random} have
+changed since it was last run.
+
+@example
+ #+srcname: random
+ #+begin_src R :cache yes
+ runif(1)
+ #+end_src
+
+ #+results[a2a72cd647ad44515fab62e144796432793d68e1]: random
+ 0.4659510825295
+
+ #+srcname: caller
+ #+begin_src emacs-lisp :var x=random :cache yes
+ x
+ #+end_src
+
+ #+results[bec9c8724e397d5df3b696502df3ed7892fc4f5f]: caller
+ 0.254227238707244
+@end example
+
 @node sep, hlines, cache, Specific header arguments
 @subsubsection @code{:sep}
 


[-- Attachment #3: Type: text/plain, Size: 1 bytes --]



[-- Attachment #4: Type: text/plain, Size: 201 bytes --]

_______________________________________________
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode

^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2011-01-06  7:46 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-01-01 21:33 :cache documentation patch Thomas S. Dye
2011-01-05 16:27 ` Eric Schulte
2011-01-05 18:02   ` Christian Moe
2011-01-06  4:49     ` Eric Schulte
2011-01-05 18:32   ` Thomas S. Dye
2011-01-06  4:47     ` Eric Schulte
2011-01-06  7:45       ` Thomas S. Dye

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