I think I know how to control automatic evaluation of code blocks with the
:exports keyword and with the
#+call: tag, but my blocks only leave
#+RESULTS: when I run them manually via
C-c C-c. Is automatic code eval-on-export only for side effects? Here is a MVE:
Here's a source block that executes automatically (modulo security) when we say ~M-x org-latex-export-to-pdf~ #+name: square #+header: :var x=0 #+begin_src python :exports code return x*x #+end_src It seems to execute automatically because of the following ~#+call~ tag: if I remove the tag, the code doesn't execute automatically any more: #+call: square(7) In any case, it only leaves a result in the emacs buffer under a ~#+RESULTS:~ tag if I run it manually via =C-c C-c=. Why doesn't it leave a result when it runs automatically? Is automatic running only for side effects? Here is a code block that runs automatically only if I say ~:exports both~ or ~:exports results~. #+name: ftw-python #+begin_src python :exports both return 43 #+end_src It also doesn't leave a result unless I run it manually.