Header arguments and result types in Org Babel
https://orgmode.org/manual/Specific-header-arguments.html
Table of Contents
:header-args::results:session:dir- Fix
Invalid function: org-babel-header-args-safe-fn - Emacs Lisp evaluation of arguments
:header-args: reference
- Editor wide
org-babel-default-header-argsororg-babel-default-header-args:<lang>- Buffer wide
- Note
+followingR, which append args to the current args. If you omit+, it just overwrites the current args.#+TITLE: Some title #+PROPERTY: header-args:R :exports results #+PROPERTY: header-args:R+ :width 800 - Heading wide
* sample header :PROPERTIES: :header-args: :cache yes :END: # Language specific * Heading :PROPERTIES: :header-args:clojure: :session *clojure-1* :header-args:R: :session *R* :END:- Block wide
#+HEADER: :var data=2 #+BEGIN_SRC emacs-lisp :results both #+END_SRC
:results reference
:session reference
Specify to make source code blocks share sessions.
:session none(default)- the block gets a new session
:session- the session name is derived from the source language identifier.
:session <name>- blocks with the same name share the session
:dir reference
:dirspecifies the default directory duringsrccode block execution.- You can use
:dir (magit-toplevel)to run the code block on the repository root.
Fix Invalid function: org-babel-header-args-safe-fn howto
Emacs Lisp evaluation of arguments discussion
- Emacs lisp code can set the values for variables.
- To differentiate a value from lisp code, Org interprets any value starting with
(,[,'or`as Emacs Lisp code. - The result of evaluating that code is then assigned to the value of that variable.