This is the official manual for the latest Org-mode release.

Table of Contents

Next: , Previous: Language-specific header arguments, Up: Using header arguments


Header arguments in Org mode properties

For buffer-wide header arguments, use #+PROPERTY: lines anywhere in the Org mode file (see Property syntax).

The following example sets *R*—only for ‘R’ code blocks—to session, making all the ‘R’ code blocks execute in the same session. Setting results to silent ignores the results of executions for all blocks—not just ‘R’ code blocks; no results inserted for any block.

     #+PROPERTY: header-args:R  :session *R*
     #+PROPERTY: header-args    :results silent

Header arguments set through property drawers (see Property syntax) apply at the sub-tree level on down. Since these property drawers can appear anywhere in the file hierarchy, Org uses outermost call or source block to resolve the values. Org ignores org-use-property-inheritance setting.

In this example, the value of :cache header argument defaults to yes for all code blocks in the sub-tree starting with the outline header.

     * outline header
       :PROPERTIES:
       :header-args:    :cache yes
       :END:

Properties defined through org-set-property function, bound to C-c C-x p, apply to all active languages. They override properties set in org-babel-default-header-args.