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.
HTH,
Chuck