Header arguments and result types in Org Babel


Table of Contents

:header-args: reference

Editor wide

org-babel-default-header-args or org-babel-default-header-args:<lang>

Buffer wide
Note + following R, 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
  :header-args:    :cache yes

# Language specific
* Heading
  :header-args:clojure:    :session *clojure-1*
  :header-args:R:          :session *R*
Block wide
#+HEADER: :var data=2
#+BEGIN_SRC emacs-lisp :results both

:results reference

:session reference

Specify to make source code blocks share sessions.

:session none (default)
the block gets a new session
the session name is derived from the source language identifier.
:session <name>
blocks with the same name share the session

:dir reference

Fix Invalid function: org-babel-header-args-safe-fn howto

Emacs Lisp evaluation of arguments discussion