On 2016-05-19 at 23:33, Charles C. Berry <ccbe...@ucsd.edu> wrote:
> 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.

The documentation is: "Switch controlling code evaluation during export.
When set to nil no code will be evaluated as part of the export
process."

which is different than "all code and results will be exported". Evaluation and 
export are two different things.

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


(setq org-export-babel-evaluate t)

#+BEGIN_SRC octave :exports results :cache nil
"hello, world"
#+END_SRC
#+RESULTS:
: hello, world

Yes, the above appears to work.

Thanks,

   -k.

Reply via email to