emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Anthony Cowley <acowley@gmail.com>
To: emacs-orgmode <emacs-orgmode@gnu.org>
Subject: Re: org-export-babel-evaluate and header arguments
Date: Thu, 10 Mar 2016 19:10:41 -0500	[thread overview]
Message-ID: <m2bn6lzxfi.fsf@Sonmi451.home> (raw)
In-Reply-To: <alpine.OSX.2.20.1603091916001.2048@charles-berrys-macbook.local>


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

Anthony

  reply	other threads:[~2016-03-11  0:10 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-10  0:44 org-export-babel-evaluate and header arguments Anthony Cowley
2016-03-10  3:25 ` Charles C. Berry
2016-03-11  0:10   ` Anthony Cowley [this message]
2016-03-11  3:30     ` Charles C. Berry

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m2bn6lzxfi.fsf@Sonmi451.home \
    --to=acowley@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).