[Top][All Lists]

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

Re: [O] org-export-babel-evaluate and header arguments

From: Anthony Cowley
Subject: Re: [O] org-export-babel-evaluate and header arguments
Date: Thu, 10 Mar 2016 19:10:41 -0500
User-agent: mu4e 0.9.16; emacs 24.5.2

Charles C. Berry writes:

> On Wed, 9 Mar 2016, Anthony Cowley wrote:
>> If I have org-export-babel-evaluate set to nil, source blocks are not 
>> evaluated on export. However, if a source block has a :var header 
>> argument that calls another source block, I am prompted if the callee 
>> should be evaluated.
>> Given that the caller is not to be evaluated, I'm not sure I see a 
>> reason for the :var to be evaluated.
> What gives here is that `org-babel-get-src-block-info' needs to develop 
> all the header arguments regardless of evaluation of the code block, so 
> :var gets handled.
>> Is there a way I can disable this argument evaluation?
> Something like:
>       :var a=(and org-export-babel-evaluate (org-sbe "abc"))
> See C-h f org-sbe RET
> HTH,
> Chuck

Thanks for the tip, Chuck!

This works out very well with one minor caveat:

Setting org-export-babel-evaluate to nil means that C-c C-c no longer properly 
evaluates a block with such a header. This means that exporting must be enabled 
during development.

Other than that little quibble, I've gotten this to work in both tiny tests and 
with complicated, slow to evaluate documents, so I'm pleased.

A minor note about org-sbe documentation is that header arguments need not be 
in a table, but should simply be passed as a single string as the first 
argument to org-sbe. This is inferable from the documentation, but a bit 


reply via email to

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