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

* Re: :cache documentation patch
  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-05 18:32   ` Thomas S. Dye
  0 siblings, 2 replies; 7+ messages in thread
From: Eric Schulte @ 2011-01-05 16:27 UTC (permalink / raw)
  To: Thomas S. Dye; +Cc: Org Mode

Applied, Thanks -- Eric

p.s. would you mind submitting git formatted patches for these sort of
     updates in the future?  It greatly simplifies the process of
     applying the patch.  The process for creating a git formatted patch
     is as follows...

     1. commit your changes to your local copy of the org-mode
        repository
     2. run the following command to wrap up the latest commit on your
        local copy of the repository into a file which can be attached
        to email messages

            git format-patch -o ~/Desktop/ HEAD~1

        after the command finished you will notice a new file on your
        Desktop with a name like 0001-commit-message-stuff.patch

Thanks Again -- Eric

"Thomas S. Dye" <tsd@tsdye.com> writes:

> Aloha all,
>
> The attached patch documents the behavior of the :cache header argument.
>
> All the best,
> Tom
>
>
>
> _______________________________________________
> 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	[flat|nested] 7+ messages in thread

* Re: :cache documentation patch
  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
  1 sibling, 1 reply; 7+ messages in thread
From: Christian Moe @ 2011-01-05 18:02 UTC (permalink / raw)
  To: Eric Schulte; +Cc: Org Mode

Hi, Eric,

Does this process produce the same output as the one described here:
http://orgmode.org/worg/org-contribute.html#sec-3

Or is this a better way, and should the worg documentation be updated?

I don't understand git, and depend on documentation to help me do the 
right thing.

Yours,
Christian

On 1/5/11 5:27 PM, Eric Schulte wrote:
> Applied, Thanks -- Eric
>
> p.s. would you mind submitting git formatted patches for these sort of
>       updates in the future?  It greatly simplifies the process of
>       applying the patch.  The process for creating a git formatted patch
>       is as follows...
>
>       1. commit your changes to your local copy of the org-mode
>          repository
>       2. run the following command to wrap up the latest commit on your
>          local copy of the repository into a file which can be attached
>          to email messages
>
>              git format-patch -o ~/Desktop/ HEAD~1
>
>          after the command finished you will notice a new file on your
>          Desktop with a name like 0001-commit-message-stuff.patch
>
> Thanks Again -- Eric
>
> "Thomas S. Dye"<tsd@tsdye.com>  writes:
>
>> Aloha all,
>>
>> The attached patch documents the behavior of the :cache header argument.
>>
>> All the best,
>> Tom
>>
>>
>>
>> _______________________________________________
>> 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
>
> _______________________________________________
> 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	[flat|nested] 7+ messages in thread

* Re: :cache documentation patch
  2011-01-05 16:27 ` Eric Schulte
  2011-01-05 18:02   ` Christian Moe
@ 2011-01-05 18:32   ` Thomas S. Dye
  2011-01-06  4:47     ` Eric Schulte
  1 sibling, 1 reply; 7+ messages in thread
From: Thomas S. Dye @ 2011-01-05 18:32 UTC (permalink / raw)
  To: Eric Schulte; +Cc: Org Mode

Hi Eric,

Will do.  The earlier patch was made with magit.  I used the d  
command, Diff working tree, then saved the output to the file I sent.

If I understand correctly, the missing step was the commit.  I should  
be able to follow a commit with the D command in magit, starting at  
HEAD~1 and ending with HEAD.  Then save the resulting buffer to  
foo.patch, right?

Or, is it better to do this outside magit so the results don't pass  
through an emacs buffer on their way to disk?

All the best,
Tom

On Jan 5, 2011, at 6:27 AM, Eric Schulte wrote:

> Applied, Thanks -- Eric
>
> p.s. would you mind submitting git formatted patches for these sort of
>     updates in the future?  It greatly simplifies the process of
>     applying the patch.  The process for creating a git formatted  
> patch
>     is as follows...
>
>     1. commit your changes to your local copy of the org-mode
>        repository
>     2. run the following command to wrap up the latest commit on your
>        local copy of the repository into a file which can be attached
>        to email messages
>
>            git format-patch -o ~/Desktop/ HEAD~1
>
>        after the command finished you will notice a new file on your
>        Desktop with a name like 0001-commit-message-stuff.patch
>
> Thanks Again -- Eric
>
> "Thomas S. Dye" <tsd@tsdye.com> writes:
>
>> Aloha all,
>>
>> The attached patch documents the behavior of the :cache header  
>> argument.
>>
>> All the best,
>> Tom
>>
>>
>>
>> _______________________________________________
>> 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	[flat|nested] 7+ messages in thread

* Re: :cache documentation patch
  2011-01-05 18:32   ` Thomas S. Dye
@ 2011-01-06  4:47     ` Eric Schulte
  2011-01-06  7:45       ` Thomas S. Dye
  0 siblings, 1 reply; 7+ messages in thread
From: Eric Schulte @ 2011-01-06  4:47 UTC (permalink / raw)
  To: Thomas S. Dye; +Cc: Org Mode

Hi Tom,

Yes, the commit is important, this method actually shares all of your
commit, including the author information and the commit message.

I do this outside of magit, I tend to go to the magit buffer to make
sure everything looks ok, then do M-! and type in the command line
manually.  I'm not sure what the magit way of doing this would be, but
the "D" method you described doesn't generate the same type of output
file as does git format-patch.

Thanks -- Eric

"Thomas S. Dye" <tsd@tsdye.com> writes:

> Hi Eric,
>
> Will do.  The earlier patch was made with magit.  I used the d
> command, Diff working tree, then saved the output to the file I sent.
>
> If I understand correctly, the missing step was the commit.  I should
> be able to follow a commit with the D command in magit, starting at
> HEAD~1 and ending with HEAD.  Then save the resulting buffer to
> foo.patch, right?
>
> Or, is it better to do this outside magit so the results don't pass
> through an emacs buffer on their way to disk?
>
> All the best,
> Tom
>
> On Jan 5, 2011, at 6:27 AM, Eric Schulte wrote:
>
>> Applied, Thanks -- Eric
>>
>> p.s. would you mind submitting git formatted patches for these sort of
>>     updates in the future?  It greatly simplifies the process of
>>     applying the patch.  The process for creating a git formatted
>> patch
>>     is as follows...
>>
>>     1. commit your changes to your local copy of the org-mode
>>        repository
>>     2. run the following command to wrap up the latest commit on your
>>        local copy of the repository into a file which can be attached
>>        to email messages
>>
>>            git format-patch -o ~/Desktop/ HEAD~1
>>
>>        after the command finished you will notice a new file on your
>>        Desktop with a name like 0001-commit-message-stuff.patch
>>
>> Thanks Again -- Eric
>>
>> "Thomas S. Dye" <tsd@tsdye.com> writes:
>>
>>> Aloha all,
>>>
>>> The attached patch documents the behavior of the :cache header
>>> argument.
>>>
>>> All the best,
>>> Tom
>>>
>>>
>>>
>>> _______________________________________________
>>> 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	[flat|nested] 7+ messages in thread

* Re: :cache documentation patch
  2011-01-05 18:02   ` Christian Moe
@ 2011-01-06  4:49     ` Eric Schulte
  0 siblings, 0 replies; 7+ messages in thread
From: Eric Schulte @ 2011-01-06  4:49 UTC (permalink / raw)
  To: mail; +Cc: Org Mode

Hi Christian,

It's probably safer to stick with the worg guidelines than to follow my
advice :)

In the specific case of Tom's patches, I prefer the "git format-patch"
approach I described because it allows Tom to write the commit message,
and all I have to do is run a single command and the patch is applied.

Cheers -- Eric

Christian Moe <mail@christianmoe.com> writes:

> Hi, Eric,
>
> Does this process produce the same output as the one described here:
> http://orgmode.org/worg/org-contribute.html#sec-3
>
> Or is this a better way, and should the worg documentation be updated?
>
> I don't understand git, and depend on documentation to help me do the
> right thing.
>
> Yours,
> Christian
>
> On 1/5/11 5:27 PM, Eric Schulte wrote:
>> Applied, Thanks -- Eric
>>
>> p.s. would you mind submitting git formatted patches for these sort of
>>       updates in the future?  It greatly simplifies the process of
>>       applying the patch.  The process for creating a git formatted patch
>>       is as follows...
>>
>>       1. commit your changes to your local copy of the org-mode
>>          repository
>>       2. run the following command to wrap up the latest commit on your
>>          local copy of the repository into a file which can be attached
>>          to email messages
>>
>>              git format-patch -o ~/Desktop/ HEAD~1
>>
>>          after the command finished you will notice a new file on your
>>          Desktop with a name like 0001-commit-message-stuff.patch
>>
>> Thanks Again -- Eric
>>
>> "Thomas S. Dye"<tsd@tsdye.com>  writes:
>>
>>> Aloha all,
>>>
>>> The attached patch documents the behavior of the :cache header argument.
>>>
>>> All the best,
>>> Tom
>>>
>>>
>>>
>>> _______________________________________________
>>> 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
>>
>> _______________________________________________
>> 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	[flat|nested] 7+ messages in thread

* Re: :cache documentation patch
  2011-01-06  4:47     ` Eric Schulte
@ 2011-01-06  7:45       ` Thomas S. Dye
  0 siblings, 0 replies; 7+ messages in thread
From: Thomas S. Dye @ 2011-01-06  7:45 UTC (permalink / raw)
  To: Eric Schulte; +Cc: Org Mode

Hi Eric,

Thanks for the detailed instructions.  I'll follow this path next time.

All the best,
Tom

On Jan 5, 2011, at 6:47 PM, Eric Schulte wrote:

> Hi Tom,
>
> Yes, the commit is important, this method actually shares all of your
> commit, including the author information and the commit message.
>
> I do this outside of magit, I tend to go to the magit buffer to make
> sure everything looks ok, then do M-! and type in the command line
> manually.  I'm not sure what the magit way of doing this would be, but
> the "D" method you described doesn't generate the same type of output
> file as does git format-patch.
>
> Thanks -- Eric
>
> "Thomas S. Dye" <tsd@tsdye.com> writes:
>
>> Hi Eric,
>>
>> Will do.  The earlier patch was made with magit.  I used the d
>> command, Diff working tree, then saved the output to the file I sent.
>>
>> If I understand correctly, the missing step was the commit.  I should
>> be able to follow a commit with the D command in magit, starting at
>> HEAD~1 and ending with HEAD.  Then save the resulting buffer to
>> foo.patch, right?
>>
>> Or, is it better to do this outside magit so the results don't pass
>> through an emacs buffer on their way to disk?
>>
>> All the best,
>> Tom
>>
>> On Jan 5, 2011, at 6:27 AM, Eric Schulte wrote:
>>
>>> Applied, Thanks -- Eric
>>>
>>> p.s. would you mind submitting git formatted patches for these  
>>> sort of
>>>    updates in the future?  It greatly simplifies the process of
>>>    applying the patch.  The process for creating a git formatted
>>> patch
>>>    is as follows...
>>>
>>>    1. commit your changes to your local copy of the org-mode
>>>       repository
>>>    2. run the following command to wrap up the latest commit on your
>>>       local copy of the repository into a file which can be attached
>>>       to email messages
>>>
>>>           git format-patch -o ~/Desktop/ HEAD~1
>>>
>>>       after the command finished you will notice a new file on your
>>>       Desktop with a name like 0001-commit-message-stuff.patch
>>>
>>> Thanks Again -- Eric
>>>
>>> "Thomas S. Dye" <tsd@tsdye.com> writes:
>>>
>>>> Aloha all,
>>>>
>>>> The attached patch documents the behavior of the :cache header
>>>> argument.
>>>>
>>>> All the best,
>>>> Tom
>>>>
>>>>
>>>>
>>>> _______________________________________________
>>>> 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	[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).