Next: , Previous: Customization, Up: Miscellaneous


14.3 Summary of in-buffer settings

Org mode uses special lines in the buffer to define settings on a per-file basis. These lines start with a ‘#+’ followed by a keyword, a colon, and then individual words defining a setting. Several setting words can be in the same line, but you can also have multiple lines for the keyword. While these settings are described throughout the manual, here is a summary. After changing any of those lines in the buffer, press C-c C-c with the cursor still in the line to activate the changes immediately. Otherwise they become effective only when the file is visited again in a new Emacs session.

#+ARCHIVE: %s_done::
This line sets the archive location for the agenda file. It applies for all subsequent lines until the next ‘#+ARCHIVE’ line, or the end of the file. The first such line also applies to any entries before it. The corresponding variable is org-archive-location.
#+CATEGORY:
This line sets the category for the agenda file. The category applies for all subsequent lines until the next ‘#+CATEGORY’ line, or the end of the file. The first such line also applies to any entries before it.
#+COLUMNS: %25ITEM .....
Set the default format for columns view. This format applies when columns view is invoked in location where no COLUMNS property applies.
#+CONSTANTS: name1=value1 ...
Set file-local values for constants to be used in table formulas. This line set the local variable org-table-formula-constants-local. The global version of this variable is org-table-formula-constants.
#+FILETAGS: :tag1:tag2:tag3:
Set tags that can be inherited by any entry in the file, including the top-level entries.
#+DRAWERS: NAME1 .....
Set the file-local set of drawers. The corresponding global variable is org-drawers.
#+LINK: linkword replace
These lines (several are allowed) specify link abbreviations. See Link abbreviations. The corresponding variable is org-link-abbrev-alist.
#+PRIORITIES: highest lowest default
This line sets the limits and the default for the priorities. All three must be either letters A-Z or numbers 0-9. The highest priority must have a lower ASCII number that the lowest priority.
#+PROPERTY: Property_Name Value
This line sets a default inheritance value for entries in the current buffer, most useful for specifying the allowed values of a property.
#+SETUPFILE: file
This line defines a file that holds more in-buffer setup. Normally this is entirely ignored. Only when the buffer is parsed for option-setting lines (i.e. when starting Org mode for a file, when pressing C-c C-c in a settings line, or when exporting), then the contents of this file are parsed as if they had been included in the buffer. In particlar, the file can be any other Org mode file with internal setup. You can visit the file the cursor is in the line with C-c '.
#+STARTUP:
This line sets options to be used at startup of Org mode, when an Org file is being visited. The first set of options deals with the initial visibility of the outline tree. The corresponding variable for global default settings is org-startup-folded, with a default value t, which means overview.
          overview   top-level headlines only
          content    all headlines
          showall    no folding at all, show everything

Then there are options for aligning tables upon visiting a file. This is useful in files containing narrowed table columns. The corresponding variable is org-startup-align-all-tables, with a default value nil.

          align      align all tables
          noalign    don't align tables on startup

Logging closing and reinstating TODO items, and clock intervals (variables org-log-done, org-log-note-clock-out, and org-log-repeat) can be configured using these options.

          logdone            record a timestamp when an item is marked DONE
          lognotedone        record timestamp and a note when DONE
          nologdone          don't record when items are marked DONE
          logrepeat          record a time when reinstating a repeating item
          lognoterepeat      record a note when reinstating a repeating item
          nologrepeat        do not record when reinstating repeating item
          lognoteclock-out   record a note when clocking out
          nolognoteclock-out don't record a note when clocking out

Here are the options for hiding leading stars in outline headings, and for indenting outlines. The corresponding variables are org-hide-leading-stars and org-odd-levels-only, both with a default setting nil (meaning showstars and oddeven).

          hidestars  make all but one of the stars starting a headline invisible.
          showstars  show all stars starting a headline
          indent     virtual indentation according to outline level
          noindent   no virtual indentation according to outline level
          odd        allow only odd outline levels (1,3,...)
          oddeven    allow all outline levels

To turn on custom format overlays over time stamps (variables org-put-time-stamp-overlays and org-time-stamp-overlay-formats), use

          customtime overlay custom time format

The following options influence the table spreadsheet (variable constants-unit-system).

          constcgs   constants.el should use the c-g-s unit system
          constSI    constants.el should use the SI unit system

To influence footnote settings, use the following keywords. The corresponding variables are org-footnote-define-inline and org-footnote-auto-label.

          fninline    define footnotes inline
          fnnoinline  define footnotes in separate section
          fnlocal     define footnotes near first reference, but not inline
          fnprompt    prompt for footnote labels
          fnauto      create [fn:1]-like labels automatically (default)
          fnconfirm   offer automatic label for editing or confirmation
          fnplain     create [1]-like labels automatically

#+TAGS: TAG1(c1) TAG2(c2)
These lines (several such lines are allowed) specify the valid tags in this file, and (potentially) the corresponding fast tag selection keys. The corresponding variable is org-tag-alist.
#+TBLFM:
This line contains the formulas for the table directly above the line.
#+TITLE:, #+AUTHOR:, #+EMAIL:, #+LANGUAGE:, #+TEXT:, #+OPTIONS, #+DATE:
These lines provide settings for exporting files. For more details see Export options.
#+SEQ_TODO: #+TYP_TODO:
These lines set the TODO keywords and their interpretation in the current file. The corresponding variables are org-todo-keywords and org-todo-interpretation.