aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--doc/misc/org.texi2115
-rw-r--r--etc/refcards/orgcard.tex16
2 files changed, 1485 insertions, 646 deletions
diff --git a/doc/misc/org.texi b/doc/misc/org.texi
index 8e01a10bde3..3ecf897dfb5 100644
--- a/doc/misc/org.texi
+++ b/doc/misc/org.texi
@@ -4,8 +4,8 @@
4@setfilename ../../info/org 4@setfilename ../../info/org
5@settitle The Org Manual 5@settitle The Org Manual
6 6
7@set VERSION 7.4 7@set VERSION 7.7
8@set DATE December 2010 8@set DATE July 2011
9 9
10@c Use proper quote and backtick for code sections in PDF output 10@c Use proper quote and backtick for code sections in PDF output
11@c Cf. Texinfo manual 14.2 11@c Cf. Texinfo manual 14.2
@@ -34,7 +34,7 @@
34 34
35@c Below we define the following macros for Org key tables: 35@c Below we define the following macros for Org key tables:
36 36
37@c orgkey{key} A key item 37@c orgkey{key} A key item
38@c orgcmd{key,cmd} Key with command name 38@c orgcmd{key,cmd} Key with command name
39@c xorgcmd{key,cmmand} Key with command name as @itemx 39@c xorgcmd{key,cmmand} Key with command name as @itemx
40@c orgcmdnki{key,cmd} Like orgcmd, but do not index the key 40@c orgcmdnki{key,cmd} Like orgcmd, but do not index the key
@@ -265,7 +265,8 @@
265@copying 265@copying
266This manual is for Org version @value{VERSION}. 266This manual is for Org version @value{VERSION}.
267 267
268Copyright @copyright{} 2004-2011 Free Software Foundation, Inc. 268Copyright @copyright{} 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011
269Free Software Foundation, Inc.
269 270
270@quotation 271@quotation
271Permission is granted to copy, distribute and/or modify this document 272Permission is granted to copy, distribute and/or modify this document
@@ -286,7 +287,7 @@ license to the document, as described in section 6 of the license.
286@end quotation 287@end quotation
287@end copying 288@end copying
288 289
289@dircategory Emacs editing modes 290@dircategory Emacs
290@direntry 291@direntry
291* Org Mode: (org). Outline-based notes management and organizer 292* Org Mode: (org). Outline-based notes management and organizer
292@end direntry 293@end direntry
@@ -377,7 +378,8 @@ The spreadsheet
377* References:: How to refer to another field or range 378* References:: How to refer to another field or range
378* Formula syntax for Calc:: Using Calc to compute stuff 379* Formula syntax for Calc:: Using Calc to compute stuff
379* Formula syntax for Lisp:: Writing formulas in Emacs Lisp 380* Formula syntax for Lisp:: Writing formulas in Emacs Lisp
380* Field formulas:: Formulas valid for a single field 381* Durations and time values:: How to compute durations and time values
382* Field and range formulas:: Formula for specific (ranges of) fields
381* Column formulas:: Formulas valid for an entire column 383* Column formulas:: Formulas valid for an entire column
382* Editing and debugging formulas:: Fixing formulas 384* Editing and debugging formulas:: Fixing formulas
383* Updating the table:: Recomputing all dependent fields 385* Updating the table:: Recomputing all dependent fields
@@ -480,7 +482,7 @@ Capture - Refile - Archive
480* Capture:: Capturing new stuff 482* Capture:: Capturing new stuff
481* Attachments:: Add files to tasks 483* Attachments:: Add files to tasks
482* RSS Feeds:: Getting input from RSS feeds 484* RSS Feeds:: Getting input from RSS feeds
483* Protocols:: External (e.g. Browser) access to Emacs and Org 485* Protocols:: External (e.g.@: Browser) access to Emacs and Org
484* Refiling notes:: Moving a tree from one place to another 486* Refiling notes:: Moving a tree from one place to another
485* Archiving:: What to do with finished projects 487* Archiving:: What to do with finished projects
486 488
@@ -572,6 +574,7 @@ Exporting
572* HTML export:: Exporting to HTML 574* HTML export:: Exporting to HTML
573* LaTeX and PDF export:: Exporting to @LaTeX{}, and processing to PDF 575* LaTeX and PDF export:: Exporting to @LaTeX{}, and processing to PDF
574* DocBook export:: Exporting to DocBook 576* DocBook export:: Exporting to DocBook
577* OpenDocumentText export:: Exporting to OpenDocumentText
575* TaskJuggler export:: Exporting to TaskJuggler 578* TaskJuggler export:: Exporting to TaskJuggler
576* Freemind export:: Exporting to Freemind mind maps 579* Freemind export:: Exporting to Freemind mind maps
577* XOXO export:: Exporting to XOXO 580* XOXO export:: Exporting to XOXO
@@ -580,6 +583,7 @@ Exporting
580HTML export 583HTML export
581 584
582* HTML Export commands:: How to invoke HTML export 585* HTML Export commands:: How to invoke HTML export
586* HTML preamble and postamble:: How to insert a preamble and a postamble
583* Quoting HTML tags:: Using direct HTML in Org-mode 587* Quoting HTML tags:: Using direct HTML in Org-mode
584* Links in HTML export:: How links will be interpreted and formatted 588* Links in HTML export:: How links will be interpreted and formatted
585* Tables in HTML export:: How to modify the formatting of tables 589* Tables in HTML export:: How to modify the formatting of tables
@@ -607,6 +611,16 @@ DocBook export
607* Images in DocBook export:: How to insert figures into DocBook output 611* Images in DocBook export:: How to insert figures into DocBook output
608* Special characters:: How to handle special characters 612* Special characters:: How to handle special characters
609 613
614OpenDocument export
615
616* OpenDocumentText export commands:: How to invoke OpenDocumentText export
617* Applying Custom Styles:: How to apply custom styles to the output
618* Converting to Other formats:: How to convert to formats like doc, docx etc
619* Links in OpenDocumentText export:: How links will be interpreted and formatted
620* Tables in OpenDocumentText export:: How Tables are handled
621* Images in OpenDocumentText export:: How to insert figures
622* Additional Documentation:: How to handle special characters
623
610Publishing 624Publishing
611 625
612* Configuration:: Defining projects 626* Configuration:: Defining projects
@@ -620,7 +634,7 @@ Configuration
620* Sources and destinations:: From here to there 634* Sources and destinations:: From here to there
621* Selecting files:: What files are part of the project? 635* Selecting files:: What files are part of the project?
622* Publishing action:: Setting the function doing the publishing 636* Publishing action:: Setting the function doing the publishing
623* Publishing options:: Tweaking HTML export 637* Publishing options:: Tweaking HTML/@LaTeX{} export
624* Publishing links:: Which links keep working after publishing? 638* Publishing links:: Which links keep working after publishing?
625* Sitemap:: Generating a list of all pages 639* Sitemap:: Generating a list of all pages
626* Generating an index:: An index that reaches across pages 640* Generating an index:: An index that reaches across pages
@@ -669,13 +683,19 @@ Specific header arguments
669 directory for code block execution 683 directory for code block execution
670* exports:: Export code and/or results 684* exports:: Export code and/or results
671* tangle:: Toggle tangling and specify file name 685* tangle:: Toggle tangling and specify file name
686* mkdirp:: Toggle creation of parent directories of target
687 files during tangling
672* comments:: Toggle insertion of comments in tangled 688* comments:: Toggle insertion of comments in tangled
673 code files 689 code files
690* padline:: Control insertion of padding lines in tangled
691 code files
674* no-expand:: Turn off variable assignment and noweb 692* no-expand:: Turn off variable assignment and noweb
675 expansion during tangling 693 expansion during tangling
676* session:: Preserve the state of code evaluation 694* session:: Preserve the state of code evaluation
677* noweb:: Toggle expansion of noweb references 695* noweb:: Toggle expansion of noweb references
696* noweb-ref:: Specify block's noweb reference resolution target
678* cache:: Avoid re-evaluating unchanged code blocks 697* cache:: Avoid re-evaluating unchanged code blocks
698* sep:: Delimiter for writing tabular results outside Org
679* hlines:: Handle horizontal lines in tables 699* hlines:: Handle horizontal lines in tables
680* colnames:: Handle column names in tables 700* colnames:: Handle column names in tables
681* rownames:: Handle row names in tables 701* rownames:: Handle row names in tables
@@ -694,6 +714,7 @@ Miscellaneous
694* Clean view:: Getting rid of leading stars in the outline 714* Clean view:: Getting rid of leading stars in the outline
695* TTY keys:: Using Org on a tty 715* TTY keys:: Using Org on a tty
696* Interaction:: Other Emacs packages 716* Interaction:: Other Emacs packages
717* org-crypt.el:: Encrypting Org files
697 718
698Interaction with other packages 719Interaction with other packages
699 720
@@ -769,7 +790,7 @@ create dynamic @i{agenda views}.
769 790
770Org mode contains the Org Babel environment which allows you to work with 791Org mode contains the Org Babel environment which allows you to work with
771embedded source code blocks in a file, to facilitate code evaluation, 792embedded source code blocks in a file, to facilitate code evaluation,
772documentation, and tangling. 793documentation, and literate programming techniques.
773 794
774Org's automatic, context-sensitive table editor with spreadsheet 795Org's automatic, context-sensitive table editor with spreadsheet
775capabilities can be integrated into any major mode by activating the 796capabilities can be integrated into any major mode by activating the
@@ -803,6 +824,11 @@ version of Org, as well as additional information, frequently asked
803questions (FAQ), links to tutorials, etc@. This page is located at 824questions (FAQ), links to tutorials, etc@. This page is located at
804@uref{http://orgmode.org}. 825@uref{http://orgmode.org}.
805 826
827@cindex print edition
828The version 7.3 of this manual is available as a
829@uref{http://www.network-theory.co.uk/org/manual/, paperback book from Network
830Theory Ltd.}
831
806@page 832@page
807 833
808 834
@@ -813,7 +839,9 @@ questions (FAQ), links to tutorials, etc@. This page is located at
813 839
814@b{Important:} @i{If you are using a version of Org that is part of the Emacs 840@b{Important:} @i{If you are using a version of Org that is part of the Emacs
815distribution or an XEmacs package, please skip this section and go directly 841distribution or an XEmacs package, please skip this section and go directly
816to @ref{Activation}.} 842to @ref{Activation}. To see what version of Org (if any) is part of your
843Emacs distribution, type @kbd{M-x load-library RET org} and then @kbd{M-x
844org-version}.}
817 845
818If you have downloaded Org from the Web, either as a distribution @file{.zip} 846If you have downloaded Org from the Web, either as a distribution @file{.zip}
819or @file{.tar} file, or as a Git archive, you must take the following steps 847or @file{.tar} file, or as a Git archive, you must take the following steps
@@ -852,15 +880,21 @@ make install
852@end example 880@end example
853 881
854Installing Info files is system dependent, because of differences in the 882Installing Info files is system dependent, because of differences in the
855@file{install-info} program. In Debian it copies the info files into the 883@file{install-info} program. The following should correctly install the Info
856correct directory and modifies the info directory file. In many other 884files on most systems, please send a bug report if not@footnote{The output
857systems, the files need to be copied to the correct directory separately, and 885from install-info (if any) is also system dependent. In particular Debian
858@file{install-info} then only modifies the directory file. Check your system 886and its derivatives use two different versions of install-info and you may
859documentation to find out which of the following commands you need: 887see the message:
888
889@example
890This is not dpkg install-info anymore, but GNU install-info
891See the man page for ginstall-info for command line arguments
892@end example
893
894@noindent which can be safely ignored.}.
860 895
861@example 896@example
862make install-info 897make install-info
863make install-info-debian
864@end example 898@end example
865 899
866Then add the following line to @file{.emacs}. It is needed so that 900Then add the following line to @file{.emacs}. It is needed so that
@@ -880,28 +914,27 @@ Do not forget to activate Org as described in the following section.
880@cindex global key bindings 914@cindex global key bindings
881@cindex key bindings, global 915@cindex key bindings, global
882 916
883Add the following lines to your @file{.emacs} file. The last three lines 917To make sure files with extension @file{.org} use Org mode, add the following
884define @emph{global} keys for the commands @command{org-store-link}, 918line to your @file{.emacs} file.
885@command{org-agenda}, and @command{org-iswitchb}---please choose suitable
886keys yourself.
887
888@lisp 919@lisp
889;; The following lines are always needed. Choose your own keys.
890(add-to-list 'auto-mode-alist '("\\.org\\'" . org-mode)) 920(add-to-list 'auto-mode-alist '("\\.org\\'" . org-mode))
921@end lisp
922@noindent Org mode buffers need font-lock to be turned on - this is the
923default in Emacs@footnote{If you don't use font-lock globally, turn it on in
924Org buffer with @code{(add-hook 'org-mode-hook 'turn-on-font-lock)}}.
925
926The four Org commands @command{org-store-link}, @command{org-capture},
927@command{org-agenda}, and @command{org-iswitchb} should be accessible through
928global keys (i.e.@: anywhere in Emacs, not just in Org buffers). Here are
929suggested bindings for these keys, please modify the keys to your own
930liking.
931@lisp
891(global-set-key "\C-cl" 'org-store-link) 932(global-set-key "\C-cl" 'org-store-link)
933(global-set-key "\C-cc" 'org-capture)
892(global-set-key "\C-ca" 'org-agenda) 934(global-set-key "\C-ca" 'org-agenda)
893(global-set-key "\C-cb" 'org-iswitchb) 935(global-set-key "\C-cb" 'org-iswitchb)
894@end lisp 936@end lisp
895 937
896Furthermore, you must activate @code{font-lock-mode} in Org
897buffers, because significant functionality depends on font-locking being
898active. You can do this with either one of the following two lines
899(XEmacs users must use the second option):
900@lisp
901(global-font-lock-mode 1) ; for all buffers
902(add-hook 'org-mode-hook 'turn-on-font-lock) ; Org buffers only
903@end lisp
904
905@cindex Org-mode, turning on 938@cindex Org-mode, turning on
906With this setup, all files with extension @samp{.org} will be put 939With this setup, all files with extension @samp{.org} will be put
907into Org-mode. As an alternative, make the first line of a file look 940into Org-mode. As an alternative, make the first line of a file look
@@ -1183,6 +1216,8 @@ but without affecting visibility in that buffer.}. With a numeric
1183prefix argument N, go up to level N and then take that tree. If N is 1216prefix argument N, go up to level N and then take that tree. If N is
1184negative then go up that many levels. With a @kbd{C-u} prefix, do not remove 1217negative then go up that many levels. With a @kbd{C-u} prefix, do not remove
1185the previously used indirect buffer. 1218the previously used indirect buffer.
1219@orgcmd{C-c C-x v,org-copy-visible}
1220Copy the @i{visible} text in the region into the kill ring.
1186@end table 1221@end table
1187 1222
1188@vindex org-startup-folded 1223@vindex org-startup-folded
@@ -1192,7 +1227,7 @@ the previously used indirect buffer.
1192@cindex @code{showeverything}, STARTUP keyword 1227@cindex @code{showeverything}, STARTUP keyword
1193 1228
1194When Emacs first visits an Org file, the global state is set to 1229When Emacs first visits an Org file, the global state is set to
1195OVERVIEW, i.e. only the top level headlines are visible. This can be 1230OVERVIEW, i.e.@: only the top level headlines are visible. This can be
1196configured through the variable @code{org-startup-folded}, or on a 1231configured through the variable @code{org-startup-folded}, or on a
1197per-file basis by adding one of the following lines anywhere in the 1232per-file basis by adding one of the following lines anywhere in the
1198buffer: 1233buffer:
@@ -1212,7 +1247,7 @@ for this property are @code{folded}, @code{children}, @code{content}, and
1212@code{all}. 1247@code{all}.
1213@table @asis 1248@table @asis
1214@orgcmd{C-u C-u @key{TAB},org-set-startup-visibility} 1249@orgcmd{C-u C-u @key{TAB},org-set-startup-visibility}
1215Switch back to the startup visibility of the buffer, i.e. whatever is 1250Switch back to the startup visibility of the buffer, i.e.@: whatever is
1216requested by startup options and @samp{VISIBILITY} properties in individual 1251requested by startup options and @samp{VISIBILITY} properties in individual
1217entries. 1252entries.
1218@end table 1253@end table
@@ -1273,19 +1308,17 @@ See also the variable @code{org-goto-interface}.
1273@table @asis 1308@table @asis
1274@orgcmd{M-@key{RET},org-insert-heading} 1309@orgcmd{M-@key{RET},org-insert-heading}
1275@vindex org-M-RET-may-split-line 1310@vindex org-M-RET-may-split-line
1276Insert new heading with same level as current. If the cursor is in a 1311Insert new heading with same level as current. If the cursor is in a plain
1277plain list item, a new item is created (@pxref{Plain lists}). To force 1312list item, a new item is created (@pxref{Plain lists}). To force creation of
1278creation of a new headline, use a prefix argument, or first press @key{RET} 1313a new headline, use a prefix argument. When this command is used in the
1279to get to the beginning of the next line. When this command is used in 1314middle of a line, the line is split and the rest of the line becomes the new
1280the middle of a line, the line is split and the rest of the line becomes 1315headline@footnote{If you do not want the line to be split, customize the
1281the new headline@footnote{If you do not want the line to be split, 1316variable @code{org-M-RET-may-split-line}.}. If the command is used at the
1282customize the variable @code{org-M-RET-may-split-line}.}. If the 1317beginning of a headline, the new headline is created before the current line.
1283command is used at the beginning of a headline, the new headline is 1318If at the beginning of any other line, the content of that line is made the
1284created before the current line. If at the beginning of any other line, 1319new heading. If the command is used at the end of a folded subtree (i.e.@:
1285the content of that line is made the new heading. If the command is 1320behind the ellipses at the end of a headline), then a headline like the
1286used at the end of a folded subtree (i.e. behind the ellipses at the end 1321current one will be inserted after the end of the subtree.
1287of a headline), then a headline like the current one will be inserted
1288after the end of the subtree.
1289@orgcmd{C-@key{RET},org-insert-heading-respect-content} 1322@orgcmd{C-@key{RET},org-insert-heading-respect-content}
1290Just like @kbd{M-@key{RET}}, except when adding a new heading below the 1323Just like @kbd{M-@key{RET}}, except when adding a new heading below the
1291current heading, the new heading is placed after the body instead of before 1324current heading, the new heading is placed after the body instead of before
@@ -1317,7 +1350,7 @@ level).
1317@orgcmd{M-S-@key{down},org-move-subtree-down} 1350@orgcmd{M-S-@key{down},org-move-subtree-down}
1318Move subtree down (swap with next subtree of same level). 1351Move subtree down (swap with next subtree of same level).
1319@orgcmd{C-c C-x C-w,org-cut-subtree} 1352@orgcmd{C-c C-x C-w,org-cut-subtree}
1320Kill subtree, i.e. remove it from buffer but save in kill ring. 1353Kill subtree, i.e.@: remove it from buffer but save in kill ring.
1321With a numeric prefix argument N, kill N sequential subtrees. 1354With a numeric prefix argument N, kill N sequential subtrees.
1322@orgcmd{C-c C-x M-w,org-copy-subtree} 1355@orgcmd{C-c C-x M-w,org-copy-subtree}
1323Copy subtree to kill ring. With a numeric prefix argument N, copy the N 1356Copy subtree to kill ring. With a numeric prefix argument N, copy the N
@@ -1362,6 +1395,8 @@ sorting will be case-sensitive. With two @kbd{C-u C-u} prefixes, duplicate
1362entries will also be removed. 1395entries will also be removed.
1363@orgcmd{C-x n s,org-narrow-to-subtree} 1396@orgcmd{C-x n s,org-narrow-to-subtree}
1364Narrow buffer to current subtree. 1397Narrow buffer to current subtree.
1398@orgcmd{C-x n b,org-narrow-to-block}
1399Narrow buffer to current block.
1365@orgcmd{C-x n w,widen} 1400@orgcmd{C-x n w,widen}
1366Widen buffer to remove narrowing. 1401Widen buffer to remove narrowing.
1367@orgcmd{C-c *,org-toggle-heading} 1402@orgcmd{C-c *,org-toggle-heading}
@@ -1413,7 +1448,7 @@ commands can be accessed through a dispatcher:
1413This prompts for an extra key to select a sparse-tree creating command. 1448This prompts for an extra key to select a sparse-tree creating command.
1414@orgcmd{C-c / r,org-occur} 1449@orgcmd{C-c / r,org-occur}
1415@vindex org-remove-highlights-with-change 1450@vindex org-remove-highlights-with-change
1416Occur. Prompts for a regexp and shows a sparse tree with all matches. If 1451Prompts for a regexp and shows a sparse tree with all matches. If
1417the match is in a headline, the headline is made visible. If the match is in 1452the match is in a headline, the headline is made visible. If the match is in
1418the body of an entry, headline and body are made visible. In order to 1453the body of an entry, headline and body are made visible. In order to
1419provide minimal context, also the full hierarchy of headlines above the match 1454provide minimal context, also the full hierarchy of headlines above the match
@@ -1423,8 +1458,13 @@ editing command@footnote{This depends on the option
1423@code{org-remove-highlights-with-change}}, or by pressing @kbd{C-c C-c}. 1458@code{org-remove-highlights-with-change}}, or by pressing @kbd{C-c C-c}.
1424When called with a @kbd{C-u} prefix argument, previous highlights are kept, 1459When called with a @kbd{C-u} prefix argument, previous highlights are kept,
1425so several calls to this command can be stacked. 1460so several calls to this command can be stacked.
1461@orgcmdkkc{M-g n,M-g M-n,next-error}
1462Jump to the next sparse tree match in this buffer.
1463@orgcmdkkc{M-g p,M-g M-p,previous-error}
1464Jump to the previous sparse tree match in this buffer.
1426@end table 1465@end table
1427 1466
1467
1428@noindent 1468@noindent
1429@vindex org-agenda-custom-commands 1469@vindex org-agenda-custom-commands
1430For frequently used sparse trees of specific search strings, you can 1470For frequently used sparse trees of specific search strings, you can
@@ -1472,44 +1512,47 @@ Org knows ordered lists, unordered lists, and description lists.
1472@emph{Unordered} list items start with @samp{-}, @samp{+}, or 1512@emph{Unordered} list items start with @samp{-}, @samp{+}, or
1473@samp{*}@footnote{When using @samp{*} as a bullet, lines must be indented or 1513@samp{*}@footnote{When using @samp{*} as a bullet, lines must be indented or
1474they will be seen as top-level headlines. Also, when you are hiding leading 1514they will be seen as top-level headlines. Also, when you are hiding leading
1475stars to get a clean outline view, plain list items starting with a star are 1515stars to get a clean outline view, plain list items starting with a star may
1476visually indistinguishable from true headlines. In short: even though 1516be hard to distinguish from true headlines. In short: even though @samp{*}
1477@samp{*} is supported, it may be better to not use it for plain list items.} 1517is supported, it may be better to not use it for plain list items.} as
1478as bullets. 1518bullets.
1479@item 1519@item
1480@vindex org-plain-list-ordered-item-terminator 1520@vindex org-plain-list-ordered-item-terminator
1521@vindex org-alphabetical-lists
1481@emph{Ordered} list items start with a numeral followed by either a period or 1522@emph{Ordered} list items start with a numeral followed by either a period or
1482a right parenthesis@footnote{You can filter out any of them by configuring 1523a right parenthesis@footnote{You can filter out any of them by configuring
1483@code{org-plain-list-ordered-item-terminator}.}, such as @samp{1.} or 1524@code{org-plain-list-ordered-item-terminator}.}, such as @samp{1.} or
1484@samp{1)}. If you want a list to start with a different value (e.g. 20), start 1525@samp{1)}@footnote{You can also get @samp{a.}, @samp{A.}, @samp{a)} and
1485the text of the item with @code{[@@20]}@footnote{If there's a checkbox in the 1526@samp{A)} by configuring @code{org-alphabetical-lists}. To minimize
1486item, the cookie must be put @emph{before} the checkbox.}. Those constructs 1527confusion with normal text, those are limited to one character only. Beyond
1487can be used in any item of the list in order to enforce a particular 1528that limit, bullets will automatically fallback to numbers.}. If you want a
1488numbering. 1529list to start with a different value (e.g.@: 20), start the text of the item
1530with @code{[@@20]}@footnote{If there's a checkbox in the item, the cookie
1531must be put @emph{before} the checkbox. If you have activated alphabetical
1532lists, you can also use counters like @code{[@@b]}.}. Those constructs can
1533be used in any item of the list in order to enforce a particular numbering.
1489@item 1534@item
1490@emph{Description} list items are unordered list items, and contain the 1535@emph{Description} list items are unordered list items, and contain the
1491separator @samp{ :: } to separate the description @emph{term} from the 1536separator @samp{ :: } to distinguish the description @emph{term} from the
1492description. 1537description.
1493@end itemize 1538@end itemize
1494 1539
1495Items belonging to the same list must have the same indentation on the first 1540Items belonging to the same list must have the same indentation on the first
1496line. In particular, if an ordered list reaches number @samp{10.}, then the 1541line. In particular, if an ordered list reaches number @samp{10.}, then the
14972--digit numbers must be written left-aligned with the other numbers in the 15422--digit numbers must be written left-aligned with the other numbers in the
1498list. 1543list. An item ends before the next line that is less or equally indented
1544than its bullet/number.
1499 1545
1500@vindex org-list-ending-method 1546@vindex org-list-ending-method
1501@vindex org-list-end-regexp 1547@vindex org-list-end-regexp
1502@vindex org-empty-line-terminates-plain-lists 1548@vindex org-empty-line-terminates-plain-lists
1503Two methods@footnote{To disable either of them, configure 1549Two methods@footnote{To disable either of them, configure
1504@code{org-list-ending-method}.} are provided to terminate lists. A list ends 1550@code{org-list-ending-method}.} are provided to terminate lists. A list ends
1505before the next line that is indented like the bullet/number or less, or it 1551whenever every item has ended, which means before any line less or equally
1506ends before two blank lines@footnote{See also 1552indented than items at top level. It also ends before two blank
1507@code{org-empty-line-terminates-plain-lists}.}. In both cases, all levels of 1553lines@footnote{See also @code{org-empty-line-terminates-plain-lists}.}. In
1508the list are closed@footnote{So you cannot have a sublist, some text and then 1554that case, all items are closed. For finer control, you can end lists with
1509another sublist while still in the same top-level list item. This used to be 1555any pattern set in @code{org-list-end-regexp}. Here is an example:
1510possible, but it was only supported in the HTML exporter and difficult to
1511manage with automatic indentation.}. For finer control, you can end lists
1512with any pattern set in @code{org-list-end-regexp}. Here is an example:
1513 1556
1514@example 1557@example
1515@group 1558@group
@@ -1520,8 +1563,8 @@ with any pattern set in @code{org-list-end-regexp}. Here is an example:
1520 + this was already my favorite scene in the book 1563 + this was already my favorite scene in the book
1521 + I really like Miranda Otto. 1564 + I really like Miranda Otto.
1522 3. Peter Jackson being shot by Legolas 1565 3. Peter Jackson being shot by Legolas
1523 He makes a really funny face when it happens.
1524 - on DVD only 1566 - on DVD only
1567 He makes a really funny face when it happens.
1525 But in the end, no individual scenes matter but the film as a whole. 1568 But in the end, no individual scenes matter but the film as a whole.
1526 Important actors in this film are: 1569 Important actors in this film are:
1527 - @b{Elijah Wood} :: He plays Frodo 1570 - @b{Elijah Wood} :: He plays Frodo
@@ -1536,13 +1579,15 @@ XEmacs, you should use Kyle E. Jones' @file{filladapt.el}. To turn this on,
1536put into @file{.emacs}: @code{(require 'filladapt)}}, and by exporting them 1579put into @file{.emacs}: @code{(require 'filladapt)}}, and by exporting them
1537properly (@pxref{Exporting}). Since indentation is what governs the 1580properly (@pxref{Exporting}). Since indentation is what governs the
1538structure of these lists, many structural constructs like @code{#+BEGIN_...} 1581structure of these lists, many structural constructs like @code{#+BEGIN_...}
1539blocks can be indented to signal that they should be considered as a list 1582blocks can be indented to signal that they belong to a particular item.
1540item.
1541 1583
1542@vindex org-list-demote-modify-bullet 1584@vindex org-list-demote-modify-bullet
1585@vindex org-list-indent-offset
1543If you find that using a different bullet for a sub-list (than that used for 1586If you find that using a different bullet for a sub-list (than that used for
1544the current list-level) improves readability, customize the variable 1587the current list-level) improves readability, customize the variable
1545@code{org-list-demote-modify-bullet}. 1588@code{org-list-demote-modify-bullet}. To get a greater difference of
1589indentation between items and theirs sub-items, customize
1590@code{org-list-indent-offset}.
1546 1591
1547@vindex org-list-automatic-rules 1592@vindex org-list-automatic-rules
1548The following commands act on items when the cursor is in the first line of 1593The following commands act on items when the cursor is in the first line of
@@ -1566,16 +1611,11 @@ headlines, however; the hierarchies remain completely separated.
1566@vindex org-list-automatic-rules 1611@vindex org-list-automatic-rules
1567Insert new item at current level. With a prefix argument, force a new 1612Insert new item at current level. With a prefix argument, force a new
1568heading (@pxref{Structure editing}). If this command is used in the middle 1613heading (@pxref{Structure editing}). If this command is used in the middle
1569of a line, the line is @emph{split} and the rest of the line becomes the new 1614of an item, that item is @emph{split} in two, and the second part becomes the
1570item@footnote{If you do not want the line to be split, customize the variable 1615new item@footnote{If you do not want the item to be split, customize the
1571@code{org-M-RET-may-split-line}.}. If this command is executed @emph{before 1616variable @code{org-M-RET-may-split-line}.}. If this command is executed
1572an item's body}, the new item is created @emph{before} the current item. If the 1617@emph{before item's body}, the new item is created @emph{before} the current
1573command is executed in the white space before the text that is part of an 1618one.
1574item but does not contain the bullet, a bullet is added to the current line.
1575
1576As a new item cannot be inserted in a structural construct (like an example
1577or source code block) within a list, Org will instead insert it right before
1578the structure, or return an error.
1579@kindex M-S-@key{RET} 1619@kindex M-S-@key{RET}
1580@item M-S-@key{RET} 1620@item M-S-@key{RET}
1581Insert a new item with a checkbox (@pxref{Checkboxes}). 1621Insert a new item with a checkbox (@pxref{Checkboxes}).
@@ -1589,17 +1629,21 @@ position.
1589@itemx S-@key{down} 1629@itemx S-@key{down}
1590@cindex shift-selection-mode 1630@cindex shift-selection-mode
1591@vindex org-support-shift-select 1631@vindex org-support-shift-select
1592Jump to the previous/next item in the current list, but only if 1632@vindex org-list-use-circular-motion
1633Jump to the previous/next item in the current list@footnote{If you want to
1634cycle around items that way, you may customize
1635@code{org-list-use-circular-motion}.}, but only if
1593@code{org-support-shift-select} is off. If not, you can still use paragraph 1636@code{org-support-shift-select} is off. If not, you can still use paragraph
1594jumping commands like @kbd{C-@key{up}} and @kbd{C-@key{down}} to quite 1637jumping commands like @kbd{C-@key{up}} and @kbd{C-@key{down}} to quite
1595similar effect. 1638similar effect.
1596@kindex M-S-@key{up} 1639@kindex M-@key{up}
1597@kindex M-S-@key{down} 1640@kindex M-@key{down}
1598@item M-S-@key{up} 1641@item M-@key{up}
1599@itemx M-S-@key{down} 1642@itemx M-@key{down}
1600Move the item including subitems up/down (swap with previous/next item 1643Move the item including subitems up/down@footnote{See
1601of same indentation). If the list is ordered, renumbering is 1644@code{org-liste-use-circular-motion} for a cyclic behavior.} (swap with
1602automatic. 1645previous/next item of same indentation). If the list is ordered, renumbering
1646is automatic.
1603@kindex M-@key{left} 1647@kindex M-@key{left}
1604@kindex M-@key{right} 1648@kindex M-@key{right}
1605@item M-@key{left} 1649@item M-@key{left}
@@ -1623,9 +1667,8 @@ influence on the text @emph{after} the list.
1623@kindex C-c C-c 1667@kindex C-c C-c
1624@item C-c C-c 1668@item C-c C-c
1625If there is a checkbox (@pxref{Checkboxes}) in the item line, toggle the 1669If there is a checkbox (@pxref{Checkboxes}) in the item line, toggle the
1626state of the checkbox. Also, makes sure that all the 1670state of the checkbox. In any case, verify bullets and indentation
1627items on this list level use the same bullet and that the numbering of list 1671consistency in the whole list.
1628items (if applicable) is correct.
1629@kindex C-c - 1672@kindex C-c -
1630@vindex org-plain-list-ordered-item-terminator 1673@vindex org-plain-list-ordered-item-terminator
1631@vindex org-list-automatic-rules 1674@vindex org-list-automatic-rules
@@ -1636,14 +1679,20 @@ depending on @code{org-plain-list-ordered-item-terminator}, the type of list,
1636and its position@footnote{See @code{bullet} rule in 1679and its position@footnote{See @code{bullet} rule in
1637@code{org-list-automatic-rules} for more information.}. With a numeric 1680@code{org-list-automatic-rules} for more information.}. With a numeric
1638prefix argument N, select the Nth bullet from this list. If there is an 1681prefix argument N, select the Nth bullet from this list. If there is an
1639active region when calling this, all lines will be converted to list items. 1682active region when calling this, selected text will be changed into an item.
1640If the first line already was a list item, any item markers will be removed 1683With a prefix argument, all lines will be converted to list items. If the
1641from the list. Finally, even without an active region, a normal line will be 1684first line already was a list item, any item marker will be removed from the
1685list. Finally, even without an active region, a normal line will be
1642converted into a list item. 1686converted into a list item.
1643@kindex C-c * 1687@kindex C-c *
1644@item C-c * 1688@item C-c *
1645Turn a plain list item into a headline (so that it becomes a subheading at 1689Turn a plain list item into a headline (so that it becomes a subheading at
1646its location). @xref{Structure editing}, for a detailed explanation. 1690its location). @xref{Structure editing}, for a detailed explanation.
1691@kindex C-c C-*
1692@item C-c C-*
1693Turn the whole plain list into a subtree of the current heading. Checkboxes
1694(@pxref{Checkboxes}) will become TODO (resp. DONE) keywords when unchecked
1695(resp. checked).
1647@kindex S-@key{left} 1696@kindex S-@key{left}
1648@kindex S-@key{right} 1697@kindex S-@key{right}
1649@item S-@key{left}/@key{right} 1698@item S-@key{left}/@key{right}
@@ -1675,7 +1724,7 @@ look like this:
1675** This is a headline 1724** This is a headline
1676 Still outside the drawer 1725 Still outside the drawer
1677 :DRAWERNAME: 1726 :DRAWERNAME:
1678 This is inside the drawer. 1727 This is inside the drawer.
1679 :END: 1728 :END:
1680 After the drawer. 1729 After the drawer.
1681@end example 1730@end example
@@ -1721,7 +1770,7 @@ or on a per-file basis by using
1721Org-mode supports the creation of footnotes. In contrast to the 1770Org-mode supports the creation of footnotes. In contrast to the
1722@file{footnote.el} package, Org-mode's footnotes are designed for work on a 1771@file{footnote.el} package, Org-mode's footnotes are designed for work on a
1723larger document, not only for one-off documents like emails. The basic 1772larger document, not only for one-off documents like emails. The basic
1724syntax is similar to the one used by @file{footnote.el}, i.e. a footnote is 1773syntax is similar to the one used by @file{footnote.el}, i.e.@: a footnote is
1725defined in a paragraph that is started by a footnote marker in square 1774defined in a paragraph that is started by a footnote marker in square
1726brackets in column 0, no indentation allowed. If you need a paragraph break 1775brackets in column 0, no indentation allowed. If you need a paragraph break
1727inside a footnote, use the @LaTeX{} idiom @samp{\par}. The footnote reference 1776inside a footnote, use the @LaTeX{} idiom @samp{\par}. The footnote reference
@@ -1798,7 +1847,7 @@ S @r{Short for first @code{r}, then @code{s} action.}
1798n @r{Normalize the footnotes by collecting all definitions (including} 1847n @r{Normalize the footnotes by collecting all definitions (including}
1799 @r{inline definitions) into a special section, and then numbering them} 1848 @r{inline definitions) into a special section, and then numbering them}
1800 @r{in sequence. The references will then also be numbers. This is} 1849 @r{in sequence. The references will then also be numbers. This is}
1801 @r{meant to be the final step before finishing a document (e.g. sending} 1850 @r{meant to be the final step before finishing a document (e.g.@: sending}
1802 @r{off an email). The exporters do this automatically, and so could} 1851 @r{off an email). The exporters do this automatically, and so could}
1803 @r{something like @code{message-send-hook}.} 1852 @r{something like @code{message-send-hook}.}
1804d @r{Delete the footnote at point, and all definitions of and references} 1853d @r{Delete the footnote at point, and all definitions of and references}
@@ -1831,11 +1880,11 @@ If you like the intuitive way the Org-mode structure editing and list
1831formatting works, you might want to use these commands in other modes like 1880formatting works, you might want to use these commands in other modes like
1832Text mode or Mail mode as well. The minor mode @code{orgstruct-mode} makes 1881Text mode or Mail mode as well. The minor mode @code{orgstruct-mode} makes
1833this possible. Toggle the mode with @kbd{M-x orgstruct-mode}, or 1882this possible. Toggle the mode with @kbd{M-x orgstruct-mode}, or
1834turn it on by default, for example in Mail mode, with one of: 1883turn it on by default, for example in Message mode, with one of:
1835 1884
1836@lisp 1885@lisp
1837(add-hook 'mail-mode-hook 'turn-on-orgstruct) 1886(add-hook 'message-mode-hook 'turn-on-orgstruct)
1838(add-hook 'mail-mode-hook 'turn-on-orgstruct++) 1887(add-hook 'message-mode-hook 'turn-on-orgstruct++)
1839@end lisp 1888@end lisp
1840 1889
1841When this mode is active and the cursor is on a line that looks to Org like a 1890When this mode is active and the cursor is on a line that looks to Org like a
@@ -1875,10 +1924,11 @@ calculator).
1875@section The built-in table editor 1924@section The built-in table editor
1876@cindex table editor, built-in 1925@cindex table editor, built-in
1877 1926
1878Org makes it easy to format tables in plain ASCII. Any line with 1927Org makes it easy to format tables in plain ASCII. Any line with @samp{|} as
1879@samp{|} as the first non-whitespace character is considered part of a 1928the first non-whitespace character is considered part of a table. @samp{|}
1880table. @samp{|} is also the column separator. A table might look like 1929is also the column separator@footnote{To insert a vertical bar into a table
1881this: 1930field, use @code{\vert} or, inside a word @code{abc\vert@{@}def}.}. A table
1931might look like this:
1882 1932
1883@example 1933@example
1884| Name | Phone | Age | 1934| Name | Phone | Age |
@@ -1919,7 +1969,7 @@ unpredictable for you, configure the variables
1919@table @kbd 1969@table @kbd
1920@tsubheading{Creation and conversion} 1970@tsubheading{Creation and conversion}
1921@orgcmd{C-c |,org-table-create-or-convert-from-region} 1971@orgcmd{C-c |,org-table-create-or-convert-from-region}
1922Convert the active region to table. If every line contains at least one 1972Convert the active region to table. If every line contains at least one
1923TAB character, the function assumes that the material is tab separated. 1973TAB character, the function assumes that the material is tab separated.
1924If every line contains a comma, comma-separated values (CSV) are assumed. 1974If every line contains a comma, comma-separated values (CSV) are assumed.
1925If not, lines are split at whitespace into fields. You can use a prefix 1975If not, lines are split at whitespace into fields. You can use a prefix
@@ -1928,7 +1978,7 @@ C-u} forces TAB, and a numeric argument N indicates that at least N
1928consecutive spaces, or alternatively a TAB will be the separator. 1978consecutive spaces, or alternatively a TAB will be the separator.
1929@* 1979@*
1930If there is no active region, this command creates an empty Org 1980If there is no active region, this command creates an empty Org
1931table. But it's easier just to start typing, like 1981table. But it is easier just to start typing, like
1932@kbd{|Name|Phone|Age @key{RET} |- @key{TAB}}. 1982@kbd{|Name|Phone|Age @key{RET} |- @key{TAB}}.
1933 1983
1934@tsubheading{Re-aligning and field motion} 1984@tsubheading{Re-aligning and field motion}
@@ -2043,7 +2093,10 @@ increment. This key is also used by shift-selection and related modes
2043Edit the current field in a separate window. This is useful for fields that 2093Edit the current field in a separate window. This is useful for fields that
2044are not fully visible (@pxref{Column width and alignment}). When called with 2094are not fully visible (@pxref{Column width and alignment}). When called with
2045a @kbd{C-u} prefix, just make the full field visible, so that it can be 2095a @kbd{C-u} prefix, just make the full field visible, so that it can be
2046edited in place. 2096edited in place. When called with two @kbd{C-u} prefixes, make the editor
2097window follow the cursor through the table and always show the current
2098field. The follow mode exits automatically when the cursor leaves the table,
2099or when you repeat this command with @kbd{C-u C-u C-c `}.
2047@c 2100@c
2048@item M-x org-table-import 2101@item M-x org-table-import
2049Import a file as a table. The table should be TAB or whitespace 2102Import a file as a table. The table should be TAB or whitespace
@@ -2187,10 +2240,10 @@ If you like the intuitive way the Org table editor works, you
2187might also want to use it in other modes like Text mode or Mail mode. 2240might also want to use it in other modes like Text mode or Mail mode.
2188The minor mode Orgtbl mode makes this possible. You can always toggle 2241The minor mode Orgtbl mode makes this possible. You can always toggle
2189the mode with @kbd{M-x orgtbl-mode}. To turn it on by default, for 2242the mode with @kbd{M-x orgtbl-mode}. To turn it on by default, for
2190example in mail mode, use 2243example in Message mode, use
2191 2244
2192@lisp 2245@lisp
2193(add-hook 'mail-mode-hook 'turn-on-orgtbl) 2246(add-hook 'message-mode-hook 'turn-on-orgtbl)
2194@end lisp 2247@end lisp
2195 2248
2196Furthermore, with some special setup, it is possible to maintain tables 2249Furthermore, with some special setup, it is possible to maintain tables
@@ -2219,7 +2272,8 @@ formula, moving these references by arrow keys
2219* References:: How to refer to another field or range 2272* References:: How to refer to another field or range
2220* Formula syntax for Calc:: Using Calc to compute stuff 2273* Formula syntax for Calc:: Using Calc to compute stuff
2221* Formula syntax for Lisp:: Writing formulas in Emacs Lisp 2274* Formula syntax for Lisp:: Writing formulas in Emacs Lisp
2222* Field formulas:: Formulas valid for a single field 2275* Durations and time values:: How to compute durations and time values
2276* Field and range formulas:: Formula for specific (ranges of) fields
2223* Column formulas:: Formulas valid for an entire column 2277* Column formulas:: Formulas valid for an entire column
2224* Editing and debugging formulas:: Fixing formulas 2278* Editing and debugging formulas:: Fixing formulas
2225* Updating the table:: Recomputing all dependent fields 2279* Updating the table:: Recomputing all dependent fields
@@ -2243,35 +2297,42 @@ field, or press @kbd{C-c @}} to toggle the display of a grid.
2243Formulas can reference the value of another field in two ways. Like in 2297Formulas can reference the value of another field in two ways. Like in
2244any other spreadsheet, you may reference fields with a letter/number 2298any other spreadsheet, you may reference fields with a letter/number
2245combination like @code{B3}, meaning the 2nd field in the 3rd row. 2299combination like @code{B3}, meaning the 2nd field in the 3rd row.
2246@c Such references are always fixed to that field, they don't change 2300@vindex org-table-use-standard-references
2247@c when you copy and paste a formula to a different field. So 2301However, Org prefers@footnote{Org will understand references typed by the
2248@c Org's @code{B3} behaves like @code{$B$3} in other spreadsheets. 2302user as @samp{B4}, but it will not use this syntax when offering a formula
2249 2303for editing. You can customize this behavior using the variable
2250@noindent 2304@code{org-table-use-standard-references}.} to use another, more general
2251Org also uses another, more general operator that looks like this: 2305representation that looks like this:
2252@example 2306@example
2253@@@var{row}$@var{column} 2307@@@var{row}$@var{column}
2254@end example 2308@end example
2255 2309
2256@noindent 2310Column specifications can be absolute like @code{$1},
2257Column references can be absolute like @samp{1}, @samp{2},...@samp{@var{N}}, 2311@code{$2},...@code{$@var{N}}, or relative to the current column (i.e.@: the
2258or relative to the current column like @samp{+1} or @samp{-2}. 2312column of the field which is being computed) like @code{$+1} or @code{$-2}.
2259 2313@code{$<} and @code{$>} are immutable references to the first and last
2260The row specification only counts data lines and ignores horizontal 2314column, respectively, and you can use @code{$>>>} to indicate the third
2261separator lines (hlines). You can use absolute row numbers 2315column from the right.
2262@samp{1}...@samp{@var{N}}, and row numbers relative to the current row like 2316
2263@samp{+3} or @samp{-1}. Or specify the row relative to one of the 2317The row specification only counts data lines and ignores horizontal separator
2264hlines: @samp{I} refers to the first hline@footnote{Note that only 2318lines (hlines). Like with columns, you can use absolute row numbers
2265hlines are counted that @emph{separate} table lines. If the table 2319@code{@@1}, @code{@@2},...@code{@@@var{N}}, and row numbers relative to the
2266starts with a hline above the header, it does not count.}, @samp{II} to 2320current row like @code{@@+3} or @code{@@-1}. @code{@@<} and @code{@@>} are
2267the second, etc@. @samp{-I} refers to the first such line above the 2321immutable references the first and last@footnote{For backward compatibility
2268current line, @samp{+I} to the first such line below the current line. 2322you can also use special names like @code{$LR5} and @code{$LR12} to refer in
2269You can also write @samp{III+2} which is the second data line after the 2323a stable way to the 5th and 12th field in the last row of the table.
2270third hline in the table. 2324However, this syntax is deprecated, it should not be used for new documents.
2271 2325Use @code{@@>$} instead.} row in the table, respectively. You may also
2272@samp{0} refers to the current row and column. Also, if you omit 2326specify the row relative to one of the hlines: @code{@@I} refers to the first
2273either the column or the row part of the reference, the current 2327hline, @code{@@II} to the second, etc@. @code{@@-I} refers to the first such
2274row/column is implied. 2328line above the current line, @code{@@+I} to the first such line below the
2329current line. You can also write @code{@@III+2} which is the second data line
2330after the third hline in the table.
2331
2332@code{@@0} and @code{$0} refer to the current row and column, respectively,
2333i.e. to the row/column for the field being computed. Also, if you omit
2334either the column or the row part of the reference, the current row/column is
2335implied.
2275 2336
2276Org's references with @emph{unsigned} numbers are fixed references 2337Org's references with @emph{unsigned} numbers are fixed references
2277in the sense that if you use the same reference in the formula for two 2338in the sense that if you use the same reference in the formula for two
@@ -2280,20 +2341,15 @@ Org's references with @emph{signed} numbers are floating
2280references because the same reference operator can reference different 2341references because the same reference operator can reference different
2281fields depending on the field being calculated by the formula. 2342fields depending on the field being calculated by the formula.
2282 2343
2283As a special case, references like @samp{$LR5} and @samp{$LR12} can be used
2284to refer in a stable way to the 5th and 12th field in the last row of the
2285table.
2286
2287Here are a few examples: 2344Here are a few examples:
2288 2345
2289@example 2346@example
2290@@2$3 @r{2nd row, 3rd column} 2347@@2$3 @r{2nd row, 3rd column (same as @code{C2})}
2291C2 @r{same as previous} 2348$5 @r{column 5 in the current row (same as @code{E&})}
2292$5 @r{column 5 in the current row}
2293E& @r{same as previous}
2294@@2 @r{current column, row 2} 2349@@2 @r{current column, row 2}
2295@@-1$-3 @r{the field one row up, three columns to the left} 2350@@-1$-3 @r{the field one row up, three columns to the left}
2296@@-I$2 @r{field just under hline above current row, column 2} 2351@@-I$2 @r{field just under hline above current row, column 2}
2352@@>$5 @r{field in the last row, in column 5}
2297@end example 2353@end example
2298 2354
2299@subsubheading Range references 2355@subsubheading Range references
@@ -2308,11 +2364,12 @@ format at least for the first field (i.e the reference must start with
2308@samp{@@} in order to be interpreted correctly). Examples: 2364@samp{@@} in order to be interpreted correctly). Examples:
2309 2365
2310@example 2366@example
2311$1..$3 @r{First three fields in the current row.} 2367$1..$3 @r{first three fields in the current row}
2312$P..$Q @r{Range, using column names (see under Advanced)} 2368$P..$Q @r{range, using column names (see under Advanced)}
2313@@2$1..@@4$3 @r{6 fields between these two fields.} 2369$<<<..$>> @r{start in third column, continue to the one but last}
2314A2..C4 @r{Same as above.} 2370@@2$1..@@4$3 @r{6 fields between these two fields (same as @code{A2..C4})}
2315@@-1$-2..@@-1 @r{3 numbers from the column to the left, 2 up to current row} 2371@@-1$-2..@@-1 @r{3 numbers from the column to the left, 2 up to current row}
2372@@I..II @r{between first and second hline, short for @code{@@I..@@II}}
2316@end example 2373@end example
2317 2374
2318@noindent Range references return a vector of values that can be fed 2375@noindent Range references return a vector of values that can be fed
@@ -2339,7 +2396,7 @@ $3 = remote(FOO, @@@@#$2) @r{copy column 2 from table FOO into}
2339@end example 2396@end example
2340 2397
2341@noindent For the second example, table FOO must have at least as many rows 2398@noindent For the second example, table FOO must have at least as many rows
2342as the current table. Inefficient@footnote{The computation time scales as 2399as the current table. Note that this is inefficient@footnote{The computation time scales as
2343O(N^2) because table FOO is parsed for each field to be copied.} for large 2400O(N^2) because table FOO is parsed for each field to be copied.} for large
2344number of rows. 2401number of rows.
2345 2402
@@ -2440,7 +2497,6 @@ n3 s3 e2 f4 @r{Normal, scientific, engineering, or fixed}
2440D R @r{angle modes: degrees, radians} 2497D R @r{angle modes: degrees, radians}
2441F S @r{fraction and symbolic modes} 2498F S @r{fraction and symbolic modes}
2442N @r{interpret all fields as numbers, use 0 for non-numbers} 2499N @r{interpret all fields as numbers, use 0 for non-numbers}
2443T @r{force text interpretation}
2444E @r{keep empty fields in ranges} 2500E @r{keep empty fields in ranges}
2445L @r{literal} 2501L @r{literal}
2446@end example 2502@end example
@@ -2474,10 +2530,13 @@ taylor($3,x=7,2) @r{Taylor series of $3, at x=7, second degree}
2474Calc also contains a complete set of logical operations. For example 2530Calc also contains a complete set of logical operations. For example
2475 2531
2476@example 2532@example
2477if($1<20,teen,string("")) @r{``teen'' if age $1 less than 20, else empty} 2533if($1<20,teen,string("")) @r{"teen" if age $1 less than 20, else empty}
2478@end example 2534@end example
2479 2535
2480@node Formula syntax for Lisp, Field formulas, Formula syntax for Calc, The spreadsheet 2536Note that you can also use two org-specific flags @code{T} and @code{t} for
2537durations computations @ref{Durations and time values}.
2538
2539@node Formula syntax for Lisp, Durations and time values, Formula syntax for Calc, The spreadsheet
2481@subsection Emacs Lisp forms as formulas 2540@subsection Emacs Lisp forms as formulas
2482@cindex Lisp forms, as table formulas 2541@cindex Lisp forms, as table formulas
2483 2542
@@ -2496,7 +2555,7 @@ you provide the @samp{L} flag, all fields will be interpolated literally,
2496without quotes. I.e., if you want a reference to be interpreted as a string 2555without quotes. I.e., if you want a reference to be interpreted as a string
2497by the Lisp form, enclose the reference operator itself in double-quotes, 2556by the Lisp form, enclose the reference operator itself in double-quotes,
2498like @code{"$3"}. Ranges are inserted as space-separated fields, so you can 2557like @code{"$3"}. Ranges are inserted as space-separated fields, so you can
2499+embed them in list or vector syntax. Here are a few examples---note how the 2558embed them in list or vector syntax. Here are a few examples---note how the
2500@samp{N} mode is used when we do computations in Lisp: 2559@samp{N} mode is used when we do computations in Lisp:
2501 2560
2502@example 2561@example
@@ -2508,31 +2567,64 @@ like @code{"$3"}. Ranges are inserted as space-separated fields, so you can
2508 '(apply '+ '($1..$4));N 2567 '(apply '+ '($1..$4));N
2509@end example 2568@end example
2510 2569
2511@node Field formulas, Column formulas, Formula syntax for Lisp, The spreadsheet 2570@node Durations and time values, Field and range formulas, Formula syntax for Lisp, The spreadsheet
2512@subsection Field formulas 2571@subsection Durations and time values
2572@cindex Duration, computing
2573@cindex Time, computing
2574@vindex org-table-duration-custom-format
2575
2576If you want to compute time values use the @code{T} flag, either in Calc
2577formulas or Elisp formulas:
2578
2579@example
2580@group
2581 | Task 1 | Task 2 | Total |
2582 |---------+----------+----------|
2583 | 2:12 | 1:47 | 03:59:00 |
2584 | 3:02:20 | -2:07:00 | 0.92 |
2585 #+TBLFM: @@2$3=$1+$2;T::@@3$3=$1+$2;t
2586@end group
2587@end example
2588
2589Input duration values must be of the form @code{[HH:MM[:SS]}, where seconds
2590are optional. With the @code{T} flag, computed durations will be displayed
2591as @code{[HH:MM:SS} (see the first formula above). With the @code{t} flag,
2592computed durations will be displayed according to the value of the variable
2593@code{org-table-duration-custom-format}, which defaults to @code{'hours} and
2594will display the result as a fraction of hours (see the second formula in the
2595example above).
2596
2597Negative duration values can be manipulated as well, and integers will be
2598considered as seconds in addition and subtraction.
2599
2600@node Field and range formulas, Column formulas, Durations and time values, The spreadsheet
2601@subsection Field and range formulas
2513@cindex field formula 2602@cindex field formula
2603@cindex range formula
2514@cindex formula, for individual table field 2604@cindex formula, for individual table field
2605@cindex formula, for range of fields
2515 2606
2516To assign a formula to a particular field, type it directly into the 2607To assign a formula to a particular field, type it directly into the field,
2517field, preceded by @samp{:=}, for example @samp{:=$1+$2}. When you 2608preceded by @samp{:=}, for example @samp{:=vsum(@@II..III)}. When you press
2518press @key{TAB} or @key{RET} or @kbd{C-c C-c} with the cursor still in 2609@key{TAB} or @key{RET} or @kbd{C-c C-c} with the cursor still in the field,
2519the field, the formula will be stored as the formula for this field, 2610the formula will be stored as the formula for this field, evaluated, and the
2520evaluated, and the current field replaced with the result. 2611current field will be replaced with the result.
2521 2612
2522@cindex #+TBLFM 2613@cindex #+TBLFM
2523Formulas are stored in a special line starting with @samp{#+TBLFM:} 2614Formulas are stored in a special line starting with @samp{#+TBLFM:} directly
2524directly below the table. If you type the equation in the 4th field of 2615below the table. If you type the equation in the 4th field of the 3rd data
2525the 3rd data line in the table, the formula will look like 2616line in the table, the formula will look like @samp{@@3$4=$1+$2}. When
2526@samp{@@3$4=$1+$2}. When inserting/deleting/swapping column and rows 2617inserting/deleting/swapping column and rows with the appropriate commands,
2527with the appropriate commands, @i{absolute references} (but not relative 2618@i{absolute references} (but not relative ones) in stored formulas are
2528ones) in stored formulas are modified in order to still reference the 2619modified in order to still reference the same field. To avoid this from
2529same field. Of course this is not true if you edit the table structure 2620happening, in particular in range references, anchor ranges at the table
2530with normal editing commands---then you must fix the equations yourself. 2621borders (using @code{@@<}, @code{@@>}, @code{$<}, @code{$>}), or at hlines
2531The left-hand side of a formula may also be a named field (@pxref{Advanced 2622using the @code{@@I} notation. Automatic adaptation of field references does
2532features}), or a last-row reference like @samp{$LR3}. 2623of cause not happen if you edit the table structure with normal editing
2533 2624commands---then you must fix the equations yourself.
2534Instead of typing an equation into the field, you may also use the 2625
2535following command 2626Instead of typing an equation into the field, you may also use the following
2627command
2536 2628
2537@table @kbd 2629@table @kbd
2538@orgcmd{C-u C-c =,org-table-eval-formula} 2630@orgcmd{C-u C-c =,org-table-eval-formula}
@@ -2541,17 +2633,38 @@ formula with default taken from the @samp{#+TBLFM:} line, applies
2541it to the current field, and stores it. 2633it to the current field, and stores it.
2542@end table 2634@end table
2543 2635
2544@node Column formulas, Editing and debugging formulas, Field formulas, The spreadsheet 2636The left-hand side of a formula can also be a special expression in order to
2637assign the formula to a number of different fields. There is no keyboard
2638shortcut to enter such range formulas. To add them, use the formula editor
2639(@pxref{Editing and debugging formulas}) or edit the @code{#+TBLFM:} line
2640directly.
2641
2642@table @code
2643@item $2=
2644Column formula, valid for the entire column. This is so common that Org
2645treats these formulas in a special way, see @ref{Column formulas}.
2646@item @@3=
2647Row formula, applies to all fields in the specified row. @code{@@>=} means
2648the last row.
2649@item @@1$2..@@4$3=
2650Range formula, applies to all fields in the given rectangular range. This
2651can also be used to assign a formula to some but not all fields in a row.
2652@item $name=
2653Named field, see @ref{Advanced features}.
2654@end table
2655
2656@node Column formulas, Editing and debugging formulas, Field and range formulas, The spreadsheet
2545@subsection Column formulas 2657@subsection Column formulas
2546@cindex column formula 2658@cindex column formula
2547@cindex formula, for table column 2659@cindex formula, for table column
2548 2660
2549Often in a table, the same formula should be used for all fields in a 2661When you assign a formula to a simple column reference like @code{$3=}, the
2550particular column. Instead of having to copy the formula to all fields 2662same formula will be used in all fields of that column, with the following
2551in that column, Org allows you to assign a single formula to an entire 2663very convenient exceptions: (i) If the table contains horizontal separator
2552column. If the table contains horizontal separator hlines, everything 2664hlines, everything before the first such line is considered part of the table
2553before the first such line is considered part of the table @emph{header} 2665@emph{header} and will not be modified by column formulas. (ii) Fields that
2554and will not be modified by column formulas. 2666already get a value from a field/range formula will be left alone by column
2667formulas. These conditions make column formulas very easy to use.
2555 2668
2556To assign a formula to a column, type it directly into any field in the 2669To assign a formula to a column, type it directly into any field in the
2557column, preceded by an equal sign, like @samp{=$1+$2}. When you press 2670column, preceded by an equal sign, like @samp{=$1+$2}. When you press
@@ -2560,9 +2673,9 @@ the formula will be stored as the formula for the current column, evaluated
2560and the current field replaced with the result. If the field contains only 2673and the current field replaced with the result. If the field contains only
2561@samp{=}, the previously stored formula for this column is used. For each 2674@samp{=}, the previously stored formula for this column is used. For each
2562column, Org will only remember the most recently used formula. In the 2675column, Org will only remember the most recently used formula. In the
2563@samp{#+TBLFM:} line, column formulas will look like @samp{$4=$1+$2}. The left-hand 2676@samp{#+TBLFM:} line, column formulas will look like @samp{$4=$1+$2}. The
2564side of a column formula cannot currently be the name of column, it 2677left-hand side of a column formula can not be the name of column, it must be
2565must be the numeric column reference. 2678the numeric column reference or @code{$>}.
2566 2679
2567Instead of typing an equation into the field, you may also use the 2680Instead of typing an equation into the field, you may also use the
2568following command: 2681following command:
@@ -2572,7 +2685,7 @@ following command:
2572Install a new formula for the current column and replace current field with 2685Install a new formula for the current column and replace current field with
2573the result of the formula. The command prompts for a formula, with default 2686the result of the formula. The command prompts for a formula, with default
2574taken from the @samp{#+TBLFM} line, applies it to the current field and 2687taken from the @samp{#+TBLFM} line, applies it to the current field and
2575stores it. With a numeric prefix argument(e.g. @kbd{C-5 C-c =}) the command 2688stores it. With a numeric prefix argument(e.g.@: @kbd{C-5 C-c =}) the command
2576will apply it to that many consecutive fields in the current column. 2689will apply it to that many consecutive fields in the current column.
2577@end table 2690@end table
2578 2691
@@ -2593,7 +2706,7 @@ if possible. If you prefer to only work with the internal format (like
2593@table @kbd 2706@table @kbd
2594@orgcmdkkc{C-c =,C-u C-c =,org-table-eval-formula} 2707@orgcmdkkc{C-c =,C-u C-c =,org-table-eval-formula}
2595Edit the formula associated with the current column/field in the 2708Edit the formula associated with the current column/field in the
2596minibuffer. See @ref{Column formulas}, and @ref{Field formulas}. 2709minibuffer. See @ref{Column formulas}, and @ref{Field and range formulas}.
2597@orgcmd{C-u C-u C-c =,org-table-eval-formula} 2710@orgcmd{C-u C-u C-c =,org-table-eval-formula}
2598Re-insert the active formula (either a 2711Re-insert the active formula (either a
2599field formula, or a column formula) into the current field, so that you 2712field formula, or a column formula) into the current field, so that you
@@ -2696,7 +2809,7 @@ following commands:
2696@table @kbd 2809@table @kbd
2697@orgcmd{C-c *,org-table-recalculate} 2810@orgcmd{C-c *,org-table-recalculate}
2698Recalculate the current row by first applying the stored column formulas 2811Recalculate the current row by first applying the stored column formulas
2699from left to right, and all field formulas in the current row. 2812from left to right, and all field/range formulas in the current row.
2700@c 2813@c
2701@kindex C-u C-c * 2814@kindex C-u C-c *
2702@item C-u C-c * 2815@item C-u C-c *
@@ -2724,6 +2837,7 @@ dependencies.
2724If you want the recalculation of fields to happen automatically, or if 2837If you want the recalculation of fields to happen automatically, or if
2725you want to be able to assign @i{names} to fields and columns, you need 2838you want to be able to assign @i{names} to fields and columns, you need
2726to reserve the first column of the table for special marking characters. 2839to reserve the first column of the table for special marking characters.
2840
2727@table @kbd 2841@table @kbd
2728@orgcmd{C-#,org-table-rotate-recalc-marks} 2842@orgcmd{C-#,org-table-rotate-recalc-marks}
2729Rotate the calculation mark in first column through the states @samp{ }, 2843Rotate the calculation mark in first column through the states @samp{ },
@@ -2849,7 +2963,7 @@ Further control over the labels, type, content, and appearance of plots can
2849be exercised through the @code{#+PLOT:} lines preceding a table. See below 2963be exercised through the @code{#+PLOT:} lines preceding a table. See below
2850for a complete list of Org-plot options. For more information and examples 2964for a complete list of Org-plot options. For more information and examples
2851see the Org-plot tutorial at 2965see the Org-plot tutorial at
2852@uref{http://orgmode.org/worg/org-tutorials/org-plot.php}. 2966@uref{http://orgmode.org/worg/org-tutorials/org-plot.html}.
2853 2967
2854@subsubheading Plot Options 2968@subsubheading Plot Options
2855 2969
@@ -2874,7 +2988,7 @@ Specify whether the plot will be @code{2d}, @code{3d}, or @code{grid}.
2874 2988
2875@item with 2989@item with
2876Specify a @code{with} option to be inserted for every col being plotted 2990Specify a @code{with} option to be inserted for every col being plotted
2877(e.g. @code{lines}, @code{points}, @code{boxes}, @code{impulses}, etc...). 2991(e.g.@: @code{lines}, @code{points}, @code{boxes}, @code{impulses}, etc...).
2878Defaults to @code{lines}. 2992Defaults to @code{lines}.
2879 2993
2880@item file 2994@item file
@@ -2976,7 +3090,7 @@ or with a mouse click (@pxref{Handling links}). Links to custom IDs will
2976point to the corresponding headline. The preferred match for a text link is 3090point to the corresponding headline. The preferred match for a text link is
2977a @i{dedicated target}: the same string in double angular brackets. Targets 3091a @i{dedicated target}: the same string in double angular brackets. Targets
2978may be located anywhere; sometimes it is convenient to put them into a 3092may be located anywhere; sometimes it is convenient to put them into a
2979comment line. For example 3093comment line. For example
2980 3094
2981@example 3095@example
2982# <<My Target>> 3096# <<My Target>>
@@ -3076,12 +3190,14 @@ gnus:group @r{Gnus group link}
3076gnus:group#id @r{Gnus article link} 3190gnus:group#id @r{Gnus article link}
3077bbdb:R.*Stallman @r{BBDB link (with regexp)} 3191bbdb:R.*Stallman @r{BBDB link (with regexp)}
3078irc:/irc.com/#emacs/bob @r{IRC link} 3192irc:/irc.com/#emacs/bob @r{IRC link}
3079info:org:External%20links @r{Info node link (with encoded space)} 3193info:org#External%20links @r{Info node link (with encoded space)}
3080shell:ls *.org @r{A shell command} 3194shell:ls *.org @r{A shell command}
3081elisp:org-agenda @r{Interactive Elisp command} 3195elisp:org-agenda @r{Interactive Elisp command}
3082elisp:(find-file-other-frame "Elisp.org") @r{Elisp form to evaluate} 3196elisp:(find-file-other-frame "Elisp.org") @r{Elisp form to evaluate}
3083@end example 3197@end example
3084 3198
3199For customizing Org to add new link types @ref{Adding hyperlink types}.
3200
3085A link should be enclosed in double brackets and may contain a 3201A link should be enclosed in double brackets and may contain a
3086descriptive text to be displayed instead of the URL (@pxref{Link 3202descriptive text to be displayed instead of the URL (@pxref{Link
3087format}), for example: 3203format}), for example:
@@ -3123,7 +3239,9 @@ buffer:
3123@b{Org-mode buffers}@* 3239@b{Org-mode buffers}@*
3124For Org files, if there is a @samp{<<target>>} at the cursor, the link points 3240For Org files, if there is a @samp{<<target>>} at the cursor, the link points
3125to the target. Otherwise it points to the current headline, which will also 3241to the target. Otherwise it points to the current headline, which will also
3126be the description. 3242be the description@footnote{If the headline contains a timestamp, it will be
3243removed from the link and result in a wrong link -- you should avoid putting
3244timestamp in the headline.}.
3127 3245
3128@vindex org-link-to-org-use-id 3246@vindex org-link-to-org-use-id
3129@cindex property, CUSTOM_ID 3247@cindex property, CUSTOM_ID
@@ -3261,7 +3379,7 @@ variable @code{org-display-internal-link-with-indirect-buffer}}.
3261@cindex @code{inlineimages}, STARTUP keyword 3379@cindex @code{inlineimages}, STARTUP keyword
3262@cindex @code{noinlineimages}, STARTUP keyword 3380@cindex @code{noinlineimages}, STARTUP keyword
3263Toggle the inline display of linked images. Normally this will only inline 3381Toggle the inline display of linked images. Normally this will only inline
3264images that have no description part in the link, i.e. images that will also 3382images that have no description part in the link, i.e.@: images that will also
3265be inlined during export. When called with a prefix argument, also display 3383be inlined during export. When called with a prefix argument, also display
3266images that do have a link description. You can ask for inline images to be 3384images that do have a link description. You can ask for inline images to be
3267displayed at startup by configuring the variable 3385displayed at startup by configuring the variable
@@ -3270,7 +3388,7 @@ displayed at startup by configuring the variable
3270@orgcmd{C-c %,org-mark-ring-push} 3388@orgcmd{C-c %,org-mark-ring-push}
3271@cindex mark ring 3389@cindex mark ring
3272Push the current position onto the mark ring, to be able to return 3390Push the current position onto the mark ring, to be able to return
3273easily. Commands following an internal link do this automatically. 3391easily. Commands following an internal link do this automatically.
3274@c 3392@c
3275@orgcmd{C-c &,org-mark-ring-goto} 3393@orgcmd{C-c &,org-mark-ring-goto}
3276@cindex links, returning to 3394@cindex links, returning to
@@ -3288,8 +3406,8 @@ to @kbd{C-n} and @kbd{C-p}
3288@lisp 3406@lisp
3289(add-hook 'org-load-hook 3407(add-hook 'org-load-hook
3290 (lambda () 3408 (lambda ()
3291 (define-key 'org-mode-map "\C-n" 'org-next-link) 3409 (define-key org-mode-map "\C-n" 'org-next-link)
3292 (define-key 'org-mode-map "\C-p" 'org-previous-link))) 3410 (define-key org-mode-map "\C-p" 'org-previous-link)))
3293@end lisp 3411@end lisp
3294@end table 3412@end table
3295 3413
@@ -3363,7 +3481,7 @@ can define them in the file with
3363@noindent 3481@noindent
3364In-buffer completion (@pxref{Completion}) can be used after @samp{[} to 3482In-buffer completion (@pxref{Completion}) can be used after @samp{[} to
3365complete link abbreviations. You may also define a function 3483complete link abbreviations. You may also define a function
3366@code{org-PREFIX-complete-link} that implements special (e.g. completion) 3484@code{org-PREFIX-complete-link} that implements special (e.g.@: completion)
3367support for inserting such a link with @kbd{C-c C-l}. Such a function should 3485support for inserting such a link with @kbd{C-c C-l}. Such a function should
3368not accept any arguments, and return the full link with prefix. 3486not accept any arguments, and return the full link with prefix.
3369 3487
@@ -3375,7 +3493,7 @@ not accept any arguments, and return the full link with prefix.
3375File links can contain additional information to make Emacs jump to a 3493File links can contain additional information to make Emacs jump to a
3376particular location in the file when following a link. This can be a 3494particular location in the file when following a link. This can be a
3377line number or a search option after a double@footnote{For backward 3495line number or a search option after a double@footnote{For backward
3378compatibility, line numbers can also follow a single colon.} colon. For 3496compatibility, line numbers can also follow a single colon.} colon. For
3379example, when the command @kbd{C-c l} creates a link (@pxref{Handling 3497example, when the command @kbd{C-c l} creates a link (@pxref{Handling
3380links}) to a file, it encodes the words in the current line as a search 3498links}) to a file, it encodes the words in the current line as a search
3381string that can be used to find this line back later when following the 3499string that can be used to find this line back later when following the
@@ -3517,7 +3635,7 @@ entire buffer, but shows all TODO items (with not-DONE state) and the
3517headings hierarchy above them. With a prefix argument (or by using @kbd{C-c 3635headings hierarchy above them. With a prefix argument (or by using @kbd{C-c
3518/ T}), search for a specific TODO. You will be prompted for the keyword, and 3636/ T}), search for a specific TODO. You will be prompted for the keyword, and
3519you can also give a list of keywords like @code{KWD1|KWD2|...} to list 3637you can also give a list of keywords like @code{KWD1|KWD2|...} to list
3520entries that match any one of these keywords. With numeric prefix argument 3638entries that match any one of these keywords. With a numeric prefix argument
3521N, show the tree for the Nth keyword in the variable 3639N, show the tree for the Nth keyword in the variable
3522@code{org-todo-keywords}. With two prefix arguments, find all TODO states, 3640@code{org-todo-keywords}. With two prefix arguments, find all TODO states,
3523both un-done and done. 3641both un-done and done.
@@ -3688,8 +3806,8 @@ key after each keyword, in parentheses. For example:
3688@end lisp 3806@end lisp
3689 3807
3690@vindex org-fast-tag-selection-include-todo 3808@vindex org-fast-tag-selection-include-todo
3691If you then press @code{C-c C-t} followed by the selection key, the entry 3809If you then press @kbd{C-c C-t} followed by the selection key, the entry
3692will be switched to this state. @key{SPC} can be used to remove any TODO 3810will be switched to this state. @kbd{SPC} can be used to remove any TODO
3693keyword from an entry.@footnote{Check also the variable 3811keyword from an entry.@footnote{Check also the variable
3694@code{org-fast-tag-selection-include-todo}, it allows you to change the TODO 3812@code{org-fast-tag-selection-include-todo}, it allows you to change the TODO
3695state through the tags interface (@pxref{Setting tags}), in case you like to 3813state through the tags interface (@pxref{Setting tags}), in case you like to
@@ -3796,7 +3914,7 @@ example:
3796 3914
3797* Parent 3915* Parent
3798 :PROPERTIES: 3916 :PROPERTIES:
3799 :ORDERED: t 3917 :ORDERED: t
3800 :END: 3918 :END:
3801** TODO a 3919** TODO a
3802** TODO b, needs to wait for (a) 3920** TODO b, needs to wait for (a)
@@ -3972,7 +4090,7 @@ called ``habits''. A habit has the following properties:
3972You have enabled the @code{habits} module by customizing the variable 4090You have enabled the @code{habits} module by customizing the variable
3973@code{org-modules}. 4091@code{org-modules}.
3974@item 4092@item
3975The habit is a TODO, with a TODO keyword representing an open state. 4093The habit is a TODO item, with a TODO keyword representing an open state.
3976@item 4094@item
3977The property @code{STYLE} is set to the value @code{habit}. 4095The property @code{STYLE} is set to the value @code{habit}.
3978@item 4096@item
@@ -3986,8 +4104,8 @@ syntax @samp{.+2d/3d}, which says that you want to do the task at least every
3986three days, but at most every two days. 4104three days, but at most every two days.
3987@item 4105@item
3988You must also have state logging for the @code{DONE} state enabled, in order 4106You must also have state logging for the @code{DONE} state enabled, in order
3989for historical data to be represented in the consistency graph. If it's not 4107for historical data to be represented in the consistency graph. If it is not
3990enabled it's not an error, but the consistency graphs will be largely 4108enabled it is not an error, but the consistency graphs will be largely
3991meaningless. 4109meaningless.
3992@end enumerate 4110@end enumerate
3993 4111
@@ -4045,7 +4163,7 @@ habits are displayed in the agenda.
4045@table @code 4163@table @code
4046@item org-habit-graph-column 4164@item org-habit-graph-column
4047The buffer column at which the consistency graph should be drawn. This will 4165The buffer column at which the consistency graph should be drawn. This will
4048overwrite any text in that column, so it's a good idea to keep your habits' 4166overwrite any text in that column, so it is a good idea to keep your habits'
4049titles brief and to the point. 4167titles brief and to the point.
4050@item org-habit-preceding-days 4168@item org-habit-preceding-days
4051The amount of history, in days before today, to appear in consistency graphs. 4169The amount of history, in days before today, to appear in consistency graphs.
@@ -4186,7 +4304,7 @@ large number of subtasks (@pxref{Checkboxes}).
4186 4304
4187@vindex org-list-automatic-rules 4305@vindex org-list-automatic-rules
4188Every item in a plain list@footnote{With the exception of description 4306Every item in a plain list@footnote{With the exception of description
4189lists. But you can allow it by modifying @code{org-list-automatic-rules} 4307lists. But you can allow it by modifying @code{org-list-automatic-rules}
4190accordingly.} (@pxref{Plain lists}) can be made into a checkbox by starting 4308accordingly.} (@pxref{Plain lists}) can be made into a checkbox by starting
4191it with the string @samp{[ ]}. This feature is similar to TODO items 4309it with the string @samp{[ ]}. This feature is similar to TODO items
4192(@pxref{TODO Items}), but is more lightweight. Checkboxes are not included 4310(@pxref{TODO Items}), but is more lightweight. Checkboxes are not included
@@ -4225,7 +4343,7 @@ be placed into a headline or into (the first line of) a plain list item.
4225Each cookie covers checkboxes of direct children structurally below the 4343Each cookie covers checkboxes of direct children structurally below the
4226headline/item on which the cookie appears@footnote{Set the variable 4344headline/item on which the cookie appears@footnote{Set the variable
4227@code{org-hierarchical-checkbox-statistics} if you want such cookies to 4345@code{org-hierarchical-checkbox-statistics} if you want such cookies to
4228represent the all checkboxes below the cookie, not just the direct 4346count all checkboxes below the cookie, not just those belonging to direct
4229children.}. You have to insert the cookie yourself by typing either 4347children.}. You have to insert the cookie yourself by typing either
4230@samp{[/]} or @samp{[%]}. With @samp{[/]} you get an @samp{n out of m} 4348@samp{[/]} or @samp{[%]}. With @samp{[/]} you get an @samp{n out of m}
4231result, as in the examples above. With @samp{[%]} you get information about 4349result, as in the examples above. With @samp{[%]} you get information about
@@ -4265,9 +4383,8 @@ this headline and the next (so @emph{not} the entire subtree).
4265If there is no active region, just toggle the checkbox at point. 4383If there is no active region, just toggle the checkbox at point.
4266@end itemize 4384@end itemize
4267@orgcmd{M-S-@key{RET},org-insert-todo-heading} 4385@orgcmd{M-S-@key{RET},org-insert-todo-heading}
4268Insert a new item with a checkbox. 4386Insert a new item with a checkbox. This works only if the cursor is already
4269This works only if the cursor is already in a plain list item 4387in a plain list item (@pxref{Plain lists}).
4270(@pxref{Plain lists}).
4271@orgcmd{C-c C-x o,org-toggle-ordered-property} 4388@orgcmd{C-c C-x o,org-toggle-ordered-property}
4272@vindex org-track-ordered-property-with-tag 4389@vindex org-track-ordered-property-with-tag
4273@cindex property, ORDERED 4390@cindex property, ORDERED
@@ -4283,8 +4400,7 @@ a @kbd{C-u} prefix, update the entire file. Checkbox statistic cookies are
4283updated automatically if you toggle checkboxes with @kbd{C-c C-c} and make 4400updated automatically if you toggle checkboxes with @kbd{C-c C-c} and make
4284new ones with @kbd{M-S-@key{RET}}. TODO statistics cookies update when 4401new ones with @kbd{M-S-@key{RET}}. TODO statistics cookies update when
4285changing TODO states. If you delete boxes/entries or add/change them by 4402changing TODO states. If you delete boxes/entries or add/change them by
4286hand, use this command to get things back into sync. Or simply toggle any 4403hand, use this command to get things back into sync.
4287entry twice (checkboxes with @kbd{C-c C-c}).
4288@end table 4404@end table
4289 4405
4290@node Tags, Properties and Columns, TODO Items, Top 4406@node Tags, Properties and Columns, TODO Items, Top
@@ -4386,7 +4502,7 @@ When the cursor is in a headline, this does the same as @kbd{C-c C-q}.
4386@end table 4502@end table
4387 4503
4388@vindex org-tag-alist 4504@vindex org-tag-alist
4389Org will support tag insertion based on a @emph{list of tags}. By 4505Org supports tag insertion based on a @emph{list of tags}. By
4390default this list is constructed dynamically, containing all tags 4506default this list is constructed dynamically, containing all tags
4391currently used in the buffer. You may also globally specify a hard list 4507currently used in the buffer. You may also globally specify a hard list
4392of tags with the variable @code{org-tag-alist}. Finally you can set 4508of tags with the variable @code{org-tag-alist}. Finally you can set
@@ -4498,6 +4614,8 @@ exclusive tags will turn off any other tags from that group.
4498@item @key{TAB} 4614@item @key{TAB}
4499Enter a tag in the minibuffer, even if the tag is not in the predefined 4615Enter a tag in the minibuffer, even if the tag is not in the predefined
4500list. You will be able to complete on all tags present in the buffer. 4616list. You will be able to complete on all tags present in the buffer.
4617You can also add several tags: just separate them with a comma.
4618
4501@kindex @key{SPC} 4619@kindex @key{SPC}
4502@item @key{SPC} 4620@item @key{SPC}
4503Clear all tags for this line. 4621Clear all tags for this line.
@@ -4548,7 +4666,7 @@ Once a system of tags has been set up, it can be used to collect related
4548information into special lists. 4666information into special lists.
4549 4667
4550@table @kbd 4668@table @kbd
4551@orgcmdkkc{C-c / m,C-c \,org-match-sparse-tree} 4669@orgcmdkkc{C-c / m,C-c \\,org-match-sparse-tree}
4552Create a sparse tree with all headlines matching a tags search. With a 4670Create a sparse tree with all headlines matching a tags search. With a
4553@kbd{C-u} prefix argument, ignore headlines that are not a TODO line. 4671@kbd{C-u} prefix argument, ignore headlines that are not a TODO line.
4554@orgcmd{C-c a m,org-tags-view} 4672@orgcmd{C-c a m,org-tags-view}
@@ -4655,7 +4773,7 @@ Org files.
4655The following commands help to work with properties: 4773The following commands help to work with properties:
4656 4774
4657@table @kbd 4775@table @kbd
4658@orgcmd{M-@key{TAB},org-complete} 4776@orgcmd{M-@key{TAB},pcomplete}
4659After an initial colon in a line, complete property keys. All keys used 4777After an initial colon in a line, complete property keys. All keys used
4660in the current file will be offered as possible completions. 4778in the current file will be offered as possible completions.
4661@orgcmd{C-c C-x p,org-set-property} 4779@orgcmd{C-c C-x p,org-set-property}
@@ -4686,11 +4804,11 @@ nearest column format definition.
4686@section Special properties 4804@section Special properties
4687@cindex properties, special 4805@cindex properties, special
4688 4806
4689Special properties provide an alternative access method to Org-mode 4807Special properties provide an alternative access method to Org-mode features,
4690features, like the TODO state or the priority of an entry, discussed in the 4808like the TODO state or the priority of an entry, discussed in the previous
4691previous chapters. This interface exists so that you can include 4809chapters. This interface exists so that you can include these states in a
4692these states in a column view (@pxref{Column view}), or to use them in 4810column view (@pxref{Column view}), or to use them in queries. The following
4693queries. The following property names are special and should not be 4811property names are special and (except for @code{:CATEGORY:}) should not be
4694used as keys in the properties drawer: 4812used as keys in the properties drawer:
4695 4813
4696@cindex property, special, TODO 4814@cindex property, special, TODO
@@ -4707,6 +4825,7 @@ used as keys in the properties drawer:
4707@cindex property, special, BLOCKED 4825@cindex property, special, BLOCKED
4708@c guessing that ITEM is needed in this area; also, should this list be sorted? 4826@c guessing that ITEM is needed in this area; also, should this list be sorted?
4709@cindex property, special, ITEM 4827@cindex property, special, ITEM
4828@cindex property, special, FILE
4710@example 4829@example
4711TODO @r{The TODO keyword of the entry.} 4830TODO @r{The TODO keyword of the entry.}
4712TAGS @r{The tags defined directly in the headline.} 4831TAGS @r{The tags defined directly in the headline.}
@@ -4719,9 +4838,10 @@ CLOSED @r{When was this entry closed?}
4719TIMESTAMP @r{The first keyword-less timestamp in the entry.} 4838TIMESTAMP @r{The first keyword-less timestamp in the entry.}
4720TIMESTAMP_IA @r{The first inactive timestamp in the entry.} 4839TIMESTAMP_IA @r{The first inactive timestamp in the entry.}
4721CLOCKSUM @r{The sum of CLOCK intervals in the subtree. @code{org-clock-sum}} 4840CLOCKSUM @r{The sum of CLOCK intervals in the subtree. @code{org-clock-sum}}
4722 @r{must be run first to compute the values.} 4841 @r{must be run first to compute the values in the current buffer.}
4723BLOCKED @r{"t" if task is currently blocked by children or siblings} 4842BLOCKED @r{"t" if task is currently blocked by children or siblings}
4724ITEM @r{The content of the entry.} 4843ITEM @r{The content of the entry.}
4844FILE @r{The filename the entry is located in.}
4725@end example 4845@end example
4726 4846
4727@node Property searches, Property inheritance, Special properties, Properties and Columns 4847@node Property searches, Property inheritance, Special properties, Properties and Columns
@@ -4886,7 +5006,7 @@ optional. The individual parts have the following meaning:
4886@var{property} @r{The property that should be edited in this column.} 5006@var{property} @r{The property that should be edited in this column.}
4887 @r{Special properties representing meta data are allowed here} 5007 @r{Special properties representing meta data are allowed here}
4888 @r{as well (@pxref{Special properties})} 5008 @r{as well (@pxref{Special properties})}
4889@var{title} @r{The header text for the column. If omitted, the property} 5009@var{title} @r{The header text for the column. If omitted, the property}
4890 @r{name is used.} 5010 @r{name is used.}
4891@{@var{summary-type}@} @r{The summary type. If specified, the column values for} 5011@{@var{summary-type}@} @r{The summary type. If specified, the column values for}
4892 @r{parent nodes are computed from the children.} 5012 @r{parent nodes are computed from the children.}
@@ -4912,7 +5032,7 @@ optional. The individual parts have the following meaning:
4912 5032
4913@noindent 5033@noindent
4914Be aware that you can only have one summary type for any property you 5034Be aware that you can only have one summary type for any property you
4915include. Subsequent columns referencing the same property will all display the 5035include. Subsequent columns referencing the same property will all display the
4916same summary information. 5036same summary information.
4917 5037
4918The @code{est+} summary type requires further explanation. It is used for 5038The @code{est+} summary type requires further explanation. It is used for
@@ -4923,12 +5043,12 @@ of estimating a particular task will take 5 days, you might estimate it as
4923average at 5.5 days, but the first represents a more predictable delivery. 5043average at 5.5 days, but the first represents a more predictable delivery.
4924 5044
4925When combining a set of such estimates, simply adding the lows and highs 5045When combining a set of such estimates, simply adding the lows and highs
4926produces an unrealistically wide result. Instead, @code{est+} adds the 5046produces an unrealistically wide result. Instead, @code{est+} adds the
4927statistical mean and variance of the sub-tasks, generating a final estimate 5047statistical mean and variance of the sub-tasks, generating a final estimate
4928from the sum. For example, suppose you had ten tasks, each of which was 5048from the sum. For example, suppose you had ten tasks, each of which was
4929estimated at 0.5 to 2 days of work. Straight addition produces an estimate 5049estimated at 0.5 to 2 days of work. Straight addition produces an estimate
4930of 5 to 20 days, representing what to expect if everything goes either 5050of 5 to 20 days, representing what to expect if everything goes either
4931extremely well or extremely poorly. In contrast, @code{est+} estimates the 5051extremely well or extremely poorly. In contrast, @code{est+} estimates the
4932full job more realistically, at 10-15 days. 5052full job more realistically, at 10-15 days.
4933 5053
4934Here is an example for a complete columns definition, along with allowed 5054Here is an example for a complete columns definition, along with allowed
@@ -4944,7 +5064,7 @@ values.
4944 5064
4945@noindent 5065@noindent
4946The first column, @samp{%25ITEM}, means the first 25 characters of the 5066The first column, @samp{%25ITEM}, means the first 25 characters of the
4947item itself, i.e. of the headline. You probably always should start the 5067item itself, i.e.@: of the headline. You probably always should start the
4948column definition with the @samp{ITEM} specifier. The other specifiers 5068column definition with the @samp{ITEM} specifier. The other specifiers
4949create columns @samp{Owner} with a list of names as allowed values, for 5069create columns @samp{Owner} with a list of names as allowed values, for
4950@samp{Status} with four different possible values, and for a checkbox 5070@samp{Status} with four different possible values, and for a checkbox
@@ -5170,13 +5290,23 @@ following will show up in the agenda every Wednesday:
5170@end example 5290@end example
5171 5291
5172@item Diary-style sexp entries 5292@item Diary-style sexp entries
5173For more complex date specifications, Org-mode supports using the 5293For more complex date specifications, Org-mode supports using the special
5174special sexp diary entries implemented in the Emacs calendar/diary 5294sexp diary entries implemented in the Emacs calendar/diary
5175package. For example 5295package@footnote{When working with the standard diary sexp functions, you
5296need to be very careful with the order of the arguments. That order depend
5297evilly on the variable @code{calendar-date-style} (or, for older Emacs
5298versions, @code{european-calendar-style}). For example, to specify a date
5299December 12, 2005, the call might look like @code{(diary-date 12 1 2005)} or
5300@code{(diary-date 1 12 2005)} or @code{(diary-date 2005 12 1)}, depending on
5301the settings. This has been the source of much confusion. Org-mode users
5302can resort to special versions of these functions like @code{org-date} or
5303@code{org-anniversary}. These work just like the corresponding @code{diary-}
5304functions, but with stable ISO order of arguments (year, month, day) wherever
5305applicable, independent of the value of @code{calendar-date-style}.}. For example
5176 5306
5177@example 5307@example
5178* The nerd meeting on every 2nd Thursday of the month 5308* The nerd meeting on every 2nd Thursday of the month
5179 <%%(diary-float t 4 2)> 5309 <%%(org-float t 4 2)>
5180@end example 5310@end example
5181 5311
5182@item Time/Date range 5312@item Time/Date range
@@ -5256,7 +5386,7 @@ like @samp{15:30-16:30}, modifying the first time will also shift the second,
5256shifting the time block with constant length. To change the length, modify 5386shifting the time block with constant length. To change the length, modify
5257the second time. Note that if the cursor is in a headline and not at a 5387the second time. Note that if the cursor is in a headline and not at a
5258timestamp, these same keys modify the priority of an item. 5388timestamp, these same keys modify the priority of an item.
5259(@pxref{Priorities}). The key bindings also conflict with shift-selection and 5389(@pxref{Priorities}). The key bindings also conflict with shift-selection and
5260related modes (@pxref{Conflicts}). 5390related modes (@pxref{Conflicts}).
5261@c 5391@c
5262@orgcmd{C-c C-y,org-evaluate-time-range} 5392@orgcmd{C-c C-y,org-evaluate-time-range}
@@ -5301,20 +5431,20 @@ various inputs will be interpreted, the items filled in by Org-mode are
5301in @b{bold}. 5431in @b{bold}.
5302 5432
5303@example 5433@example
53043-2-5 --> 2003-02-05 54343-2-5 @result{} 2003-02-05
53052/5/3 --> 2003-02-05 54352/5/3 @result{} 2003-02-05
530614 --> @b{2006}-@b{06}-14 543614 @result{} @b{2006}-@b{06}-14
530712 --> @b{2006}-@b{07}-12 543712 @result{} @b{2006}-@b{07}-12
53082/5 --> @b{2007}-02-05 54382/5 @result{} @b{2007}-02-05
5309Fri --> nearest Friday (default date or later) 5439Fri @result{} nearest Friday (default date or later)
5310sep 15 --> @b{2006}-09-15 5440sep 15 @result{} @b{2006}-09-15
5311feb 15 --> @b{2007}-02-15 5441feb 15 @result{} @b{2007}-02-15
5312sep 12 9 --> 2009-09-12 5442sep 12 9 @result{} 2009-09-12
531312:45 --> @b{2006}-@b{06}-@b{13} 12:45 544312:45 @result{} @b{2006}-@b{06}-@b{13} 12:45
531422 sept 0:34 --> @b{2006}-09-22 0:34 544422 sept 0:34 @result{} @b{2006}-09-22 0:34
5315w4 --> ISO week for of the current year @b{2006} 5445w4 @result{} ISO week for of the current year @b{2006}
53162012 w4 fri --> Friday of ISO week 4 in 2012 54462012 w4 fri @result{} Friday of ISO week 4 in 2012
53172012-w04-5 --> Same as above 54472012-w04-5 @result{} Same as above
5318@end example 5448@end example
5319 5449
5320Furthermore you can specify a relative date by giving, as the 5450Furthermore you can specify a relative date by giving, as the
@@ -5323,16 +5453,16 @@ letter ([dwmy]) to indicate change in days, weeks, months, or years. With a
5323single plus or minus, the date is always relative to today. With a 5453single plus or minus, the date is always relative to today. With a
5324double plus or minus, it is relative to the default date. If instead of 5454double plus or minus, it is relative to the default date. If instead of
5325a single letter, you use the abbreviation of day name, the date will be 5455a single letter, you use the abbreviation of day name, the date will be
5326the Nth such day. E.g. 5456the Nth such day, e.g.@:
5327 5457
5328@example 5458@example
5329+0 --> today 5459+0 @result{} today
5330. --> today 5460. @result{} today
5331+4d --> four days from today 5461+4d @result{} four days from today
5332+4 --> same as above 5462+4 @result{} same as above
5333+2w --> two weeks from today 5463+2w @result{} two weeks from today
5334++5 --> five days from default date 5464++5 @result{} five days from default date
5335+2tue --> second Tuesday from now. 5465+2tue @result{} second Tuesday from now.
5336@end example 5466@end example
5337 5467
5338@vindex parse-time-months 5468@vindex parse-time-months
@@ -5341,14 +5471,22 @@ The function understands English month and weekday abbreviations. If
5341you want to use unabbreviated names and/or other languages, configure 5471you want to use unabbreviated names and/or other languages, configure
5342the variables @code{parse-time-months} and @code{parse-time-weekdays}. 5472the variables @code{parse-time-months} and @code{parse-time-weekdays}.
5343 5473
5474@vindex org-read-date-force-compatible-dates
5475Not all dates can be represented in a given Emacs implementation. By default
5476Org mode forces dates into the compatibility range 1970--2037 which works on
5477all Emacs implementations. If you want to use dates outside of this range,
5478read the docstring of the variable
5479@code{org-read-date-force-compatible-dates}.
5480
5344You can specify a time range by giving start and end times or by giving a 5481You can specify a time range by giving start and end times or by giving a
5345start time and a duration (in HH:MM format). Use `-' or `-@{@}-' as the separator 5482start time and a duration (in HH:MM format). Use one or two dash(es) as the
5346in the former case and use '+' as the separator in the latter case. E.g. 5483separator in the former case and use '+' as the separator in the latter
5484case, e.g.@:
5347 5485
5348@example 5486@example
534911am-1:15pm --> 11:00-13:15 548711am-1:15pm @result{} 11:00-13:15
535011am--1:15pm --> same as above 548811am--1:15pm @result{} same as above
535111am+2:15 --> same as above 548911am+2:15 @result{} same as above
5352@end example 5490@end example
5353 5491
5354@cindex calendar, for selecting date 5492@cindex calendar, for selecting date
@@ -5479,7 +5617,7 @@ The headline will be listed under the given date@footnote{It will still
5479be listed on that date after it has been marked DONE. If you don't like 5617be listed on that date after it has been marked DONE. If you don't like
5480this, set the variable @code{org-agenda-skip-scheduled-if-done}.}. In 5618this, set the variable @code{org-agenda-skip-scheduled-if-done}.}. In
5481addition, a reminder that the scheduled date has passed will be present 5619addition, a reminder that the scheduled date has passed will be present
5482in the compilation for @emph{today}, until the entry is marked DONE, i.e. 5620in the compilation for @emph{today}, until the entry is marked DONE, i.e.@:
5483the task will automatically be forwarded until completed. 5621the task will automatically be forwarded until completed.
5484 5622
5485@example 5623@example
@@ -5502,7 +5640,7 @@ entries. Org-mode will issue early and late warnings based on the
5502assumption that the timestamp represents the @i{nearest instance} of 5640assumption that the timestamp represents the @i{nearest instance} of
5503the repeater. However, the use of diary sexp entries like 5641the repeater. However, the use of diary sexp entries like
5504@c 5642@c
5505@code{<%%(diary-float t 42)>} 5643@code{<%%(org-float t 42)>}
5506@c 5644@c
5507in scheduling and deadline timestamps is limited. Org-mode does not 5645in scheduling and deadline timestamps is limited. Org-mode does not
5508know enough about the internals of each sexp function to issue early and 5646know enough about the internals of each sexp function to issue early and
@@ -5517,29 +5655,30 @@ sexp entry matches.
5517@node Inserting deadline/schedule, Repeated tasks, Deadlines and scheduling, Deadlines and scheduling 5655@node Inserting deadline/schedule, Repeated tasks, Deadlines and scheduling, Deadlines and scheduling
5518@subsection Inserting deadlines or schedules 5656@subsection Inserting deadlines or schedules
5519 5657
5520The following commands allow you to quickly insert a deadline or to schedule 5658The following commands allow you to quickly insert@footnote{The @samp{SCHEDULED} and
5659@samp{DEADLINE} dates are inserted on the line right below the headline. Don't put
5660any text between this line and the headline.} a deadline or to schedule
5521an item: 5661an item:
5522 5662
5523@table @kbd 5663@table @kbd
5524@c 5664@c
5525@orgcmd{C-c C-d,org-deadline} 5665@orgcmd{C-c C-d,org-deadline}
5526Insert @samp{DEADLINE} keyword along with a stamp. The insertion will happen 5666Insert @samp{DEADLINE} keyword along with a stamp. The insertion will happen
5527in the line directly following the headline. When called with a prefix arg, 5667in the line directly following the headline. Any CLOSED timestamp will be
5528an existing deadline will be removed from the entry. Depending on the 5668removed. When called with a prefix arg, an existing deadline will be removed
5529variable @code{org-log-redeadline}@footnote{with corresponding 5669from the entry. Depending on the variable @code{org-log-redeadline}@footnote{with corresponding
5530@code{#+STARTUP} keywords @code{logredeadline}, @code{lognoteredeadline}, 5670@code{#+STARTUP} keywords @code{logredeadline}, @code{lognoteredeadline},
5531and @code{nologredeadline}}, a note will be taken when changing an existing 5671and @code{nologredeadline}}, a note will be taken when changing an existing
5532deadline. 5672deadline.
5533@c FIXME Any CLOSED timestamp will be removed.???????? 5673
5534@c
5535@orgcmd{C-c C-s,org-schedule} 5674@orgcmd{C-c C-s,org-schedule}
5536Insert @samp{SCHEDULED} keyword along with a stamp. The insertion will 5675Insert @samp{SCHEDULED} keyword along with a stamp. The insertion will
5537happen in the line directly following the headline. Any CLOSED timestamp 5676happen in the line directly following the headline. Any CLOSED timestamp
5538will be removed. When called with a prefix argument, remove the scheduling 5677will be removed. When called with a prefix argument, remove the scheduling
5539date from the entry. Depending on the variable 5678date from the entry. Depending on the variable
5540@code{org-log-reschedule}@footnote{with corresponding @code{#+STARTUP} 5679@code{org-log-reschedule}@footnote{with corresponding @code{#+STARTUP}
5541keywords @code{logredeadline}, @code{lognoteredeadline}, and 5680keywords @code{logreschedule}, @code{lognotereschedule}, and
5542@code{nologredeadline}}, a note will be taken when changing an existing 5681@code{nologreschedule}}, a note will be taken when changing an existing
5543scheduling time. 5682scheduling time.
5544@c 5683@c
5545@orgcmd{C-c C-x C-k,org-mark-entry-for-agenda-action} 5684@orgcmd{C-c C-x C-k,org-mark-entry-for-agenda-action}
@@ -5566,6 +5705,11 @@ Sparse tree for deadlines and scheduled items before a given date.
5566Sparse tree for deadlines and scheduled items after a given date. 5705Sparse tree for deadlines and scheduled items after a given date.
5567@end table 5706@end table
5568 5707
5708Note that @code{org-schedule} and @code{org-deadline} supports
5709setting the date by indicating a relative time: e.g. +1d will set
5710the date to the next day after today, and --1w will set the date
5711to the previous week before any current timestamp.
5712
5569@node Repeated tasks, , Inserting deadline/schedule, Deadlines and scheduling 5713@node Repeated tasks, , Inserting deadline/schedule, Deadlines and scheduling
5570@subsection Repeated tasks 5714@subsection Repeated tasks
5571@cindex tasks, repeated 5715@cindex tasks, repeated
@@ -5684,11 +5828,15 @@ what to do with it.
5684@table @kbd 5828@table @kbd
5685@orgcmd{C-c C-x C-i,org-clock-in} 5829@orgcmd{C-c C-x C-i,org-clock-in}
5686@vindex org-clock-into-drawer 5830@vindex org-clock-into-drawer
5831@cindex property, LOG_INTO_DRAWER
5687Start the clock on the current item (clock-in). This inserts the CLOCK 5832Start the clock on the current item (clock-in). This inserts the CLOCK
5688keyword together with a timestamp. If this is not the first clocking of 5833keyword together with a timestamp. If this is not the first clocking of
5689this item, the multiple CLOCK lines will be wrapped into a 5834this item, the multiple CLOCK lines will be wrapped into a
5690@code{:LOGBOOK:} drawer (see also the variable 5835@code{:LOGBOOK:} drawer (see also the variable
5691@code{org-clock-into-drawer}). When called with a @kbd{C-u} prefix argument, 5836@code{org-clock-into-drawer}). You can also overrule
5837the setting of this variable for a subtree by setting a
5838@code{CLOCK_INTO_DRAWER} or @code{LOG_INTO_DRAWER} property.
5839When called with a @kbd{C-u} prefix argument,
5692select the task from a list of recently clocked tasks. With two @kbd{C-u 5840select the task from a list of recently clocked tasks. With two @kbd{C-u
5693C-u} prefixes, clock into the task at point and mark it as the default task. 5841C-u} prefixes, clock into the task at point and mark it as the default task.
5694The default task will always be available when selecting a clocking task, 5842The default task will always be available when selecting a clocking task,
@@ -5730,6 +5878,9 @@ Update the effort estimate for the current clock task.
5730Recompute the time interval after changing one of the timestamps. This 5878Recompute the time interval after changing one of the timestamps. This
5731is only necessary if you edit the timestamps directly. If you change 5879is only necessary if you edit the timestamps directly. If you change
5732them with @kbd{S-@key{cursor}} keys, the update is automatic. 5880them with @kbd{S-@key{cursor}} keys, the update is automatic.
5881@orgcmd{C-S-@key{up/down},org-clock-timestamps-up/down}
5882On @code{CLOCK} log lines, increase/decrease both timestamps at the same
5883time so that duration keeps the same.
5733@orgcmd{C-c C-t,org-todo} 5884@orgcmd{C-c C-t,org-todo}
5734Changing the TODO state of an item to DONE automatically stops the clock 5885Changing the TODO state of an item to DONE automatically stops the clock
5735if it is running in this same item. 5886if it is running in this same item.
@@ -5741,12 +5892,12 @@ Jump to the headline of the currently clocked in task. With a @kbd{C-u}
5741prefix arg, select the target task from a list of recently clocked tasks. 5892prefix arg, select the target task from a list of recently clocked tasks.
5742@orgcmd{C-c C-x C-d,org-clock-display} 5893@orgcmd{C-c C-x C-d,org-clock-display}
5743@vindex org-remove-highlights-with-change 5894@vindex org-remove-highlights-with-change
5744Display time summaries for each subtree in the current buffer. This 5895Display time summaries for each subtree in the current buffer. This puts
5745puts overlays at the end of each headline, showing the total time 5896overlays at the end of each headline, showing the total time recorded under
5746recorded under that heading, including the time of any subheadings. You 5897that heading, including the time of any subheadings. You can use visibility
5747can use visibility cycling to study the tree, but the overlays disappear 5898cycling to study the tree, but the overlays disappear when you change the
5748when you change the buffer (see variable 5899buffer (see variable @code{org-remove-highlights-with-change}) or press
5749@code{org-remove-highlights-with-change}) or press @kbd{C-c C-c}. 5900@kbd{C-c C-c}.
5750@end table 5901@end table
5751 5902
5752The @kbd{l} key may be used in the timeline (@pxref{Timeline}) and in 5903The @kbd{l} key may be used in the timeline (@pxref{Timeline}) and in
@@ -5830,7 +5981,8 @@ be selected:
5830 @r{To use this, @code{:block} or @code{:tstart}, @code{:tend} are needed.} 5981 @r{To use this, @code{:block} or @code{:tstart}, @code{:tend} are needed.}
5831:stepskip0 @r{Do not show steps that have zero time.} 5982:stepskip0 @r{Do not show steps that have zero time.}
5832:fileskip0 @r{Do not show table sections from files which did not contribute.} 5983:fileskip0 @r{Do not show table sections from files which did not contribute.}
5833:tags @r{A tags match to select entries that should contribute}. 5984:tags @r{A tags match to select entries that should contribute. See}
5985 @r{@ref{Matching tags and properties} for the match syntax.}
5834@end example 5986@end example
5835 5987
5836Then there are options which determine the formatting of the table. There 5988Then there are options which determine the formatting of the table. There
@@ -5838,6 +5990,7 @@ options are interpreted by the function @code{org-clocktable-write-default},
5838but you can specify your own function using the @code{:formatter} parameter. 5990but you can specify your own function using the @code{:formatter} parameter.
5839@example 5991@example
5840:emphasize @r{When @code{t}, emphasize level one and level two items.} 5992:emphasize @r{When @code{t}, emphasize level one and level two items.}
5993:lang @r{Language@footnote{Language terms can be set through the variable @code{org-clock-clocktable-language-setup}.} to use for descriptive cells like "Task".}
5841:link @r{Link the item headlines in the table to their origins.} 5994:link @r{Link the item headlines in the table to their origins.}
5842:narrow @r{An integer to limit the width of the headline column in} 5995:narrow @r{An integer to limit the width of the headline column in}
5843 @r{the org table. If you write it like @samp{50!}, then the} 5996 @r{the org table. If you write it like @samp{50!}, then the}
@@ -5850,6 +6003,9 @@ but you can specify your own function using the @code{:formatter} parameter.
5850 @r{All are overwritten except if there is an explicit @code{:narrow}} 6003 @r{All are overwritten except if there is an explicit @code{:narrow}}
5851:timestamp @r{A timestamp for the entry, when available. Look for SCHEDULED,} 6004:timestamp @r{A timestamp for the entry, when available. Look for SCHEDULED,}
5852 @r{DEADLINE, TIMESTAMP and TIMESTAMP_IA, in this order.} 6005 @r{DEADLINE, TIMESTAMP and TIMESTAMP_IA, in this order.}
6006:properties @r{List of properties that should be shown in the table. Each}
6007 @r{property will get its own column.}
6008:inherit-props @r{When this flag is @code{t}, the values for @code{:properties} will be inherited.}
5853:formula @r{Content of a @code{#+TBLFM} line to be added and evaluated.} 6009:formula @r{Content of a @code{#+TBLFM} line to be added and evaluated.}
5854 @r{As a special case, @samp{:formula %} adds a column with % time.} 6010 @r{As a special case, @samp{:formula %} adds a column with % time.}
5855 @r{If you do not specify a formula here, any existing formula} 6011 @r{If you do not specify a formula here, any existing formula}
@@ -5945,7 +6101,7 @@ If you restart Emacs and clock into any task, Org will notice that you have a
5945dangling clock which was never clocked out from your last session. Using 6101dangling clock which was never clocked out from your last session. Using
5946that clock's starting time as the beginning of the unaccounted-for period, 6102that clock's starting time as the beginning of the unaccounted-for period,
5947Org will ask how you want to resolve that time. The logic and behavior is 6103Org will ask how you want to resolve that time. The logic and behavior is
5948identical to dealing with away time due to idleness; it's just happening due 6104identical to dealing with away time due to idleness; it is just happening due
5949to a recovery event rather than a set amount of idle time. 6105to a recovery event rather than a set amount of idle time.
5950 6106
5951You can also check all the files visited by your Org agenda for dangling 6107You can also check all the files visited by your Org agenda for dangling
@@ -5982,7 +6138,7 @@ together with clock sums (if you want to clock your time). For a specific
5982buffer you can use 6138buffer you can use
5983 6139
5984@example 6140@example
5985#+PROPERTY: Effort_ALL 0 0:10 0:30 1:00 2:00 3:00 4:00 5:00 6:00 7:00 8:00 6141#+PROPERTY: Effort_ALL 0 0:10 0:30 1:00 2:00 3:00 4:00 5:00 6:00 7:00
5986#+COLUMNS: %40ITEM(Task) %17Effort(Estimated Effort)@{:@} %CLOCKSUM 6142#+COLUMNS: %40ITEM(Task) %17Effort(Estimated Effort)@{:@} %CLOCKSUM
5987@end example 6143@end example
5988 6144
@@ -6061,7 +6217,7 @@ not started at exactly the right moment.
6061@kindex ; 6217@kindex ;
6062 6218
6063Calling @code{org-timer-set-timer} from an Org-mode buffer runs a countdown 6219Calling @code{org-timer-set-timer} from an Org-mode buffer runs a countdown
6064timer. Use @key{;} from agenda buffers, @key{C-c C-x ;} everwhere else. 6220timer. Use @kbd{;} from agenda buffers, @key{C-c C-x ;} everwhere else.
6065 6221
6066@code{org-timer-set-timer} prompts the user for a duration and displays a 6222@code{org-timer-set-timer} prompts the user for a duration and displays a
6067countdown timer in the modeline. @code{org-timer-default-timer} sets the 6223countdown timer in the modeline. @code{org-timer-default-timer} sets the
@@ -6083,7 +6239,7 @@ trees to an archive file keeps the system compact and fast.
6083* Capture:: Capturing new stuff 6239* Capture:: Capturing new stuff
6084* Attachments:: Add files to tasks 6240* Attachments:: Add files to tasks
6085* RSS Feeds:: Getting input from RSS feeds 6241* RSS Feeds:: Getting input from RSS feeds
6086* Protocols:: External (e.g. Browser) access to Emacs and Org 6242* Protocols:: External (e.g.@: Browser) access to Emacs and Org
6087* Refiling notes:: Moving a tree from one place to another 6243* Refiling notes:: Moving a tree from one place to another
6088* Archiving:: What to do with finished projects 6244* Archiving:: What to do with finished projects
6089@end menu 6245@end menu
@@ -6138,6 +6294,7 @@ suggestion.} for capturing new material.
6138@orgcmd{C-c c,org-capture} 6294@orgcmd{C-c c,org-capture}
6139Call the command @code{org-capture}. Note that this keybinding is global and 6295Call the command @code{org-capture}. Note that this keybinding is global and
6140not active by default - you need to install it. If you have templates 6296not active by default - you need to install it. If you have templates
6297@cindex date tree
6141defined @pxref{Capture templates}, it will offer these templates for 6298defined @pxref{Capture templates}, it will offer these templates for
6142selection or use a new Org outline node as the default template. It will 6299selection or use a new Org outline node as the default template. It will
6143insert the template into the target file and switch to an indirect buffer 6300insert the template into the target file and switch to an indirect buffer
@@ -6172,7 +6329,7 @@ prefix commands:
6172 6329
6173@table @kbd 6330@table @kbd
6174@orgkey{C-u C-c c} 6331@orgkey{C-u C-c c}
6175Visit the target location of a cpature template. You get to select the 6332Visit the target location of a capture template. You get to select the
6176template in the usual way. 6333template in the usual way.
6177@orgkey{C-u C-u C-c c} 6334@orgkey{C-u C-u C-c c}
6178Visit the last stored capture item in its buffer. 6335Visit the last stored capture item in its buffer.
@@ -6220,6 +6377,14 @@ extremely useful for deriving tasks from emails, for example. You fill in
6220the task definition, press @code{C-c C-c} and Org returns you to the same 6377the task definition, press @code{C-c C-c} and Org returns you to the same
6221place where you started the capture process. 6378place where you started the capture process.
6222 6379
6380To define special keys to capture to a particular template without going
6381through the interactive template selection, you can create your key binding
6382like this:
6383
6384@lisp
6385(define-key global-map "\C-cx"
6386 (lambda () (interactive) (org-capture nil "x")))
6387@end lisp
6223 6388
6224@menu 6389@menu
6225* Template elements:: What is needed for a complete template entry 6390* Template elements:: What is needed for a complete template entry
@@ -6230,14 +6395,14 @@ place where you started the capture process.
6230@subsubsection Template elements 6395@subsubsection Template elements
6231 6396
6232Now lets look at the elements of a template definition. Each entry in 6397Now lets look at the elements of a template definition. Each entry in
6233@code{org-capture-templates} is a list with the following items: 6398@code{org-capture-templates} is a list with the following items:
6234 6399
6235@table @var 6400@table @var
6236@item keys 6401@item keys
6237The keys that will select the template, as a string, characters 6402The keys that will select the template, as a string, characters
6238only, for example @code{"a"} for a template to be selected with a 6403only, for example @code{"a"} for a template to be selected with a
6239single key, or @code{"bt"} for selection with two keys. When using 6404single key, or @code{"bt"} for selection with two keys. When using
6240several keys, keys using the same prefix key must be sequential 6405several keys, keys using the same prefix key must be sequential
6241in the list and preceded by a 2-element entry explaining the 6406in the list and preceded by a 2-element entry explaining the
6242prefix key, for example 6407prefix key, for example
6243@example 6408@example
@@ -6254,9 +6419,8 @@ selection.
6254The type of entry, a symbol. Valid values are: 6419The type of entry, a symbol. Valid values are:
6255@table @code 6420@table @code
6256@item entry 6421@item entry
6257An Org-mode node, with a headline. Will be filed as the child of the 6422An Org-mode node, with a headline. Will be filed as the child of the target
6258target entry or as a top-level entry. The target file should be an Org-mode 6423entry or as a top-level entry. The target file should be an Org-mode file.
6259file.
6260@item item 6424@item item
6261A plain list item, placed in the first plain list at the target 6425A plain list item, placed in the first plain list at the target
6262location. Again the target file should be an Org file. 6426location. Again the target file should be an Org file.
@@ -6277,7 +6441,8 @@ Specification of where the captured item should be placed. In Org-mode
6277files, targets usually define a node. Entries will become children of this 6441files, targets usually define a node. Entries will become children of this
6278node. Other types will be added to the table or list in the body of this 6442node. Other types will be added to the table or list in the body of this
6279node. Most target specifications contain a file name. If that file name is 6443node. Most target specifications contain a file name. If that file name is
6280the empty string, it defaults to @code{org-default-notes-file}. 6444the empty string, it defaults to @code{org-default-notes-file}. A file can
6445also be given as a variable, function, or Emacs Lisp form.
6281 6446
6282Valid values are: 6447Valid values are:
6283@table @code 6448@table @code
@@ -6342,14 +6507,25 @@ before and after the new item. Default 0, only common other value is 1.
6342@item :clock-in 6507@item :clock-in
6343Start the clock in this item. 6508Start the clock in this item.
6344 6509
6510@item :clock-keep
6511Keep the clock running when filing the captured entry.
6512
6345@item :clock-resume 6513@item :clock-resume
6346If starting the capture interrupted a clock, restart that clock when finished 6514If starting the capture interrupted a clock, restart that clock when finished
6347with the capture. 6515with the capture. Note that @code{:clock-keep} has precedence over
6516@code{:clock-resume}. When setting both to @code{t}, the current clock will
6517run and the previous one will not be resumed.
6348 6518
6349@item :unnarrowed 6519@item :unnarrowed
6350Do not narrow the target buffer, simply show the full buffer. Default is to 6520Do not narrow the target buffer, simply show the full buffer. Default is to
6351narrow it so that you only see the new material. 6521narrow it so that you only see the new material.
6352 6522
6523@item :table-line-pos
6524Specification of the location in the table where the new line should be
6525inserted. It should be a string like @code{"II-3"} meaning that the new
6526line should become the third line before the second horizontal separator
6527line.
6528
6353@item :kill-buffer 6529@item :kill-buffer
6354If the target file was not yet visited when capture was invoked, kill the 6530If the target file was not yet visited when capture was invoked, kill the
6355buffer again after capture is completed. 6531buffer again after capture is completed.
@@ -6361,37 +6537,39 @@ buffer again after capture is completed.
6361 6537
6362In the template itself, special @kbd{%}-escapes@footnote{If you need one of 6538In the template itself, special @kbd{%}-escapes@footnote{If you need one of
6363these sequences literally, escape the @kbd{%} with a backslash.} allow 6539these sequences literally, escape the @kbd{%} with a backslash.} allow
6364dynamic insertion of content: 6540dynamic insertion of content. The templates are expanded in the order given here:
6365 6541
6366@comment SJE: should these sentences terminate in period?
6367@smallexample 6542@smallexample
6368%^@{@var{prompt}@} @r{prompt the user for a string and replace this sequence with it.} 6543%[@var{file}] @r{insert the contents of the file given by @var{file}.}
6369 @r{You may specify a default value and a completion table with} 6544%(@var{sexp}) @r{evaluate Elisp @var{sexp} and replace with the result.}
6370 @r{%^@{prompt|default|completion2|completion3...@}} 6545%<...> @r{the result of format-time-string on the ... format specification.}
6371 @r{The arrow keys access a prompt-specific history.} 6546%t @r{timestamp, date only.}
6372%a @r{annotation, normally the link created with @code{org-store-link}} 6547%T @r{timestamp with date and time.}
6373%A @r{like @code{%a}, but prompt for the description part} 6548%u, %U @r{like the above, but inactive timestamps.}
6549%a @r{annotation, normally the link created with @code{org-store-link}.}
6374%i @r{initial content, the region when capture is called while the} 6550%i @r{initial content, the region when capture is called while the}
6375 @r{region is active.} 6551 @r{region is active.}
6376 @r{The entire text will be indented like @code{%i} itself.} 6552 @r{The entire text will be indented like @code{%i} itself.}
6377%t @r{timestamp, date only} 6553%A @r{like @code{%a}, but prompt for the description part.}
6378%T @r{timestamp with date and time}
6379%u, %U @r{like the above, but inactive timestamps}
6380%^t @r{like @code{%t}, but prompt for date. Similarly @code{%^T}, @code{%^u}, @code{%^U}}
6381 @r{You may define a prompt like @code{%^@{Birthday@}t}}
6382%n @r{user name (taken from @code{user-full-name})}
6383%c @r{Current kill ring head.} 6554%c @r{Current kill ring head.}
6384%x @r{Content of the X clipboard.} 6555%x @r{Content of the X clipboard.}
6385%^C @r{Interactive selection of which kill or clip to use.} 6556%k @r{title of the currently clocked task.}
6386%^L @r{Like @code{%^C}, but insert as link.} 6557%K @r{link to the currently clocked task.}
6387%k @r{title of the currently clocked task} 6558%n @r{user name (taken from @code{user-full-name}).}
6388%K @r{link to the currently clocked task} 6559%f @r{file visited by current buffer when org-capture was called.}
6560%F @r{full path of the file or directory visited by current buffer.}
6561%:keyword @r{specific information for certain link types, see below.}
6389%^g @r{prompt for tags, with completion on tags in target file.} 6562%^g @r{prompt for tags, with completion on tags in target file.}
6390%^G @r{prompt for tags, with completion all tags in all agenda files.} 6563%^G @r{prompt for tags, with completion all tags in all agenda files.}
6391%^@{@var{prop}@}p @r{Prompt the user for a value for property @var{prop}} 6564%^t @r{like @code{%t}, but prompt for date. Similarly @code{%^T}, @code{%^u}, @code{%^U}.}
6392%:keyword @r{specific information for certain link types, see below} 6565 @r{You may define a prompt like @code{%^@{Birthday@}t}.}
6393%[@var{file}] @r{insert the contents of the file given by @var{file}} 6566%^C @r{Interactive selection of which kill or clip to use.}
6394%(@var{sexp}) @r{evaluate Elisp @var{sexp} and replace with the result} 6567%^L @r{Like @code{%^C}, but insert as link.}
6568%^@{@var{prop}@}p @r{Prompt the user for a value for property @var{prop}.}
6569%^@{@var{prompt}@} @r{prompt the user for a string and replace this sequence with it.}
6570 @r{You may specify a default value and a completion table with}
6571 @r{%^@{prompt|default|completion2|completion3...@}.}
6572 @r{The arrow keys access a prompt-specific history.}
6395@end smallexample 6573@end smallexample
6396 6574
6397@noindent 6575@noindent
@@ -6403,8 +6581,8 @@ similar way.}:
6403 6581
6404@vindex org-from-is-user-regexp 6582@vindex org-from-is-user-regexp
6405@smallexample 6583@smallexample
6406Link type | Available keywords 6584Link type | Available keywords
6407-------------------+---------------------------------------------- 6585------------------------+----------------------------------------------
6408bbdb | %:name %:company 6586bbdb | %:name %:company
6409irc | %:server %:port %:nick 6587irc | %:server %:port %:nick
6410vm, wl, mh, mew, rmail | %:type %:subject %:message-id 6588vm, wl, mh, mew, rmail | %:type %:subject %:message-id
@@ -6482,7 +6660,7 @@ Create a new attachment as an Emacs buffer.
6482Synchronize the current task with its attachment directory, in case you added 6660Synchronize the current task with its attachment directory, in case you added
6483attachments yourself. 6661attachments yourself.
6484 6662
6485@orgcmdtkc{p,C-c C-a o,org-attach-open} 6663@orgcmdtkc{o,C-c C-a o,org-attach-open}
6486@vindex org-file-apps 6664@vindex org-file-apps
6487Open current task's attachment. If there is more than one, prompt for a 6665Open current task's attachment. If there is more than one, prompt for a
6488file name first. Opening will follow the rules set by @code{org-file-apps}. 6666file name first. Opening will follow the rules set by @code{org-file-apps}.
@@ -6610,7 +6788,7 @@ create new nodes as new parents for refiling on the fly, check the
6610variable @code{org-refile-allow-creating-parent-nodes}. 6788variable @code{org-refile-allow-creating-parent-nodes}.
6611When the variable @code{org-log-refile}@footnote{with corresponding 6789When the variable @code{org-log-refile}@footnote{with corresponding
6612@code{#+STARTUP} keywords @code{logrefile}, @code{lognoterefile}, 6790@code{#+STARTUP} keywords @code{logrefile}, @code{lognoterefile},
6613and @code{nologrefile}} is set, a time stamp or a note will be 6791and @code{nologrefile}} is set, a timestamp or a note will be
6614recorded when an entry has been refiled. 6792recorded when an entry has been refiled.
6615@orgkey{C-u C-c C-w} 6793@orgkey{C-u C-c C-w}
6616Use the refile interface to jump to a heading. 6794Use the refile interface to jump to a heading.
@@ -6835,7 +7013,7 @@ The information to be shown is normally collected from all @emph{agenda
6835files}, the files listed in the variable 7013files}, the files listed in the variable
6836@code{org-agenda-files}@footnote{If the value of that variable is not a 7014@code{org-agenda-files}@footnote{If the value of that variable is not a
6837list, but a single file name, then the list of agenda files will be 7015list, but a single file name, then the list of agenda files will be
6838maintained in that external file.}. If a directory is part of this list, 7016maintained in that external file.}. If a directory is part of this list,
6839all files with the extension @file{.org} in this directory will be part 7017all files with the extension @file{.org} in this directory will be part
6840of the list. 7018of the list.
6841 7019
@@ -6848,7 +7026,7 @@ the easiest way to maintain it is through the following commands
6848 7026
6849@cindex files, adding to agenda list 7027@cindex files, adding to agenda list
6850@table @kbd 7028@table @kbd
6851@orgcmd{C-c [,org-agenda-to-front} 7029@orgcmd{C-c [,org-agenda-file-to-front}
6852Add current file to the list of agenda files. The file is added to 7030Add current file to the list of agenda files. The file is added to
6853the front of the list. If it was already in the list, it is moved to 7031the front of the list. If it was already in the list, it is moved to
6854the front. With a prefix argument, file is added/moved to the end. 7032the front. With a prefix argument, file is added/moved to the end.
@@ -6905,7 +7083,7 @@ Lift the restriction.
6905@cindex agenda dispatcher 7083@cindex agenda dispatcher
6906@cindex dispatching agenda commands 7084@cindex dispatching agenda commands
6907The views are created through a dispatcher, which should be bound to a 7085The views are created through a dispatcher, which should be bound to a
6908global key---for example @kbd{C-c a} (@pxref{Installation}). In the 7086global key---for example @kbd{C-c a} (@pxref{Activation}). In the
6909following we will assume that @kbd{C-c a} is indeed how the dispatcher 7087following we will assume that @kbd{C-c a} is indeed how the dispatcher
6910is accessed and list keyboard access to commands accordingly. After 7088is accessed and list keyboard access to commands accordingly. After
6911pressing @kbd{C-c a}, an additional letter is required to execute a 7089pressing @kbd{C-c a}, an additional letter is required to execute a
@@ -7030,7 +7208,7 @@ between calendar and agenda.
7030 7208
7031If you are using the diary only for sexp entries and holidays, it is 7209If you are using the diary only for sexp entries and holidays, it is
7032faster to not use the above setting, but instead to copy or even move 7210faster to not use the above setting, but instead to copy or even move
7033the entries into an Org file. Org-mode evaluates diary-style sexp 7211the entries into an Org file. Org-mode evaluates diary-style sexp
7034entries, and does it faster because there is no overhead for first 7212entries, and does it faster because there is no overhead for first
7035creating the diary display. Note that the sexp entries must start at 7213creating the diary display. Note that the sexp entries must start at
7036the left margin, no whitespace is allowed before them. For example, 7214the left margin, no whitespace is allowed before them. For example,
@@ -7042,8 +7220,8 @@ will be made in the agenda:
7042#+CATEGORY: Holiday 7220#+CATEGORY: Holiday
7043%%(org-calendar-holiday) ; special function for holiday names 7221%%(org-calendar-holiday) ; special function for holiday names
7044#+CATEGORY: Ann 7222#+CATEGORY: Ann
7045%%(diary-anniversary 5 14 1956)@footnote{Note that the order of the arguments (month, day, year) depends on the setting of @code{calendar-date-style}.} Arthur Dent is %d years old 7223%%(org-anniversary 1956 5 14)@footnote{@code{org-anniversary} is just like @code{diary-anniversary}, but the argument order is allways according to ISO and therefore independent of the value of @code{calendar-date-style}.} Arthur Dent is %d years old
7046%%(diary-anniversary 10 2 1869) Mahatma Gandhi would be %d years old 7224%%(org-anniversary 1869 10 2) Mahatma Gandhi would be %d years old
7047@end example 7225@end example
7048 7226
7049@subsubheading Anniversaries from BBDB 7227@subsubheading Anniversaries from BBDB
@@ -7066,14 +7244,15 @@ following to one your your agenda files:
7066 7244
7067You can then go ahead and define anniversaries for a BBDB record. Basically, 7245You can then go ahead and define anniversaries for a BBDB record. Basically,
7068you need to press @kbd{C-o anniversary @key{RET}} with the cursor in a BBDB 7246you need to press @kbd{C-o anniversary @key{RET}} with the cursor in a BBDB
7069record and then add the date in the format @code{YYYY-MM-DD}, followed by a 7247record and then add the date in the format @code{YYYY-MM-DD} or @code{MM-DD},
7070space and the class of the anniversary (@samp{birthday} or @samp{wedding}, or 7248followed by a space and the class of the anniversary (@samp{birthday} or
7071a format string). If you omit the class, it will default to @samp{birthday}. 7249@samp{wedding}, or a format string). If you omit the class, it will default to
7072Here are a few examples, the header for the file @file{org-bbdb.el} contains 7250@samp{birthday}. Here are a few examples, the header for the file
7073more detailed information. 7251@file{org-bbdb.el} contains more detailed information.
7074 7252
7075@example 7253@example
70761973-06-22 72541973-06-22
725506-22
70771955-08-02 wedding 72561955-08-02 wedding
70782008-04-14 %s released version 6.01 of org-mode, %d years ago 72572008-04-14 %s released version 6.01 of org-mode, %d years ago
7079@end example 7258@end example
@@ -7092,7 +7271,7 @@ Org can interact with Emacs appointments notification facility. To add all
7092the appointments of your agenda files, use the command 7271the appointments of your agenda files, use the command
7093@code{org-agenda-to-appt}. This command also lets you filter through the 7272@code{org-agenda-to-appt}. This command also lets you filter through the
7094list of your appointments and add only those belonging to a specific category 7273list of your appointments and add only those belonging to a specific category
7095or matching a regular expression. See the docstring for details. 7274or matching a regular expression. See the docstring for details.
7096 7275
7097@node Global TODO list, Matching tags and properties, Weekly/daily agenda, Built-in agenda views 7276@node Global TODO list, Matching tags and properties, Weekly/daily agenda, Built-in agenda views
7098@subsection The global TODO list 7277@subsection The global TODO list
@@ -7265,7 +7444,7 @@ brackets (like @samp{DEADLINE<="<2008-12-24 18:30>"}), both values are
7265assumed to be date/time specifications in the standard Org way, and the 7444assumed to be date/time specifications in the standard Org way, and the
7266comparison will be done accordingly. Special values that will be recognized 7445comparison will be done accordingly. Special values that will be recognized
7267are @code{"<now>"} for now (including time), and @code{"<today>"}, and 7446are @code{"<now>"} for now (including time), and @code{"<today>"}, and
7268@code{"<tomorrow>"} for these days at 0:00 hours, i.e. without a time 7447@code{"<tomorrow>"} for these days at 0:00 hours, i.e.@: without a time
7269specification. Also strings like @code{"<+5d>"} or @code{"<-2m>"} with units 7448specification. Also strings like @code{"<+5d>"} or @code{"<-2m>"} with units
7270@code{d}, @code{w}, @code{m}, and @code{y} for day, week, month, and year, 7449@code{d}, @code{w}, @code{m}, and @code{y} for day, week, month, and year,
7271respectively, can be used. 7450respectively, can be used.
@@ -7368,6 +7547,7 @@ the files listed in @code{org-agenda-text-search-extra-files}.
7368 7547
7369@node Stuck projects, , Search view, Built-in agenda views 7548@node Stuck projects, , Search view, Built-in agenda views
7370@subsection Stuck projects 7549@subsection Stuck projects
7550@pindex GTD, Getting Things Done
7371 7551
7372If you are following a system like David Allen's GTD to organize your 7552If you are following a system like David Allen's GTD to organize your
7373work, one of the ``duties'' you have is a regular review to make sure 7553work, one of the ``duties'' you have is a regular review to make sure
@@ -7418,12 +7598,14 @@ will still be searched for stuck projects.
7418@cindex presentation, of agenda items 7598@cindex presentation, of agenda items
7419 7599
7420@vindex org-agenda-prefix-format 7600@vindex org-agenda-prefix-format
7421Before displaying items in an agenda view, Org-mode visually prepares 7601@vindex org-agenda-tags-column
7422the items and sorts them. Each item occupies a single line. The line 7602Before displaying items in an agenda view, Org-mode visually prepares the
7423starts with a @emph{prefix} that contains the @emph{category} 7603items and sorts them. Each item occupies a single line. The line starts
7424(@pxref{Categories}) of the item and other important information. You can 7604with a @emph{prefix} that contains the @emph{category} (@pxref{Categories})
7425customize the prefix using the option @code{org-agenda-prefix-format}. 7605of the item and other important information. You can customize in which
7426The prefix is followed by a cleaned-up version of the outline headline 7606column tags will be displayed through @code{org-agenda-tags-column}. You can
7607also customize the prefix using the option @code{org-agenda-prefix-format}.
7608This prefix is followed by a cleaned-up version of the outline headline
7427associated with the item. 7609associated with the item.
7428 7610
7429@menu 7611@menu
@@ -7608,34 +7790,31 @@ will be followed without a selection prompt.
7608 7790
7609@tsubheading{Change display} 7791@tsubheading{Change display}
7610@cindex display changing, in agenda 7792@cindex display changing, in agenda
7793@kindex A
7794@item A
7795Interactively select another agenda view and append it to the current view.
7796@c
7611@kindex o 7797@kindex o
7612@item o 7798@item o
7613Delete other windows. 7799Delete other windows.
7614@c 7800@c
7615@c @kindex v d
7616@c @kindex d
7617@c @kindex v w
7618@c @kindex w
7619@c @kindex v m
7620@c @kindex v y
7621@c @item v d @ @r{or short} @ d
7622@c @itemx v w @ @r{or short} @ w
7623@c @itemx v m
7624@c @itemx v y
7625@orgcmdkskc{v d,d,org-aganda-day-view} 7801@orgcmdkskc{v d,d,org-aganda-day-view}
7626@xorgcmdkskc{v w,w,org-aganda-day-view} 7802@xorgcmdkskc{v w,w,org-aganda-day-view}
7627@xorgcmd{v m,org-agenda-month-view} 7803@xorgcmd{v m,org-agenda-month-view}
7628@xorgcmd{v y,org-agenda-month-year} 7804@xorgcmd{v y,org-agenda-month-year}
7629Switch to day/week/month/year view. When switching to day or week view, 7805@xorgcmd{v SPC,org-agenda-reset-view}
7630this setting becomes the default for subsequent agenda commands. Since 7806@vindex org-agenda-span
7631month and year views are slow to create, they do not become the default. 7807Switch to day/week/month/year view. When switching to day or week view, this
7632A numeric prefix argument may be used to jump directly to a specific day 7808setting becomes the default for subsequent agenda refreshes. Since month and
7633of the year, ISO week, month, or year, respectively. For example, 7809year views are slow to create, they do not become the default. A numeric
7634@kbd{32 d} jumps to February 1st, @kbd{9 w} to ISO week number 9. When 7810prefix argument may be used to jump directly to a specific day of the year,
7635setting day, week, or month view, a year may be encoded in the prefix 7811ISO week, month, or year, respectively. For example, @kbd{32 d} jumps to
7636argument as well. For example, @kbd{200712 w} will jump to week 12 in 7812February 1st, @kbd{9 w} to ISO week number 9. When setting day, week, or
76372007. If such a year specification has only one or two digits, it will 7813month view, a year may be encoded in the prefix argument as well. For
7638be mapped to the interval 1938-2037. 7814example, @kbd{200712 w} will jump to week 12 in 2007. If such a year
7815specification has only one or two digits, it will be mapped to the interval
78161938-2037. @kbd{v @key{SPC}} will reset to what is set in
7817@code{org-agenda-span}.
7639@c 7818@c
7640@orgcmd{f,org-agenda-later} 7819@orgcmd{f,org-agenda-later}
7641Go forward in time to display the following @code{org-agenda-current-span} days. 7820Go forward in time to display the following @code{org-agenda-current-span} days.
@@ -7688,10 +7867,19 @@ always show a table with the clocked times for the timespan and file scope
7688covered by the current agenda view. The initial setting for this mode in new 7867covered by the current agenda view. The initial setting for this mode in new
7689agenda buffers can be set with the variable 7868agenda buffers can be set with the variable
7690@code{org-agenda-start-with-clockreport-mode}. By using a prefix argument 7869@code{org-agenda-start-with-clockreport-mode}. By using a prefix argument
7691when toggling this mode (i.e. @kbd{C-u R}), the clock table will not show 7870when toggling this mode (i.e.@: @kbd{C-u R}), the clock table will not show
7692contributions from entries that are hidden by agenda filtering@footnote{Only 7871contributions from entries that are hidden by agenda filtering@footnote{Only
7693tags filtering will be respected here, effort filtering is ignored.}. 7872tags filtering will be respected here, effort filtering is ignored.}.
7694@c 7873@c
7874@orgkey{v c}
7875@vindex org-agenda-clock-consistency-checks
7876Show overlapping clock entries, clocking gaps, and other clocking problems in
7877the current agenda range. You can then visit clocking lines and fix them
7878manually. See the variable @code{org-agenda-clock-consistency-checks} for
7879information on how to customize the definition of what constituted a clocking
7880problem. To return to normal agenda display, press @kbd{l} to exit Logbook
7881mode.
7882@c
7695@orgcmdkskc{v E,E,org-agenda-entry-text-mode} 7883@orgcmdkskc{v E,E,org-agenda-entry-text-mode}
7696@vindex org-agenda-start-with-entry-text-mode 7884@vindex org-agenda-start-with-entry-text-mode
7697@vindex org-agenda-entry-text-maxlines 7885@vindex org-agenda-entry-text-maxlines
@@ -7707,13 +7895,13 @@ prefix argument will temporarily modify that number to the prefix value.
7707Toggle the time grid on and off. See also the variables 7895Toggle the time grid on and off. See also the variables
7708@code{org-agenda-use-time-grid} and @code{org-agenda-time-grid}. 7896@code{org-agenda-use-time-grid} and @code{org-agenda-time-grid}.
7709@c 7897@c
7710@orgcmd{r,org-agenda-rodo} 7898@orgcmd{r,org-agenda-redo}
7711Recreate the agenda buffer, for example to reflect the changes after 7899Recreate the agenda buffer, for example to reflect the changes after
7712modification of the timestamps of items with @kbd{S-@key{left}} and 7900modification of the timestamps of items with @kbd{S-@key{left}} and
7713@kbd{S-@key{right}}. When the buffer is the global TODO list, a prefix 7901@kbd{S-@key{right}}. When the buffer is the global TODO list, a prefix
7714argument is interpreted to create a selective list for a specific TODO 7902argument is interpreted to create a selective list for a specific TODO
7715keyword. 7903keyword.
7716@orgcmd{g,org-agenda-rodo} 7904@orgcmd{g,org-agenda-redo}
7717Same as @kbd{r}. 7905Same as @kbd{r}.
7718@c 7906@c
7719@orgcmdkskc{C-x C-s,s,org-save-all-org-buffers} 7907@orgcmdkskc{C-x C-s,s,org-save-all-org-buffers}
@@ -7806,7 +7994,7 @@ Internet, and outside of business hours, with something like this:
7806@end group 7994@end group
7807@end lisp 7995@end lisp
7808 7996
7809@orgcmd{\,org-agenda-filter-by-tag-refine} 7997@orgcmd{\\,org-agenda-filter-by-tag-refine}
7810Narrow the current agenda filter by an additional condition. When called with 7998Narrow the current agenda filter by an additional condition. When called with
7811prefix arg, remove the entries that @emph{do} have the tag, or that do match 7999prefix arg, remove the entries that @emph{do} have the tag, or that do match
7812the effort criterion. You can achieve the same effect by pressing @kbd{+} or 8000the effort criterion. You can achieve the same effect by pressing @kbd{+} or
@@ -7889,8 +8077,8 @@ agenda, change a tag for all headings in the region.
7889@kindex , 8077@kindex ,
7890@item , 8078@item ,
7891Set the priority for the current item (@command{org-agenda-priority}). 8079Set the priority for the current item (@command{org-agenda-priority}).
7892Org-mode prompts for the priority character. If you reply with @key{SPC}, the 8080Org-mode prompts for the priority character. If you reply with @key{SPC},
7893priority cookie is removed from the entry. 8081the priority cookie is removed from the entry.
7894@c 8082@c
7895@orgcmd{P,org-agenda-show-priority} 8083@orgcmd{P,org-agenda-show-priority}
7896Display weighted priority of current item. 8084Display weighted priority of current item.
@@ -7971,6 +8159,9 @@ Jump to the running clock in another window.
7971Mark the entry at point for bulk action. With prefix arg, mark that many 8159Mark the entry at point for bulk action. With prefix arg, mark that many
7972successive entries. 8160successive entries.
7973@c 8161@c
8162@orgcmd{%,org-agenda-bulk-mark-regexp}
8163Mark entries matching a regular expression for bulk action.
8164@c
7974@orgcmd{u,org-agenda-bulk-unmark} 8165@orgcmd{u,org-agenda-bulk-unmark}
7975Unmark entry for bulk action. 8166Unmark entry for bulk action.
7976@c 8167@c
@@ -7989,15 +8180,30 @@ $ @r{Archive all selected entries.}
7989A @r{Archive entries by moving them to their respective archive siblings.} 8180A @r{Archive entries by moving them to their respective archive siblings.}
7990t @r{Change TODO state. This prompts for a single TODO keyword and} 8181t @r{Change TODO state. This prompts for a single TODO keyword and}
7991 @r{changes the state of all selected entries, bypassing blocking and} 8182 @r{changes the state of all selected entries, bypassing blocking and}
7992 @r{suppressing logging notes (but not time stamps).} 8183 @r{suppressing logging notes (but not timestamps).}
7993+ @r{Add a tag to all selected entries.} 8184+ @r{Add a tag to all selected entries.}
7994- @r{Remove a tag from all selected entries.} 8185- @r{Remove a tag from all selected entries.}
7995s @r{Schedule all items to a new date. To shift existing schedule dates} 8186s @r{Schedule all items to a new date. To shift existing schedule dates}
7996 @r{by a fixed number of days, use something starting with double plus} 8187 @r{by a fixed number of days, use something starting with double plus}
7997 @r{at the prompt, for example @samp{++8d} or @samp{++2w}.} 8188 @r{at the prompt, for example @samp{++8d} or @samp{++2w}.}
7998S @r{Reschedule randomly by N days. N will be prompted for. With prefix} 8189S @r{Reschedule randomly into the coming N days. N will be prompted for.}
7999 @r{arg (@kbd{C-u B S}), scatter only accross weekdays.} 8190 @r{With prefix arg (@kbd{C-u B S}), scatter only across weekdays.}
8000d @r{Set deadline to a specific date.} 8191d @r{Set deadline to a specific date.}
8192f @r{Apply a function to marked entries.}
8193 @r{For example, the function below sets the CATEGORY property of the}
8194 @r{entries to web.}
8195 @r{(defun set-category ()}
8196 @r{ (interactive "P")}
8197 @r{ (let* ((marker (or (org-get-at-bol 'org-hd-marker)}
8198 @r{ (org-agenda-error)))}
8199 @r{ (buffer (marker-buffer marker)))}
8200 @r{ (with-current-buffer buffer}
8201 @r{ (save-excursion}
8202 @r{ (save-restriction}
8203 @r{ (widen)}
8204 @r{ (goto-char marker)}
8205 @r{ (org-back-to-heading t)}
8206 @r{ (org-set-property "CATEGORY" "web"))))))}
8001@end example 8207@end example
8002 8208
8003 8209
@@ -8274,7 +8480,7 @@ version of some agenda views to carry around. Org-mode can export custom
8274agenda views as plain text, HTML@footnote{You need to install Hrvoje Niksic's 8480agenda views as plain text, HTML@footnote{You need to install Hrvoje Niksic's
8275@file{htmlize.el}.}, Postscript, PDF@footnote{To create PDF output, the 8481@file{htmlize.el}.}, Postscript, PDF@footnote{To create PDF output, the
8276ghostscript @file{ps2pdf} utility must be installed on the system. Selecting 8482ghostscript @file{ps2pdf} utility must be installed on the system. Selecting
8277a PDF file with also create the postscript file.}, and iCalendar files. If 8483a PDF file will also create the postscript file.}, and iCalendar files. If
8278you want to do this only occasionally, use the command 8484you want to do this only occasionally, use the command
8279 8485
8280@table @kbd 8486@table @kbd
@@ -8430,7 +8636,7 @@ This causes the following issues:
8430Org needs to make a decision which @code{COLUMNS} format to use. Since the 8636Org needs to make a decision which @code{COLUMNS} format to use. Since the
8431entries in the agenda are collected from different files, and different files 8637entries in the agenda are collected from different files, and different files
8432may have different @code{COLUMNS} formats, this is a non-trivial problem. 8638may have different @code{COLUMNS} formats, this is a non-trivial problem.
8433Org first checks if the variable @code{org-overriding-columns-format} is 8639Org first checks if the variable @code{org-agenda-overriding-columns-format} is
8434currently set, and if so, takes the format from there. Otherwise it takes 8640currently set, and if so, takes the format from there. Otherwise it takes
8435the format associated with the first item in the agenda, or, if that item 8641the format associated with the first item in the agenda, or, if that item
8436does not have a specific format (defined in a property, or in its file), it 8642does not have a specific format (defined in a property, or in its file), it
@@ -8579,7 +8785,7 @@ If you still want to have some text before the first headline, use the
8579#+OPTIONS: skip:t 8785#+OPTIONS: skip:t
8580#+TEXT: This text will go before the *first* headline. 8786#+TEXT: This text will go before the *first* headline.
8581#+TEXT: [TABLE-OF-CONTENTS] 8787#+TEXT: [TABLE-OF-CONTENTS]
8582#+TEXT: This goes between the table of contents and the first headline 8788#+TEXT: This goes between the table of contents and the *first* headline
8583@end example 8789@end example
8584 8790
8585@node Lists, Paragraphs, Initial text, Structural markup elements 8791@node Lists, Paragraphs, Initial text, Structural markup elements
@@ -8638,9 +8844,9 @@ but not any simpler
8638@cindex footnotes, markup rules 8844@cindex footnotes, markup rules
8639@cindex @file{footnote.el} 8845@cindex @file{footnote.el}
8640 8846
8641Footnotes defined in the way described in @ref{Footnotes}, will be exported by 8847Footnotes defined in the way described in @ref{Footnotes}, will be exported
8642all backends. Org allows multiple references to the same note, and 8848by all backends. Org allows multiple references to the same note, and
8643different backends support this to varying degrees. 8849multiple footnotes side by side.
8644 8850
8645@node Emphasis and monospace, Horizontal rules, Footnote markup, Structural markup elements 8851@node Emphasis and monospace, Horizontal rules, Footnote markup, Structural markup elements
8646@subheading Emphasis and monospace 8852@subheading Emphasis and monospace
@@ -8659,8 +8865,8 @@ syntax; it is exported verbatim.
8659@node Horizontal rules, Comment lines, Emphasis and monospace, Structural markup elements 8865@node Horizontal rules, Comment lines, Emphasis and monospace, Structural markup elements
8660@subheading Horizontal rules 8866@subheading Horizontal rules
8661@cindex horizontal rules, markup rules 8867@cindex horizontal rules, markup rules
8662A line consisting of only dashes, and at least 5 of them, will be 8868A line consisting of only dashes, and at least 5 of them, will be exported as
8663exported as a horizontal line (@samp{<hr/>} in HTML). 8869a horizontal line (@samp{<hr/>} in HTML and @code{\hrule} in @LaTeX{}).
8664 8870
8665@node Comment lines, , Horizontal rules, Structural markup elements 8871@node Comment lines, , Horizontal rules, Structural markup elements
8666@subheading Comment lines 8872@subheading Comment lines
@@ -8669,7 +8875,7 @@ exported as a horizontal line (@samp{<hr/>} in HTML).
8669@cindex #+BEGIN_COMMENT 8875@cindex #+BEGIN_COMMENT
8670 8876
8671Lines starting with @samp{#} in column zero are treated as comments and will 8877Lines starting with @samp{#} in column zero are treated as comments and will
8672never be exported. If you want an indented line to be treated as a comment, 8878never be exported. If you want an indented line to be treated as a comment,
8673start it with @samp{#+ }. Also entire subtrees starting with the word 8879start it with @samp{#+ }. Also entire subtrees starting with the word
8674@samp{COMMENT} will never be exported. Finally, regions surrounded by 8880@samp{COMMENT} will never be exported. Finally, regions surrounded by
8675@samp{#+BEGIN_COMMENT} ... @samp{#+END_COMMENT} will not be exported. 8881@samp{#+BEGIN_COMMENT} ... @samp{#+END_COMMENT} will not be exported.
@@ -8701,6 +8907,11 @@ the object with @code{\ref@{tab:basic-data@}}:
8701 |-----|----| 8907 |-----|----|
8702@end example 8908@end example
8703 8909
8910Optionally, the caption can take the form:
8911@example
8912#+CAPTION: [Caption for list of figures]@{Caption for table (or link).@}
8913@end example
8914
8704@cindex inlined images, markup rules 8915@cindex inlined images, markup rules
8705Some backends (HTML, @LaTeX{}, and DocBook) allow you to directly include 8916Some backends (HTML, @LaTeX{}, and DocBook) allow you to directly include
8706images into the exported document. Org does this, if a link to an image 8917images into the exported document. Org does this, if a link to an image
@@ -8755,20 +8966,22 @@ look like the fontified Emacs buffer@footnote{This works automatically for
8755the HTML backend (it requires version 1.34 of the @file{htmlize.el} package, 8966the HTML backend (it requires version 1.34 of the @file{htmlize.el} package,
8756which is distributed with Org). Fontified code chunks in LaTeX can be 8967which is distributed with Org). Fontified code chunks in LaTeX can be
8757achieved using either the listings or the 8968achieved using either the listings or the
8758@url{http://code.google.com/p/minted, minted,} package. To use listings, turn 8969@url{http://code.google.com/p/minted, minted,} package. To use listings, turn
8759on the variable @code{org-export-latex-listings} and ensure that the listings 8970on the variable @code{org-export-latex-listings} and ensure that the listings
8760package is included by the LaTeX header (e.g. by configuring 8971package is included by the LaTeX header (e.g.@: by configuring
8761@code{org-export-latex-packages-alist}). See the listings documentation for 8972@code{org-export-latex-packages-alist}). See the listings documentation for
8762configuration options, including obtaining colored output. For minted it is 8973configuration options, including obtaining colored output. For minted it is
8763necessary to install the program @url{http://pygments.org, pygments}, in 8974necessary to install the program @url{http://pygments.org, pygments}, in
8764addition to setting @code{org-export-latex-minted}, ensuring that the minted 8975addition to setting @code{org-export-latex-minted}, ensuring that the minted
8765package is included by the LaTeX header, and ensuring that the 8976package is included by the LaTeX header, and ensuring that the
8766@code{-shell-escape} option is passed to @file{pdflatex} (see 8977@code{-shell-escape} option is passed to @file{pdflatex} (see
8767@code{org-latex-to-pdf-process}). See the documentation of the variables 8978@code{org-latex-to-pdf-process}). See the documentation of the variables
8768@code{org-export-latex-listings} and @code{org-export-latex-minted} for 8979@code{org-export-latex-listings} and @code{org-export-latex-minted} for
8769further details.}. This is done with the @samp{src} block, where you also 8980further details.}. This is done with the @samp{src} block, where you also
8770need to specify the name of the major mode that should be used to fontify the 8981need to specify the name of the major mode that should be used to fontify the
8771example: 8982example@footnote{Code in @samp{src} blocks may also be evaluated either
8983interactively or on export. See @pxref{Working With Source Code} for more
8984information on evaluating code blocks.}:
8772@cindex #+BEGIN_SRC 8985@cindex #+BEGIN_SRC
8773 8986
8774@example 8987@example
@@ -8784,7 +8997,7 @@ switch to the end of the @code{BEGIN} line, to get the lines of the example
8784numbered. If you use a @code{+n} switch, the numbering from the previous 8997numbered. If you use a @code{+n} switch, the numbering from the previous
8785numbered snippet will be continued in the current one. In literal examples, 8998numbered snippet will be continued in the current one. In literal examples,
8786Org will interpret strings like @samp{(ref:name)} as labels, and use them as 8999Org will interpret strings like @samp{(ref:name)} as labels, and use them as
8787targets for special hyperlinks like @code{[[(name)]]} (i.e. the reference name 9000targets for special hyperlinks like @code{[[(name)]]} (i.e.@: the reference name
8788enclosed in single parenthesis). In HTML, hovering the mouse over such a 9001enclosed in single parenthesis). In HTML, hovering the mouse over such a
8789link will remote-highlight the corresponding code line, which is kind of 9002link will remote-highlight the corresponding code line, which is kind of
8790cool. 9003cool.
@@ -8811,8 +9024,12 @@ If the syntax for the label format conflicts with the language syntax, use a
8811@code{-l} switch to change the format, for example @samp{#+BEGIN_SRC pascal 9024@code{-l} switch to change the format, for example @samp{#+BEGIN_SRC pascal
8812-n -r -l "((%s))"}. See also the variable @code{org-coderef-label-format}. 9025-n -r -l "((%s))"}. See also the variable @code{org-coderef-label-format}.
8813 9026
8814HTML export also allows examples to be published as text areas, @xref{Text 9027HTML export also allows examples to be published as text areas (@pxref{Text
8815areas in HTML export}. 9028areas in HTML export}).
9029
9030Because the @code{#+BEGIN_...} and @code{#+END_...} patterns need to be added
9031so often, shortcuts are provided using the Easy Templates facility
9032(@pxref{Easy Templates}).
8816 9033
8817@table @kbd 9034@table @kbd
8818@kindex C-c ' 9035@kindex C-c '
@@ -8851,7 +9068,7 @@ include your @file{.emacs} file, you could use:
8851#+INCLUDE: "~/.emacs" src emacs-lisp 9068#+INCLUDE: "~/.emacs" src emacs-lisp
8852@end example 9069@end example
8853@noindent 9070@noindent
8854The optional second and third parameter are the markup (e.g. @samp{quote}, 9071The optional second and third parameter are the markup (e.g.@: @samp{quote},
8855@samp{example}, or @samp{src}), and, if the markup is @samp{src}, the 9072@samp{example}, or @samp{src}), and, if the markup is @samp{src}, the
8856language for formatting the contents. The markup is optional; if it is not 9073language for formatting the contents. The markup is optional; if it is not
8857given, the text will be assumed to be in Org-mode format and will be 9074given, the text will be assumed to be in Org-mode format and will be
@@ -8866,6 +9083,17 @@ use
8866#+INCLUDE: "~/snippets/xx" :prefix1 " + " :prefix " " 9083#+INCLUDE: "~/snippets/xx" :prefix1 " + " :prefix " "
8867@end example 9084@end example
8868 9085
9086You can also include a portion of a file by specifying a lines range using
9087the @code{:lines} parameter. The line at the upper end of the range will not
9088be included. The start and/or the end of the range may be omitted to use the
9089obvious defaults.
9090
9091@example
9092#+INCLUDE: "~/.emacs" :lines "5-10" @r{Include lines 5 to 10, 10 excluded}
9093#+INCLUDE: "~/.emacs" :lines "-10" @r{Include lines 1 to 10, 10 excluded}
9094#+INCLUDE: "~/.emacs" :lines "10-" @r{Include lines from 10 to EOF}
9095@end example
9096
8869@table @kbd 9097@table @kbd
8870@kindex C-c ' 9098@kindex C-c '
8871@item C-c ' 9099@item C-c '
@@ -8925,7 +9153,7 @@ include scientific notes, which often require mathematical symbols and the
8925occasional formula. @LaTeX{}@footnote{@LaTeX{} is a macro system based on 9153occasional formula. @LaTeX{}@footnote{@LaTeX{} is a macro system based on
8926Donald E. Knuth's @TeX{} system. Many of the features described here as 9154Donald E. Knuth's @TeX{} system. Many of the features described here as
8927``@LaTeX{}'' are really from @TeX{}, but for simplicity I am blurring this 9155``@LaTeX{}'' are really from @TeX{}, but for simplicity I am blurring this
8928distinction.} is widely used to typeset scientific documents. Org-mode 9156distinction.} is widely used to typeset scientific documents. Org-mode
8929supports embedding @LaTeX{} code into its files, because many academics are 9157supports embedding @LaTeX{} code into its files, because many academics are
8930used to writing and reading @LaTeX{} source code, and because it can be 9158used to writing and reading @LaTeX{} source code, and because it can be
8931readily processed to produce pretty output for a number of export backends. 9159readily processed to produce pretty output for a number of export backends.
@@ -9038,7 +9266,7 @@ this regularly or on pages with significant page views, you should install
9038@file{MathJax} on your own 9266@file{MathJax} on your own
9039server in order to limit the load of our server.}. Finally, it can also 9267server in order to limit the load of our server.}. Finally, it can also
9040process the mathematical expressions into images@footnote{For this to work 9268process the mathematical expressions into images@footnote{For this to work
9041you need to be on a system with a working @LaTeX{} installation. You also 9269you need to be on a system with a working @LaTeX{} installation. You also
9042need the @file{dvipng} program, available at 9270need the @file{dvipng} program, available at
9043@url{http://sourceforge.net/projects/dvipng/}. The @LaTeX{} header that will 9271@url{http://sourceforge.net/projects/dvipng/}. The @LaTeX{} header that will
9044be used when processing a fragment can be configured with the variable 9272be used when processing a fragment can be configured with the variable
@@ -9118,7 +9346,7 @@ Remove the overlay preview images.
9118 9346
9119@vindex org-format-latex-options 9347@vindex org-format-latex-options
9120You can customize the variable @code{org-format-latex-options} to influence 9348You can customize the variable @code{org-format-latex-options} to influence
9121some aspects of the preview. In particular, the @code{:scale} (and for HTML 9349some aspects of the preview. In particular, the @code{:scale} (and for HTML
9122export, @code{:html-scale}) property can be used to adjust the size of the 9350export, @code{:html-scale}) property can be used to adjust the size of the
9123preview images. 9351preview images.
9124 9352
@@ -9191,14 +9419,16 @@ Org-mode documents can be exported into a variety of other formats. For
9191printing and sharing of notes, ASCII export produces a readable and simple 9419printing and sharing of notes, ASCII export produces a readable and simple
9192version of an Org file. HTML export allows you to publish a notes file on 9420version of an Org file. HTML export allows you to publish a notes file on
9193the web, while the XOXO format provides a solid base for exchange with a 9421the web, while the XOXO format provides a solid base for exchange with a
9194broad range of other applications. @LaTeX{} export lets you use Org-mode and 9422broad range of other applications. @LaTeX{} export lets you use Org-mode and
9195its structured editing functions to easily create @LaTeX{} files. DocBook 9423its structured editing functions to easily create @LaTeX{} files. DocBook
9196export makes it possible to convert Org files to many other formats using 9424export makes it possible to convert Org files to many other formats using
9197DocBook tools. For project management you can create gantt and resource 9425DocBook tools. OpenDocumentText export allows seamless colloboration across
9198charts by using TaskJuggler export. To incorporate entries with associated 9426organizational boundaries. For project management you can create gantt and
9199times like deadlines or appointments into a desktop calendar program like 9427resource charts by using TaskJuggler export. To incorporate entries with
9200iCal, Org-mode can also produce extracts in the iCalendar format. Currently 9428associated times like deadlines or appointments into a desktop calendar
9201Org-mode only supports export, not import of these different formats. 9429program like iCal, Org-mode can also produce extracts in the iCalendar
9430format. Currently Org-mode only supports export, not import of these
9431different formats.
9202 9432
9203Org supports export of selected regions when @code{transient-mark-mode} is 9433Org supports export of selected regions when @code{transient-mark-mode} is
9204enabled (default in Emacs 23). 9434enabled (default in Emacs 23).
@@ -9211,6 +9441,7 @@ enabled (default in Emacs 23).
9211* HTML export:: Exporting to HTML 9441* HTML export:: Exporting to HTML
9212* LaTeX and PDF export:: Exporting to @LaTeX{}, and processing to PDF 9442* LaTeX and PDF export:: Exporting to @LaTeX{}, and processing to PDF
9213* DocBook export:: Exporting to DocBook 9443* DocBook export:: Exporting to DocBook
9444* OpenDocumentText export:: Exporting to OpenDocumentText
9214* TaskJuggler export:: Exporting to TaskJuggler 9445* TaskJuggler export:: Exporting to TaskJuggler
9215* Freemind export:: Exporting to Freemind mind maps 9446* Freemind export:: Exporting to Freemind mind maps
9216* XOXO export:: Exporting to XOXO 9447* XOXO export:: Exporting to XOXO
@@ -9219,26 +9450,34 @@ enabled (default in Emacs 23).
9219 9450
9220@node Selective export, Export options, Exporting, Exporting 9451@node Selective export, Export options, Exporting, Exporting
9221@section Selective export 9452@section Selective export
9222@cindex export, selective by tags 9453@cindex export, selective by tags or TODO keyword
9223 9454
9224@vindex org-export-select-tags 9455@vindex org-export-select-tags
9225@vindex org-export-exclude-tags 9456@vindex org-export-exclude-tags
9457@cindex org-export-with-tasks
9226You may use tags to select the parts of a document that should be exported, 9458You may use tags to select the parts of a document that should be exported,
9227or to exclude parts from export. This behavior is governed by two variables: 9459or to exclude parts from export. This behavior is governed by two variables:
9228@code{org-export-select-tags} and @code{org-export-exclude-tags}. 9460@code{org-export-select-tags} and @code{org-export-exclude-tags}.
9229 9461
9230Org first checks if any of the @emph{select} tags is present in the buffer. 9462@enumerate
9231If yes, all trees that do not carry one of these tags will be excluded. If a 9463@item
9232selected tree is a subtree, the heading hierarchy above it will also be 9464Org first checks if any of the @emph{select} tags is present in the
9233selected for export, but not the text below those headings. 9465buffer. If yes, all trees that do not carry one of these tags will be
9466excluded. If a selected tree is a subtree, the heading hierarchy above it
9467will also be selected for export, but not the text below those headings.
9234 9468
9235@noindent 9469@item
9236If none of the select tags is found, the whole buffer will be selected for 9470If none of the select tags is found, the whole buffer will be selected for
9237export. 9471export.
9238 9472
9239@noindent 9473@item
9240Finally, all subtrees that are marked by any of the @emph{exclude} tags will 9474Finally, all subtrees that are marked by any of the @emph{exclude} tags will
9241be removed from the export buffer. 9475be removed from the export buffer.
9476@end enumerate
9477
9478The variable @code{org-export-with-tasks} can be configured to select which
9479kind of tasks should be included for export. See the docstring of the
9480variable for more information.
9242 9481
9243@node Export options, The export dispatcher, Selective export, Exporting 9482@node Export options, The export dispatcher, Selective export, Exporting
9244@section Export options 9483@section Export options
@@ -9284,13 +9523,13 @@ Insert template with export options, see example below.
9284#+AUTHOR: the author (default taken from @code{user-full-name}) 9523#+AUTHOR: the author (default taken from @code{user-full-name})
9285#+DATE: a date, fixed, or a format string for @code{format-time-string} 9524#+DATE: a date, fixed, or a format string for @code{format-time-string}
9286#+EMAIL: his/her email address (default from @code{user-mail-address}) 9525#+EMAIL: his/her email address (default from @code{user-mail-address})
9287#+DESCRIPTION: the page description, e.g. for the XHTML meta tag 9526#+DESCRIPTION: the page description, e.g.@: for the XHTML meta tag
9288#+KEYWORDS: the page keywords, e.g. for the XHTML meta tag 9527#+KEYWORDS: the page keywords, e.g.@: for the XHTML meta tag
9289#+LANGUAGE: language for HTML, e.g. @samp{en} (@code{org-export-default-language}) 9528#+LANGUAGE: language for HTML, e.g.@: @samp{en} (@code{org-export-default-language})
9290#+TEXT: Some descriptive text to be inserted at the beginning. 9529#+TEXT: Some descriptive text to be inserted at the beginning.
9291#+TEXT: Several lines may be given. 9530#+TEXT: Several lines may be given.
9292#+OPTIONS: H:2 num:t toc:t \n:nil @@:t ::t |:t ^:t f:t TeX:t ... 9531#+OPTIONS: H:2 num:t toc:t \n:nil @@:t ::t |:t ^:t f:t TeX:t ...
9293#+BIND: lisp-var lisp-val, e.g.: org-export-latex-low-levels itemize 9532#+BIND: lisp-var lisp-val, e.g.@:: org-export-latex-low-levels itemize
9294 @r{You need to confirm using these, or configure @code{org-export-allow-BIND}} 9533 @r{You need to confirm using these, or configure @code{org-export-allow-BIND}}
9295#+LINK_UP: the ``up'' link of an exported page 9534#+LINK_UP: the ``up'' link of an exported page
9296#+LINK_HOME: the ``home'' link of an exported page 9535#+LINK_HOME: the ``home'' link of an exported page
@@ -9319,6 +9558,11 @@ settings. Here you can:
9319@cindex @LaTeX{} fragments 9558@cindex @LaTeX{} fragments
9320@cindex author info, in export 9559@cindex author info, in export
9321@cindex time info, in export 9560@cindex time info, in export
9561@vindex org-export-plist-vars
9562@vindex org-export-author-info
9563@vindex org-export-creator-info
9564@vindex org-export-email-info
9565@vindex org-export-time-stamp-file
9322@example 9566@example
9323H: @r{set the number of headline levels for export} 9567H: @r{set the number of headline levels for export}
9324num: @r{turn on/off section-numbers} 9568num: @r{turn on/off section-numbers}
@@ -9333,6 +9577,8 @@ toc: @r{turn on/off table of contents, or set level limit (integer)}
9333-: @r{turn on/off conversion of special strings.} 9577-: @r{turn on/off conversion of special strings.}
9334f: @r{turn on/off footnotes like this[1].} 9578f: @r{turn on/off footnotes like this[1].}
9335todo: @r{turn on/off inclusion of TODO keywords into exported text} 9579todo: @r{turn on/off inclusion of TODO keywords into exported text}
9580tasks: @r{turn on/off inclusion of tasks (TODO items), can be nil to remove}
9581 @r{all tasks, @code{todo} to remove DONE tasks, or list of kwds to keep}
9336pri: @r{turn on/off priority cookies} 9582pri: @r{turn on/off priority cookies}
9337tags: @r{turn on/off inclusion of tags, may also be @code{not-in-toc}} 9583tags: @r{turn on/off inclusion of tags, may also be @code{not-in-toc}}
9338<: @r{turn on/off inclusion of any time/date stamps like DEADLINES} 9584<: @r{turn on/off inclusion of any time/date stamps like DEADLINES}
@@ -9348,11 +9594,13 @@ d: @r{turn on/off inclusion of drawers}
9348@end example 9594@end example
9349@noindent 9595@noindent
9350These options take effect in both the HTML and @LaTeX{} export, except for 9596These options take effect in both the HTML and @LaTeX{} export, except for
9351@code{TeX} and @code{LaTeX}, which are respectively @code{t} and @code{nil} 9597@code{TeX} and @code{LaTeX} options, which are respectively @code{t} and
9352for the @LaTeX{} export. The default values for these and many other options 9598@code{nil} for the @LaTeX{} export.
9353are given by a set of variables. For a list of such variables, the 9599
9354corresponding OPTIONS keys and also the publishing keys (@pxref{Project 9600The default values for these and many other options are given by a set of
9355alist}), see the constant @code{org-export-plist-vars}. 9601variables. For a list of such variables, the corresponding OPTIONS keys and
9602also the publishing keys (@pxref{Project alist}), see the constant
9603@code{org-export-plist-vars}.
9356 9604
9357When exporting only a single subtree by selecting it with @kbd{C-c @@} before 9605When exporting only a single subtree by selecting it with @kbd{C-c @@} before
9358calling an export command, the subtree can overrule some of the file's export 9606calling an export command, the subtree can overrule some of the file's export
@@ -9381,11 +9629,11 @@ separate Emacs process@footnote{To make this behavior the default, customize
9381the variable @code{org-export-run-in-background}.}. 9629the variable @code{org-export-run-in-background}.}.
9382@orgcmd{C-c C-e v,org-export-visible} 9630@orgcmd{C-c C-e v,org-export-visible}
9383Like @kbd{C-c C-e}, but only export the text that is currently visible 9631Like @kbd{C-c C-e}, but only export the text that is currently visible
9384(i.e. not hidden by outline visibility). 9632(i.e.@: not hidden by outline visibility).
9385@orgcmd{C-u C-u C-c C-e,org-export} 9633@orgcmd{C-u C-u C-c C-e,org-export}
9386@vindex org-export-run-in-background 9634@vindex org-export-run-in-background
9387Call the exporter, but reverse the setting of 9635Call the exporter, but reverse the setting of
9388@code{org-export-run-in-background}, i.e. request background processing if 9636@code{org-export-run-in-background}, i.e.@: request background processing if
9389not set, or force processing in the current Emacs process if set. 9637not set, or force processing in the current Emacs process if set.
9390@end table 9638@end table
9391 9639
@@ -9409,7 +9657,7 @@ Export as ASCII file. For an Org file, @file{myfile.org}, the ASCII file
9409will be @file{myfile.txt}. The file will be overwritten without 9657will be @file{myfile.txt}. The file will be overwritten without
9410warning. If there is an active region@footnote{This requires 9658warning. If there is an active region@footnote{This requires
9411@code{transient-mark-mode} be turned on.}, only the region will be 9659@code{transient-mark-mode} be turned on.}, only the region will be
9412exported. If the selected region is a single tree@footnote{To select the 9660exported. If the selected region is a single tree@footnote{To select the
9413current subtree, use @kbd{C-c @@}.}, the tree head will 9661current subtree, use @kbd{C-c @@}.}, the tree head will
9414become the document title. If the tree head entry has or inherits an 9662become the document title. If the tree head entry has or inherits an
9415@code{EXPORT_FILE_NAME} property, that name will be used for the 9663@code{EXPORT_FILE_NAME} property, that name will be used for the
@@ -9460,6 +9708,7 @@ language, but with additional support for tables.
9460 9708
9461@menu 9709@menu
9462* HTML Export commands:: How to invoke HTML export 9710* HTML Export commands:: How to invoke HTML export
9711* HTML preamble and postamble:: How to insert a preamble and a postamble
9463* Quoting HTML tags:: Using direct HTML in Org-mode 9712* Quoting HTML tags:: Using direct HTML in Org-mode
9464* Links in HTML export:: How links will be interpreted and formatted 9713* Links in HTML export:: How links will be interpreted and formatted
9465* Tables in HTML export:: How to modify the formatting of tables 9714* Tables in HTML export:: How to modify the formatting of tables
@@ -9470,7 +9719,7 @@ language, but with additional support for tables.
9470* JavaScript support:: Info and Folding in a web browser 9719* JavaScript support:: Info and Folding in a web browser
9471@end menu 9720@end menu
9472 9721
9473@node HTML Export commands, Quoting HTML tags, HTML export, HTML export 9722@node HTML Export commands, HTML preamble and postamble, HTML export, HTML export
9474@subsection HTML export commands 9723@subsection HTML export commands
9475 9724
9476@cindex region, active 9725@cindex region, active
@@ -9479,11 +9728,11 @@ language, but with additional support for tables.
9479@table @kbd 9728@table @kbd
9480@orgcmd{C-c C-e h,org-export-as-html} 9729@orgcmd{C-c C-e h,org-export-as-html}
9481@cindex property, EXPORT_FILE_NAME 9730@cindex property, EXPORT_FILE_NAME
9482Export as HTML file @file{myfile.html}. For an Org file @file{myfile.org}, 9731Export as HTML file. For an Org file @file{myfile.org},
9483the ASCII file will be @file{myfile.html}. The file will be overwritten 9732the HTML file will be @file{myfile.html}. The file will be overwritten
9484without warning. If there is an active region@footnote{This requires 9733without warning. If there is an active region@footnote{This requires
9485@code{transient-mark-mode} be turned on.}, only the region will be 9734@code{transient-mark-mode} be turned on.}, only the region will be
9486exported. If the selected region is a single tree@footnote{To select the 9735exported. If the selected region is a single tree@footnote{To select the
9487current subtree, use @kbd{C-c @@}.}, the tree head will become the document 9736current subtree, use @kbd{C-c @@}.}, the tree head will become the document
9488title. If the tree head entry has, or inherits, an @code{EXPORT_FILE_NAME} 9737title. If the tree head entry has, or inherits, an @code{EXPORT_FILE_NAME}
9489property, that name will be used for the export. 9738property, that name will be used for the export.
@@ -9519,7 +9768,43 @@ specify it with a numeric prefix argument. For example,
9519@noindent 9768@noindent
9520creates two levels of headings and does the rest as items. 9769creates two levels of headings and does the rest as items.
9521 9770
9522@node Quoting HTML tags, Links in HTML export, HTML Export commands, HTML export 9771
9772@node HTML preamble and postamble, Quoting HTML tags, HTML Export commands, HTML export
9773@subsection HTML preamble and postamble
9774@vindex org-export-html-preamble
9775@vindex org-export-html-postamble
9776@vindex org-export-html-preamble-format
9777@vindex org-export-html-postamble-format
9778@vindex org-export-html-validation-link
9779@vindex org-export-author-info
9780@vindex org-export-email-info
9781@vindex org-export-creator-info
9782@vindex org-export-time-stamp-file
9783
9784The HTML exporter lets you define a preamble and a postamble.
9785
9786The default value for @code{org-export-html-preamble} is @code{t}, which
9787means that the preamble is inserted depending on the relevant formatting
9788string in @code{org-export-html-preamble-format}.
9789
9790Setting @code{org-export-html-preamble} to a string will override the default
9791formatting string. Setting it to a function, will insert the output of the
9792function, which must be a string; such a function takes no argument but you
9793can check against the value of @code{opt-plist}, which contains the list of
9794publishing properties for the current file. Setting to @code{nil} will not
9795insert any preamble.
9796
9797The default value for @code{org-export-html-postamble} is @code{'auto}, which
9798means that the HTML exporter will look for the value of
9799@code{org-export-author-info}, @code{org-export-email-info},
9800@code{org-export-creator-info} and @code{org-export-time-stamp-file},
9801@code{org-export-html-validation-link} and build the postamble from these
9802values. Setting @code{org-export-html-postamble} to @code{t} will insert the
9803postamble from the relevant formatting string found in
9804@code{org-export-html-postamble-format}. Setting it to @code{nil} will not
9805insert any postamble.
9806
9807@node Quoting HTML tags, Links in HTML export, HTML preamble and postamble, HTML export
9523@subsection Quoting HTML tags 9808@subsection Quoting HTML tags
9524 9809
9525Plain @samp{<} and @samp{>} are always transformed to @samp{&lt;} and 9810Plain @samp{<} and @samp{>} are always transformed to @samp{&lt;} and
@@ -9624,7 +9909,7 @@ support text viewers and accessibility, and align it to the right.
9624@end example 9909@end example
9625 9910
9626@noindent 9911@noindent
9627and you could use @code{http} addresses just as well. 9912You could use @code{http} addresses just as well.
9628 9913
9629@node Math formatting in HTML export, Text areas in HTML export, Images in HTML export, HTML export 9914@node Math formatting in HTML export, Text areas in HTML export, Images in HTML export, HTML export
9630@subsection Math formatting in HTML export 9915@subsection Math formatting in HTML export
@@ -9704,7 +9989,7 @@ p.date @r{publishing date}
9704p.creator @r{creator info, about org-mode version} 9989p.creator @r{creator info, about org-mode version}
9705.title @r{document title} 9990.title @r{document title}
9706.todo @r{TODO keywords, all not-done states} 9991.todo @r{TODO keywords, all not-done states}
9707.done @r{the DONE keywords, all stated the count as done} 9992.done @r{the DONE keywords, all states that count as done}
9708.WAITING @r{each TODO keyword also uses a class named after itself} 9993.WAITING @r{each TODO keyword also uses a class named after itself}
9709.timestamp @r{timestamp} 9994.timestamp @r{timestamp}
9710.timestamp-kwd @r{keyword associated with a timestamp, like SCHEDULED} 9995.timestamp-kwd @r{keyword associated with a timestamp, like SCHEDULED}
@@ -9841,7 +10126,9 @@ compatible with xetex and possibly luatex. See the variables
9841@code{org-export-latex-packages-alist}.}, this backend is also used to 10126@code{org-export-latex-packages-alist}.}, this backend is also used to
9842produce PDF output. Since the @LaTeX{} output uses @file{hyperref} to 10127produce PDF output. Since the @LaTeX{} output uses @file{hyperref} to
9843implement links and cross references, the PDF output file will be fully 10128implement links and cross references, the PDF output file will be fully
9844linked. 10129linked. Beware of the fact that your @code{org} file has to be properly
10130structured in order to be correctly exported: respect the hierarchy of
10131sections.
9845 10132
9846@menu 10133@menu
9847* LaTeX/PDF export commands:: Which key invokes which commands 10134* LaTeX/PDF export commands:: Which key invokes which commands
@@ -9861,17 +10148,17 @@ linked.
9861@table @kbd 10148@table @kbd
9862@orgcmd{C-c C-e l,org-export-as-latex} 10149@orgcmd{C-c C-e l,org-export-as-latex}
9863@cindex property EXPORT_FILE_NAME 10150@cindex property EXPORT_FILE_NAME
9864Export as @LaTeX{} file @file{myfile.tex}. For an Org file 10151Export as @LaTeX{} file. For an Org file
9865@file{myfile.org}, the ASCII file will be @file{myfile.tex}. The file will 10152@file{myfile.org}, the @LaTeX{} file will be @file{myfile.tex}. The file will
9866be overwritten without warning. If there is an active region@footnote{This 10153be overwritten without warning. If there is an active region@footnote{This
9867requires @code{transient-mark-mode} be turned on.}, only the region will be 10154requires @code{transient-mark-mode} be turned on.}, only the region will be
9868exported. If the selected region is a single tree@footnote{To select the 10155exported. If the selected region is a single tree@footnote{To select the
9869current subtree, use @kbd{C-c @@}.}, the tree head will become the document 10156current subtree, use @kbd{C-c @@}.}, the tree head will become the document
9870title. If the tree head entry has or inherits an @code{EXPORT_FILE_NAME} 10157title. If the tree head entry has or inherits an @code{EXPORT_FILE_NAME}
9871property, that name will be used for the export. 10158property, that name will be used for the export.
9872@orgcmd{C-c C-e L,org-export-as-latex-to-buffer} 10159@orgcmd{C-c C-e L,org-export-as-latex-to-buffer}
9873Export to a temporary buffer. Do not create a file. 10160Export to a temporary buffer. Do not create a file.
9874@item C-c C-e v l/L 10161@item C-c C-e v l/L
9875Export only the visible part of the document. 10162Export only the visible part of the document.
9876@item M-x org-export-region-as-latex 10163@item M-x org-export-region-as-latex
9877Convert the region to @LaTeX{} under the assumption that it was Org-mode 10164Convert the region to @LaTeX{} under the assumption that it was Org-mode
@@ -9895,7 +10182,7 @@ convert them to a custom string depending on
9895@code{org-latex-low-levels}. 10182@code{org-latex-low-levels}.
9896 10183
9897If you want that transition to occur at a different level, specify it 10184If you want that transition to occur at a different level, specify it
9898with a numeric prefix argument. For example, 10185with a numeric prefix argument. For example,
9899 10186
9900@example 10187@example
9901@kbd{C-2 C-c C-e l} 10188@kbd{C-2 C-c C-e l}
@@ -9967,12 +10254,14 @@ All lines between these markers are exported literally
9967@subsection Tables in @LaTeX{} export 10254@subsection Tables in @LaTeX{} export
9968@cindex tables, in @LaTeX{} export 10255@cindex tables, in @LaTeX{} export
9969 10256
9970For @LaTeX{} export of a table, you can specify a label and a caption 10257For @LaTeX{} export of a table, you can specify a label, a caption and
9971(@pxref{Images and tables}). You can also use the @code{ATTR_LaTeX} line to 10258placement options (@pxref{Images and tables}). You can also use the
9972request a @code{longtable} environment for the table, so that it may span 10259@code{ATTR_LaTeX} line to request a @code{longtable} environment for the
9973several pages, or provide the @code{multicolumn} keyword that will make the 10260table, so that it may span several pages, or to change the default table
9974table span the page in a multicolumn environment (@code{table*} environment). 10261environment from @code{table} to @code{table*} or to change the default inner
9975Finally, you can set the alignment string: 10262tabular environment to @code{tabularx} or @code{tabulary}. Finally, you can
10263set the alignment string, and (with @code{tabularx} or @code{tabulary}) the
10264width:
9976 10265
9977@cindex #+CAPTION 10266@cindex #+CAPTION
9978@cindex #+LABEL 10267@cindex #+LABEL
@@ -9985,6 +10274,18 @@ Finally, you can set the alignment string:
9985| ..... | ..... | 10274| ..... | ..... |
9986@end example 10275@end example
9987 10276
10277or to specify a multicolumn table with @code{tabulary}
10278
10279@cindex #+CAPTION
10280@cindex #+LABEL
10281@cindex #+ATTR_LaTeX
10282@example
10283#+CAPTION: A wide table with tabulary
10284#+LABEL: tbl:wide
10285#+ATTR_LaTeX: table* tabulary width=\textwidth
10286| ..... | ..... |
10287| ..... | ..... |
10288@end example
9988 10289
9989@node Images in LaTeX export, Beamer class export, Tables in LaTeX export, LaTeX and PDF export 10290@node Images in LaTeX export, Beamer class export, Tables in LaTeX export, LaTeX and PDF export
9990@subsection Images in @LaTeX{} export 10291@subsection Images in @LaTeX{} export
@@ -9997,11 +10298,18 @@ output file resulting from @LaTeX{} processing. Org will use an
9997@code{\includegraphics} macro to insert the image. If you have specified a 10298@code{\includegraphics} macro to insert the image. If you have specified a
9998caption and/or a label as described in @ref{Images and tables}, the figure 10299caption and/or a label as described in @ref{Images and tables}, the figure
9999will be wrapped into a @code{figure} environment and thus become a floating 10300will be wrapped into a @code{figure} environment and thus become a floating
10000element. You can use an @code{#+ATTR_LaTeX:} line to specify the various 10301element. You can use an @code{#+ATTR_LaTeX:} line to specify various other
10001options that can be used in the optional argument of the 10302options. You can ask org to export an image as a float without specifying
10002@code{\includegraphics} macro. To modify the placement option of the 10303a label or a caption by using the keyword @code{float} in this line. Various
10003@code{figure} environment, add something like @samp{placement=[h!]} to the 10304optional arguments to the @code{\includegraphics} macro can also be specified
10004Attributes. 10305in this fashion. To modify the placement option of the floating environment,
10306add something like @samp{placement=[h!]} to the attributes. It is to be noted
10307this option can be used with tables as well@footnote{One can also take
10308advantage of this option to pass other, unrelated options into the figure or
10309table environment. For an example see the section ``Exporting org files'' in
10310@url{http://orgmode.org/worg/org-hacks.html}}. For example the
10311@code{#+ATTR_LaTeX:} line below is exported as the @code{figure} environment
10312below it.
10005 10313
10006If you would like to let text flow around the image, add the word @samp{wrap} 10314If you would like to let text flow around the image, add the word @samp{wrap}
10007to the @code{#+ATTR_LaTeX:} line, which will make the figure occupy the left 10315to the @code{#+ATTR_LaTeX:} line, which will make the figure occupy the left
@@ -10023,6 +10331,10 @@ for @code{\includegraphics} and @code{wrapfigure}.
10023[[./img/hst.png]] 10331[[./img/hst.png]]
10024@end example 10332@end example
10025 10333
10334If you wish to include an image which spans multiple columns in a page, you
10335can use the keyword @code{multicolumn} in the @code{#+ATTR_LaTeX} line. This
10336will export the image wrapped in a @code{figure*} environment.
10337
10026If you need references to a label created in this way, write 10338If you need references to a label created in this way, write
10027@samp{\ref@{fig:SED-HR4049@}} just like in @LaTeX{}. 10339@samp{\ref@{fig:SED-HR4049@}} just like in @LaTeX{}.
10028 10340
@@ -10153,7 +10465,7 @@ Here is a simple example Org document that is intended for beamer export.
10153 10465
10154For more information, see the documentation on Worg. 10466For more information, see the documentation on Worg.
10155 10467
10156@node DocBook export, TaskJuggler export, LaTeX and PDF export, Exporting 10468@node DocBook export, OpenDocumentText export, LaTeX and PDF export, Exporting
10157@section DocBook export 10469@section DocBook export
10158@cindex DocBook export 10470@cindex DocBook export
10159@cindex PDF export 10471@cindex PDF export
@@ -10255,7 +10567,7 @@ exported DocBook XML files invalid by not quoting DocBook code correctly.
10255@cindex DocBook recursive sections 10567@cindex DocBook recursive sections
10256 10568
10257DocBook exporter exports Org files as articles using the @code{article} 10569DocBook exporter exports Org files as articles using the @code{article}
10258element in DocBook. Recursive sections, i.e. @code{section} elements, are 10570element in DocBook. Recursive sections, i.e.@: @code{section} elements, are
10259used in exported articles. Top level headlines in Org files are exported as 10571used in exported articles. Top level headlines in Org files are exported as
10260top level sections, and lower level headlines are exported as nested 10572top level sections, and lower level headlines are exported as nested
10261sections. The entire structure of Org files will be exported completely, no 10573sections. The entire structure of Org files will be exported completely, no
@@ -10350,7 +10662,155 @@ special characters included in XHTML entities:
10350" 10662"
10351@end example 10663@end example
10352 10664
10353@node TaskJuggler export, Freemind export, DocBook export, Exporting 10665@c begin opendocument
10666
10667@node OpenDocumentText export, TaskJuggler export, DocBook export, Exporting
10668@section OpenDocumentText export
10669@cindex OpenDocumentText export
10670@cindex K, Jambunathan
10671
10672Org-mode 7.6 supports export to OpenDocumentText format using
10673@file{org-odt.el} module contributed by Jambunathan K. This module can be
10674enabled in one of the following ways based on your mode of installation.
10675
10676@enumerate
10677@item
10678If you have downloaded the Org from the Web, either as a distribution
10679@file{.zip} or @file{.tar} file, or as a Git archive, enable the @code{odt}
10680option in variable @code{org-modules}.
10681@item
10682If you are using Org that comes bundled with Emacs, then you can install the
10683OpenDocumentText exporter using the package manager. To do this, customize
10684the variable @code{package-archives} to include
10685@uref{http://orgmode.org/pkg/releases/} as one of the package archives.
10686@end enumerate
10687
10688@menu
10689* OpenDocumentText export commands::How to invoke OpenDocumentText export
10690* Applying Custom Styles:: How to apply custom styles to the output
10691* Converting to Other formats:: How to convert to formats like doc, docx etc
10692* Links in OpenDocumentText export:: How links will be interpreted and formatted
10693* Tables in OpenDocumentText export:: Tables are exported as HTML tables
10694* Images in OpenDocumentText export:: How to insert figures into DocBook output
10695* Additional Documentation:: Where to find more information
10696@end menu
10697
10698@node OpenDocumentText export commands, Applying Custom Styles, OpenDocumentText export, OpenDocumentText export
10699@subsection OpenDocumentText export commands
10700
10701@cindex region, active
10702@cindex active region
10703@cindex transient-mark-mode
10704@table @kbd
10705@orgcmd{C-c C-e o,org-export-as-odt}
10706@cindex property EXPORT_FILE_NAME
10707Export as OpenDocumentText file. For an Org file, @file{myfile.org}, the
10708OpenDocumentText file will be @file{myfile.odt}. The file will be
10709overwritten without warning. If there is an active region@footnote{This
10710requires @code{transient-mark-mode} to be turned on}, only the region will be
10711exported. If the selected region is a single tree@footnote{To select the
10712current subtree, use @kbd{C-c @@}.}, the tree head will become the document
10713title. If the tree head entry has, or inherits, an @code{EXPORT_FILE_NAME}
10714property, that name will be used for the export.
10715@orgcmd{C-c C-e O,org-export-as-odt-and-open}
10716Export as OpenDocumentText file and open the resulting file.
10717@end table
10718
10719@node Applying Custom Styles, Converting to Other formats, OpenDocumentText export commands, OpenDocumentText export
10720@subsection Applying Custom Styles
10721@cindex styles, custom
10722@cindex template, custom
10723
10724@vindex org-export-odt-styles-file
10725
10726OpenDocumentExporter ships with a custom @file{styles.xml} for formatting of
10727the exported file. To customize the output to suit your needs you can use
10728one of the following methods:
10729
10730@enumerate
10731@item
10732Customize the variable @code{org-export-odt-styles-file} to point to either a
10733@file{styles.xml} file, a OpenDocument Text Template file @code{.ott} or a
10734combination of Text or Template Document together with a set of member files.
10735Use the first two options if the styles.xml has no references to additional
10736set of files and use the last option if the @file{styles.xml} references
10737additional files like header and footer images.
10738@item
10739Use an external tool like unoconv to apply custom templates.
10740@end enumerate
10741
10742For best results, it is necessary that the style names used by
10743OpenDocumentText exporter match that used in the @file{styles.xml}.
10744
10745@node Converting to Other formats, Links in OpenDocumentText export, Applying Custom Styles, OpenDocumentText export
10746@subsection Converting to Other formats
10747
10748@cindex convert
10749@cindex doc, docx
10750
10751@vindex org-export-odt-styles-file
10752
10753Often times there is a need to convert OpenDocumentText files to other
10754formats like doc, docx or pdf. You can accomplish this by one of the
10755following methods:
10756
10757@table @kbd
10758@item M-x org-lparse
10759Export the outline first to one of the native formats (like OpenDocumentText)
10760and immediately post-process it to other formats using an external converter.
10761
10762@item M-x org-lparse-convert
10763Export an existing document to other formats using an external converter.
10764@end table
10765
10766You can choose the converter used for conversion by customizing the variable
10767@code{org-lparse-convert-process}.
10768
10769@node Links in OpenDocumentText export, Tables in OpenDocumentText export, Converting to Other formats, OpenDocumentText export
10770@subsection Links in OpenDocumentText export
10771@cindex tables, in DocBook export
10772
10773OpenDocumentExporter creates cross-references (aka bookmarks) for links that
10774are destined locally. It creates internet style links for all other links.
10775
10776@node Tables in OpenDocumentText export, Images in OpenDocumentText export, Links in OpenDocumentText export, OpenDocumentText export
10777@subsection Tables in OpenDocumentText export
10778@cindex tables, in DocBook export
10779
10780Export of @file{table.el} tables with row or column spanning is not
10781supported. Such tables are stripped from the exported document.
10782
10783@node Images in OpenDocumentText export, Additional Documentation, Tables in OpenDocumentText export, OpenDocumentText export
10784@subsection Images in OpenDocumentText export
10785@cindex images, embedding in OpenDocumentText
10786@cindex embedding images in OpenDocumentText
10787
10788OpenDocumentText exporter can embed images within the exported document. To
10789embed images, provide a link to the desired image file with no link
10790description. For example, the following links @samp{[[file:img.jpg]]} or
10791@samp{[[./img.jpg]]}, will result in embedding of @samp{img.jpg} in the
10792exported file.
10793
10794The exporter can also embed scaled and explicitly sized images within the
10795exported document. The markup of the scale and size specifications has not
10796been standardized yet and is hence conveniently skipped in this document.
10797
10798The exporter can also make an image the clickable part of a link. To create
10799clickable images, provide a link whose description is a link to an image
10800file. For example, the following link
10801@samp{[[http://orgmode.org][./img.jpg]]}, will result in a clickable image
10802that links to @uref{http://Orgmode.org} website.
10803
10804@node Additional Documentation, , Images in OpenDocumentText export, OpenDocumentText export
10805@subsection Additional documentation
10806
10807The OpenDocumentText exporter is still in development. For up to date
10808information, please follow Org mailing list @email{emacs-orgmode@@gnu.org}
10809closely.
10810
10811@c end opendocument
10812
10813@node TaskJuggler export, Freemind export, OpenDocumentText export, Exporting
10354@section TaskJuggler export 10814@section TaskJuggler export
10355@cindex TaskJuggler export 10815@cindex TaskJuggler export
10356@cindex Project management 10816@cindex Project management
@@ -10366,7 +10826,7 @@ nodes of a document or strictly follow the order of the nodes in the
10366document. 10826document.
10367 10827
10368Instead the TaskJuggler exporter looks for a tree that defines the tasks and 10828Instead the TaskJuggler exporter looks for a tree that defines the tasks and
10369a optionally tree that defines the resources for this project. It then 10829a optionally tree that defines the resources for this project. It then
10370creates a TaskJuggler file based on these trees and the attributes defined in 10830creates a TaskJuggler file based on these trees and the attributes defined in
10371all the nodes. 10831all the nodes.
10372 10832
@@ -10383,30 +10843,30 @@ Export as TaskJuggler file and then open the file with TaskJugglerUI.
10383@subsection Tasks 10843@subsection Tasks
10384 10844
10385@vindex org-export-taskjuggler-project-tag 10845@vindex org-export-taskjuggler-project-tag
10386Create your tasks as you usually do with Org-mode. Assign efforts to each 10846Create your tasks as you usually do with Org-mode. Assign efforts to each
10387task using properties (it's easiest to do this in the column view). You 10847task using properties (it is easiest to do this in the column view). You
10388should end up with something similar to the example by Peter Jones in 10848should end up with something similar to the example by Peter Jones in
10389@url{http://www.contextualdevelopment.com/static/artifacts/articles/2008/project-planning/project-planning.org}. 10849@url{http://www.contextualdevelopment.com/static/artifacts/articles/2008/project-planning/project-planning.org}.
10390Now mark the top node of your tasks with a tag named 10850Now mark the top node of your tasks with a tag named
10391@code{:taskjuggler_project:} (or whatever you customized 10851@code{:taskjuggler_project:} (or whatever you customized
10392@code{org-export-taskjuggler-project-tag} to). You are now ready to export 10852@code{org-export-taskjuggler-project-tag} to). You are now ready to export
10393the project plan with @kbd{C-c C-e J} which will export the project plan and 10853the project plan with @kbd{C-c C-e J} which will export the project plan and
10394open a gantt chart in TaskJugglerUI. 10854open a gantt chart in TaskJugglerUI.
10395 10855
10396@subsection Resources 10856@subsection Resources
10397 10857
10398@vindex org-export-taskjuggler-resource-tag 10858@vindex org-export-taskjuggler-resource-tag
10399Next you can define resources and assign those to work on specific tasks. You 10859Next you can define resources and assign those to work on specific tasks. You
10400can group your resources hierarchically. Tag the top node of the resources 10860can group your resources hierarchically. Tag the top node of the resources
10401with @code{:taskjuggler_resource:} (or whatever you customized 10861with @code{:taskjuggler_resource:} (or whatever you customized
10402@code{org-export-taskjuggler-resource-tag} to). You can optionally assign an 10862@code{org-export-taskjuggler-resource-tag} to). You can optionally assign an
10403identifier (named @samp{resource_id}) to the resources (using the standard 10863identifier (named @samp{resource_id}) to the resources (using the standard
10404Org properties commands, @pxref{Property syntax}) or you can let the exporter 10864Org properties commands, @pxref{Property syntax}) or you can let the exporter
10405generate identifiers automatically (the exporter picks the first word of the 10865generate identifiers automatically (the exporter picks the first word of the
10406headline as the identifier as long as it is unique---see the documentation of 10866headline as the identifier as long as it is unique---see the documentation of
10407@code{org-taskjuggler-get-unique-id}). Using that identifier you can then 10867@code{org-taskjuggler-get-unique-id}). Using that identifier you can then
10408allocate resources to tasks. This is again done with the @samp{allocate} 10868allocate resources to tasks. This is again done with the @samp{allocate}
10409property on the tasks. Do this in column view or when on the task type 10869property on the tasks. Do this in column view or when on the task type
10410@kbd{C-c C-x p allocate @key{RET} <resource_id> @key{RET}}. 10870@kbd{C-c C-x p allocate @key{RET} <resource_id> @key{RET}}.
10411 10871
10412Once the allocations are done you can again export to TaskJuggler and check 10872Once the allocations are done you can again export to TaskJuggler and check
@@ -10415,9 +10875,9 @@ time.
10415 10875
10416@subsection Export of properties 10876@subsection Export of properties
10417 10877
10418The exporter also takes TODO state information into consideration, i.e. if a 10878The exporter also takes TODO state information into consideration, i.e.@: if a
10419task is marked as done it will have the corresponding attribute in 10879task is marked as done it will have the corresponding attribute in
10420TaskJuggler (@samp{complete 100}). Also it will export any property on a task 10880TaskJuggler (@samp{complete 100}). Also it will export any property on a task
10421resource or resource node which is known to TaskJuggler, such as 10881resource or resource node which is known to TaskJuggler, such as
10422@samp{limits}, @samp{vacation}, @samp{shift}, @samp{booking}, 10882@samp{limits}, @samp{vacation}, @samp{shift}, @samp{booking},
10423@samp{efficiency}, @samp{journalentry}, @samp{rate} for resources or 10883@samp{efficiency}, @samp{journalentry}, @samp{rate} for resources or
@@ -10430,12 +10890,12 @@ resource or resource node which is known to TaskJuggler, such as
10430The exporter will handle dependencies that are defined in the tasks either 10890The exporter will handle dependencies that are defined in the tasks either
10431with the @samp{ORDERED} attribute (@pxref{TODO dependencies}), with the 10891with the @samp{ORDERED} attribute (@pxref{TODO dependencies}), with the
10432@samp{BLOCKER} attribute (see @file{org-depend.el}) or alternatively with a 10892@samp{BLOCKER} attribute (see @file{org-depend.el}) or alternatively with a
10433@samp{depends} attribute. Both the @samp{BLOCKER} and the @samp{depends} 10893@samp{depends} attribute. Both the @samp{BLOCKER} and the @samp{depends}
10434attribute can be either @samp{previous-sibling} or a reference to an 10894attribute can be either @samp{previous-sibling} or a reference to an
10435identifier (named @samp{task_id}) which is defined for another task in the 10895identifier (named @samp{task_id}) which is defined for another task in the
10436project. @samp{BLOCKER} and the @samp{depends} attribute can define multiple 10896project. @samp{BLOCKER} and the @samp{depends} attribute can define multiple
10437dependencies separated by either space or comma. You can also specify 10897dependencies separated by either space or comma. You can also specify
10438optional attributes on the dependency by simply appending it. The following 10898optional attributes on the dependency by simply appending it. The following
10439examples should illustrate this: 10899examples should illustrate this:
10440 10900
10441@example 10901@example
@@ -10451,15 +10911,15 @@ examples should illustrate this:
10451 :END: 10911 :END:
10452** Markup Guidelines 10912** Markup Guidelines
10453 :PROPERTIES: 10913 :PROPERTIES:
10454 :Effort: 2.0 10914 :Effort: 2d
10455 :END: 10915 :END:
10456** Workflow Guidelines 10916** Workflow Guidelines
10457 :PROPERTIES: 10917 :PROPERTIES:
10458 :Effort: 2.0 10918 :Effort: 2d
10459 :END: 10919 :END:
10460* Presentation 10920* Presentation
10461 :PROPERTIES: 10921 :PROPERTIES:
10462 :Effort: 2.0 10922 :Effort: 2d
10463 :BLOCKER: training_material @{ gapduration 1d @} preparation 10923 :BLOCKER: training_material @{ gapduration 1d @} preparation
10464 :END: 10924 :END:
10465@end example 10925@end example
@@ -10467,16 +10927,16 @@ examples should illustrate this:
10467@subsection Reports 10927@subsection Reports
10468 10928
10469@vindex org-export-taskjuggler-default-reports 10929@vindex org-export-taskjuggler-default-reports
10470TaskJuggler can produce many kinds of reports (e.g. gantt chart, resource 10930TaskJuggler can produce many kinds of reports (e.g.@: gantt chart, resource
10471allocation, etc). The user defines what kind of reports should be generated 10931allocation, etc). The user defines what kind of reports should be generated
10472for a project in the TaskJuggler file. The exporter will automatically insert 10932for a project in the TaskJuggler file. The exporter will automatically insert
10473some default reports in the file. These defaults are defined in 10933some default reports in the file. These defaults are defined in
10474@code{org-export-taskjuggler-default-reports}. They can be modified using 10934@code{org-export-taskjuggler-default-reports}. They can be modified using
10475customize along with a number of other options. For a more complete list, see 10935customize along with a number of other options. For a more complete list, see
10476@kbd{M-x customize-group @key{RET} org-export-taskjuggler @key{RET}}. 10936@kbd{M-x customize-group @key{RET} org-export-taskjuggler @key{RET}}.
10477 10937
10478For more information and examples see the Org-taskjuggler tutorial at 10938For more information and examples see the Org-taskjuggler tutorial at
10479@uref{http://orgmode.org/worg/org-tutorials/org-taskjuggler.php}. 10939@uref{http://orgmode.org/worg/org-tutorials/org-taskjuggler.html}.
10480 10940
10481@node Freemind export, XOXO export, TaskJuggler export, Exporting 10941@node Freemind export, XOXO export, TaskJuggler export, Exporting
10482@section Freemind export 10942@section Freemind export
@@ -10487,7 +10947,8 @@ The Freemind exporter was written by Lennart Borgman.
10487 10947
10488@table @kbd 10948@table @kbd
10489@orgcmd{C-c C-e m,org-export-as-freemind} 10949@orgcmd{C-c C-e m,org-export-as-freemind}
10490Export as Freemind mind map @file{myfile.mm}. 10950Export as Freemind mind map. For an Org file @file{myfile.org}, the Freemind
10951file will be @file{myfile.mm}.
10491@end table 10952@end table
10492 10953
10493@node XOXO export, iCalendar export, Freemind export, Exporting 10954@node XOXO export, iCalendar export, Freemind export, Exporting
@@ -10500,7 +10961,8 @@ does not interpret any additional Org-mode features.
10500 10961
10501@table @kbd 10962@table @kbd
10502@orgcmd{C-c C-e x,org-export-as-xoxo} 10963@orgcmd{C-c C-e x,org-export-as-xoxo}
10503Export as XOXO file @file{myfile.html}. 10964Export as XOXO file. For an Org file @file{myfile.org}, the XOXO file will be
10965@file{myfile.html}.
10504@orgkey{C-c C-e v x} 10966@orgkey{C-c C-e v x}
10505Export only the visible part of the document. 10967Export only the visible part of the document.
10506@end table 10968@end table
@@ -10607,7 +11069,7 @@ and many other properties of a project.
10607* Sources and destinations:: From here to there 11069* Sources and destinations:: From here to there
10608* Selecting files:: What files are part of the project? 11070* Selecting files:: What files are part of the project?
10609* Publishing action:: Setting the function doing the publishing 11071* Publishing action:: Setting the function doing the publishing
10610* Publishing options:: Tweaking HTML export 11072* Publishing options:: Tweaking HTML/@LaTeX{} export
10611* Publishing links:: Which links keep working after publishing? 11073* Publishing links:: Which links keep working after publishing?
10612* Sitemap:: Generating a list of all pages 11074* Sitemap:: Generating a list of all pages
10613* Generating an index:: An index that reaches across pages 11075* Generating an index:: An index that reaches across pages
@@ -10624,8 +11086,8 @@ variable, called @code{org-publish-project-alist}. Each element of the list
10624configures one project, and may be in one of the two following forms: 11086configures one project, and may be in one of the two following forms:
10625 11087
10626@lisp 11088@lisp
10627 ("project-name" :property value :property value ...) 11089 ("project-name" :property value :property value ...)
10628 @r{i.e. a well-formed property list with alternating keys and values} 11090 @r{i.e.@: a well-formed property list with alternating keys and values}
10629@r{or} 11091@r{or}
10630 ("project-name" :components ("project-name" "project-name" ...)) 11092 ("project-name" :components ("project-name" "project-name" ...))
10631 11093
@@ -10762,6 +11224,8 @@ respective variable for details.
10762@vindex org-export-with-drawers 11224@vindex org-export-with-drawers
10763@vindex org-export-with-tags 11225@vindex org-export-with-tags
10764@vindex org-export-with-todo-keywords 11226@vindex org-export-with-todo-keywords
11227@vindex org-export-with-tasks
11228@vindex org-export-with-done-tasks
10765@vindex org-export-with-priority 11229@vindex org-export-with-priority
10766@vindex org-export-with-TeX-macros 11230@vindex org-export-with-TeX-macros
10767@vindex org-export-with-LaTeX-fragments 11231@vindex org-export-with-LaTeX-fragments
@@ -10769,11 +11233,13 @@ respective variable for details.
10769@vindex org-export-with-fixed-width 11233@vindex org-export-with-fixed-width
10770@vindex org-export-with-timestamps 11234@vindex org-export-with-timestamps
10771@vindex org-export-author-info 11235@vindex org-export-author-info
10772@vindex org-export-email 11236@vindex org-export-email-info
10773@vindex org-export-creator-info 11237@vindex org-export-creator-info
11238@vindex org-export-time-stamp-file
10774@vindex org-export-with-tables 11239@vindex org-export-with-tables
10775@vindex org-export-highlight-first-table-line 11240@vindex org-export-highlight-first-table-line
10776@vindex org-export-html-style-include-default 11241@vindex org-export-html-style-include-default
11242@vindex org-export-html-style-include-scripts
10777@vindex org-export-html-style 11243@vindex org-export-html-style
10778@vindex org-export-html-style-extra 11244@vindex org-export-html-style-extra
10779@vindex org-export-html-link-org-files-as-html 11245@vindex org-export-html-link-org-files-as-html
@@ -10785,8 +11251,6 @@ respective variable for details.
10785@vindex org-export-publishing-directory 11251@vindex org-export-publishing-directory
10786@vindex org-export-html-preamble 11252@vindex org-export-html-preamble
10787@vindex org-export-html-postamble 11253@vindex org-export-html-postamble
10788@vindex org-export-html-auto-preamble
10789@vindex org-export-html-auto-postamble
10790@vindex user-full-name 11254@vindex user-full-name
10791@vindex user-mail-address 11255@vindex user-mail-address
10792@vindex org-export-select-tags 11256@vindex org-export-select-tags
@@ -10810,6 +11274,7 @@ respective variable for details.
10810@item @code{:drawers} @tab @code{org-export-with-drawers} 11274@item @code{:drawers} @tab @code{org-export-with-drawers}
10811@item @code{:tags} @tab @code{org-export-with-tags} 11275@item @code{:tags} @tab @code{org-export-with-tags}
10812@item @code{:todo-keywords} @tab @code{org-export-with-todo-keywords} 11276@item @code{:todo-keywords} @tab @code{org-export-with-todo-keywords}
11277@item @code{:tasks} @tab @code{org-export-with-tasks}
10813@item @code{:priority} @tab @code{org-export-with-priority} 11278@item @code{:priority} @tab @code{org-export-with-priority}
10814@item @code{:TeX-macros} @tab @code{org-export-with-TeX-macros} 11279@item @code{:TeX-macros} @tab @code{org-export-with-TeX-macros}
10815@item @code{:LaTeX-fragments} @tab @code{org-export-with-LaTeX-fragments} 11280@item @code{:LaTeX-fragments} @tab @code{org-export-with-LaTeX-fragments}
@@ -10817,28 +11282,27 @@ respective variable for details.
10817@item @code{:skip-before-1st-heading} @tab @code{org-export-skip-text-before-1st-heading} 11282@item @code{:skip-before-1st-heading} @tab @code{org-export-skip-text-before-1st-heading}
10818@item @code{:fixed-width} @tab @code{org-export-with-fixed-width} 11283@item @code{:fixed-width} @tab @code{org-export-with-fixed-width}
10819@item @code{:timestamps} @tab @code{org-export-with-timestamps} 11284@item @code{:timestamps} @tab @code{org-export-with-timestamps}
11285@item @code{:author} @tab @code{user-full-name}
11286@item @code{:email} @tab @code{user-mail-address} : @code{addr;addr;..}
10820@item @code{:author-info} @tab @code{org-export-author-info} 11287@item @code{:author-info} @tab @code{org-export-author-info}
10821@item @code{:email-info} @tab @code{org-export-email-info} 11288@item @code{:email-info} @tab @code{org-export-email-info}
10822@item @code{:creator-info} @tab @code{org-export-creator-info} 11289@item @code{:creator-info} @tab @code{org-export-creator-info}
10823@item @code{:tables} @tab @code{org-export-with-tables} 11290@item @code{:tables} @tab @code{org-export-with-tables}
10824@item @code{:table-auto-headline} @tab @code{org-export-highlight-first-table-line} 11291@item @code{:table-auto-headline} @tab @code{org-export-highlight-first-table-line}
10825@item @code{:style-include-default} @tab @code{org-export-html-style-include-default} 11292@item @code{:style-include-default} @tab @code{org-export-html-style-include-default}
11293@item @code{:style-include-scripts} @tab @code{org-export-html-style-include-scripts}
10826@item @code{:style} @tab @code{org-export-html-style} 11294@item @code{:style} @tab @code{org-export-html-style}
10827@item @code{:style-extra} @tab @code{org-export-html-style-extra} 11295@item @code{:style-extra} @tab @code{org-export-html-style-extra}
10828@item @code{:convert-org-links} @tab @code{org-export-html-link-org-files-as-html} 11296@item @code{:convert-org-links} @tab @code{org-export-html-link-org-files-as-html}
10829@item @code{:inline-images} @tab @code{org-export-html-inline-images} 11297@item @code{:inline-images} @tab @code{org-export-html-inline-images}
10830@item @code{:html-extension} @tab @code{org-export-html-extension} 11298@item @code{:html-extension} @tab @code{org-export-html-extension}
11299@item @code{:html-preamble} @tab @code{org-export-html-preamble}
11300@item @code{:html-postamble} @tab @code{org-export-html-postamble}
10831@item @code{:xml-declaration} @tab @code{org-export-html-xml-declaration} 11301@item @code{:xml-declaration} @tab @code{org-export-html-xml-declaration}
10832@item @code{:html-table-tag} @tab @code{org-export-html-table-tag} 11302@item @code{:html-table-tag} @tab @code{org-export-html-table-tag}
10833@item @code{:expand-quoted-html} @tab @code{org-export-html-expand} 11303@item @code{:expand-quoted-html} @tab @code{org-export-html-expand}
10834@item @code{:timestamp} @tab @code{org-export-html-with-timestamp} 11304@item @code{:timestamp} @tab @code{org-export-html-with-timestamp}
10835@item @code{:publishing-directory} @tab @code{org-export-publishing-directory} 11305@item @code{:publishing-directory} @tab @code{org-export-publishing-directory}
10836@item @code{:preamble} @tab @code{org-export-html-preamble}
10837@item @code{:postamble} @tab @code{org-export-html-postamble}
10838@item @code{:auto-preamble} @tab @code{org-export-html-auto-preamble}
10839@item @code{:auto-postamble} @tab @code{org-export-html-auto-postamble}
10840@item @code{:author} @tab @code{user-full-name}
10841@item @code{:email} @tab @code{user-mail-address} : @code{addr;addr;..}
10842@item @code{:select-tags} @tab @code{org-export-select-tags} 11306@item @code{:select-tags} @tab @code{org-export-select-tags}
10843@item @code{:exclude-tags} @tab @code{org-export-exclude-tags} 11307@item @code{:exclude-tags} @tab @code{org-export-exclude-tags}
10844@item @code{:latex-image-options} @tab @code{org-export-latex-image-default-option} 11308@item @code{:latex-image-options} @tab @code{org-export-latex-image-default-option}
@@ -10846,8 +11310,11 @@ respective variable for details.
10846 11310
10847Most of the @code{org-export-with-*} variables have the same effect in 11311Most of the @code{org-export-with-*} variables have the same effect in
10848both HTML and @LaTeX{} exporters, except for @code{:TeX-macros} and 11312both HTML and @LaTeX{} exporters, except for @code{:TeX-macros} and
10849@code{:LaTeX-fragments}, respectively @code{nil} and @code{t} in the 11313@code{:LaTeX-fragments} options, respectively @code{nil} and @code{t} in the
10850@LaTeX{} export. 11314@LaTeX{} export. See @code{org-export-plist-vars} to check this list of
11315options.
11316
11317
10851 11318
10852@vindex org-publish-project-alist 11319@vindex org-publish-project-alist
10853When a property is given a value in @code{org-publish-project-alist}, 11320When a property is given a value in @code{org-publish-project-alist},
@@ -10869,9 +11336,9 @@ to link to that, use an @code{http:} link instead of a @code{file:} link,
10869because @code{file:} links are converted to link to the corresponding 11336because @code{file:} links are converted to link to the corresponding
10870@file{html} file. 11337@file{html} file.
10871 11338
10872You may also link to related files, such as images. Provided you are careful 11339You may also link to related files, such as images. Provided you are careful
10873with relative file names, and provided you have also configured Org to upload 11340with relative file names, and provided you have also configured Org to upload
10874the related files, these links will work too. See @ref{Complex example}, for 11341the related files, these links will work too. See @ref{Complex example}, for
10875an example of this usage. 11342an example of this usage.
10876 11343
10877Sometimes an Org file to be published may contain links that are 11344Sometimes an Org file to be published may contain links that are
@@ -10905,11 +11372,11 @@ a map of files for a given project.
10905or @code{org-publish-all}. 11372or @code{org-publish-all}.
10906 11373
10907@item @code{:sitemap-filename} 11374@item @code{:sitemap-filename}
10908@tab Filename for output of sitemap. Defaults to @file{sitemap.org} (which 11375@tab Filename for output of sitemap. Defaults to @file{sitemap.org} (which
10909becomes @file{sitemap.html}). 11376becomes @file{sitemap.html}).
10910 11377
10911@item @code{:sitemap-title} 11378@item @code{:sitemap-title}
10912@tab Title of sitemap page. Defaults to name of file. 11379@tab Title of sitemap page. Defaults to name of file.
10913 11380
10914@item @code{:sitemap-function} 11381@item @code{:sitemap-function}
10915@tab Plug-in function to use for generation of the sitemap. 11382@tab Plug-in function to use for generation of the sitemap.
@@ -10921,13 +11388,35 @@ of links to all files in the project.
10921(default) or @code{last} to display folders first or last, 11388(default) or @code{last} to display folders first or last,
10922respectively. Any other value will mix files and folders. 11389respectively. Any other value will mix files and folders.
10923 11390
10924@item @code{:sitemap-alphabetically} 11391@item @code{:sitemap-sort-files}
10925@tab The site map is normally sorted alphabetically. Set this explicitly to 11392@tab How the files are sorted in the site map. Set this to
10926@code{nil} to turn off sorting. 11393@code{alphabetically} (default), @code{chronologically} or
11394@code{anti-chronologically}. @code{chronologically} sorts the files with
11395older date first while @code{anti-chronologically} sorts the files with newer
11396date first. @code{alphabetically} sorts the files alphabetically. The date of
11397a file is retrieved with @code{org-publish-find-date}.
10927 11398
10928@item @code{:sitemap-ignore-case} 11399@item @code{:sitemap-ignore-case}
10929@tab Should sorting be case-sensitive? Default @code{nil}. 11400@tab Should sorting be case-sensitive? Default @code{nil}.
10930 11401
11402@item @code{:sitemap-file-entry-format}
11403@tab With this option one can tell how a sitemap's entry is formated in the
11404sitemap. This is a format string with some escape sequences: @code{%t} stands
11405for the title of the file, @code{%a} stands for the author of the file and
11406@code{%d} stands for the date of the file. The date is retrieved with the
11407@code{org-publish-find-date} function and formated with
11408@code{org-publish-sitemap-date-format}. Default @code{%t}.
11409
11410@item @code{:sitemap-date-format}
11411@tab Format string for the @code{format-time-string} function that tells how
11412a sitemap entry's date is to be formated. This property bypasses
11413@code{org-publish-sitemap-date-format} which defaults to @code{%Y-%m-%d}.
11414
11415@item @code{:sitemap-sans-extension}
11416@tab When non-nil, remove filenames' extensions from the generated sitemap.
11417Useful to have cool URIs (see @uref{http://www.w3.org/Provider/Style/URI}).
11418Defaults to @code{nil}.
11419
10931@end multitable 11420@end multitable
10932 11421
10933@node Generating an index, , Sitemap, Configuration 11422@node Generating an index, , Sitemap, Configuration
@@ -10942,10 +11431,10 @@ Org-mode can generate an index across the files of a publishing project.
10942publish it as @file{theindex.html}. 11431publish it as @file{theindex.html}.
10943@end multitable 11432@end multitable
10944 11433
10945The file will be create when first publishing a project with the 11434The file will be created when first publishing a project with the
10946@code{:makeindex} set. The file only contains a statement @code{#+include: 11435@code{:makeindex} set. The file only contains a statement @code{#+include:
10947"theindex.inc"}. You can then built around this include statement by adding 11436"theindex.inc"}. You can then build around this include statement by adding
10948a title, style information etc. 11437a title, style information, etc.
10949 11438
10950@node Uploading files, Sample configuration, Configuration, Publishing 11439@node Uploading files, Sample configuration, Configuration, Publishing
10951@section Uploading files 11440@section Uploading files
@@ -11015,12 +11504,12 @@ directory on the local machine.
11015 11504
11016This more complicated example publishes an entire website, including 11505This more complicated example publishes an entire website, including
11017Org files converted to HTML, image files, Emacs Lisp source code, and 11506Org files converted to HTML, image files, Emacs Lisp source code, and
11018style sheets. The publishing directory is remote and private files are 11507style sheets. The publishing directory is remote and private files are
11019excluded. 11508excluded.
11020 11509
11021To ensure that links are preserved, care should be taken to replicate 11510To ensure that links are preserved, care should be taken to replicate
11022your directory structure on the web server, and to use relative file 11511your directory structure on the web server, and to use relative file
11023paths. For example, if your Org files are kept in @file{~/org} and your 11512paths. For example, if your Org files are kept in @file{~/org} and your
11024publishable images in @file{~/images}, you would link to an image with 11513publishable images in @file{~/images}, you would link to an image with
11025@c 11514@c
11026@example 11515@example
@@ -11028,7 +11517,7 @@ file:../images/myimage.png
11028@end example 11517@end example
11029@c 11518@c
11030On the web server, the relative path to the image should be the 11519On the web server, the relative path to the image should be the
11031same. You can accomplish this by setting up an "images" folder in the 11520same. You can accomplish this by setting up an "images" folder in the
11032right place on the web server, and publishing images to it. 11521right place on the web server, and publishing images to it.
11033 11522
11034@lisp 11523@lisp
@@ -11044,8 +11533,7 @@ right place on the web server, and publishing images to it.
11044 :table-of-contents nil 11533 :table-of-contents nil
11045 :style "<link rel=\"stylesheet\" 11534 :style "<link rel=\"stylesheet\"
11046 href=\"../other/mystyle.css\" type=\"text/css\"/>" 11535 href=\"../other/mystyle.css\" type=\"text/css\"/>"
11047 :auto-preamble t 11536 :html-preamble t)
11048 :auto-postamble nil)
11049 11537
11050 ("images" 11538 ("images"
11051 :base-directory "~/images/" 11539 :base-directory "~/images/"
@@ -11078,8 +11566,8 @@ Publish every project.
11078@end table 11566@end table
11079 11567
11080@vindex org-publish-use-timestamps-flag 11568@vindex org-publish-use-timestamps-flag
11081Org uses timestamps to track when a file has changed. The above functions 11569Org uses timestamps to track when a file has changed. The above functions
11082normally only publish changed files. You can override this and force 11570normally only publish changed files. You can override this and force
11083publishing of all files by giving a prefix argument to any of the commands 11571publishing of all files by giving a prefix argument to any of the commands
11084above, or by customizing the variable @code{org-publish-use-timestamps-flag}. 11572above, or by customizing the variable @code{org-publish-use-timestamps-flag}.
11085This may be necessary in particular if files include other files via 11573This may be necessary in particular if files include other files via
@@ -11095,7 +11583,7 @@ This may be necessary in particular if files include other files via
11095@cindex source code, working with 11583@cindex source code, working with
11096 11584
11097Source code can be included in Org-mode documents using a @samp{src} block, 11585Source code can be included in Org-mode documents using a @samp{src} block,
11098e.g. 11586e.g.@:
11099 11587
11100@example 11588@example
11101#+BEGIN_SRC emacs-lisp 11589#+BEGIN_SRC emacs-lisp
@@ -11107,7 +11595,8 @@ e.g.
11107 11595
11108Org-mode provides a number of features for working with live source code, 11596Org-mode provides a number of features for working with live source code,
11109including editing of code blocks in their native major-mode, evaluation of 11597including editing of code blocks in their native major-mode, evaluation of
11110code blocks, tangling of code blocks, and exporting code blocks and their 11598code blocks, converting code blocks into source files (known as @dfn{tangling}
11599in literate programming), and exporting code blocks and their
11111results in several formats. This functionality was contributed by Eric 11600results in several formats. This functionality was contributed by Eric
11112Schulte and Dan Davison, and was originally named Org-babel. 11601Schulte and Dan Davison, and was originally named Org-babel.
11113 11602
@@ -11145,7 +11634,8 @@ The structure of code blocks is as follows:
11145#+end_src 11634#+end_src
11146@end example 11635@end example
11147 11636
11148code blocks can also be embedded in text as so called inline code blocks as 11637Switches and header arguments are optional. Code can also be embedded in text
11638inline using
11149 11639
11150@example 11640@example
11151src_<language>@{<body>@} 11641src_<language>@{<body>@}
@@ -11163,16 +11653,18 @@ This name is associated with the code block. This is similar to the
11163@samp{#+tblname} lines that can be used to name tables in Org-mode files. 11653@samp{#+tblname} lines that can be used to name tables in Org-mode files.
11164Referencing the name of a code block makes it possible to evaluate the 11654Referencing the name of a code block makes it possible to evaluate the
11165block from other places in the file, other files, or from Org-mode table 11655block from other places in the file, other files, or from Org-mode table
11166formulas (see @ref{The spreadsheet}). 11656formulas (see @ref{The spreadsheet}). Names are assumed to be unique by
11657evaluation functions and the behavior of multiple blocks of the same name is
11658undefined.
11167@item <language> 11659@item <language>
11168The language of the code in the block. 11660The language of the code in the block.
11169@item <switches> 11661@item <switches>
11170Switches controlling exportation of the code block (see switches discussion in 11662Optional switches controlling exportation of the code block (see switches discussion in
11171@ref{Literal examples}) 11663@ref{Literal examples})
11172@item <header arguments> 11664@item <header arguments>
11173Optional header arguments control many aspects of evaluation, export and 11665Optional header arguments control many aspects of evaluation, export and
11174tangling of code blocks. See the @ref{Header arguments} 11666tangling of code blocks. See the @ref{Header arguments}.
11175section. Header arguments can also be set on a per-buffer or per-subtree 11667Header arguments can also be set on a per-buffer or per-subtree
11176basis using properties. 11668basis using properties.
11177@item <body> 11669@item <body>
11178The source code. 11670The source code.
@@ -11187,21 +11679,21 @@ The source code.
11187@cindex source code, editing 11679@cindex source code, editing
11188 11680
11189@kindex C-c ' 11681@kindex C-c '
11190Use @kbd{C-c '} to edit the current code block. This brings up 11682Use @kbd{C-c '} to edit the current code block. This brings up
11191a language major-mode edit buffer containing the body of the code 11683a language major-mode edit buffer containing the body of the code
11192block. Saving this buffer will write the new contents back to the Org 11684block. Saving this buffer will write the new contents back to the Org
11193buffer. Use @kbd{C-c '} again to exit. 11685buffer. Use @kbd{C-c '} again to exit.
11194 11686
11195The @code{org-src-mode} minor mode will be active in the edit buffer. The 11687The @code{org-src-mode} minor mode will be active in the edit buffer. The
11196following variables can be used to configure the behavior of the edit 11688following variables can be used to configure the behavior of the edit
11197buffer. See also the customization group @code{org-edit-structure} for 11689buffer. See also the customization group @code{org-edit-structure} for
11198further configuration options. 11690further configuration options.
11199 11691
11200@table @code 11692@table @code
11201@item org-src-lang-modes 11693@item org-src-lang-modes
11202If an Emacs major-mode named @code{<lang>-mode} exists, where 11694If an Emacs major-mode named @code{<lang>-mode} exists, where
11203@code{<lang>} is the language named in the header line of the code block, 11695@code{<lang>} is the language named in the header line of the code block,
11204then the edit buffer will be placed in that major-mode. This variable 11696then the edit buffer will be placed in that major-mode. This variable
11205can be used to map arbitrary language names to existing major modes. 11697can be used to map arbitrary language names to existing major modes.
11206@item org-src-window-setup 11698@item org-src-window-setup
11207Controls the way Emacs windows are rearranged when the edit buffer is created. 11699Controls the way Emacs windows are rearranged when the edit buffer is created.
@@ -11209,10 +11701,13 @@ Controls the way Emacs windows are rearranged when the edit buffer is created.
11209This variable is especially useful for tangling languages such as 11701This variable is especially useful for tangling languages such as
11210Python, in which whitespace indentation in the output is critical. 11702Python, in which whitespace indentation in the output is critical.
11211@item org-src-ask-before-returning-to-edit-buffer 11703@item org-src-ask-before-returning-to-edit-buffer
11212By default, Org will ask before returning to an open edit buffer. Set 11704By default, Org will ask before returning to an open edit buffer. Set this
11213this variable to nil to switch without asking. 11705variable to nil to switch without asking.
11214@end table 11706@end table
11215 11707
11708To turn on native code fontification in the @emph{Org} buffer, configure the
11709variable @code{org-src-fontify-natively}.
11710
11216@comment node-name, next, previous, up 11711@comment node-name, next, previous, up
11217@comment Exporting code blocks, Extracting source code, Editing source code, Working With Source Code 11712@comment Exporting code blocks, Extracting source code, Editing source code, Working With Source Code
11218 11713
@@ -11223,8 +11718,8 @@ this variable to nil to switch without asking.
11223 11718
11224It is possible to export the @emph{contents} of code blocks, the 11719It is possible to export the @emph{contents} of code blocks, the
11225@emph{results} of code block evaluation, @emph{neither}, or @emph{both}. For 11720@emph{results} of code block evaluation, @emph{neither}, or @emph{both}. For
11226most languages, the default exports the contents of code blocks. However, for 11721most languages, the default exports the contents of code blocks. However, for
11227some languages (e.g. @code{ditaa}) the default exports the results of code 11722some languages (e.g.@: @code{ditaa}) the default exports the results of code
11228block evaluation. For information on exporting code block bodies, see 11723block evaluation. For information on exporting code block bodies, see
11229@ref{Literal examples}. 11724@ref{Literal examples}.
11230 11725
@@ -11234,7 +11729,7 @@ behavior:
11234@subsubheading Header arguments: 11729@subsubheading Header arguments:
11235@table @code 11730@table @code
11236@item :exports code 11731@item :exports code
11237The default in most languages. The body of the code block is exported, as 11732The default in most languages. The body of the code block is exported, as
11238described in @ref{Literal examples}. 11733described in @ref{Literal examples}.
11239@item :exports results 11734@item :exports results
11240The code block will be evaluated and the results will be placed in the 11735The code block will be evaluated and the results will be placed in the
@@ -11259,6 +11754,7 @@ markup language for a wiki.
11259@comment Extracting source code, Evaluating code blocks, Exporting code blocks, Working With Source Code 11754@comment Extracting source code, Evaluating code blocks, Exporting code blocks, Working With Source Code
11260@node Extracting source code, Evaluating code blocks, Exporting code blocks, Working With Source Code 11755@node Extracting source code, Evaluating code blocks, Exporting code blocks, Working With Source Code
11261@section Extracting source code 11756@section Extracting source code
11757@cindex tangling
11262@cindex source code, extracting 11758@cindex source code, extracting
11263@cindex code block, extracting source code 11759@cindex code block, extracting source code
11264 11760
@@ -11273,7 +11769,7 @@ using @code{org-babel-expand-src-block} which can expand both variable and
11273@item :tangle no 11769@item :tangle no
11274The default. The code block is not included in the tangled output. 11770The default. The code block is not included in the tangled output.
11275@item :tangle yes 11771@item :tangle yes
11276Include the code block in the tangled output. The output file name is the 11772Include the code block in the tangled output. The output file name is the
11277name of the org file with the extension @samp{.org} replaced by the extension 11773name of the org file with the extension @samp{.org} replaced by the extension
11278for the block language. 11774for the block language.
11279@item :tangle filename 11775@item :tangle filename
@@ -11283,10 +11779,10 @@ Include the code block in the tangled output to file @samp{filename}.
11283@kindex C-c C-v t 11779@kindex C-c C-v t
11284@subsubheading Functions 11780@subsubheading Functions
11285@table @code 11781@table @code
11286@item org-babel-tangle 11782@item org-babel-tangle
11287Tangle the current file. Bound to @kbd{C-c C-v t}. 11783Tangle the current file. Bound to @kbd{C-c C-v t}.
11288@item org-babel-tangle-file 11784@item org-babel-tangle-file
11289Choose a file to tangle. Bound to @kbd{C-c C-v f}. 11785Choose a file to tangle. Bound to @kbd{C-c C-v f}.
11290@end table 11786@end table
11291 11787
11292@subsubheading Hooks 11788@subsubheading Hooks
@@ -11324,24 +11820,60 @@ It is also possible to evaluate named code blocks from anywhere in an
11324Org-mode buffer or an Org-mode table. @code{#+call} (or synonymously 11820Org-mode buffer or an Org-mode table. @code{#+call} (or synonymously
11325@code{#+function} or @code{#+lob}) lines can be used to remotely execute code 11821@code{#+function} or @code{#+lob}) lines can be used to remotely execute code
11326blocks located in the current Org-mode buffer or in the ``Library of Babel'' 11822blocks located in the current Org-mode buffer or in the ``Library of Babel''
11327(see @ref{Library of Babel}). These lines use the following syntax. 11823(see @ref{Library of Babel}). These lines use the following syntax to place
11824a call on a line by itself.
11328 11825
11329@example 11826@example
11330#+call: <name>(<arguments>) <header arguments> 11827#+call: <name>(<arguments>)
11331#+function: <name>(<arguments>) <header arguments> 11828#+call: <name>[<header args>](<arguments>) <header args>
11332#+lob: <name>(<arguments>) <header arguments> 11829@end example
11830
11831The following syntax can be used to place these calls within a block of
11832prose.
11833
11834@example
11835...prose... call_<name>(<arguments>) ...prose...
11836...prose... call_<name>[<header args>](<arguments>)[<header args>] ...prose...
11333@end example 11837@end example
11334 11838
11335@table @code 11839@table @code
11336@item <name> 11840@item <name>
11337The name of the code block to be evaluated. 11841The name of the code block to be evaluated.
11338@item <arguments> 11842@item <arguments>
11339Arguments specified in this section will be passed to the code block. 11843Arguments specified in this section will be passed to the code block. These
11340@item <header arguments> 11844arguments should relate to @code{:var} header arguments in the called code
11341Header arguments can be placed after the function invocation. See 11845block expressed using standard function call syntax. For example if the
11342@ref{Header arguments} for more information on header arguments. 11846original code block named @code{double} has the header argument @code{:var
11847n=2}, then the call line passing the number four to that block would be
11848written as @code{#+call: double(n=2)}.
11849@item <header args>
11850Header arguments can be placed either inside the call to the code block or at
11851the end of the line as shown below.
11852
11853@example
11854#+call: code_bloc_name[XXXX](arguments) YYYY
11855@end example
11856
11857Header arguments located in these two locations are treated differently.
11858
11859@table @code
11860@item XXXX
11861Those placed in the @code{XXXX} location are passed through and applied to
11862the code block being called. These header arguments affect how the code
11863block is evaluated, for example @code{[:results output]} will collect the
11864results from @code{STDOUT} of the called code block.
11865@item YYYY
11866Those placed in the @code{YYYY} location are applied to the call line and do
11867not affect the code block being called. These header arguments affect how
11868the results are incorporated into the Org-mode buffer when the call line is
11869evaluated, and how the call line is exported. For example @code{:results
11870org} at the end of the call line will insert the results of the call line
11871inside of an Org-mode block.
11343@end table 11872@end table
11344 11873
11874For more examples of passing header arguments to @code{#+call:} lines see
11875@ref{Header arguments in function calls}.
11876@end table
11345 11877
11346@node Library of Babel, Languages, Evaluating code blocks, Working With Source Code 11878@node Library of Babel, Languages, Evaluating code blocks, Working With Source Code
11347@section Library of Babel 11879@section Library of Babel
@@ -11374,19 +11906,24 @@ Code blocks in the following languages are supported.
11374 11906
11375@multitable @columnfractions 0.28 0.3 0.22 0.2 11907@multitable @columnfractions 0.28 0.3 0.22 0.2
11376@item @b{Language} @tab @b{Identifier} @tab @b{Language} @tab @b{Identifier} 11908@item @b{Language} @tab @b{Identifier} @tab @b{Language} @tab @b{Identifier}
11377@item Asymptote @tab asymptote @tab C @tab C 11909@item Asymptote @tab asymptote @tab Awk @tab awk
11910@item Emacs Calc @tab calc @tab C @tab C
11378@item C++ @tab C++ @tab Clojure @tab clojure 11911@item C++ @tab C++ @tab Clojure @tab clojure
11379@item CSS @tab css @tab ditaa @tab ditaa 11912@item CSS @tab css @tab ditaa @tab ditaa
11380@item Graphviz @tab dot @tab Emacs Lisp @tab emacs-lisp 11913@item Graphviz @tab dot @tab Emacs Lisp @tab emacs-lisp
11381@item gnuplot @tab gnuplot @tab Haskell @tab haskell 11914@item gnuplot @tab gnuplot @tab Haskell @tab haskell
11382@item LaTeX @tab latex @tab MATLAB @tab matlab 11915@item Java @tab java @tab @tab
11916@item Javascript @tab js @tab LaTeX @tab latex
11917@item Ledger @tab ledger @tab Lisp @tab lisp
11918@item Lilypond @tab lilypond @tab MATLAB @tab matlab
11383@item Mscgen @tab mscgen @tab Objective Caml @tab ocaml 11919@item Mscgen @tab mscgen @tab Objective Caml @tab ocaml
11384@item Octave @tab octave @tab Oz @tab oz 11920@item Octave @tab octave @tab Org-mode @tab org
11385@item Perl @tab perl @tab Python @tab python 11921@item Oz @tab oz @tab Perl @tab perl
11922@item Plantuml @tab plantuml @tab Python @tab python
11386@item R @tab R @tab Ruby @tab ruby 11923@item R @tab R @tab Ruby @tab ruby
11387@item Sass @tab sass @tab GNU Screen @tab screen 11924@item Sass @tab sass @tab Scheme @tab scheme
11388@item shell @tab sh @tab SQL @tab sql 11925@item GNU Screen @tab screen @tab shell @tab sh
11389@item SQLite @tab sqlite 11926@item SQL @tab sql @tab SQLite @tab sqlite
11390@end multitable 11927@end multitable
11391 11928
11392Language-specific documentation is available for some languages. If 11929Language-specific documentation is available for some languages. If
@@ -11515,7 +12052,7 @@ inserted into the buffer.
11515@subsubheading Header arguments in Org-mode properties 12052@subsubheading Header arguments in Org-mode properties
11516 12053
11517Header arguments are also read from Org-mode properties (see @ref{Property 12054Header arguments are also read from Org-mode properties (see @ref{Property
11518syntax}), which can be set on a buffer-wide or per-heading basis. An example 12055syntax}), which can be set on a buffer-wide or per-heading basis. An example
11519of setting a header argument for all code blocks in a buffer is 12056of setting a header argument for all code blocks in a buffer is
11520 12057
11521@example 12058@example
@@ -11568,17 +12105,54 @@ Similarly, it is possible to set header arguments for inline code blocks:
11568src_haskell[:exports both]@{fac 5@} 12105src_haskell[:exports both]@{fac 5@}
11569@end example 12106@end example
11570 12107
12108Code block header arguments can span multiple lines using =#+header:= or
12109=#+headers:= lines preceding a code block or nested in between the name and
12110body of a named code block.
12111
12112Multi-line header arguments on an un-named code block:
12113@example
12114 #+headers: :var data1=1
12115 #+begin_src emacs-lisp :var data2=2
12116 (message "data1:%S, data2:%S" data1 data2)
12117 #+end_src
12118
12119 #+results:
12120 : data1:1, data2:2
12121@end example
12122
12123Multi-line header arguments on a named code block:
12124@example
12125 #+source: named-block
12126 #+header: :var data=2
12127 #+begin_src emacs-lisp
12128 (message "data:%S" data)
12129 #+end_src
12130
12131 #+results: named-block
12132 : data:2
12133@end example
12134
11571@node Header arguments in function calls, , Code block specific header arguments, Using header arguments 12135@node Header arguments in function calls, , Code block specific header arguments, Using header arguments
11572@comment node-name, next, previous, up 12136@comment node-name, next, previous, up
11573@subsubheading Header arguments in function calls 12137@subsubheading Header arguments in function calls
11574 12138
11575At the most specific level, header arguments for ``Library of Babel'' or 12139At the most specific level, header arguments for ``Library of Babel'' or
11576function call lines can be set as shown below: 12140function call lines can be set as shown in the two examples below. For more
12141information on the structure of @code{#+call:} lines see @ref{Evaluating code
12142blocks}.
11577 12143
12144The following will apply the @code{:exports results} header argument to the
12145evaluation of the @code{#+call:} line.
11578@example 12146@example
11579#+call: factorial(n=5) :exports results 12147#+call: factorial(n=5) :exports results
11580@end example 12148@end example
11581 12149
12150The following will apply the @code{:session special} header argument to the
12151evaluation of the @code{factorial} code block.
12152@example
12153#+call: factorial[:session special](n=5)
12154@end example
12155
11582@node Specific header arguments, , Using header arguments, Header arguments 12156@node Specific header arguments, , Using header arguments, Header arguments
11583@subsection Specific header arguments 12157@subsection Specific header arguments
11584The following header arguments are defined: 12158The following header arguments are defined:
@@ -11592,13 +12166,19 @@ The following header arguments are defined:
11592 directory for code block execution 12166 directory for code block execution
11593* exports:: Export code and/or results 12167* exports:: Export code and/or results
11594* tangle:: Toggle tangling and specify file name 12168* tangle:: Toggle tangling and specify file name
12169* mkdirp:: Toggle creation of parent directories of target
12170 files during tangling
11595* comments:: Toggle insertion of comments in tangled 12171* comments:: Toggle insertion of comments in tangled
11596 code files 12172 code files
12173* padline:: Control insertion of padding lines in tangled
12174 code files
11597* no-expand:: Turn off variable assignment and noweb 12175* no-expand:: Turn off variable assignment and noweb
11598 expansion during tangling 12176 expansion during tangling
11599* session:: Preserve the state of code evaluation 12177* session:: Preserve the state of code evaluation
11600* noweb:: Toggle expansion of noweb references 12178* noweb:: Toggle expansion of noweb references
12179* noweb-ref:: Specify block's noweb reference resolution target
11601* cache:: Avoid re-evaluating unchanged code blocks 12180* cache:: Avoid re-evaluating unchanged code blocks
12181* sep:: Delimiter for writing tabular results outside Org
11602* hlines:: Handle horizontal lines in tables 12182* hlines:: Handle horizontal lines in tables
11603* colnames:: Handle column names in tables 12183* colnames:: Handle column names in tables
11604* rownames:: Handle row names in tables 12184* rownames:: Handle row names in tables
@@ -11606,14 +12186,18 @@ The following header arguments are defined:
11606* eval:: Limit evaluation of specific code blocks 12186* eval:: Limit evaluation of specific code blocks
11607@end menu 12187@end menu
11608 12188
12189Additional header arguments are defined on a language-specific basis, see
12190@ref{Languages}.
12191
11609@node var, results, Specific header arguments, Specific header arguments 12192@node var, results, Specific header arguments, Specific header arguments
11610@subsubsection @code{:var} 12193@subsubsection @code{:var}
11611The @code{:var} header argument is used to pass arguments to code blocks. 12194The @code{:var} header argument is used to pass arguments to code blocks.
11612The specifics of how arguments are included in a code block vary by language; 12195The specifics of how arguments are included in a code block vary by language;
11613these are addressed in the language-specific documentation. However, the 12196these are addressed in the language-specific documentation. However, the
11614syntax used to specify arguments is the same across all languages. The 12197syntax used to specify arguments is the same across all languages. The
11615values passed to arguments can be literal values, values from org-mode tables 12198values passed to arguments can be literal values, values from org-mode tables
11616and literal example blocks, or the results of other code blocks. 12199and literal example blocks, the results of other code blocks, or Emacs Lisp
12200code---see the ``Emacs Lisp evaluation of variables'' heading below.
11617 12201
11618These values can be indexed in a manner similar to arrays---see the 12202These values can be indexed in a manner similar to arrays---see the
11619``indexable variable values'' heading below. 12203``indexable variable values'' heading below.
@@ -11701,7 +12285,9 @@ following the source name.
11701It is possible to reference portions of variable values by ``indexing'' into 12285It is possible to reference portions of variable values by ``indexing'' into
11702the variables. Indexes are 0 based with negative values counting back from 12286the variables. Indexes are 0 based with negative values counting back from
11703the end. If an index is separated by @code{,}s then each subsequent section 12287the end. If an index is separated by @code{,}s then each subsequent section
11704will index into the next deepest nesting or dimension of the value. The 12288will index into the next deepest nesting or dimension of the value. Note
12289that this indexing occurs @emph{before} other table related header arguments
12290like @code{:hlines}, @code{:colnames} and @code{:rownames} are applied. The
11705following example assigns the last cell of the first row the table 12291following example assigns the last cell of the first row the table
11706@code{example-table} to the variable @code{data}: 12292@code{example-table} to the variable @code{data}:
11707 12293
@@ -11783,6 +12369,39 @@ another by commas, as shown in the following example.
11783| 11 | 14 | 17 | 12369| 11 | 14 | 17 |
11784@end example 12370@end example
11785 12371
12372@subsubheading Emacs Lisp evaluation of variables
12373
12374Emacs lisp code can be used to initialize variable values. When a variable
12375value starts with @code{(}, @code{[}, @code{'} or @code{`} it will be evaluated as
12376Emacs Lisp and the result of the evaluation will be assigned as the variable
12377value. The following example demonstrates use of this evaluation to reliably
12378pass the file-name of the org-mode buffer to a code block---note that
12379evaluation of header arguments is guaranteed to take place in the original
12380org-mode file, while there is no such guarantee for evaluation of the code
12381block body.
12382
12383@example
12384#+begin_src sh :var filename=(buffer-file-name) :exports both
12385 wc -w $filename
12386#+end_src
12387@end example
12388
12389Note that values read from tables and lists will not be evaluated as
12390Emacs Lisp, as shown in the following example.
12391
12392@example
12393#+results: table
12394| (a b c) |
12395
12396#+headers: :var data=table[0,0]
12397#+begin_src perl
12398 $data
12399#+end_src
12400
12401#+results:
12402: (a b c)
12403@end example
12404
11786@node results, file, var, Specific header arguments 12405@node results, file, var, Specific header arguments
11787@subsubsection @code{:results} 12406@subsubsection @code{:results}
11788 12407
@@ -11812,7 +12431,7 @@ This is the default. The result is the value of the last statement in the
11812code block. This header argument places the evaluation in functional 12431code block. This header argument places the evaluation in functional
11813mode. Note that in some languages, e.g., Python, use of this result type 12432mode. Note that in some languages, e.g., Python, use of this result type
11814requires that a @code{return} statement be included in the body of the source 12433requires that a @code{return} statement be included in the body of the source
11815code block. E.g., @code{:results value}. 12434code block. E.g., @code{:results value}.
11816@item @code{output} 12435@item @code{output}
11817The result is the collection of everything printed to STDOUT during the 12436The result is the collection of everything printed to STDOUT during the
11818execution of the code block. This header argument places the 12437execution of the code block. This header argument places the
@@ -11857,6 +12476,10 @@ E.g., @code{:results value code}.
11857The result is converted to pretty-printed code and is enclosed in a code 12476The result is converted to pretty-printed code and is enclosed in a code
11858block. This option currently supports Emacs Lisp, Python, and Ruby. E.g., 12477block. This option currently supports Emacs Lisp, Python, and Ruby. E.g.,
11859@code{:results value pp}. 12478@code{:results value pp}.
12479@item @code{wrap}
12480The result is wrapped in a @code{begin_result} block. This can be useful for
12481inserting @code{raw} or @code{org} syntax results in such a way that their
12482extend is known and they can be automatically removed or replaced.
11860@end itemize 12483@end itemize
11861 12484
11862@subsubheading Handling 12485@subsubheading Handling
@@ -11884,32 +12507,32 @@ inserted as with @code{replace}.
11884@node file, dir, results, Specific header arguments 12507@node file, dir, results, Specific header arguments
11885@subsubsection @code{:file} 12508@subsubsection @code{:file}
11886 12509
11887The header argument @code{:file} is used to specify a path for file output. 12510The header argument @code{:file} is used to specify an external file in which
11888An Org-mode style @code{file:} link is inserted into the buffer as the result 12511to save code block results. After code block evaluation an Org-mode style
11889(see @ref{Link format}). Common examples are graphical output from R, 12512@code{[[file:]]} link (see @ref{Link format}) to the file will be inserted
11890gnuplot, ditaa and LaTeX code blocks. 12513into the Org-mode buffer. Some languages including R, gnuplot, dot, and
11891 12514ditaa provide special handling of the @code{:file} header argument
11892Note that for some languages, including R, gnuplot, LaTeX and ditaa, 12515automatically wrapping the code block body in the boilerplate code required
11893graphical output is sent to the specified file without the file being 12516to save output to the specified file. This is often useful for saving
11894referenced explicitly in the code block. See the documentation for the 12517graphical output of a code block to the specified file.
11895individual languages for details. In contrast, general purpose languages such
11896as Python and Ruby require that the code explicitly create output
11897corresponding to the path indicated by @code{:file}.
11898 12518
12519The argument to @code{:file} should be either a string specifying the path to
12520a file, or a list of two strings in which case the first element of the list
12521should be the path to a file and the second a description for the link.
11899 12522
11900@node dir, exports, file, Specific header arguments 12523@node dir, exports, file, Specific header arguments
11901@subsubsection @code{:dir} and remote execution 12524@subsubsection @code{:dir} and remote execution
11902 12525
11903While the @code{:file} header argument can be used to specify the path to the 12526While the @code{:file} header argument can be used to specify the path to the
11904output file, @code{:dir} specifies the default directory during code block 12527output file, @code{:dir} specifies the default directory during code block
11905execution. If it is absent, then the directory associated with the current 12528execution. If it is absent, then the directory associated with the current
11906buffer is used. In other words, supplying @code{:dir path} temporarily has 12529buffer is used. In other words, supplying @code{:dir path} temporarily has
11907the same effect as changing the current directory with @kbd{M-x cd path}, and 12530the same effect as changing the current directory with @kbd{M-x cd path}, and
11908then not supplying @code{:dir}. Under the surface, @code{:dir} simply sets 12531then not supplying @code{:dir}. Under the surface, @code{:dir} simply sets
11909the value of the Emacs variable @code{default-directory}. 12532the value of the Emacs variable @code{default-directory}.
11910 12533
11911When using @code{:dir}, you should supply a relative path for file output 12534When using @code{:dir}, you should supply a relative path for file output
11912(e.g. @code{:file myfile.jpg} or @code{:file results/myfile.jpg}) in which 12535(e.g.@: @code{:file myfile.jpg} or @code{:file results/myfile.jpg}) in which
11913case that path will be interpreted relative to the default directory. 12536case that path will be interpreted relative to the default directory.
11914 12537
11915In other words, if you want your plot to go into a folder called @file{Work} 12538In other words, if you want your plot to go into a folder called @file{Work}
@@ -11923,7 +12546,7 @@ matplot(matrix(rnorm(100), 10), type="l")
11923 12546
11924@subsubheading Remote execution 12547@subsubheading Remote execution
11925A directory on a remote machine can be specified using tramp file syntax, in 12548A directory on a remote machine can be specified using tramp file syntax, in
11926which case the code will be evaluated on the remote machine. An example is 12549which case the code will be evaluated on the remote machine. An example is
11927 12550
11928@example 12551@example
11929#+begin_src R :file plot.png :dir /dand@@yakuba.princeton.edu: 12552#+begin_src R :file plot.png :dir /dand@@yakuba.princeton.edu:
@@ -11933,7 +12556,7 @@ plot(1:10, main=system("hostname", intern=TRUE))
11933 12556
11934Text results will be returned to the local Org-mode buffer as usual, and file 12557Text results will be returned to the local Org-mode buffer as usual, and file
11935output will be created on the remote machine with relative paths interpreted 12558output will be created on the remote machine with relative paths interpreted
11936relative to the remote directory. An Org-mode link to the remote file will be 12559relative to the remote directory. An Org-mode link to the remote file will be
11937created. 12560created.
11938 12561
11939So, in the above example a plot will be created on the remote machine, 12562So, in the above example a plot will be created on the remote machine,
@@ -11945,7 +12568,7 @@ and a link of the following form will be inserted in the org buffer:
11945 12568
11946Most of this functionality follows immediately from the fact that @code{:dir} 12569Most of this functionality follows immediately from the fact that @code{:dir}
11947sets the value of the Emacs variable @code{default-directory}, thanks to 12570sets the value of the Emacs variable @code{default-directory}, thanks to
11948tramp. Those using XEmacs, or GNU Emacs prior to version 23 may need to 12571tramp. Those using XEmacs, or GNU Emacs prior to version 23 may need to
11949install tramp separately in order for these features to work correctly. 12572install tramp separately in order for these features to work correctly.
11950 12573
11951@subsubheading Further points 12574@subsubheading Further points
@@ -11957,10 +12580,10 @@ determine the starting directory for a new session as expected, no attempt is
11957currently made to alter the directory associated with an existing session. 12580currently made to alter the directory associated with an existing session.
11958@item 12581@item
11959@code{:dir} should typically not be used to create files during export with 12582@code{:dir} should typically not be used to create files during export with
11960@code{:exports results} or @code{:exports both}. The reason is that, in order 12583@code{:exports results} or @code{:exports both}. The reason is that, in order
11961to retain portability of exported material between machines, during export 12584to retain portability of exported material between machines, during export
11962links inserted into the buffer will *not* be expanded against @code{default 12585links inserted into the buffer will *not* be expanded against @code{default
11963directory}. Therefore, if @code{default-directory} is altered using 12586directory}. Therefore, if @code{default-directory} is altered using
11964@code{:dir}, it is probable that the file will be created in a location to 12587@code{:dir}, it is probable that the file will be created in a location to
11965which the link does not point. 12588which the link does not point.
11966@end itemize 12589@end itemize
@@ -11976,16 +12599,16 @@ or LaTeX exports of the Org-mode file.
11976The default. The body of code is included into the exported file. E.g., 12599The default. The body of code is included into the exported file. E.g.,
11977@code{:exports code}. 12600@code{:exports code}.
11978@item @code{results} 12601@item @code{results}
11979The result of evaluating the code is included in the exported file. E.g., 12602The result of evaluating the code is included in the exported file. E.g.,
11980@code{:exports results}. 12603@code{:exports results}.
11981@item @code{both} 12604@item @code{both}
11982Both the code and results are included in the exported file. E.g., 12605Both the code and results are included in the exported file. E.g.,
11983@code{:exports both}. 12606@code{:exports both}.
11984@item @code{none} 12607@item @code{none}
11985Nothing is included in the exported file. E.g., @code{:exports none}. 12608Nothing is included in the exported file. E.g., @code{:exports none}.
11986@end itemize 12609@end itemize
11987 12610
11988@node tangle, comments, exports, Specific header arguments 12611@node tangle, mkdirp, exports, Specific header arguments
11989@subsubsection @code{:tangle} 12612@subsubsection @code{:tangle}
11990 12613
11991The @code{:tangle} header argument specifies whether or not the code 12614The @code{:tangle} header argument specifies whether or not the code
@@ -11993,19 +12616,26 @@ block should be included in tangled extraction of source code files.
11993 12616
11994@itemize @bullet 12617@itemize @bullet
11995@item @code{tangle} 12618@item @code{tangle}
11996The code block is exported to a source code file named after the 12619The code block is exported to a source code file named after the full path
11997basename (name w/o extension) of the Org-mode file. E.g., @code{:tangle 12620(including the directory) and file name (w/o extension) of the Org-mode file.
11998yes}. 12621E.g., @code{:tangle yes}.
11999@item @code{no} 12622@item @code{no}
12000The default. The code block is not exported to a source code file. 12623The default. The code block is not exported to a source code file.
12001E.g., @code{:tangle no}. 12624E.g., @code{:tangle no}.
12002@item other 12625@item other
12003Any other string passed to the @code{:tangle} header argument is interpreted 12626Any other string passed to the @code{:tangle} header argument is interpreted
12004as a file basename to which the block will be exported. E.g., @code{:tangle 12627as a path (directory and file name relative to the directory of the Org-mode
12005basename}. 12628file) to which the block will be exported. E.g., @code{:tangle path}.
12006@end itemize 12629@end itemize
12007 12630
12008@node comments, no-expand, tangle, Specific header arguments 12631@node mkdirp, comments, tangle, Specific header arguments
12632@subsubsection @code{:mkdirp}
12633
12634The @code{:mkdirp} header argument can be used to create parent directories
12635of tangled files when missing. This can be set to @code{yes} to enable
12636directory creation or to @code{no} to inhibit directory creation.
12637
12638@node comments, padline, mkdirp, Specific header arguments
12009@subsubsection @code{:comments} 12639@subsubsection @code{:comments}
12010By default code blocks are tangled to source-code files without any insertion 12640By default code blocks are tangled to source-code files without any insertion
12011of comments beyond those which may already exist in the body of the code 12641of comments beyond those which may already exist in the body of the code
@@ -12027,9 +12657,26 @@ The text is picked from the leading context of the tangled code and is
12027limited by the nearest headline or source block as the case may be. 12657limited by the nearest headline or source block as the case may be.
12028@item @code{both} 12658@item @code{both}
12029Turns on both the ``link'' and ``org'' comment options. 12659Turns on both the ``link'' and ``org'' comment options.
12660@item @code{noweb}
12661Turns on the ``link'' comment option, and additionally wraps expanded noweb
12662references in the code block body in link comments.
12030@end itemize 12663@end itemize
12031 12664
12032@node no-expand, session, comments, Specific header arguments 12665@node padline, no-expand, comments, Specific header arguments
12666@subsubsection @code{:padline}
12667Control in insertion of padding lines around code block bodies in tangled
12668code files. The default value is @code{yes} which results in insertion of
12669newlines before and after each tangled code block. The following arguments
12670are accepted.
12671
12672@itemize @bullet
12673@item @code{yes}
12674Insert newlines before and after each code block body in tangled code files.
12675@item @code{no}
12676Do not insert any newline padding in tangled output.
12677@end itemize
12678
12679@node no-expand, session, padline, Specific header arguments
12033@subsubsection @code{:no-expand} 12680@subsubsection @code{:no-expand}
12034 12681
12035By default, code blocks are expanded with @code{org-babel-expand-src-block} 12682By default, code blocks are expanded with @code{org-babel-expand-src-block}
@@ -12050,12 +12697,12 @@ A string passed to the @code{:session} header argument will give the session
12050a name. This makes it possible to run concurrent sessions for each 12697a name. This makes it possible to run concurrent sessions for each
12051interpreted language. 12698interpreted language.
12052 12699
12053@node noweb, cache, session, Specific header arguments 12700@node noweb, noweb-ref, session, Specific header arguments
12054@subsubsection @code{:noweb} 12701@subsubsection @code{:noweb}
12055 12702
12056The @code{:noweb} header argument controls expansion of ``noweb'' style (see 12703The @code{:noweb} header argument controls expansion of ``noweb'' style (see
12057@ref{Noweb reference syntax}) references in a code block. This header 12704@ref{Noweb reference syntax}) references in a code block. This header
12058argument can have one of three values: @code{yes} @code{no} or @code{tangle}. 12705argument can have one of three values: @code{yes}, @code{no}, or @code{tangle}.
12059 12706
12060@itemize @bullet 12707@itemize @bullet
12061@item @code{yes} 12708@item @code{yes}
@@ -12096,7 +12743,49 @@ Note that noweb replacement text that does not contain any newlines will not
12096be affected by this change, so it is still possible to use inline noweb 12743be affected by this change, so it is still possible to use inline noweb
12097references. 12744references.
12098 12745
12099@node cache, hlines, noweb, Specific header arguments 12746@node noweb-ref, cache, noweb, Specific header arguments
12747@subsubsection @code{:noweb-ref}
12748When expanding ``noweb'' style references the bodies of all code block with
12749@emph{either} a block name matching the reference name @emph{or} a
12750@code{:noweb-ref} header argument matching the reference name will be
12751concatenated together to form the replacement text.
12752
12753By setting this header argument at the sub-tree or file level, simple code
12754block concatenation may be achieved. For example, when tangling the
12755following Org-mode file, the bodies of code blocks will be concatenated into
12756the resulting pure code file.
12757
12758@example
12759 #+begin_src sh :tangle yes :noweb yes :shebang #!/bin/sh
12760 <<fullest-disk>>
12761 #+end_src
12762 * the mount point of the fullest disk
12763 :PROPERTIES:
12764 :noweb-ref: fullest-disk
12765 :END:
12766
12767 ** query all mounted disks
12768 #+begin_src sh
12769 df \
12770 #+end_src
12771
12772 ** strip the header row
12773 #+begin_src sh
12774 |sed '1d' \
12775 #+end_src
12776
12777 ** sort by the percent full
12778 #+begin_src sh
12779 |awk '@{print $5 " " $6@}'|sort -n |tail -1 \
12780 #+end_src
12781
12782 ** extract the mount point
12783 #+begin_src sh
12784 |awk '@{print $2@}'
12785 #+end_src
12786@end example
12787
12788@node cache, sep, noweb-ref, Specific header arguments
12100@subsubsection @code{:cache} 12789@subsubsection @code{:cache}
12101 12790
12102The @code{:cache} header argument controls the use of in-buffer caching of 12791The @code{:cache} header argument controls the use of in-buffer caching of
@@ -12116,7 +12805,44 @@ executions of the code block. If the code block has not
12116changed since the last time it was evaluated, it will not be re-evaluated. 12805changed since the last time it was evaluated, it will not be re-evaluated.
12117@end itemize 12806@end itemize
12118 12807
12119@node hlines, colnames, cache, Specific header arguments 12808Code block caches notice if the value of a variable argument
12809to the code block has changed. If this is the case, the cache is
12810invalidated and the code block is re-run. In the following example,
12811@code{caller} will not be re-run unless the results of @code{random} have
12812changed since it was last run.
12813
12814@example
12815 #+srcname: random
12816 #+begin_src R :cache yes
12817 runif(1)
12818 #+end_src
12819
12820 #+results[a2a72cd647ad44515fab62e144796432793d68e1]: random
12821 0.4659510825295
12822
12823 #+srcname: caller
12824 #+begin_src emacs-lisp :var x=random :cache yes
12825 x
12826 #+end_src
12827
12828 #+results[bec9c8724e397d5df3b696502df3ed7892fc4f5f]: caller
12829 0.254227238707244
12830@end example
12831
12832@node sep, hlines, cache, Specific header arguments
12833@subsubsection @code{:sep}
12834
12835The @code{:sep} header argument can be used to control the delimiter used
12836when writing tabular results out to files external to Org-mode. This is used
12837either when opening tabular results of a code block by calling the
12838@code{org-open-at-point} function bound to @kbd{C-c C-o} on the code block,
12839or when writing code block results to an external file (see @ref{file})
12840header argument.
12841
12842By default, when @code{:sep} is not specified output tables are tab
12843delimited.
12844
12845@node hlines, colnames, sep, Specific header arguments
12120@subsubsection @code{:hlines} 12846@subsubsection @code{:hlines}
12121 12847
12122Tables are frequently represented with one or more horizontal lines, or 12848Tables are frequently represented with one or more horizontal lines, or
@@ -12150,7 +12876,7 @@ default value yields the following results.
12150@end example 12876@end example
12151 12877
12152@item @code{yes} 12878@item @code{yes}
12153Leaves hlines in the table. Setting @code{:hlines yes} has this effect. 12879Leaves hlines in the table. Setting @code{:hlines yes} has this effect.
12154 12880
12155@example 12881@example
12156#+tblname: many-cols 12882#+tblname: many-cols
@@ -12206,12 +12932,15 @@ processing, then reapplied to the results.
12206| c* | 12932| c* |
12207@end example 12933@end example
12208 12934
12935Please note that column names are not removed before the table is indexed
12936using variable indexing @xref{var, Indexable variable values}.
12937
12209@item @code{no} 12938@item @code{no}
12210No column name pre-processing takes place 12939No column name pre-processing takes place
12211 12940
12212@item @code{yes} 12941@item @code{yes}
12213Column names are removed and reapplied as with @code{nil} even if the table 12942Column names are removed and reapplied as with @code{nil} even if the table
12214does not ``look like'' it has column names (i.e. the second row is not an 12943does not ``look like'' it has column names (i.e.@: the second row is not an
12215hline) 12944hline)
12216@end itemize 12945@end itemize
12217 12946
@@ -12243,13 +12972,17 @@ and is then reapplied to the results.
12243| one | 11 | 12 | 13 | 14 | 15 | 12972| one | 11 | 12 | 13 | 14 | 15 |
12244| two | 16 | 17 | 18 | 19 | 20 | 12973| two | 16 | 17 | 18 | 19 | 20 |
12245@end example 12974@end example
12975
12976Please note that row names are not removed before the table is indexed using
12977variable indexing @xref{var, Indexable variable values}.
12978
12246@end itemize 12979@end itemize
12247 12980
12248@node shebang, eval, rownames, Specific header arguments 12981@node shebang, eval, rownames, Specific header arguments
12249@subsubsection @code{:shebang} 12982@subsubsection @code{:shebang}
12250 12983
12251Setting the @code{:shebang} header argument to a string value 12984Setting the @code{:shebang} header argument to a string value
12252(e.g. @code{:shebang "#!/bin/bash"}) causes the string to be inserted as the 12985(e.g.@: @code{:shebang "#!/bin/bash"}) causes the string to be inserted as the
12253first line of any tangled file holding the code block, and the file 12986first line of any tangled file holding the code block, and the file
12254permissions of the tangled file are set to make it executable. 12987permissions of the tangled file are set to make it executable.
12255 12988
@@ -12263,6 +12996,10 @@ dangerous code blocks. @code{:eval query} will require a query for every
12263execution of a code block regardless of the value of the 12996execution of a code block regardless of the value of the
12264@code{org-confirm-babel-evaluate} variable. 12997@code{org-confirm-babel-evaluate} variable.
12265 12998
12999If this header argument is not set then evaluation is determined by the value
13000of the @code{org-confirm-babel-evaluate} variable see @ref{Code evaluation
13001security}.
13002
12266@node Results of evaluation, Noweb reference syntax, Header arguments, Working With Source Code 13003@node Results of evaluation, Noweb reference syntax, Header arguments, Working With Source Code
12267@section Results of evaluation 13004@section Results of evaluation
12268@cindex code block, results of evaluation 13005@cindex code block, results of evaluation
@@ -12270,7 +13007,8 @@ execution of a code block regardless of the value of the
12270 13007
12271The way in which results are handled depends on whether a session is invoked, 13008The way in which results are handled depends on whether a session is invoked,
12272as well as on whether @code{:results value} or @code{:results output} is 13009as well as on whether @code{:results value} or @code{:results output} is
12273used. The following table shows the possibilities: 13010used. The following table shows the table possibilities. For a full listing
13011of the possible results header arguments see @ref{results}.
12274 13012
12275@multitable @columnfractions 0.26 0.33 0.41 13013@multitable @columnfractions 0.26 0.33 0.41
12276@item @tab @b{Non-session} @tab @b{Session} 13014@item @tab @b{Non-session} @tab @b{Session}
@@ -12284,10 +13022,10 @@ vector of strings or numbers) when appropriate.
12284 13022
12285@subsection Non-session 13023@subsection Non-session
12286@subsubsection @code{:results value} 13024@subsubsection @code{:results value}
12287This is the default. Internally, the value is obtained by wrapping the code 13025This is the default. Internally, the value is obtained by wrapping the code
12288in a function definition in the external language, and evaluating that 13026in a function definition in the external language, and evaluating that
12289function. Therefore, code should be written as if it were the body of such a 13027function. Therefore, code should be written as if it were the body of such a
12290function. In particular, note that Python does not automatically return a 13028function. In particular, note that Python does not automatically return a
12291value from a function unless a @code{return} statement is present, and so a 13029value from a function unless a @code{return} statement is present, and so a
12292@samp{return} statement will usually be required in Python. 13030@samp{return} statement will usually be required in Python.
12293 13031
@@ -12296,25 +13034,33 @@ automatically wrapped in a function definition.
12296 13034
12297@subsubsection @code{:results output} 13035@subsubsection @code{:results output}
12298The code is passed to the interpreter as an external process, and the 13036The code is passed to the interpreter as an external process, and the
12299contents of the standard output stream are returned as text. (In certain 13037contents of the standard output stream are returned as text. (In certain
12300languages this also contains the error output stream; this is an area for 13038languages this also contains the error output stream; this is an area for
12301future work.) 13039future work.)
12302 13040
12303@subsection Session 13041@subsection Session
12304@subsubsection @code{:results value} 13042@subsubsection @code{:results value}
12305The code is passed to the interpreter running as an interactive Emacs 13043The code is passed to an interpreter running as an interactive Emacs inferior
12306inferior process. The result returned is the result of the last evaluation 13044process. Only languages which provide tools for interactive evaluation of
12307performed by the interpreter. (This is obtained in a language-specific 13045code have session support, so some language (e.g., C and ditaa) do not
12308manner: the value of the variable @code{_} in Python and Ruby, and the value 13046support the @code{:session} header argument, and in other languages (e.g.,
12309of @code{.Last.value} in R). 13047Python and Haskell) which have limitations on the code which may be entered
13048into interactive sessions, those limitations apply to the code in code blocks
13049using the @code{:session} header argument as well.
13050
13051Unless the @code{:results output} option is supplied (see below) the result
13052returned is the result of the last evaluation performed by the
13053interpreter. (This is obtained in a language-specific manner: the value of
13054the variable @code{_} in Python and Ruby, and the value of @code{.Last.value}
13055in R).
12310 13056
12311@subsubsection @code{:results output} 13057@subsubsection @code{:results output}
12312The code is passed to the interpreter running as an interactive Emacs 13058The code is passed to the interpreter running as an interactive Emacs
12313inferior process. The result returned is the concatenation of the sequence of 13059inferior process. The result returned is the concatenation of the sequence of
12314(text) output from the interactive interpreter. Notice that this is not 13060(text) output from the interactive interpreter. Notice that this is not
12315necessarily the same as what would be sent to @code{STDOUT} if the same code 13061necessarily the same as what would be sent to @code{STDOUT} if the same code
12316were passed to a non-interactive interpreter running as an external 13062were passed to a non-interactive interpreter running as an external
12317process. For example, compare the following two blocks: 13063process. For example, compare the following two blocks:
12318 13064
12319@example 13065@example
12320#+begin_src python :results output 13066#+begin_src python :results output
@@ -12343,7 +13089,7 @@ In non-session mode, the `2' is not printed and does not appear.
12343@end example 13089@end example
12344 13090
12345But in @code{:session} mode, the interactive interpreter receives input `2' 13091But in @code{:session} mode, the interactive interpreter receives input `2'
12346and prints out its value, `2'. (Indeed, the other print statements are 13092and prints out its value, `2'. (Indeed, the other print statements are
12347unnecessary here). 13093unnecessary here).
12348 13094
12349@node Noweb reference syntax, Key bindings and useful functions, Results of evaluation, Working With Source Code 13095@node Noweb reference syntax, Key bindings and useful functions, Results of evaluation, Working With Source Code
@@ -12384,13 +13130,13 @@ are active:
12384 13130
12385@multitable @columnfractions 0.25 0.75 13131@multitable @columnfractions 0.25 0.75
12386@kindex C-c C-c 13132@kindex C-c C-c
12387@item @kbd{C-c C-c} @tab org-babel-execute-src-block 13133@item @kbd{C-c C-c} @tab @code{org-babel-execute-src-block}
12388@kindex C-c C-o 13134@kindex C-c C-o
12389@item @kbd{C-c C-o} @tab org-babel-open-src-block-result 13135@item @kbd{C-c C-o} @tab @code{org-babel-open-src-block-result}
12390@kindex C-up 13136@kindex C-up
12391@item @kbd{C-@key{up}} @tab org-babel-load-in-session 13137@item @kbd{C-@key{up}} @tab @code{org-babel-load-in-session}
12392@kindex M-down 13138@kindex M-down
12393@item @kbd{M-@key{down}} @tab org-babel-pop-to-session 13139@item @kbd{M-@key{down}} @tab @code{org-babel-pop-to-session}
12394@end multitable 13140@end multitable
12395 13141
12396In an Org-mode buffer, the following key bindings are active: 13142In an Org-mode buffer, the following key bindings are active:
@@ -12398,46 +13144,46 @@ In an Org-mode buffer, the following key bindings are active:
12398@multitable @columnfractions 0.45 0.55 13144@multitable @columnfractions 0.45 0.55
12399@kindex C-c C-v a 13145@kindex C-c C-v a
12400@kindex C-c C-v C-a 13146@kindex C-c C-v C-a
12401@item @kbd{C-c C-v a} @ @ @r{or} @ @ @kbd{C-c C-v C-a} @tab org-babel-sha1-hash 13147@item @kbd{C-c C-v a} @ @ @r{or} @ @ @kbd{C-c C-v C-a} @tab @code{org-babel-sha1-hash}
12402@kindex C-c C-v b 13148@kindex C-c C-v b
12403@kindex C-c C-v C-b 13149@kindex C-c C-v C-b
12404@item @kbd{C-c C-v b} @ @ @r{or} @ @ @kbd{C-c C-v C-b} @tab org-babel-execute-buffer 13150@item @kbd{C-c C-v b} @ @ @r{or} @ @ @kbd{C-c C-v C-b} @tab @code{org-babel-execute-buffer}
12405@kindex C-c C-v f 13151@kindex C-c C-v f
12406@kindex C-c C-v C-f 13152@kindex C-c C-v C-f
12407@item @kbd{C-c C-v f} @ @ @r{or} @ @ @kbd{C-c C-v C-f} @tab org-babel-tangle-file 13153@item @kbd{C-c C-v f} @ @ @r{or} @ @ @kbd{C-c C-v C-f} @tab @code{org-babel-tangle-file}
12408@kindex C-c C-v g 13154@kindex C-c C-v g
12409@item @kbd{C-c C-v g} @tab org-babel-goto-named-source-block 13155@item @kbd{C-c C-v g} @tab @code{org-babel-goto-named-source-block}
12410@kindex C-c C-v h 13156@kindex C-c C-v h
12411@item @kbd{C-c C-v h} @tab org-babel-describe-bindings 13157@item @kbd{C-c C-v h} @tab @code{org-babel-describe-bindings}
12412@kindex C-c C-v l 13158@kindex C-c C-v l
12413@kindex C-c C-v C-l 13159@kindex C-c C-v C-l
12414@item @kbd{C-c C-v l} @ @ @r{or} @ @ @kbd{C-c C-v C-l} @tab org-babel-lob-ingest 13160@item @kbd{C-c C-v l} @ @ @r{or} @ @ @kbd{C-c C-v C-l} @tab @code{org-babel-lob-ingest}
12415@kindex C-c C-v p 13161@kindex C-c C-v p
12416@kindex C-c C-v C-p 13162@kindex C-c C-v C-p
12417@item @kbd{C-c C-v p} @ @ @r{or} @ @ @kbd{C-c C-v C-p} @tab org-babel-expand-src-block 13163@item @kbd{C-c C-v p} @ @ @r{or} @ @ @kbd{C-c C-v C-p} @tab @code{org-babel-expand-src-block}
12418@kindex C-c C-v s 13164@kindex C-c C-v s
12419@kindex C-c C-v C-s 13165@kindex C-c C-v C-s
12420@item @kbd{C-c C-v s} @ @ @r{or} @ @ @kbd{C-c C-v C-s} @tab org-babel-execute-subtree 13166@item @kbd{C-c C-v s} @ @ @r{or} @ @ @kbd{C-c C-v C-s} @tab @code{org-babel-execute-subtree}
12421@kindex C-c C-v t 13167@kindex C-c C-v t
12422@kindex C-c C-v C-t 13168@kindex C-c C-v C-t
12423@item @kbd{C-c C-v t} @ @ @r{or} @ @ @kbd{C-c C-v C-t} @tab org-babel-tangle 13169@item @kbd{C-c C-v t} @ @ @r{or} @ @ @kbd{C-c C-v C-t} @tab @code{org-babel-tangle}
12424@kindex C-c C-v z 13170@kindex C-c C-v z
12425@kindex C-c C-v C-z 13171@kindex C-c C-v C-z
12426@item @kbd{C-c C-v z} @ @ @r{or} @ @ @kbd{C-c C-v C-z} @tab org-babel-switch-to-session 13172@item @kbd{C-c C-v z} @ @ @r{or} @ @ @kbd{C-c C-v C-z} @tab @code{org-babel-switch-to-session}
12427@end multitable 13173@end multitable
12428 13174
12429@c When possible these keybindings were extended to work when the control key is 13175@c When possible these keybindings were extended to work when the control key is
12430@c kept pressed, resulting in the following additional keybindings. 13176@c kept pressed, resulting in the following additional keybindings.
12431 13177
12432@c @multitable @columnfractions 0.25 0.75 13178@c @multitable @columnfractions 0.25 0.75
12433@c @item @kbd{C-c C-v C-a} @tab org-babel-sha1-hash 13179@c @item @kbd{C-c C-v C-a} @tab @code{org-babel-sha1-hash}
12434@c @item @kbd{C-c C-v C-b} @tab org-babel-execute-buffer 13180@c @item @kbd{C-c C-v C-b} @tab @code{org-babel-execute-buffer}
12435@c @item @kbd{C-c C-v C-f} @tab org-babel-tangle-file 13181@c @item @kbd{C-c C-v C-f} @tab @code{org-babel-tangle-file}
12436@c @item @kbd{C-c C-v C-l} @tab org-babel-lob-ingest 13182@c @item @kbd{C-c C-v C-l} @tab @code{org-babel-lob-ingest}
12437@c @item @kbd{C-c C-v C-p} @tab org-babel-expand-src-block 13183@c @item @kbd{C-c C-v C-p} @tab @code{org-babel-expand-src-block}
12438@c @item @kbd{C-c C-v C-s} @tab org-babel-execute-subtree 13184@c @item @kbd{C-c C-v C-s} @tab @code{org-babel-execute-subtree}
12439@c @item @kbd{C-c C-v C-t} @tab org-babel-tangle 13185@c @item @kbd{C-c C-v C-t} @tab @code{org-babel-tangle}
12440@c @item @kbd{C-c C-v C-z} @tab org-babel-switch-to-session 13186@c @item @kbd{C-c C-v C-z} @tab @code{org-babel-switch-to-session}
12441@c @end multitable 13187@c @end multitable
12442 13188
12443@node Batch execution, , Key bindings and useful functions, Working With Source Code 13189@node Batch execution, , Key bindings and useful functions, Working With Source Code
@@ -12490,6 +13236,7 @@ emacs -Q --batch -l $ORGINSTALL \
12490* Clean view:: Getting rid of leading stars in the outline 13236* Clean view:: Getting rid of leading stars in the outline
12491* TTY keys:: Using Org on a tty 13237* TTY keys:: Using Org on a tty
12492* Interaction:: Other Emacs packages 13238* Interaction:: Other Emacs packages
13239* org-crypt.el:: Encrypting Org files
12493@end menu 13240@end menu
12494 13241
12495 13242
@@ -12549,7 +13296,7 @@ option keyword is already complete, pressing @kbd{M-@key{TAB}} again
12549will insert example settings for this keyword. 13296will insert example settings for this keyword.
12550@item 13297@item
12551In the line after @samp{#+STARTUP: }, complete startup keywords, 13298In the line after @samp{#+STARTUP: }, complete startup keywords,
12552i.e. valid keys for this line. 13299i.e.@: valid keys for this line.
12553@item 13300@item
12554Elsewhere, complete dictionary words using Ispell. 13301Elsewhere, complete dictionary words using Ispell.
12555@end itemize 13302@end itemize
@@ -12584,14 +13331,15 @@ The following template selectors are currently supported.
12584@item @kbd{H} @tab @code{#+html:} 13331@item @kbd{H} @tab @code{#+html:}
12585@item @kbd{a} @tab @code{#+begin_ascii ... #+end_ascii} 13332@item @kbd{a} @tab @code{#+begin_ascii ... #+end_ascii}
12586@item @kbd{A} @tab @code{#+ascii:} 13333@item @kbd{A} @tab @code{#+ascii:}
12587@item @kbd{i} @tab @code{#+include:} line 13334@item @kbd{i} @tab @code{#+index:} line
13335@item @kbd{I} @tab @code{#+include:} line
12588@end multitable 13336@end multitable
12589 13337
12590For example, on an empty line, typing "<e" and then pressing TAB, will expand 13338For example, on an empty line, typing "<e" and then pressing TAB, will expand
12591into a complete EXAMPLE template. 13339into a complete EXAMPLE template.
12592 13340
12593You can install additional templates by customizing the variable 13341You can install additional templates by customizing the variable
12594@code{org-structure-template-alist}. See the docstring of the variable for 13342@code{org-structure-template-alist}. See the docstring of the variable for
12595additional details. 13343additional details.
12596 13344
12597@node Speed keys, Code evaluation security, Easy Templates, Miscellaneous 13345@node Speed keys, Code evaluation security, Easy Templates, Miscellaneous
@@ -12601,7 +13349,7 @@ additional details.
12601@vindex org-speed-commands-user 13349@vindex org-speed-commands-user
12602 13350
12603Single keys can be made to execute commands when the cursor is at the 13351Single keys can be made to execute commands when the cursor is at the
12604beginning of a headline, i.e. before the first star. Configure the variable 13352beginning of a headline, i.e.@: before the first star. Configure the variable
12605@code{org-use-speed-commands} to activate this feature. There is a 13353@code{org-use-speed-commands} to activate this feature. There is a
12606pre-defined list of commands, and you can add more such commands using the 13354pre-defined list of commands, and you can add more such commands using the
12607variable @code{org-speed-commands-user}. Speed keys do not only speed up 13355variable @code{org-speed-commands-user}. Speed keys do not only speed up
@@ -12641,9 +13389,20 @@ Make sure you know what you are doing before customizing the variables
12641which take off the default security brakes. 13389which take off the default security brakes.
12642 13390
12643@defopt org-confirm-babel-evaluate 13391@defopt org-confirm-babel-evaluate
12644When set to t user is queried before code block evaluation 13392When t (the default), the user is asked before every code block evaluation.
13393When nil, the user is not asked. When set to a function, it is called with
13394two arguments (language and body of the code block) and should return t to
13395ask and nil not to ask.
12645@end defopt 13396@end defopt
12646 13397
13398For example, here is how to execute "ditaa" code (which is considered safe)
13399without asking:
13400@example
13401(defun my-org-confirm-babel-evaluate (lang body)
13402 (not (string= lang "ditaa"))) ; don't ask for ditaa
13403(setq org-confirm-babel-evaluate 'my-org-confirm-babel-evaluate)
13404@end example
13405
12647@item Following @code{shell} and @code{elisp} links 13406@item Following @code{shell} and @code{elisp} links
12648Org has two link types that can directly evaluate code (@pxref{External 13407Org has two link types that can directly evaluate code (@pxref{External
12649links}). These links can be problematic because the code to be evaluated is 13408links}). These links can be problematic because the code to be evaluated is
@@ -12739,7 +13498,7 @@ buffer, most useful for specifying the allowed values of a property.
12739@item #+SETUPFILE: file 13498@item #+SETUPFILE: file
12740This line defines a file that holds more in-buffer setup. Normally this is 13499This line defines a file that holds more in-buffer setup. Normally this is
12741entirely ignored. Only when the buffer is parsed for option-setting lines 13500entirely ignored. Only when the buffer is parsed for option-setting lines
12742(i.e. when starting Org-mode for a file, when pressing @kbd{C-c C-c} in a 13501(i.e.@: when starting Org-mode for a file, when pressing @kbd{C-c C-c} in a
12743settings line, or when exporting), then the contents of this file are parsed 13502settings line, or when exporting), then the contents of this file are parsed
12744as if they had been included in the buffer. In particular, the file can be 13503as if they had been included in the buffer. In particular, the file can be
12745any other Org-mode file with internal setup. You can visit the file the 13504any other Org-mode file with internal setup. You can visit the file the
@@ -12896,14 +13655,14 @@ fninline @r{define footnotes inline}
12896fnnoinline @r{define footnotes in separate section} 13655fnnoinline @r{define footnotes in separate section}
12897fnlocal @r{define footnotes near first reference, but not inline} 13656fnlocal @r{define footnotes near first reference, but not inline}
12898fnprompt @r{prompt for footnote labels} 13657fnprompt @r{prompt for footnote labels}
12899fnauto @r{create [fn:1]-like labels automatically (default)} 13658fnauto @r{create @code{[fn:1]}-like labels automatically (default)}
12900fnconfirm @r{offer automatic label for editing or confirmation} 13659fnconfirm @r{offer automatic label for editing or confirmation}
12901fnplain @r{create [1]-like labels automatically} 13660fnplain @r{create @code{[1]}-like labels automatically}
12902fnadjust @r{automatically renumber and sort footnotes} 13661fnadjust @r{automatically renumber and sort footnotes}
12903nofnadjust @r{do not renumber and sort automatically} 13662nofnadjust @r{do not renumber and sort automatically}
12904@end example 13663@end example
12905@cindex org-hide-block-startup 13664@cindex org-hide-block-startup
12906To hide blocks on startup, use these keywords. The corresponding variable is 13665To hide blocks on startup, use these keywords. The corresponding variable is
12907@code{org-hide-block-startup}. 13666@code{org-hide-block-startup}.
12908@cindex @code{hideblocks}, STARTUP keyword 13667@cindex @code{hideblocks}, STARTUP keyword
12909@cindex @code{nohideblocks}, STARTUP keyword 13668@cindex @code{nohideblocks}, STARTUP keyword
@@ -13155,7 +13914,7 @@ tty you would rather use @kbd{C-c .} to re-insert the timestamp.
13155@end multitable 13914@end multitable
13156 13915
13157 13916
13158@node Interaction, , TTY keys, Miscellaneous 13917@node Interaction, org-crypt.el, TTY keys, Miscellaneous
13159@section Interaction with other packages 13918@section Interaction with other packages
13160@cindex packages, interaction with other 13919@cindex packages, interaction with other
13161Org lives in the world of GNU Emacs and interacts in various ways 13920Org lives in the world of GNU Emacs and interacts in various ways
@@ -13179,7 +13938,7 @@ checks for the availability of Calc by looking for the function
13179@code{calc-eval} which will have been autoloaded during setup if Calc has 13938@code{calc-eval} which will have been autoloaded during setup if Calc has
13180been installed properly. As of Emacs 22, Calc is part of the Emacs 13939been installed properly. As of Emacs 22, Calc is part of the Emacs
13181distribution. Another possibility for interaction between the two 13940distribution. Another possibility for interaction between the two
13182packages is using Calc for embedded calculations. @xref{Embedded Mode, 13941packages is using Calc for embedded calculations. @xref{Embedded Mode,
13183, Embedded Mode, Calc, GNU Emacs Calc Manual}. 13942, Embedded Mode, Calc, GNU Emacs Calc Manual}.
13184@item @file{constants.el} by Carsten Dominik 13943@item @file{constants.el} by Carsten Dominik
13185@cindex @file{constants.el} 13944@cindex @file{constants.el}
@@ -13191,7 +13950,7 @@ constants in the variable @code{org-table-formula-constants}, install
13191the @file{constants} package which defines a large number of constants 13950the @file{constants} package which defines a large number of constants
13192and units, and lets you use unit prefixes like @samp{M} for 13951and units, and lets you use unit prefixes like @samp{M} for
13193@samp{Mega}, etc@. You will need version 2.0 of this package, available 13952@samp{Mega}, etc@. You will need version 2.0 of this package, available
13194at @url{http://www.astro.uva.nl/~dominik/Tools}. Org checks for 13953at @url{http://www.astro.uva.nl/~dominik/Tools}. Org checks for
13195the function @code{constants-get}, which has to be autoloaded in your 13954the function @code{constants-get}, which has to be autoloaded in your
13196setup. See the installation instructions in the file 13955setup. See the installation instructions in the file
13197@file{constants.el}. 13956@file{constants.el}.
@@ -13291,9 +14050,9 @@ Org will move the following key bindings in Org files, and in the agenda
13291buffer (but not during date selection). 14050buffer (but not during date selection).
13292 14051
13293@example 14052@example
13294S-UP -> M-p S-DOWN -> M-n 14053S-UP @result{} M-p S-DOWN @result{} M-n
13295S-LEFT -> M-- S-RIGHT -> M-+ 14054S-LEFT @result{} M-- S-RIGHT @result{} M-+
13296C-S-LEFT -> M-S-- C-S-RIGHT -> M-S-+ 14055C-S-LEFT @result{} M-S-- C-S-RIGHT @result{} M-S-+
13297@end example 14056@end example
13298 14057
13299@vindex org-disputed-keys 14058@vindex org-disputed-keys
@@ -13303,7 +14062,7 @@ to have other replacement keys, look at the variable
13303 14062
13304@item @file{yasnippet.el} 14063@item @file{yasnippet.el}
13305@cindex @file{yasnippet.el} 14064@cindex @file{yasnippet.el}
13306The way Org-mode binds the TAB key (binding to @code{[tab]} instead of 14065The way Org mode binds the TAB key (binding to @code{[tab]} instead of
13307@code{"\t"}) overrules YASnippet's access to this key. The following code 14066@code{"\t"}) overrules YASnippet's access to this key. The following code
13308fixed this problem: 14067fixed this problem:
13309 14068
@@ -13314,6 +14073,26 @@ fixed this problem:
13314 (define-key yas/keymap [tab] 'yas/next-field-group))) 14073 (define-key yas/keymap [tab] 'yas/next-field-group)))
13315@end lisp 14074@end lisp
13316 14075
14076The latest version of yasnippet doesn't play well with Org mode. If the
14077above code does not fix the conflict, start by defining the following
14078function:
14079
14080@lisp
14081(defun yas/org-very-safe-expand ()
14082 (let ((yas/fallback-behavior 'return-nil)) (yas/expand)))
14083@end lisp
14084
14085Then, tell Org mode what to do with the new function:
14086
14087@lisp
14088(add-hook 'org-mode-hook
14089 (lambda ()
14090 (make-variable-buffer-local 'yas/trigger-key)
14091 (setq yas/trigger-key [tab])
14092 (add-to-list 'org-tab-first-hook 'yas/org-very-safe-expand)
14093 (define-key yas/keymap [tab] 'yas/next-field)))
14094@end lisp
14095
13317@item @file{windmove.el} by Hovav Shacham 14096@item @file{windmove.el} by Hovav Shacham
13318@cindex @file{windmove.el} 14097@cindex @file{windmove.el}
13319This package also uses the @kbd{S-<cursor>} keys, so everything written 14098This package also uses the @kbd{S-<cursor>} keys, so everything written
@@ -13344,6 +14123,44 @@ another key for this command, or override the key in
13344 14123
13345@end table 14124@end table
13346 14125
14126@node org-crypt.el, , Interaction, Miscellaneous
14127@section org-crypt.el
14128@cindex @file{org-crypt.el}
14129@cindex @code{org-decrypt-entry}
14130
14131Org-crypt will encrypt the text of an entry, but not the headline, or
14132properties. Org-crypt uses the Emacs EasyPG library to encrypt and decrypt
14133files.
14134
14135Any text below a headline that has a @samp{:crypt:} tag will be automatically
14136be encrypted when the file is saved. If you want to use a different tag just
14137customize the @code{org-crypt-tag-matcher} setting.
14138
14139To use org-crypt it is suggested that you have the following in your
14140@file{.emacs}:
14141
14142@example
14143(require 'org-crypt)
14144(org-crypt-use-before-save-magic)
14145(setq org-tags-exclude-from-inheritance (quote ("crypt")))
14146
14147(setq org-crypt-key nil)
14148 ;; GPG key to use for encryption
14149 ;; Either the Key ID or set to nil to use symmetric encryption.
14150
14151(setq auto-save-default nil)
14152 ;; Auto-saving does not cooperate with org-crypt.el: so you need
14153 ;; to turn it off if you plan to use org-crypt.el quite often.
14154 ;; Otherwise, you'll get an (annoying) message each time you
14155 ;; start Org.
14156
14157 ;; To turn it off only locally, you can insert this:
14158 ;;
14159 ;; # -*- buffer-auto-save-file-name: nil; -*-
14160@end example
14161
14162Excluding the crypt tag from inheritance prevents already encrypted text
14163being encrypted again.
13347 14164
13348@node Hacking, MobileOrg, Miscellaneous, Top 14165@node Hacking, MobileOrg, Miscellaneous, Top
13349@appendix Hacking 14166@appendix Hacking
@@ -13487,7 +14304,7 @@ the link description when the link is later inserted into an Org
13487buffer with @kbd{C-c C-l}. 14304buffer with @kbd{C-c C-l}.
13488 14305
13489When it makes sense for your new link type, you may also define a function 14306When it makes sense for your new link type, you may also define a function
13490@code{org-PREFIX-complete-link} that implements special (e.g. completion) 14307@code{org-PREFIX-complete-link} that implements special (e.g.@: completion)
13491support for inserting such a link with @kbd{C-c C-l}. Such a function should 14308support for inserting such a link with @kbd{C-c C-l}. Such a function should
13492not accept any arguments, and return the full link with prefix. 14309not accept any arguments, and return the full link with prefix.
13493 14310
@@ -13526,7 +14343,8 @@ package, special contexts are lines that start with @code{#+R:} or
13526The function first checks if the cursor is in such a line. If that is the 14343The function first checks if the cursor is in such a line. If that is the
13527case, @code{org-R-apply} is called and the function returns @code{t} to 14344case, @code{org-R-apply} is called and the function returns @code{t} to
13528signal that action was taken, and @kbd{C-c C-c} will stop looking for other 14345signal that action was taken, and @kbd{C-c C-c} will stop looking for other
13529contexts. If the function finds it should do nothing locally, it returns @code{nil} so that other, similar functions can have a try. 14346contexts. If the function finds it should do nothing locally, it returns
14347@code{nil} so that other, similar functions can have a try.
13530 14348
13531 14349
13532@node Tables in arbitrary syntax, Dynamic blocks, Context-sensitive commands, Hacking 14350@node Tables in arbitrary syntax, Dynamic blocks, Context-sensitive commands, Hacking
@@ -13539,7 +14357,7 @@ Since Orgtbl mode can be used as a minor mode in arbitrary buffers, a
13539frequent feature request has been to make it work with native tables in 14357frequent feature request has been to make it work with native tables in
13540specific languages, for example @LaTeX{}. However, this is extremely 14358specific languages, for example @LaTeX{}. However, this is extremely
13541hard to do in a general way, would lead to a customization nightmare, 14359hard to do in a general way, would lead to a customization nightmare,
13542and would take away much of the simplicity of the Orgtbl-mode table 14360and would take away much of the simplicity of the Orgtbl mode table
13543editor. 14361editor.
13544 14362
13545This appendix describes a different approach. We keep the Orgtbl mode 14363This appendix describes a different approach. We keep the Orgtbl mode
@@ -13587,7 +14405,7 @@ example:
13587 14405
13588@noindent 14406@noindent
13589@code{table_name} is the reference name for the table that is also used 14407@code{table_name} is the reference name for the table that is also used
13590in the receiver lines. @code{translation_function} is the Lisp function 14408in the receiver lines. @code{translation_function} is the Lisp function
13591that does the translation. Furthermore, the line can contain a list of 14409that does the translation. Furthermore, the line can contain a list of
13592arguments (alternating key and value) at the end. The arguments will be 14410arguments (alternating key and value) at the end. The arguments will be
13593passed as a property list to the translation function for 14411passed as a property list to the translation function for
@@ -13690,7 +14508,7 @@ table inserted between the two marker lines.
13690Now let's assume you want to make the table header by hand, because you 14508Now let's assume you want to make the table header by hand, because you
13691want to control how columns are aligned, etc@. In this case we make sure 14509want to control how columns are aligned, etc@. In this case we make sure
13692that the table translator skips the first 2 lines of the source 14510that the table translator skips the first 2 lines of the source
13693table, and tell the command to work as a @i{splice}, i.e. to not produce 14511table, and tell the command to work as a @i{splice}, i.e.@: to not produce
13694header and footer commands of the target table: 14512header and footer commands of the target table:
13695 14513
13696@example 14514@example
@@ -13725,7 +14543,7 @@ tabular environment. Default is nil.
13725A format to be used to wrap each field, it should contain @code{%s} for the 14543A format to be used to wrap each field, it should contain @code{%s} for the
13726original field value. For example, to wrap each field value in dollars, 14544original field value. For example, to wrap each field value in dollars,
13727you could use @code{:fmt "$%s$"}. This may also be a property list with 14545you could use @code{:fmt "$%s$"}. This may also be a property list with
13728column numbers and formats. for example @code{:fmt (2 "$%s$" 4 "%s\\%%")}. 14546column numbers and formats, for example @code{:fmt (2 "$%s$" 4 "%s\\%%")}.
13729A function of one argument can be used in place of the strings; the 14547A function of one argument can be used in place of the strings; the
13730function must return a formatted string. 14548function must return a formatted string.
13731 14549
@@ -13773,7 +14591,7 @@ hands processing over to the generic translator. Here is the entire code:
13773 14591
13774As you can see, the properties passed into the function (variable 14592As you can see, the properties passed into the function (variable
13775@var{PARAMS}) are combined with the ones newly defined in the function 14593@var{PARAMS}) are combined with the ones newly defined in the function
13776(variable @var{PARAMS2}). The ones passed into the function (i.e. the 14594(variable @var{PARAMS2}). The ones passed into the function (i.e.@: the
13777ones set by the @samp{ORGTBL SEND} line) take precedence. So if you 14595ones set by the @samp{ORGTBL SEND} line) take precedence. So if you
13778would like to use the @LaTeX{} translator, but wanted the line endings to 14596would like to use the @LaTeX{} translator, but wanted the line endings to
13779be @samp{\\[2mm]} instead of the default @samp{\\}, you could just 14597be @samp{\\[2mm]} instead of the default @samp{\\}, you could just
@@ -13920,15 +14738,24 @@ example @code{before-save-hook}. @code{org-update-all-dblocks} is
13920written in a way such that it does nothing in buffers that are not in 14738written in a way such that it does nothing in buffers that are not in
13921@code{org-mode}. 14739@code{org-mode}.
13922 14740
14741You can narrow the current buffer to the current dynamic block (like any
14742other block) with @code{org-narrow-to-block}.
14743
13923@node Special agenda views, Extracting agenda information, Dynamic blocks, Hacking 14744@node Special agenda views, Extracting agenda information, Dynamic blocks, Hacking
13924@section Special agenda views 14745@section Special agenda views
13925@cindex agenda views, user-defined 14746@cindex agenda views, user-defined
13926 14747
14748@vindex org-agenda-skip-function
14749@vindex org-agenda-skip-function-global
13927Org provides a special hook that can be used to narrow down the selection 14750Org provides a special hook that can be used to narrow down the selection
13928made by these agenda views: @code{todo}, @code{alltodo}, @code{tags}, @code{tags-todo}, 14751made by these agenda views: @code{agenda}, @code{todo}, @code{alltodo},
13929@code{tags-tree}. You may specify a function that is used at each match to verify 14752@code{tags}, @code{tags-todo}, @code{tags-tree}. You may specify a function
13930if the match should indeed be part of the agenda view, and if not, how 14753that is used at each match to verify if the match should indeed be part of
13931much should be skipped. 14754the agenda view, and if not, how much should be skipped. You can specify a
14755global condition that will be applied to all agenda views, this condition
14756would be stored in the variable @code{org-agenda-skip-function-global}. More
14757commonly, such a definition is applied only to specific custom searches,
14758using @code{org-agenda-skip-function}.
13932 14759
13933Let's say you want to produce a list of projects that contain a WAITING 14760Let's say you want to produce a list of projects that contain a WAITING
13934tag anywhere in the project tree. Let's further assume that you have 14761tag anywhere in the project tree. Let's further assume that you have
@@ -14219,7 +15046,7 @@ does not need to preserve point. After evaluation, the cursor will be
14219moved to the end of the line (presumably of the headline of the 15046moved to the end of the line (presumably of the headline of the
14220processed entry) and search continues from there. Under some 15047processed entry) and search continues from there. Under some
14221circumstances, this may not produce the wanted results. For example, 15048circumstances, this may not produce the wanted results. For example,
14222if you have removed (e.g. archived) the current (sub)tree it could 15049if you have removed (e.g.@: archived) the current (sub)tree it could
14223mean that the next entry will be skipped entirely. In such cases, you 15050mean that the next entry will be skipped entirely. In such cases, you
14224can specify the position from where search should continue by making 15051can specify the position from where search should continue by making
14225FUNC set the variable `org-map-continue-from' to the desired buffer 15052FUNC set the variable `org-map-continue-from' to the desired buffer
@@ -14235,6 +15062,7 @@ SCOPE determines the scope of this command. It can be any of:
14235@example 15062@example
14236nil @r{the current buffer, respecting the restriction if any} 15063nil @r{the current buffer, respecting the restriction if any}
14237tree @r{the subtree started with the entry at point} 15064tree @r{the subtree started with the entry at point}
15065region @r{The entries within the active region, if any}
14238file @r{the current buffer, without restriction} 15066file @r{the current buffer, without restriction}
14239file-with-archives 15067file-with-archives
14240 @r{the current buffer, and any archives associated with it} 15068 @r{the current buffer, and any archives associated with it}
@@ -14355,7 +15183,7 @@ The easiest way to create that directory is to use a free
14355@uref{http://dropbox.com,Dropbox.com} account@footnote{If you cannot use 15183@uref{http://dropbox.com,Dropbox.com} account@footnote{If you cannot use
14356Dropbox, or if your version of MobileOrg does not support it, you can use a 15184Dropbox, or if your version of MobileOrg does not support it, you can use a
14357webdav server. For more information, check out the documentation of MobileOrg and also this 15185webdav server. For more information, check out the documentation of MobileOrg and also this
14358@uref{http://orgmode.org/worg/org-faq.php#mobileorg_webdav, FAQ entry}.}. 15186@uref{http://orgmode.org/worg/org-faq.html#mobileorg_webdav, FAQ entry}.}.
14359When MobileOrg first connects to your Dropbox, it will create a directory 15187When MobileOrg first connects to your Dropbox, it will create a directory
14360@i{MobileOrg} inside the Dropbox. After the directory has been created, tell 15188@i{MobileOrg} inside the Dropbox. After the directory has been created, tell
14361Emacs about it: 15189Emacs about it:
@@ -14373,7 +15201,7 @@ and to read captured notes from there.
14373This operation copies all files currently listed in @code{org-mobile-files} 15201This operation copies all files currently listed in @code{org-mobile-files}
14374to the directory @code{org-mobile-directory}. By default this list contains 15202to the directory @code{org-mobile-directory}. By default this list contains
14375all agenda files (as listed in @code{org-agenda-files}), but additional files 15203all agenda files (as listed in @code{org-agenda-files}), but additional files
14376can be included by customizing @code{org-mobiles-files}. File names will be 15204can be included by customizing @code{org-mobile-files}. File names will be
14377staged with paths relative to @code{org-directory}, so all files should be 15205staged with paths relative to @code{org-directory}, so all files should be
14378inside this directory. The push operation also creates a special Org file 15206inside this directory. The push operation also creates a special Org file
14379@file{agendas.org} with all custom agenda view defined by the 15207@file{agendas.org} with all custom agenda view defined by the
@@ -14703,6 +15531,8 @@ with links transformation to Org syntax.
14703@i{David O'Toole} wrote @file{org-publish.el} and drafted the manual 15531@i{David O'Toole} wrote @file{org-publish.el} and drafted the manual
14704chapter about publishing. 15532chapter about publishing.
14705@item 15533@item
15534@i{Jambunathan K} contributed the OpenDocumentText exporter.
15535@item
14706@i{Sebastien Vauban} reported many issues with LaTeX and BEAMER export and 15536@i{Sebastien Vauban} reported many issues with LaTeX and BEAMER export and
14707enabled source code highlighling in Gnus. 15537enabled source code highlighling in Gnus.
14708@item 15538@item
@@ -14729,6 +15559,7 @@ work on a tty.
14729@item 15559@item
14730@i{Piotr Zielinski} wrote @file{org-mouse.el}, proposed agenda blocks 15560@i{Piotr Zielinski} wrote @file{org-mouse.el}, proposed agenda blocks
14731and contributed various ideas and code snippets. 15561and contributed various ideas and code snippets.
15562@item
14732@end itemize 15563@end itemize
14733 15564
14734 15565
@@ -14758,6 +15589,10 @@ org-customize @key{RET}} and then click yourself through the tree.
14758 15589
14759@bye 15590@bye
14760 15591
15592@ignore
15593 arch-tag: 7893d1Fe-cc57-4d13-b5e5-f494a1CBC7ac
15594@end ignore
15595
14761@c Local variables: 15596@c Local variables:
14762@c fill-column: 77 15597@c fill-column: 77
14763@c indent-tabs-mode: nil 15598@c indent-tabs-mode: nil
diff --git a/etc/refcards/orgcard.tex b/etc/refcards/orgcard.tex
index f35ed209149..e4d5c62a4ea 100644
--- a/etc/refcards/orgcard.tex
+++ b/etc/refcards/orgcard.tex
@@ -1,6 +1,6 @@
1% Reference Card for Org Mode 1% Reference Card for Org Mode
2\def\orgversionnumber{7.4} 2\def\orgversionnumber{7.7}
3\def\versionyear{2010} % latest update 3\def\versionyear{2011} % latest update
4\def\year{2011} % latest copyright year 4\def\year{2011} % latest copyright year
5 5
6%**start of header 6%**start of header
@@ -17,8 +17,8 @@
17\pdflayout=(0l) 17\pdflayout=(0l)
18 18
19% Nothing else needs to be changed below this line. 19% Nothing else needs to be changed below this line.
20% Copyright (C) 1987, 1993, 1996-1997, 2001-2011 20% Copyright (C) 1987, 1993, 1996, 1997, 2001, 2002, 2003, 2004, 2005,
21% Free Software Foundation, Inc. 21% 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
22 22
23% This file is part of GNU Emacs. 23% This file is part of GNU Emacs.
24 24
@@ -309,6 +309,7 @@ are preserved on all copies.
309\metax{move subtree/list item up/down}{M-S-UP/DOWN} 309\metax{move subtree/list item up/down}{M-S-UP/DOWN}
310\metax{sort subtree/region/plain-list}{C-c \^{}} 310\metax{sort subtree/region/plain-list}{C-c \^{}}
311\metax{clone a subtree}{C-c C-x c} 311\metax{clone a subtree}{C-c C-x c}
312\metax{copy visible text}{C-c C-x v}
312\metax{kill/copy subtree}{C-c C-x C-w/M-w} 313\metax{kill/copy subtree}{C-c C-x C-w/M-w}
313\metax{yank subtree}{C-c C-x C-y or C-y} 314\metax{yank subtree}{C-c C-x C-y or C-y}
314\metax{narrow buffer to subtree / widen}{C-x n s/w} 315\metax{narrow buffer to subtree / widen}{C-x n s/w}
@@ -443,7 +444,9 @@ formula, \kbd{:=} a field formula.
443 444
444\key{execute code block at point}{C-c C-c} 445\key{execute code block at point}{C-c C-c}
445\key{open results of code block at point}{C-c C-o} 446\key{open results of code block at point}{C-c C-o}
447\key{check code block at point for errors}{C-c C-v c}
446\key{view expanded body of code block at point}{C-c C-v v} 448\key{view expanded body of code block at point}{C-c C-v v}
449\key{view information about code block at point}{C-c C-v I}
447\key{go to named code block}{C-c C-v g} 450\key{go to named code block}{C-c C-v g}
448\key{go to named result}{C-c C-v r} 451\key{go to named result}{C-c C-v r}
449\key{go to the head of the current code block}{C-c C-v u} 452\key{go to the head of the current code block}{C-c C-v u}
@@ -586,10 +589,10 @@ after ``{\tt :}'', and dictionary words elsewhere.
586 589
587\key{delete other windows}{o} 590\key{delete other windows}{o}
588\key{view mode dispatcher}{v} 591\key{view mode dispatcher}{v}
589\key{switch to day/week/month/year view}{d w vm vy} 592\key{switch to day/week/month/year/def view}{d w vm vy vSP}
590\key{toggle diary entries / time grid / habits}{D / G / K} 593\key{toggle diary entries / time grid / habits}{D / G / K}
591\key{toggle entry text / clock report}{E / R} 594\key{toggle entry text / clock report}{E / R}
592\key{toggle display of logbook entries}{l / v l/L} 595\key{toggle display of logbook entries}{l / v l/L/c}
593\key{toggle inclusion of archived trees/files}{v a/A} 596\key{toggle inclusion of archived trees/files}{v a/A}
594\key{refresh agenda buffer with any changes}{r / g} 597\key{refresh agenda buffer with any changes}{r / g}
595\key{filter with respect to a tag}{/} 598\key{filter with respect to a tag}{/}
@@ -683,3 +686,4 @@ your own key as shown under INSTALLATION.
683% compile-command: "tex refcard" 686% compile-command: "tex refcard"
684% End: 687% End:
685 688
689% arch-tag: 139f6750-5cfc-49ca-92b5-237fe5795290