emacs-orgmode
[Top][All Lists]
Advanced

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

Re: [O] Selectively export RESULTS


From: Eric Schulte
Subject: Re: [O] Selectively export RESULTS
Date: Fri, 02 Mar 2012 10:48:29 -0700
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.93 (gnu/linux)

Matthew Landis <address@hidden> writes:

>  <cberry <at> tajo.ucsd.edu> writes:
>
>> 
>> Eric Schulte <eric.schulte <at> gmx.com> writes:
>> 
>> >>> Does this do what you want?
>
>> >
>> > Have you looked at the :cache header argument [1], from my understanding
>> > of your use case it should be exactly what you are after.
>> >
>> 
>> Its a step in the right direction.
>> 
>> It seems I have to set :cache yes on every block I use before I invoke
>> it. My attempt to use a buffer-wide PROPERTY setting for cache did not
>> pan out. 
>> 

Were these technical problems with the implementation of :cache, or
logistical problems specific to your organization of code blocks?

>
> I'd like to put in a vote for the kind of functionality that cberry is 
> describing.  I have a very similar situation - a large org file that uses R 
> to 
> do a lot of time consuming data manipulation and model fitting, resulting in 
> statistical tables and graphs.  I run a lot of the code blocks as I'm writing 
> it, resulting in :results in the org file.  
>
> In the end, I'd like to export the org file to html or ODT, but I'd like to 
> be 
> able to choose buffer-wide whether to rerun all of the code blocks or just 
> use 
> the results that are already in the buffer.  I tried setting #+PROPERTY: eval 
> no 
> at the top of the buffer in the hopes that on export, it would ignore all my 
> code blocks and just incorporate the :results, but this was ignored and my 
> code 
> blocks were rerun.
>
> The cache argument only partially deals with the problem, as this example 
> illustrates:
>
> #+begin_src R :session :cache yes
> x <- rnorm(100)
> #+end_src
> #+begin_src R :session :results graphics :exports results :file hist.png 
> :cache yes
> hist(x)
> #+end_src
>
> Now after the first export, I change code block 2, but not code block 1.  If 
> I 
> understand how cache works correctly, code block 2 will be rerun, but it will 
> fail because code block 1 is not rerun, so x doesn't exist in the R session.  
>

Have you tried this?  The cache header argument has special handling of
code blocks with sessions to handle such cases.

>
> For this reason, I'd prefer to be able to decide whether to re-run on a file-
> wide basis.
>

I'm not clear on why file-wide setting of cache does not work.

Are you requesting a new option to :cache, such that even if the code
block has changes the old results are used anyway?

>
> Many thanks to all of you who have created such an amazing system.
>

Thanks,

>
> M
>
>
>

-- 
Eric Schulte
http://cs.unm.edu/~eschulte/



reply via email to

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