aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCarsten Dominik2009-11-13 08:41:34 +0000
committerCarsten Dominik2009-11-13 08:41:34 +0000
commita351880d144d80b89b530d2a13331e3665275650 (patch)
tree248eeafaedbaeec49bd060bbd9f012419c8d024a
parent8bfe682a6f3ffbab914af9037379cb1515720c28 (diff)
downloademacs-a351880d144d80b89b530d2a13331e3665275650.tar.gz
emacs-a351880d144d80b89b530d2a13331e3665275650.zip
2009-11-13 Carsten Dominik <carsten.dominik@gmail.com>
* org.texi: Removed @Ie, @ie, @Eg, @eg macros. 2009-11-13 James TD Smith <ahktenzero@mohorovi.cc> * org.texi (Column attributes): Add the new age summary operators. Also, mention the fact you can only use one summary operator per property. 2009-11-13 John Wiegley <johnw@newartisans.com> * org.texi (Tracking your habits): Added a new section in the manual about how to track habits. (Resolving idle time): Added a section on how idle and dangling clocks are resolved. 2009-11-13 Carsten Dominik <carsten.dominik@gmail.com> * org.texi (Agenda commands): Document the new `i' command. (Inserting deadline/schedule): Document logging changes of scheduling and deadline times stamps. (In-buffer settings): Document the in-buffer keywords for logging changes of scheduling and deadline times stamps. (Structure editing, Plain lists): Document indentation cycling in empty entries with TAB. (Archiving): Document the default archiving command. (Moving subtrees): Document the new keys for archiving. (Internal archiving): Fix incorrect key. (Agenda commands): Document the TODO set switching commands. (Agenda commands): Document the new archiving keys. (Clocking work time): Better description on how to save and restore a clock. (Resolving idle time): Mention the x11idle program to get true idleness also under X11. (Resolving idle time): Use @kbd instead of @key for normal letters, because this is how he rest of the manual does this. (Pushing to MobileOrg): Mention that `org-directory' should be set. (Agenda commands): Document that SPC is a filter for any tag. (Search view): Renamed from "Keyword search". (Capure): New chapter. (Markup): New chapter. (Links in HTML export, Images in HTML export): Extend the section titles. (Images in HTML export): Document the align option. (Text areas in HTML export): Extend the section title. (Images in LaTeX export): Explain image placement in LaTeX.
-rw-r--r--doc/misc/org.texi1986
-rw-r--r--etc/ChangeLog4
2 files changed, 1176 insertions, 814 deletions
diff --git a/doc/misc/org.texi b/doc/misc/org.texi
index a8dee3cb0f9..723aa4da4de 100644
--- a/doc/misc/org.texi
+++ b/doc/misc/org.texi
@@ -3,8 +3,8 @@
3@setfilename ../../info/org 3@setfilename ../../info/org
4@settitle The Org Manual 4@settitle The Org Manual
5 5
6@set VERSION 6.31a 6@set VERSION 6.33
7@set DATE October 2009 7@set DATE November 2009
8 8
9@c Version and Contact Info 9@c Version and Contact Info
10@set MAINTAINERSITE @uref{http://orgmode.org,maintainers webpage} 10@set MAINTAINERSITE @uref{http://orgmode.org,maintainers webpage}
@@ -102,9 +102,9 @@ license to the document, as described in section 6 of the license.
102* Tags:: Tagging headlines and matching sets of tags 102* Tags:: Tagging headlines and matching sets of tags
103* Properties and Columns:: Storing information about an entry 103* Properties and Columns:: Storing information about an entry
104* Dates and Times:: Making items useful for planning 104* Dates and Times:: Making items useful for planning
105* Capture:: Creating tasks and attaching files 105* Capture - Refile - Archive:: The ins and outs for projects
106* Agenda Views:: Collecting information into views 106* Agenda Views:: Collecting information into views
107* Embedded LaTeX:: LaTeX fragments and formulas 107* Markup:: Prepare text for rich export
108* Exporting:: Sharing and publishing of notes 108* Exporting:: Sharing and publishing of notes
109* Publishing:: Create a web site of linked Org files 109* Publishing:: Create a web site of linked Org files
110* Miscellaneous:: All the rest which did not fit elsewhere 110* Miscellaneous:: All the rest which did not fit elsewhere
@@ -133,7 +133,6 @@ Document Structure
133* Visibility cycling:: Show and hide, much simplified 133* Visibility cycling:: Show and hide, much simplified
134* Motion:: Jumping to other headlines 134* Motion:: Jumping to other headlines
135* Structure editing:: Changing sequence and level of headlines 135* Structure editing:: Changing sequence and level of headlines
136* Archiving:: Move done task trees to a different place
137* Sparse trees:: Matches embedded in context 136* Sparse trees:: Matches embedded in context
138* Plain lists:: Additional structure within an entry 137* Plain lists:: Additional structure within an entry
139* Drawers:: Tucking stuff away 138* Drawers:: Tucking stuff away
@@ -141,11 +140,6 @@ Document Structure
141* Footnotes:: How footnotes are defined in Org's syntax 140* Footnotes:: How footnotes are defined in Org's syntax
142* Orgstruct mode:: Structure editing outside Org 141* Orgstruct mode:: Structure editing outside Org
143 142
144Archiving
145
146* ARCHIVE tag:: Marking a tree as inactive
147* Moving subtrees:: Moving a tree to an archive file
148
149Tables 143Tables
150 144
151* Built-in table editor:: Simple tables 145* Built-in table editor:: Simple tables
@@ -204,6 +198,7 @@ Progress logging
204 198
205* Closing items:: When was this entry marked DONE? 199* Closing items:: When was this entry marked DONE?
206* Tracking TODO state changes:: When did the status change? 200* Tracking TODO state changes:: When did the status change?
201* Tracking your habits:: How consistent have you been?
207 202
208Tags 203Tags
209 204
@@ -237,6 +232,7 @@ Dates and Times
237* Creating timestamps:: Commands which insert timestamps 232* Creating timestamps:: Commands which insert timestamps
238* Deadlines and scheduling:: Planning your work 233* Deadlines and scheduling:: Planning your work
239* Clocking work time:: Tracking how long you spend on a task 234* Clocking work time:: Tracking how long you spend on a task
235* Resolving idle time:: Resolving time if you've been idle
240* Effort estimates:: Planning work effort in advance 236* Effort estimates:: Planning work effort in advance
241* Relative timer:: Notes with a running timer 237* Relative timer:: Notes with a running timer
242 238
@@ -250,19 +246,25 @@ Deadlines and scheduling
250* Inserting deadline/schedule:: Planning items 246* Inserting deadline/schedule:: Planning items
251* Repeated tasks:: Items that show up again and again 247* Repeated tasks:: Items that show up again and again
252 248
253Capture 249Capture - Refile - Archive
254 250
255* Remember:: Capture new tasks/ideas with little interruption 251* Remember:: Capture new tasks/ideas with little interruption
256* Attachments:: Add files to tasks. 252* Attachments:: Add files to tasks.
257* RSS Feeds:: Getting input from RSS feeds 253* RSS Feeds:: Getting input from RSS feeds
258* Protocols:: External (@eg Browser) access to Emacs and Org 254* Protocols:: External (e.g. Browser) access to Emacs and Org
255* Refiling notes:: Moving a tree from one place to another
256* Archiving:: What to do with finished projects
259 257
260Remember 258Remember
261 259
262* Setting up Remember for Org:: Some code for .emacs to get things going 260* Setting up Remember for Org:: Some code for .emacs to get things going
263* Remember templates:: Define the outline of different note types 261* Remember templates:: Define the outline of different note types
264* Storing notes:: Directly get the note to where it belongs 262* Storing notes:: Directly get the note to where it belongs
265* Refiling notes:: Moving a note or task to a project 263
264Archiving
265
266* Moving subtrees:: Moving a tree to an archive file
267* Internal archiving:: Switch off a tree but keep i in the file
266 268
267Agenda Views 269Agenda Views
268 270
@@ -281,7 +283,7 @@ The built-in agenda views
281* Global TODO list:: All unfinished action items 283* Global TODO list:: All unfinished action items
282* Matching tags and properties:: Structured information with fine-tuned search 284* Matching tags and properties:: Structured information with fine-tuned search
283* Timeline:: Time-sorted view for single file 285* Timeline:: Time-sorted view for single file
284* Keyword search:: Finding entries by keyword 286* Search view:: Find entries by searching for text
285* Stuck projects:: Find projects you need to review 287* Stuck projects:: Find projects you need to review
286 288
287Presentation and sorting 289Presentation and sorting
@@ -296,17 +298,38 @@ Custom agenda views
296* Block agenda:: All the stuff you need in a single buffer 298* Block agenda:: All the stuff you need in a single buffer
297* Setting Options:: Changing the rules 299* Setting Options:: Changing the rules
298 300
301Markup for rich export
302
303* Structural markup elements:: The basic structure as seen by the exporter
304* Images and tables:: Tables and Images will be included
305* Literal examples:: Source code examples with special formatting
306* Include files:: Include additional files into a document
307* Macro replacement:: Use macros to create complex output
308* Embedded LaTeX:: LaTeX can be freely used inside Org documents
309
310Structural markup elements
311
312* Document title:: Where the title is taken from
313* Headings and sections:: The document structure as seen by the exporter
314* Table of contents:: The if and where of the table of contents
315* Initial text:: Text before the first heading?
316* Lists:: Lists
317* Paragraphs:: Paragraphs
318* Footnote markup:: Footnotes
319* Emphasis and monospace:: Bold, italic, etc.
320* Horizontal rules:: Make a line
321* Comment lines:: What will *not* be exported
322
299Embedded La@TeX{} 323Embedded La@TeX{}
300 324
301* Math symbols:: @TeX{} macros for symbols and Greek letters 325* Special symbols:: Greek letters and other symbols
302* Subscripts and superscripts:: Simple syntax for raising/lowering text 326* Subscripts and superscripts:: Simple syntax for raising/lowering text
303* LaTeX fragments:: Complex formulas made easy 327* LaTeX fragments:: Complex formulas made easy
304* Processing LaTeX fragments:: Previewing La@TeX{} processing 328* Previewing LaTeX fragments:: What will this snippet look like?
305* CDLaTeX mode:: Speed up entering of formulas 329* CDLaTeX mode:: Speed up entering of formulas
306 330
307Exporting 331Exporting
308 332
309* Markup rules:: Which structures are recognized?
310* Selective export:: Using tags to select and exclude trees 333* Selective export:: Using tags to select and exclude trees
311* Export options:: Per-file export settings 334* Export options:: Per-file export settings
312* The export dispatcher:: How to access exporter commands 335* The export dispatcher:: How to access exporter commands
@@ -314,33 +337,15 @@ Exporting
314* HTML export:: Exporting to HTML 337* HTML export:: Exporting to HTML
315* LaTeX and PDF export:: Exporting to La@TeX{}, and processing to PDF 338* LaTeX and PDF export:: Exporting to La@TeX{}, and processing to PDF
316* DocBook export:: Exporting to DocBook 339* DocBook export:: Exporting to DocBook
340* Freemind export:: Exporting to Freemind mind maps
317* XOXO export:: Exporting to XOXO 341* XOXO export:: Exporting to XOXO
318* iCalendar export:: Exporting in iCalendar format 342* iCalendar export:: Exporting in iCalendar format
319 343
320Markup rules
321
322* Document title:: How the document title is determined
323* Headings and sections:: The main structure of the exported document
324* Table of contents:: If, where, how to create a table of contents
325* Initial text:: Text before the first headline
326* Lists:: Plain lists are exported
327* Paragraphs:: What determines beginning and ending
328* Literal examples:: Source code and other examples
329* Include files:: Include the contents of a file during export
330* Tables exported:: Tables are exported richly
331* Inlined images:: How to inline images during export
332* Footnote markup:: ASCII representation of footnotes
333* Emphasis and monospace:: To bold or not to bold
334* TeX macros and LaTeX fragments:: Create special, rich export.
335* Horizontal rules:: A line across the page
336* Comment lines:: Some lines will not be exported
337* Macro replacement:: Global replacement of place holders
338
339HTML export 344HTML export
340 345
341* HTML Export commands:: How to invoke HTML export 346* HTML Export commands:: How to invoke HTML export
342* Quoting HTML tags:: Using direct HTML in Org mode 347* Quoting HTML tags:: Using direct HTML in Org mode
343* Links:: Transformation of links for HTML 348* Links in HTML export:: How links will be interpreted and formatted
344* Tables in HTML export:: How to modify the formatting of tables 349* Tables in HTML export:: How to modify the formatting of tables
345* Images in HTML export:: How to insert figures into HTML output 350* Images in HTML export:: How to insert figures into HTML output
346* Text areas in HTML export:: An alternative way to show an example 351* Text areas in HTML export:: An alternative way to show an example
@@ -750,7 +755,6 @@ edit the structure of the document.
750* Visibility cycling:: Show and hide, much simplified 755* Visibility cycling:: Show and hide, much simplified
751* Motion:: Jumping to other headlines 756* Motion:: Jumping to other headlines
752* Structure editing:: Changing sequence and level of headlines 757* Structure editing:: Changing sequence and level of headlines
753* Archiving:: Move done task trees to a different place
754* Sparse trees:: Matches embedded in context 758* Sparse trees:: Matches embedded in context
755* Plain lists:: Additional structure within an entry 759* Plain lists:: Additional structure within an entry
756* Drawers:: Tucking stuff away 760* Drawers:: Tucking stuff away
@@ -897,7 +901,7 @@ the previously used indirect buffer.
897@cindex @code{showeverything}, STARTUP keyword 901@cindex @code{showeverything}, STARTUP keyword
898 902
899When Emacs first visits an Org file, the global state is set to 903When Emacs first visits an Org file, the global state is set to
900OVERVIEW, @ie only the top level headlines are visible. This can be 904OVERVIEW, i.e. only the top level headlines are visible. This can be
901configured through the variable @code{org-startup-folded}, or on a 905configured through the variable @code{org-startup-folded}, or on a
902per-file basis by adding one of the following lines anywhere in the 906per-file basis by adding one of the following lines anywhere in the
903buffer: 907buffer:
@@ -918,7 +922,7 @@ for this property are @code{folded}, @code{children}, @code{content}, and
918@table @kbd 922@table @kbd
919@kindex C-u C-u @key{TAB} 923@kindex C-u C-u @key{TAB}
920@item C-u C-u @key{TAB} 924@item C-u C-u @key{TAB}
921Switch back to the startup visibility of the buffer, @ie whatever is 925Switch back to the startup visibility of the buffer, i.e. whatever is
922requested by startup options and @samp{VISIBILITY} properties in individual 926requested by startup options and @samp{VISIBILITY} properties in individual
923entries. 927entries.
924@end table 928@end table
@@ -969,7 +973,7 @@ q @r{Quit}
969See also the variable @code{org-goto-interface}. 973See also the variable @code{org-goto-interface}.
970@end table 974@end table
971 975
972@node Structure editing, Archiving, Motion, Document Structure 976@node Structure editing, Sparse trees, Motion, Document Structure
973@section Structure editing 977@section Structure editing
974@cindex structure editing 978@cindex structure editing
975@cindex headline, promotion and demotion 979@cindex headline, promotion and demotion
@@ -996,7 +1000,7 @@ customize the variable @code{org-M-RET-may-split-line}.}. If the
996command is used at the beginning of a headline, the new headline is 1000command is used at the beginning of a headline, the new headline is
997created before the current line. If at the beginning of any other line, 1001created before the current line. If at the beginning of any other line,
998the content of that line is made the new heading. If the command is 1002the content of that line is made the new heading. If the command is
999used at the end of a folded subtree (@ie behind the ellipses at the end 1003used at the end of a folded subtree (i.e. behind the ellipses at the end
1000of a headline), then a headline like the current one will be inserted 1004of a headline), then a headline like the current one will be inserted
1001after the end of the subtree. 1005after the end of the subtree.
1002@kindex C-@key{RET} 1006@kindex C-@key{RET}
@@ -1014,6 +1018,12 @@ variable @code{org-treat-insert-todo-heading-as-state-change}.
1014Insert new TODO entry with same level as current heading. Like 1018Insert new TODO entry with same level as current heading. Like
1015@kbd{C-@key{RET}}, the new headline will be inserted after the current 1019@kbd{C-@key{RET}}, the new headline will be inserted after the current
1016subtree. 1020subtree.
1021@kindex @key{TAB}
1022@item @key{TAB} @r{in new, empty entry}
1023In a new entry with no text yet, the first @key{TAB} demotes the entry to
1024become a child of the previous one. The next @key{TAB} makes it a parent,
1025and so on, all the way to top level. Yet another @key{TAB}, and you are back
1026to the initial level.
1017@kindex M-@key{left} 1027@kindex M-@key{left}
1018@item M-@key{left} 1028@item M-@key{left}
1019Promote current heading by one level. 1029Promote current heading by one level.
@@ -1035,7 +1045,7 @@ level).
1035Move subtree down (swap with next subtree of same level). 1045Move subtree down (swap with next subtree of same level).
1036@kindex C-c C-x C-w 1046@kindex C-c C-x C-w
1037@item C-c C-x C-w 1047@item C-c C-x C-w
1038Kill subtree, @ie remove it from buffer but save in kill ring. 1048Kill subtree, i.e. remove it from buffer but save in kill ring.
1039With a numeric prefix argument N, kill N sequential subtrees. 1049With a numeric prefix argument N, kill N sequential subtrees.
1040@kindex C-c C-x M-w 1050@kindex C-c C-x M-w
1041@item C-c C-x M-w 1051@item C-c C-x M-w
@@ -1111,145 +1121,8 @@ just after the last headline to change. Note that when the cursor is
1111inside a table (@pxref{Tables}), the Meta-Cursor keys have different 1121inside a table (@pxref{Tables}), the Meta-Cursor keys have different
1112functionality. 1122functionality.
1113 1123
1114@node Archiving, Sparse trees, Structure editing, Document Structure
1115@section Archiving
1116@cindex archiving
1117
1118When a project represented by a (sub)tree is finished, you may want
1119to move the tree out of the way and to stop it from contributing to the
1120agenda. Org mode knows two ways of archiving. You can mark a tree with
1121the ARCHIVE tag, or you can move an entire (sub)tree to a different
1122location.
1123
1124@menu
1125* ARCHIVE tag:: Marking a tree as inactive
1126* Moving subtrees:: Moving a tree to an archive file
1127@end menu
1128
1129@node ARCHIVE tag, Moving subtrees, Archiving, Archiving
1130@subsection The ARCHIVE tag
1131@cindex internal archiving
1132
1133A headline that is marked with the ARCHIVE tag (@pxref{Tags}) stays at
1134its location in the outline tree, but behaves in the following way:
1135@itemize @minus
1136@item
1137@vindex org-cycle-open-archived-trees
1138It does not open when you attempt to do so with a visibility cycling
1139command (@pxref{Visibility cycling}). You can force cycling archived
1140subtrees with @kbd{C-@key{TAB}}, or by setting the option
1141@code{org-cycle-open-archived-trees}. Also normal outline commands like
1142@code{show-all} will open archived subtrees.
1143@item
1144@vindex org-sparse-tree-open-archived-trees
1145During sparse tree construction (@pxref{Sparse trees}), matches in
1146archived subtrees are not exposed, unless you configure the option
1147@code{org-sparse-tree-open-archived-trees}.
1148@item
1149@vindex org-agenda-skip-archived-trees
1150During agenda view construction (@pxref{Agenda Views}), the content of
1151archived trees is ignored unless you configure the option
1152@code{org-agenda-skip-archived-trees}, in which case these trees will always
1153be included. In the agenda you can press the @kbd{v} key to get archives
1154temporarily included.
1155@item
1156@vindex org-export-with-archived-trees
1157Archived trees are not exported (@pxref{Exporting}), only the headline
1158is. Configure the details using the variable
1159@code{org-export-with-archived-trees}.
1160@item
1161@vindex org-columns-skip-arrchived-trees
1162Archived trees are excluded from column view unless the variable
1163@code{org-columns-skip-arrchived-trees} is configured to @code{nil}.
1164@end itemize
1165
1166The following commands help managing the ARCHIVE tag:
1167
1168@table @kbd
1169@kindex C-c C-x a
1170@item C-c C-x a
1171Toggle the ARCHIVE tag for the current headline. When the tag is set,
1172the headline changes to a shadowed face, and the subtree below it is
1173hidden.
1174@kindex C-u C-c C-x a
1175@item C-u C-c C-x a
1176Check if any direct children of the current headline should be archived.
1177To do this, each subtree is checked for open TODO entries. If none are
1178found, the command offers to set the ARCHIVE tag for the child. If the
1179cursor is @emph{not} on a headline when this command is invoked, the
1180level 1 trees will be checked.
1181@kindex C-@kbd{TAB}
1182@item C-@kbd{TAB}
1183Cycle a tree even if it is tagged with ARCHIVE.
1184@end table
1185
1186@node Moving subtrees, , ARCHIVE tag, Archiving
1187@subsection Moving subtrees
1188@cindex external archiving
1189
1190Once an entire project is finished, you may want to move it to a different
1191location. Org can move it to an @emph{Archive Sibling} in the same tree, to a
1192different tree in the current file, or to a different file, the archive file.
1193
1194@table @kbd
1195@kindex C-c C-x A
1196@item C-c C-x A
1197Move the current entry to the @emph{Archive Sibling}. This is a sibling of
1198the entry with the heading @samp{Archive} and the tag @samp{ARCHIVE}
1199(@pxref{ARCHIVE tag}). The entry becomes a child of that sibling and in this
1200way retains a lot of its original context, including inherited tags and
1201approximate position in the outline.
1202@kindex C-c $
1203@kindex C-c C-x C-s
1204@itemx C-c $
1205@item C-c C-x C-s
1206@vindex org-archive-location
1207Archive the subtree starting at the cursor position to the location
1208given by @code{org-archive-location}. Context information that could be
1209lost, like the file name, the category, inherited tags, and the TODO
1210state will be stored as properties in the entry.
1211@kindex C-u C-c C-x C-s
1212@item C-u C-c C-x C-s
1213Check if any direct children of the current headline could be moved to
1214the archive. To do this, each subtree is checked for open TODO entries.
1215If none are found, the command offers to move it to the archive
1216location. If the cursor is @emph{not} on a headline when this command
1217is invoked, the level 1 trees will be checked.
1218@end table
1219
1220@cindex archive locations
1221The default archive location is a file in the same directory as the
1222current file, with the name derived by appending @file{_archive} to the
1223current file name. For information and examples on how to change this,
1224see the documentation string of the variable
1225@code{org-archive-location}. There is also an in-buffer option for
1226setting this variable, for example@footnote{For backward compatibility,
1227the following also works: If there are several such lines in a file,
1228each specifies the archive location for the text below it. The first
1229such line also applies to any text before its definition. However,
1230using this method is @emph{strongly} deprecated as it is incompatible
1231with the outline structure of the document. The correct method for
1232setting multiple archive locations in a buffer is using properties.}:
1233
1234@cindex #+ARCHIVE
1235@example
1236#+ARCHIVE: %s_done::
1237@end example
1238
1239@cindex property, ARCHIVE
1240@noindent
1241If you would like to have a special ARCHIVE location for a single entry
1242or a (sub)tree, give the entry an @code{:ARCHIVE:} property with the
1243location as the value (@pxref{Properties and Columns}).
1244
1245@vindex org-archive-save-context-info
1246When a subtree is moved, it receives a number of special properties that
1247record context information like the file from where the entry came, its
1248outline path the archiving time etc. Configure the variable
1249@code{org-archive-save-context-info} to adjust the amount of information
1250added.
1251 1124
1252@node Sparse trees, Plain lists, Archiving, Document Structure 1125@node Sparse trees, Plain lists, Structure editing, Document Structure
1253@section Sparse trees 1126@section Sparse trees
1254@cindex sparse trees 1127@cindex sparse trees
1255@cindex trees, sparse 1128@cindex trees, sparse
@@ -1346,7 +1219,7 @@ as bullets.
1346@emph{Ordered} list items start with a numeral followed by either a period or 1219@emph{Ordered} list items start with a numeral followed by either a period or
1347a right parenthesis, such as @samp{1.} or @samp{1)}. 1220a right parenthesis, such as @samp{1.} or @samp{1)}.
1348@item 1221@item
1349@emph{Description} list items are like unordered list items, but contain the 1222@emph{Description} list items are unordered list items, and contain the
1350separator @samp{ :: } to separate the description @emph{term} from the 1223separator @samp{ :: } to separate the description @emph{term} from the
1351description. 1224description.
1352@end itemize 1225@end itemize
@@ -1420,6 +1293,12 @@ bullet, a bullet is added to the current line.
1420@kindex M-S-@key{RET} 1293@kindex M-S-@key{RET}
1421@item M-S-@key{RET} 1294@item M-S-@key{RET}
1422Insert a new item with a checkbox (@pxref{Checkboxes}). 1295Insert a new item with a checkbox (@pxref{Checkboxes}).
1296@kindex @key{TAB}
1297@item @key{TAB} @r{in new, empty item}
1298In a new item with no text yet, the first @key{TAB} demotes the item to
1299become a child of the previous one. The next @key{TAB} makes it a parent,
1300and so on, all the way to the left margin. Yet another @key{TAB}, and you
1301are back to the initial level.
1423@kindex S-@key{up} 1302@kindex S-@key{up}
1424@kindex S-@key{down} 1303@kindex S-@key{down}
1425@item S-@key{up} 1304@item S-@key{up}
@@ -1536,7 +1415,7 @@ or on a per-file basis by using
1536Org mode supports the creation of footnotes. In contrast to the 1415Org mode supports the creation of footnotes. In contrast to the
1537@file{footnote.el} package, Org mode's footnotes are designed for work on a 1416@file{footnote.el} package, Org mode's footnotes are designed for work on a
1538larger document, not only for one-off documents like emails. The basic 1417larger document, not only for one-off documents like emails. The basic
1539syntax is similar to the one used by @file{footnote.el}, @ie a footnote is 1418syntax is similar to the one used by @file{footnote.el}, i.e. a footnote is
1540defined in a paragraph that is started by a footnote marker in square 1419defined in a paragraph that is started by a footnote marker in square
1541brackets in column 0, no indentation allowed. If you need a paragraph break 1420brackets in column 0, no indentation allowed. If you need a paragraph break
1542inside a footnote, use the La@TeX{} idiom @samp{\par}. The footnote reference 1421inside a footnote, use the La@TeX{} idiom @samp{\par}. The footnote reference
@@ -2298,7 +2177,7 @@ containing the field. If you provide the @samp{N} mode switch, all
2298referenced elements will be numbers (non-number fields will be zero) and 2177referenced elements will be numbers (non-number fields will be zero) and
2299interpolated as Lisp numbers, without quotes. If you provide the 2178interpolated as Lisp numbers, without quotes. If you provide the
2300@samp{L} flag, all fields will be interpolated literally, without quotes. 2179@samp{L} flag, all fields will be interpolated literally, without quotes.
2301@Ie{}, if you want a reference to be interpreted as a string by the Lisp 2180I.e., if you want a reference to be interpreted as a string by the Lisp
2302form, enclose the reference operator itself in double-quotes, like 2181form, enclose the reference operator itself in double-quotes, like
2303@code{"$3"}. Ranges are inserted as space-separated fields, so you can 2182@code{"$3"}. Ranges are inserted as space-separated fields, so you can
2304embed them in list or vector syntax. A few examples, note how the 2183embed them in list or vector syntax. A few examples, note how the
@@ -2379,7 +2258,7 @@ following command:
2379Install a new formula for the current column and replace current field with 2258Install a new formula for the current column and replace current field with
2380the result of the formula. The command prompts for a formula, with default 2259the result of the formula. The command prompts for a formula, with default
2381taken from the @samp{#+TBLFM} line, applies it to the current field and 2260taken from the @samp{#+TBLFM} line, applies it to the current field and
2382stores it. With a numeric prefix argument(@eg @kbd{C-5 C-c =}) the command 2261stores it. With a numeric prefix argument(e.g. @kbd{C-5 C-c =}) the command
2383will apply it to that many consecutive fields in the current column. 2262will apply it to that many consecutive fields in the current column.
2384@end table 2263@end table
2385 2264
@@ -2540,7 +2419,7 @@ to reserve the first column of the table for special marking characters.
2540@table @kbd 2419@table @kbd
2541@kindex C-# 2420@kindex C-#
2542@item C-# 2421@item C-#
2543Rotate the calculation mark in first column through the states @samp{}, 2422Rotate the calculation mark in first column through the states @samp{ },
2544@samp{#}, @samp{*}, @samp{!}, @samp{$}. When there is an active region, 2423@samp{#}, @samp{*}, @samp{!}, @samp{$}. When there is an active region,
2545change all marks in the region. 2424change all marks in the region.
2546@end table 2425@end table
@@ -2688,7 +2567,7 @@ Specify whether the plot will be @code{2d}, @code{3d}, or @code{grid}.
2688 2567
2689@item with 2568@item with
2690Specify a @code{with} option to be inserted for every col being plotted 2569Specify a @code{with} option to be inserted for every col being plotted
2691(@eg @code{lines}, @code{points}, @code{boxes}, @code{impulses}, etc...). 2570(e.g. @code{lines}, @code{points}, @code{boxes}, @code{impulses}, etc...).
2692Defaults to @code{lines}. 2571Defaults to @code{lines}.
2693 2572
2694@item file 2573@item file
@@ -2876,6 +2755,7 @@ file:/home/dominik/images/jupiter.jpg @r{file, absolute path}
2876/home/dominik/images/jupiter.jpg @r{same as above} 2755/home/dominik/images/jupiter.jpg @r{same as above}
2877file:papers/last.pdf @r{file, relative path} 2756file:papers/last.pdf @r{file, relative path}
2878./papers/last.pdf @r{same as above} 2757./papers/last.pdf @r{same as above}
2758file:sometextfile::NNN @r{file with line number to jump to}
2879file:projects.org @r{another Org file} 2759file:projects.org @r{another Org file}
2880file:projects.org::some words @r{text search in Org file} 2760file:projects.org::some words @r{text search in Org file}
2881file:projects.org::*task title @r{heading search in Org file} 2761file:projects.org::*task title @r{heading search in Org file}
@@ -3169,7 +3049,7 @@ can define them in the file with
3169@noindent 3049@noindent
3170In-buffer completion (@pxref{Completion}) can be used after @samp{[} to 3050In-buffer completion (@pxref{Completion}) can be used after @samp{[} to
3171complete link abbreviations. You may also define a function 3051complete link abbreviations. You may also define a function
3172@code{org-PREFIX-complete-link} that implements special (@eg completion) 3052@code{org-PREFIX-complete-link} that implements special (e.g. completion)
3173support for inserting such a link with @kbd{C-c C-l}. Such a function should 3053support for inserting such a link with @kbd{C-c C-l}. Such a function should
3174not accept any arguments, and return the full link with prefix. 3054not accept any arguments, and return the full link with prefix.
3175 3055
@@ -3659,6 +3539,7 @@ work time}.
3659@menu 3539@menu
3660* Closing items:: When was this entry marked DONE? 3540* Closing items:: When was this entry marked DONE?
3661* Tracking TODO state changes:: When did the status change? 3541* Tracking TODO state changes:: When did the status change?
3542* Tracking your habits:: How consistent have you been?
3662@end menu 3543@end menu
3663 3544
3664@node Closing items, Tracking TODO state changes, Progress logging, Progress logging 3545@node Closing items, Tracking TODO state changes, Progress logging, Progress logging
@@ -3693,7 +3574,7 @@ In the timeline (@pxref{Timeline}) and in the agenda
3693display the TODO items with a @samp{CLOSED} timestamp on each day, 3574display the TODO items with a @samp{CLOSED} timestamp on each day,
3694giving you an overview of what has been done. 3575giving you an overview of what has been done.
3695 3576
3696@node Tracking TODO state changes, , Closing items, Progress logging 3577@node Tracking TODO state changes, Tracking your habits, Closing items, Progress logging
3697@subsection Tracking TODO state changes 3578@subsection Tracking TODO state changes
3698@cindex drawer, for state change recording 3579@cindex drawer, for state change recording
3699 3580
@@ -3770,6 +3651,104 @@ settings like @code{TODO(!)}. For example
3770 :END: 3651 :END:
3771@end example 3652@end example
3772 3653
3654@node Tracking your habits, , Tracking TODO state changes, Progress logging
3655@subsection Tracking your habits
3656@cindex habits
3657
3658Org has the ability to track the consistency of a special category of TODOs,
3659called ``habits''. A habit has the following properties:
3660
3661@enumerate
3662@item
3663You have enabled the @code{habits} module by customizing the variable
3664@code{org-modules}.
3665@item
3666The habit is a TODO, with a TODO keyword representing an open state.
3667@item
3668The property @code{STYLE} is set to the value @code{habit}.
3669@item
3670The TODO has a scheduled date, with a @code{.+} style repeat interval.
3671@item
3672The TODO may also have minimum and maximum ranges specified by using the
3673syntax @samp{.+2d/3d}, which says that you want to do the task at least every
3674three days, but at most every two days.
3675@item
3676You must also have state logging for the @code{DONE} state enabled, in order
3677for historical data to be represented in the consistency graph. If it's not
3678enabled it's not an error, but the consistency graphs will be largely
3679meaningless.
3680@end enumerate
3681
3682To give you an idea of what the above rules look like in action, here's an
3683actual habit with some history:
3684
3685@example
3686** TODO Shave
3687 SCHEDULED: <2009-10-17 Sat .+2d/4d>
3688 - State "DONE" from "TODO" [2009-10-15 Thu]
3689 - State "DONE" from "TODO" [2009-10-12 Mon]
3690 - State "DONE" from "TODO" [2009-10-10 Sat]
3691 - State "DONE" from "TODO" [2009-10-04 Sun]
3692 - State "DONE" from "TODO" [2009-10-02 Fri]
3693 - State "DONE" from "TODO" [2009-09-29 Tue]
3694 - State "DONE" from "TODO" [2009-09-25 Fri]
3695 - State "DONE" from "TODO" [2009-09-19 Sat]
3696 - State "DONE" from "TODO" [2009-09-16 Wed]
3697 - State "DONE" from "TODO" [2009-09-12 Sat]
3698 :PROPERTIES:
3699 :STYLE: habit
3700 :LAST_REPEAT: [2009-10-19 Mon 00:36]
3701 :END:
3702@end example
3703
3704What this habit says is: I want to shave at most every 2 days (given by the
3705@code{SCHEDULED} date and repeat interval) and at least every 4 days. If
3706today is the 15th, then the habit first appears in the agenda on Oct 17,
3707after the minimum of 2 days has elapsed, and will appear overdue on Oct 19,
3708after four days have elapsed.
3709
3710What's really useful about habits is that they are displayed along with a
3711consistency graph, to show how consistent you've been at getting that task
3712done in the past. This graph shows every day that the task was done over the
3713past three weeks, with colors for each day. The colors used are:
3714
3715@table @code
3716@item Blue
3717If the task wasn't to be done yet on that day.
3718@item Green
3719If the task could have been done on that day.
3720@item Yellow
3721If the task was going to be overdue the next day.
3722@item Red
3723If the task was overdue on that day.
3724@end table
3725
3726In addition to coloring each day, the day is also marked with an asterix if
3727the task was actually done that day, and an exclamation mark to show where
3728the current day falls in the graph.
3729
3730There are several configuration variables that can be used to change the way
3731habits are displayed in the agenda.
3732
3733@table @code
3734@item org-habit-graph-column
3735The buffer column at which the consistency graph should be drawn. This will
3736overwrite any text in that column, so it's a good idea to keep your habits'
3737titles brief and to the point.
3738@item org-habit-preceding-days
3739The amount of history, in days before today, to appear in consistency graphs.
3740@item org-habit-following-days
3741The number of days after today that will appear in consistency graphs.
3742@item org-habit-show-habits-only-for-today
3743If non-nil, only show habits in today's agenda view. This is set to true by
3744default.
3745@end table
3746
3747Lastly, pressing @kbd{K} in the agenda buffer will cause habits to
3748temporarily be disabled and they won't appear at all. Press @kbd{K} again to
3749bring them back. They are also subject to tag filtering, if you have habits
3750which should only be done in certain contexts, for example.
3751
3773@node Priorities, Breaking down tasks, Progress logging, TODO Items 3752@node Priorities, Breaking down tasks, Progress logging, TODO Items
3774@section Priorities 3753@section Priorities
3775@cindex priorities 3754@cindex priorities
@@ -3861,7 +3840,7 @@ this issue.
3861 3840
3862@vindex org-hierarchical-todo-statistics 3841@vindex org-hierarchical-todo-statistics
3863If you would like to have the statistics cookie count any TODO entries in the 3842If you would like to have the statistics cookie count any TODO entries in the
3864subtree (not just direct children), confgure the variable 3843subtree (not just direct children), configure the variable
3865@code{org-hierarchical-todo-statistics}. To do this for a single subtree, 3844@code{org-hierarchical-todo-statistics}. To do this for a single subtree,
3866include the word @samp{recursive} into the value of the @code{COOKIE_DATA} 3845include the word @samp{recursive} into the value of the @code{COOKIE_DATA}
3867property. 3846property.
@@ -4013,7 +3992,7 @@ support for tags.
4013@vindex org-tag-faces 3992@vindex org-tag-faces
4014Every headline can contain a list of tags; they occur at the end of the 3993Every headline can contain a list of tags; they occur at the end of the
4015headline. Tags are normal words containing letters, numbers, @samp{_}, and 3994headline. Tags are normal words containing letters, numbers, @samp{_}, and
4016@samp{@@}. Tags must be preceded and followed by a single colon, @eg{}, 3995@samp{@@}. Tags must be preceded and followed by a single colon, e.g.,
4017@samp{:work:}. Several tags can be specified, as in @samp{:work:urgent:}. 3996@samp{:work:}. Several tags can be specified, as in @samp{:work:urgent:}.
4018Tags will by default be in bold face with the same color as the headline. 3997Tags will by default be in bold face with the same color as the headline.
4019You may specify special faces for specific tags using the variable 3998You may specify special faces for specific tags using the variable
@@ -4607,35 +4586,42 @@ optional. The individual parts have the following meaning:
4607 4586
4608@example 4587@example
4609@var{width} @r{An integer specifying the width of the column in characters.} 4588@var{width} @r{An integer specifying the width of the column in characters.}
4610 @r{If omitted, the width will be determined automatically.} 4589 @r{If omitted, the width will be determined automatically.}
4611@var{property} @r{The property that should be edited in this column.} 4590@var{property} @r{The property that should be edited in this column.}
4612(title) @r{The header text for the column. If omitted, the} 4591(title) @r{The header text for the column. If omitted, the}
4613 @r{property name is used.} 4592 @r{property name is used.}
4614@{@var{summary-type}@} @r{The summary type. If specified, the column values for} 4593@{@var{summary-type}@} @r{The summary type. If specified, the column values for}
4615 @r{parent nodes are computed from the children.} 4594 @r{parent nodes are computed from the children.}
4616 @r{Supported summary types are:} 4595 @r{Supported summary types are:}
4617 @{+@} @r{Sum numbers in this column.} 4596 @{+@} @r{Sum numbers in this column.}
4618 @{+;%.1f@} @r{Like @samp{+}, but format result with @samp{%.1f}.} 4597 @{+;%.1f@} @r{Like @samp{+}, but format result with @samp{%.1f}.}
4619 @{$@} @r{Currency, short for @samp{+;%.2f}.} 4598 @{$@} @r{Currency, short for @samp{+;%.2f}.}
4620 @{:@} @r{Sum times, HH:MM:SS, plain numbers are hours.} 4599 @{:@} @r{Sum times, HH:MM:SS, plain numbers are hours.}
4621 @{X@} @r{Checkbox status, @samp{[X]} if all children are @samp{[X]}.} 4600 @{X@} @r{Checkbox status, @samp{[X]} if all children are @samp{[X]}.}
4622 @{X/@} @r{Checkbox status, @samp{[n/m]}.} 4601 @{X/@} @r{Checkbox status, @samp{[n/m]}.}
4623 @{X%@} @r{Checkbox status, @samp{[n%]}.} 4602 @{X%@} @r{Checkbox status, @samp{[n%]}.}
4624 @{min@} @r{Smallest number in column.} 4603 @{min@} @r{Smallest number in column.}
4625 @{max@} @r{Largest number.} 4604 @{max@} @r{Largest number.}
4626 @{mean@} @r{Arithmetic mean of numbers.} 4605 @{mean@} @r{Arithmetic mean of numbers.}
4627 @{:min@} @r{Smallest time value in column.} 4606 @{:min@} @r{Smallest time value in column.}
4628 @{:max@} @r{Largest time value.} 4607 @{:max@} @r{Largest time value.}
4629 @{:mean@} @r{Arithmetic mean of time values.} 4608 @{:mean@} @r{Arithmetic mean of time values.}
4609 @{@@min@} @r{Minimum age (in days/hours/mins/seconds).}
4610 @{@@max@} @r{Maximum age (in days/hours/mins/seconds).}
4611 @{@@mean@} @r{Arithmetic mean of ages (in days/hours/mins/seconds).}
4630@end example 4612@end example
4631 4613
4632@noindent 4614@noindent
4615Be aware that you can only have one summary type for any property you
4616include. Subsequent columns referencing the same property will all display the
4617same summary information.
4618
4633Here is an example for a complete columns definition, along with allowed 4619Here is an example for a complete columns definition, along with allowed
4634values. 4620values.
4635 4621
4636@example 4622@example
4637:COLUMNS: %25ITEM %9Approved(Approved?)@{X@} %Owner %11Status \@footnote{Please note that the COLUMNS definition must be on a single line---it is wrapped here only because of formatting constraints.} 4623:COLUMNS: %25ITEM %9Approved(Approved?)@{X@} %Owner %11Status \@footnote{Please note that the COLUMNS definition must be on a single line---it is wrapped here only because of formatting constraints.}
4638 %10Time_Estimate@{:@} %CLOCKSUM 4624 %10Time_Estimate@{:@} %CLOCKSUM
4639:Owner_ALL: Tammy Mark Karl Lisa Don 4625:Owner_ALL: Tammy Mark Karl Lisa Don
4640:Status_ALL: "In progress" "Not started yet" "Finished" "" 4626:Status_ALL: "In progress" "Not started yet" "Finished" ""
4641:Approved_ALL: "[ ]" "[X]" 4627:Approved_ALL: "[ ]" "[X]"
@@ -4643,7 +4629,7 @@ values.
4643 4629
4644@noindent 4630@noindent
4645The first column, @samp{%25ITEM}, means the first 25 characters of the 4631The first column, @samp{%25ITEM}, means the first 25 characters of the
4646item itself, @ie of the headline. You probably always should start the 4632item itself, i.e. of the headline. You probably always should start the
4647column definition with the @samp{ITEM} specifier. The other specifiers 4633column definition with the @samp{ITEM} specifier. The other specifiers
4648create columns @samp{Owner} with a list of names as allowed values, for 4634create columns @samp{Owner} with a list of names as allowed values, for
4649@samp{Status} with four different possible values, and for a checkbox 4635@samp{Status} with four different possible values, and for a checkbox
@@ -4667,7 +4653,7 @@ in the subtree.
4667@vindex org-columns-default-format 4653@vindex org-columns-default-format
4668Turn on column view. If the cursor is before the first headline in the file, 4654Turn on column view. If the cursor is before the first headline in the file,
4669column view is turned on for the entire file, using the @code{#+COLUMNS} 4655column view is turned on for the entire file, using the @code{#+COLUMNS}
4670definition. If the cusor is somewhere inside the outline, this command 4656definition. If the cursor is somewhere inside the outline, this command
4671searches the hierarchy, up from point, for a @code{:COLUMNS:} property that 4657searches the hierarchy, up from point, for a @code{:COLUMNS:} property that
4672defines a format. When one is found, the column view table is established 4658defines a format. When one is found, the column view table is established
4673for the tree starting at the entry that contains the @code{:COLUMNS:} 4659for the tree starting at the entry that contains the @code{:COLUMNS:}
@@ -4820,7 +4806,7 @@ be used by Emacs Lisp programs to work with properties and to implement
4820features based on them. For more information see @ref{Using the 4806features based on them. For more information see @ref{Using the
4821property API}. 4807property API}.
4822 4808
4823@node Dates and Times, Capture, Properties and Columns, Top 4809@node Dates and Times, Capture - Refile - Archive, Properties and Columns, Top
4824@chapter Dates and Times 4810@chapter Dates and Times
4825@cindex dates 4811@cindex dates
4826@cindex times 4812@cindex times
@@ -4839,6 +4825,7 @@ is used in a much wider sense.
4839* Creating timestamps:: Commands which insert timestamps 4825* Creating timestamps:: Commands which insert timestamps
4840* Deadlines and scheduling:: Planning your work 4826* Deadlines and scheduling:: Planning your work
4841* Clocking work time:: Tracking how long you spend on a task 4827* Clocking work time:: Tracking how long you spend on a task
4828* Resolving idle time:: Resolving time if you've been idle
4842* Effort estimates:: Planning work effort in advance 4829* Effort estimates:: Planning work effort in advance
4843* Relative timer:: Notes with a running timer 4830* Relative timer:: Notes with a running timer
4844@end menu 4831@end menu
@@ -5019,7 +5006,10 @@ range, it is taken from the stamp in the buffer. When filling in
5019information, Org mode assumes that most of the time you will want to enter a 5006information, Org mode assumes that most of the time you will want to enter a
5020date in the future: if you omit the month/year and the given day/month is 5007date in the future: if you omit the month/year and the given day/month is
5021@i{before} today, it will assume that you mean a future date@footnote{See the 5008@i{before} today, it will assume that you mean a future date@footnote{See the
5022variable @code{org-read-date-prefer-future}.}. 5009variable @code{org-read-date-prefer-future}. You may set that variable to
5010the symbol @code{time} to even make a time before now shift the date to
5011tomorrow.}. If the date has been automatically shifted into the future, the
5012time prompt will show this with @samp{(=>F).}
5023 5013
5024For example, let's assume that today is @b{June 13, 2006}. Here is how 5014For example, let's assume that today is @b{June 13, 2006}. Here is how
5025various inputs will be interpreted, the items filled in by Org mode are 5015various inputs will be interpreted, the items filled in by Org mode are
@@ -5046,7 +5036,7 @@ letter ([dwmy]) to indicate change in days, weeks, months, or years. With a
5046single plus or minus, the date is always relative to today. With a 5036single plus or minus, the date is always relative to today. With a
5047double plus or minus, it is relative to the default date. If instead of 5037double plus or minus, it is relative to the default date. If instead of
5048a single letter, you use the abbreviation of day name, the date will be 5038a single letter, you use the abbreviation of day name, the date will be
5049the nth such day. @Eg 5039the nth such day. E.g.
5050 5040
5051@example 5041@example
5052+0 --> today 5042+0 --> today
@@ -5191,7 +5181,7 @@ be listed on that date after it has been marked DONE. If you don't like
5191this, set the variable @code{org-agenda-skip-scheduled-if-done}.}. In 5181this, set the variable @code{org-agenda-skip-scheduled-if-done}.}. In
5192addition, a reminder that the scheduled date has passed will be present 5182addition, a reminder that the scheduled date has passed will be present
5193in the compilation for @emph{today}, until the entry is marked DONE. 5183in the compilation for @emph{today}, until the entry is marked DONE.
5194@Ie the task will automatically be forwarded until completed. 5184I.e. the task will automatically be forwarded until completed.
5195 5185
5196@example 5186@example
5197*** TODO Call Trillian for a date on New Years Eve. 5187*** TODO Call Trillian for a date on New Years Eve.
@@ -5235,17 +5225,25 @@ an item:
5235@c 5225@c
5236@kindex C-c C-d 5226@kindex C-c C-d
5237@item C-c C-d 5227@item C-c C-d
5238Insert @samp{DEADLINE} keyword along with a stamp. The insertion will 5228Insert @samp{DEADLINE} keyword along with a stamp. The insertion will happen
5239happen in the line directly following the headline. When called with a 5229in the line directly following the headline. When called with a prefix arg,
5240prefix arg, an existing deadline will be removed from the entry. 5230an existing deadline will be removed from the entry. Depending on the
5231variable @code{org-log-redeadline}@footnote{with corresponding
5232@code{#+STARTUP} keywords @code{logredeadline}, @code{lognoteredeadline},
5233and @code{nologredeadline}}, a note will be taken when changing an existing
5234deadline.
5241@c FIXME Any CLOSED timestamp will be removed.???????? 5235@c FIXME Any CLOSED timestamp will be removed.????????
5242@c 5236@c
5243@kindex C-c C-s 5237@kindex C-c C-s
5244@item C-c C-s 5238@item C-c C-s
5245Insert @samp{SCHEDULED} keyword along with a stamp. The insertion will 5239Insert @samp{SCHEDULED} keyword along with a stamp. The insertion will
5246happen in the line directly following the headline. Any CLOSED 5240happen in the line directly following the headline. Any CLOSED timestamp
5247timestamp will be removed. When called with a prefix argument, remove 5241will be removed. When called with a prefix argument, remove the scheduling
5248the scheduling date from the entry. 5242date from the entry. Depending on the variable
5243@code{org-log-reschedule}@footnote{with corresponding @code{#+STARTUP}
5244keywords @code{logredeadline}, @code{lognoteredeadline}, and
5245@code{nologredeadline}}, a note will be taken when changing an existing
5246scheduling time.
5249@c 5247@c
5250@kindex C-c C-x C-k 5248@kindex C-c C-x C-k
5251@kindex k a 5249@kindex k a
@@ -5353,22 +5351,27 @@ subtree, with dates shifted in each copy. The command @kbd{C-c C-x c} was
5353created for this purpose, it is described in @ref{Structure editing}. 5351created for this purpose, it is described in @ref{Structure editing}.
5354 5352
5355 5353
5356@node Clocking work time, Effort estimates, Deadlines and scheduling, Dates and Times 5354@node Clocking work time, Resolving idle time, Deadlines and scheduling, Dates and Times
5357@section Clocking work time 5355@section Clocking work time
5358 5356
5359Org mode allows you to clock the time you spend on specific tasks in a 5357Org mode allows you to clock the time you spend on specific tasks in a
5360project. When you start working on an item, you can start the clock. 5358project. When you start working on an item, you can start the clock.
5361When you stop working on that task, or when you mark the task done, the 5359When you stop working on that task, or when you mark the task done, the
5362clock is stopped and the corresponding time interval is recorded. It 5360clock is stopped and the corresponding time interval is recorded. It
5363also computes the total time spent on each subtree of a project. 5361also computes the total time spent on each subtree of a project. And it
5364 5362remembers a history or tasks recently clocked, to that you can jump quickly
5365Normally, the clock does not survive exiting and re-entering Emacs, but you 5363between a number of tasks absorbing your time.
5366can arrange for the clock information to persist across Emacs sessions with
5367 5364
5365To save the clock history across Emacs sessions, use
5368@lisp 5366@lisp
5369(setq org-clock-persist t) 5367(setq org-clock-persist 'history)
5370(org-clock-persistence-insinuate) 5368(org-clock-persistence-insinuate)
5371@end lisp 5369@end lisp
5370When you clock into a new task after resuming Emacs, the incomplete
5371clock@footnote{To resume the clock under the assumption that you have worked
5372on this task while outside Emacs, use @code{(setq org-clock-persist t)}.}
5373will be found (@pxref{Resolving idle time}) and you will be prompted about
5374what to do with it.
5372 5375
5373@table @kbd 5376@table @kbd
5374@kindex C-c C-x C-i 5377@kindex C-c C-x C-i
@@ -5538,7 +5541,75 @@ The @kbd{l} key may be used in the timeline (@pxref{Timeline}) and in
5538the agenda (@pxref{Weekly/daily agenda}) to show which tasks have been 5541the agenda (@pxref{Weekly/daily agenda}) to show which tasks have been
5539worked on or closed during a day. 5542worked on or closed during a day.
5540 5543
5541@node Effort estimates, Relative timer, Clocking work time, Dates and Times 5544@node Resolving idle time, Effort estimates, Clocking work time, Dates and Times
5545@section Resolving idle time
5546@cindex resolve idle time
5547
5548@cindex idle, resolve, dangling
5549If you clock in on a work item, and then walk away from your
5550computer---perhaps to take a phone call---you often need to ``resolve'' the
5551time you were away by either subtracting it from the current clock, or
5552applying it to another one.
5553
5554@vindex org-clock-idle-time
5555By customizing the variable @code{org-clock-idle-time} to some integer, such
5556as 10 or 15, Emacs can alert you when you get back to your computer after
5557being idle for that many minutes@footnote{On computers using Mac OS X,
5558idleness is based on actual user idleness, not just Emacs' idle time. For
5559X11, you can install a utility program @file{x11idle.c}, available in the
5560UTILITIES directory of the Org git distribution, to get the same general
5561treatment of idleness. On other systems, idle time refers to Emacs idle time
5562only.}, and ask what you want to do with the idle time. There will be a
5563question waiting for you when you get back, indicating how much idle time has
5564passed (constantly updated with the current amount), as well as a set of
5565choices to correct the discrepancy:
5566
5567@table @kbd
5568@item k
5569To keep some or all of the minutes and stay clocked in, press @kbd{k}. Org
5570will ask how many of the minutes to keep. Press @key{RET} to keep them all,
5571effectively changing nothing, or enter a number to keep that many minutes.
5572@item K
5573If you use the shift key and press @kbd{K}, it will keep however many minutes
5574you request and then immediately clock out of that task. If you keep all of
5575the minutes, this is the same as just clocking out of the current task.
5576@item s
5577To keep none of the minutes, use @kbd{s} to subtract all the away time from
5578the clock, and then check back in from the moment you returned.
5579@item S
5580To keep none of the minutes and just clock out at the start of the away time,
5581use the shift key and press @kbd{S}. Remember that using shift will always
5582leave you clocked out, no matter which option you choose.
5583@item C
5584To cancel the clock altogether, use @kbd{C}. Note that if instead of
5585cancelling you subtract the away time, and the resulting clock amount is less
5586than a minute, the clock will still be cancelled rather than clutter up the
5587log with an empty entry.
5588@end table
5589
5590What if you subtracted those away minutes from the current clock, and now
5591want to apply them to a new clock? Simply clock in to any task immediately
5592after the subtraction. Org will notice that you have subtracted time ``on
5593the books'', so to speak, and will ask if you want to apply those minutes to
5594the next task you clock in on.
5595
5596There is one other instance when this clock resolution magic occurs. Say you
5597were clocked in and hacking away, and suddenly your cat chased a mouse who
5598scared a hamster that crashed into your UPS's power button! You suddenly
5599lose all your buffers, but thanks to auto-save you still have your recent Org
5600mode changes, including your last clock in.
5601
5602If you restart Emacs and clock into any task, Org will notice that you have a
5603dangling clock which was never clocked out from your last session. Using
5604that clock's starting time as the beginning of the unaccounted-for period,
5605Org will ask how you want to resolve that time. The logic and behavior is
5606identical to dealing with away time due to idleness, it's just happening due
5607to a recovery event rather than a set amount of idle time.
5608
5609You can also check all the files visited by your Org agenda for dangling
5610clocks at any time using @kbd{M-x org-resolve-clocks}.
5611
5612@node Effort estimates, Relative timer, Resolving idle time, Dates and Times
5542@section Effort estimates 5613@section Effort estimates
5543@cindex effort estimates 5614@cindex effort estimates
5544 5615
@@ -5645,23 +5716,27 @@ by a certain amount. This can be used to fix timer strings if the timer was
5645not started at exactly the right moment. 5716not started at exactly the right moment.
5646@end table 5717@end table
5647 5718
5648@node Capture, Agenda Views, Dates and Times, Top 5719@node Capture - Refile - Archive, Agenda Views, Dates and Times, Top
5649@chapter Capture 5720@chapter Capture - Refile - Archive
5650@cindex capture 5721@cindex capture
5651 5722
5652An important part of any organization system is the ability to quickly 5723An important part of any organization system is the ability to quickly
5653capture new ideas and tasks, and to associate reference material with them. 5724capture new ideas and tasks, and to associate reference material with them.
5654Org uses the @file{remember.el} package to create tasks, and stores files 5725Org uses the @file{remember.el} package to create tasks, and stores files
5655related to a task (@i{attachments}) in a special directory. 5726related to a task (@i{attachments}) in a special directory. Once in the
5727system, tasks and projects need to be moved around. Moving completed project
5728trees to an archive file keeps the system compact and fast.
5656 5729
5657@menu 5730@menu
5658* Remember:: Capture new tasks/ideas with little interruption 5731* Remember:: Capture new tasks/ideas with little interruption
5659* Attachments:: Add files to tasks. 5732* Attachments:: Add files to tasks.
5660* RSS Feeds:: Getting input from RSS feeds 5733* RSS Feeds:: Getting input from RSS feeds
5661* Protocols:: External (@eg Browser) access to Emacs and Org 5734* Protocols:: External (e.g. Browser) access to Emacs and Org
5735* Refiling notes:: Moving a tree from one place to another
5736* Archiving:: What to do with finished projects
5662@end menu 5737@end menu
5663 5738
5664@node Remember, Attachments, Capture, Capture 5739@node Remember, Attachments, Capture - Refile - Archive, Capture - Refile - Archive
5665@section Remember 5740@section Remember
5666@cindex @file{remember.el} 5741@cindex @file{remember.el}
5667 5742
@@ -5680,7 +5755,6 @@ note should be stored interactively, on the fly.
5680* Setting up Remember for Org:: Some code for .emacs to get things going 5755* Setting up Remember for Org:: Some code for .emacs to get things going
5681* Remember templates:: Define the outline of different note types 5756* Remember templates:: Define the outline of different note types
5682* Storing notes:: Directly get the note to where it belongs 5757* Storing notes:: Directly get the note to where it belongs
5683* Refiling notes:: Moving a note or task to a project
5684@end menu 5758@end menu
5685 5759
5686@node Setting up Remember for Org, Remember templates, Remember, Remember 5760@node Setting up Remember for Org, Remember templates, Remember, Remember
@@ -5741,12 +5815,18 @@ use:
5741character specifies how to select the template. It is useful if the 5815character specifies how to select the template. It is useful if the
5742character is also the first letter of the name. The next string specifies 5816character is also the first letter of the name. The next string specifies
5743the template. Two more (optional) strings give the file in which, and the 5817the template. Two more (optional) strings give the file in which, and the
5744headline under which, the new note should be stored. The file (if not present 5818headline under which, the new note should be stored. The file (if not
5745or @code{nil}) defaults to @code{org-default-notes-file}, the heading to 5819present or @code{nil}) defaults to @code{org-default-notes-file}, the heading
5746@code{org-remember-default-headline}. If the file name is not an absolute 5820to @code{org-remember-default-headline}. If the file name is not an absolute
5747path, it will be interpreted relative to @code{org-directory}. The heading 5821path, it will be interpreted relative to @code{org-directory}.
5748can also be the symbols @code{top} or @code{bottom} to send notes as level 1 5822
5749entries to the beginning or end of the file, respectively. 5823The heading can also be the symbols @code{top} or @code{bottom} to send notes
5824as level 1 entries to the beginning or end of the file, respectively. It may
5825also be the symbol @code{date-tree}. Then, a tree with year on level 1,
5826month on level 2 and day on level three will be build in the file, and the
5827entry will be filed into the tree under the current date@footnote{If the file
5828contains an entry with a @code{DATE_TREE} property, the entire date tree will
5829be build under that entry.}
5750 5830
5751An optional sixth element specifies the contexts in which the user can select 5831An optional sixth element specifies the contexts in which the user can select
5752the template. This element can be a list of major modes or a function. 5832the template. This element can be a list of major modes or a function.
@@ -5850,7 +5930,7 @@ If you change your mind about which template to use, call
5850@code{org-remember} in the remember buffer. You may then select a new 5930@code{org-remember} in the remember buffer. You may then select a new
5851template that will be filled with the previous context information. 5931template that will be filled with the previous context information.
5852 5932
5853@node Storing notes, Refiling notes, Remember templates, Remember 5933@node Storing notes, , Remember templates, Remember
5854@subsection Storing notes 5934@subsection Storing notes
5855 5935
5856@vindex org-remember-clock-out-on-exit 5936@vindex org-remember-clock-out-on-exit
@@ -5866,7 +5946,7 @@ specified in the template, or it will use the default file and headline.
5866The window configuration will be restored, sending you back to the working 5946The window configuration will be restored, sending you back to the working
5867context before the call to Remember. To re-use the location found 5947context before the call to Remember. To re-use the location found
5868during the last call to Remember, exit the Remember buffer with 5948during the last call to Remember, exit the Remember buffer with
5869@kbd{C-0 C-c C-c}, @ie specify a zero prefix argument to @kbd{C-c C-c}. 5949@kbd{C-0 C-c C-c}, i.e. specify a zero prefix argument to @kbd{C-c C-c}.
5870Another special case is @kbd{C-2 C-c C-c} which files the note as a child of 5950Another special case is @kbd{C-2 C-c C-c} which files the note as a child of
5871the currently clocked item. 5951the currently clocked item.
5872 5952
@@ -5906,53 +5986,13 @@ then leads to the following result.
5906@end multitable 5986@end multitable
5907 5987
5908Before inserting the text into a tree, the function ensures that the text has 5988Before inserting the text into a tree, the function ensures that the text has
5909a headline, @ie a first line that starts with a @samp{*}. If not, a 5989a headline, i.e. a first line that starts with a @samp{*}. If not, a
5910headline is constructed from the current date. If you have indented the text 5990headline is constructed from the current date. If you have indented the text
5911of the note below the headline, the indentation will be adapted if inserting 5991of the note below the headline, the indentation will be adapted if inserting
5912the note into the tree requires demotion from level 1. 5992the note into the tree requires demotion from level 1.
5913 5993
5914@node Refiling notes, , Storing notes, Remember
5915@subsection Refiling notes
5916@cindex refiling notes
5917
5918Remember is usually used to quickly capture notes and tasks into one or
5919a few capture lists. When reviewing the captured data, you may want to
5920refile some of the entries into a different list, for example into a
5921project. Cutting, finding the right location, and then pasting the note
5922is cumbersome. To simplify this process, you can use the following
5923special command:
5924
5925@table @kbd
5926@kindex C-c C-w
5927@item C-c C-w
5928@vindex org-reverse-note-order
5929@vindex org-refile-targets
5930@vindex org-refile-use-outline-path
5931@vindex org-outline-path-complete-in-steps
5932@vindex org-refile-allow-creating-parent-nodes
5933Refile the entry or region at point. This command offers possible locations
5934for refiling the entry and lets you select one with completion. The item (or
5935all items in the region) is filed below the target heading as a subitem.
5936Depending on @code{org-reverse-note-order}, it will be either the first or
5937last subitem.@*
5938By default, all level 1 headlines in the current buffer are considered to be
5939targets, but you can have more complex definitions across a number of files.
5940See the variable @code{org-refile-targets} for details. If you would like to
5941select a location via a file-path-like completion along the outline path, see
5942the variables @code{org-refile-use-outline-path} and
5943@code{org-outline-path-complete-in-steps}. If you would like to be able to
5944create new nodes as new parents for for refiling on the fly, check the
5945variable @code{org-refile-allow-creating-parent-nodes}.
5946@kindex C-u C-c C-w
5947@item C-u C-c C-w
5948Use the refile interface to jump to a heading.
5949@kindex C-u C-u C-c C-w
5950@item C-u C-u C-c C-w
5951Jump to the location where @code{org-refile} last moved a tree to.
5952@end table
5953
5954 5994
5955@node Attachments, RSS Feeds, Remember, Capture 5995@node Attachments, RSS Feeds, Remember, Capture - Refile - Archive
5956@section Attachments 5996@section Attachments
5957@cindex attachments 5997@cindex attachments
5958 5998
@@ -6053,7 +6093,7 @@ same directory for attachments as the parent does.
6053@end table 6093@end table
6054@end table 6094@end table
6055 6095
6056@node RSS Feeds, Protocols, Attachments, Capture 6096@node RSS Feeds, Protocols, Attachments, Capture - Refile - Archive
6057@section RSS feeds 6097@section RSS feeds
6058@cindex RSS feeds 6098@cindex RSS feeds
6059 6099
@@ -6096,7 +6136,7 @@ list of drawers in that file:
6096For more information, see @file{org-feed.el} and the docstring of 6136For more information, see @file{org-feed.el} and the docstring of
6097@code{org-feed-alist}. 6137@code{org-feed-alist}.
6098 6138
6099@node Protocols, , RSS Feeds, Capture 6139@node Protocols, Refiling notes, RSS Feeds, Capture - Refile - Archive
6100@section Protocols for external access 6140@section Protocols for external access
6101@cindex protocols, for external access 6141@cindex protocols, for external access
6102@cindex emacsserver 6142@cindex emacsserver
@@ -6110,8 +6150,192 @@ a remote website you are looking at with the browser. See
6110@uref{http://orgmode.org/worg/org-contrib/org-protocol.php} for detailed 6150@uref{http://orgmode.org/worg/org-contrib/org-protocol.php} for detailed
6111documentation and setup instructions. 6151documentation and setup instructions.
6112 6152
6153@node Refiling notes, Archiving, Protocols, Capture - Refile - Archive
6154@section Refiling notes
6155@cindex refiling notes
6156
6157When reviewing the captured data, you may want to refile some of the entries
6158into a different list, for example into a project. Cutting, finding the
6159right location, and then pasting the note is cumbersome. To simplify this
6160process, you can use the following special command:
6161
6162@table @kbd
6163@kindex C-c C-w
6164@item C-c C-w
6165@vindex org-reverse-note-order
6166@vindex org-refile-targets
6167@vindex org-refile-use-outline-path
6168@vindex org-outline-path-complete-in-steps
6169@vindex org-refile-allow-creating-parent-nodes
6170Refile the entry or region at point. This command offers possible locations
6171for refiling the entry and lets you select one with completion. The item (or
6172all items in the region) is filed below the target heading as a subitem.
6173Depending on @code{org-reverse-note-order}, it will be either the first or
6174last subitem.@*
6175By default, all level 1 headlines in the current buffer are considered to be
6176targets, but you can have more complex definitions across a number of files.
6177See the variable @code{org-refile-targets} for details. If you would like to
6178select a location via a file-path-like completion along the outline path, see
6179the variables @code{org-refile-use-outline-path} and
6180@code{org-outline-path-complete-in-steps}. If you would like to be able to
6181create new nodes as new parents for for refiling on the fly, check the
6182variable @code{org-refile-allow-creating-parent-nodes}.
6183@kindex C-u C-c C-w
6184@item C-u C-c C-w
6185Use the refile interface to jump to a heading.
6186@kindex C-u C-u C-c C-w
6187@item C-u C-u C-c C-w
6188Jump to the location where @code{org-refile} last moved a tree to.
6189@item C-2 C-c C-w
6190Refile as the child of the item currently being clocked.
6191@end table
6192
6193@node Archiving, , Refiling notes, Capture - Refile - Archive
6194@section Archiving
6195@cindex archiving
6196
6197When a project represented by a (sub)tree is finished, you may want
6198to move the tree out of the way and to stop it from contributing to the
6199agenda. Archiving is important to keep your working files compact and global
6200searches like the construction of agenda views fast.
6201
6202@table @kbd
6203@kindex C-c C-x C-a
6204@item C-c C-x C-a
6205@vindex org-archive-default-command
6206Archive the current entry using the command specified in the variable
6207@code{org-archive-default-command}.
6208@end table
6209
6210@menu
6211* Moving subtrees:: Moving a tree to an archive file
6212* Internal archiving:: Switch off a tree but keep i in the file
6213@end menu
6214
6215@node Moving subtrees, Internal archiving, Archiving, Archiving
6216@subsection Moving a tree to the archive file
6217@cindex external archiving
6218
6219The most common archiving action is to move a project tree to another file,
6220the archive file.
6221
6222@table @kbd
6223@kindex C-c $
6224@kindex C-c C-x C-s
6225@item C-c C-x C-s@ @r{or short} @ C-c $
6226@vindex org-archive-location
6227Archive the subtree starting at the cursor position to the location
6228given by @code{org-archive-location}.
6229@kindex C-u C-c C-x C-s
6230@item C-u C-c C-x C-s
6231Check if any direct children of the current headline could be moved to
6232the archive. To do this, each subtree is checked for open TODO entries.
6233If none are found, the command offers to move it to the archive
6234location. If the cursor is @emph{not} on a headline when this command
6235is invoked, the level 1 trees will be checked.
6236@end table
6237
6238@cindex archive locations
6239The default archive location is a file in the same directory as the
6240current file, with the name derived by appending @file{_archive} to the
6241current file name. For information and examples on how to change this,
6242see the documentation string of the variable
6243@code{org-archive-location}. There is also an in-buffer option for
6244setting this variable, for example@footnote{For backward compatibility,
6245the following also works: If there are several such lines in a file,
6246each specifies the archive location for the text below it. The first
6247such line also applies to any text before its definition. However,
6248using this method is @emph{strongly} deprecated as it is incompatible
6249with the outline structure of the document. The correct method for
6250setting multiple archive locations in a buffer is using properties.}:
6251
6252@cindex #+ARCHIVE
6253@example
6254#+ARCHIVE: %s_done::
6255@end example
6256
6257@cindex property, ARCHIVE
6258@noindent
6259If you would like to have a special ARCHIVE location for a single entry
6260or a (sub)tree, give the entry an @code{:ARCHIVE:} property with the
6261location as the value (@pxref{Properties and Columns}).
6262
6263@vindex org-archive-save-context-info
6264When a subtree is moved, it receives a number of special properties that
6265record context information like the file from where the entry came, its
6266outline path the archiving time etc. Configure the variable
6267@code{org-archive-save-context-info} to adjust the amount of information
6268added.
6269
6270
6271@node Internal archiving, , Moving subtrees, Archiving
6272@subsection Internal archiving
6273
6274If you want to just switch off (for agenda views) certain subtrees without
6275moving them to a different file, you can use the @code{ARCHIVE tag}.
6276
6277A headline that is marked with the ARCHIVE tag (@pxref{Tags}) stays at
6278its location in the outline tree, but behaves in the following way:
6279@itemize @minus
6280@item
6281@vindex org-cycle-open-archived-trees
6282It does not open when you attempt to do so with a visibility cycling
6283command (@pxref{Visibility cycling}). You can force cycling archived
6284subtrees with @kbd{C-@key{TAB}}, or by setting the option
6285@code{org-cycle-open-archived-trees}. Also normal outline commands like
6286@code{show-all} will open archived subtrees.
6287@item
6288@vindex org-sparse-tree-open-archived-trees
6289During sparse tree construction (@pxref{Sparse trees}), matches in
6290archived subtrees are not exposed, unless you configure the option
6291@code{org-sparse-tree-open-archived-trees}.
6292@item
6293@vindex org-agenda-skip-archived-trees
6294During agenda view construction (@pxref{Agenda Views}), the content of
6295archived trees is ignored unless you configure the option
6296@code{org-agenda-skip-archived-trees}, in which case these trees will always
6297be included. In the agenda you can press @kbd{v a} to get archives
6298temporarily included.
6299@item
6300@vindex org-export-with-archived-trees
6301Archived trees are not exported (@pxref{Exporting}), only the headline
6302is. Configure the details using the variable
6303@code{org-export-with-archived-trees}.
6304@item
6305@vindex org-columns-skip-arrchived-trees
6306Archived trees are excluded from column view unless the variable
6307@code{org-columns-skip-arrchived-trees} is configured to @code{nil}.
6308@end itemize
6309
6310The following commands help managing the ARCHIVE tag:
6113 6311
6114@node Agenda Views, Embedded LaTeX, Capture, Top 6312@table @kbd
6313@kindex C-c C-x a
6314@item C-c C-x a
6315Toggle the ARCHIVE tag for the current headline. When the tag is set,
6316the headline changes to a shadowed face, and the subtree below it is
6317hidden.
6318@kindex C-u C-c C-x a
6319@item C-u C-c C-x a
6320Check if any direct children of the current headline should be archived.
6321To do this, each subtree is checked for open TODO entries. If none are
6322found, the command offers to set the ARCHIVE tag for the child. If the
6323cursor is @emph{not} on a headline when this command is invoked, the
6324level 1 trees will be checked.
6325@kindex C-@kbd{TAB}
6326@item C-@kbd{TAB}
6327Cycle a tree even if it is tagged with ARCHIVE.
6328@kindex C-c C-x A
6329@item C-c C-x A
6330Move the current entry to the @emph{Archive Sibling}. This is a sibling of
6331the entry with the heading @samp{Archive} and the tag @samp{ARCHIVE}. The
6332entry becomes a child of that sibling and in this way retains a lot of its
6333original context, including inherited tags and approximate position in the
6334outline.
6335@end table
6336
6337
6338@node Agenda Views, Markup, Capture - Refile - Archive, Top
6115@chapter Agenda Views 6339@chapter Agenda Views
6116@cindex agenda views 6340@cindex agenda views
6117 6341
@@ -6138,14 +6362,14 @@ TODO state associated with them,
6138a @emph{timeline view} that shows all events in a single Org file, 6362a @emph{timeline view} that shows all events in a single Org file,
6139in time-sorted view, 6363in time-sorted view,
6140@item 6364@item
6141a @emph{keyword search view} that shows all entries from multiple files 6365a @emph{text search view} that shows all entries from multiple files
6142that contain specified keywords, 6366that contain specified keywords,
6143@item 6367@item
6144a @emph{stuck projects view} showing projects that currently don't move 6368a @emph{stuck projects view} showing projects that currently don't move
6145along, and 6369along, and
6146@item 6370@item
6147@emph{custom views} that are special tag/keyword searches and 6371@emph{custom views} that are special searches and combinations of different
6148combinations of different views. 6372views.
6149@end itemize 6373@end itemize
6150 6374
6151@noindent 6375@noindent
@@ -6315,7 +6539,7 @@ In this section we describe the built-in views.
6315* Global TODO list:: All unfinished action items 6539* Global TODO list:: All unfinished action items
6316* Matching tags and properties:: Structured information with fine-tuned search 6540* Matching tags and properties:: Structured information with fine-tuned search
6317* Timeline:: Time-sorted view for single file 6541* Timeline:: Time-sorted view for single file
6318* Keyword search:: Finding entries by keyword 6542* Search view:: Find entries by searching for text
6319* Stuck projects:: Find projects you need to review 6543* Stuck projects:: Find projects you need to review
6320@end menu 6544@end menu
6321 6545
@@ -6615,7 +6839,7 @@ brackets (like @samp{DEADLINE<="<2008-12-24 18:30>"}), both values are
6615assumed to be date/time specifications in the standard Org way, and the 6839assumed to be date/time specifications in the standard Org way, and the
6616comparison will be done accordingly. Special values that will be recognized 6840comparison will be done accordingly. Special values that will be recognized
6617are @code{"<now>"} for now (including time), and @code{"<today>"}, and 6841are @code{"<now>"} for now (including time), and @code{"<today>"}, and
6618@code{"<tomorrow>"} for these days at 0:00 hours, @ie without a time 6842@code{"<tomorrow>"} for these days at 0:00 hours, i.e. without a time
6619specification. Also strings like @code{"<+5d>"} or @code{"<-2m>"} with units 6843specification. Also strings like @code{"<+5d>"} or @code{"<-2m>"} with units
6620@code{d}, @code{w}, @code{m}, and @code{y} for day, week, month, and year, 6844@code{d}, @code{w}, @code{m}, and @code{y} for day, week, month, and year,
6621respectively, can be used. 6845respectively, can be used.
@@ -6665,7 +6889,7 @@ Select @samp{:work:}-tagged TODO lines that are either @samp{WAITING} or
6665@samp{NEXT}. 6889@samp{NEXT}.
6666@end table 6890@end table
6667 6891
6668@node Timeline, Keyword search, Matching tags and properties, Built-in agenda views 6892@node Timeline, Search view, Matching tags and properties, Built-in agenda views
6669@subsection Timeline for a single file 6893@subsection Timeline for a single file
6670@cindex timeline, single file 6894@cindex timeline, single file
6671@cindex time-sorted view 6895@cindex time-sorted view
@@ -6686,10 +6910,11 @@ When called with a @kbd{C-u} prefix, all unfinished TODO entries
6686The commands available in the timeline buffer are listed in 6910The commands available in the timeline buffer are listed in
6687@ref{Agenda commands}. 6911@ref{Agenda commands}.
6688 6912
6689@node Keyword search, Stuck projects, Timeline, Built-in agenda views 6913@node Search view, Stuck projects, Timeline, Built-in agenda views
6690@subsection Keyword search 6914@subsection Search view
6691@cindex keyword search 6915@cindex search view
6692@cindex searching, for keywords 6916@cindex text search
6917@cindex searching, for text
6693 6918
6694This agenda view is a general text search facility for Org mode entries. 6919This agenda view is a general text search facility for Org mode entries.
6695It is particularly useful to find notes. 6920It is particularly useful to find notes.
@@ -6697,15 +6922,14 @@ It is particularly useful to find notes.
6697@table @kbd 6922@table @kbd
6698@kindex C-c a s 6923@kindex C-c a s
6699@item C-c a s 6924@item C-c a s
6700This is a special search that lets you select entries by keywords or 6925This is a special search that lets you select entries by matching a substring
6701regular expression, using a boolean logic. For example, the search 6926or specific words using a boolean logic.
6702string 6927@end table
6703 6928For example, the search string @samp{computer equipment} will find entries
6704@example 6929that contain @samp{computer equipment} as a substring. If the two words are
6705+computer +wifi -ethernet -@{8\.11[bg]@} 6930separated by more space or a line break, the search will still match.
6706@end example 6931Search view can also search for specific keywords in the entry, using Boolean
6707 6932logic. The search string @samp{+computer +wifi -ethernet -@{8\.11[bg]@}}
6708@noindent
6709will search for note entries that contain the keywords @code{computer} 6933will search for note entries that contain the keywords @code{computer}
6710and @code{wifi}, but not the keyword @code{ethernet}, and which are also 6934and @code{wifi}, but not the keyword @code{ethernet}, and which are also
6711not matched by the regular expression @code{8\.11[bg]}, meaning to 6935not matched by the regular expression @code{8\.11[bg]}, meaning to
@@ -6714,9 +6938,8 @@ exclude both 8.11b and 8.11g.
6714@vindex org-agenda-text-search-extra-files 6938@vindex org-agenda-text-search-extra-files
6715Note that in addition to the agenda files, this command will also search 6939Note that in addition to the agenda files, this command will also search
6716the files listed in @code{org-agenda-text-search-extra-files}. 6940the files listed in @code{org-agenda-text-search-extra-files}.
6717@end table
6718 6941
6719@node Stuck projects, , Keyword search, Built-in agenda views 6942@node Stuck projects, , Search view, Built-in agenda views
6720@subsection Stuck projects 6943@subsection Stuck projects
6721 6944
6722If you are following a system like David Allen's GTD to organize your 6945If you are following a system like David Allen's GTD to organize your
@@ -7124,16 +7347,16 @@ binding the variable @code{org-agenda-filter-preset} as an option. This
7124filter will then be applied to the view and persist as a basic filter through 7347filter will then be applied to the view and persist as a basic filter through
7125refreshes and more secondary filtering.} 7348refreshes and more secondary filtering.}
7126 7349
7127You will be prompted for a tag selection letter. Pressing @key{TAB} at that 7350You will be prompted for a tag selection letter, SPC will mean any tag at
7128prompt will offer use completion to select a tag (including any tags that do 7351all. Pressing @key{TAB} at that prompt will offer use completion to select a
7129not have a selection character). The command then hides all entries that do 7352tag (including any tags that do not have a selection character). The command
7130not contain or inherit this tag. When called with prefix arg, remove the 7353then hides all entries that do not contain or inherit this tag. When called
7131entries that @emph{do} have the tag. A second @kbd{/} at the prompt will 7354with prefix arg, remove the entries that @emph{do} have the tag. A second
7132turn off the filter and unhide any hidden entries. If the first key you 7355@kbd{/} at the prompt will turn off the filter and unhide any hidden entries.
7133press is either @kbd{+} or @kbd{-}, the previous filter will be narrowed by 7356If the first key you press is either @kbd{+} or @kbd{-}, the previous filter
7134requiring or forbidding the selected additional tag. Instead of pressing 7357will be narrowed by requiring or forbidding the selected additional tag.
7135@kbd{+} or @kbd{-} after @kbd{/}, you can also immediately use the @kbd{\} 7358Instead of pressing @kbd{+} or @kbd{-} after @kbd{/}, you can also
7136command. 7359immediately use the @kbd{\} command.
7137 7360
7138@vindex org-sort-agenda-noeffort-is-high 7361@vindex org-sort-agenda-noeffort-is-high
7139In order to filter for effort estimates, you should set-up allowed 7362In order to filter for effort estimates, you should set-up allowed
@@ -7153,6 +7376,32 @@ application of the operator, entries without a defined effort will be treated
7153according to the value of @code{org-sort-agenda-noeffort-is-high}. To filter 7376according to the value of @code{org-sort-agenda-noeffort-is-high}. To filter
7154for tasks without effort definition, press @kbd{?} as the operator. 7377for tasks without effort definition, press @kbd{?} as the operator.
7155 7378
7379Org also supports automatic, context-aware tag filtering. If the variable
7380@code{org-agenda-auto-exclude-function} is set to a user-defined function,
7381that function can decide which tags should be excluded from the agenda
7382automatically. Once this is set, the @kbd{/} command then accepts @kbd{RET}
7383as a sub-option key and runs the auto exclusion logic. For example, let's
7384say you use a @code{Net} tag to identify tasks which need network access, an
7385@code{Errand} tag for errands in town, and a @code{Call} tag for making phone
7386calls. You could auto-exclude these tags based on the availability of the
7387Internet, and outside of business hours, with something like this:
7388
7389@lisp
7390@group
7391(defun org-my-auto-exclude-function (tag)
7392 (and (cond
7393 ((string= tag "Net")
7394 (/= 0 (call-process "/sbin/ping" nil nil nil
7395 "-c1" "-q" "-t1" "mail.gnu.org")))
7396 ((or (string= tag "Errand") (string= tag "Call"))
7397 (let ((hour (nth 2 (decode-time))))
7398 (or (< hour 8) (> hour 21)))))
7399 (concat "-" tag)))
7400
7401(setq org-agenda-auto-exclude-function 'org-my-auto-exclude-function)
7402@end group
7403@end lisp
7404
7156@kindex \ 7405@kindex \
7157@item \ 7406@item \
7158Narrow the current agenda filter by an additional condition. When called with 7407Narrow the current agenda filter by an additional condition. When called with
@@ -7175,6 +7424,7 @@ negative search term which @i{must not} occur/match in the entry for it to be
7175selected. 7424selected.
7176@end table 7425@end table
7177 7426
7427@page
7178@tsubheading{Remote editing} 7428@tsubheading{Remote editing}
7179@cindex remote editing, from agenda 7429@cindex remote editing, from agenda
7180 7430
@@ -7193,6 +7443,11 @@ both in the agenda buffer and in the remote buffer.
7193Change the TODO state of the item, both in the agenda and in the 7443Change the TODO state of the item, both in the agenda and in the
7194original org file. 7444original org file.
7195@c 7445@c
7446@kindex C-S-@key{right}
7447@kindex C-S-@key{left}
7448@item C-S-@key{right}@r{/}@key{left}
7449Switch to the next/previous set of TODO keywords.
7450@c
7196@kindex C-k 7451@kindex C-k
7197@item C-k 7452@item C-k
7198@vindex org-agenda-confirm-kill 7453@vindex org-agenda-confirm-kill
@@ -7205,17 +7460,26 @@ variable @code{org-agenda-confirm-kill}.
7205@item C-c C-w 7460@item C-c C-w
7206Refile the entry at point. 7461Refile the entry at point.
7207@c 7462@c
7463@kindex C-c C-x C-a
7208@kindex a 7464@kindex a
7209@item a 7465@item C-c C-x C-a @ @r{or short} @ a
7466@vindex org-archive-default-command
7467Archive the subtree corresponding to the entry at point using the default
7468archiving command set in @code{org-archive-default-command}. When using the
7469@code{a} key, confirmation will be required.
7470@c
7471@kindex C-c C-x a
7472@item C-c C-x a
7210Toggle the ARCHIVE tag for the current headline. 7473Toggle the ARCHIVE tag for the current headline.
7211@c 7474@c
7212@kindex A 7475@kindex C-c C-x A
7213@item A 7476@item C-c C-x A
7214Move the subtree corresponding to the current entry to its @emph{archive 7477Move the subtree corresponding to the current entry to its @emph{archive
7215sibling}. 7478sibling}.
7216@c 7479@c
7217@kindex $ 7480@kindex $
7218@item $ 7481@kindex C-c C-x C-s
7482@item C-c C-x C-s @ @r{or short} @ $
7219Archive the subtree corresponding to the current headline. This means the 7483Archive the subtree corresponding to the current headline. This means the
7220entry will be moved to the configured archive location, most likely a 7484entry will be moved to the configured archive location, most likely a
7221different file. 7485different file.
@@ -7379,10 +7643,24 @@ date at the cursor.
7379@cindex diary entries, creating from agenda 7643@cindex diary entries, creating from agenda
7380@kindex i 7644@kindex i
7381@item i 7645@item i
7382Insert a new entry into the diary. Prompts for the type of entry 7646@vindex org-agenda-diary-file
7383(day, weekly, monthly, yearly, anniversary, cyclic) and creates a new 7647Insert a new entry into the diary, using the date at the cursor and (for
7384entry in the diary, just as @kbd{i d}, etc., would do in the calendar. 7648block entries) the date at the mark. This will add to the Emacs diary
7385The date is taken from the cursor position. 7649file@footnote{This file is parsed for the agenda when
7650@code{org-agenda-include-diary} is set.}, in a way similar to the @kbd{i}
7651command in the calendar. The diary file will pop up in another window, where
7652you can add the entry.
7653
7654If you configure @code{org-agenda-diary-file} to point to an Org-mode file,
7655Org will create entries (in org-mode syntax) in that file instead. Most
7656entries will be stored in a date-based outline tree that will later make it
7657easy to archive appointments from previous months/years. The tree will be
7658build under an entry with a @code{DATE_TREE} property, or else with years as
7659top-level entries. Emacs will prompt you for the entry text - if you specify
7660it, the entry will be created in @code{org-agenda-diary-file} without further
7661interaction. If you directly press @key{RET} at the prompt without typing
7662text, the target file will be shown in another window for you to finish the
7663entry there. See also the @kbd{k r} command.
7386@c 7664@c
7387@kindex M 7665@kindex M
7388@item M 7666@item M
@@ -7415,10 +7693,10 @@ This is a globally available command, and also available in the agenda menu.
7415Write the agenda view to a file. Depending on the extension of the selected 7693Write the agenda view to a file. Depending on the extension of the selected
7416file name, the view will be exported as HTML (extension @file{.html} or 7694file name, the view will be exported as HTML (extension @file{.html} or
7417@file{.htm}), Postscript (extension @file{.ps}), PDF (extension @file{.pdf}), 7695@file{.htm}), Postscript (extension @file{.ps}), PDF (extension @file{.pdf}),
7418Org-mode (extension @file{.org}), and plain text (any other extension). When 7696and plain text (any other extension). When called with a @kbd{C-u} prefix
7419called with a @kbd{C-u} prefix argument, immediately open the newly created 7697argument, immediately open the newly created file. Use the variable
7420file. Use the variable @code{org-agenda-exporter-settings} to set options 7698@code{org-agenda-exporter-settings} to set options for @file{ps-print} and
7421for @file{ps-print} and for @file{htmlize} to be used during export. 7699for @file{htmlize} to be used during export.
7422 7700
7423@tsubheading{Quit and Exit} 7701@tsubheading{Quit and Exit}
7424@kindex q 7702@kindex q
@@ -7645,10 +7923,9 @@ you want to do this only occasionally, use the command
7645Write the agenda view to a file. Depending on the extension of the selected 7923Write the agenda view to a file. Depending on the extension of the selected
7646file name, the view will be exported as HTML (extension @file{.html} or 7924file name, the view will be exported as HTML (extension @file{.html} or
7647@file{.htm}), Postscript (extension @file{.ps}), iCalendar (extension 7925@file{.htm}), Postscript (extension @file{.ps}), iCalendar (extension
7648@file{.ics}), Org-mode (extension @file{.org}), or plain text (any other 7926@file{.ics}), or plain text (any other extension). Use the variable
7649extension). Use the variable @code{org-agenda-exporter-settings} to set 7927@code{org-agenda-exporter-settings} to set options for @file{ps-print} and
7650options for @file{ps-print} and for @file{htmlize} to be used during export, 7928for @file{htmlize} to be used during export, for example
7651for example
7652 7929
7653@vindex org-agenda-add-entry-text-maxlines 7930@vindex org-agenda-add-entry-text-maxlines
7654@vindex htmlize-output-type 7931@vindex htmlize-output-type
@@ -7823,263 +8100,8 @@ the agenda).
7823@end enumerate 8100@end enumerate
7824 8101
7825 8102
7826@node Embedded LaTeX, Exporting, Agenda Views, Top 8103@node Markup, Exporting, Agenda Views, Top
7827@chapter Embedded La@TeX{} 8104@chapter Markup for rich export
7828@cindex @TeX{} interpretation
7829@cindex La@TeX{} interpretation
7830
7831Plain ASCII is normally sufficient for almost all note taking. One
7832exception, however, are scientific notes which need to be able to contain
7833mathematical symbols and the occasional formula. La@TeX{}@footnote{La@TeX{}
7834is a macro system based on Donald E. Knuth's @TeX{} system. Many of the
7835features described here as ``La@TeX{}'' are really from @TeX{}, but for
7836simplicity I am blurring this distinction.} is widely used to typeset
7837scientific documents. Org mode supports embedding La@TeX{} code into its
7838files, because many academics are used to reading La@TeX{} source code, and
7839because it can be readily processed into images for HTML production.
7840
7841It is not necessary to mark La@TeX{} macros and code in any special way.
7842If you observe a few conventions, Org mode knows how to find it and what
7843to do with it.
7844
7845@menu
7846* Math symbols:: @TeX{} macros for symbols and Greek letters
7847* Subscripts and superscripts:: Simple syntax for raising/lowering text
7848* LaTeX fragments:: Complex formulas made easy
7849* Processing LaTeX fragments:: Previewing La@TeX{} processing
7850* CDLaTeX mode:: Speed up entering of formulas
7851@end menu
7852
7853@node Math symbols, Subscripts and superscripts, Embedded LaTeX, Embedded LaTeX
7854@section Math symbols
7855@cindex math symbols
7856@cindex @TeX{} macros
7857
7858You can use La@TeX{} macros to insert special symbols like @samp{\alpha} to
7859indicate the Greek letter, or @samp{\to} to indicate an arrow. Completion
7860for these macros is available, just type @samp{\} and maybe a few letters,
7861and press @kbd{M-@key{TAB}} to see possible completions. Unlike La@TeX{}
7862code, Org mode allows these macros to be present without surrounding math
7863delimiters, for example:
7864
7865@example
7866Angles are written as Greek letters \alpha, \beta and \gamma.
7867@end example
7868@noindent
7869During HTML export (@pxref{HTML export}), these symbols are translated
7870into the proper syntax for HTML, for the above examples this is
7871@samp{&alpha;} and @samp{&rarr;}, respectively. If you need such a symbol
7872inside a word, terminate it like this: @samp{\Aacute@{@}stor}.
7873
7874@node Subscripts and superscripts, LaTeX fragments, Math symbols, Embedded LaTeX
7875@section Subscripts and superscripts
7876@cindex subscript
7877@cindex superscript
7878
7879Just like in La@TeX{}, @samp{^} and @samp{_} are used to indicate super-
7880and subscripts. Again, these can be used without embedding them in
7881math-mode delimiters. To increase the readability of ASCII text, it is
7882not necessary (but OK) to surround multi-character sub- and superscripts
7883with curly braces. For example
7884
7885@example
7886The mass if the sun is M_sun = 1.989 x 10^30 kg. The radius of
7887the sun is R_@{sun@} = 6.96 x 10^8 m.
7888@end example
7889
7890To avoid interpretation as raised or lowered text, you can quote
7891@samp{^} and @samp{_} with a backslash: @samp{\^} and @samp{\_}.
7892
7893During HTML export (@pxref{HTML export}), subscript and superscripts
7894are surrounded with @code{<sub>} and @code{<sup>} tags, respectively.
7895
7896@node LaTeX fragments, Processing LaTeX fragments, Subscripts and superscripts, Embedded LaTeX
7897@section La@TeX{} fragments
7898@cindex La@TeX{} fragments
7899
7900@vindex org-format-latex-header
7901With symbols, sub- and superscripts, HTML is pretty much at its end when
7902it comes to representing mathematical formulas@footnote{Yes, there is
7903MathML, but that is not yet fully supported by many browsers, and there
7904is no decent converter for turning La@TeX{} or ASCII representations of
7905formulas into MathML. So for the time being, converting formulas into
7906images seems the way to go.}. More complex expressions need a dedicated
7907formula processor. To this end, Org mode can contain arbitrary La@TeX{}
7908fragments. It provides commands to preview the typeset result of these
7909fragments, and upon export to HTML, all fragments will be converted to
7910images and inlined into the HTML document@footnote{The La@TeX{} export
7911will not use images for displaying La@TeX{} fragments but include these
7912fragments directly into the La@TeX{} code.}. For this to work you
7913need to be on a system with a working La@TeX{} installation. You also
7914need the @file{dvipng} program, available at
7915@url{http://sourceforge.net/projects/dvipng/}. The La@TeX{} header that
7916will be used when processing a fragment can be configured with the
7917variable @code{org-format-latex-header}.
7918
7919La@TeX{} fragments don't need any special marking at all. The following
7920snippets will be identified as La@TeX{} source code:
7921@itemize @bullet
7922@item
7923Environments of any kind. The only requirement is that the
7924@code{\begin} statement appears on a new line, preceded by only
7925whitespace.
7926@item
7927Text within the usual La@TeX{} math delimiters. To avoid conflicts with
7928currency specifications, single @samp{$} characters are only recognized as
7929math delimiters if the enclosed text contains at most two line breaks, is
7930directly attached to the @samp{$} characters with no whitespace in between,
7931and if the closing @samp{$} is followed by whitespace, punctuation or a dash.
7932For the other delimiters, there is no such restriction, so when in doubt, use
7933@samp{\(...\)} as inline math delimiters.
7934@end itemize
7935
7936@noindent For example:
7937
7938@example
7939\begin@{equation@} % arbitrary environments,
7940x=\sqrt@{b@} % even tables, figures
7941\end@{equation@} % etc
7942
7943If $a^2=b$ and \( b=2 \), then the solution must be
7944either $$ a=+\sqrt@{2@} $$ or \[ a=-\sqrt@{2@} \].
7945@end example
7946
7947@noindent
7948@vindex org-format-latex-options
7949If you need any of the delimiter ASCII sequences for other purposes, you
7950can configure the option @code{org-format-latex-options} to deselect the
7951ones you do not wish to have interpreted by the La@TeX{} converter.
7952
7953@node Processing LaTeX fragments, CDLaTeX mode, LaTeX fragments, Embedded LaTeX
7954@section Processing LaTeX fragments
7955@cindex LaTeX fragments, preview
7956
7957La@TeX{} fragments can be processed to produce preview images of the
7958typeset expressions:
7959
7960@table @kbd
7961@kindex C-c C-x C-l
7962@item C-c C-x C-l
7963Produce a preview image of the La@TeX{} fragment at point and overlay it
7964over the source code. If there is no fragment at point, process all
7965fragments in the current entry (between two headlines). When called
7966with a prefix argument, process the entire subtree. When called with
7967two prefix arguments, or when the cursor is before the first headline,
7968process the entire buffer.
7969@kindex C-c C-c
7970@item C-c C-c
7971Remove the overlay preview images.
7972@end table
7973
7974@vindex org-format-latex-options
7975You can customize the variable @code{org-format-latex-options} to influence
7976some aspects of the preview. In particular, the @code{:scale} (and for HTML
7977export, @code{:html-scale}) property can be used to adjust the size of the
7978preview images.
7979
7980During HTML export (@pxref{HTML export}), all La@TeX{} fragments are
7981converted into images and inlined into the document if the following
7982setting is active:
7983
7984@lisp
7985(setq org-export-with-LaTeX-fragments t)
7986@end lisp
7987
7988@node CDLaTeX mode, , Processing LaTeX fragments, Embedded LaTeX
7989@section Using CDLa@TeX{} to enter math
7990@cindex CDLa@TeX{}
7991
7992CDLa@TeX{} mode is a minor mode that is normally used in combination with a
7993major La@TeX{} mode like AUC@TeX{} in order to speed-up insertion of
7994environments and math templates. Inside Org mode, you can make use of
7995some of the features of CDLa@TeX{} mode. You need to install
7996@file{cdlatex.el} and @file{texmathp.el} (the latter comes also with
7997AUC@TeX{}) from @url{http://www.astro.uva.nl/~dominik/Tools/cdlatex}.
7998Don't use CDLa@TeX{} mode itself under Org mode, but use the light
7999version @code{org-cdlatex-mode} that comes as part of Org mode. Turn it
8000on for the current buffer with @code{M-x org-cdlatex-mode}, or for all
8001Org files with
8002
8003@lisp
8004(add-hook 'org-mode-hook 'turn-on-org-cdlatex)
8005@end lisp
8006
8007When this mode is enabled, the following features are present (for more
8008details see the documentation of CDLa@TeX{} mode):
8009@itemize @bullet
8010@kindex C-c @{
8011@item
8012Environment templates can be inserted with @kbd{C-c @{}.
8013@item
8014@kindex @key{TAB}
8015The @key{TAB} key will do template expansion if the cursor is inside a
8016La@TeX{} fragment@footnote{Org mode has a method to test if the cursor is
8017inside such a fragment, see the documentation of the function
8018@code{org-inside-LaTeX-fragment-p}.}. For example, @key{TAB} will
8019expand @code{fr} to @code{\frac@{@}@{@}} and position the cursor
8020correctly inside the first brace. Another @key{TAB} will get you into
8021the second brace. Even outside fragments, @key{TAB} will expand
8022environment abbreviations at the beginning of a line. For example, if
8023you write @samp{equ} at the beginning of a line and press @key{TAB},
8024this abbreviation will be expanded to an @code{equation} environment.
8025To get a list of all abbreviations, type @kbd{M-x cdlatex-command-help}.
8026@item
8027@kindex _
8028@kindex ^
8029@vindex cdlatex-simplify-sub-super-scripts
8030Pressing @kbd{_} and @kbd{^} inside a La@TeX{} fragment will insert these
8031characters together with a pair of braces. If you use @key{TAB} to move
8032out of the braces, and if the braces surround only a single character or
8033macro, they are removed again (depending on the variable
8034@code{cdlatex-simplify-sub-super-scripts}).
8035@item
8036@kindex `
8037Pressing the backquote @kbd{`} followed by a character inserts math
8038macros, also outside La@TeX{} fragments. If you wait more than 1.5 seconds
8039after the backquote, a help window will pop up.
8040@item
8041@kindex '
8042Pressing the single-quote @kbd{'} followed by another character modifies
8043the symbol before point with an accent or a font. If you wait more than
80441.5 seconds after the backquote, a help window will pop up. Character
8045modification will work only inside La@TeX{} fragments, outside the quote
8046is normal.
8047@end itemize
8048
8049@node Exporting, Publishing, Embedded LaTeX, Top
8050@chapter Exporting
8051@cindex exporting
8052
8053Org-mode documents can be exported into a variety of other formats. For
8054printing and sharing of notes, ASCII export produces a readable and simple
8055version of an Org file. HTML export allows you to publish a notes file on
8056the web, while the XOXO format provides a solid base for exchange with a
8057broad range of other applications. La@TeX{} export lets you use Org mode and
8058its structured editing functions to easily create La@TeX{} files. DocBook
8059export makes it possible to convert Org files to many other formats using
8060DocBook tools. To incorporate entries with associated times like deadlines
8061or appointments into a desktop calendar program like iCal, Org mode can also
8062produce extracts in the iCalendar format. Currently Org mode only supports
8063export, not import of these different formats.
8064
8065Org supports export of selected regions when @code{transient-mark-mode} is
8066enabled (default in Emacs 23).
8067
8068@menu
8069* Markup rules:: Which structures are recognized?
8070* Selective export:: Using tags to select and exclude trees
8071* Export options:: Per-file export settings
8072* The export dispatcher:: How to access exporter commands
8073* ASCII export:: Exporting to plain ASCII
8074* HTML export:: Exporting to HTML
8075* LaTeX and PDF export:: Exporting to La@TeX{}, and processing to PDF
8076* DocBook export:: Exporting to DocBook
8077* XOXO export:: Exporting to XOXO
8078* iCalendar export:: Exporting in iCalendar format
8079@end menu
8080
8081@node Markup rules, Selective export, Exporting, Exporting
8082@section Markup rules
8083 8105
8084When exporting Org-mode documents, the exporter tries to reflect the 8106When exporting Org-mode documents, the exporter tries to reflect the
8085structure of the document as accurately as possible in the backend. Since 8107structure of the document as accurately as possible in the backend. Since
@@ -8088,25 +8110,31 @@ Org mode has rules on how to prepare text for rich export. This section
8088summarizes the markup rules used in an Org-mode buffer. 8110summarizes the markup rules used in an Org-mode buffer.
8089 8111
8090@menu 8112@menu
8091* Document title:: How the document title is determined 8113* Structural markup elements:: The basic structure as seen by the exporter
8092* Headings and sections:: The main structure of the exported document 8114* Images and tables:: Tables and Images will be included
8093* Table of contents:: If, where, how to create a table of contents 8115* Literal examples:: Source code examples with special formatting
8094* Initial text:: Text before the first headline 8116* Include files:: Include additional files into a document
8095* Lists:: Plain lists are exported 8117* Macro replacement:: Use macros to create complex output
8096* Paragraphs:: What determines beginning and ending 8118* Embedded LaTeX:: LaTeX can be freely used inside Org documents
8097* Literal examples:: Source code and other examples 8119@end menu
8098* Include files:: Include the contents of a file during export 8120
8099* Tables exported:: Tables are exported richly 8121@node Structural markup elements, Images and tables, Markup, Markup
8100* Inlined images:: How to inline images during export 8122@section Structural markup elements
8101* Footnote markup:: ASCII representation of footnotes 8123
8102* Emphasis and monospace:: To bold or not to bold 8124@menu
8103* TeX macros and LaTeX fragments:: Create special, rich export. 8125* Document title:: Where the title is taken from
8104* Horizontal rules:: A line across the page 8126* Headings and sections:: The document structure as seen by the exporter
8105* Comment lines:: Some lines will not be exported 8127* Table of contents:: The if and where of the table of contents
8106* Macro replacement:: Global replacement of place holders 8128* Initial text:: Text before the first heading?
8129* Lists:: Lists
8130* Paragraphs:: Paragraphs
8131* Footnote markup:: Footnotes
8132* Emphasis and monospace:: Bold, italic, etc.
8133* Horizontal rules:: Make a line
8134* Comment lines:: What will *not* be exported
8107@end menu 8135@end menu
8108 8136
8109@node Document title, Headings and sections, Markup rules, Markup rules 8137@node Document title, Headings and sections, Structural markup elements, Structural markup elements
8110@subheading Document title 8138@subheading Document title
8111@cindex document title, markup rules 8139@cindex document title, markup rules
8112 8140
@@ -8129,7 +8157,7 @@ If you are exporting only a subtree by marking is as the region, the heading
8129of the subtree will become the title of the document. If the subtree has a 8157of the subtree will become the title of the document. If the subtree has a
8130property @code{EXPORT_TITLE}, that will take precedence. 8158property @code{EXPORT_TITLE}, that will take precedence.
8131 8159
8132@node Headings and sections, Table of contents, Document title, Markup rules 8160@node Headings and sections, Table of contents, Document title, Structural markup elements
8133@subheading Headings and sections 8161@subheading Headings and sections
8134@cindex headings and sections, markup rules 8162@cindex headings and sections, markup rules
8135 8163
@@ -8147,7 +8175,7 @@ per-file basis with a line
8147#+OPTIONS: H:4 8175#+OPTIONS: H:4
8148@end example 8176@end example
8149 8177
8150@node Table of contents, Initial text, Headings and sections, Markup rules 8178@node Table of contents, Initial text, Headings and sections, Structural markup elements
8151@subheading Table of contents 8179@subheading Table of contents
8152@cindex table of contents, markup rules 8180@cindex table of contents, markup rules
8153 8181
@@ -8165,7 +8193,7 @@ the table of contents entirely, by configuring the variable
8165#+OPTIONS: toc:nil (no TOC at all) 8193#+OPTIONS: toc:nil (no TOC at all)
8166@end example 8194@end example
8167 8195
8168@node Initial text, Lists, Table of contents, Markup rules 8196@node Initial text, Lists, Table of contents, Structural markup elements
8169@subheading Text before the first headline 8197@subheading Text before the first headline
8170@cindex text before first headline, markup rules 8198@cindex text before first headline, markup rules
8171@cindex #+TEXT 8199@cindex #+TEXT
@@ -8193,7 +8221,7 @@ If you still want to have some text before the first headline, use the
8193#+TEXT: This goes between the table of contents and the first headline 8221#+TEXT: This goes between the table of contents and the first headline
8194@end example 8222@end example
8195 8223
8196@node Lists, Paragraphs, Initial text, Markup rules 8224@node Lists, Paragraphs, Initial text, Structural markup elements
8197@subheading Lists 8225@subheading Lists
8198@cindex lists, markup rules 8226@cindex lists, markup rules
8199 8227
@@ -8201,7 +8229,7 @@ Plain lists as described in @ref{Plain lists}, are translated to the backend's
8201syntax for such lists. Most backends support unordered, ordered, and 8229syntax for such lists. Most backends support unordered, ordered, and
8202description lists. 8230description lists.
8203 8231
8204@node Paragraphs, Literal examples, Lists, Markup rules 8232@node Paragraphs, Footnote markup, Lists, Structural markup elements
8205@subheading Paragraphs, line breaks, and quoting 8233@subheading Paragraphs, line breaks, and quoting
8206@cindex paragraphs, markup rules 8234@cindex paragraphs, markup rules
8207 8235
@@ -8243,8 +8271,95 @@ but not any simpler
8243#+END_CENTER 8271#+END_CENTER
8244@end example 8272@end example
8245 8273
8246@node Literal examples, Include files, Paragraphs, Markup rules 8274
8247@subheading Literal examples 8275@node Footnote markup, Emphasis and monospace, Paragraphs, Structural markup elements
8276@subheading Footnote markup
8277@cindex footnotes, markup rules
8278@cindex @file{footnote.el}
8279
8280Footnotes defined in the way described in @ref{Footnotes}, will be exported by
8281all backends. Org allows multiple references to the same note, and
8282different backends support this to varying degrees.
8283
8284@node Emphasis and monospace, Horizontal rules, Footnote markup, Structural markup elements
8285@subheading Emphasis and monospace
8286
8287@cindex underlined text, markup rules
8288@cindex bold text, markup rules
8289@cindex italic text, markup rules
8290@cindex verbatim text, markup rules
8291@cindex code text, markup rules
8292@cindex strike-through text, markup rules
8293You can make words @b{*bold*}, @i{/italic/}, _underlined_, @code{=code=}
8294and @code{~verbatim~}, and, if you must, @samp{+strike-through+}. Text
8295in the code and verbatim string is not processed for Org-mode specific
8296syntax, it is exported verbatim.
8297
8298@node Horizontal rules, Comment lines, Emphasis and monospace, Structural markup elements
8299@subheading Horizontal rules
8300@cindex horizontal rules, markup rules
8301A line consisting of only dashes, and at least 5 of them, will be
8302exported as a horizontal line (@samp{<hr/>} in HTML).
8303
8304@node Comment lines, , Horizontal rules, Structural markup elements
8305@subheading Comment lines
8306@cindex comment lines
8307@cindex exporting, not
8308@cindex #+BEGIN_COMMENT
8309
8310Lines starting with @samp{#} in column zero are treated as comments and will
8311never be exported. If you want an indented line to be treated as a comment,
8312start it with @samp{#+ }. Also entire subtrees starting with the word
8313@samp{COMMENT} will never be exported. Finally, regions surrounded by
8314@samp{#+BEGIN_COMMENT} ... @samp{#+END_COMMENT} will not be exported.
8315
8316@table @kbd
8317@kindex C-c ;
8318@item C-c ;
8319Toggle the COMMENT keyword at the beginning of an entry.
8320@end table
8321
8322
8323@node Images and tables, Literal examples, Structural markup elements, Markup
8324@section Images and Tables
8325
8326@cindex tables, markup rules
8327@cindex #+CAPTION
8328@cindex #+LABEL
8329Both the native Org mode tables (@pxref{Tables}) and tables formatted with
8330the @file{table.el} package will be exported properly. For Org mode tables,
8331the lines before the first horizontal separator line will become table header
8332lines. You can use the following lines somewhere before the table to assign
8333a caption and a label for cross references:
8334
8335@example
8336#+CAPTION: This is the caption for the next table (or link)
8337#+LABEL: tbl:basic-data
8338 | ... | ...|
8339 |-----|----|
8340@end example
8341
8342@cindex inlined images, markup rules
8343Some backends (HTML, La@TeX{}, and DocBook) allow you to directly include
8344images into the exported document. Org does this, if a link to an image
8345files does not have a description part, for example @code{[[./img/a.jpg]]}.
8346If you wish to define a caption for the image and maybe a label for internal
8347cross references, you sure that the link is on a line by itself precede it
8348with:
8349
8350@example
8351#+CAPTION: This is the caption for the next figure link (or table)
8352#+LABEL: fig:SED-HR4049
8353[[./img/a.jpg]]
8354@end example
8355
8356You may also define additional attributes for the figure. As this is
8357backend-specific, see the sections about the individual backends for more
8358information.
8359
8360
8361@node Literal examples, Include files, Images and tables, Markup
8362@section Literal examples
8248@cindex literal examples, markup rules 8363@cindex literal examples, markup rules
8249@cindex code line references, markup rules 8364@cindex code line references, markup rules
8250 8365
@@ -8295,7 +8410,7 @@ switch to the end of the @code{BEGIN} line, to get the lines of the example
8295numbered. If you use a @code{+n} switch, the numbering from the previous 8410numbered. If you use a @code{+n} switch, the numbering from the previous
8296numbered snippet will be continued in the current one. In literal examples, 8411numbered snippet will be continued in the current one. In literal examples,
8297Org will interpret strings like @samp{(ref:name)} as labels, and use them as 8412Org will interpret strings like @samp{(ref:name)} as labels, and use them as
8298targets for special hyperlinks like @code{[[(name)]]} (@ie the reference name 8413targets for special hyperlinks like @code{[[(name)]]} (i.e. the reference name
8299enclosed in single parenthesis). In HTML, hovering the mouse over such a 8414enclosed in single parenthesis). In HTML, hovering the mouse over such a
8300link will remote-highlight the corresponding code line, which is kind of 8415link will remote-highlight the corresponding code line, which is kind of
8301cool. 8416cool.
@@ -8350,8 +8465,8 @@ label is stored as a link @samp{(label)}, for retrieval with @kbd{C-c C-l}.
8350@end table 8465@end table
8351 8466
8352 8467
8353@node Include files, Tables exported, Literal examples, Markup rules 8468@node Include files, Macro replacement, Literal examples, Markup
8354@subheading Include files 8469@section Include files
8355@cindex include files, markup rules 8470@cindex include files, markup rules
8356 8471
8357During export, you can include the content of another file. For example, to 8472During export, you can include the content of another file. For example, to
@@ -8381,135 +8496,308 @@ the selected markup. For example, to include a file as an item, use
8381Visit the include file at point. 8496Visit the include file at point.
8382@end table 8497@end table
8383 8498
8384@node Tables exported, Inlined images, Include files, Markup rules
8385@subheading Tables
8386@cindex tables, markup rules
8387 8499
8388Both the native Org mode tables (@pxref{Tables}) and tables formatted with 8500@node Macro replacement, Embedded LaTeX, Include files, Markup
8389the @file{table.el} package will be exported properly. For Org mode tables, 8501@section Macro replacement
8390the lines before the first horizontal separator line will become table header 8502@cindex macro replacement, during export
8391lines. You can use the following lines somewhere before the table to assign 8503@cindex #+MACRO
8392a caption and a label for cross references: 8504
8505You can define text snippets with
8393 8506
8394@example 8507@example
8395#+CAPTION: This is the caption for the next table (or link) 8508#+MACRO: name replacement text $1, $2 are arguments
8396#+LABEL: tbl:basic-data
8397@end example 8509@end example
8398 8510
8399@node Inlined images, Footnote markup, Tables exported, Markup rules 8511@noindent which can be referenced anywhere in the document (even in
8400@subheading Inlined Images 8512code examples) with @code{@{@{@{name(arg1,arg2)@}@}@}}. In addition to
8401@cindex inlined images, markup rules 8513defined macros, @code{@{@{@{title@}@}@}}, @code{@{@{@{author@}@}@}}, etc.,
8402 8514will reference information set by the @code{#+TITLE:}, @code{#+AUTHOR:}, and
8403Some backends (HTML, La@TeX{}, and DocBook) allow you to directly include images 8515similar lines. Also, @code{@{@{@{date(@var{FORMAT})@}@}@}} and
8404into the exported document. Org does this, if a link to an image files does 8516@code{@{@{@{modification-time(@var{FORMAT})@}@}@}} refer to current date time
8405not have a description part, for example @code{[[./img/a.jpg]]}. If you wish 8517and to the modification time of the file being exported, respectively.
8406to define a caption for the image and maybe a label for internal cross 8518@var{FORMAT} should be a format string understood by
8407references, you can use (before, but close to the link) 8519@code{format-time-string}.
8408 8520
8409@example 8521Macro expansion takes place during export, and some people use it to
8410#+CAPTION: This is the caption for the next figure link (or table) 8522construct complex HTML code.
8411#+LABEL: fig:SED-HR4049
8412@end example
8413 8523
8414You may also define additional attributes for the figure. As this is
8415backend-specific, see the sections about the individual backends for more
8416information.
8417 8524
8418@node Footnote markup, Emphasis and monospace, Inlined images, Markup rules 8525@node Embedded LaTeX, , Macro replacement, Markup
8419@subheading Footnote markup 8526@section Embedded La@TeX{}
8420@cindex footnotes, markup rules 8527@cindex @TeX{} interpretation
8421@cindex @file{footnote.el} 8528@cindex La@TeX{} interpretation
8422 8529
8423Footnotes defined in the way described in @ref{Footnotes}, will be exported by 8530Plain ASCII is normally sufficient for almost all note taking. One
8424all backends. Org allows multiple references to the same note, and 8531exception, however, are scientific notes which need to be able to contain
8425different backends support this to varying degrees. 8532mathematical symbols and the occasional formula. La@TeX{}@footnote{La@TeX{}
8533is a macro system based on Donald E. Knuth's @TeX{} system. Many of the
8534features described here as ``La@TeX{}'' are really from @TeX{}, but for
8535simplicity I am blurring this distinction.} is widely used to typeset
8536scientific documents. Org mode supports embedding La@TeX{} code into its
8537files, because many academics are used to reading La@TeX{} source code, and
8538because it can be readily processed into images for HTML production.
8426 8539
8427@node Emphasis and monospace, TeX macros and LaTeX fragments, Footnote markup, Markup rules 8540It is not necessary to mark La@TeX{} macros and code in any special way.
8428@subheading Emphasis and monospace 8541If you observe a few conventions, Org mode knows how to find it and what
8542to do with it.
8429 8543
8430@cindex underlined text, markup rules 8544@menu
8431@cindex bold text, markup rules 8545* Special symbols:: Greek letters and other symbols
8432@cindex italic text, markup rules 8546* Subscripts and superscripts:: Simple syntax for raising/lowering text
8433@cindex verbatim text, markup rules 8547* LaTeX fragments:: Complex formulas made easy
8434@cindex code text, markup rules 8548* Previewing LaTeX fragments:: What will this snippet look like?
8435@cindex strike-through text, markup rules 8549* CDLaTeX mode:: Speed up entering of formulas
8436You can make words @b{*bold*}, @i{/italic/}, _underlined_, @code{=code=} 8550@end menu
8437and @code{~verbatim~}, and, if you must, @samp{+strike-through+}. Text
8438in the code and verbatim string is not processed for Org-mode specific
8439syntax, it is exported verbatim.
8440 8551
8441@node TeX macros and LaTeX fragments, Horizontal rules, Emphasis and monospace, Markup rules 8552@node Special symbols, Subscripts and superscripts, Embedded LaTeX, Embedded LaTeX
8442@subheading @TeX{} macros and La@TeX{} fragments 8553@subsection Special symbols
8554@cindex math symbols
8555@cindex special symbols
8556@cindex @TeX{} macros
8443@cindex La@TeX{} fragments, markup rules 8557@cindex La@TeX{} fragments, markup rules
8444@cindex @TeX{} macros, markup rules
8445@cindex HTML entities 8558@cindex HTML entities
8446@cindex La@TeX{} entities 8559@cindex La@TeX{} entities
8447 8560
8561You can use La@TeX{} macros to insert special symbols like @samp{\alpha} to
8562indicate the Greek letter, or @samp{\to} to indicate an arrow. Completion
8563for these macros is available, just type @samp{\} and maybe a few letters,
8564and press @kbd{M-@key{TAB}} to see possible completions. Unlike La@TeX{}
8565code, Org mode allows these macros to be present without surrounding math
8566delimiters, for example:
8567
8568@example
8569Angles are written as Greek letters \alpha, \beta and \gamma.
8570@end example
8571
8448@vindex org-html-entities 8572@vindex org-html-entities
8449A @TeX{}-like syntax is used to specify special characters. Where possible, 8573During export, these symbols will be transformed into the native format of
8450these will be transformed into the native format of the exporter backend. 8574the exporter backend. Strings like @code{\alpha} will be exported as
8451Strings like @code{\alpha} will be exported as @code{&alpha;} in the HTML 8575@code{&alpha;} in the HTML output, and as @code{$\alpha$} in the La@TeX{}
8452output, and as @code{$\alpha$} in the La@TeX{} output. Similarly, 8576output. Similarly, @code{\nbsp} will become @code{&nbsp;} in HTML and
8453@code{\nbsp} will become @code{&nbsp;} in HTML and @code{~} in La@TeX{}. 8577@code{~} in La@TeX{}. If you need such a symbol inside a word, terminate it
8454This applies for a large number of entities, with names taken from both HTML 8578like this: @samp{\Aacute@{@}stor}.
8455and La@TeX{}, see the variable @code{org-html-entities} for the complete 8579
8456list. If you are unsure about a name, use @kbd{M-@key{TAB}} for completion 8580A large number of entities is provided, with names taken from both HTML and
8457after having typed the backslash and optionally a few characters 8581La@TeX{}, see the variable @code{org-html-entities} for the complete list.
8458(@pxref{Completion}). 8582@samp{\-} is treated as a shy hyphen, and @samp{--}, @samp{---}, and
8459
8460La@TeX{} fragments are converted into images for HTML export, and they are
8461written literally into the La@TeX{} export. See also @ref{Embedded LaTeX}.
8462
8463Finally, @samp{\-} is treated as a shy hyphen, and @samp{--}, @samp{---}, and
8464@samp{...} are all converted into special commands creating hyphens of 8583@samp{...} are all converted into special commands creating hyphens of
8465different lengths or a compact set of dots. 8584different lengths or a compact set of dots.
8466 8585
8467@node Horizontal rules, Comment lines, TeX macros and LaTeX fragments, Markup rules 8586@node Subscripts and superscripts, LaTeX fragments, Special symbols, Embedded LaTeX
8468@subheading Horizontal rules 8587@subsection Subscripts and superscripts
8469@cindex horizontal rules, markup rules 8588@cindex subscript
8470A line consisting of only dashes, and at least 5 of them, will be 8589@cindex superscript
8471exported as a horizontal line (@samp{<hr/>} in HTML).
8472 8590
8473@node Comment lines, Macro replacement, Horizontal rules, Markup rules 8591Just like in La@TeX{}, @samp{^} and @samp{_} are used to indicate super-
8474@subheading Comment lines 8592and subscripts. Again, these can be used without embedding them in
8475@cindex comment lines 8593math-mode delimiters. To increase the readability of ASCII text, it is
8476@cindex exporting, not 8594not necessary (but OK) to surround multi-character sub- and superscripts
8477@cindex #+BEGIN_COMMENT 8595with curly braces. For example
8478 8596
8479Lines starting with @samp{#} in column zero are treated as comments and will 8597@example
8480never be exported. If you want an indented line to be treated as a comment, 8598The mass if the sun is M_sun = 1.989 x 10^30 kg. The radius of
8481start it with @samp{#+ }. Also entire subtrees starting with the word 8599the sun is R_@{sun@} = 6.96 x 10^8 m.
8482@samp{COMMENT} will never be exported. Finally, regions surrounded by 8600@end example
8483@samp{#+BEGIN_COMMENT} ... @samp{#+END_COMMENT} will not be exported.
8484 8601
8485@table @kbd 8602@vindex org-export-with-sub-superscripts
8486@kindex C-c ; 8603To avoid interpretation as raised or lowered text, you can quote @samp{^} and
8487@item C-c ; 8604@samp{_} with a backslash: @samp{\^} and @samp{\_}. If you write a text
8488Toggle the COMMENT keyword at the beginning of an entry. 8605where the underscore is often used in a different context, Org's convention
8489@end table 8606to always interpret these as subscripts can get in your way. Configure the
8607variable @code{org-export-with-sub-superscripts} to globally change this
8608convention, or use, on a per-file basis:
8490 8609
8491@node Macro replacement, , Comment lines, Markup rules 8610@example
8492@subheading Macro replacement 8611#+OPTIONS: ^:@{@}
8493@cindex macro replacement, during export 8612@end example
8494@cindex #+MACRO
8495 8613
8496You can define text snippets with 8614
8615@node LaTeX fragments, Previewing LaTeX fragments, Subscripts and superscripts, Embedded LaTeX
8616@subsection La@TeX{} fragments
8617@cindex La@TeX{} fragments
8618
8619@vindex org-format-latex-header
8620With symbols, sub- and superscripts, HTML is pretty much at its end when
8621it comes to representing mathematical formulas@footnote{Yes, there is
8622MathML, but that is not yet fully supported by many browsers, and there
8623is no decent converter for turning La@TeX{} or ASCII representations of
8624formulas into MathML. So for the time being, converting formulas into
8625images seems the way to go.}. More complex expressions need a dedicated
8626formula processor. To this end, Org mode can contain arbitrary La@TeX{}
8627fragments. It provides commands to preview the typeset result of these
8628fragments, and upon export to HTML, all fragments will be converted to
8629images and inlined into the HTML document@footnote{The La@TeX{} export
8630will not use images for displaying La@TeX{} fragments but include these
8631fragments directly into the La@TeX{} code.}. For this to work you
8632need to be on a system with a working La@TeX{} installation. You also
8633need the @file{dvipng} program, available at
8634@url{http://sourceforge.net/projects/dvipng/}. The La@TeX{} header that
8635will be used when processing a fragment can be configured with the
8636variable @code{org-format-latex-header}.
8637
8638La@TeX{} fragments don't need any special marking at all. The following
8639snippets will be identified as La@TeX{} source code:
8640@itemize @bullet
8641@item
8642Environments of any kind. The only requirement is that the
8643@code{\begin} statement appears on a new line, preceded by only
8644whitespace.
8645@item
8646Text within the usual La@TeX{} math delimiters. To avoid conflicts with
8647currency specifications, single @samp{$} characters are only recognized as
8648math delimiters if the enclosed text contains at most two line breaks, is
8649directly attached to the @samp{$} characters with no whitespace in between,
8650and if the closing @samp{$} is followed by whitespace, punctuation or a dash.
8651For the other delimiters, there is no such restriction, so when in doubt, use
8652@samp{\(...\)} as inline math delimiters.
8653@end itemize
8654
8655@noindent For example:
8497 8656
8498@example 8657@example
8499#+MACRO: name replacement text $1, $2 are arguments 8658\begin@{equation@} % arbitrary environments,
8659x=\sqrt@{b@} % even tables, figures
8660\end@{equation@} % etc
8661
8662If $a^2=b$ and \( b=2 \), then the solution must be
8663either $$ a=+\sqrt@{2@} $$ or \[ a=-\sqrt@{2@} \].
8500@end example 8664@end example
8501 8665
8502@noindent which can be referenced anywhere in the document (even in 8666@noindent
8503code examples) with @code{@{@{@{name(arg1,arg2)@}@}@}}. In addition to 8667@vindex org-format-latex-options
8504defined macros, @code{@{@{@{title@}@}@}}, @code{@{@{@{author@}@}@}}, etc., 8668If you need any of the delimiter ASCII sequences for other purposes, you
8505will reference information set by the @code{#+TITLE:}, @code{#+AUTHOR:}, and 8669can configure the option @code{org-format-latex-options} to deselect the
8506similar lines. Also, @code{@{@{@{date(@var{FORMAT})@}@}@}} and 8670ones you do not wish to have interpreted by the La@TeX{} converter.
8507@code{@{@{@{modification-time(@var{FORMAT})@}@}@}} refer to current date time
8508and to the modification time of the file being exported, respectively.
8509@var{FORMAT} should be a format string understood by
8510@code{format-time-string}.
8511 8671
8512@node Selective export, Export options, Markup rules, Exporting 8672@node Previewing LaTeX fragments, CDLaTeX mode, LaTeX fragments, Embedded LaTeX
8673@subsection Previewing LaTeX fragments
8674@cindex LaTeX fragments, preview
8675
8676La@TeX{} fragments can be processed to produce preview images of the
8677typeset expressions:
8678
8679@table @kbd
8680@kindex C-c C-x C-l
8681@item C-c C-x C-l
8682Produce a preview image of the La@TeX{} fragment at point and overlay it
8683over the source code. If there is no fragment at point, process all
8684fragments in the current entry (between two headlines). When called
8685with a prefix argument, process the entire subtree. When called with
8686two prefix arguments, or when the cursor is before the first headline,
8687process the entire buffer.
8688@kindex C-c C-c
8689@item C-c C-c
8690Remove the overlay preview images.
8691@end table
8692
8693@vindex org-format-latex-options
8694You can customize the variable @code{org-format-latex-options} to influence
8695some aspects of the preview. In particular, the @code{:scale} (and for HTML
8696export, @code{:html-scale}) property can be used to adjust the size of the
8697preview images.
8698
8699During HTML export (@pxref{HTML export}), all La@TeX{} fragments are
8700converted into images and inlined into the document if the following
8701setting is active:
8702
8703@lisp
8704(setq org-export-with-LaTeX-fragments t)
8705@end lisp
8706
8707@node CDLaTeX mode, , Previewing LaTeX fragments, Embedded LaTeX
8708@subsection Using CDLa@TeX{} to enter math
8709@cindex CDLa@TeX{}
8710
8711CDLa@TeX{} mode is a minor mode that is normally used in combination with a
8712major La@TeX{} mode like AUC@TeX{} in order to speed-up insertion of
8713environments and math templates. Inside Org mode, you can make use of
8714some of the features of CDLa@TeX{} mode. You need to install
8715@file{cdlatex.el} and @file{texmathp.el} (the latter comes also with
8716AUC@TeX{}) from @url{http://www.astro.uva.nl/~dominik/Tools/cdlatex}.
8717Don't use CDLa@TeX{} mode itself under Org mode, but use the light
8718version @code{org-cdlatex-mode} that comes as part of Org mode. Turn it
8719on for the current buffer with @code{M-x org-cdlatex-mode}, or for all
8720Org files with
8721
8722@lisp
8723(add-hook 'org-mode-hook 'turn-on-org-cdlatex)
8724@end lisp
8725
8726When this mode is enabled, the following features are present (for more
8727details see the documentation of CDLa@TeX{} mode):
8728@itemize @bullet
8729@kindex C-c @{
8730@item
8731Environment templates can be inserted with @kbd{C-c @{}.
8732@item
8733@kindex @key{TAB}
8734The @key{TAB} key will do template expansion if the cursor is inside a
8735La@TeX{} fragment@footnote{Org mode has a method to test if the cursor is
8736inside such a fragment, see the documentation of the function
8737@code{org-inside-LaTeX-fragment-p}.}. For example, @key{TAB} will
8738expand @code{fr} to @code{\frac@{@}@{@}} and position the cursor
8739correctly inside the first brace. Another @key{TAB} will get you into
8740the second brace. Even outside fragments, @key{TAB} will expand
8741environment abbreviations at the beginning of a line. For example, if
8742you write @samp{equ} at the beginning of a line and press @key{TAB},
8743this abbreviation will be expanded to an @code{equation} environment.
8744To get a list of all abbreviations, type @kbd{M-x cdlatex-command-help}.
8745@item
8746@kindex _
8747@kindex ^
8748@vindex cdlatex-simplify-sub-super-scripts
8749Pressing @kbd{_} and @kbd{^} inside a La@TeX{} fragment will insert these
8750characters together with a pair of braces. If you use @key{TAB} to move
8751out of the braces, and if the braces surround only a single character or
8752macro, they are removed again (depending on the variable
8753@code{cdlatex-simplify-sub-super-scripts}).
8754@item
8755@kindex `
8756Pressing the backquote @kbd{`} followed by a character inserts math
8757macros, also outside La@TeX{} fragments. If you wait more than 1.5 seconds
8758after the backquote, a help window will pop up.
8759@item
8760@kindex '
8761Pressing the single-quote @kbd{'} followed by another character modifies
8762the symbol before point with an accent or a font. If you wait more than
87631.5 seconds after the backquote, a help window will pop up. Character
8764modification will work only inside La@TeX{} fragments, outside the quote
8765is normal.
8766@end itemize
8767
8768@node Exporting, Publishing, Markup, Top
8769@chapter Exporting
8770@cindex exporting
8771
8772Org-mode documents can be exported into a variety of other formats. For
8773printing and sharing of notes, ASCII export produces a readable and simple
8774version of an Org file. HTML export allows you to publish a notes file on
8775the web, while the XOXO format provides a solid base for exchange with a
8776broad range of other applications. La@TeX{} export lets you use Org mode and
8777its structured editing functions to easily create La@TeX{} files. DocBook
8778export makes it possible to convert Org files to many other formats using
8779DocBook tools. To incorporate entries with associated times like deadlines
8780or appointments into a desktop calendar program like iCal, Org mode can also
8781produce extracts in the iCalendar format. Currently Org mode only supports
8782export, not import of these different formats.
8783
8784Org supports export of selected regions when @code{transient-mark-mode} is
8785enabled (default in Emacs 23).
8786
8787@menu
8788* Selective export:: Using tags to select and exclude trees
8789* Export options:: Per-file export settings
8790* The export dispatcher:: How to access exporter commands
8791* ASCII export:: Exporting to plain ASCII
8792* HTML export:: Exporting to HTML
8793* LaTeX and PDF export:: Exporting to La@TeX{}, and processing to PDF
8794* DocBook export:: Exporting to DocBook
8795* Freemind export:: Exporting to Freemind mind maps
8796* XOXO export:: Exporting to XOXO
8797* iCalendar export:: Exporting in iCalendar format
8798@end menu
8799
8800@node Selective export, Export options, Exporting, Exporting
8513@section Selective export 8801@section Selective export
8514@cindex export, selective by tags 8802@cindex export, selective by tags
8515 8803
@@ -8576,9 +8864,9 @@ Insert template with export options, see example below.
8576#+AUTHOR: the author (default taken from @code{user-full-name}) 8864#+AUTHOR: the author (default taken from @code{user-full-name})
8577#+DATE: a date, fixed, of a format string for @code{format-time-string} 8865#+DATE: a date, fixed, of a format string for @code{format-time-string}
8578#+EMAIL: his/her email address (default from @code{user-mail-address}) 8866#+EMAIL: his/her email address (default from @code{user-mail-address})
8579#+DESCRIPTION: the page description, @eg for the XHTML meta tag 8867#+DESCRIPTION: the page description, e.g. for the XHTML meta tag
8580#+KEYWORDS: the page keywords, @eg for the XHTML meta tag 8868#+KEYWORDS: the page keywords, e.g. for the XHTML meta tag
8581#+LANGUAGE: language for HTML, @eg @samp{en} (@code{org-export-default-language}) 8869#+LANGUAGE: language for HTML, e.g. @samp{en} (@code{org-export-default-language})
8582#+TEXT: Some descriptive text to be inserted at the beginning. 8870#+TEXT: Some descriptive text to be inserted at the beginning.
8583#+TEXT: Several lines may be given. 8871#+TEXT: Several lines may be given.
8584#+OPTIONS: H:2 num:t toc:t \n:nil @@:t ::t |:t ^:t f:t TeX:t ... 8872#+OPTIONS: H:2 num:t toc:t \n:nil @@:t ::t |:t ^:t f:t TeX:t ...
@@ -8670,12 +8958,12 @@ the variable @code{org-export-run-in-background}.}.
8670@kindex C-c C-e v 8958@kindex C-c C-e v
8671@item C-c C-e v 8959@item C-c C-e v
8672Like @kbd{C-c C-e}, but only export the text that is currently visible 8960Like @kbd{C-c C-e}, but only export the text that is currently visible
8673(@ie not hidden by outline visibility). 8961(i.e. not hidden by outline visibility).
8674@kindex C-u C-u C-c C-e 8962@kindex C-u C-u C-c C-e
8675@item C-u C-u C-c C-e 8963@item C-u C-u C-c C-e
8676@vindex org-export-run-in-background 8964@vindex org-export-run-in-background
8677Call an the exporter, but reverse the setting of 8965Call an the exporter, but reverse the setting of
8678@code{org-export-run-in-background}, @ie request background processing if 8966@code{org-export-run-in-background}, i.e. request background processing if
8679not set, or force processing in the current Emacs process if set. 8967not set, or force processing in the current Emacs process if set.
8680@end table 8968@end table
8681 8969
@@ -8745,7 +9033,7 @@ language, but with additional support for tables.
8745@menu 9033@menu
8746* HTML Export commands:: How to invoke HTML export 9034* HTML Export commands:: How to invoke HTML export
8747* Quoting HTML tags:: Using direct HTML in Org mode 9035* Quoting HTML tags:: Using direct HTML in Org mode
8748* Links:: Transformation of links for HTML 9036* Links in HTML export:: How links will be interpreted and formatted
8749* Tables in HTML export:: How to modify the formatting of tables 9037* Tables in HTML export:: How to modify the formatting of tables
8750* Images in HTML export:: How to insert figures into HTML output 9038* Images in HTML export:: How to insert figures into HTML output
8751* Text areas in HTML export:: An alternative way to show an example 9039* Text areas in HTML export:: An alternative way to show an example
@@ -8813,7 +9101,7 @@ specify it with a numeric prefix argument. For example,
8813@noindent 9101@noindent
8814creates two levels of headings and does the rest as items. 9102creates two levels of headings and does the rest as items.
8815 9103
8816@node Quoting HTML tags, Links, HTML Export commands, HTML export 9104@node Quoting HTML tags, Links in HTML export, HTML Export commands, HTML export
8817@subsection Quoting HTML tags 9105@subsection Quoting HTML tags
8818 9106
8819Plain @samp{<} and @samp{>} are always transformed to @samp{&lt;} and 9107Plain @samp{<} and @samp{>} are always transformed to @samp{&lt;} and
@@ -8839,8 +9127,8 @@ All lines between these markers are exported literally
8839@end example 9127@end example
8840 9128
8841 9129
8842@node Links, Tables in HTML export, Quoting HTML tags, HTML export 9130@node Links in HTML export, Tables in HTML export, Quoting HTML tags, HTML export
8843@subsection Links 9131@subsection Links in HTML export
8844 9132
8845@cindex links, in HTML export 9133@cindex links, in HTML export
8846@cindex internal links, in HTML export 9134@cindex internal links, in HTML export
@@ -8866,7 +9154,7 @@ and @code{style} attributes for a link:
8866[[http://orgmode.org]] 9154[[http://orgmode.org]]
8867@end example 9155@end example
8868 9156
8869@node Tables in HTML export, Images in HTML export, Links, HTML export 9157@node Tables in HTML export, Images in HTML export, Links in HTML export, HTML export
8870@subsection Tables 9158@subsection Tables
8871@cindex tables, in HTML 9159@cindex tables, in HTML
8872@vindex org-export-html-table-tag 9160@vindex org-export-html-table-tag
@@ -8877,13 +9165,14 @@ cell borders and frame. If you would like to change this for individual
8877tables, place somthing like the following before the table: 9165tables, place somthing like the following before the table:
8878 9166
8879@cindex #+CAPTION 9167@cindex #+CAPTION
9168@cindex #+ATTR_HTML
8880@example 9169@example
8881#+CAPTION: This is a table with lines around and between cells 9170#+CAPTION: This is a table with lines around and between cells
8882#+ATTR_HTML: border="2" rules="all" frame="all" 9171#+ATTR_HTML: border="2" rules="all" frame="all"
8883@end example 9172@end example
8884 9173
8885@node Images in HTML export, Text areas in HTML export, Tables in HTML export, HTML export 9174@node Images in HTML export, Text areas in HTML export, Tables in HTML export, HTML export
8886@subsection Images 9175@subsection Images in HTML export
8887 9176
8888@cindex images, inline in HTML 9177@cindex images, inline in HTML
8889@cindex inlining images in HTML 9178@cindex inlining images in HTML
@@ -8904,13 +9193,15 @@ will link to a high resolution version of the image, you could use:
8904[[file:highres.jpg][file:thumb.jpg]] 9193[[file:highres.jpg][file:thumb.jpg]]
8905@end example 9194@end example
8906 9195
8907If you need to add attributes to an inlines image, use a @code{#+ATTR_HTML}, 9196If you need to add attributes to an inlines image, use a @code{#+ATTR_HTML}.
8908for example: 9197In the example below we specify the @code{alt} and @code{title} attributes to
9198support text viewers and accessibility, and align it to the right.
8909 9199
8910@cindex #+CAPTION 9200@cindex #+CAPTION
9201@cindex #+ATTR_HTML
8911@example 9202@example
8912#+CAPTION: A black cat stalking a spider 9203#+CAPTION: A black cat stalking a spider
8913#+ATTR_HTML: alt="cat/spider image" title="one second before action" 9204#+ATTR_HTML: alt="cat/spider image" title="Action!" align="right"
8914[[./img/a.jpg]] 9205[[./img/a.jpg]]
8915@end example 9206@end example
8916 9207
@@ -8918,7 +9209,7 @@ for example:
8918and you could use @code{http} addresses just as well. 9209and you could use @code{http} addresses just as well.
8919 9210
8920@node Text areas in HTML export, CSS support, Images in HTML export, HTML export 9211@node Text areas in HTML export, CSS support, Images in HTML export, HTML export
8921@subsection Text areas 9212@subsection Text areas in HTML export
8922 9213
8923@cindex text areas, in HTML 9214@cindex text areas, in HTML
8924An alternative way to publish literal code examples in HTML is to use text 9215An alternative way to publish literal code examples in HTML is to use text
@@ -9205,7 +9496,7 @@ additional classes. You can also use @code{#+LATEX_HEADER:
9205@cindex tables, in La@TeX{} export 9496@cindex tables, in La@TeX{} export
9206 9497
9207For La@TeX{} export of a table, you can specify a label and a caption 9498For La@TeX{} export of a table, you can specify a label and a caption
9208(@pxref{Markup rules}). You can also use the @code{ATTR_LaTeX} line to 9499(@pxref{Images and tables}). You can also use the @code{ATTR_LaTeX} line to
9209request a longtable environment for the table, so that it may span several 9500request a longtable environment for the table, so that it may span several
9210pages. Finally, you can set the alignment string: 9501pages. Finally, you can set the alignment string:
9211 9502
@@ -9228,13 +9519,22 @@ pages. Finally, you can set the alignment string:
9228 9519
9229Images that are linked to without a description part in the link, like 9520Images that are linked to without a description part in the link, like
9230@samp{[[file:img.jpg]]} or @samp{[[./img.jpg]]} will be inserted into the PDF 9521@samp{[[file:img.jpg]]} or @samp{[[./img.jpg]]} will be inserted into the PDF
9231output files resulting from La@TeX{} output. Org will use an 9522output file resulting from La@TeX{} processing. Org will use an
9232@code{\includegraphics} macro to insert the image. If you have specified a 9523@code{\includegraphics} macro to insert the image. If you have specified a
9233caption and/or a label as described in @ref{Markup rules}, the figure will 9524caption and/or a label as described in @ref{Images and tables}, the figure
9234be wrapped into a @code{figure} environment and thus become a floating 9525will be wrapped into a @code{figure} environment and thus become a floating
9235element. Finally, you can use an @code{#+ATTR_LaTeX:} line to specify the 9526element. You can use an @code{#+ATTR_LaTeX:} line to specify the various
9236options that can be used in the optional argument of the 9527options that can be used in the optional argument of the
9237@code{\includegraphics} macro. 9528@code{\includegraphics} macro. To modify the placement option of the
9529@code{figure} environment, add something like @samp{placement=[h!]} to the
9530Attributes.
9531
9532If you'd like to let text flow around the image, add the word @samp{wrap} to
9533the @code{#+ATTR_LaTeX:} line, which will make the figure occupy the left
9534half of the page. To fine-tune, the @code{placement} field will be the
9535set of additional arguments needed by the @code{wrapfigure} environment.
9536Note that if you change the size of the image, you need to use compatible
9537settings for @code{\includegraphics} and @code{wrapfigure}.
9238 9538
9239@cindex #+CAPTION 9539@cindex #+CAPTION
9240@cindex #+LABEL 9540@cindex #+LABEL
@@ -9244,17 +9544,15 @@ options that can be used in the optional argument of the
9244#+LABEL: fig:SED-HR4049 9544#+LABEL: fig:SED-HR4049
9245#+ATTR_LaTeX: width=5cm,angle=90 9545#+ATTR_LaTeX: width=5cm,angle=90
9246[[./img/sed-hr4049.pdf]] 9546[[./img/sed-hr4049.pdf]]
9547
9548#+ATTR_LaTeX: width=0.38\textwidth wrap placement=@{r@}@{0.4\textwidth@}
9549[[./img/hst.png]]
9247@end example 9550@end example
9248 9551
9249@vindex org-export-latex-inline-image-extensions
9250If you need references to a label created in this way, write 9552If you need references to a label created in this way, write
9251@samp{\ref@{fig:SED-HR4049@}} just like in La@TeX{}. The default settings will 9553@samp{\ref@{fig:SED-HR4049@}} just like in La@TeX{}.
9252recognize files types that can be included as images during processing by
9253@command{pdflatex} (@file{png}, @file{jpg}, and @file{pdf} files). If you process your
9254files in a different way, you may need to customize the variable
9255@code{org-export-latex-inline-image-extensions}.
9256 9554
9257@node DocBook export, XOXO export, LaTeX and PDF export, Exporting 9555@node DocBook export, Freemind export, LaTeX and PDF export, Exporting
9258@section DocBook export 9556@section DocBook export
9259@cindex DocBook export 9557@cindex DocBook export
9260@cindex PDF export 9558@cindex PDF export
@@ -9352,7 +9650,7 @@ exported DocBook XML files invalid by not quoting DocBook code correctly.
9352@cindex DocBook recursive sections 9650@cindex DocBook recursive sections
9353 9651
9354DocBook exporter exports Org files as articles using the @code{article} 9652DocBook exporter exports Org files as articles using the @code{article}
9355element in DocBook. Recursive sections, @ie @code{section} elements, are 9653element in DocBook. Recursive sections, i.e. @code{section} elements, are
9356used in exported articles. Top level headlines in Org files are exported as 9654used in exported articles. Top level headlines in Org files are exported as
9357top level sections, and lower level headlines are exported as nested 9655top level sections, and lower level headlines are exported as nested
9358sections. The entire structure of Org files will be exported completely, no 9656sections. The entire structure of Org files will be exported completely, no
@@ -9381,7 +9679,7 @@ Images that are linked to without a description part in the link, like
9381@samp{[[file:img.jpg]]} or @samp{[[./img.jpg]]}, will be exported to DocBook 9679@samp{[[file:img.jpg]]} or @samp{[[./img.jpg]]}, will be exported to DocBook
9382using @code{mediaobject} elements. Each @code{mediaobject} element contains 9680using @code{mediaobject} elements. Each @code{mediaobject} element contains
9383an @code{imageobject} that wraps an @code{imagedata} element. If you have 9681an @code{imageobject} that wraps an @code{imagedata} element. If you have
9384specified a caption for an image as described in @ref{Markup rules}, a 9682specified a caption for an image as described in @ref{Images and tables}, a
9385@code{caption} element will be added in @code{mediaobject}. If a label is 9683@code{caption} element will be added in @code{mediaobject}. If a label is
9386also specified, it will be exported as an @code{xml:id} attribute of the 9684also specified, it will be exported as an @code{xml:id} attribute of the
9387@code{mediaobject} element. 9685@code{mediaobject} element.
@@ -9447,7 +9745,20 @@ special characters included in XHTML entities:
9447" 9745"
9448@end example 9746@end example
9449 9747
9450@node XOXO export, iCalendar export, DocBook export, Exporting 9748@node Freemind export, XOXO export, DocBook export, Exporting
9749@section Freemind export
9750@cindex Freemind export
9751@cindex mind map
9752
9753The freemind exporter was written by Lennart Borgman.
9754
9755@table @kbd
9756@kindex C-c C-e m
9757@item C-c C-e m
9758Export as Freemind mind map @file{myfile.mm}.
9759@end table
9760
9761@node XOXO export, iCalendar export, Freemind export, Exporting
9451@section XOXO export 9762@section XOXO export
9452@cindex XOXO export 9763@cindex XOXO export
9453 9764
@@ -10039,7 +10350,7 @@ This may be necessary in particular if files include other files via
10039 10350
10040Emacs would not be Emacs without completion, and Org-mode uses it whenever it 10351Emacs would not be Emacs without completion, and Org-mode uses it whenever it
10041makes sense. If you prefer an @i{iswitchb}- or @i{ido}-like interface for 10352makes sense. If you prefer an @i{iswitchb}- or @i{ido}-like interface for
10042some of the completion prompts, you can specify your preferece by setting at 10353some of the completion prompts, you can specify your preference by setting at
10043most one of the variables @code{org-completion-use-iswitchb} 10354most one of the variables @code{org-completion-use-iswitchb}
10044@code{org-completion-use-ido}. 10355@code{org-completion-use-ido}.
10045 10356
@@ -10077,7 +10388,7 @@ option keyword is already complete, pressing @kbd{M-@key{TAB}} again
10077will insert example settings for this keyword. 10388will insert example settings for this keyword.
10078@item 10389@item
10079In the line after @samp{#+STARTUP: }, complete startup keywords, 10390In the line after @samp{#+STARTUP: }, complete startup keywords,
10080@ie valid keys for this line. 10391i.e. valid keys for this line.
10081@item 10392@item
10082Elsewhere, complete dictionary words using Ispell. 10393Elsewhere, complete dictionary words using Ispell.
10083@end itemize 10394@end itemize
@@ -10161,7 +10472,7 @@ buffer, most useful for specifying the allowed values of a property.
10161@item #+SETUPFILE: file 10472@item #+SETUPFILE: file
10162This line defines a file that holds more in-buffer setup. Normally this is 10473This line defines a file that holds more in-buffer setup. Normally this is
10163entirely ignored. Only when the buffer is parsed for option-setting lines 10474entirely ignored. Only when the buffer is parsed for option-setting lines
10164(@ie when starting Org mode for a file, when pressing @kbd{C-c C-c} in a 10475(i.e. when starting Org mode for a file, when pressing @kbd{C-c C-c} in a
10165settings line, or when exporting), then the contents of this file are parsed 10476settings line, or when exporting), then the contents of this file are parsed
10166as if they had been included in the buffer. In particular, the file can be 10477as if they had been included in the buffer. In particular, the file can be
10167any other Org mode file with internal setup. You can visit the file the 10478any other Org mode file with internal setup. You can visit the file the
@@ -10222,6 +10533,12 @@ configured using these options (see variables @code{org-log-done},
10222@cindex @code{logrepeat}, STARTUP keyword 10533@cindex @code{logrepeat}, STARTUP keyword
10223@cindex @code{lognoterepeat}, STARTUP keyword 10534@cindex @code{lognoterepeat}, STARTUP keyword
10224@cindex @code{nologrepeat}, STARTUP keyword 10535@cindex @code{nologrepeat}, STARTUP keyword
10536@cindex @code{logreschedule}, STARTUP keyword
10537@cindex @code{lognotereschedule}, STARTUP keyword
10538@cindex @code{nologreschedule}, STARTUP keyword
10539@cindex @code{logredeadline}, STARTUP keyword
10540@cindex @code{lognoteredeadline}, STARTUP keyword
10541@cindex @code{nologredeadline}, STARTUP keyword
10225@example 10542@example
10226logdone @r{record a timestamp when an item is marked DONE} 10543logdone @r{record a timestamp when an item is marked DONE}
10227lognotedone @r{record timestamp and a note when DONE} 10544lognotedone @r{record timestamp and a note when DONE}
@@ -10231,6 +10548,12 @@ lognoterepeat @r{record a note when reinstating a repeating item}
10231nologrepeat @r{do not record when reinstating repeating item} 10548nologrepeat @r{do not record when reinstating repeating item}
10232lognoteclock-out @r{record a note when clocking out} 10549lognoteclock-out @r{record a note when clocking out}
10233nolognoteclock-out @r{don't record a note when clocking out} 10550nolognoteclock-out @r{don't record a note when clocking out}
10551logreschedule @r{record a timestamp when scheduling time changes}
10552lognotereschedule @r{record a note when scheduling time changes}
10553nologreschedule @r{do not record when a scheduling date changes}
10554logredeadline @r{record a timestamp when deadline changes}
10555lognoteredeadline @r{record a note when deadline changes}
10556nologredeadline @r{do not record when a deadline date changes}
10234@end example 10557@end example
10235@vindex org-hide-leading-stars 10558@vindex org-hide-leading-stars
10236@vindex org-odd-levels-only 10559@vindex org-odd-levels-only
@@ -10705,6 +11028,18 @@ fixed this problem:
10705This package also uses the @kbd{S-<cursor>} keys, so everything written 11028This package also uses the @kbd{S-<cursor>} keys, so everything written
10706in the paragraph above about CUA mode also applies here. 11029in the paragraph above about CUA mode also applies here.
10707 11030
11031@item @file{viper.el} by Michael Kifer
11032@cindex @file{viper.el}
11033@kindex C-c /
11034Viper uses @kbd{C-c /} and therefore makes this key not access the
11035corresponding Org-mode command @code{org-sparse-tree}. You need to find
11036another key for this command, or override the key in
11037@code{viper-vi-global-user-map} with
11038
11039@lisp
11040(define-key viper-vi-global-user-map "C-c /" 'org-sparse-tree)
11041@end lisp
11042
10708@end table 11043@end table
10709 11044
10710 11045
@@ -10850,7 +11185,7 @@ the link description when the link is later inserted into an Org
10850buffer with @kbd{C-c C-l}. 11185buffer with @kbd{C-c C-l}.
10851 11186
10852When is makes sense for your new link type, you may also define a function 11187When is makes sense for your new link type, you may also define a function
10853@code{org-PREFIX-complete-link} that implements special (@eg completion) 11188@code{org-PREFIX-complete-link} that implements special (e.g. completion)
10854support for inserting such a link with @kbd{C-c C-l}. Such a function should 11189support for inserting such a link with @kbd{C-c C-l}. Such a function should
10855not accept any arguments, and return the full link with prefix. 11190not accept any arguments, and return the full link with prefix.
10856 11191
@@ -11052,7 +11387,7 @@ table inserted between the two marker lines.
11052Now let's assume you want to make the table header by hand, because you 11387Now let's assume you want to make the table header by hand, because you
11053want to control how columns are aligned, etc@. In this case we make sure 11388want to control how columns are aligned, etc@. In this case we make sure
11054that the table translator skips the first 2 lines of the source 11389that the table translator skips the first 2 lines of the source
11055table, and tell the command to work as a @i{splice}, @ie to not produce 11390table, and tell the command to work as a @i{splice}, i.e. to not produce
11056header and footer commands of the target table: 11391header and footer commands of the target table:
11057 11392
11058@example 11393@example
@@ -11135,7 +11470,7 @@ hands processing over to the generic translator. Here is the entire code:
11135 11470
11136As you can see, the properties passed into the function (variable 11471As you can see, the properties passed into the function (variable
11137@var{PARAMS}) are combined with the ones newly defined in the function 11472@var{PARAMS}) are combined with the ones newly defined in the function
11138(variable @var{PARAMS2}). The ones passed into the function (@ie the 11473(variable @var{PARAMS2}). The ones passed into the function (i.e. the
11139ones set by the @samp{ORGTBL SEND} line) take precedence. So if you 11474ones set by the @samp{ORGTBL SEND} line) take precedence. So if you
11140would like to use the La@TeX{} translator, but wanted the line endings to 11475would like to use the La@TeX{} translator, but wanted the line endings to
11141be @samp{\\[2mm]} instead of the default @samp{\\}, you could just 11476be @samp{\\[2mm]} instead of the default @samp{\\}, you could just
@@ -11567,7 +11902,7 @@ does not need to preserve point. After evaluation, the cursor will be
11567moved to the end of the line (presumably of the headline of the 11902moved to the end of the line (presumably of the headline of the
11568processed entry) and search continues from there. Under some 11903processed entry) and search continues from there. Under some
11569circumstances, this may not produce the wanted results. For example, 11904circumstances, this may not produce the wanted results. For example,
11570if you have removed (@eg archived) the current (sub)tree it could 11905if you have removed (e.g. archived) the current (sub)tree it could
11571mean that the next entry will be skipped entirely. In such cases, you 11906mean that the next entry will be skipped entirely. In such cases, you
11572can specify the position from where search should continue by making 11907can specify the position from where search should continue by making
11573FUNC set the variable `org-map-continue-from' to the desired buffer 11908FUNC set the variable `org-map-continue-from' to the desired buffer
@@ -11659,17 +11994,22 @@ The following example counts the number of entries with TODO keyword
11659@cindex MobileOrg 11994@cindex MobileOrg
11660 11995
11661@i{MobileOrg} is an application for the @i{iPhone/iPod Touch} series of 11996@i{MobileOrg} is an application for the @i{iPhone/iPod Touch} series of
11662devices, developed by Richard Moreland. Instead of trying to implement the 11997devices, developed by Richard Moreland. @i{MobileOrg} offers offline viewing
11663full feature set of Org and fighting with synchronization issues, this 11998and capture support for an Org-mode system rooted on a ``real'' computer. It
11664application chooses a different path. @i{MobileOrg} provides offline viewing 11999does also allow you to record changes to existing entries. For information
11665and capture support for an Org-mode system rooted on a ``real'' computer. 12000about @i{MobileOrg}, see @uref{http://mobileorg.ncogni.to/}).
11666Synchronization issues are avoided by making @i{MobileOrg} only @i{write} to
11667a special capture file, that is only @i{read} by the computer-based system.
11668 12001
11669This appendix describes the support Org has for creating agenda views in a 12002This appendix describes the support Org has for creating agenda views in a
11670format that can be displayed by @i{MobileOrg}, and for integrating notes 12003format that can be displayed by @i{MobileOrg}, and for integrating notes
11671captured by @i{MobileOrg} into the main system. It does not cover the 12004captured and changes made by @i{MobileOrg} into the main system.
11672operation of @i{MobileOrg} itself (see @uref{http://ncogni.to/mobileorg/}). 12005
12006For changing tags and TODO states in MobileOrg, you should have set up the
12007customization variables @code{org-todo-keywords} and @code{org-tags-alist} to
12008cover all important tags and todo keywords, even if individual files use only
12009part of these. MobileOrg will also offer you states and tags set up with
12010in-buffer settings, but it will understand the logistics of todo state
12011@i{sets} (@pxref{Per-file keywords}) and @i{mutually exclusive} tags
12012(@pxref{Setting tags}) only for those set in these variables.
11673 12013
11674@menu 12014@menu
11675* Setting up the staging area:: Where to interact with the mobile device 12015* Setting up the staging area:: Where to interact with the mobile device
@@ -11682,27 +12022,32 @@ operation of @i{MobileOrg} itself (see @uref{http://ncogni.to/mobileorg/}).
11682 12022
11683Org-mode has commands to prepare a directory with files for @i{MobileOrg}, 12023Org-mode has commands to prepare a directory with files for @i{MobileOrg},
11684and to read captured notes from there. If Emacs can directly write to the 12024and to read captured notes from there. If Emacs can directly write to the
11685WebDAV directory accessed by @i{MobileOrg}, all you need to do is to point to 12025WebDAV directory accessed by @i{MobileOrg}, just point to this directory
11686this directory using the variable @code{org-mobile-directory}. 12026using the variable @code{org-mobile-directory}. Using the @file{tramp}
11687 12027method, @code{org-mobile-directory} may point to a remote directory
11688If Emacs cannot access the WebDAV directory directly, you can use a local 12028accessible through, for example,
11689directory for staging. Other means must then be used to keep this directory 12029@file{ssh/scp}:
11690in sync with the WebDAV directory. In the following example, files are 12030
11691staged in @file{~/stage}, and Org-mode hooks take care of moving files to and 12031@smallexample
11692from the WebDAV directory using @file{scp}. 12032(setq org-mobile-directory "/scpc:user@@remote.host:org/webdav/")
11693 12033@end smallexample
11694@example 12034
12035If Emacs cannot access the WebDAV directory directly using a @file{tramp}
12036method, or you prefer to maintain a local copy, you can use a local directory
12037for staging. Other means must then be used to keep this directory in sync
12038with the WebDAV directory. In the following example, files are staged in
12039@file{~/stage}, and Org-mode hooks take care of moving files to and from the
12040WebDAV directory using @file{scp}.
12041
12042@smallexample
11695(setq org-mobile-directory "~/stage/") 12043(setq org-mobile-directory "~/stage/")
11696(add-hook 'org-mobile-post-push-hook 12044(add-hook 'org-mobile-post-push-hook
11697 (lambda () 12045 (lambda () (shell-command "scp -r ~/stage/* user@@wdhost:mobile/")))
11698 (shell-command "scp ~/stage/* user@@webdavhost:mobile/")))
11699(add-hook 'org-mobile-pre-pull-hook 12046(add-hook 'org-mobile-pre-pull-hook
11700 (lambda () 12047 (lambda () (shell-command "scp user@@wdhost:mobile/mobileorg.org ~/stage/ ")))
11701 (shell-command "scp user@@webdavhost:mobile/mobileorg.org ~/stage/ ")))
11702(add-hook 'org-mobile-post-pull-hook 12048(add-hook 'org-mobile-post-pull-hook
11703 (lambda () 12049 (lambda () (shell-command "scp ~/stage/mobileorg.org user@@wdhost:mobile/")))
11704 (shell-command "scp ~/stage/mobileorg.org user@@webdavhost:mobile/"))) 12050@end smallexample
11705@end example
11706 12051
11707@node Pushing to MobileOrg, Pulling from MobileOrg, Setting up the staging area, MobileOrg 12052@node Pushing to MobileOrg, Pulling from MobileOrg, Setting up the staging area, MobileOrg
11708@section Pushing to MobileOrg 12053@section Pushing to MobileOrg
@@ -11710,45 +12055,47 @@ from the WebDAV directory using @file{scp}.
11710This operation copies all files currently listed in @code{org-mobile-files} 12055This operation copies all files currently listed in @code{org-mobile-files}
11711to the directory @code{org-mobile-directory}. By default this list contains 12056to the directory @code{org-mobile-directory}. By default this list contains
11712all agenda files (as listed in @code{org-agenda-files}), but additional files 12057all agenda files (as listed in @code{org-agenda-files}), but additional files
11713can be included by customizing @code{org-mobiles-files}. The push operation 12058can be included by customizing @code{org-mobiles-files}. File names will be
11714also creates (in the same directory) a special Org file @file{agendas.org}. 12059staged with path relative to @code{org-directory}, so all files should be
11715This file is an Org-mode style outline, containing every custom agenda view 12060inside this directory. The push operation also creates (in the same
11716defined by the user. While creating the agendas, Org-mode will 12061directory) a special Org file @file{agendas.org}. This file is an Org-mode
11717force@footnote{See the variable @code{org-mobile-force-id-on-agenda-items}.} 12062style outline, containing every custom agenda view defined by the user.
11718an ID property on all entries referenced by the agendas, so that these 12063While creating the agendas, Org-mode will force@footnote{See the variable
11719entries can be uniquely identified if @i{MobileOrg} flags them for further 12064@code{org-mobile-force-id-on-agenda-items}.} an ID property on all entries
11720action. Finally, Org writes the file @file{index.org}, containing links to 12065referenced by the agendas, so that these entries can be uniquely identified
11721all other files. If @i{MobileOrg} is configured to request this file from 12066if @i{MobileOrg} flags them for further action. Finally, Org writes the file
11722the WebDAV server, all agendas and Org files will be downloaded to the 12067@file{index.org}, containing links to all other files. If @i{MobileOrg} is
11723iPhone. To speed up the download, MobileOrg will only read files whose 12068configured to request this file from the WebDAV server, all agendas and Org
11724checksums@footnote{stored automatically in the file @file{checksums.dat}} 12069files will be downloaded to the device. To speed up the download, MobileOrg
11725have changed. 12070will only read files whose checksums@footnote{stored automatically in the
12071file @file{checksums.dat}} have changed.
11726 12072
11727@node Pulling from MobileOrg, , Pushing to MobileOrg, MobileOrg 12073@node Pulling from MobileOrg, , Pushing to MobileOrg, MobileOrg
11728@section Pulling from MobileOrg 12074@section Pulling from MobileOrg
11729 12075
11730When @i{MobileOrg} synchronizes with the WebDAV server, it not only pulls the 12076When @i{MobileOrg} synchronizes with the WebDAV server, it not only pulls the
11731Org files for viewing. It also appends captured entries and pointers to 12077Org files for viewing. It also appends captured entries and pointers to
11732flagged entries to the file @file{mobileorg.org} on the server. Org has 12078flagged and changed entries to the file @file{mobileorg.org} on the server.
11733a @emph{pull} operation that integrates this information into an inbox file 12079Org has a @emph{pull} operation that integrates this information into an
11734and operates on the pointers to flagged entries. Here is how it works: 12080inbox file and operates on the pointers to flagged entries. Here is how it
12081works:
11735 12082
11736@enumerate 12083@enumerate
11737@item 12084@item
11738Org moves all entries found in 12085Org moves all entries found in
11739@file{mobileorg.org}@footnote{@file{mobileorg.org} will be empty after this 12086@file{mobileorg.org}@footnote{@file{mobileorg.org} will be empty after this
11740operation.} and appends them to the file pointed to by the variable 12087operation.} and appends them to the file pointed to by the variable
11741@code{org-mobile-inbox-for-pull}. Each captured entry will be a top-level 12088@code{org-mobile-inbox-for-pull}. Each captured entry and each editing event
11742entry in the inbox file. 12089will be a top-level entry in the inbox file.
11743@item 12090@item
11744After moving the entries, Org will attempt to act on the flags. Some flags 12091After moving the entries, Org will attempt to implement the changes made in
11745specify simple operations that will be executed directly and without user 12092@i{MobileOrg}. Some changes are applied directly and without user
11746interaction. Examples are marking an entry as DONE and/or archiving 12093interaction. Examples are all changes to tags, TODO state, headline and body
11747it@footnote{as specified by the variable @code{org-archive-default-action}}. 12094text that can be cleanly applied. Entries that have been flagged for further
11748All other flagged entries will receive a tag @code{:FLAGGED:}, so that they 12095action will receive a tag @code{:FLAGGED:}, so that they can be easily found
11749can be easily found again. When there is a problem finding the entry that 12096again. When there is a problem finding an entry or applying the change, the
11750should be flagged, the pointer entry will remain in the inbox and will be 12097pointer entry will remain in the inbox and will be marked with an error
11751marked with an error message. 12098message. You need to later resolve these issues by hand.
11752@item 12099@item
11753Org will then generate an agenda view with all flagged entries. The user 12100Org will then generate an agenda view with all flagged entries. The user
11754should then go through these entries and do whatever actions are necessary. 12101should then go through these entries and do whatever actions are necessary.
@@ -11763,7 +12110,8 @@ another window and also push it onto the kill ring. So you could use @kbd{?
11763z C-y C-c C-c} to store that flagging note as a normal note in the entry. 12110z C-y C-c C-c} to store that flagging note as a normal note in the entry.
11764Pressing @kbd{?} twice in succession will offer to remove the 12111Pressing @kbd{?} twice in succession will offer to remove the
11765@code{:FLAGGED:} tag along with the recorded flagging note (which is stored 12112@code{:FLAGGED:} tag along with the recorded flagging note (which is stored
11766in a property). 12113in a property). In this way you indicate, that the intended processing for
12114this flagged entry is finished.
11767@end table 12115@end table
11768@end enumerate 12116@end enumerate
11769 12117
@@ -11778,7 +12126,7 @@ the view, only the current agenda files will be searched.
11778 12126
11779@node History and Acknowledgments, Main Index, MobileOrg, Top 12127@node History and Acknowledgments, Main Index, MobileOrg, Top
11780@appendix History and Acknowledgments 12128@appendix History and Acknowledgments
11781@cindex acknowledgments 12129@cindex acknowledgements
11782@cindex history 12130@cindex history
11783@cindex thanks 12131@cindex thanks
11784 12132
@@ -11843,6 +12191,8 @@ calculations and improved XEmacs compatibility, in particular by porting
11843@item 12191@item
11844@i{Baoqiu Cui} contributed the DocBook exporter. 12192@i{Baoqiu Cui} contributed the DocBook exporter.
11845@item 12193@item
12194@i{Dan Davison} wrote (together with @i{Eric Schulte}) Org Babel.
12195@item
11846@i{Eddward DeVilla} proposed and tested checkbox statistics. He also 12196@i{Eddward DeVilla} proposed and tested checkbox statistics. He also
11847came up with the idea of properties, and that there should be an API for 12197came up with the idea of properties, and that there should be an API for
11848them. 12198them.
@@ -11866,6 +12216,12 @@ HTML agendas.
11866@i{John Foerch} figured out how to make incremental search show context 12216@i{John Foerch} figured out how to make incremental search show context
11867around a match in a hidden outline tree. 12217around a match in a hidden outline tree.
11868@item 12218@item
12219@i{Raimar Finken} wrote @file{org-git-line.el}.
12220@item
12221@i{Mikael Fornius} works as a mailing list moderator.
12222@item
12223@i{Austin Frank} works as a mailing list moderator.
12224@item
11869@i{Niels Giesen} had the idea to automatically archive DONE trees. 12225@i{Niels Giesen} had the idea to automatically archive DONE trees.
11870@item 12226@item
11871@i{Bastien Guerry} wrote the La@TeX{} exporter and @file{org-bibtex.el}, and 12227@i{Bastien Guerry} wrote the La@TeX{} exporter and @file{org-bibtex.el}, and
@@ -11934,7 +12290,8 @@ into bundles of 20 for undo.
11934@i{Matthias Rempe} (Oelde) provided ideas, Windows support, and quality 12290@i{Matthias Rempe} (Oelde) provided ideas, Windows support, and quality
11935control. 12291control.
11936@item 12292@item
11937@i{Paul Rivier} provided the basic implementation of named footnotes. 12293@i{Paul Rivier} provided the basic implementation of named footnotes. He
12294also acted as mailing list moderator for some time.
11938@item 12295@item
11939@i{Kevin Rogers} contributed code to access VM files on remote hosts. 12296@i{Kevin Rogers} contributed code to access VM files on remote hosts.
11940@item 12297@item
@@ -11954,8 +12311,8 @@ of feedback, developed and applied standards to the Org documentation.
11954@i{Christian Schlauer} proposed angular brackets around links, among 12311@i{Christian Schlauer} proposed angular brackets around links, among
11955other things. 12312other things.
11956@item 12313@item
11957@i{Eric Schulte} wrote @file{org-plot.el} and contributed various patches, 12314@i{Eric Schulte} wrote @file{org-plot.el} and (together with @i{Dan Davison})
11958small features and modules. 12315Org Babel, and contributed various patches, small features and modules.
11959@item 12316@item
11960Linking to VM/BBDB/Gnus was first inspired by @i{Tom Shannon}'s 12317Linking to VM/BBDB/Gnus was first inspired by @i{Tom Shannon}'s
11961@file{organizer-mode.el}. 12318@file{organizer-mode.el}.
@@ -11999,7 +12356,8 @@ these packages. But with time I have occasionally looked at John's code and
11999learned a lot from it. John has also contributed a number of great ideas and 12356learned a lot from it. John has also contributed a number of great ideas and
12000patches directly to Org, including the attachment system 12357patches directly to Org, including the attachment system
12001(@file{org-attach.el}), integration with Apple Mail 12358(@file{org-attach.el}), integration with Apple Mail
12002(@file{org-mac-message.el}), and hierarchical dependencies of TODO items. 12359(@file{org-mac-message.el}), hierarchical dependencies of TODO items, habit
12360tracking (@file{org-habits.el}) and support for pcomplete.
12003@item 12361@item
12004@i{Carsten Wimmer} suggested some changes and helped fix a bug in 12362@i{Carsten Wimmer} suggested some changes and helped fix a bug in
12005linking to Gnus. 12363linking to Gnus.
@@ -12027,7 +12385,7 @@ and contributed various ideas and code snippets.
12027 12385
12028This is not a complete index of variables and faces, only the ones that are 12386This is not a complete index of variables and faces, only the ones that are
12029mentioned in the manual. For a more complete list, use @kbd{M-x 12387mentioned in the manual. For a more complete list, use @kbd{M-x
12030org-customize @key{RET}} and then klick yourself through the tree. 12388org-customize @key{RET}} and then click yourself through the tree.
12031 12389
12032@printindex vr 12390@printindex vr
12033 12391
diff --git a/etc/ChangeLog b/etc/ChangeLog
index 763c9dc78f7..666a90dbf62 100644
--- a/etc/ChangeLog
+++ b/etc/ChangeLog
@@ -1,3 +1,7 @@
12009-11-13 Carsten Dominik <carsten.dominik@gmail.com>
2
3 * refcards/orgcard.tex: Document the new archiving keys.
4
12009-11-08 Chong Yidong <cyd@stupidchicken.com> 52009-11-08 Chong Yidong <cyd@stupidchicken.com>
2 6
3 * compilation.txt: Add one more error message for msft (Bug#4100). 7 * compilation.txt: Add one more error message for msft (Bug#4100).