@setfilename ../info/org
@settitle Org Mode Manual
-@set VERSION 3.15
-@set DATE September 2005
+@set VERSION 3.20
+@set DATE October 2005
@dircategory Emacs
@direntry
@quotation
Permission is granted to copy, distribute and/or modify this document
-under the terms of the GNU Free Documentation License, Version 1.2 or
+under the terms of the GNU Free Documentation License, Version 1.1 or
any later version published by the Free Software Foundation; with no
Invariant Sections, with the Front-Cover texts being ``A GNU Manual,''
and with the Back-Cover Texts as in (a) below. A copy of the
* Outlines:: Org-mode is based on outline-mode
* Headlines:: How to typeset org-tree headlines
-* Visibility cycling:: Show ad hide, much simplified
+* Visibility cycling:: Show and hide, much simplified
* Motion:: Jumping to other headlines
* Structure editing:: Changing sequence and level of headlines
* Archiving:: Move done task trees to a different place
* Advanced features:: Field names, parameters and automatic recalc
* Named-field formulas:: Formulas valid in single fields
* Editing/debugging formulas:: Changing a stored formula
-* Appetizer::
+* Appetizer:: Taste the power of calc
Hyperlinks
Exporting
-* Export commands:: Commands which export and display
+* ASCII export:: Export as a structured ASCII file
+* HTML export:: Export as an HTML file
+* iCalendar export:: Create calendar entries.
+
+HTML export
+
* HTML formatting:: Interpretation of the buffer content
* Export options:: How to influence exports
* Comment lines:: Lines which will not be exported
* Customization:: Adapting Org-mode to your taste
* FAQ:: Frequently asked questions
* Interaction:: Other Emacs packages
+* TTY keys:: Using Org-mode on a tty
* Bugs:: Things which do not work perfectly
* Acknowledgments:: These people provided feedback and more
Plain text URL-like links connect to websites, emails, Usenet
messages, BBDB entries, and any files related to the projects. For
printing and sharing of notes, an Org-mode file can be exported as a
-structured ASCII file, or as HTML.
+structured ASCII file, as HTML, or (todo and agenda items only) as an
+iCalendar file.
Org-mode keeps simple things simple. Not every outline branch needs
to be an action item, not every action item needs to have priority or
@menu
* Outlines:: Org-mode is based on outline-mode
* Headlines:: How to typeset org-tree headlines
-* Visibility cycling:: Show ad hide, much simplified
+* Visibility cycling:: Show and hide, much simplified
* Motion:: Jumping to other headlines
* Structure editing:: Changing sequence and level of headlines
* Archiving:: Move done task trees to a different place
@kindex M-S-@key{down}
@item M-S-@key{down}
Move subtree down (swap with next subtree of same level)
-@kindex C-c C-h C-w
-@item C-c C-h C-w
+@kindex C-c C-x C-w
+@item C-c C-x C-w
Kill subtree, i.e. remove it from buffer but save in kill ring.
-@kindex C-c C-h M-w
-@item C-c C-h M-w
+@kindex C-c C-x M-w
+@item C-c C-x M-w
Copy subtree to kill ring.
-@kindex C-c C-h C-y
-@item C-c C-h C-y
+@kindex C-c C-x C-y
+@item C-c C-x C-y
Yank subtree from kill ring. This does modify the level of the subtree to
make sure the tree fits in nicely at the yank position. The yank
level can also be specified with a prefix arg, or by yanking after a
|Name|Phone|Age
|-
@end example
-
@noindent and then press @key{TAB} to align the table and start filling in
fields.
+When typing text into a field, Org-mode treats @key{DEL},
+@key{Backspace}, and all character keys in a special way, so that
+inserting and deleting avoids shifting other fields. Also, when
+typing @emph{immediately after the cursor was moved into a new field
+with @kbd{@key{TAB}}, @kbd{S-@key{TAB}} or @kbd{@key{RET}}}, the
+field is automatically made blank. If this behavior is too
+unpredictable for you, configure the variables
+@code{org-enable-table-editor} and @code{org-table-auto-blank-field}.
+
@table @kbd
@tsubheading{Creation and conversion}
@item M-x org-table-create
Insert a horizontal line below current row. With prefix arg, the line
is created above the current line.
+@kindex C-c ^
+@item C-c ^
+Sort the table lines in the region. Point and mark must be in the first
+and last line to be included, and must be in the column that should be
+used for sorting. The command prompts for numerical versus
+alphnumerical sorting.
+
@tsubheading{Regions}
-@kindex C-c C-h M-w
-@item C-c C-h M-w
+@kindex C-c C-x M-w
+@item C-c C-x M-w
Copy a rectangular region from a table to a special clipboard. Point
and mark determine edge fields of the rectangle. The process ignores
horizontal separator lines.
-@kindex C-c C-h C-w
-@item C-c C-h C-w
+@kindex C-c C-x C-w
+@item C-c C-x C-w
Copy a rectangular region from a table to a special clipboard, and
blank all fields in the rectangle. So this is the ``cut'' operation.
-@kindex C-c C-h C-y
-@item C-c C-h C-y
+@kindex C-c C-x C-y
+@item C-c C-x C-y
Paste a rectangular region into a table.
The upper right corner ends up in the current field. All involved fields
will be overwritten. If the rectangle does not fit into the present table,
@section Calculations in tables
@cindex calculations, in tables
-The table editor has some spreadsheet-like capabilities. The Emacs
-@file{calc} package is required for this feature to work. There are
-basically two levels of complexity for table calculations in Org-mode.
-On the basic level, tables do only horizontal computations, so a field
-can be computed from other fields @emph{in the same row}, and Org-mode
-assumes that there is only one formula for each column. This is very
-efficient to work with and enough for many tasks. On the complex
-level, columns and individual fields can be named for easier
-referencing in formulas, individual named fields can have their own
-formula associated with them, and recalculation can be automated.
+The table editor makes use of the Emacs @file{calc} package to
+implement spreadsheet-like capabilities. Org-mode has two levels of
+complexity for table calculations. On the basic level, tables do only
+horizontal computations, so a field can be computed from other fields
+@emph{in the same row}, and Org-mode assumes that there is only one
+formula for each column. This is very efficient to work with and
+enough for many tasks. On the complex level, columns and individual
+fields can be named for easier referencing in formulas, individual
+named fields can have their own formula associated with them, and
+recalculation can be automated.
@menu
* Formula syntax:: How to write a formula
@end example
The range vectors can be directly fed into the calc vector functions
-like functions @samp{vmean} and @samp{vsum}.
+like @samp{vmean} and @samp{vsum}.
@samp{$name} is interpreted as the name of a column, parameter or
constant. Constants are defined globally through the variable
@code{org-table-formula-constants}. If you have the
@file{constants.el} package, it will also be used to resolve
-constants, including natural constants like @samp{$k} for Planck's
+constants, including natural constants like @samp{$h} for Planck's
constant, units like @samp{$km} for kilometers. Column names and
parameters can be specified in special table lines. These are
described below, see @ref{Advanced features}.
string consists of flags to influence calc's modes@footnote{By
default, Org-mode uses the standard calc modes (precision 12, angular
units degrees, fraction and symbolic modes off). However, the display
-format which has been changed to @code{(float 5)} to keep tables
-compact. The default settings can be configured using the variable
+format has been changed to @code{(float 5)} to keep tables compact.
+The default settings can be configured using the variable
@code{org-calc-default-modes}.} during execution, e.g. @samp{p20} to
switch the internal precision to 20 digits, @samp{n3}, @samp{s3},
@samp{e2} or @samp{f4} to switch to normal, scientific, engineering,
The fields in this line define names for the columns, so that you may
refer to a column as @samp{$Tot} instead of @samp{$6}.
@item ^
-This row define names for the fields @emph{above} the row. With such
+This row defines names for the fields @emph{above} the row. With such
a definition, any formula in the table may use @samp{$m1} to refer to
the value @samp{10}. Also, named fields can have their own formula
associated with them.
@end lisp
@cindex completion, of TODO keywords
+Changing these variables becomes only effective in a new Emacs session.
With this setup, the command @kbd{C-c C-t} will cycle an entry from
-TODO to FEEDBACK, then to VERIFY, and finally too DONE. You may also
+TODO to FEEDBACK, then to VERIFY, and finally to DONE. You may also
use a prefix argument to quickly select a specific state. For example
@kbd{C-3 C-c C-t} will change the state immediately to VERIFY.
If you define many keywords, you can use in-buffer completion (see
command @kbd{C-c C-t} is changed slightly@footnote{This is also true
for the @kbd{t} command in the timeline and agenda buffers.}. When
used several times in succession, it will still cycle through all
-names. But when when you return to the item after some time and
+names. But when you return to the item after some time and
execute @kbd{C-c C-t} again, it will switch from each name directly to
DONE. Use prefix arguments or completion to quickly select a specific
name.
changing one of these lines, use @kbd{C-c C-c} with the cursor still
in the line to make the changes known to Org-mode@footnote{Org-mode
parses these lines only when Org-mode is activated after visiting a
-file. @kbd{C-c C-c} with the cursor in a line starting with @samp{#-}
+file. @kbd{C-c C-c} with the cursor in a line starting with @samp{#+}
is simply restarting Org-mode, making sure that these changes will be
respected.}.
Like @kbd{C-c .}, but use the alternative format which contains date
and time.
+@kindex C-c !
+@item C-c !
+Like @kbd{C-c .}, but insert an inactive time stamp not triggering the
+agenda.
+
@kindex C-c <
@item C-c <
Insert a time stamp corresponding to the cursor date in the Calendar.
@table @kbd
@kindex C-c [
@item C-c [
-Add current file to the list of agenda files
+Add current file to the list of agenda files. The file is added to
+the front of the list. If it was already in the list, it is moved to
+the front. With prefix arg, file is added/moved to the end.
@kindex C-c ]
@item C-c ]
Remove current file from the list of agenda files.
+@kindex C-,
+@item C-,
+Cycle through agenda file list.
@end table
@noindent
The Org menu contains the list of all files and can be used to quickly
@item H
Show holidays for three month around the cursor date.
+@kindex C-c C-x C-c
+@item C-c C-x C-c
+Export a single iCalendar file containing entries from all agenda files.
+Not available in timelines.
+
@tsubheading{Quit and Exit}
@kindex q
@item q
@node Exporting, Miscellaneous, Timeline and Agenda, Top
@chapter Exporting
@cindex exporting
-@cindex ASCII export
-@cindex HTML export
-
-@cindex headline levels, for exporting
-For printing and sharing of notes, an Org-mode document can be
-exported as an ASCII file, or as HTML. In the exported version, the
-first 3 outline levels will become headlines, defining a general
-document structure. Additional levels will be exported as itemize
-lists. If you want that transition to occur at a different level,
-specify it with a prefix argument. For example,
-@example
-@kbd{M-1 M-x org-export-as-html}
-@end example
-@noindent
-creates only top level headlines and does the rest as items.
+For printing and sharing of notes, Org-mode documents can be exported
+as ASCII or HTML files. To incorporate entries with associated times
+like deadlines or appointments into a desktop calendar program like
+iCal, Org-mode can also produce extracts in the iCalendar format.
@menu
-* Export commands:: Commands which export and display
-* HTML formatting:: Interpretation of the buffer content
-* Export options:: How to influence exports
-* Comment lines:: Lines which will not be exported
+* ASCII export:: Export as a structured ASCII file
+* HTML export:: Export as an HTML file
+* iCalendar export:: Create calendar entries.
@end menu
-@node Export commands, HTML formatting, Exporting, Exporting
-@section Export commands
+@node ASCII export, HTML export, Exporting, Exporting
+@section ASCII export
+@cindex ASCII export
@cindex region, active
@cindex active region
will be exported. For an org file @file{myfile.org}, the ASCII file
will be @file{myfile.txt}. The file will be overwritten without
warning.
+@end table
+
+@cindex headline levels, for exporting
+In the exported version, the first 3 outline levels will become
+headlines, defining a general document structure. Additional levels
+will be exported as itemize lists. If you want that transition to occur
+at a different level, specify it with a prefix argument. For example,
+@example
+@kbd{C-1 C-c C-x a org-export-as-ascii}
+@end example
+@noindent
+creates only top level headlines and does the rest as items. Lines
+starting with @samp{#} and subtree starting with the word @samp{COMMENT}
+will not be exported.
+
+@node HTML export, iCalendar export, ASCII export, Exporting
+@section HTML export
+@cindex HTML export
+
+Org-mode contains an HTML exporter with extensive HTML formatting, in
+ways similar to John Grubers @emph{markdown} language, but with
+additional support for tables.
+
+@cindex region, active
+@cindex active region
+@cindex transient-mark-mode
+@table @kbd
@kindex C-c C-x h
@item C-c C-x h
Export as HTML file @file{myfile.html}.
-@kindex C-c C-x C-h
-@item C-c C-x C-h
+@kindex C-c C-x b
+@item C-c C-x b
Export as HTML file and open it with a browser.
@kindex C-c C-x t
@item C-c C-x t
Insert template with export options, see below.
@kindex C-c :
@item C-c :
-Toggle fixed-width for line or region, see below.
+Toggle fixed-width for entry (QUOTE) or region, see below.
@end table
-@node HTML formatting, Export options, Export commands, Exporting
-@section HTML formatting
+@cindex headline levels, for exporting
+In the exported version, the first 3 outline levels will become
+headlines, defining a general document structure. Additional levels
+will be exported as itemize lists. If you want that transition to occur
+at a different level, specify it with a prefix argument. For example,
+@example
+@kbd{C-2 C-c C-x b}
+@end example
+@noindent
+creates two levels of headings and does the rest as items.
+
+@menu
+* HTML formatting:: Interpretation of the buffer content
+* Export options:: How to influence exports
+* Comment lines:: Lines which will not be exported
+@end menu
+
+@node HTML formatting, Export options, HTML export, HTML export
+@subsection HTML formatting
Not all text is transferred literally to the exported HTML file. The
exporter implements the following interpretation:
@itemize @bullet
+
+@cindex hand-formatted lists
+@cindex lists, hand-formatted
+@item
+Hand-formatted lists with @samp{-}, @samp{*} or @samp{+} as
+bullet@footnote{When using @samp{*} as a bullet, lines must be
+indented or they will be seen as top-level headlines.}, or
+with @samp{1.}, @samp{2.} as enumerator will be recognized and
+transformed into HTML lists. The
+lists is terminated by the next headline, or by a line that is
+indented like the bullet/enumerator in the first line, or less. For
+example:
+@example
+** Lord of the Rings
+Some of my favorite scenes are
+- Eowyns fight
+- The attack of the Roherim
+ (this may be favorite one)
+- Peter Jackson being shot by Legolas,
+ in the extended DVD edition only
+My favorite characters are (in this sequence):
+ 1. Sam
+ 2. Eowyn
+ 3. Aragorn
+Among the others I don't really have a preference.
+@end example
+By default, only no nesting of lists is allowed, but see the variable
+@code{org-export-local-list-max-depth}.
@cindex underlined text
@cindex bold text
@cindex italic text
If these conversions conflict with your habits of typing ASCII text,
they can all be turned off with corresponding variables.
-@node Export options, Comment lines, HTML formatting, Exporting
-@section Export options
+@node Export options, Comment lines, HTML formatting, HTML export
+@subsection Export options
@cindex options, for export
@cindex completion, of option keywords
additional information. These lines may be put anywhere in the file.
The whole set of lines can be inserted into the buffer with @kbd{C-c
C-x t}. For individual lines, a good way to make sure the keyword is
-correct it to type @samp{#+} and then use @kbd{M-@key{TAB}} completion
+correct is to type @samp{#+} and then use @kbd{M-@key{TAB}} completion
(@pxref{Completion}).
@example
TeX: @r{turn on/off @TeX{} macros}
@end example
-@node Comment lines, , Export options, Exporting
-@section Comment lines
+You can also give style information for the exported file. The
+default specification can be configured through the option
+@code{org-export-html-style}. If you want to use a file-local style,
+you may use file variables, best wrapped into a COMMENT section at the
+end of the outline tree. For example:
+
+@example
+* COMMENT HTML style specifications
+
+# Local Variables:
+# org-export-html-style: " <style type=\"text/css\">
+ p @{font-weight: normal; color: gray; @}
+ h1 @{color: black; @}
+ </style>"
+# End: ***
+@end example
+
+Remember to execute @kbd{M-x normal-mode} after changing this to make
+the new style visible to Emacs.
+
+@node Comment lines, , Export options, HTML export
+@subsection Comment lines
@cindex comment lines
@cindex exporting, not
Lines starting with @samp{#} in column zero are treated as comments
and will never be exported. Also entire subtrees starting with the
word @samp{COMMENT} will never be exported. Finally, any text before
-the first headline will not be exported either.
+the first headline will not be exported either. This applies also for
+ASCII export.
@table @kbd
@kindex C-c ;
Toggle the COMMENT keyword at the beginning of an entry.
@end table
+@node iCalendar export, , HTML export, Exporting
+@section iCalendar export
+
+Some people like to use Org-mode for keeping track of projects, but
+still prefer a standard calendar application for anniversaries and
+appointments. In this case it can be useful to have deadlines and
+other time-stamped items in Org-mode files show up in the calendar
+application. Org-mode can export calendar information in the standard
+iCalendar format.
+
+@table @kbd
+@kindex C-c C-x i
+@item C-c C-x i
+Create iCalendar entries for the current file and store them in the same
+directory, using a file extension @file{.ics}.
+@kindex C-c C-x C-i
+@item C-c C-x C-i
+Like @kbd{C-c C-x i}, but do this for all files in
+@code{org-agenda-files}. For each of these files, a separate iCalendar
+file will be written.
+@kindex C-c C-x c
+@item C-c C-x c
+Create a single large iCalendar file from all files in
+@code{org-agenda-files} and write it to the file given by
+@code{org-combined-agenda-icalendar-file}.
+@end table
+
+How this calendar is best read and updated, depends on the on the
+application you are using. For example, when using iCal under Apple
+MacOS X, you could create a new calendar @samp{OrgMode} (the default
+name for the calendar created by @kbd{C-c C-x c}, see the variables
+@code{org-icalendar-combined-name} and
+@code{org-combined-agenda-icalendar-file}). Then set Org-mode to
+overwrite the corresponding file
+@file{~/Library/Calendars/OrgMode.ics}. You may even use AppleScript
+to make iCal re-read the calendar files each time a new version of
+@file{OrgMode.ics} is produced. Here is the setup needed for this:
+
+@lisp
+(setq org-combined-agenda-icalendar-file
+ "~/Library/Calendars/OrgMode.ics")
+(add-hook 'org-after-save-iCalendar-file-hook
+ (lambda ()
+ (shell-command
+ "osascript -e 'tell application \"iCal\" to reload calendars'")))
+@end lisp
+
@node Miscellaneous, Index, Exporting, Top
@chapter Miscellaneous
* Customization:: Adapting Org-mode to your taste
* FAQ:: Frequently asked questions
* Interaction:: Other Emacs packages
+* TTY keys:: Using Org-mode on a tty
* Bugs:: Things which do not work perfectly
* Acknowledgments:: These people provided feedback and more
@end menu
@i{before} the horizontal line. How can I quickly move to the line
@i{below} the horizontal line instead?}@*
Press @key{down} (to get on the separator line) and then @key{TAB}.
+Or configure the variable @code{org-table-tab-jumps-over-hlines}.
@item @b{How can I change the indentation of an entire table without
fixing every line by hand?}@*
@end enumerate
-@node Interaction, Bugs, FAQ, Miscellaneous
+@node Interaction, TTY keys, FAQ, Miscellaneous
@section Interaction with other packages
@cindex packages, interaction with other
Org-mode can cooperate with the following packages:
on the diary support of planner.
@end table
-@node Bugs, Acknowledgments, Interaction, Miscellaneous
+@node TTY keys, Bugs, Interaction, Miscellaneous
+@section Using org-mode on a tty
+
+Org-mode uses a number of keys that are not accessible on a tty. This
+applies to most special keys like cursor keys, @key{TAB} and
+@key{RET}, when these are combined with modifier keys like @key{Meta}
+and/or @key{Shift}. Org-mode uses these bindings because it needs to
+provide keys for a large number of commands, and because these keys
+appeared particularly easy to remember. In order to still be able to
+access the core functionality of Org-mode on a tty, alternative
+bindings are provided. Here is a complete list of these bindings,
+which are obviously more cumbersome to use. Note that sometimes a
+work-around can be better. For example changing a time stamp is
+really only fun with @kbd{S-@key{cursor}} keys. On a tty you would
+rather use @kbd{C-c .} to re-insert the timestamp.
+
+@page
+@multitable @columnfractions 0.15 0.2 0.2
+@item @b{Default} @tab @b{Alternative 1} @tab @b{Alternative 2}
+@item @kbd{S-@key{TAB}} @tab @kbd{C-u @key{TAB}} @tab
+@item @kbd{M-@key{left}} @tab @kbd{C-c C-x l} @tab @kbd{@key{Esc} @key{left}}
+@item @kbd{M-S-@key{left}} @tab @kbd{C-c C-x L} @tab
+@item @kbd{M-@key{right}} @tab @kbd{C-c C-x r} @tab @kbd{@key{Esc} @key{right}}
+@item @kbd{M-S-@key{right}} @tab @kbd{C-c C-x R} @tab
+@item @kbd{M-@key{up}} @tab @kbd{C-c C-x u} @tab @kbd{@key{Esc} @key{up}}
+@item @kbd{M-S-@key{up}} @tab @kbd{C-c C-x U} @tab
+@item @kbd{M-@key{down}} @tab @kbd{C-c C-x d} @tab @kbd{@key{Esc} @key{down}}
+@item @kbd{M-S-@key{down}} @tab @kbd{C-c C-x D} @tab
+@item @kbd{S-@key{RET}} @tab @kbd{C-c C-x c} @tab
+@item @kbd{M-@key{RET}} @tab @kbd{C-c C-x m} @tab @kbd{@key{Esc} @key{RET}}
+@item @kbd{M-S-@key{RET}} @tab @kbd{C-c C-x M} @tab
+@item @kbd{S-@key{left}} @tab @kbd{C-c C-x @key{left}} @tab
+@item @kbd{S-@key{right}} @tab @kbd{C-c C-x @key{right}} @tab
+@item @kbd{S-@key{up}} @tab @kbd{C-c C-x @key{up}} @tab
+@item @kbd{S-@key{down}} @tab @kbd{C-c C-x @key{down}} @tab
+@end multitable
+
+@node Bugs, Acknowledgments, TTY keys, Miscellaneous
@section Bugs
@cindex bugs
have found too hard to fix.
@itemize @bullet
+@c @item
+@c If you call @code{fill-paragraph} (bound to @kbd{M-q}) in a table, the
+@c filling is correctly disabled. However, if some text directly
+@c (without an empty line in between) precedes or follows a table, calling
+@c @code{fill-paragraph} in that text will also fill the table like
+@c normal text. Also, @code{fill-region} does bypass the
+@c @code{fill-paragraph} code and will fill tables like normal text.
@item
-If you call @code{fill-paragraph} (bound to @kbd{M-q}) in a table, the
-filling is correctly disabled. However, if some text directly
-(without an empty line in between) precedes or follows a table, calling
-@code{fill-paragraph} in that text will also fill the table like
-normal text. Also, @code{fill-region} does bypass the
-@code{fill-paragraph} code and will fill tables like normal text.
+Text in an entry protected with the @samp{QUOTE} keyword should not
+autowrap.
@item
When the application called by @kbd{C-c C-o} to open a file link fails
(for example because the application does not exits or refuses to open
the file), it does so silently. No error message is displayed.
@item
+The remote-editing commands in the agenda buffer cannot be undone with
+@code{undo} called from within the agenda buffer. But you can go to
+the corresponding buffer (using @key{TAB} or @key{RET} and execute
+@code{undo} there.
+@item
Recalculating a table line applies the formulas from left to right.
-If a formula calculated fields further down the row, multiple
-recalculation may be needed to get all fields consistent.
+If a formula uses @emph{calculated} fields further down the row,
+multiple recalculation may be needed to get all fields consistent.
@item
Under XEmacs, if Org-mode entries are included into the diary, it is
not possible to jump back from the diary to the org file. Apparently,
@item
Kai Grossjohann pointed out that a number of key bindings in Org-mode
conflict with other packages.
+@item
+Roland Winkler pointed out that additional keybindings are need to use
+Org-mode on a tty.
@end itemize
@node Index, Key Index, Miscellaneous, Top