Next: Language-specific header arguments in Org mode properties, Previous: Language-specific header arguments, Up: Using header arguments [Contents][Index]
Buffer-wide header arguments may be specified as properties through the use
of #+PROPERTY: lines placed anywhere in an Org mode file (see
Property syntax).
For example the following would set session to *R* (only for R
code blocks), and results to silent for every code block in the
buffer, ensuring that all execution took place in the same session, and no
results would be inserted into the buffer.
#+PROPERTY: header-args:R :session *R* #+PROPERTY: header-args :results silent
Header arguments read from Org mode properties can also be set on a
per-subtree basis using property drawers (see Property syntax).
When properties are used to set default header arguments, they are always
looked up with inheritance, regardless of the value of
org-use-property-inheritance. Properties are evaluated as seen by the
outermost call or source block.171
In the following example the value of
the :cache header argument will default to yes in all code
blocks in the subtree rooted at the following heading:
* outline header :PROPERTIES: :header-args: :cache yes :END:
Properties defined in this way override the properties set in
org-babel-default-header-args and are applied for all activated
languages. It is convenient to use the org-set-property function
bound to C-c C-x p to set properties in Org mode documents.
The deprecated syntax for default header argument properties, using the name of the header argument as a property name directly, evaluates the property as seen by the corresponding source block definition. This behavior has been kept for backwards compatibility.