When org-export-babel-evaluate is set to nil, I see a different behavior
now as compared to earlier versions of org.
Now it seems that all header arguments of a code block are ignored,
including the arguments to the :exports setting. Even when I have set
":exports results" or ":exports code" I always get code and results
exported in the resulting document. If org-export-babel-evaluate is set
to t then everything behaves the way I was used to, ":exports results"
just exports the results and when set to "code" just the code is exported.
I think that this should be considered a bug. I frequently (even most of
the time) want to evaluate the org blocks manually, not upon export, but
I want to be able to define whether only the results should be visible
in the exported document. For generated pictures this is usually the
normal case.
I am using org 9.0.5 from MELPA now, and I can't completely say when
this changed, but I am very sure that a few weeks ago the behavior was
different, since I am using org a lot for preparing documents.
Simple test document:
#####################
* Test
#+BEGIN_SRC elisp :results output :exports code
(princ (format "This should only export the code\nemacs %s\norg %s"
emacs-version org-version))
#+END_SRC
#+RESULTS:
: This should only export the code
: emacs 25.1.1
: org 9.0.5
#+BEGIN_SRC elisp :results output :exports results
(princ (format "This should only export the results\nemacs %s\norg
%s" emacs-version org-version))
#+END_SRC
#+RESULTS:
: This should only export the results
: emacs 25.1.1
: org 9.0.5
* COMMENT Org babel settings
Local Variables:
org-export-babel-evaluate: nil
End:
####################
ASCII exported document when org-export-babel-evaluate: nil
1 Test
======
,----
| (princ (format "This should only export the code\nemacs %s\norg %s"
emacs-version org-version))
`----
,----
| This should only export the code
| emacs 25.1.1
| org 9.0.5
`----
,----
| (princ (format "This should only export the results\nemacs %s\norg
%s" emacs-version org-version))
`----
,----
| This should only export the results
| emacs 25.1.1
| org 9.0.5
`----
####################
ASCII exported document when org-export-babel-evaluate: t
1 Test
======
,----
| (princ (format "This should only export the code\nemacs %s\norg %s"
emacs-version org-version))
`----
,----
| This should only export the results
| emacs 25.1.1
| org 9.0.5
`----
Best regards,
Derek
--
Paul Scherrer Institut
Dr. Derek Feichtinger Phone: +41 56 310 47 33
Section Head Science-IT Email: derek.feichtin...@psi.ch
Building/Room No. WHGA/U126
CH-5232 Villigen PSI