[Top][All Lists]

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

Re: [O] Bug: org-export-babel-evaluate causes everything to be exported

From: Charles C. Berry
Subject: Re: [O] Bug: org-export-babel-evaluate causes everything to be exported [8.3.4 (release_8.3.4-824-ga02fe8)]
Date: Thu, 19 May 2016 20:33:23 -0700
User-agent: Alpine 2.20 (OSX 67 2015-01-07)

On Thu, 19 May 2016, Ken Mankoff wrote:

I've noticed that code and results are all getting exported in the
latest Org mode git head. This is new  behavior. I haven't traced
it to what commit caused this change, but the stock 8.2.10 install does
not have this bug.

The offending setting is:

(setq org-export-babel-evaluate nil)

I think this is a *feature* not a bug.

It turns off all of babel on export. So the code will still be there and any results that were already in the buffer will also be there.

You can use `org-babel-remove-result-one-or-many' with a prefix if you want results to be stripped (prior to export, say).

You can use :cache to prevent re-evaluation of code blocks and set org-export-babel-evaluate to t. Then the `:exports results' blocks will not have their code run nor exported.

If you want to avoid babel, but still have header-args govern the appearance of the export, you have a lot of work to do. The exporter does not get automatic access to the header-args, so stuff like

`#+PROPERTY: header-args :exports results'

would be hard for the src-block transcoder to find.

A workaround that might suffice is to defun `org-export-my-src-block' to return nothing, then use it as the src-block transcoder in a derived export backend. Then all the code disappears on export.

There are some other possibilities like hacks involving babel. Probably better to stay away from those.



reply via email to

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