aboutsummaryrefslogtreecommitdiffstats
path: root/doc
diff options
context:
space:
mode:
authorBastien Guerry2012-01-03 18:27:21 +0100
committerBastien Guerry2012-01-03 18:27:21 +0100
commite66ba1dfc4cf2e12100191d2c24436c42d097268 (patch)
treeb50b009e703fe1a9e8cb13cddf7928a97ad6210c /doc
parent88c5c7c8313162b94173fd4333e6062aa07c4d2e (diff)
downloademacs-e66ba1dfc4cf2e12100191d2c24436c42d097268.tar.gz
emacs-e66ba1dfc4cf2e12100191d2c24436c42d097268.zip
Merge Org 7.8.03
Diffstat (limited to 'doc')
-rw-r--r--doc/misc/ChangeLog154
-rw-r--r--doc/misc/org.texi2309
2 files changed, 1759 insertions, 704 deletions
diff --git a/doc/misc/ChangeLog b/doc/misc/ChangeLog
index 3b0e5251d5e..30c4b01d3fa 100644
--- a/doc/misc/ChangeLog
+++ b/doc/misc/ChangeLog
@@ -1,3 +1,157 @@
12012-01-03 Eric Schulte <eric.schulte@gmx.com>
2
3 * org.texi (Noweb reference syntax): Adding documentation of
4 the `*org-babel-use-quick-and-dirty-noweb-expansion*'
5 variable.
6
72012-01-03 Bastien Guerry <bzg@gnu.org>
8
9 * org.texi (Plain lists): Split the table to fix the display
10 of items.
11
122012-01-03 Bastien Guerry <bzg@gnu.org>
13
14 * org.texi (Plain lists): Fix misplaced explanation.
15
162012-01-03 Bastien Guerry <bzg@gnu.org>
17
18 * org.texi (Plain lists, Agenda files): Add index entries.
19
202012-01-03 Julian Gehring <julian.gehring@googlemail.com>
21
22 * org.texi: Use "Org mode" instead of alternatives like
23 "Org-mode" or "org-mode".
24
252012-01-03 Bernt Hansen <bernt@norang.ca>
26
27 * org.texi (Agenda commands): Document
28 `org-clock-report-include-clocking-task'.
29
302012-01-03 Bastien Guerry <bzg@gnu.org>
31
32 * org.texi (Checkboxes): Document the new behavior of `C-u C-c
33 C-c' on checkboxes.
34
352012-01-03 Julian Gehring <julian.gehring@googlemail.com>
36
37 * org.texi: End sentences with two spaces.
38
392012-01-03 Michael Brand <michael.ch.brand@gmail.com>
40
41 * org.texi (External links): Document the link types file+sys
42 and file+emacs, slightly narrow used page width.
43
442012-01-03 Eric Schulte <eric.schulte@gmx.com>
45
46 * org.texi (colnames): Note that colnames behavior may differ
47 across languages.
48
492012-01-03 Bastien Guerry <bzg@gnu.org>
50
51 * org.texi (Weekly/daily agenda, Agenda commands): Fix typos.
52
532012-01-03 Thomas Dye <dk@poto.westell.com>
54
55 * org.texi: Augmented discussion of babel property
56 inheritance. Put footnote outside sentence ending period.
57
582012-01-03 Eric Schulte <schulte.eric@gmail.com>
59
60 * org.texi (eval): Documenting the full range of :eval header
61 argument values.
62
632012-01-03 Eric Schulte <schulte.eric@gmail.com>
64
65 * org.texi (eval): Documentation of the new :eval option.
66
672012-01-03 Thomas Dye <dk@poto.local>
68
69 * org.texi: Add accumulated properties.
70
712012-01-03 Thomas Dye <dk@poto.local>
72
73 * org.texi: Documented no spaces in name=assign, another
74 correction to :var table.
75
762012-01-03 Thomas Dye <dk@poto.local>
77
78 * org.texi: Changed DATA to NAME in Working With Source Code
79 section.
80
812012-01-03 Tom Dye <tsd@tsdye.com>
82
83 * org.texi: Minor change to :var table.
84
852012-01-03 Tom Dye <tsd@tsdye.com>
86
87 * org.texi: More changes to :var table (some examples were wrong).
88
892012-01-03 Tom Dye <tsd@tsdye.com>
90
91 * org.texi: Cleaned up :var table.
92
932012-01-03 Bastien Guerry <bzg@gnu.org>
94
95 * org.texi (Timestamps, Weekly/daily agenda)
96 (Weekly/daily agenda): Add @cindex for "appointment".
97
982012-01-03 Eric Schulte <schulte.eric@gmail.com>
99
100 * org.texi (Literal examples): A new link to the template for
101 inserting empty code blocks.
102 (Structure of code blocks): A new link to the template for
103 inserting empty code blocks.
104
1052012-01-03 Rafael Laboissiere <rafael@laboissiere.net> (tiny change)
106
107 * org.texi (External links): Add footnote on how the behavior
108 of the text search in Org files are controled by the variable
109 `org-link-search-must-match-exact-headline'.
110
1112012-01-03 Eric Schulte <schulte.eric@gmail.com>
112
113 * org.texi (Buffer-wide header arguments): Update
114 documentation to reflect removal of #+PROPERTIES.
115
1162012-01-03 Carsten Dominik <carsten.dominik@gmail.com>
117
118 * org.texi (The clock table): Mention that ACHIVED trees
119 contribute to the clock table.
120
1212012-01-03 Carsten Dominik <carsten.dominik@gmail.com> (tiny change)
122
123 * org.texi (Conflicts): Better yasnippet config info.
124
1252012-01-03 Bastien Guerry <bzg@gnu.org> (tiny change)
126
127 * org.texi (Selective export): Explicitely mention the default
128 values for `org-export-select-tags',
129 `org-export-exclude-tags'.
130
1312012-01-03 Tom Dye <tsd@tsdye.com>
132
133 * org.texi: Added a line to specify that header arguments are
134 lowercase.
135
1362012-01-03 Tom Dye <tsd@tsdye.com>
137
138 * org.texi: :var requires default value when declared.
139
1402012-01-03 Bastien Guerry <bzg@gnu.org>
141
142 * org.texi (Handling links): Add a note about the
143 `org-link-frame-setup' option.
144
1452012-01-03 David Maus <dmaus@ictsoc.de>
146
147 * org.texi (Exporting Agenda Views, Extracting agenda
148 information): Fix command line syntax, quote symbol parameter
149 values.
150
1512012-01-03 David Maus <dmaus@ictsoc.de>
152
153 * org.texi (Exporting Agenda Views): Fix command line syntax.
154
12011-12-28 Paul Eggert <eggert@cs.ucla.edu> 1552011-12-28 Paul Eggert <eggert@cs.ucla.edu>
2 156
3 * gnus.texi (Mail Source Customization, Mail Back End Variables): 157 * gnus.texi (Mail Source Customization, Mail Back End Variables):
diff --git a/doc/misc/org.texi b/doc/misc/org.texi
index adc9cf0b139..6d9a6566d9f 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.7 7@set VERSION 7.8.03
8@set DATE July 2011 8@set DATE January 2012
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
@@ -36,7 +36,7 @@
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,command} 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
41@c orgcmdtkc{text,key,cmd} Like orgcmd,special text instead of key 41@c orgcmdtkc{text,key,cmd} Like orgcmd,special text instead of key
42@c orgcmdkkc{key1,key2,cmd} Two keys with one command name, use "or" 42@c orgcmdkkc{key1,key2,cmd} Two keys with one command name, use "or"
@@ -296,7 +296,7 @@ license to the document, as described in section 6 of the license.
296 296
297@subtitle Release @value{VERSION} 297@subtitle Release @value{VERSION}
298@author by Carsten Dominik 298@author by Carsten Dominik
299with contributions by David O'Toole, Bastien Guerry, Philip Rooke, Dan Davison, Eric Schulte, and Thomas Dye 299with contributions by David O'Toole, Bastien Guerry, Philip Rooke, Dan Davison, Eric Schulte, Thomas Dye and Jambunathan K.
300 300
301@c The following two commands start the copyright page. 301@c The following two commands start the copyright page.
302@page 302@page
@@ -382,7 +382,7 @@ The spreadsheet
382* Column formulas:: Formulas valid for an entire column 382* Column formulas:: Formulas valid for an entire column
383* Editing and debugging formulas:: Fixing formulas 383* Editing and debugging formulas:: Fixing formulas
384* Updating the table:: Recomputing all dependent fields 384* Updating the table:: Recomputing all dependent fields
385* Advanced features:: Field names, parameters and automatic recalc 385* Advanced features:: Field and column names, parameters and automatic recalc
386 386
387Hyperlinks 387Hyperlinks
388 388
@@ -433,7 +433,7 @@ Tags
433Properties and columns 433Properties and columns
434 434
435* Property syntax:: How properties are spelled out 435* Property syntax:: How properties are spelled out
436* Special properties:: Access to other Org-mode features 436* Special properties:: Access to other Org mode features
437* Property searches:: Matching property values 437* Property searches:: Matching property values
438* Property inheritance:: Passing values down the tree 438* Property inheritance:: Passing values down the tree
439* Column view:: Tabular viewing and editing 439* Column view:: Tabular viewing and editing
@@ -462,7 +462,7 @@ Dates and times
462 462
463Creating timestamps 463Creating timestamps
464 464
465* The date/time prompt:: How Org-mode helps you entering date and time 465* The date/time prompt:: How Org mode helps you entering date and time
466* Custom time format:: Making dates look different 466* Custom time format:: Making dates look different
467 467
468Deadlines and scheduling 468Deadlines and scheduling
@@ -541,7 +541,7 @@ Markup for rich export
541* Include files:: Include additional files into a document 541* Include files:: Include additional files into a document
542* Index entries:: Making an index 542* Index entries:: Making an index
543* Macro replacement:: Use macros to create complex output 543* Macro replacement:: Use macros to create complex output
544* Embedded LaTeX:: LaTeX can be freely used inside Org documents 544* Embedded @LaTeX{}:: LaTeX can be freely used inside Org documents
545 545
546Structural markup elements 546Structural markup elements
547 547
@@ -560,8 +560,8 @@ Embedded @LaTeX{}
560 560
561* Special symbols:: Greek letters and other symbols 561* Special symbols:: Greek letters and other symbols
562* Subscripts and superscripts:: Simple syntax for raising/lowering text 562* Subscripts and superscripts:: Simple syntax for raising/lowering text
563* LaTeX fragments:: Complex formulas made easy 563* @LaTeX{} fragments:: Complex formulas made easy
564* Previewing LaTeX fragments:: What will this snippet look like? 564* Previewing @LaTeX{} fragments:: What will this snippet look like?
565* CDLaTeX mode:: Speed up entering of formulas 565* CDLaTeX mode:: Speed up entering of formulas
566 566
567Exporting 567Exporting
@@ -571,9 +571,9 @@ Exporting
571* The export dispatcher:: How to access exporter commands 571* The export dispatcher:: How to access exporter commands
572* ASCII/Latin-1/UTF-8 export:: Exporting to flat files with encoding 572* ASCII/Latin-1/UTF-8 export:: Exporting to flat files with encoding
573* HTML export:: Exporting to HTML 573* HTML export:: Exporting to HTML
574* LaTeX and PDF export:: Exporting to @LaTeX{}, and processing to PDF 574* @LaTeX{} and PDF export:: Exporting to @LaTeX{}, and processing to PDF
575* DocBook export:: Exporting to DocBook 575* DocBook export:: Exporting to DocBook
576* OpenDocumentText export:: Exporting to OpenDocumentText 576* OpenDocument Text export:: Exporting to OpenDocument Text
577* TaskJuggler export:: Exporting to TaskJuggler 577* TaskJuggler export:: Exporting to TaskJuggler
578* Freemind export:: Exporting to Freemind mind maps 578* Freemind export:: Exporting to Freemind mind maps
579* XOXO export:: Exporting to XOXO 579* XOXO export:: Exporting to XOXO
@@ -583,7 +583,7 @@ HTML export
583 583
584* HTML Export commands:: How to invoke HTML export 584* HTML Export commands:: How to invoke HTML export
585* HTML preamble and postamble:: How to insert a preamble and a postamble 585* HTML preamble and postamble:: How to insert a preamble and a postamble
586* Quoting HTML tags:: Using direct HTML in Org-mode 586* Quoting HTML tags:: Using direct HTML in Org mode
587* Links in HTML export:: How links will be interpreted and formatted 587* Links in HTML export:: How links will be interpreted and formatted
588* Tables in HTML export:: How to modify the formatting of tables 588* Tables in HTML export:: How to modify the formatting of tables
589* Images in HTML export:: How to insert figures into HTML output 589* Images in HTML export:: How to insert figures into HTML output
@@ -594,11 +594,11 @@ HTML export
594 594
595@LaTeX{} and PDF export 595@LaTeX{} and PDF export
596 596
597* LaTeX/PDF export commands:: Which key invokes which commands 597* @LaTeX{}/PDF export commands::
598* Header and sectioning:: Setting up the export file structure 598* Header and sectioning:: Setting up the export file structure
599* Quoting LaTeX code:: Incorporating literal @LaTeX{} code 599* Quoting @LaTeX{} code:: Incorporating literal @LaTeX{} code
600* Tables in LaTeX export:: Options for exporting tables to @LaTeX{} 600* Tables in @LaTeX{} export:: Options for exporting tables to @LaTeX{}
601* Images in LaTeX export:: How to insert figures into @LaTeX{} output 601* Images in @LaTeX{} export:: How to insert figures into @LaTeX{} output
602* Beamer class export:: Turning the file into a presentation 602* Beamer class export:: Turning the file into a presentation
603 603
604DocBook export 604DocBook export
@@ -610,15 +610,30 @@ DocBook export
610* Images in DocBook export:: How to insert figures into DocBook output 610* Images in DocBook export:: How to insert figures into DocBook output
611* Special characters:: How to handle special characters 611* Special characters:: How to handle special characters
612 612
613OpenDocument export 613OpenDocument Text export
614 614
615* OpenDocumentText export commands:: How to invoke OpenDocumentText export 615* Pre-requisites for @acronym{ODT} export:: What packages @acronym{ODT} exporter relies on
616* Applying Custom Styles:: How to apply custom styles to the output 616* @acronym{ODT} export commands:: How to invoke @acronym{ODT} export
617* Converting to Other formats:: How to convert to formats like doc, docx etc 617* Applying custom styles:: How to apply custom styles to the output
618* Links in OpenDocumentText export:: How links will be interpreted and formatted 618* Links in @acronym{ODT} export:: How links will be interpreted and formatted
619* Tables in OpenDocumentText export:: How Tables are handled 619* Tables in @acronym{ODT} export:: How Tables are exported
620* Images in OpenDocumentText export:: How to insert figures 620* Images in @acronym{ODT} export:: How to insert images
621* Additional Documentation:: How to handle special characters 621* Math formatting in @acronym{ODT} export:: How @LaTeX{} fragments are formatted
622* Literal examples in @acronym{ODT} export:: How source and example blocks are formatted
623* Advanced topics in @acronym{ODT} export:: Read this if you are a power user
624
625Math formatting in @acronym{ODT} export
626
627* Working with @LaTeX{} math snippets:: How to embed @LaTeX{} math fragments
628* Working with MathML or OpenDocument formula files:: How to embed equations in native format
629
630Advanced topics in @acronym{ODT} export
631
632* Exporting and converting to other formats:: How to produce @samp{pdf} and other formats
633* Working with OpenDocument style files:: Explore the internals
634* Creating one-off styles:: How to produce custom highlighting etc
635* Customizing tables in @acronym{ODT} export:: How to define and use Table templates
636* Validating OpenDocument XML:: How to debug corrupt OpenDocument files
622 637
623Publishing 638Publishing
624 639
@@ -649,12 +664,12 @@ Working with source code
649* Editing source code:: Language major-mode editing 664* Editing source code:: Language major-mode editing
650* Exporting code blocks:: Export contents and/or results 665* Exporting code blocks:: Export contents and/or results
651* Extracting source code:: Create pure source code files 666* Extracting source code:: Create pure source code files
652* Evaluating code blocks:: Place results of evaluation in the Org-mode buffer 667* Evaluating code blocks:: Place results of evaluation in the Org mode buffer
653* Library of Babel:: Use and contribute to a library of useful code blocks 668* Library of Babel:: Use and contribute to a library of useful code blocks
654* Languages:: List of supported code block languages 669* Languages:: List of supported code block languages
655* Header arguments:: Configure code block functionality 670* Header arguments:: Configure code block functionality
656* Results of evaluation:: How evaluation results are handled 671* Results of evaluation:: How evaluation results are handled
657* Noweb reference syntax:: Literate programming in Org-mode 672* Noweb reference syntax:: Literate programming in Org mode
658* Key bindings and useful functions:: Work quickly with code blocks 673* Key bindings and useful functions:: Work quickly with code blocks
659* Batch execution:: Call functions from the command line 674* Batch execution:: Call functions from the command line
660 675
@@ -668,7 +683,7 @@ Using header arguments
668* System-wide header arguments:: Set global default values 683* System-wide header arguments:: Set global default values
669* Language-specific header arguments:: Set default values by language 684* Language-specific header arguments:: Set default values by language
670* Buffer-wide header arguments:: Set default values for a specific buffer 685* Buffer-wide header arguments:: Set default values for a specific buffer
671* Header arguments in Org-mode properties:: Set default values for a buffer or heading 686* Header arguments in Org mode properties:: Set default values for a buffer or heading
672* Code block specific header arguments:: The most common way to set values 687* Code block specific header arguments:: The most common way to set values
673* Header arguments in function calls:: The most specific level 688* Header arguments in function calls:: The most specific level
674 689
@@ -736,7 +751,7 @@ Hacking
736Tables and lists in arbitrary syntax 751Tables and lists in arbitrary syntax
737 752
738* Radio tables:: Sending and receiving radio tables 753* Radio tables:: Sending and receiving radio tables
739* A LaTeX example:: Step by step, almost a tutorial 754* A @LaTeX{} example:: Step by step, almost a tutorial
740* Translator functions:: Copy and modify 755* Translator functions:: Copy and modify
741* Radio lists:: Doing the same for lists 756* Radio lists:: Doing the same for lists
742 757
@@ -898,7 +913,7 @@ make install-info
898 913
899Then add the following line to @file{.emacs}. It is needed so that 914Then add the following line to @file{.emacs}. It is needed so that
900Emacs can autoload functions that are located in files not immediately loaded 915Emacs can autoload functions that are located in files not immediately loaded
901when Org-mode starts. 916when Org mode starts.
902@lisp 917@lisp
903(require 'org-install) 918(require 'org-install)
904@end lisp 919@end lisp
@@ -934,9 +949,9 @@ liking.
934(global-set-key "\C-cb" 'org-iswitchb) 949(global-set-key "\C-cb" 'org-iswitchb)
935@end lisp 950@end lisp
936 951
937@cindex Org-mode, turning on 952@cindex Org mode, turning on
938With this setup, all files with extension @samp{.org} will be put 953With this setup, all files with extension @samp{.org} will be put
939into Org-mode. As an alternative, make the first line of a file look 954into Org mode. As an alternative, make the first line of a file look
940like this: 955like this:
941 956
942@example 957@example
@@ -944,7 +959,7 @@ MY PROJECTS -*- mode: org; -*-
944@end example 959@end example
945 960
946@vindex org-insert-mode-line-in-empty-file 961@vindex org-insert-mode-line-in-empty-file
947@noindent which will select Org-mode for this buffer no matter what 962@noindent which will select Org mode for this buffer no matter what
948the file's name is. See also the variable 963the file's name is. See also the variable
949@code{org-insert-mode-line-in-empty-file}. 964@code{org-insert-mode-line-in-empty-file}.
950 965
@@ -987,6 +1002,36 @@ version information of Emacs (@kbd{M-x emacs-version @key{RET}}) and Org
987that you only need to add your description. If you re not sending the Email 1002that you only need to add your description. If you re not sending the Email
988from within Emacs, please copy and paste the content into your Email program. 1003from within Emacs, please copy and paste the content into your Email program.
989 1004
1005Sometimes you might face a problem due to an error in your Emacs or Org mode
1006setup. Before reporting a bug, it is very helpful to start Emacs with minimal
1007customisations and reproduce the problem. Doing so often helps you determine
1008if the problem is with your customisation or with Org mode itself. You can
1009start a typical minimal session with a command like the example below.
1010
1011@example
1012$ emacs -Q -l /path/to/minimal-org.el
1013@end example
1014
1015However if you are using Org mode as distributed with Emacs, a minimal setup
1016is not necessary. In that case it is sufficient to start Emacs as @code{emacs
1017-Q}. The @code{minimal-org.el} setup file can have contents as shown below.
1018
1019@example
1020;;; Minimal setup to load latest `org-mode'
1021
1022;; activate debugging
1023(setq debug-on-error t
1024 debug-on-signal nil
1025 debug-on-quit nil)
1026
1027;; add latest org-mode to load path
1028(add-to-list 'load-path (expand-file-name "/path/to/org-mode/lisp"))
1029(add-to-list 'load-path (expand-file-name "/path/to/org-mode/contrib/lisp"))
1030
1031;; activate org
1032(require 'org-install)
1033@end example
1034
990If an error occurs, a backtrace can be very useful (see below on how to 1035If an error occurs, a backtrace can be very useful (see below on how to
991create one). Often a small example file helps, along with clear information 1036create one). Often a small example file helps, along with clear information
992about: 1037about:
@@ -1009,7 +1054,7 @@ error occurred. Here is how to produce a useful backtrace:
1009 1054
1010@enumerate 1055@enumerate
1011@item 1056@item
1012Reload uncompiled versions of all Org-mode Lisp files. The backtrace 1057Reload uncompiled versions of all Org mode Lisp files. The backtrace
1013contains much more information if it is produced with uncompiled code. 1058contains much more information if it is produced with uncompiled code.
1014To do this, use 1059To do this, use
1015@example 1060@example
@@ -1196,8 +1241,8 @@ Reveal context around point, showing the current entry, the following heading
1196and the hierarchy above. Useful for working near a location that has been 1241and the hierarchy above. Useful for working near a location that has been
1197exposed by a sparse tree command (@pxref{Sparse trees}) or an agenda command 1242exposed by a sparse tree command (@pxref{Sparse trees}) or an agenda command
1198(@pxref{Agenda commands}). With a prefix argument show, on each 1243(@pxref{Agenda commands}). With a prefix argument show, on each
1199level, all sibling headings. With double prefix arg, also show the entire 1244level, all sibling headings. With a double prefix argument, also show the
1200subtree of the parent. 1245entire subtree of the parent.
1201@orgcmd{C-c C-k,show-branches} 1246@orgcmd{C-c C-k,show-branches}
1202Expose all the headings of the subtree, CONTENT view for just one subtree. 1247Expose all the headings of the subtree, CONTENT view for just one subtree.
1203@orgcmd{C-c C-x b,org-tree-to-indirect-buffer} 1248@orgcmd{C-c C-x b,org-tree-to-indirect-buffer}
@@ -1430,7 +1475,7 @@ functionality.
1430@vindex org-show-following-heading 1475@vindex org-show-following-heading
1431@vindex org-show-siblings 1476@vindex org-show-siblings
1432@vindex org-show-entry-below 1477@vindex org-show-entry-below
1433An important feature of Org-mode is the ability to construct @emph{sparse 1478An important feature of Org mode is the ability to construct @emph{sparse
1434trees} for selected information in an outline tree, so that the entire 1479trees} for selected information in an outline tree, so that the entire
1435document is folded as much as possible, but the selected information is made 1480document is folded as much as possible, but the selected information is made
1436visible along with the headline structure above it@footnote{See also the 1481visible along with the headline structure above it@footnote{See also the
@@ -1439,7 +1484,7 @@ variables @code{org-show-hierarchy-above}, @code{org-show-following-heading},
1439control on how much context is shown around each match.}. Just try it out 1484control on how much context is shown around each match.}. Just try it out
1440and you will see immediately how it works. 1485and you will see immediately how it works.
1441 1486
1442Org-mode contains several commands creating such trees, all these 1487Org mode contains several commands creating such trees, all these
1443commands can be accessed through a dispatcher: 1488commands can be accessed through a dispatcher:
1444 1489
1445@table @asis 1490@table @asis
@@ -1597,14 +1642,18 @@ to disable them individually.
1597 1642
1598@table @asis 1643@table @asis
1599@orgcmd{@key{TAB},org-cycle} 1644@orgcmd{@key{TAB},org-cycle}
1645@cindex cycling, in plain lists
1600@vindex org-cycle-include-plain-lists 1646@vindex org-cycle-include-plain-lists
1601Items can be folded just like headline levels. Normally this works only if 1647Items can be folded just like headline levels. Normally this works only if
1602the cursor is on a plain list item. For more details, see the variable 1648the cursor is on a plain list item. For more details, see the variable
1603@code{org-cycle-include-plain-lists}. If this variable is set to 1649@code{org-cycle-include-plain-lists}. If this variable is set to
1604@code{integrate}, plain list items will be treated like low-level 1650@code{integrate}, plain list items will be treated like low-level
1605headlines. The level of an item is then given by the 1651headlines. The level of an item is then given by the indentation of the
1606indentation of the bullet/number. Items are always subordinate to real 1652bullet/number. Items are always subordinate to real headlines, however; the
1607headlines, however; the hierarchies remain completely separated. 1653hierarchies remain completely separated. In a new item with no text yet, the
1654first @key{TAB} demotes the item to become a child of the previous
1655one. Subsequent @key{TAB}s move the item to meaningful levels in the list
1656and eventually get it back to its initial position.
1608@orgcmd{M-@key{RET},org-insert-heading} 1657@orgcmd{M-@key{RET},org-insert-heading}
1609@vindex org-M-RET-may-split-line 1658@vindex org-M-RET-may-split-line
1610@vindex org-list-automatic-rules 1659@vindex org-list-automatic-rules
@@ -1615,17 +1664,15 @@ new item@footnote{If you do not want the item to be split, customize the
1615variable @code{org-M-RET-may-split-line}.}. If this command is executed 1664variable @code{org-M-RET-may-split-line}.}. If this command is executed
1616@emph{before item's body}, the new item is created @emph{before} the current 1665@emph{before item's body}, the new item is created @emph{before} the current
1617one. 1666one.
1667@end table
1668
1669@table @kbd
1618@kindex M-S-@key{RET} 1670@kindex M-S-@key{RET}
1619@item M-S-@key{RET} 1671@item M-S-RET
1620Insert a new item with a checkbox (@pxref{Checkboxes}). 1672Insert a new item with a checkbox (@pxref{Checkboxes}).
1621@orgcmd{@key{TAB},org-cycle}
1622In a new item with no text yet, the first @key{TAB} demotes the item to
1623become a child of the previous one. Subsequent @key{TAB}s move the item to
1624meaningful levels in the list and eventually get it back to its initial
1625position.
1626@kindex S-@key{down} 1673@kindex S-@key{down}
1627@item S-@key{up} 1674@item S-up
1628@itemx S-@key{down} 1675@itemx S-down
1629@cindex shift-selection-mode 1676@cindex shift-selection-mode
1630@vindex org-support-shift-select 1677@vindex org-support-shift-select
1631@vindex org-list-use-circular-motion 1678@vindex org-list-use-circular-motion
@@ -1637,21 +1684,21 @@ jumping commands like @kbd{C-@key{up}} and @kbd{C-@key{down}} to quite
1637similar effect. 1684similar effect.
1638@kindex M-@key{up} 1685@kindex M-@key{up}
1639@kindex M-@key{down} 1686@kindex M-@key{down}
1640@item M-@key{up} 1687@item M-up
1641@itemx M-@key{down} 1688@itemx M-down
1642Move the item including subitems up/down@footnote{See 1689Move the item including subitems up/down@footnote{See
1643@code{org-liste-use-circular-motion} for a cyclic behavior.} (swap with 1690@code{org-liste-use-circular-motion} for a cyclic behavior.} (swap with
1644previous/next item of same indentation). If the list is ordered, renumbering 1691previous/next item of same indentation). If the list is ordered, renumbering
1645is automatic. 1692is automatic.
1646@kindex M-@key{left} 1693@kindex M-@key{left}
1647@kindex M-@key{right} 1694@kindex M-@key{right}
1648@item M-@key{left} 1695@item M-left
1649@itemx M-@key{right} 1696@itemx M-right
1650Decrease/increase the indentation of an item, leaving children alone. 1697Decrease/increase the indentation of an item, leaving children alone.
1651@kindex M-S-@key{left} 1698@kindex M-S-@key{left}
1652@kindex M-S-@key{right} 1699@kindex M-S-@key{right}
1653@item M-S-@key{left} 1700@item M-S-left
1654@itemx M-S-@key{right} 1701@itemx M-S-right
1655Decrease/increase the indentation of the item, including subitems. 1702Decrease/increase the indentation of the item, including subitems.
1656Initially, the item tree is selected based on current indentation. When 1703Initially, the item tree is selected based on current indentation. When
1657these commands are executed several times in direct succession, the initially 1704these commands are executed several times in direct succession, the initially
@@ -1694,7 +1741,7 @@ Turn the whole plain list into a subtree of the current heading. Checkboxes
1694(resp. checked). 1741(resp. checked).
1695@kindex S-@key{left} 1742@kindex S-@key{left}
1696@kindex S-@key{right} 1743@kindex S-@key{right}
1697@item S-@key{left}/@key{right} 1744@item S-left/right
1698@vindex org-support-shift-select 1745@vindex org-support-shift-select
1699This command also cycles bullet styles when the cursor in on the bullet or 1746This command also cycles bullet styles when the cursor in on the bullet or
1700anywhere in an item line, details depending on 1747anywhere in an item line, details depending on
@@ -1713,7 +1760,7 @@ numerically, alphabetically, by time, or by custom function.
1713 1760
1714@vindex org-drawers 1761@vindex org-drawers
1715Sometimes you want to keep information associated with an entry, but you 1762Sometimes you want to keep information associated with an entry, but you
1716normally don't want to see it. For this, Org-mode has @emph{drawers}. 1763normally don't want to see it. For this, Org mode has @emph{drawers}.
1717Drawers need to be configured with the variable 1764Drawers need to be configured with the variable
1718@code{org-drawers}@footnote{You can define drawers on a per-file basis 1765@code{org-drawers}@footnote{You can define drawers on a per-file basis
1719with a line like @code{#+DRAWERS: HIDDEN PROPERTIES STATE}}. Drawers 1766with a line like @code{#+DRAWERS: HIDDEN PROPERTIES STATE}}. Drawers
@@ -1731,7 +1778,7 @@ look like this:
1731Visibility cycling (@pxref{Visibility cycling}) on the headline will hide and 1778Visibility cycling (@pxref{Visibility cycling}) on the headline will hide and
1732show the entry, but keep the drawer collapsed to a single line. In order to 1779show the entry, but keep the drawer collapsed to a single line. In order to
1733look inside the drawer, you need to move the cursor to the drawer line and 1780look inside the drawer, you need to move the cursor to the drawer line and
1734press @key{TAB} there. Org-mode uses the @code{PROPERTIES} drawer for 1781press @key{TAB} there. Org mode uses the @code{PROPERTIES} drawer for
1735storing properties (@pxref{Properties and Columns}), and you can also arrange 1782storing properties (@pxref{Properties and Columns}), and you can also arrange
1736for state change notes (@pxref{Tracking TODO state changes}) and clock times 1783for state change notes (@pxref{Tracking TODO state changes}) and clock times
1737(@pxref{Clocking work time}) to be stored in a drawer @code{LOGBOOK}. If you 1784(@pxref{Clocking work time}) to be stored in a drawer @code{LOGBOOK}. If you
@@ -1748,7 +1795,7 @@ Add a time-stamped note to the LOGBOOK drawer.
1748 1795
1749@vindex org-hide-block-startup 1796@vindex org-hide-block-startup
1750@cindex blocks, folding 1797@cindex blocks, folding
1751Org-mode uses begin...end blocks for various purposes from including source 1798Org mode uses begin...end blocks for various purposes from including source
1752code examples (@pxref{Literal examples}) to capturing time logging 1799code examples (@pxref{Literal examples}) to capturing time logging
1753information (@pxref{Clocking work time}). These blocks can be folded and 1800information (@pxref{Clocking work time}). These blocks can be folded and
1754unfolded by pressing TAB in the begin line. You can also get all blocks 1801unfolded by pressing TAB in the begin line. You can also get all blocks
@@ -1766,8 +1813,8 @@ or on a per-file basis by using
1766@section Footnotes 1813@section Footnotes
1767@cindex footnotes 1814@cindex footnotes
1768 1815
1769Org-mode supports the creation of footnotes. In contrast to the 1816Org mode supports the creation of footnotes. In contrast to the
1770@file{footnote.el} package, Org-mode's footnotes are designed for work on a 1817@file{footnote.el} package, Org mode's footnotes are designed for work on a
1771larger document, not only for one-off documents like emails. The basic 1818larger document, not only for one-off documents like emails. The basic
1772syntax is similar to the one used by @file{footnote.el}, i.e.@: a footnote is 1819syntax is similar to the one used by @file{footnote.el}, i.e.@: a footnote is
1773defined in a paragraph that is started by a footnote marker in square 1820defined in a paragraph that is started by a footnote marker in square
@@ -1781,11 +1828,11 @@ The Org homepage[fn:1] now looks a lot better than it used to.
1781[fn:1] The link is: http://orgmode.org 1828[fn:1] The link is: http://orgmode.org
1782@end example 1829@end example
1783 1830
1784Org-mode extends the number-based syntax to @emph{named} footnotes and 1831Org mode extends the number-based syntax to @emph{named} footnotes and
1785optional inline definition. Using plain numbers as markers (as 1832optional inline definition. Using plain numbers as markers (as
1786@file{footnote.el} does) is supported for backward compatibility, but not 1833@file{footnote.el} does) is supported for backward compatibility, but not
1787encouraged because of possible conflicts with @LaTeX{} snippets (@pxref{Embedded 1834encouraged because of possible conflicts with @LaTeX{} snippets (@pxref{Embedded
1788LaTeX}). Here are the valid references: 1835@LaTeX{}}). Here are the valid references:
1789 1836
1790@table @code 1837@table @code
1791@item [1] 1838@item [1]
@@ -1875,7 +1922,7 @@ you can use the usual commands to follow these links.
1875@cindex Orgstruct mode 1922@cindex Orgstruct mode
1876@cindex minor mode for structure editing 1923@cindex minor mode for structure editing
1877 1924
1878If you like the intuitive way the Org-mode structure editing and list 1925If you like the intuitive way the Org mode structure editing and list
1879formatting works, you might want to use these commands in other modes like 1926formatting works, you might want to use these commands in other modes like
1880Text mode or Mail mode as well. The minor mode @code{orgstruct-mode} makes 1927Text mode or Mail mode as well. The minor mode @code{orgstruct-mode} makes
1881this possible. Toggle the mode with @kbd{M-x orgstruct-mode}, or 1928this possible. Toggle the mode with @kbd{M-x orgstruct-mode}, or
@@ -2276,7 +2323,7 @@ formula, moving these references by arrow keys
2276* Column formulas:: Formulas valid for an entire column 2323* Column formulas:: Formulas valid for an entire column
2277* Editing and debugging formulas:: Fixing formulas 2324* Editing and debugging formulas:: Fixing formulas
2278* Updating the table:: Recomputing all dependent fields 2325* Updating the table:: Recomputing all dependent fields
2279* Advanced features:: Field names, parameters and automatic recalc 2326* Advanced features:: Field and column names, parameters and automatic recalc
2280@end menu 2327@end menu
2281 2328
2282@node References, Formula syntax for Calc, The spreadsheet, The spreadsheet 2329@node References, Formula syntax for Calc, The spreadsheet, The spreadsheet
@@ -2833,9 +2880,11 @@ dependencies.
2833@node Advanced features, , Updating the table, The spreadsheet 2880@node Advanced features, , Updating the table, The spreadsheet
2834@subsection Advanced features 2881@subsection Advanced features
2835 2882
2836If you want the recalculation of fields to happen automatically, or if 2883If you want the recalculation of fields to happen automatically, or if you
2837you want to be able to assign @i{names} to fields and columns, you need 2884want to be able to assign @i{names}@footnote{Such names must start by an
2838to reserve the first column of the table for special marking characters. 2885alphabetic character and use only alphanumeric/underscore characters.} to
2886fields and columns, you need to reserve the first column of the table for
2887special marking characters.
2839 2888
2840@table @kbd 2889@table @kbd
2841@orgcmd{C-#,org-table-rotate-recalc-marks} 2890@orgcmd{C-#,org-table-rotate-recalc-marks}
@@ -3005,7 +3054,7 @@ When plotting @code{3d} or @code{grid} types, set this to @code{t} to graph a
3005flat mapping rather than a @code{3d} slope. 3054flat mapping rather than a @code{3d} slope.
3006 3055
3007@item timefmt 3056@item timefmt
3008Specify format of Org-mode timestamps as they will be parsed by Gnuplot. 3057Specify format of Org mode timestamps as they will be parsed by Gnuplot.
3009Defaults to @samp{%Y-%m-%d-%H:%M:%S}. 3058Defaults to @samp{%Y-%m-%d-%H:%M:%S}.
3010 3059
3011@item script 3060@item script
@@ -3168,11 +3217,19 @@ file:papers/last.pdf @r{file, relative path}
3168./papers/last.pdf @r{same as above} 3217./papers/last.pdf @r{same as above}
3169file:/myself@@some.where:papers/last.pdf @r{file, path on remote machine} 3218file:/myself@@some.where:papers/last.pdf @r{file, path on remote machine}
3170/myself@@some.where:papers/last.pdf @r{same as above} 3219/myself@@some.where:papers/last.pdf @r{same as above}
3171file:sometextfile::NNN @r{file with line number to jump to} 3220file:sometextfile::NNN @r{file, jump to line number}
3172file:projects.org @r{another Org file} 3221file:projects.org @r{another Org file}
3173file:projects.org::some words @r{text search in Org file} 3222file:projects.org::some words @r{text search in Org file}@footnote{
3223The actual behavior of the search will depend on the value of
3224the variable @code{org-link-search-must-match-exact-headline}. If its value
3225is nil, then a fuzzy text search will be done. If it is t, then only the
3226exact headline will be matched. If the value is @code{'query-to-create},
3227then an exact headline will be searched; if it is not found, then the user
3228will be queried to create it.}
3174file:projects.org::*task title @r{heading search in Org file} 3229file:projects.org::*task title @r{heading search in Org file}
3175docview:papers/last.pdf::NNN @r{open file in doc-view mode at page NNN} 3230file+sys:/path/to/file @r{open via OS, like double-click}
3231file+emacs:/path/to/file @r{force opening by Emacs}
3232docview:papers/last.pdf::NNN @r{open in doc-view mode at page}
3176id:B7423F4D-2E8A-471B-8810-C40F074717E9 @r{Link to heading by ID} 3233id:B7423F4D-2E8A-471B-8810-C40F074717E9 @r{Link to heading by ID}
3177news:comp.emacs @r{Usenet link} 3234news:comp.emacs @r{Usenet link}
3178mailto:adent@@galaxy.net @r{Mail link} 3235mailto:adent@@galaxy.net @r{Mail link}
@@ -3189,7 +3246,7 @@ gnus:group @r{Gnus group link}
3189gnus:group#id @r{Gnus article link} 3246gnus:group#id @r{Gnus article link}
3190bbdb:R.*Stallman @r{BBDB link (with regexp)} 3247bbdb:R.*Stallman @r{BBDB link (with regexp)}
3191irc:/irc.com/#emacs/bob @r{IRC link} 3248irc:/irc.com/#emacs/bob @r{IRC link}
3192info:org#External%20links @r{Info node link (with encoded space)} 3249info:org#External links @r{Info node link}
3193shell:ls *.org @r{A shell command} 3250shell:ls *.org @r{A shell command}
3194elisp:org-agenda @r{Interactive Elisp command} 3251elisp:org-agenda @r{Interactive Elisp command}
3195elisp:(find-file-other-frame "Elisp.org") @r{Elisp form to evaluate} 3252elisp:(find-file-other-frame "Elisp.org") @r{Elisp form to evaluate}
@@ -3235,7 +3292,7 @@ create a link. The link will be stored for later insertion into an Org
3235buffer (see below). What kind of link will be created depends on the current 3292buffer (see below). What kind of link will be created depends on the current
3236buffer: 3293buffer:
3237 3294
3238@b{Org-mode buffers}@* 3295@b{Org mode buffers}@*
3239For Org files, if there is a @samp{<<target>>} at the cursor, the link points 3296For Org files, if there is a @samp{<<target>>} at the cursor, the link points
3240to the target. Otherwise it points to the current headline, which will also 3297to the target. Otherwise it points to the current headline, which will also
3241be the description@footnote{If the headline contains a timestamp, it will be 3298be the description@footnote{If the headline contains a timestamp, it will be
@@ -3338,6 +3395,7 @@ link and description parts of the link.
3338@cindex following links 3395@cindex following links
3339@orgcmd{C-c C-o,org-open-at-point} 3396@orgcmd{C-c C-o,org-open-at-point}
3340@vindex org-file-apps 3397@vindex org-file-apps
3398@vindex org-link-frame-setup
3341Open link at point. This will launch a web browser for URLs (using 3399Open link at point. This will launch a web browser for URLs (using
3342@command{browse-url-at-point}), run VM/MH-E/Wanderlust/Rmail/Gnus/BBDB for 3400@command{browse-url-at-point}), run VM/MH-E/Wanderlust/Rmail/Gnus/BBDB for
3343the corresponding links, and execute the command in a shell link. When the 3401the corresponding links, and execute the command in a shell link. When the
@@ -3351,7 +3409,9 @@ Classification of files is based on file extension only. See option
3351visit the file with Emacs, use a @kbd{C-u} prefix. If you want to avoid 3409visit the file with Emacs, use a @kbd{C-u} prefix. If you want to avoid
3352opening in Emacs, use a @kbd{C-u C-u} prefix.@* 3410opening in Emacs, use a @kbd{C-u C-u} prefix.@*
3353If the cursor is on a headline, but not on a link, offer all links in the 3411If the cursor is on a headline, but not on a link, offer all links in the
3354headline and entry text. 3412headline and entry text. If you want to setup the frame configuration for
3413following links, customize @code{org-link-frame-setup}.
3414
3355@orgkey @key{RET} 3415@orgkey @key{RET}
3356@vindex org-return-follows-link 3416@vindex org-return-follows-link
3357When @code{org-return-follows-link} is set, @kbd{@key{RET}} will also follow 3417When @code{org-return-follows-link} is set, @kbd{@key{RET}} will also follow
@@ -3525,7 +3585,7 @@ Link to a heading with a @code{CUSTOM_ID} property
3525@item /regexp/ 3585@item /regexp/
3526Do a regular expression search for @code{regexp}. This uses the Emacs 3586Do a regular expression search for @code{regexp}. This uses the Emacs
3527command @code{occur} to list all matches in a separate window. If the 3587command @code{occur} to list all matches in a separate window. If the
3528target file is in Org-mode, @code{org-occur} is used to create a 3588target file is in Org mode, @code{org-occur} is used to create a
3529sparse tree with the matches. 3589sparse tree with the matches.
3530@c If the target file is a directory, 3590@c If the target file is a directory,
3531@c @code{grep} will be used to search all files in the directory. 3591@c @code{grep} will be used to search all files in the directory.
@@ -3564,7 +3624,7 @@ an implementation example. See the file @file{org-bibtex.el}.
3564@chapter TODO items 3624@chapter TODO items
3565@cindex TODO items 3625@cindex TODO items
3566 3626
3567Org-mode does not maintain TODO lists as separate documents@footnote{Of 3627Org mode does not maintain TODO lists as separate documents@footnote{Of
3568course, you can make a document that contains only long lists of TODO items, 3628course, you can make a document that contains only long lists of TODO items,
3569but this is not required.}. Instead, TODO items are an integral part of the 3629but this is not required.}. Instead, TODO items are an integral part of the
3570notes file, because TODO items usually come up while taking notes! With Org 3630notes file, because TODO items usually come up while taking notes! With Org
@@ -3573,7 +3633,7 @@ information is not duplicated, and the entire context from which the TODO
3573item emerged is always present. 3633item emerged is always present.
3574 3634
3575Of course, this technique for managing TODO items scatters them 3635Of course, this technique for managing TODO items scatters them
3576throughout your notes file. Org-mode compensates for this by providing 3636throughout your notes file. Org mode compensates for this by providing
3577methods to give you an overview of all the things that you have to do. 3637methods to give you an overview of all the things that you have to do.
3578 3638
3579@menu 3639@menu
@@ -3659,7 +3719,7 @@ option @code{org-todo-state-tags-triggers} for details.
3659 3719
3660@vindex org-todo-keywords 3720@vindex org-todo-keywords
3661By default, marked TODO entries have one of only two states: TODO and 3721By default, marked TODO entries have one of only two states: TODO and
3662DONE. Org-mode allows you to classify TODO items in more complex ways 3722DONE. Org mode allows you to classify TODO items in more complex ways
3663with @emph{TODO keywords} (stored in @code{org-todo-keywords}). With 3723with @emph{TODO keywords} (stored in @code{org-todo-keywords}). With
3664special setup, the TODO keyword system can work differently in different 3724special setup, the TODO keyword system can work differently in different
3665files. 3725files.
@@ -3684,7 +3744,7 @@ TODO items in particular (@pxref{Tags}).
3684 3744
3685You can use TODO keywords to indicate different @emph{sequential} states 3745You can use TODO keywords to indicate different @emph{sequential} states
3686in the process of working on an item, for example@footnote{Changing 3746in the process of working on an item, for example@footnote{Changing
3687this variable only becomes effective after restarting Org-mode in a 3747this variable only becomes effective after restarting Org mode in a
3688buffer.}: 3748buffer.}:
3689 3749
3690@lisp 3750@lisp
@@ -3727,7 +3787,7 @@ be set up like this:
3727 3787
3728In this case, different keywords do not indicate a sequence, but rather 3788In this case, different keywords do not indicate a sequence, but rather
3729different types. So the normal work flow would be to assign a task to a 3789different types. So the normal work flow would be to assign a task to a
3730person, and later to mark it DONE. Org-mode supports this style by adapting 3790person, and later to mark it DONE. Org mode supports this style by adapting
3731the workings of the command @kbd{C-c C-t}@footnote{This is also true for the 3791the workings of the command @kbd{C-c C-t}@footnote{This is also true for the
3732@kbd{t} command in the timeline and agenda buffers.}. When used several 3792@kbd{t} command in the timeline and agenda buffers.}. When used several
3733times in succession, it will still cycle through all names, in order to first 3793times in succession, it will still cycle through all names, in order to first
@@ -3758,7 +3818,7 @@ like this:
3758 (sequence "|" "CANCELED"))) 3818 (sequence "|" "CANCELED")))
3759@end lisp 3819@end lisp
3760 3820
3761The keywords should all be different, this helps Org-mode to keep track 3821The keywords should all be different, this helps Org mode to keep track
3762of which subsequence should be used for a given entry. In this setup, 3822of which subsequence should be used for a given entry. In this setup,
3763@kbd{C-c C-t} only operates within a subsequence, so it switches from 3823@kbd{C-c C-t} only operates within a subsequence, so it switches from
3764@code{DONE} to (nothing) to @code{TODO}, and from @code{FIXED} to 3824@code{DONE} to (nothing) to @code{TODO}, and from @code{FIXED} to
@@ -3855,9 +3915,9 @@ Remember that the keywords after the vertical bar (or the last keyword
3855if no bar is there) must always mean that the item is DONE (although you 3915if no bar is there) must always mean that the item is DONE (although you
3856may use a different word). After changing one of these lines, use 3916may use a different word). After changing one of these lines, use
3857@kbd{C-c C-c} with the cursor still in the line to make the changes 3917@kbd{C-c C-c} with the cursor still in the line to make the changes
3858known to Org-mode@footnote{Org-mode parses these lines only when 3918known to Org mode@footnote{Org mode parses these lines only when
3859Org-mode is activated after visiting a file. @kbd{C-c C-c} with the 3919Org mode is activated after visiting a file. @kbd{C-c C-c} with the
3860cursor in a line starting with @samp{#+} is simply restarting Org-mode 3920cursor in a line starting with @samp{#+} is simply restarting Org mode
3861for the current buffer.}. 3921for the current buffer.}.
3862 3922
3863@node Faces for TODO keywords, TODO dependencies, Per-file keywords, TODO extensions 3923@node Faces for TODO keywords, TODO dependencies, Per-file keywords, TODO extensions
@@ -3867,7 +3927,7 @@ for the current buffer.}.
3867@vindex org-todo @r{(face)} 3927@vindex org-todo @r{(face)}
3868@vindex org-done @r{(face)} 3928@vindex org-done @r{(face)}
3869@vindex org-todo-keyword-faces 3929@vindex org-todo-keyword-faces
3870Org-mode highlights TODO keywords with special faces: @code{org-todo} 3930Org mode highlights TODO keywords with special faces: @code{org-todo}
3871for keywords indicating that an item still has to be acted upon, and 3931for keywords indicating that an item still has to be acted upon, and
3872@code{org-done} for keywords indicating that an item is finished. If 3932@code{org-done} for keywords indicating that an item is finished. If
3873you are using more than 2 different states, you might want to use 3933you are using more than 2 different states, you might want to use
@@ -3883,7 +3943,7 @@ special faces for some of them. This can be done using the variable
3883@end lisp 3943@end lisp
3884 3944
3885While using a list with face properties as shown for CANCELED @emph{should} 3945While using a list with face properties as shown for CANCELED @emph{should}
3886work, this does not always seem to be the case. If necessary, define a 3946work, this does not aways seem to be the case. If necessary, define a
3887special face and use that. A string is interpreted as a color. The variable 3947special face and use that. A string is interpreted as a color. The variable
3888@code{org-faces-easy-properties} determines if that color is interpreted as a 3948@code{org-faces-easy-properties} determines if that color is interpreted as a
3889foreground or a background color. 3949foreground or a background color.
@@ -3955,7 +4015,7 @@ module @file{org-depend.el}.
3955@cindex progress logging 4015@cindex progress logging
3956@cindex logging, of progress 4016@cindex logging, of progress
3957 4017
3958Org-mode can automatically record a timestamp and possibly a note when 4018Org mode can automatically record a timestamp and possibly a note when
3959you mark a TODO item as DONE, or even each time you change the state of 4019you mark a TODO item as DONE, or even each time you change the state of
3960a TODO item. This system is highly configurable, settings can be on a 4020a TODO item. This system is highly configurable, settings can be on a
3961per-keyword basis and can be localized to a file or even a subtree. For 4021per-keyword basis and can be localized to a file or even a subtree. For
@@ -4019,21 +4079,25 @@ behavior---the recommended drawer for this is called @code{LOGBOOK}. You can
4019also overrule the setting of this variable for a subtree by setting a 4079also overrule the setting of this variable for a subtree by setting a
4020@code{LOG_INTO_DRAWER} property. 4080@code{LOG_INTO_DRAWER} property.
4021 4081
4022Since it is normally too much to record a note for every state, Org-mode 4082Since it is normally too much to record a note for every state, Org mode
4023expects configuration on a per-keyword basis for this. This is achieved by 4083expects configuration on a per-keyword basis for this. This is achieved by
4024adding special markers @samp{!} (for a timestamp) and @samp{@@} (for a note) 4084adding special markers @samp{!} (for a timestamp) or @samp{@@} (for a note
4025in parentheses after each keyword. For example, with the setting 4085with timestamp) in parentheses after each keyword. For example, with the
4086setting
4026 4087
4027@lisp 4088@lisp
4028(setq org-todo-keywords 4089(setq org-todo-keywords
4029 '((sequence "TODO(t)" "WAIT(w@@/!)" "|" "DONE(d!)" "CANCELED(c@@)"))) 4090 '((sequence "TODO(t)" "WAIT(w@@/!)" "|" "DONE(d!)" "CANCELED(c@@)")))
4030@end lisp 4091@end lisp
4031 4092
4093To record a timestamp without a note for TODO keywords configured with
4094@samp{@@}, just type @kbd{C-c C-c} to enter a blank note when prompted.
4095
4032@noindent 4096@noindent
4033@vindex org-log-done 4097@vindex org-log-done
4034you not only define global TODO keywords and fast access keys, but also 4098you not only define global TODO keywords and fast access keys, but also
4035request that a time is recorded when the entry is set to 4099request that a time is recorded when the entry is set to
4036DONE@footnote{It is possible that Org-mode will record two timestamps 4100DONE@footnote{It is possible that Org mode will record two timestamps
4037when you are using both @code{org-log-done} and state change logging. 4101when you are using both @code{org-log-done} and state change logging.
4038However, it will never prompt for two notes---if you have configured 4102However, it will never prompt for two notes---if you have configured
4039both, the state change recording note will take precedence and cancel 4103both, the state change recording note will take precedence and cancel
@@ -4182,7 +4246,7 @@ which should only be done in certain contexts, for example.
4182@section Priorities 4246@section Priorities
4183@cindex priorities 4247@cindex priorities
4184 4248
4185If you use Org-mode extensively, you may end up with enough TODO items that 4249If you use Org mode extensively, you may end up with enough TODO items that
4186it starts to make sense to prioritize them. Prioritizing can be done by 4250it starts to make sense to prioritize them. Prioritizing can be done by
4187placing a @emph{priority cookie} into the headline of a TODO item, like this 4251placing a @emph{priority cookie} into the headline of a TODO item, like this
4188 4252
@@ -4192,11 +4256,11 @@ placing a @emph{priority cookie} into the headline of a TODO item, like this
4192 4256
4193@noindent 4257@noindent
4194@vindex org-priority-faces 4258@vindex org-priority-faces
4195By default, Org-mode supports three priorities: @samp{A}, @samp{B}, and 4259By default, Org mode supports three priorities: @samp{A}, @samp{B}, and
4196@samp{C}. @samp{A} is the highest priority. An entry without a cookie is 4260@samp{C}. @samp{A} is the highest priority. An entry without a cookie is
4197treated just like priority @samp{B}. Priorities make a difference only for 4261treated just like priority @samp{B}. Priorities make a difference only for
4198sorting in the agenda (@pxref{Weekly/daily agenda}); outside the agenda, they 4262sorting in the agenda (@pxref{Weekly/daily agenda}); outside the agenda, they
4199have no inherent meaning to Org-mode. The cookies can be highlighted with 4263have no inherent meaning to Org mode. The cookies can be highlighted with
4200special faces by customizing the variable @code{org-priority-faces}. 4264special faces by customizing the variable @code{org-priority-faces}.
4201 4265
4202Priorities can be attached to any outline node; they do not need to be TODO 4266Priorities can be attached to any outline node; they do not need to be TODO
@@ -4363,9 +4427,11 @@ off a box while there are unchecked boxes above it.
4363 4427
4364@table @kbd 4428@table @kbd
4365@orgcmd{C-c C-c,org-toggle-checkbox} 4429@orgcmd{C-c C-c,org-toggle-checkbox}
4366Toggle checkbox status or (with prefix arg) checkbox presence at point. With 4430Toggle checkbox status or (with prefix arg) checkbox presence at point.
4367double prefix argument, set it to @samp{[-]}, which is considered to be an 4431With a single prefix argument, add an empty checkbox or remove the current
4368intermediate state. 4432one@footnote{`C-u C-c C-c' on the @emph{first} item of a list with no checkbox
4433will add checkboxes to the rest of the list.}. With a double prefix argument, set it to @samp{[-]}, which is
4434considered to be an intermediate state.
4369@orgcmd{C-c C-x C-b,org-toggle-checkbox} 4435@orgcmd{C-c C-x C-b,org-toggle-checkbox}
4370Toggle checkbox status or (with prefix arg) checkbox presence at point. With 4436Toggle checkbox status or (with prefix arg) checkbox presence at point. With
4371double prefix argument, set it to @samp{[-]}, which is considered to be an 4437double prefix argument, set it to @samp{[-]}, which is considered to be an
@@ -4410,7 +4476,7 @@ hand, use this command to get things back into sync.
4410@cindex sparse tree, tag based 4476@cindex sparse tree, tag based
4411 4477
4412An excellent way to implement labels and contexts for cross-correlating 4478An excellent way to implement labels and contexts for cross-correlating
4413information is to assign @i{tags} to headlines. Org-mode has extensive 4479information is to assign @i{tags} to headlines. Org mode has extensive
4414support for tags. 4480support for tags.
4415 4481
4416@vindex org-tag-faces 4482@vindex org-tag-faces
@@ -4489,7 +4555,7 @@ also a special command for inserting tags:
4489@orgcmd{C-c C-q,org-set-tags-command} 4555@orgcmd{C-c C-q,org-set-tags-command}
4490@cindex completion, of tags 4556@cindex completion, of tags
4491@vindex org-tags-column 4557@vindex org-tags-column
4492Enter new tags for the current headline. Org-mode will either offer 4558Enter new tags for the current headline. Org mode will either offer
4493completion or a special single-key interface for setting tags, see 4559completion or a special single-key interface for setting tags, see
4494below. After pressing @key{RET}, the tags will be inserted and aligned 4560below. After pressing @key{RET}, the tags will be inserted and aligned
4495to @code{org-tags-column}. When called with a @kbd{C-u} prefix, all 4561to @code{org-tags-column}. When called with a @kbd{C-u} prefix, all
@@ -4532,7 +4598,7 @@ by adding a STARTUP option line to that file:
4532#+STARTUP: noptag 4598#+STARTUP: noptag
4533@end example 4599@end example
4534 4600
4535By default Org-mode uses the standard minibuffer completion facilities for 4601By default Org mode uses the standard minibuffer completion facilities for
4536entering tags. However, it also implements another, quicker, tag selection 4602entering tags. However, it also implements another, quicker, tag selection
4537method called @emph{fast tag selection}. This allows you to select and 4603method called @emph{fast tag selection}. This allows you to select and
4538deselect tags with just a single key press. For this to work well you should 4604deselect tags with just a single key press. For this to work well you should
@@ -4691,25 +4757,26 @@ and properties. For a complete description with many examples, see
4691@chapter Properties and columns 4757@chapter Properties and columns
4692@cindex properties 4758@cindex properties
4693 4759
4694Properties are a set of key-value pairs associated with an entry. There 4760A property is a key-value pair associated with an entry. Properties can be
4695are two main applications for properties in Org-mode. First, properties 4761set so they are associated with a single entry, with every entry in a tree,
4696are like tags, but with a value. Second, you can use properties to 4762or with every entry in an Org mode file.
4697implement (very basic) database capabilities in an Org buffer. For 4763
4698an example of the first application, imagine maintaining a file where 4764There are two main applications for properties in Org mode. First,
4765properties are like tags, but with a value. Imagine maintaining a file where
4699you document bugs and plan releases for a piece of software. Instead of 4766you document bugs and plan releases for a piece of software. Instead of
4700using tags like @code{:release_1:}, @code{:release_2:}, one can use a 4767using tags like @code{:release_1:}, @code{:release_2:}, you can use a
4701property, say @code{:Release:}, that in different subtrees has different 4768property, say @code{:Release:}, that in different subtrees has different
4702values, such as @code{1.0} or @code{2.0}. For an example of the second 4769values, such as @code{1.0} or @code{2.0}. Second, you can use properties to
4703application of properties, imagine keeping track of your music CDs, 4770implement (very basic) database capabilities in an Org buffer. Imagine
4704where properties could be things such as the album, artist, date of 4771keeping track of your music CDs, where properties could be things such as the
4705release, number of tracks, and so on. 4772album, artist, date of release, number of tracks, and so on.
4706 4773
4707Properties can be conveniently edited and viewed in column view 4774Properties can be conveniently edited and viewed in column view
4708(@pxref{Column view}). 4775(@pxref{Column view}).
4709 4776
4710@menu 4777@menu
4711* Property syntax:: How properties are spelled out 4778* Property syntax:: How properties are spelled out
4712* Special properties:: Access to other Org-mode features 4779* Special properties:: Access to other Org mode features
4713* Property searches:: Matching property values 4780* Property searches:: Matching property values
4714* Property inheritance:: Passing values down the tree 4781* Property inheritance:: Passing values down the tree
4715* Column view:: Tabular viewing and editing 4782* Column view:: Tabular viewing and editing
@@ -4721,7 +4788,8 @@ Properties can be conveniently edited and viewed in column view
4721@cindex property syntax 4788@cindex property syntax
4722@cindex drawer, for properties 4789@cindex drawer, for properties
4723 4790
4724Properties are key-value pairs. They need to be inserted into a special 4791Properties are key-value pairs. When they are associated with a single entry
4792or with a tree they need to be inserted into a special
4725drawer (@pxref{Drawers}) with the name @code{PROPERTIES}. Each property 4793drawer (@pxref{Drawers}) with the name @code{PROPERTIES}. Each property
4726is specified on a single line, with the key (surrounded by colons) 4794is specified on a single line, with the key (surrounded by colons)
4727first, and the value after it. Here is an example: 4795first, and the value after it. Here is an example:
@@ -4739,6 +4807,10 @@ first, and the value after it. Here is an example:
4739 :END: 4807 :END:
4740@end example 4808@end example
4741 4809
4810Depending on the value of @code{org-use-property-inheritance}, a property set
4811this way will either be associated with a single entry, or the sub-tree
4812defined by the entry, see @ref{Property inheritance}.
4813
4742You may define the allowed values for a particular property @samp{:Xyz:} 4814You may define the allowed values for a particular property @samp{:Xyz:}
4743by setting a property @samp{:Xyz_ALL:}. This special property is 4815by setting a property @samp{:Xyz_ALL:}. This special property is
4744@emph{inherited}, so if you set it in a level 1 entry, it will apply to 4816@emph{inherited}, so if you set it in a level 1 entry, it will apply to
@@ -4763,6 +4835,37 @@ file, use a line like
4763#+PROPERTY: NDisks_ALL 1 2 3 4 4835#+PROPERTY: NDisks_ALL 1 2 3 4
4764@end example 4836@end example
4765 4837
4838If you want to add to the value of an existing property, append a @code{+} to
4839the property name. The following results in the property @code{var} having
4840the value ``foo=1 bar=2''.
4841@cindex property, +
4842@example
4843#+PROPERTY: var foo=1
4844#+PROPERTY: var+ bar=2
4845@end example
4846
4847It is also possible to add to the values of inherited properties. The
4848following results in the @code{genres} property having the value ``Classic
4849Baroque'' under the @code{Goldberg Variations} subtree.
4850@cindex property, +
4851@example
4852* CD collection
4853** Classic
4854 :PROPERTIES:
4855 :GENRES: Classic
4856 :END:
4857*** Goldberg Variations
4858 :PROPERTIES:
4859 :Title: Goldberg Variations
4860 :Composer: J.S. Bach
4861 :Artist: Glen Gould
4862 :Publisher: Deutsche Grammophon
4863 :NDisks: 1
4864 :GENRES+: Baroque
4865 :END:
4866@end example
4867Note that a property can only have one entry per Drawer.
4868
4766@vindex org-global-properties 4869@vindex org-global-properties
4767Property values set with the global variable 4870Property values set with the global variable
4768@code{org-global-properties} can be inherited by all entries in all 4871@code{org-global-properties} can be inherited by all entries in all
@@ -4803,7 +4906,7 @@ nearest column format definition.
4803@section Special properties 4906@section Special properties
4804@cindex properties, special 4907@cindex properties, special
4805 4908
4806Special properties provide an alternative access method to Org-mode features, 4909Special properties provide an alternative access method to Org mode features,
4807like the TODO state or the priority of an entry, discussed in the previous 4910like the TODO state or the priority of an entry, discussed in the previous
4808chapters. This interface exists so that you can include these states in a 4911chapters. This interface exists so that you can include these states in a
4809column view (@pxref{Column view}), or to use them in queries. The following 4912column view (@pxref{Column view}), or to use them in queries. The following
@@ -4885,9 +4988,9 @@ a regular expression and matched against the property values.
4885@cindex inheritance, of properties 4988@cindex inheritance, of properties
4886 4989
4887@vindex org-use-property-inheritance 4990@vindex org-use-property-inheritance
4888The outline structure of Org-mode documents lends itself to an 4991The outline structure of Org mode documents lends itself to an
4889inheritance model of properties: if the parent in a tree has a certain 4992inheritance model of properties: if the parent in a tree has a certain
4890property, the children can inherit this property. Org-mode does not 4993property, the children can inherit this property. Org mode does not
4891turn this on by default, because it can slow down property searches 4994turn this on by default, because it can slow down property searches
4892significantly and is often not needed. However, if you find inheritance 4995significantly and is often not needed. However, if you find inheritance
4893useful, you can turn it on by setting the variable 4996useful, you can turn it on by setting the variable
@@ -4898,7 +5001,7 @@ inherited properties. If a property has the value @samp{nil}, this is
4898interpreted as an explicit undefine of the property, so that inheritance 5001interpreted as an explicit undefine of the property, so that inheritance
4899search will stop at this value and return @code{nil}. 5002search will stop at this value and return @code{nil}.
4900 5003
4901Org-mode has a few properties for which inheritance is hard-coded, at 5004Org mode has a few properties for which inheritance is hard-coded, at
4902least for the special applications for which they are used: 5005least for the special applications for which they are used:
4903 5006
4904@cindex property, COLUMNS 5007@cindex property, COLUMNS
@@ -4929,7 +5032,7 @@ subtree (@pxref{Tracking TODO state changes}).
4929A great way to view and edit properties in an outline tree is 5032A great way to view and edit properties in an outline tree is
4930@emph{column view}. In column view, each outline node is turned into a 5033@emph{column view}. In column view, each outline node is turned into a
4931table row. Columns in this table provide access to properties of the 5034table row. Columns in this table provide access to properties of the
4932entries. Org-mode implements columns by overlaying a tabular structure 5035entries. Org mode implements columns by overlaying a tabular structure
4933over the headline of each item. While the headlines have been turned 5036over the headline of each item. While the headlines have been turned
4934into a table row, you can still change the visibility of the outline 5037into a table row, you can still change the visibility of the outline
4935tree. For example, you get a compact table by switching to CONTENTS 5038tree. For example, you get a compact table by switching to CONTENTS
@@ -5231,9 +5334,9 @@ property API}.
5231 5334
5232To assist project planning, TODO items can be labeled with a date and/or 5335To assist project planning, TODO items can be labeled with a date and/or
5233a time. The specially formatted string carrying the date and time 5336a time. The specially formatted string carrying the date and time
5234information is called a @emph{timestamp} in Org-mode. This may be a 5337information is called a @emph{timestamp} in Org mode. This may be a
5235little confusing because timestamp is often used as indicating when 5338little confusing because timestamp is often used as indicating when
5236something was created or last changed. However, in Org-mode this term 5339something was created or last changed. However, in Org mode this term
5237is used in a much wider sense. 5340is used in a much wider sense.
5238 5341
5239@menu 5342@menu
@@ -5256,17 +5359,20 @@ is used in a much wider sense.
5256@cindex scheduling 5359@cindex scheduling
5257 5360
5258A timestamp is a specification of a date (possibly with a time or a range of 5361A timestamp is a specification of a date (possibly with a time or a range of
5259times) in a special format, either @samp{<2003-09-16 Tue>} or 5362times) in a special format, either @samp{<2003-09-16 Tue>}@footnote{In this
5260@samp{<2003-09-16 Tue 09:39>} or @samp{<2003-09-16 Tue 5363simplest form, the day name is optional when you type the date yourself.
526112:00-12:30>}@footnote{This is inspired by the standard ISO 8601 date/time 5364However, any dates inserted or modified by Org will add that day name, for
5262format. To use an alternative format, see @ref{Custom time format}.}. A 5365reading convenience.} or @samp{<2003-09-16 Tue 09:39>} or @samp{<2003-09-16
5263timestamp can appear anywhere in the headline or body of an Org tree entry. 5366Tue 12:00-12:30>}@footnote{This is inspired by the standard ISO 8601
5264Its presence causes entries to be shown on specific dates in the agenda 5367date/time format. To use an alternative format, see @ref{Custom time
5265(@pxref{Weekly/daily agenda}). We distinguish: 5368format}.}. A timestamp can appear anywhere in the headline or body of an Org
5369tree entry. Its presence causes entries to be shown on specific dates in the
5370agenda (@pxref{Weekly/daily agenda}). We distinguish:
5266 5371
5267@table @var 5372@table @var
5268@item Plain timestamp; Event; Appointment 5373@item Plain timestamp; Event; Appointment
5269@cindex timestamp 5374@cindex timestamp
5375@cindex appointment
5270A simple timestamp just assigns a date/time to an item. This is just 5376A simple timestamp just assigns a date/time to an item. This is just
5271like writing down an appointment or event in a paper agenda. In the 5377like writing down an appointment or event in a paper agenda. In the
5272timeline and agenda displays, the headline of an entry associated with a 5378timeline and agenda displays, the headline of an entry associated with a
@@ -5289,7 +5395,7 @@ following will show up in the agenda every Wednesday:
5289@end example 5395@end example
5290 5396
5291@item Diary-style sexp entries 5397@item Diary-style sexp entries
5292For more complex date specifications, Org-mode supports using the special 5398For more complex date specifications, Org mode supports using the special
5293sexp diary entries implemented in the Emacs calendar/diary 5399sexp diary entries implemented in the Emacs calendar/diary
5294package@footnote{When working with the standard diary sexp functions, you 5400package@footnote{When working with the standard diary sexp functions, you
5295need to be very careful with the order of the arguments. That order depend 5401need to be very careful with the order of the arguments. That order depend
@@ -5297,7 +5403,7 @@ evilly on the variable @code{calendar-date-style} (or, for older Emacs
5297versions, @code{european-calendar-style}). For example, to specify a date 5403versions, @code{european-calendar-style}). For example, to specify a date
5298December 12, 2005, the call might look like @code{(diary-date 12 1 2005)} or 5404December 12, 2005, the call might look like @code{(diary-date 12 1 2005)} or
5299@code{(diary-date 1 12 2005)} or @code{(diary-date 2005 12 1)}, depending on 5405@code{(diary-date 1 12 2005)} or @code{(diary-date 2005 12 1)}, depending on
5300the settings. This has been the source of much confusion. Org-mode users 5406the settings. This has been the source of much confusion. Org mode users
5301can resort to special versions of these functions like @code{org-date} or 5407can resort to special versions of these functions like @code{org-date} or
5302@code{org-anniversary}. These work just like the corresponding @code{diary-} 5408@code{org-anniversary}. These work just like the corresponding @code{diary-}
5303functions, but with stable ISO order of arguments (year, month, day) wherever 5409functions, but with stable ISO order of arguments (year, month, day) wherever
@@ -5338,7 +5444,7 @@ angular ones. These timestamps are inactive in the sense that they do
5338@cindex creating timestamps 5444@cindex creating timestamps
5339@cindex timestamps, creating 5445@cindex timestamps, creating
5340 5446
5341For Org-mode to recognize timestamps, they need to be in the specific 5447For Org mode to recognize timestamps, they need to be in the specific
5342format. All commands listed below produce timestamps in the correct 5448format. All commands listed below produce timestamps in the correct
5343format. 5449format.
5344 5450
@@ -5362,6 +5468,9 @@ Like @kbd{C-c .} and @kbd{C-c !}, but use the alternative format which
5362contains date and time. The default time can be rounded to multiples of 5 5468contains date and time. The default time can be rounded to multiples of 5
5363minutes, see the option @code{org-time-stamp-rounding-minutes}. 5469minutes, see the option @code{org-time-stamp-rounding-minutes}.
5364@c 5470@c
5471@orgkey{C-c C-c}
5472Normalize timestamp, insert/fix day name if missing or wrong.
5473@c
5365@orgcmd{C-c <,org-date-from-calendar} 5474@orgcmd{C-c <,org-date-from-calendar}
5366Insert a timestamp corresponding to the cursor date in the Calendar. 5475Insert a timestamp corresponding to the cursor date in the Calendar.
5367@c 5476@c
@@ -5397,7 +5506,7 @@ the following column).
5397 5506
5398 5507
5399@menu 5508@menu
5400* The date/time prompt:: How Org-mode helps you entering date and time 5509* The date/time prompt:: How Org mode helps you entering date and time
5401* Custom time format:: Making dates look different 5510* Custom time format:: Making dates look different
5402@end menu 5511@end menu
5403 5512
@@ -5407,17 +5516,17 @@ the following column).
5407@cindex time, reading in minibuffer 5516@cindex time, reading in minibuffer
5408 5517
5409@vindex org-read-date-prefer-future 5518@vindex org-read-date-prefer-future
5410When Org-mode prompts for a date/time, the default is shown in default 5519When Org mode prompts for a date/time, the default is shown in default
5411date/time format, and the prompt therefore seems to ask for a specific 5520date/time format, and the prompt therefore seems to ask for a specific
5412format. But it will in fact accept any string containing some date and/or 5521format. But it will in fact accept any string containing some date and/or
5413time information, and it is really smart about interpreting your input. You 5522time information, and it is really smart about interpreting your input. You
5414can, for example, use @kbd{C-y} to paste a (possibly multi-line) string 5523can, for example, use @kbd{C-y} to paste a (possibly multi-line) string
5415copied from an email message. Org-mode will find whatever information is in 5524copied from an email message. Org mode will find whatever information is in
5416there and derive anything you have not specified from the @emph{default date 5525there and derive anything you have not specified from the @emph{default date
5417and time}. The default is usually the current date and time, but when 5526and time}. The default is usually the current date and time, but when
5418modifying an existing timestamp, or when entering the second stamp of a 5527modifying an existing timestamp, or when entering the second stamp of a
5419range, it is taken from the stamp in the buffer. When filling in 5528range, it is taken from the stamp in the buffer. When filling in
5420information, Org-mode assumes that most of the time you will want to enter a 5529information, Org mode assumes that most of the time you will want to enter a
5421date in the future: if you omit the month/year and the given day/month is 5530date in the future: if you omit the month/year and the given day/month is
5422@i{before} today, it will assume that you mean a future date@footnote{See the 5531@i{before} today, it will assume that you mean a future date@footnote{See the
5423variable @code{org-read-date-prefer-future}. You may set that variable to 5532variable @code{org-read-date-prefer-future}. You may set that variable to
@@ -5426,7 +5535,7 @@ tomorrow.}. If the date has been automatically shifted into the future, the
5426time prompt will show this with @samp{(=>F).} 5535time prompt will show this with @samp{(=>F).}
5427 5536
5428For example, let's assume that today is @b{June 13, 2006}. Here is how 5537For example, let's assume that today is @b{June 13, 2006}. Here is how
5429various inputs will be interpreted, the items filled in by Org-mode are 5538various inputs will be interpreted, the items filled in by Org mode are
5430in @b{bold}. 5539in @b{bold}.
5431 5540
5432@example 5541@example
@@ -5536,7 +5645,7 @@ minibuffer@footnote{If you find this distracting, turn the display of with
5536 5645
5537@vindex org-display-custom-times 5646@vindex org-display-custom-times
5538@vindex org-time-stamp-custom-formats 5647@vindex org-time-stamp-custom-formats
5539Org-mode uses the standard ISO notation for dates and times as it is 5648Org mode uses the standard ISO notation for dates and times as it is
5540defined in ISO 8601. If you cannot get used to this and require another 5649defined in ISO 8601. If you cannot get used to this and require another
5541representation of date and time to keep you happy, you can get it by 5650representation of date and time to keep you happy, you can get it by
5542customizing the variables @code{org-display-custom-times} and 5651customizing the variables @code{org-display-custom-times} and
@@ -5548,7 +5657,7 @@ Toggle the display of custom formats for dates and times.
5548@end table 5657@end table
5549 5658
5550@noindent 5659@noindent
5551Org-mode needs the default format for scanning, so the custom date/time 5660Org mode needs the default format for scanning, so the custom date/time
5552format does not @emph{replace} the default format---instead it is put 5661format does not @emph{replace} the default format---instead it is put
5553@emph{over} the default format using text properties. This has the 5662@emph{over} the default format using text properties. This has the
5554following consequences: 5663following consequences:
@@ -5625,23 +5734,23 @@ the task will automatically be forwarded until completed.
5625@end example 5734@end example
5626 5735
5627@noindent 5736@noindent
5628@b{Important:} Scheduling an item in Org-mode should @i{not} be 5737@b{Important:} Scheduling an item in Org mode should @i{not} be
5629understood in the same way that we understand @i{scheduling a meeting}. 5738understood in the same way that we understand @i{scheduling a meeting}.
5630Setting a date for a meeting is just a simple appointment, you should 5739Setting a date for a meeting is just a simple appointment, you should
5631mark this entry with a simple plain timestamp, to get this item shown 5740mark this entry with a simple plain timestamp, to get this item shown
5632on the date where it applies. This is a frequent misunderstanding by 5741on the date where it applies. This is a frequent misunderstanding by
5633Org users. In Org-mode, @i{scheduling} means setting a date when you 5742Org users. In Org mode, @i{scheduling} means setting a date when you
5634want to start working on an action item. 5743want to start working on an action item.
5635@end table 5744@end table
5636 5745
5637You may use timestamps with repeaters in scheduling and deadline 5746You may use timestamps with repeaters in scheduling and deadline
5638entries. Org-mode will issue early and late warnings based on the 5747entries. Org mode will issue early and late warnings based on the
5639assumption that the timestamp represents the @i{nearest instance} of 5748assumption that the timestamp represents the @i{nearest instance} of
5640the repeater. However, the use of diary sexp entries like 5749the repeater. However, the use of diary sexp entries like
5641@c 5750@c
5642@code{<%%(org-float t 42)>} 5751@code{<%%(org-float t 42)>}
5643@c 5752@c
5644in scheduling and deadline timestamps is limited. Org-mode does not 5753in scheduling and deadline timestamps is limited. Org mode does not
5645know enough about the internals of each sexp function to issue early and 5754know enough about the internals of each sexp function to issue early and
5646late warnings. However, it will show the item on each day where the 5755late warnings. However, it will show the item on each day where the
5647sexp entry matches. 5756sexp entry matches.
@@ -5714,7 +5823,7 @@ to the previous week before any current timestamp.
5714@cindex tasks, repeated 5823@cindex tasks, repeated
5715@cindex repeated tasks 5824@cindex repeated tasks
5716 5825
5717Some tasks need to be repeated again and again. Org-mode helps to 5826Some tasks need to be repeated again and again. Org mode helps to
5718organize such tasks using a so-called repeater in a DEADLINE, SCHEDULED, 5827organize such tasks using a so-called repeater in a DEADLINE, SCHEDULED,
5719or plain timestamp. In the following example 5828or plain timestamp. In the following example
5720@example 5829@example
@@ -5734,7 +5843,7 @@ over-due, so it is important to be able to mark such an entry as completed
5734once you have done so. When you mark a DEADLINE or a SCHEDULE with the TODO 5843once you have done so. When you mark a DEADLINE or a SCHEDULE with the TODO
5735keyword DONE, it will no longer produce entries in the agenda. The problem 5844keyword DONE, it will no longer produce entries in the agenda. The problem
5736with this is, however, that then also the @emph{next} instance of the 5845with this is, however, that then also the @emph{next} instance of the
5737repeated entry will not be active. Org-mode deals with this in the following 5846repeated entry will not be active. Org mode deals with this in the following
5738way: When you try to mark such an entry DONE (using @kbd{C-c C-t}), it will 5847way: When you try to mark such an entry DONE (using @kbd{C-c C-t}), it will
5739shift the base date of the repeating timestamp by the repeater interval, and 5848shift the base date of the repeating timestamp by the repeater interval, and
5740immediately set the entry state back to TODO@footnote{In fact, the target 5849immediately set the entry state back to TODO@footnote{In fact, the target
@@ -5767,7 +5876,7 @@ task, this may not be the best way to handle it. For example, if you
5767forgot to call your father for 3 weeks, it does not make sense to call 5876forgot to call your father for 3 weeks, it does not make sense to call
5768him 3 times in a single day to make up for it. Finally, there are tasks 5877him 3 times in a single day to make up for it. Finally, there are tasks
5769like changing batteries which should always repeat a certain time 5878like changing batteries which should always repeat a certain time
5770@i{after} the last time you did it. For these tasks, Org-mode has 5879@i{after} the last time you did it. For these tasks, Org mode has
5771special repeaters @samp{++} and @samp{.+}. For example: 5880special repeaters @samp{++} and @samp{.+}. For example:
5772 5881
5773@example 5882@example
@@ -5796,7 +5905,7 @@ created for this purpose, it is described in @ref{Structure editing}.
5796@cindex clocking time 5905@cindex clocking time
5797@cindex time clocking 5906@cindex time clocking
5798 5907
5799Org-mode allows you to clock the time you spend on specific tasks in a 5908Org mode allows you to clock the time you spend on specific tasks in a
5800project. When you start working on an item, you can start the clock. 5909project. When you start working on an item, you can start the clock.
5801When you stop working on that task, or when you mark the task done, the 5910When you stop working on that task, or when you mark the task done, the
5802clock is stopped and the corresponding time interval is recorded. It 5911clock is stopped and the corresponding time interval is recorded. It
@@ -5915,10 +6024,11 @@ formatted as one or several Org tables.
5915@table @kbd 6024@table @kbd
5916@orgcmd{C-c C-x C-r,org-clock-report} 6025@orgcmd{C-c C-x C-r,org-clock-report}
5917Insert a dynamic block (@pxref{Dynamic blocks}) containing a clock 6026Insert a dynamic block (@pxref{Dynamic blocks}) containing a clock
5918report as an Org-mode table into the current file. When the cursor is 6027report as an Org mode table into the current file. When the cursor is
5919at an existing clock table, just update it. When called with a prefix 6028at an existing clock table, just update it. When called with a prefix
5920argument, jump to the first clock report in the current document and 6029argument, jump to the first clock report in the current document and
5921update it. 6030update it. The clock table always includes also trees with
6031@code{:ARCHIVE:} tag.
5922@orgcmdkkc{C-c C-c,C-c C-x C-u,org-dblock-update} 6032@orgcmdkkc{C-c C-c,C-c C-x C-u,org-dblock-update}
5923Update dynamic block at point. The cursor needs to be in the 6033Update dynamic block at point. The cursor needs to be in the
5924@code{#+BEGIN} line of the dynamic block. 6034@code{#+BEGIN} line of the dynamic block.
@@ -6215,8 +6325,8 @@ not started at exactly the right moment.
6215@kindex C-c C-x ; 6325@kindex C-c C-x ;
6216@kindex ; 6326@kindex ;
6217 6327
6218Calling @code{org-timer-set-timer} from an Org-mode buffer runs a countdown 6328Calling @code{org-timer-set-timer} from an Org mode buffer runs a countdown
6219timer. Use @kbd{;} from agenda buffers, @key{C-c C-x ;} everywhere else. 6329timer. Use @kbd{;} from agenda buffers, @key{C-c C-x ;} everwhere else.
6220 6330
6221@code{org-timer-set-timer} prompts the user for a duration and displays a 6331@code{org-timer-set-timer} prompts the user for a duration and displays a
6222countdown timer in the modeline. @code{org-timer-default-timer} sets the 6332countdown timer in the modeline. @code{org-timer-default-timer} sets the
@@ -6249,7 +6359,7 @@ trees to an archive file keeps the system compact and fast.
6249 6359
6250Org's method for capturing new items is heavily inspired by John Wiegley 6360Org's method for capturing new items is heavily inspired by John Wiegley
6251excellent remember package. Up to version 6.36 Org used a special setup 6361excellent remember package. Up to version 6.36 Org used a special setup
6252for @file{remember.el}. @file{org-remember.el} is still part of Org-mode for 6362for @file{remember.el}. @file{org-remember.el} is still part of Org mode for
6253backward compatibility with existing setups. You can find the documentation 6363backward compatibility with existing setups. You can find the documentation
6254for org-remember at @url{http://orgmode.org/org-remember.pdf}. 6364for org-remember at @url{http://orgmode.org/org-remember.pdf}.
6255 6365
@@ -6393,7 +6503,7 @@ like this:
6393@node Template elements, Template expansion, Capture templates, Capture templates 6503@node Template elements, Template expansion, Capture templates, Capture templates
6394@subsubsection Template elements 6504@subsubsection Template elements
6395 6505
6396Now let's look at the elements of a template definition. Each entry in 6506Now lets look at the elements of a template definition. Each entry in
6397@code{org-capture-templates} is a list with the following items: 6507@code{org-capture-templates} is a list with the following items:
6398 6508
6399@table @var 6509@table @var
@@ -6418,8 +6528,8 @@ selection.
6418The type of entry, a symbol. Valid values are: 6528The type of entry, a symbol. Valid values are:
6419@table @code 6529@table @code
6420@item entry 6530@item entry
6421An Org-mode node, with a headline. Will be filed as the child of the target 6531An Org mode node, with a headline. Will be filed as the child of the target
6422entry or as a top-level entry. The target file should be an Org-mode file. 6532entry or as a top-level entry. The target file should be an Org mode file.
6423@item item 6533@item item
6424A plain list item, placed in the first plain list at the target 6534A plain list item, placed in the first plain list at the target
6425location. Again the target file should be an Org file. 6535location. Again the target file should be an Org file.
@@ -6436,7 +6546,7 @@ Text to be inserted as it is.
6436 6546
6437@item target 6547@item target
6438@vindex org-default-notes-file 6548@vindex org-default-notes-file
6439Specification of where the captured item should be placed. In Org-mode 6549Specification of where the captured item should be placed. In Org mode
6440files, targets usually define a node. Entries will become children of this 6550files, targets usually define a node. Entries will become children of this
6441node. Other types will be added to the table or list in the body of this 6551node. Other types will be added to the table or list in the body of this
6442node. Most target specifications contain a file name. If that file name is 6552node. Most target specifications contain a file name. If that file name is
@@ -6536,7 +6646,7 @@ buffer again after capture is completed.
6536 6646
6537In the template itself, special @kbd{%}-escapes@footnote{If you need one of 6647In the template itself, special @kbd{%}-escapes@footnote{If you need one of
6538these sequences literally, escape the @kbd{%} with a backslash.} allow 6648these sequences literally, escape the @kbd{%} with a backslash.} allow
6539dynamic insertion of content. The templates are expanded in the order given here: 6649dynamic insertion of content. The templates are expanded in the order given here:
6540 6650
6541@smallexample 6651@smallexample
6542%[@var{file}] @r{insert the contents of the file given by @var{file}.} 6652%[@var{file}] @r{insert the contents of the file given by @var{file}.}
@@ -7032,6 +7142,7 @@ the front. With a prefix argument, file is added/moved to the end.
7032@orgcmd{C-c ],org-remove-file} 7142@orgcmd{C-c ],org-remove-file}
7033Remove current file from the list of agenda files. 7143Remove current file from the list of agenda files.
7034@kindex C-, 7144@kindex C-,
7145@cindex cycling, of agenda files
7035@orgcmd{C-',org-cycle-agenda-files} 7146@orgcmd{C-',org-cycle-agenda-files}
7036@itemx C-, 7147@itemx C-,
7037Cycle through agenda file list, visiting one file after the other. 7148Cycle through agenda file list, visiting one file after the other.
@@ -7187,7 +7298,7 @@ anniversaries, lunar phases, sunrise/set, recurrent appointments
7187Org. It can be very useful to combine output from Org with 7298Org. It can be very useful to combine output from Org with
7188the diary. 7299the diary.
7189 7300
7190In order to include entries from the Emacs diary into Org-mode's 7301In order to include entries from the Emacs diary into Org mode's
7191agenda, you only need to customize the variable 7302agenda, you only need to customize the variable
7192 7303
7193@lisp 7304@lisp
@@ -7196,7 +7307,7 @@ agenda, you only need to customize the variable
7196 7307
7197@noindent After that, everything will happen automatically. All diary 7308@noindent After that, everything will happen automatically. All diary
7198entries including holidays, anniversaries, etc., will be included in the 7309entries including holidays, anniversaries, etc., will be included in the
7199agenda buffer created by Org-mode. @key{SPC}, @key{TAB}, and 7310agenda buffer created by Org mode. @key{SPC}, @key{TAB}, and
7200@key{RET} can be used from the agenda buffer to jump to the diary 7311@key{RET} can be used from the agenda buffer to jump to the diary
7201file in order to edit existing diary entries. The @kbd{i} command to 7312file in order to edit existing diary entries. The @kbd{i} command to
7202insert new entries for the current date works in the agenda buffer, as 7313insert new entries for the current date works in the agenda buffer, as
@@ -7207,7 +7318,7 @@ between calendar and agenda.
7207 7318
7208If you are using the diary only for sexp entries and holidays, it is 7319If you are using the diary only for sexp entries and holidays, it is
7209faster to not use the above setting, but instead to copy or even move 7320faster to not use the above setting, but instead to copy or even move
7210the entries into an Org file. Org-mode evaluates diary-style sexp 7321the entries into an Org file. Org mode evaluates diary-style sexp
7211entries, and does it faster because there is no overhead for first 7322entries, and does it faster because there is no overhead for first
7212creating the diary display. Note that the sexp entries must start at 7323creating the diary display. Note that the sexp entries must start at
7213the left margin, no whitespace is allowed before them. For example, 7324the left margin, no whitespace is allowed before them. For example,
@@ -7253,7 +7364,7 @@ followed by a space and the class of the anniversary (@samp{birthday} or
72531973-06-22 73641973-06-22
725406-22 736506-22
72551955-08-02 wedding 73661955-08-02 wedding
72562008-04-14 %s released version 6.01 of org-mode, %d years ago 73672008-04-14 %s released version 6.01 of org mode, %d years ago
7257@end example 7368@end example
7258 7369
7259After a change to BBDB, or for the first agenda display during an Emacs 7370After a change to BBDB, or for the first agenda display during an Emacs
@@ -7265,6 +7376,8 @@ in an Org or Diary file.
7265@subsubheading Appointment reminders 7376@subsubheading Appointment reminders
7266@cindex @file{appt.el} 7377@cindex @file{appt.el}
7267@cindex appointment reminders 7378@cindex appointment reminders
7379@cindex appointment
7380@cindex reminders
7268 7381
7269Org can interact with Emacs appointments notification facility. To add all 7382Org can interact with Emacs appointments notification facility. To add all
7270the appointments of your agenda files, use the command 7383the appointments of your agenda files, use the command
@@ -7466,7 +7579,7 @@ other properties will slow down the search. However, once you have paid the
7466price by accessing one property, testing additional properties is cheap 7579price by accessing one property, testing additional properties is cheap
7467again. 7580again.
7468 7581
7469You can configure Org-mode to use property inheritance during a search, but 7582You can configure Org mode to use property inheritance during a search, but
7470beware that this can slow down searches considerably. See @ref{Property 7583beware that this can slow down searches considerably. See @ref{Property
7471inheritance}, for details. 7584inheritance}, for details.
7472 7585
@@ -7499,7 +7612,7 @@ Select @samp{:work:}-tagged TODO lines that are either @samp{WAITING} or
7499@cindex timeline, single file 7612@cindex timeline, single file
7500@cindex time-sorted view 7613@cindex time-sorted view
7501 7614
7502The timeline summarizes all time-stamped items from a single Org-mode 7615The timeline summarizes all time-stamped items from a single Org mode
7503file in a @emph{time-sorted view}. The main purpose of this command is 7616file in a @emph{time-sorted view}. The main purpose of this command is
7504to give an overview over events in a project. 7617to give an overview over events in a project.
7505 7618
@@ -7520,7 +7633,7 @@ The commands available in the timeline buffer are listed in
7520@cindex text search 7633@cindex text search
7521@cindex searching, for text 7634@cindex searching, for text
7522 7635
7523This agenda view is a general text search facility for Org-mode entries. 7636This agenda view is a general text search facility for Org mode entries.
7524It is particularly useful to find notes. 7637It is particularly useful to find notes.
7525 7638
7526@table @kbd 7639@table @kbd
@@ -7552,7 +7665,7 @@ If you are following a system like David Allen's GTD to organize your
7552work, one of the ``duties'' you have is a regular review to make sure 7665work, one of the ``duties'' you have is a regular review to make sure
7553that all projects move along. A @emph{stuck} project is a project that 7666that all projects move along. A @emph{stuck} project is a project that
7554has no defined next actions, so it will never show up in the TODO lists 7667has no defined next actions, so it will never show up in the TODO lists
7555Org-mode produces. During the review, you need to identify such 7668Org mode produces. During the review, you need to identify such
7556projects and define next actions for them. 7669projects and define next actions for them.
7557 7670
7558@table @kbd 7671@table @kbd
@@ -7570,7 +7683,7 @@ work for you. The built-in default assumes that all your projects are
7570level-2 headlines, and that a project is not stuck if it has at least 7683level-2 headlines, and that a project is not stuck if it has at least
7571one entry marked with a TODO keyword TODO or NEXT or NEXTACTION. 7684one entry marked with a TODO keyword TODO or NEXT or NEXTACTION.
7572 7685
7573Let's assume that you, in your own way of using Org-mode, identify 7686Let's assume that you, in your own way of using Org mode, identify
7574projects with a tag PROJECT, and that you use a TODO keyword MAYBE to 7687projects with a tag PROJECT, and that you use a TODO keyword MAYBE to
7575indicate a project that should not be considered yet. Let's further 7688indicate a project that should not be considered yet. Let's further
7576assume that the TODO keyword DONE marks finished projects, and that NEXT 7689assume that the TODO keyword DONE marks finished projects, and that NEXT
@@ -7598,7 +7711,7 @@ will still be searched for stuck projects.
7598 7711
7599@vindex org-agenda-prefix-format 7712@vindex org-agenda-prefix-format
7600@vindex org-agenda-tags-column 7713@vindex org-agenda-tags-column
7601Before displaying items in an agenda view, Org-mode visually prepares the 7714Before displaying items in an agenda view, Org mode visually prepares the
7602items and sorts them. Each item occupies a single line. The line starts 7715items and sorts them. Each item occupies a single line. The line starts
7603with a @emph{prefix} that contains the @emph{category} (@pxref{Categories}) 7716with a @emph{prefix} that contains the @emph{category} (@pxref{Categories})
7604of the item and other important information. You can customize in which 7717of the item and other important information. You can customize in which
@@ -7651,7 +7764,7 @@ You can set up icons for category by customizing the
7651@subsection Time-of-day specifications 7764@subsection Time-of-day specifications
7652@cindex time-of-day specification 7765@cindex time-of-day specification
7653 7766
7654Org-mode checks each agenda item for a time-of-day specification. The 7767Org mode checks each agenda item for a time-of-day specification. The
7655time can be part of the timestamp that triggered inclusion into the 7768time can be part of the timestamp that triggered inclusion into the
7656agenda, for example as in @w{@samp{<2005-05-10 Tue 19:00>}}. Time 7769agenda, for example as in @w{@samp{<2005-05-10 Tue 19:00>}}. Time
7657ranges can be specified with two timestamps, like 7770ranges can be specified with two timestamps, like
@@ -7663,7 +7776,7 @@ plain text (like @samp{12:45} or a @samp{8:30-1pm}). If the agenda
7663integrates the Emacs diary (@pxref{Weekly/daily agenda}), time 7776integrates the Emacs diary (@pxref{Weekly/daily agenda}), time
7664specifications in diary entries are recognized as well. 7777specifications in diary entries are recognized as well.
7665 7778
7666For agenda display, Org-mode extracts the time and displays it in a 7779For agenda display, Org mode extracts the time and displays it in a
7667standard 24 hour format as part of the prefix. The example times in 7780standard 24 hour format as part of the prefix. The example times in
7668the previous paragraphs would end up in the agenda like this: 7781the previous paragraphs would end up in the agenda like this:
7669 7782
@@ -7861,6 +7974,7 @@ press @kbd{v a} again.
7861@c 7974@c
7862@orgcmdkskc{v R,R,org-agenda-clockreport-mode} 7975@orgcmdkskc{v R,R,org-agenda-clockreport-mode}
7863@vindex org-agenda-start-with-clockreport-mode 7976@vindex org-agenda-start-with-clockreport-mode
7977@vindex org-clock-report-include-clocking-task
7864Toggle Clockreport mode. In Clockreport mode, the daily/weekly agenda will 7978Toggle Clockreport mode. In Clockreport mode, the daily/weekly agenda will
7865always show a table with the clocked times for the timespan and file scope 7979always show a table with the clocked times for the timespan and file scope
7866covered by the current agenda view. The initial setting for this mode in new 7980covered by the current agenda view. The initial setting for this mode in new
@@ -7868,7 +7982,8 @@ agenda buffers can be set with the variable
7868@code{org-agenda-start-with-clockreport-mode}. By using a prefix argument 7982@code{org-agenda-start-with-clockreport-mode}. By using a prefix argument
7869when toggling this mode (i.e.@: @kbd{C-u R}), the clock table will not show 7983when toggling this mode (i.e.@: @kbd{C-u R}), the clock table will not show
7870contributions from entries that are hidden by agenda filtering@footnote{Only 7984contributions from entries that are hidden by agenda filtering@footnote{Only
7871tags filtering will be respected here, effort filtering is ignored.}. 7985tags filtering will be respected here, effort filtering is ignored.}. See
7986also the variable @code{org-clock-report-include-clocking-task}.
7872@c 7987@c
7873@orgkey{v c} 7988@orgkey{v c}
7874@vindex org-agenda-clock-consistency-checks 7989@vindex org-agenda-clock-consistency-checks
@@ -7921,18 +8036,27 @@ Remove the restriction lock on the agenda, if it is currently restricted to a
7921file or subtree (@pxref{Agenda files}). 8036file or subtree (@pxref{Agenda files}).
7922 8037
7923@tsubheading{Secondary filtering and query editing} 8038@tsubheading{Secondary filtering and query editing}
7924@cindex filtering, by tag and effort, in agenda 8039@cindex filtering, by tag category and effort, in agenda
7925@cindex tag filtering, in agenda 8040@cindex tag filtering, in agenda
8041@cindex category filtering, in agenda
7926@cindex effort filtering, in agenda 8042@cindex effort filtering, in agenda
7927@cindex query editing, in agenda 8043@cindex query editing, in agenda
7928 8044
8045@orgcmd{<,org-agenda-filter-by-category}
8046@vindex org-agenda-category-filter-preset
8047
8048Filter the current agenda view with respect to the category of the item at
8049point. Pressing @code{<} another time will remove this filter. You can add
8050a filter preset through the option @code{org-agenda-category-filter-preset}
8051(see below.)
8052
7929@orgcmd{/,org-agenda-filter-by-tag} 8053@orgcmd{/,org-agenda-filter-by-tag}
7930@vindex org-agenda-filter-preset 8054@vindex org-agenda-tag-filter-preset
7931Filter the current agenda view with respect to a tag and/or effort estimates. 8055Filter the current agenda view with respect to a tag and/or effort estimates.
7932The difference between this and a custom agenda command is that filtering is 8056The difference between this and a custom agenda command is that filtering is
7933very fast, so that you can switch quickly between different filters without 8057very fast, so that you can switch quickly between different filters without
7934having to recreate the agenda.@footnote{Custom commands can preset a filter by 8058having to recreate the agenda.@footnote{Custom commands can preset a filter by
7935binding the variable @code{org-agenda-filter-preset} as an option. This 8059binding the variable @code{org-agenda-tag-filter-preset} as an option. This
7936filter will then be applied to the view and persist as a basic filter through 8060filter will then be applied to the view and persist as a basic filter through
7937refreshes and more secondary filtering. The filter is a global property of 8061refreshes and more secondary filtering. The filter is a global property of
7938the entire agenda view---in a block agenda, you should only set this in the 8062the entire agenda view---in a block agenda, you should only set this in the
@@ -8076,7 +8200,7 @@ agenda, change a tag for all headings in the region.
8076@kindex , 8200@kindex ,
8077@item , 8201@item ,
8078Set the priority for the current item (@command{org-agenda-priority}). 8202Set the priority for the current item (@command{org-agenda-priority}).
8079Org-mode prompts for the priority character. If you reply with @key{SPC}, 8203Org mode prompts for the priority character. If you reply with @key{SPC},
8080the priority cookie is removed from the entry. 8204the priority cookie is removed from the entry.
8081@c 8205@c
8082@orgcmd{P,org-agenda-show-priority} 8206@orgcmd{P,org-agenda-show-priority}
@@ -8122,13 +8246,15 @@ command.
8122@c 8246@c
8123@orgcmd{S-@key{right},org-agenda-do-date-later} 8247@orgcmd{S-@key{right},org-agenda-do-date-later}
8124Change the timestamp associated with the current line by one day into the 8248Change the timestamp associated with the current line by one day into the
8125future. With a numeric prefix argument, change it by that many days. For 8249future. If the date is in the past, the first call to this command will move
8126example, @kbd{3 6 5 S-@key{right}} will change it by a year. With a 8250it to today.@*
8127@kbd{C-u} prefix, change the time by one hour. If you immediately repeat the 8251With a numeric prefix argument, change it by that many days. For example,
8128command, it will continue to change hours even without the prefix arg. With 8252@kbd{3 6 5 S-@key{right}} will change it by a year. With a @kbd{C-u} prefix,
8129a double @kbd{C-u C-u} prefix, do the same for changing minutes. The stamp 8253change the time by one hour. If you immediately repeat the command, it will
8130is changed in the original Org file, but the change is not directly reflected 8254continue to change hours even without the prefix arg. With a double @kbd{C-u
8131in the agenda buffer. Use @kbd{r} or @kbd{g} to update the buffer. 8255C-u} prefix, do the same for changing minutes.@*
8256The stamp is changed in the original Org file, but the change is not directly
8257reflected in the agenda buffer. Use @kbd{r} or @kbd{g} to update the buffer.
8132@c 8258@c
8133@orgcmd{S-@key{left},org-agenda-do-date-earlier} 8259@orgcmd{S-@key{left},org-agenda-do-date-earlier}
8134Change the timestamp associated with the current line by one day 8260Change the timestamp associated with the current line by one day
@@ -8213,7 +8339,7 @@ f @r{Apply a function to marked entries.}
8213Open the Emacs calendar and move to the date at the agenda cursor. 8339Open the Emacs calendar and move to the date at the agenda cursor.
8214@c 8340@c
8215@orgcmd{c,org-calendar-goto-agenda} 8341@orgcmd{c,org-calendar-goto-agenda}
8216When in the calendar, compute and show the Org-mode agenda for the 8342When in the calendar, compute and show the Org mode agenda for the
8217date at the cursor. 8343date at the cursor.
8218@c 8344@c
8219@cindex diary entries, creating from agenda 8345@cindex diary entries, creating from agenda
@@ -8226,8 +8352,8 @@ file@footnote{This file is parsed for the agenda when
8226command in the calendar. The diary file will pop up in another window, where 8352command in the calendar. The diary file will pop up in another window, where
8227you can add the entry. 8353you can add the entry.
8228 8354
8229If you configure @code{org-agenda-diary-file} to point to an Org-mode file, 8355If you configure @code{org-agenda-diary-file} to point to an Org mode file,
8230Org will create entries (in org-mode syntax) in that file instead. Most 8356Org will create entries (in Org mode syntax) in that file instead. Most
8231entries will be stored in a date-based outline tree that will later make it 8357entries will be stored in a date-based outline tree that will later make it
8232easy to archive appointments from previous months/years. The tree will be 8358easy to archive appointments from previous months/years. The tree will be
8233built under an entry with a @code{DATE_TREE} property, or else with years as 8359built under an entry with a @code{DATE_TREE} property, or else with years as
@@ -8262,7 +8388,7 @@ This is a globally available command, and also available in the agenda menu.
8262@vindex org-agenda-exporter-settings 8388@vindex org-agenda-exporter-settings
8263Write the agenda view to a file. Depending on the extension of the selected 8389Write the agenda view to a file. Depending on the extension of the selected
8264file name, the view will be exported as HTML (extension @file{.html} or 8390file name, the view will be exported as HTML (extension @file{.html} or
8265@file{.htm}), PostScript (extension @file{.ps}), PDF (extension @file{.pdf}), 8391@file{.htm}), Postscript (extension @file{.ps}), PDF (extension @file{.pdf}),
8266and plain text (any other extension). When called with a @kbd{C-u} prefix 8392and plain text (any other extension). When called with a @kbd{C-u} prefix
8267argument, immediately open the newly created file. Use the variable 8393argument, immediately open the newly created file. Use the variable
8268@code{org-agenda-exporter-settings} to set options for @file{ps-print} and 8394@code{org-agenda-exporter-settings} to set options for @file{ps-print} and
@@ -8403,7 +8529,7 @@ command @kbd{C-c a o} provides a similar view for office tasks.
8403@cindex options, for custom agenda views 8529@cindex options, for custom agenda views
8404 8530
8405@vindex org-agenda-custom-commands 8531@vindex org-agenda-custom-commands
8406Org-mode contains a number of variables regulating agenda construction 8532Org mode contains a number of variables regulating agenda construction
8407and display. The global variables define the behavior for all agenda 8533and display. The global variables define the behavior for all agenda
8408commands, including the custom commands. However, if you want to change 8534commands, including the custom commands. However, if you want to change
8409some settings just for a single custom view, you can do so. Setting 8535some settings just for a single custom view, you can do so. Setting
@@ -8475,11 +8601,11 @@ yourself.
8475@cindex agenda views, exporting 8601@cindex agenda views, exporting
8476 8602
8477If you are away from your computer, it can be very useful to have a printed 8603If you are away from your computer, it can be very useful to have a printed
8478version of some agenda views to carry around. Org-mode can export custom 8604version of some agenda views to carry around. Org mode can export custom
8479agenda views as plain text, HTML@footnote{You need to install Hrvoje Niksic's 8605agenda views as plain text, HTML@footnote{You need to install Hrvoje Niksic's
8480@file{htmlize.el}.}, PostScript, PDF@footnote{To create PDF output, the 8606@file{htmlize.el}.}, Postscript, PDF@footnote{To create PDF output, the
8481ghostscript @file{ps2pdf} utility must be installed on the system. Selecting 8607ghostscript @file{ps2pdf} utility must be installed on the system. Selecting
8482a PDF file will also create the PostScript file.}, and iCalendar files. If 8608a PDF file will also create the postscript file.}, and iCalendar files. If
8483you want to do this only occasionally, use the command 8609you want to do this only occasionally, use the command
8484 8610
8485@table @kbd 8611@table @kbd
@@ -8489,7 +8615,7 @@ you want to do this only occasionally, use the command
8489@vindex org-agenda-exporter-settings 8615@vindex org-agenda-exporter-settings
8490Write the agenda view to a file. Depending on the extension of the selected 8616Write the agenda view to a file. Depending on the extension of the selected
8491file name, the view will be exported as HTML (extension @file{.html} or 8617file name, the view will be exported as HTML (extension @file{.html} or
8492@file{.htm}), PostScript (extension @file{.ps}), iCalendar (extension 8618@file{.htm}), Postscript (extension @file{.ps}), iCalendar (extension
8493@file{.ics}), or plain text (any other extension). Use the variable 8619@file{.ics}), or plain text (any other extension). Use the variable
8494@code{org-agenda-exporter-settings} to set options for @file{ps-print} and 8620@code{org-agenda-exporter-settings} to set options for @file{ps-print} and
8495for @file{htmlize} to be used during export, for example 8621for @file{htmlize} to be used during export, for example
@@ -8539,10 +8665,10 @@ or absolute.
8539@end lisp 8665@end lisp
8540 8666
8541The extension of the file name determines the type of export. If it is 8667The extension of the file name determines the type of export. If it is
8542@file{.html}, Org-mode will use the @file{htmlize.el} package to convert 8668@file{.html}, Org mode will use the @file{htmlize.el} package to convert
8543the buffer to HTML and save it to this file name. If the extension is 8669the buffer to HTML and save it to this file name. If the extension is
8544@file{.ps}, @code{ps-print-buffer-with-faces} is used to produce 8670@file{.ps}, @code{ps-print-buffer-with-faces} is used to produce
8545PostScript output. If the extension is @file{.ics}, iCalendar export is 8671Postscript output. If the extension is @file{.ics}, iCalendar export is
8546run export over all files that were used to construct the agenda, and 8672run export over all files that were used to construct the agenda, and
8547limit the export to entries listed in the agenda. Any other 8673limit the export to entries listed in the agenda. Any other
8548extension produces a plain ASCII file. 8674extension produces a plain ASCII file.
@@ -8573,7 +8699,7 @@ set options for the export commands. For example:
8573@end lisp 8699@end lisp
8574 8700
8575@noindent 8701@noindent
8576This command sets two options for the PostScript exporter, to make it 8702This command sets two options for the Postscript exporter, to make it
8577print in two columns in landscape format---the resulting page can be cut 8703print in two columns in landscape format---the resulting page can be cut
8578in two and then used in a paper agenda. The remaining settings modify 8704in two and then used in a paper agenda. The remaining settings modify
8579the agenda prefix to omit category and scheduling information, and 8705the agenda prefix to omit category and scheduling information, and
@@ -8586,14 +8712,14 @@ in @code{org-agenda-custom-commands} take precedence.
8586@noindent 8712@noindent
8587From the command line you may also use 8713From the command line you may also use
8588@example 8714@example
8589emacs -f org-batch-store-agenda-views -kill 8715emacs -eval (org-batch-store-agenda-views) -kill
8590@end example 8716@end example
8591@noindent 8717@noindent
8592or, if you need to modify some parameters@footnote{Quoting depends on the 8718or, if you need to modify some parameters@footnote{Quoting depends on the
8593system you use, please check the FAQ for examples.} 8719system you use, please check the FAQ for examples.}
8594@example 8720@example
8595emacs -eval '(org-batch-store-agenda-views \ 8721emacs -eval '(org-batch-store-agenda-views \
8596 org-agenda-span month \ 8722 org-agenda-span (quote month) \
8597 org-agenda-start-day "2007-11-01" \ 8723 org-agenda-start-day "2007-11-01" \
8598 org-agenda-include-diary nil \ 8724 org-agenda-include-diary nil \
8599 org-agenda-files (quote ("~/org/project.org")))' \ 8725 org-agenda-files (quote ("~/org/project.org")))' \
@@ -8668,11 +8794,11 @@ the agenda).
8668@node Markup, Exporting, Agenda Views, Top 8794@node Markup, Exporting, Agenda Views, Top
8669@chapter Markup for rich export 8795@chapter Markup for rich export
8670 8796
8671When exporting Org-mode documents, the exporter tries to reflect the 8797When exporting Org mode documents, the exporter tries to reflect the
8672structure of the document as accurately as possible in the backend. Since 8798structure of the document as accurately as possible in the backend. Since
8673export targets like HTML, @LaTeX{}, or DocBook allow much richer formatting, 8799export targets like HTML, @LaTeX{}, or DocBook allow much richer formatting,
8674Org-mode has rules on how to prepare text for rich export. This section 8800Org mode has rules on how to prepare text for rich export. This section
8675summarizes the markup rules used in an Org-mode buffer. 8801summarizes the markup rules used in an Org mode buffer.
8676 8802
8677@menu 8803@menu
8678* Structural markup elements:: The basic structure as seen by the exporter 8804* Structural markup elements:: The basic structure as seen by the exporter
@@ -8681,7 +8807,7 @@ summarizes the markup rules used in an Org-mode buffer.
8681* Include files:: Include additional files into a document 8807* Include files:: Include additional files into a document
8682* Index entries:: Making an index 8808* Index entries:: Making an index
8683* Macro replacement:: Use macros to create complex output 8809* Macro replacement:: Use macros to create complex output
8684* Embedded LaTeX:: LaTeX can be freely used inside Org documents 8810* Embedded @LaTeX{}:: LaTeX can be freely used inside Org documents
8685@end menu 8811@end menu
8686 8812
8687@node Structural markup elements, Images and tables, Markup, Markup 8813@node Structural markup elements, Images and tables, Markup, Markup
@@ -8764,7 +8890,7 @@ the table of contents entirely, by configuring the variable
8764@cindex text before first headline, markup rules 8890@cindex text before first headline, markup rules
8765@cindex #+TEXT 8891@cindex #+TEXT
8766 8892
8767Org-mode normally exports the text before the first headline, and even uses 8893Org mode normally exports the text before the first headline, and even uses
8768the first line as the document title. The text will be fully marked up. If 8894the first line as the document title. The text will be fully marked up. If
8769you need to include literal HTML, @LaTeX{}, or DocBook code, use the special 8895you need to include literal HTML, @LaTeX{}, or DocBook code, use the special
8770constructs described below in the sections for the individual exporters. 8896constructs described below in the sections for the individual exporters.
@@ -8818,7 +8944,7 @@ can use this construct, which can also be used to format poetry.
8818 8944
8819When quoting a passage from another document, it is customary to format this 8945When quoting a passage from another document, it is customary to format this
8820as a paragraph that is indented on both the left and the right margin. You 8946as a paragraph that is indented on both the left and the right margin. You
8821can include quotations in Org-mode documents like this: 8947can include quotations in Org mode documents like this:
8822 8948
8823@cindex #+BEGIN_QUOTE 8949@cindex #+BEGIN_QUOTE
8824@example 8950@example
@@ -8858,7 +8984,7 @@ multiple footnotes side by side.
8858@cindex strike-through text, markup rules 8984@cindex strike-through text, markup rules
8859You can make words @b{*bold*}, @i{/italic/}, _underlined_, @code{=code=} 8985You can make words @b{*bold*}, @i{/italic/}, _underlined_, @code{=code=}
8860and @code{~verbatim~}, and, if you must, @samp{+strike-through+}. Text 8986and @code{~verbatim~}, and, if you must, @samp{+strike-through+}. Text
8861in the code and verbatim string is not processed for Org-mode specific 8987in the code and verbatim string is not processed for Org mode specific
8862syntax; it is exported verbatim. 8988syntax; it is exported verbatim.
8863 8989
8864@node Horizontal rules, Comment lines, Emphasis and monospace, Structural markup elements 8990@node Horizontal rules, Comment lines, Emphasis and monospace, Structural markup elements
@@ -8892,8 +9018,8 @@ Toggle the COMMENT keyword at the beginning of an entry.
8892@cindex tables, markup rules 9018@cindex tables, markup rules
8893@cindex #+CAPTION 9019@cindex #+CAPTION
8894@cindex #+LABEL 9020@cindex #+LABEL
8895Both the native Org-mode tables (@pxref{Tables}) and tables formatted with 9021Both the native Org mode tables (@pxref{Tables}) and tables formatted with
8896the @file{table.el} package will be exported properly. For Org-mode tables, 9022the @file{table.el} package will be exported properly. For Org mode tables,
8897the lines before the first horizontal separator line will become table header 9023the lines before the first horizontal separator line will become table header
8898lines. You can use the following lines somewhere before the table to assign 9024lines. You can use the following lines somewhere before the table to assign
8899a caption and a label for cross references, and in the text you can refer to 9025a caption and a label for cross references, and in the text you can refer to
@@ -8963,16 +9089,16 @@ If the example is source code from a programming language, or any other text
8963that can be marked up by font-lock in Emacs, you can ask for the example to 9089that can be marked up by font-lock in Emacs, you can ask for the example to
8964look like the fontified Emacs buffer@footnote{This works automatically for 9090look like the fontified Emacs buffer@footnote{This works automatically for
8965the HTML backend (it requires version 1.34 of the @file{htmlize.el} package, 9091the HTML backend (it requires version 1.34 of the @file{htmlize.el} package,
8966which is distributed with Org). Fontified code chunks in LaTeX can be 9092which is distributed with Org). Fontified code chunks in @LaTeX{} can be
8967achieved using either the listings or the 9093achieved using either the listings or the
8968@url{http://code.google.com/p/minted, minted,} package. To use listings, turn 9094@url{http://code.google.com/p/minted, minted,} package. To use listings, turn
8969on the variable @code{org-export-latex-listings} and ensure that the listings 9095on the variable @code{org-export-latex-listings} and ensure that the listings
8970package is included by the LaTeX header (e.g.@: by configuring 9096package is included by the @LaTeX{} header (e.g.@: by configuring
8971@code{org-export-latex-packages-alist}). See the listings documentation for 9097@code{org-export-latex-packages-alist}). See the listings documentation for
8972configuration options, including obtaining colored output. For minted it is 9098configuration options, including obtaining colored output. For minted it is
8973necessary to install the program @url{http://pygments.org, pygments}, in 9099necessary to install the program @url{http://pygments.org, pygments}, in
8974addition to setting @code{org-export-latex-minted}, ensuring that the minted 9100addition to setting @code{org-export-latex-minted}, ensuring that the minted
8975package is included by the LaTeX header, and ensuring that the 9101package is included by the @LaTeX{} header, and ensuring that the
8976@code{-shell-escape} option is passed to @file{pdflatex} (see 9102@code{-shell-escape} option is passed to @file{pdflatex} (see
8977@code{org-latex-to-pdf-process}). See the documentation of the variables 9103@code{org-latex-to-pdf-process}). See the documentation of the variables
8978@code{org-export-latex-listings} and @code{org-export-latex-minted} for 9104@code{org-export-latex-listings} and @code{org-export-latex-minted} for
@@ -8980,7 +9106,8 @@ further details.}. This is done with the @samp{src} block, where you also
8980need to specify the name of the major mode that should be used to fontify the 9106need to specify the name of the major mode that should be used to fontify the
8981example@footnote{Code in @samp{src} blocks may also be evaluated either 9107example@footnote{Code in @samp{src} blocks may also be evaluated either
8982interactively or on export. See @pxref{Working With Source Code} for more 9108interactively or on export. See @pxref{Working With Source Code} for more
8983information on evaluating code blocks.}: 9109information on evaluating code blocks.}, see @ref{Easy Templates} for
9110shortcuts to easily insert code blocks.
8984@cindex #+BEGIN_SRC 9111@cindex #+BEGIN_SRC
8985 9112
8986@example 9113@example
@@ -9004,7 +9131,7 @@ cool.
9004You can also add a @code{-r} switch which @i{removes} the labels from the 9131You can also add a @code{-r} switch which @i{removes} the labels from the
9005source code@footnote{Adding @code{-k} to @code{-n -r} will @i{keep} the 9132source code@footnote{Adding @code{-k} to @code{-n -r} will @i{keep} the
9006labels in the source code while using line numbers for the links, which might 9133labels in the source code while using line numbers for the links, which might
9007be useful to explain those in an org-mode example code.}. With the @code{-n} 9134be useful to explain those in an Org mode example code.}. With the @code{-n}
9008switch, links to these references will be labeled by the line numbers from 9135switch, links to these references will be labeled by the line numbers from
9009the code listing, otherwise links will use the labels with no parentheses. 9136the code listing, otherwise links will use the labels with no parentheses.
9010Here is an example: 9137Here is an example:
@@ -9070,11 +9197,11 @@ include your @file{.emacs} file, you could use:
9070The optional second and third parameter are the markup (e.g.@: @samp{quote}, 9197The optional second and third parameter are the markup (e.g.@: @samp{quote},
9071@samp{example}, or @samp{src}), and, if the markup is @samp{src}, the 9198@samp{example}, or @samp{src}), and, if the markup is @samp{src}, the
9072language for formatting the contents. The markup is optional; if it is not 9199language for formatting the contents. The markup is optional; if it is not
9073given, the text will be assumed to be in Org-mode format and will be 9200given, the text will be assumed to be in Org mode format and will be
9074processed normally. The include line will also allow additional keyword 9201processed normally. The include line will also allow additional keyword
9075parameters @code{:prefix1} and @code{:prefix} to specify prefixes for the 9202parameters @code{:prefix1} and @code{:prefix} to specify prefixes for the
9076first line and for each following line, @code{:minlevel} in order to get 9203first line and for each following line, @code{:minlevel} in order to get
9077org-mode content demoted to a specified level, as well as any options 9204Org mode content demoted to a specified level, as well as any options
9078accepted by the selected markup. For example, to include a file as an item, 9205accepted by the selected markup. For example, to include a file as an item,
9079use 9206use
9080 9207
@@ -9117,7 +9244,7 @@ an index} for more information.
9117 9244
9118 9245
9119 9246
9120@node Macro replacement, Embedded LaTeX, Index entries, Markup 9247@node Macro replacement, Embedded @LaTeX{}, Index entries, Markup
9121@section Macro replacement 9248@section Macro replacement
9122@cindex macro replacement, during export 9249@cindex macro replacement, during export
9123@cindex #+MACRO 9250@cindex #+MACRO
@@ -9142,7 +9269,7 @@ Macro expansion takes place during export, and some people use it to
9142construct complex HTML code. 9269construct complex HTML code.
9143 9270
9144 9271
9145@node Embedded LaTeX, , Macro replacement, Markup 9272@node Embedded @LaTeX{}, , Macro replacement, Markup
9146@section Embedded @LaTeX{} 9273@section Embedded @LaTeX{}
9147@cindex @TeX{} interpretation 9274@cindex @TeX{} interpretation
9148@cindex @LaTeX{} interpretation 9275@cindex @LaTeX{} interpretation
@@ -9152,7 +9279,7 @@ include scientific notes, which often require mathematical symbols and the
9152occasional formula. @LaTeX{}@footnote{@LaTeX{} is a macro system based on 9279occasional formula. @LaTeX{}@footnote{@LaTeX{} is a macro system based on
9153Donald E. Knuth's @TeX{} system. Many of the features described here as 9280Donald E. Knuth's @TeX{} system. Many of the features described here as
9154``@LaTeX{}'' are really from @TeX{}, but for simplicity I am blurring this 9281``@LaTeX{}'' are really from @TeX{}, but for simplicity I am blurring this
9155distinction.} is widely used to typeset scientific documents. Org-mode 9282distinction.} is widely used to typeset scientific documents. Org mode
9156supports embedding @LaTeX{} code into its files, because many academics are 9283supports embedding @LaTeX{} code into its files, because many academics are
9157used to writing and reading @LaTeX{} source code, and because it can be 9284used to writing and reading @LaTeX{} source code, and because it can be
9158readily processed to produce pretty output for a number of export backends. 9285readily processed to produce pretty output for a number of export backends.
@@ -9160,12 +9287,12 @@ readily processed to produce pretty output for a number of export backends.
9160@menu 9287@menu
9161* Special symbols:: Greek letters and other symbols 9288* Special symbols:: Greek letters and other symbols
9162* Subscripts and superscripts:: Simple syntax for raising/lowering text 9289* Subscripts and superscripts:: Simple syntax for raising/lowering text
9163* LaTeX fragments:: Complex formulas made easy 9290* @LaTeX{} fragments:: Complex formulas made easy
9164* Previewing LaTeX fragments:: What will this snippet look like? 9291* Previewing @LaTeX{} fragments:: What will this snippet look like?
9165* CDLaTeX mode:: Speed up entering of formulas 9292* CDLaTeX mode:: Speed up entering of formulas
9166@end menu 9293@end menu
9167 9294
9168@node Special symbols, Subscripts and superscripts, Embedded LaTeX, Embedded LaTeX 9295@node Special symbols, Subscripts and superscripts, Embedded @LaTeX{}, Embedded @LaTeX{}
9169@subsection Special symbols 9296@subsection Special symbols
9170@cindex math symbols 9297@cindex math symbols
9171@cindex special symbols 9298@cindex special symbols
@@ -9178,7 +9305,7 @@ You can use @LaTeX{} macros to insert special symbols like @samp{\alpha} to
9178indicate the Greek letter, or @samp{\to} to indicate an arrow. Completion 9305indicate the Greek letter, or @samp{\to} to indicate an arrow. Completion
9179for these macros is available, just type @samp{\} and maybe a few letters, 9306for these macros is available, just type @samp{\} and maybe a few letters,
9180and press @kbd{M-@key{TAB}} to see possible completions. Unlike @LaTeX{} 9307and press @kbd{M-@key{TAB}} to see possible completions. Unlike @LaTeX{}
9181code, Org-mode allows these macros to be present without surrounding math 9308code, Org mode allows these macros to be present without surrounding math
9182delimiters, for example: 9309delimiters, for example:
9183 9310
9184@example 9311@example
@@ -9212,7 +9339,7 @@ buffer content which remains plain ASCII, but it overlays the UTF-8 character
9212for display purposes only. 9339for display purposes only.
9213@end table 9340@end table
9214 9341
9215@node Subscripts and superscripts, LaTeX fragments, Special symbols, Embedded LaTeX 9342@node Subscripts and superscripts, @LaTeX{} fragments, Special symbols, Embedded @LaTeX{}
9216@subsection Subscripts and superscripts 9343@subsection Subscripts and superscripts
9217@cindex subscript 9344@cindex subscript
9218@cindex superscript 9345@cindex superscript
@@ -9250,13 +9377,13 @@ In addition to showing entities as UTF-8 characters, this command will also
9250format sub- and superscripts in a WYSIWYM way. 9377format sub- and superscripts in a WYSIWYM way.
9251@end table 9378@end table
9252 9379
9253@node LaTeX fragments, Previewing LaTeX fragments, Subscripts and superscripts, Embedded LaTeX 9380@node @LaTeX{} fragments, Previewing @LaTeX{} fragments, Subscripts and superscripts, Embedded @LaTeX{}
9254@subsection @LaTeX{} fragments 9381@subsection @LaTeX{} fragments
9255@cindex @LaTeX{} fragments 9382@cindex @LaTeX{} fragments
9256 9383
9257@vindex org-format-latex-header 9384@vindex org-format-latex-header
9258Going beyond symbols and sub- and superscripts, a full formula language is 9385Going beyond symbols and sub- and superscripts, a full formula language is
9259needed. Org-mode can contain @LaTeX{} math fragments, and it supports ways 9386needed. Org mode can contain @LaTeX{} math fragments, and it supports ways
9260to process these for several export backends. When exporting to @LaTeX{}, 9387to process these for several export backends. When exporting to @LaTeX{},
9261the code is obviously left as it is. When exporting to HTML, Org invokes the 9388the code is obviously left as it is. When exporting to HTML, Org invokes the
9262@uref{http://www.mathjax.org, MathJax library} (@pxref{Math formatting in 9389@uref{http://www.mathjax.org, MathJax library} (@pxref{Math formatting in
@@ -9309,10 +9436,10 @@ can configure the option @code{org-format-latex-options} to deselect the
9309ones you do not wish to have interpreted by the @LaTeX{} converter. 9436ones you do not wish to have interpreted by the @LaTeX{} converter.
9310 9437
9311@vindex org-export-with-LaTeX-fragments 9438@vindex org-export-with-LaTeX-fragments
9312LaTeX processing can be configured with the variable 9439@LaTeX{} processing can be configured with the variable
9313@code{org-export-with-LaTeX-fragments}. The default setting is @code{t} 9440@code{org-export-with-LaTeX-fragments}. The default setting is @code{t}
9314which means @file{MathJax} for HTML, and no processing for DocBook, ASCII and 9441which means @file{MathJax} for HTML, and no processing for DocBook, ASCII and
9315LaTeX backends. You can also set this variable on a per-file basis using one 9442@LaTeX{} backends. You can also set this variable on a per-file basis using one
9316of these lines: 9443of these lines:
9317 9444
9318@example 9445@example
@@ -9322,9 +9449,9 @@ of these lines:
9322#+OPTIONS: LaTeX:verbatim @r{Verbatim export, for jsMath or so} 9449#+OPTIONS: LaTeX:verbatim @r{Verbatim export, for jsMath or so}
9323@end example 9450@end example
9324 9451
9325@node Previewing LaTeX fragments, CDLaTeX mode, LaTeX fragments, Embedded LaTeX 9452@node Previewing @LaTeX{} fragments, CDLaTeX mode, @LaTeX{} fragments, Embedded @LaTeX{}
9326@subsection Previewing LaTeX fragments 9453@subsection Previewing @LaTeX{} fragments
9327@cindex LaTeX fragments, preview 9454@cindex @LaTeX{} fragments, preview
9328 9455
9329If you have @file{dvipng} installed, @LaTeX{} fragments can be processed to 9456If you have @file{dvipng} installed, @LaTeX{} fragments can be processed to
9330produce preview images of the typeset expressions: 9457produce preview images of the typeset expressions:
@@ -9349,18 +9476,18 @@ some aspects of the preview. In particular, the @code{:scale} (and for HTML
9349export, @code{:html-scale}) property can be used to adjust the size of the 9476export, @code{:html-scale}) property can be used to adjust the size of the
9350preview images. 9477preview images.
9351 9478
9352@node CDLaTeX mode, , Previewing LaTeX fragments, Embedded LaTeX 9479@node CDLaTeX mode, , Previewing @LaTeX{} fragments, Embedded @LaTeX{}
9353@subsection Using CDLa@TeX{} to enter math 9480@subsection Using CD@LaTeX{} to enter math
9354@cindex CDLa@TeX{} 9481@cindex CD@LaTeX{}
9355 9482
9356CDLa@TeX{} mode is a minor mode that is normally used in combination with a 9483CD@LaTeX{} mode is a minor mode that is normally used in combination with a
9357major @LaTeX{} mode like AUC@TeX{} in order to speed-up insertion of 9484major @LaTeX{} mode like AUC@TeX{} in order to speed-up insertion of
9358environments and math templates. Inside Org-mode, you can make use of 9485environments and math templates. Inside Org mode, you can make use of
9359some of the features of CDLa@TeX{} mode. You need to install 9486some of the features of CD@LaTeX{} mode. You need to install
9360@file{cdlatex.el} and @file{texmathp.el} (the latter comes also with 9487@file{cdlatex.el} and @file{texmathp.el} (the latter comes also with
9361AUC@TeX{}) from @url{http://www.astro.uva.nl/~dominik/Tools/cdlatex}. 9488AUC@TeX{}) from @url{http://www.astro.uva.nl/~dominik/Tools/cdlatex}.
9362Don't use CDLa@TeX{} mode itself under Org-mode, but use the light 9489Don't use CD@LaTeX{} mode itself under Org mode, but use the light
9363version @code{org-cdlatex-mode} that comes as part of Org-mode. Turn it 9490version @code{org-cdlatex-mode} that comes as part of Org mode. Turn it
9364on for the current buffer with @code{M-x org-cdlatex-mode}, or for all 9491on for the current buffer with @code{M-x org-cdlatex-mode}, or for all
9365Org files with 9492Org files with
9366 9493
@@ -9369,7 +9496,7 @@ Org files with
9369@end lisp 9496@end lisp
9370 9497
9371When this mode is enabled, the following features are present (for more 9498When this mode is enabled, the following features are present (for more
9372details see the documentation of CDLa@TeX{} mode): 9499details see the documentation of CD@LaTeX{} mode):
9373@itemize @bullet 9500@itemize @bullet
9374@kindex C-c @{ 9501@kindex C-c @{
9375@item 9502@item
@@ -9377,7 +9504,7 @@ Environment templates can be inserted with @kbd{C-c @{}.
9377@item 9504@item
9378@kindex @key{TAB} 9505@kindex @key{TAB}
9379The @key{TAB} key will do template expansion if the cursor is inside a 9506The @key{TAB} key will do template expansion if the cursor is inside a
9380@LaTeX{} fragment@footnote{Org-mode has a method to test if the cursor is 9507@LaTeX{} fragment@footnote{Org mode has a method to test if the cursor is
9381inside such a fragment, see the documentation of the function 9508inside such a fragment, see the documentation of the function
9382@code{org-inside-LaTeX-fragment-p}.}. For example, @key{TAB} will 9509@code{org-inside-LaTeX-fragment-p}.}. For example, @key{TAB} will
9383expand @code{fr} to @code{\frac@{@}@{@}} and position the cursor 9510expand @code{fr} to @code{\frac@{@}@{@}} and position the cursor
@@ -9414,20 +9541,20 @@ is normal.
9414@chapter Exporting 9541@chapter Exporting
9415@cindex exporting 9542@cindex exporting
9416 9543
9417Org-mode documents can be exported into a variety of other formats. For 9544Org mode documents can be exported into a variety of other formats. For
9418printing and sharing of notes, ASCII export produces a readable and simple 9545printing and sharing of notes, ASCII export produces a readable and simple
9419version of an Org file. HTML export allows you to publish a notes file on 9546version of an Org file. HTML export allows you to publish a notes file on
9420the web, while the XOXO format provides a solid base for exchange with a 9547the web, while the XOXO format provides a solid base for exchange with a
9421broad range of other applications. @LaTeX{} export lets you use Org-mode and 9548broad range of other applications. @LaTeX{} export lets you use Org mode and
9422its structured editing functions to easily create @LaTeX{} files. DocBook 9549its structured editing functions to easily create @LaTeX{} files. DocBook
9423export makes it possible to convert Org files to many other formats using 9550export makes it possible to convert Org files to many other formats using
9424DocBook tools. OpenDocumentText export allows seamless collaboration across 9551DocBook tools. OpenDocument Text(@acronym{ODT}) export allows seamless
9425organizational boundaries. For project management you can create gantt and 9552colloboration across organizational boundaries. For project management you
9426resource charts by using TaskJuggler export. To incorporate entries with 9553can create gantt and resource charts by using TaskJuggler export. To
9427associated times like deadlines or appointments into a desktop calendar 9554incorporate entries with associated times like deadlines or appointments into
9428program like iCal, Org-mode can also produce extracts in the iCalendar 9555a desktop calendar program like iCal, Org mode can also produce extracts in
9429format. Currently Org-mode only supports export, not import of these 9556the iCalendar format. Currently Org mode only supports export, not import of
9430different formats. 9557these different formats.
9431 9558
9432Org supports export of selected regions when @code{transient-mark-mode} is 9559Org supports export of selected regions when @code{transient-mark-mode} is
9433enabled (default in Emacs 23). 9560enabled (default in Emacs 23).
@@ -9438,9 +9565,9 @@ enabled (default in Emacs 23).
9438* The export dispatcher:: How to access exporter commands 9565* The export dispatcher:: How to access exporter commands
9439* ASCII/Latin-1/UTF-8 export:: Exporting to flat files with encoding 9566* ASCII/Latin-1/UTF-8 export:: Exporting to flat files with encoding
9440* HTML export:: Exporting to HTML 9567* HTML export:: Exporting to HTML
9441* LaTeX and PDF export:: Exporting to @LaTeX{}, and processing to PDF 9568* @LaTeX{} and PDF export:: Exporting to @LaTeX{}, and processing to PDF
9442* DocBook export:: Exporting to DocBook 9569* DocBook export:: Exporting to DocBook
9443* OpenDocumentText export:: Exporting to OpenDocumentText 9570* OpenDocument Text export:: Exporting to OpenDocument Text
9444* TaskJuggler export:: Exporting to TaskJuggler 9571* TaskJuggler export:: Exporting to TaskJuggler
9445* Freemind export:: Exporting to Freemind mind maps 9572* Freemind export:: Exporting to Freemind mind maps
9446* XOXO export:: Exporting to XOXO 9573* XOXO export:: Exporting to XOXO
@@ -9456,7 +9583,8 @@ enabled (default in Emacs 23).
9456@cindex org-export-with-tasks 9583@cindex org-export-with-tasks
9457You may use tags to select the parts of a document that should be exported, 9584You may use tags to select the parts of a document that should be exported,
9458or to exclude parts from export. This behavior is governed by two variables: 9585or to exclude parts from export. This behavior is governed by two variables:
9459@code{org-export-select-tags} and @code{org-export-exclude-tags}. 9586@code{org-export-select-tags} and @code{org-export-exclude-tags},
9587respectively defaulting to @code{'(:export:)} and @code{'(:noexport:)}.
9460 9588
9461@enumerate 9589@enumerate
9462@item 9590@item
@@ -9517,10 +9645,11 @@ Insert template with export options, see example below.
9517@vindex user-full-name 9645@vindex user-full-name
9518@vindex user-mail-address 9646@vindex user-mail-address
9519@vindex org-export-default-language 9647@vindex org-export-default-language
9648@vindex org-export-date-timestamp-format
9520@example 9649@example
9521#+TITLE: the title to be shown (default is the buffer name) 9650#+TITLE: the title to be shown (default is the buffer name)
9522#+AUTHOR: the author (default taken from @code{user-full-name}) 9651#+AUTHOR: the author (default taken from @code{user-full-name})
9523#+DATE: a date, fixed, or a format string for @code{format-time-string} 9652#+DATE: a date, an Org timestamp@footnote{@code{org-export-date-timestamp-format} defines how this timestamp will be exported.}, or a format string for @code{format-time-string}
9524#+EMAIL: his/her email address (default from @code{user-mail-address}) 9653#+EMAIL: his/her email address (default from @code{user-mail-address})
9525#+DESCRIPTION: the page description, e.g.@: for the XHTML meta tag 9654#+DESCRIPTION: the page description, e.g.@: for the XHTML meta tag
9526#+KEYWORDS: the page keywords, e.g.@: for the XHTML meta tag 9655#+KEYWORDS: the page keywords, e.g.@: for the XHTML meta tag
@@ -9528,19 +9657,19 @@ Insert template with export options, see example below.
9528#+TEXT: Some descriptive text to be inserted at the beginning. 9657#+TEXT: Some descriptive text to be inserted at the beginning.
9529#+TEXT: Several lines may be given. 9658#+TEXT: Several lines may be given.
9530#+OPTIONS: H:2 num:t toc:t \n:nil @@:t ::t |:t ^:t f:t TeX:t ... 9659#+OPTIONS: H:2 num:t toc:t \n:nil @@:t ::t |:t ^:t f:t TeX:t ...
9531#+BIND: lisp-var lisp-val, e.g.@:: org-export-latex-low-levels itemize 9660#+BIND: lisp-var lisp-val, e.g.@:: @code{org-export-latex-low-levels itemize}
9532 @r{You need to confirm using these, or configure @code{org-export-allow-BIND}} 9661 @r{You need to confirm using these, or configure @code{org-export-allow-BIND}}
9533#+LINK_UP: the ``up'' link of an exported page 9662#+LINK_UP: the ``up'' link of an exported page
9534#+LINK_HOME: the ``home'' link of an exported page 9663#+LINK_HOME: the ``home'' link of an exported page
9535#+LATEX_HEADER: extra line(s) for the LaTeX header, like \usepackage@{xyz@} 9664#+LATEX_HEADER: extra line(s) for the @LaTeX{} header, like \usepackage@{xyz@}
9536#+EXPORT_SELECT_TAGS: Tags that select a tree for export 9665#+EXPORT_SELECT_TAGS: Tags that select a tree for export
9537#+EXPORT_EXCLUDE_TAGS: Tags that exclude a tree from export 9666#+EXPORT_EXCLUDE_TAGS: Tags that exclude a tree from export
9538#+XSLT: the XSLT stylesheet used by DocBook exporter to generate FO file 9667#+XSLT: the XSLT stylesheet used by DocBook exporter to generate FO file
9539@end example 9668@end example
9540 9669
9541@noindent 9670@noindent
9542The OPTIONS line is a compact@footnote{If you want to configure many options 9671The @code{#+OPTIONS} line is a compact@footnote{If you want to configure many options
9543this way, you can use several OPTIONS lines.} form to specify export 9672this way, you can use several @code{#+OPTIONS} lines.} form to specify export
9544settings. Here you can: 9673settings. Here you can:
9545@cindex headline levels 9674@cindex headline levels
9546@cindex section-numbers 9675@cindex section-numbers
@@ -9642,7 +9771,7 @@ not set, or force processing in the current Emacs process if set.
9642@cindex Latin-1 export 9771@cindex Latin-1 export
9643@cindex UTF-8 export 9772@cindex UTF-8 export
9644 9773
9645ASCII export produces a simple and very readable version of an Org-mode 9774ASCII export produces a simple and very readable version of an Org mode
9646file, containing only plain ASCII. Latin-1 and UTF-8 export augment the file 9775file, containing only plain ASCII. Latin-1 and UTF-8 export augment the file
9647with special characters and symbols available in these encodings. 9776with special characters and symbols available in these encodings.
9648 9777
@@ -9697,18 +9826,18 @@ Links will be exported in a footnote-like style, with the descriptive part in
9697the text and the link in a note before the next heading. See the variable 9826the text and the link in a note before the next heading. See the variable
9698@code{org-export-ascii-links-to-notes} for details and other options. 9827@code{org-export-ascii-links-to-notes} for details and other options.
9699 9828
9700@node HTML export, LaTeX and PDF export, ASCII/Latin-1/UTF-8 export, Exporting 9829@node HTML export, @LaTeX{} and PDF export, ASCII/Latin-1/UTF-8 export, Exporting
9701@section HTML export 9830@section HTML export
9702@cindex HTML export 9831@cindex HTML export
9703 9832
9704Org-mode contains an HTML (XHTML 1.0 strict) exporter with extensive 9833Org mode contains an HTML (XHTML 1.0 strict) exporter with extensive
9705HTML formatting, in ways similar to John Gruber's @emph{markdown} 9834HTML formatting, in ways similar to John Gruber's @emph{markdown}
9706language, but with additional support for tables. 9835language, but with additional support for tables.
9707 9836
9708@menu 9837@menu
9709* HTML Export commands:: How to invoke HTML export 9838* HTML Export commands:: How to invoke HTML export
9710* HTML preamble and postamble:: How to insert a preamble and a postamble 9839* HTML preamble and postamble:: How to insert a preamble and a postamble
9711* Quoting HTML tags:: Using direct HTML in Org-mode 9840* Quoting HTML tags:: Using direct HTML in Org mode
9712* Links in HTML export:: How links will be interpreted and formatted 9841* Links in HTML export:: How links will be interpreted and formatted
9713* Tables in HTML export:: How to modify the formatting of tables 9842* Tables in HTML export:: How to modify the formatting of tables
9714* Images in HTML export:: How to insert figures into HTML output 9843* Images in HTML export:: How to insert figures into HTML output
@@ -9746,11 +9875,11 @@ the region. This is good for cut-and-paste operations.
9746@item C-c C-e v h/b/H/R 9875@item C-c C-e v h/b/H/R
9747Export only the visible part of the document. 9876Export only the visible part of the document.
9748@item M-x org-export-region-as-html 9877@item M-x org-export-region-as-html
9749Convert the region to HTML under the assumption that it was Org-mode 9878Convert the region to HTML under the assumption that it was Org mode
9750syntax before. This is a global command that can be invoked in any 9879syntax before. This is a global command that can be invoked in any
9751buffer. 9880buffer.
9752@item M-x org-replace-region-by-HTML 9881@item M-x org-replace-region-by-HTML
9753Replace the active region (assumed to be in Org-mode syntax) by HTML 9882Replace the active region (assumed to be in Org mode syntax) by HTML
9754code. 9883code.
9755@end table 9884@end table
9756 9885
@@ -9852,7 +9981,7 @@ and @code{style} attributes for a link:
9852 9981
9853@cindex #+ATTR_HTML 9982@cindex #+ATTR_HTML
9854@example 9983@example
9855#+ATTR_HTML: title="The Org-mode homepage" style="color:red;" 9984#+ATTR_HTML: title="The Org mode homepage" style="color:red;"
9856[[http://orgmode.org]] 9985[[http://orgmode.org]]
9857@end example 9986@end example
9858 9987
@@ -9861,7 +9990,7 @@ and @code{style} attributes for a link:
9861@cindex tables, in HTML 9990@cindex tables, in HTML
9862@vindex org-export-html-table-tag 9991@vindex org-export-html-table-tag
9863 9992
9864Org-mode tables are exported to HTML using the table tag defined in 9993Org mode tables are exported to HTML using the table tag defined in
9865@code{org-export-html-table-tag}. The default setting makes tables without 9994@code{org-export-html-table-tag}. The default setting makes tables without
9866cell borders and frame. If you would like to change this for individual 9995cell borders and frame. If you would like to change this for individual
9867tables, place something like the following before the table: 9996tables, place something like the following before the table:
@@ -9870,7 +9999,7 @@ tables, place something like the following before the table:
9870@cindex #+ATTR_HTML 9999@cindex #+ATTR_HTML
9871@example 10000@example
9872#+CAPTION: This is a table with lines around and between cells 10001#+CAPTION: This is a table with lines around and between cells
9873#+ATTR_HTML: border="2" rules="all" frame="all" 10002#+ATTR_HTML: border="2" rules="all" frame="border"
9874@end example 10003@end example
9875 10004
9876@node Images in HTML export, Math formatting in HTML export, Tables in HTML export, HTML export 10005@node Images in HTML export, Math formatting in HTML export, Tables in HTML export, HTML export
@@ -9915,11 +10044,11 @@ You could use @code{http} addresses just as well.
9915@cindex MathJax 10044@cindex MathJax
9916@cindex dvipng 10045@cindex dvipng
9917 10046
9918@LaTeX{} math snippets (@pxref{LaTeX fragments}) can be displayed in two 10047@LaTeX{} math snippets (@pxref{@LaTeX{} fragments}) can be displayed in two
9919different ways on HTML pages. The default is to use the 10048different ways on HTML pages. The default is to use the
9920@uref{http://www.mathjax.org, MathJax system} which should work out of the 10049@uref{http://www.mathjax.org, MathJax system} which should work out of the
9921box with Org mode installation because @code{http://orgmode.org} serves 10050box with Org mode installation because @code{http://orgmode.org} serves
9922@file{MathJax} for Org-mode users for small applications and for testing 10051@file{MathJax} for Org mode users for small applications and for testing
9923purposes. @b{If you plan to use this regularly or on pages with significant 10052purposes. @b{If you plan to use this regularly or on pages with significant
9924page views, you should install@footnote{Installation instructions can be 10053page views, you should install@footnote{Installation instructions can be
9925found on the MathJax website, see 10054found on the MathJax website, see
@@ -9985,7 +10114,7 @@ addition to any of the standard classes like for headlines, tables, etc.
9985@example 10114@example
9986p.author @r{author information, including email} 10115p.author @r{author information, including email}
9987p.date @r{publishing date} 10116p.date @r{publishing date}
9988p.creator @r{creator info, about org-mode version} 10117p.creator @r{creator info, about org mode version}
9989.title @r{document title} 10118.title @r{document title}
9990.todo @r{TODO keywords, all not-done states} 10119.todo @r{TODO keywords, all not-done states}
9991.done @r{the DONE keywords, all states that count as done} 10120.done @r{the DONE keywords, all states that count as done}
@@ -10111,16 +10240,16 @@ You can choose default values for these options by customizing the variable
10111@code{org-infojs-options}. If you always want to apply the script to your 10240@code{org-infojs-options}. If you always want to apply the script to your
10112pages, configure the variable @code{org-export-html-use-infojs}. 10241pages, configure the variable @code{org-export-html-use-infojs}.
10113 10242
10114@node LaTeX and PDF export, DocBook export, HTML export, Exporting 10243@node @LaTeX{} and PDF export, DocBook export, HTML export, Exporting
10115@section @LaTeX{} and PDF export 10244@section @LaTeX{} and PDF export
10116@cindex @LaTeX{} export 10245@cindex @LaTeX{} export
10117@cindex PDF export 10246@cindex PDF export
10118@cindex Guerry, Bastien 10247@cindex Guerry, Bastien
10119 10248
10120Org-mode contains a @LaTeX{} exporter written by Bastien Guerry. With 10249Org mode contains a @LaTeX{} exporter written by Bastien Guerry. With
10121further processing@footnote{The default LaTeX output is designed for 10250further processing@footnote{The default @LaTeX{} output is designed for
10122processing with pdftex or latex. It includes packages that are not 10251processing with @code{pdftex} or @LaTeX{}. It includes packages that are not
10123compatible with xetex and possibly luatex. See the variables 10252compatible with @code{xetex} and possibly @code{luatex}. See the variables
10124@code{org-export-latex-default-packages-alist} and 10253@code{org-export-latex-default-packages-alist} and
10125@code{org-export-latex-packages-alist}.}, this backend is also used to 10254@code{org-export-latex-packages-alist}.}, this backend is also used to
10126produce PDF output. Since the @LaTeX{} output uses @file{hyperref} to 10255produce PDF output. Since the @LaTeX{} output uses @file{hyperref} to
@@ -10130,15 +10259,15 @@ structured in order to be correctly exported: respect the hierarchy of
10130sections. 10259sections.
10131 10260
10132@menu 10261@menu
10133* LaTeX/PDF export commands:: Which key invokes which commands 10262* @LaTeX{}/PDF export commands::
10134* Header and sectioning:: Setting up the export file structure 10263* Header and sectioning:: Setting up the export file structure
10135* Quoting LaTeX code:: Incorporating literal @LaTeX{} code 10264* Quoting @LaTeX{} code:: Incorporating literal @LaTeX{} code
10136* Tables in LaTeX export:: Options for exporting tables to @LaTeX{} 10265* Tables in @LaTeX{} export:: Options for exporting tables to @LaTeX{}
10137* Images in LaTeX export:: How to insert figures into @LaTeX{} output 10266* Images in @LaTeX{} export:: How to insert figures into @LaTeX{} output
10138* Beamer class export:: Turning the file into a presentation 10267* Beamer class export:: Turning the file into a presentation
10139@end menu 10268@end menu
10140 10269
10141@node LaTeX/PDF export commands, Header and sectioning, LaTeX and PDF export, LaTeX and PDF export 10270@node @LaTeX{}/PDF export commands, Header and sectioning, @LaTeX{} and PDF export, @LaTeX{} and PDF export
10142@subsection @LaTeX{} export commands 10271@subsection @LaTeX{} export commands
10143 10272
10144@cindex region, active 10273@cindex region, active
@@ -10160,11 +10289,11 @@ Export to a temporary buffer. Do not create a file.
10160@item C-c C-e v l/L 10289@item C-c C-e v l/L
10161Export only the visible part of the document. 10290Export only the visible part of the document.
10162@item M-x org-export-region-as-latex 10291@item M-x org-export-region-as-latex
10163Convert the region to @LaTeX{} under the assumption that it was Org-mode 10292Convert the region to @LaTeX{} under the assumption that it was Org mode
10164syntax before. This is a global command that can be invoked in any 10293syntax before. This is a global command that can be invoked in any
10165buffer. 10294buffer.
10166@item M-x org-replace-region-by-latex 10295@item M-x org-replace-region-by-latex
10167Replace the active region (assumed to be in Org-mode syntax) by @LaTeX{} 10296Replace the active region (assumed to be in Org mode syntax) by @LaTeX{}
10168code. 10297code.
10169@orgcmd{C-c C-e p,org-export-as-pdf} 10298@orgcmd{C-c C-e p,org-export-as-pdf}
10170Export as @LaTeX{} and then process to PDF. 10299Export as @LaTeX{} and then process to PDF.
@@ -10190,13 +10319,13 @@ with a numeric prefix argument. For example,
10190@noindent 10319@noindent
10191creates two levels of headings and does the rest as items. 10320creates two levels of headings and does the rest as items.
10192 10321
10193@node Header and sectioning, Quoting LaTeX code, LaTeX/PDF export commands, LaTeX and PDF export 10322@node Header and sectioning, Quoting @LaTeX{} code, @LaTeX{}/PDF export commands, @LaTeX{} and PDF export
10194@subsection Header and sectioning structure 10323@subsection Header and sectioning structure
10195@cindex @LaTeX{} class 10324@cindex @LaTeX{} class
10196@cindex @LaTeX{} sectioning structure 10325@cindex @LaTeX{} sectioning structure
10197@cindex @LaTeX{} header 10326@cindex @LaTeX{} header
10198@cindex header, for LaTeX files 10327@cindex header, for @LaTeX{} files
10199@cindex sectioning structure, for LaTeX export 10328@cindex sectioning structure, for @LaTeX{} export
10200 10329
10201By default, the @LaTeX{} output uses the class @code{article}. 10330By default, the @LaTeX{} output uses the class @code{article}.
10202 10331
@@ -10224,10 +10353,10 @@ can also use @code{#+LATEX_HEADER: \usepackage@{xyz@}} to add lines to the
10224header. See the docstring of @code{org-export-latex-classes} for more 10353header. See the docstring of @code{org-export-latex-classes} for more
10225information. 10354information.
10226 10355
10227@node Quoting LaTeX code, Tables in LaTeX export, Header and sectioning, LaTeX and PDF export 10356@node Quoting @LaTeX{} code, Tables in @LaTeX{} export, Header and sectioning, @LaTeX{} and PDF export
10228@subsection Quoting @LaTeX{} code 10357@subsection Quoting @LaTeX{} code
10229 10358
10230Embedded @LaTeX{} as described in @ref{Embedded LaTeX}, will be correctly 10359Embedded @LaTeX{} as described in @ref{Embedded @LaTeX{}}, will be correctly
10231inserted into the @LaTeX{} file. This includes simple macros like 10360inserted into the @LaTeX{} file. This includes simple macros like
10232@samp{\ref@{LABEL@}} to create a cross reference to a figure. Furthermore, 10361@samp{\ref@{LABEL@}} to create a cross reference to a figure. Furthermore,
10233you can add special code that should only be present in @LaTeX{} export with 10362you can add special code that should only be present in @LaTeX{} export with
@@ -10236,7 +10365,7 @@ the following constructs:
10236@cindex #+LaTeX 10365@cindex #+LaTeX
10237@cindex #+BEGIN_LaTeX 10366@cindex #+BEGIN_LaTeX
10238@example 10367@example
10239#+LaTeX: Literal LaTeX code for export 10368#+LaTeX: Literal @LaTeX{} code for export
10240@end example 10369@end example
10241 10370
10242@noindent or 10371@noindent or
@@ -10249,7 +10378,7 @@ All lines between these markers are exported literally
10249@end example 10378@end example
10250 10379
10251 10380
10252@node Tables in LaTeX export, Images in LaTeX export, Quoting LaTeX code, LaTeX and PDF export 10381@node Tables in @LaTeX{} export, Images in @LaTeX{} export, Quoting @LaTeX{} code, @LaTeX{} and PDF export
10253@subsection Tables in @LaTeX{} export 10382@subsection Tables in @LaTeX{} export
10254@cindex tables, in @LaTeX{} export 10383@cindex tables, in @LaTeX{} export
10255 10384
@@ -10286,7 +10415,7 @@ or to specify a multicolumn table with @code{tabulary}
10286| ..... | ..... | 10415| ..... | ..... |
10287@end example 10416@end example
10288 10417
10289@node Images in LaTeX export, Beamer class export, Tables in LaTeX export, LaTeX and PDF export 10418@node Images in @LaTeX{} export, Beamer class export, Tables in @LaTeX{} export, @LaTeX{} and PDF export
10290@subsection Images in @LaTeX{} export 10419@subsection Images in @LaTeX{} export
10291@cindex images, inline in @LaTeX{} 10420@cindex images, inline in @LaTeX{}
10292@cindex inlining images in @LaTeX{} 10421@cindex inlining images in @LaTeX{}
@@ -10337,14 +10466,14 @@ will export the image wrapped in a @code{figure*} environment.
10337If you need references to a label created in this way, write 10466If you need references to a label created in this way, write
10338@samp{\ref@{fig:SED-HR4049@}} just like in @LaTeX{}. 10467@samp{\ref@{fig:SED-HR4049@}} just like in @LaTeX{}.
10339 10468
10340@node Beamer class export, , Images in LaTeX export, LaTeX and PDF export 10469@node Beamer class export, , Images in @LaTeX{} export, @LaTeX{} and PDF export
10341@subsection Beamer class export 10470@subsection Beamer class export
10342 10471
10343The LaTeX class @file{beamer} allows production of high quality presentations 10472The @LaTeX{} class @file{beamer} allows production of high quality presentations
10344using LaTeX and pdf processing. Org-mode has special support for turning an 10473using @LaTeX{} and pdf processing. Org mode has special support for turning an
10345Org-mode file or tree into a @file{beamer} presentation. 10474Org mode file or tree into a @file{beamer} presentation.
10346 10475
10347When the LaTeX class for the current buffer (as set with @code{#+LaTeX_CLASS: 10476When the @LaTeX{} class for the current buffer (as set with @code{#+LaTeX_CLASS:
10348beamer}) or subtree (set with a @code{LaTeX_CLASS} property) is 10477beamer}) or subtree (set with a @code{LaTeX_CLASS} property) is
10349@code{beamer}, a special export mode will turn the file or tree into a beamer 10478@code{beamer}, a special export mode will turn the file or tree into a beamer
10350presentation. Any tree with not-too-deep level nesting should in principle be 10479presentation. Any tree with not-too-deep level nesting should in principle be
@@ -10464,7 +10593,7 @@ Here is a simple example Org document that is intended for beamer export.
10464 10593
10465For more information, see the documentation on Worg. 10594For more information, see the documentation on Worg.
10466 10595
10467@node DocBook export, OpenDocumentText export, LaTeX and PDF export, Exporting 10596@node DocBook export, OpenDocument Text export, @LaTeX{} and PDF export, Exporting
10468@section DocBook export 10597@section DocBook export
10469@cindex DocBook export 10598@cindex DocBook export
10470@cindex PDF export 10599@cindex PDF export
@@ -10620,7 +10749,7 @@ set:
10620@cindex #+LABEL 10749@cindex #+LABEL
10621@cindex #+ATTR_DOCBOOK 10750@cindex #+ATTR_DOCBOOK
10622@example 10751@example
10623#+CAPTION: The logo of Org-mode 10752#+CAPTION: The logo of Org mode
10624#+LABEL: unicorn-svg 10753#+LABEL: unicorn-svg
10625#+ATTR_DOCBOOK: scalefit="1" width="100%" depth="100%" 10754#+ATTR_DOCBOOK: scalefit="1" width="100%" depth="100%"
10626[[./img/org-mode-unicorn.svg]] 10755[[./img/org-mode-unicorn.svg]]
@@ -10663,39 +10792,46 @@ special characters included in XHTML entities:
10663 10792
10664@c begin opendocument 10793@c begin opendocument
10665 10794
10666@node OpenDocumentText export, TaskJuggler export, DocBook export, Exporting 10795@node OpenDocument Text export, TaskJuggler export, DocBook export, Exporting
10667@section OpenDocumentText export 10796@section OpenDocument Text export
10668@cindex OpenDocumentText export
10669@cindex K, Jambunathan 10797@cindex K, Jambunathan
10670 10798@cindex ODT
10671Org-mode 7.6 supports export to OpenDocumentText format using 10799@cindex OpenDocument
10672@file{org-odt.el} module contributed by Jambunathan K. This module can be 10800@cindex export, OpenDocument
10673enabled in one of the following ways based on your mode of installation. 10801@cindex LibreOffice
10674 10802@cindex org-odt.el
10675@enumerate 10803@cindex org-modules
10676@item 10804
10677If you have downloaded the Org from the Web, either as a distribution 10805Orgmode@footnote{Versions 7.8 or later} supports export to OpenDocument Text
10678@file{.zip} or @file{.tar} file, or as a Git archive, enable the @code{odt} 10806(@acronym{ODT}) format using the @file{org-odt.el} module. Documents created
10679option in variable @code{org-modules}. 10807by this exporter use the @cite{OpenDocument-v1.2
10680@item 10808specification}@footnote{@url{http://docs.oasis-open.org/office/v1.2/OpenDocument-v1.2.html,
10681If you are using Org that comes bundled with Emacs, then you can install the 10809Open Document Format for Office Applications (OpenDocument) Version 1.2}} and
10682OpenDocumentText exporter using the package manager. To do this, customize 10810are compatible with LibreOffice 3.4.
10683the variable @code{package-archives} to include
10684@uref{http://orgmode.org/pkg/releases/} as one of the package archives.
10685@end enumerate
10686 10811
10687@menu 10812@menu
10688* OpenDocumentText export commands::How to invoke OpenDocumentText export 10813* Pre-requisites for @acronym{ODT} export:: What packages @acronym{ODT} exporter relies on
10689* Applying Custom Styles:: How to apply custom styles to the output 10814* @acronym{ODT} export commands:: How to invoke @acronym{ODT} export
10690* Converting to Other formats:: How to convert to formats like doc, docx etc 10815* Applying custom styles:: How to apply custom styles to the output
10691* Links in OpenDocumentText export:: How links will be interpreted and formatted 10816* Links in @acronym{ODT} export:: How links will be interpreted and formatted
10692* Tables in OpenDocumentText export:: Tables are exported as HTML tables 10817* Tables in @acronym{ODT} export:: How Tables are exported
10693* Images in OpenDocumentText export:: How to insert figures into DocBook output 10818* Images in @acronym{ODT} export:: How to insert images
10694* Additional Documentation:: Where to find more information 10819* Math formatting in @acronym{ODT} export:: How @LaTeX{} fragments are formatted
10820* Literal examples in @acronym{ODT} export:: How source and example blocks are formatted
10821* Advanced topics in @acronym{ODT} export:: Read this if you are a power user
10695@end menu 10822@end menu
10696 10823
10697@node OpenDocumentText export commands, Applying Custom Styles, OpenDocumentText export, OpenDocumentText export 10824@node Pre-requisites for @acronym{ODT} export, @acronym{ODT} export commands, OpenDocument Text export, OpenDocument Text export
10698@subsection OpenDocumentText export commands 10825@subsection Pre-requisites for @acronym{ODT} export
10826@cindex zip
10827The @acronym{ODT} exporter relies on the @file{zip} program to create the final
10828output. Check the availability of this program before proceeding further.
10829
10830@node @acronym{ODT} export commands, Applying custom styles, Pre-requisites for @acronym{ODT} export, OpenDocument Text export
10831@subsection @acronym{ODT} export commands
10832
10833@subsubheading Exporting to @acronym{ODT}
10834@anchor{x-export-to-odt}
10699 10835
10700@cindex region, active 10836@cindex region, active
10701@cindex active region 10837@cindex active region
@@ -10703,113 +10839,791 @@ the variable @code{package-archives} to include
10703@table @kbd 10839@table @kbd
10704@orgcmd{C-c C-e o,org-export-as-odt} 10840@orgcmd{C-c C-e o,org-export-as-odt}
10705@cindex property EXPORT_FILE_NAME 10841@cindex property EXPORT_FILE_NAME
10706Export as OpenDocumentText file. For an Org file, @file{myfile.org}, the 10842
10707OpenDocumentText file will be @file{myfile.odt}. The file will be 10843Export as OpenDocument Text file.
10708overwritten without warning. If there is an active region@footnote{This 10844@vindex org-export-odt-preferred-output-format
10709requires @code{transient-mark-mode} to be turned on}, only the region will be 10845If @code{org-export-odt-preferred-output-format} is specified, automatically
10710exported. If the selected region is a single tree@footnote{To select the 10846convert the exported file to that format.
10711current subtree, use @kbd{C-c @@}.}, the tree head will become the document 10847@xref{x-export-to-other-formats,,Automatically exporting to other formats}.
10712title. If the tree head entry has, or inherits, an @code{EXPORT_FILE_NAME} 10848
10713property, that name will be used for the export. 10849For an Org file @file{myfile.org}, the @acronym{ODT} file will be
10850@file{myfile.odt}. The file will be overwritten without warning. If there
10851is an active region,@footnote{This requires @code{transient-mark-mode} to be
10852turned on} only the region will be exported. If the selected region is a
10853single tree,@footnote{To select the current subtree, use @kbd{C-c @@}} the
10854tree head will become the document title. If the tree head entry has, or
10855inherits, an @code{EXPORT_FILE_NAME} property, that name will be used for the
10856export.
10857
10714@orgcmd{C-c C-e O,org-export-as-odt-and-open} 10858@orgcmd{C-c C-e O,org-export-as-odt-and-open}
10715Export as OpenDocumentText file and open the resulting file. 10859Export as OpenDocument Text file and open the resulting file.
10860@vindex org-export-odt-preferred-output-format
10861If @code{org-export-odt-preferred-output-format} is specified, open the
10862converted file instead.
10863@xref{x-export-to-other-formats,,Automatically exporting to other formats}.
10716@end table 10864@end table
10717 10865
10718@node Applying Custom Styles, Converting to Other formats, OpenDocumentText export commands, OpenDocumentText export 10866@subsubheading Automatically exporting to other formats
10719@subsection Applying Custom Styles 10867@anchor{x-export-to-other-formats}
10868@vindex org-export-odt-preferred-output-format
10869Very often, you will find yourself exporting to @acronym{ODT} format, only to
10870immediately save the exported document to a different format like @samp{pdf}.
10871In such cases, you will find it convenient to configure a converter
10872(@pxref{Exporting and converting to other formats}) and specify your
10873preferred output format by customizing the variable
10874@code{org-export-odt-preferred-output-format}. This way, the export commands
10875(@pxref{x-export-to-odt,,Exporting to ODT}) can be extended to also export to
10876the preferred format.
10877
10878@node Applying custom styles, Links in @acronym{ODT} export, @acronym{ODT} export commands, OpenDocument Text export
10879@subsection Applying custom styles
10720@cindex styles, custom 10880@cindex styles, custom
10721@cindex template, custom 10881@cindex template, custom
10722 10882
10723@vindex org-export-odt-styles-file 10883The @acronym{ODT} exporter ships with a set of OpenDocument styles
10884(@pxref{Working with OpenDocument style files}) that ensure a well-formatted
10885output. These factory styles, however, may not cater to your specific
10886tastes. To customize the output, you can either modify the above styles
10887files directly, or generate the required styles using an application like
10888LibreOffice. The latter method is suitable for expert and non-expert
10889users alike, and is described here.
10724 10890
10725OpenDocumentExporter ships with a custom @file{styles.xml} for formatting of 10891@subsubsection Applying custom styles - the easy way
10726the exported file. To customize the output to suit your needs you can use
10727one of the following methods:
10728 10892
10729@enumerate 10893@enumerate
10730@item 10894@item
10731Customize the variable @code{org-export-odt-styles-file} to point to either a 10895Create a sample @file{example.org} file with the below settings and export it
10732@file{styles.xml} file, a OpenDocument Text Template file @code{.ott} or a 10896to @acronym{ODT} format.
10733combination of Text or Template Document together with a set of member files. 10897
10734Use the first two options if the styles.xml has no references to additional 10898@example
10735set of files and use the last option if the @file{styles.xml} references 10899#+OPTIONS: H:10 num:t
10736additional files like header and footer images. 10900@end example
10901
10902@item
10903Open the above @file{example.odt} using LibreOffice. Use the @file{Stylist}
10904to locate the target styles - these typically have the @samp{Org} prefix -
10905and modify those to your taste. Save the modified file either as an
10906OpenDocument Text (@file{.odt}) or OpenDocument Template (@file{.ott}) file.
10907
10737@item 10908@item
10738Use an external tool like unoconv to apply custom templates. 10909@cindex #+ODT_STYLES_FILE
10910@vindex org-export-odt-styles-file
10911Customize the variable @code{org-export-odt-styles-file} and point it to the
10912newly created file. For additional configuration options
10913@pxref{x-overriding-factory-styles,,Overriding factory styles}.
10914
10915If you would like to choose a style on a per-file basis, you can use the
10916@code{#+ODT_STYLES_FILE} option. A typical setting will look like
10917
10918@example
10919#+ODT_STYLES_FILE: "/path/to/example.ott"
10920@end example
10921
10922or
10923
10924@example
10925#+ODT_STYLES_FILE: ("/path/to/file.ott" ("styles.xml" "image/hdr.png"))
10926@end example
10927
10739@end enumerate 10928@end enumerate
10740 10929
10741For best results, it is necessary that the style names used by 10930@subsubsection Using third-party styles and templates
10742OpenDocumentText exporter match that used in the @file{styles.xml}. 10931
10932You can use third-party styles and templates for customizing your output.
10933This will produce the desired output only if the template provides all
10934style names that the @samp{ODT} exporter relies on. Unless this condition is
10935met, the output is going to be less than satisfactory. So it is highly
10936recommended that you only work with templates that are directly derived from
10937the factory settings.
10938
10939@node Links in @acronym{ODT} export, Tables in @acronym{ODT} export, Applying custom styles, OpenDocument Text export
10940@subsection Links in @acronym{ODT} export
10941@cindex tables, in DocBook export
10942
10943The @acronym{ODT} exporter creates cross-references (aka bookmarks) for
10944internal links. It creates Internet-style links for all other links.
10945
10946@node Tables in @acronym{ODT} export, Images in @acronym{ODT} export, Links in @acronym{ODT} export, OpenDocument Text export
10947@subsection Tables in @acronym{ODT} export
10948@cindex tables, in DocBook export
10743 10949
10744@node Converting to Other formats, Links in OpenDocumentText export, Applying Custom Styles, OpenDocumentText export 10950Export of native Org mode tables (@pxref{Tables}) and simple @file{table.el}
10745@subsection Converting to Other formats 10951tables is supported. However, export of complex @file{table.el} tables -
10952tables that have column or row spans - is not supported. Such tables are
10953stripped from the exported document.
10746 10954
10955By default, a table is exported with top and bottom frames and with
10956rules separating row and column groups (@pxref{Column groups}). If the table
10957specifies alignment and relative width for its columns (@pxref{Column width
10958and alignment}) then these are honored on export.@footnote{The column widths
10959are interpreted as weighted ratios with the default weight being 1}
10960
10961@cindex #+ATTR_ODT
10962If you are not satisfied with the default formatting of tables, you can
10963create custom table styles and associate them with a table using
10964the @code{#+ATTR_ODT} line. @xref{Customizing tables in @acronym{ODT} export}.
10965
10966@node Images in @acronym{ODT} export, Math formatting in @acronym{ODT} export, Tables in @acronym{ODT} export, OpenDocument Text export
10967@subsection Images in @acronym{ODT} export
10968@cindex images, embedding in @acronym{ODT}
10969@cindex embedding images in @acronym{ODT}
10970
10971@subsubheading Embedding images
10972You can embed images within the exported document by providing a link to the
10973desired image file with no link description. For example, to embed
10974@samp{img.png} do either of the following:
10975
10976@example
10977[[file:img.png]]
10978@end example
10979
10980@example
10981[[./img.png]]
10982@end example
10983
10984@subsubheading Embedding clickable images
10985You can create clickable images by providing a link whose description is a
10986link to an image file. For example, to embed a image
10987@file{org-mode-unicorn.png} which when clicked jumps to
10988@uref{http://Orgmode.org} website, do the following
10989
10990@example
10991[[http://orgmode.org][./org-mode-unicorn.png]]
10992@end example
10993
10994@subsubheading Sizing and scaling of embedded images
10995
10996You can control the size and scale of the embedded images using the
10997@code{#+ATTR_ODT} attribute.
10998
10999@vindex org-export-odt-pixels-per-inch
11000Note that the exporter specifies the desired size of the image in the final
11001document in units of centimetres. In order to scale the embedded images, the
11002exporter needs to compute the size of the image. This is done by retrieving
11003the image size in pixels and converting the pixel units to centimetres using
11004@code{org-export-odt-pixels-per-inch}. The default value of this variable is
11005set to @code{display-pixels-per-inch}. You can tweak this variable to
11006achieve the best results.
11007
11008The examples below illustrate the various possibilities.
11009
11010@table @asis
11011
11012@item Explicitly size the image
11013To embed @file{img.png} as a 10 cm x 10 cm image, do the following:
11014
11015@example
11016#+ATTR_ODT: :width 10 :height 10
11017[[./img.png]]
11018@end example
11019
11020@item Scale the image
11021To embed @file{img.png} at half its size, do the following:
11022
11023@example
11024#+ATTR_ODT: :scale 0.5
11025[[./img.png]]
11026@end example
11027
11028@item Scale the image to a specific width
11029To embed @file{img.png} with a width of 10 cm while retaining the original
11030height:width ratio, do the following:
11031
11032@example
11033#+ATTR_ODT: :width 10
11034[[./img.png]]
11035@end example
11036
11037@item Scale the image to a specific height
11038To embed @file{img.png} with a height of 10 cm while retaining the original
11039height:width ratio, do the following
11040
11041@example
11042#+ATTR_ODT: :height 10
11043[[./img.png]]
11044@end example
11045@end table
11046
11047@node Math formatting in @acronym{ODT} export, Literal examples in @acronym{ODT} export, Images in @acronym{ODT} export, OpenDocument Text export
11048@subsection Math formatting in @acronym{ODT} export
11049
11050The @acronym{ODT} exporter has special support for handling math.
11051
11052@menu
11053* Working with @LaTeX{} math snippets:: How to embed @LaTeX{} math fragments
11054* Working with MathML or OpenDocument formula files:: How to embed equations in native format
11055@end menu
11056
11057@node Working with @LaTeX{} math snippets, Working with MathML or OpenDocument formula files, Math formatting in @acronym{ODT} export, Math formatting in @acronym{ODT} export
11058@subsubsection Working with @LaTeX{} math snippets
11059
11060@LaTeX{} math snippets (@pxref{@LaTeX{} fragments}) can be embedded in the ODT
11061document in one of the following ways:
11062
11063@cindex MathML
11064@enumerate
11065@item MathML
11066
11067This option is activated on a per-file basis with
11068
11069@example
11070#+OPTIONS: LaTeX:t
11071@end example
11072
11073With this option, @LaTeX{} fragments are first converted into MathML
11074fragments using an external @LaTeX{}-to-MathML converter program. The
11075resulting MathML fragments are then embedded as an OpenDocument Formula in
11076the exported document.
11077
11078@vindex org-latex-to-mathml-convert-command
11079@vindex org-latex-to-mathml-jar-file
11080
11081You can specify the @LaTeX{}-to-MathML converter by customizing the variables
11082@code{org-latex-to-mathml-convert-command} and
11083@code{org-latex-to-mathml-jar-file}.
11084
11085If you prefer to use @file{MathToWeb}@footnote{See
11086@uref{http://www.mathtoweb.com/cgi-bin/mathtoweb_home.pl, MathToWeb}} as your
11087converter, you can configure the above variables as shown below.
11088
11089@lisp
11090(setq org-latex-to-mathml-convert-command
11091 "java -jar %j -unicode -force -df %o %I"
11092 org-latex-to-mathml-jar-file
11093 "/path/to/mathtoweb.jar")
11094@end lisp
11095
11096You can use the following commands to quickly verify the reliability of
11097the @LaTeX{}-to-MathML converter.
11098
11099@table @kbd
11100
11101@item M-x org-export-as-odf
11102Convert a @LaTeX{} math snippet to OpenDocument formula (@file{.odf}) file.
11103
11104@item M-x org-export-as-odf-and-open
11105Convert a @LaTeX{} math snippet to OpenDocument formula (@file{.odf}) file and
11106open the formula file with the system-registered application.
11107@end table
11108
11109@cindex dvipng
11110@item PNG images
11111
11112This option is activated on a per-file basis with
11113
11114@example
11115#+OPTIONS: LaTeX:dvipng
11116@end example
11117
11118With this option, @LaTeX{} fragments are processed into PNG images and the
11119resulting images are embedded in the exported document. This method requires
11120that the @file{dvipng} program be available on your system.
11121@end enumerate
11122
11123@node Working with MathML or OpenDocument formula files, , Working with @LaTeX{} math snippets, Math formatting in @acronym{ODT} export
11124@subsubsection Working with MathML or OpenDocument formula files
11125
11126For various reasons, you may find embedding @LaTeX{} math snippets in an
11127@acronym{ODT} document less than reliable. In that case, you can embed a
11128math equation by linking to its MathML(@file{.mml}) source or its
11129OpenDocument formula (@file{.odf}) file as shown below:
11130
11131@example
11132[[./equation.mml]]
11133@end example
11134
11135or
11136
11137@example
11138[[./equation.odf]]
11139@end example
11140
11141@node Literal examples in @acronym{ODT} export, Advanced topics in @acronym{ODT} export, Math formatting in @acronym{ODT} export, OpenDocument Text export
11142@subsection Literal examples in @acronym{ODT} export
11143
11144Export of literal examples (@pxref{Literal examples}) with full fontification
11145is supported. This feature is enabled by default and is activated
11146automatically if an enhanced version of @file{htmlfontify.el} is available in
11147the @code{load-path}.@footnote{The @file{htmlfontify.el} that ships with
11148standard Emacs <= 24.1 has no support for @acronym{ODT} fontification. A
11149copy of the proposed version is available as an attachment to
11150@url{http://debbugs.gnu.org/cgi/bugreport.cgi?msg=5;filename=htmlfontify.el;att=9;bug=9914,
11151Emacs Bug #9914}.}
11152
11153@vindex org-export-odt-fontify-srcblocks
11154
11155The character styles used for fontification of the literal blocks are
11156auto-generated by the exporter in conjunction with @file{htmlfontify.el}
11157library and need not be included in the default @file{styles.xml} file.
11158These auto-generated styles have the @samp{OrgSrc} prefix and inherit their color
11159based on the face used by Emacs @code{font-lock} library.
11160
11161@vindex org-export-odt-create-custom-styles-for-srcblocks
11162If you prefer to use your own custom styles for fontification and disable
11163their auto-generation altogether, you can do so by customizing the variable
11164@code{org-export-odt-create-custom-styles-for-srcblocks}.
11165
11166You can turn off fontification support for literal examples by customizing
11167the variable @code{org-export-odt-fontify-srcblocks}.
11168
11169
11170@node Advanced topics in @acronym{ODT} export, , Literal examples in @acronym{ODT} export, OpenDocument Text export
11171@subsection Advanced topics in @acronym{ODT} export
11172
11173If you rely heavily on @acronym{ODT} export, you may want to exploit the full
11174set of features that the exporter offers. This section describes features
11175that would be of interest to power users.
11176
11177@menu
11178* Exporting and converting to other formats:: How to produce @samp{pdf} and other formats
11179* Working with OpenDocument style files:: Explore the internals
11180* Creating one-off styles:: How to produce custom highlighting etc
11181* Customizing tables in @acronym{ODT} export:: How to define and use Table templates
11182* Validating OpenDocument XML:: How to debug corrupt OpenDocument files
11183@end menu
11184
11185@node Exporting and converting to other formats, Working with OpenDocument style files, Advanced topics in @acronym{ODT} export, Advanced topics in @acronym{ODT} export
11186@subsubsection Exporting and converting to other formats
10747@cindex convert 11187@cindex convert
10748@cindex doc, docx 11188@cindex doc, docx
10749 11189
10750@vindex org-export-odt-styles-file 11190The @acronym{ODT} exporter adds support for exporting Org outlines to formats
10751 11191that are not supported natively by Org. It also adds support to convert
10752Often times there is a need to convert OpenDocumentText files to other 11192document from one format to another. To use these features, you need to
10753formats like doc, docx or pdf. You can accomplish this by one of the 11193configure a command-line converter. Once a command-line converter is
10754following methods: 11194configured you can use it to extend the list of formats to which Org can
11195export. @xref{x-export-to-other-formats,,Automatically exporting to other
11196formats}. You can also use it to perform one-off document conversion as
11197detailed below.
10755 11198
11199@vindex org-export-odt-convert
10756@table @kbd 11200@table @kbd
10757@item M-x org-lparse
10758Export the outline first to one of the native formats (like OpenDocumentText)
10759and immediately post-process it to other formats using an external converter.
10760 11201
10761@item M-x org-lparse-convert 11202@item M-x org-export-odt-convert
10762Export an existing document to other formats using an external converter. 11203Convert an existing document from one format to another as determined by the
11204variable @code{org-export-odt-convert-capabilities}
11205(@pxref{x-odt-converter-capabilities,,Configure converter
11206capabilities}). @strong{Please note} that you can use this command to even
11207convert documents that are produced outside of Org and in other formats than
11208@acronym{ODT} format.
10763@end table 11209@end table
10764 11210
10765You can choose the converter used for conversion by customizing the variable 11211@subsubheading Pre-configured converters
10766@code{org-lparse-convert-process}.
10767 11212
10768@node Links in OpenDocumentText export, Tables in OpenDocumentText export, Converting to Other formats, OpenDocumentText export 11213@cindex converter
10769@subsection Links in OpenDocumentText export 11214The @acronym{ODT} exporter supports two converters out of the box:
10770@cindex tables, in DocBook export
10771 11215
10772OpenDocumentExporter creates cross-references (aka bookmarks) for links that 11216@enumerate
10773are destined locally. It creates internet style links for all other links.
10774 11217
10775@node Tables in OpenDocumentText export, Images in OpenDocumentText export, Links in OpenDocumentText export, OpenDocumentText export 11218@cindex @file{unoconv}
10776@subsection Tables in OpenDocumentText export 11219@item @file{unoconv}
10777@cindex tables, in DocBook export
10778 11220
10779Export of @file{table.el} tables with row or column spanning is not 11221This converter is available as an installable package in your favorite
10780supported. Such tables are stripped from the exported document. 11222distribution.
10781 11223
10782@node Images in OpenDocumentText export, Additional Documentation, Tables in OpenDocumentText export, OpenDocumentText export 11224@cindex @file{BasicODConverter}
10783@subsection Images in OpenDocumentText export 11225@item @file{BasicODConverter}
10784@cindex images, embedding in OpenDocumentText
10785@cindex embedding images in OpenDocumentText
10786 11226
10787OpenDocumentText exporter can embed images within the exported document. To 11227@vindex org-odt-data-dir
10788embed images, provide a link to the desired image file with no link 11228This converter is distributed as a LibreOffice extension and can be found in
10789description. For example, the following links @samp{[[file:img.jpg]]} or 11229your Org distribution. See the subdirectory pointed to by the variable
10790@samp{[[./img.jpg]]}, will result in embedding of @samp{img.jpg} in the 11230@code{org-odt-data-dir}.
10791exported file.
10792 11231
10793The exporter can also embed scaled and explicitly sized images within the 11232@end enumerate
10794exported document. The markup of the scale and size specifications has not 11233
10795been standardized yet and is hence conveniently skipped in this document. 11234@subsubheading Installing a new converter
11235If you prefer to use a converter other than the two mentioned above, then you
11236may have to do additional configuration. You can proceed as follows:
11237
11238@enumerate
11239@item Register the converter
11240
11241@vindex org-export-odt-convert-processes
11242Name your converter and add it to the list of known converters by customizing
11243the variable @code{org-export-odt-convert-processes}. Also specify how the
11244converter can be invoked via command-line to effect the conversion.
11245
11246@item Configure its capabilities
11247@vindex org-export-odt-convert-capabilities
10796 11248
10797The exporter can also make an image the clickable part of a link. To create 11249@anchor{x-odt-converter-capabilities}
10798clickable images, provide a link whose description is a link to an image
10799file. For example, the following link
10800@samp{[[http://orgmode.org][./img.jpg]]}, will result in a clickable image
10801that links to @uref{http://Orgmode.org} website.
10802 11250
10803@node Additional Documentation, , Images in OpenDocumentText export, OpenDocumentText export 11251Specify the set of formats the converter can handle by customizing the
10804@subsection Additional documentation 11252variable @code{org-export-odt-convert-capabilities}. Use the default value
11253for this variable as a guide for configuring your converter. As suggested by
11254the default setting, you can specify the full set of formats supported by the
11255converter and not limit yourself to specifying formats that are related to
11256just the OpenDocument Text format.
11257
11258@item Choose the converter
11259
11260@vindex org-export-odt-convert-process
11261Select the newly added converter as the preferred one by customizing the
11262variable @code{org-export-odt-convert-process}.
11263@end enumerate
11264
11265@node Working with OpenDocument style files, Creating one-off styles, Exporting and converting to other formats, Advanced topics in @acronym{ODT} export
11266@subsubsection Working with OpenDocument style files
11267@cindex styles, custom
11268@cindex template, custom
10805 11269
10806The OpenDocumentText exporter is still in development. For up to date 11270This section explores the internals of the @acronym{ODT} exporter and the
10807information, please follow Org mailing list @email{emacs-orgmode@@gnu.org} 11271means by which it produces styled documents. Read this section if you are
10808closely. 11272interested in exploring the automatic and custom OpenDocument styles used by
11273the exporter.
11274
11275@anchor{x-factory-styles}
11276@subsubheading Factory styles
11277
11278The @acronym{ODT} exporter relies on two files for generating its output.
11279These files are bundled with the distribution under the directory pointed to
11280by the variable @code{org-odt-styles-dir}. The two files are:
11281
11282@itemize
11283@anchor{x-orgodtstyles-xml}
11284@item
11285@file{OrgOdtStyles.xml}
11286
11287This file contributes to the @file{styles.xml} file of the final @samp{ODT}
11288document. This file gets modified for the following purposes:
11289@enumerate
11290
11291@item
11292To control outline numbering based on user settings.
11293
11294@item
11295To add styles generated by @file{htmlfontify.el} for fontification of code
11296blocks.
11297@end enumerate
11298
11299@anchor{x-orgodtcontenttemplate-xml}
11300@item
11301@file{OrgOdtContentTemplate.xml}
11302
11303This file contributes to the @file{content.xml} file of the final @samp{ODT}
11304document. The contents of the Org outline are inserted between the
11305@samp{<office:text>}@dots{}@samp{</office:text>} elements of this file.
11306
11307Apart from serving as a template file for the final @file{content.xml}, the
11308file serves the following purposes:
11309@enumerate
11310
11311@item
11312It contains automatic styles for formatting of tables which are referenced by
11313the exporter.
11314
11315@item
11316It contains @samp{<text:sequence-decl>}@dots{}@samp{</text:sequence-decl>}
11317elements that control how various entities - tables, images, equations etc -
11318are numbered.
11319@end enumerate
11320@end itemize
11321
11322@anchor{x-overriding-factory-styles}
11323@subsubheading Overriding factory styles
11324The following two variables control the location from which the @acronym{ODT}
11325exporter picks up the custom styles and content template files. You can
11326customize these variables to override the factory styles used by the
11327exporter.
11328
11329@itemize
11330@anchor{x-org-export-odt-styles-file}
11331@item
11332@code{org-export-odt-styles-file}
11333
11334Use this variable to specify the @file{styles.xml} that will be used in the
11335final output. You can specify one of the following values:
11336
11337@enumerate
11338@item A @file{styles.xml} file
11339
11340Use this file instead of the default @file{styles.xml}
11341
11342@item A @file{.odt} or @file{.ott} file
11343
11344Use the @file{styles.xml} contained in the specified OpenDocument Text or
11345Template file
11346
11347@item A @file{.odt} or @file{.ott} file and a subset of files contained within them
11348
11349Use the @file{styles.xml} contained in the specified OpenDocument Text or
11350Template file. Additionally extract the specified member files and embed
11351those within the final @samp{ODT} document.
11352
11353Use this option if the @file{styles.xml} file references additional files
11354like header and footer images.
11355
11356@item @code{nil}
11357
11358Use the default @file{styles.xml}
11359@end enumerate
11360
11361@anchor{x-org-export-odt-content-template-file}
11362@item
11363@code{org-export-odt-content-template-file}
11364
11365Use this variable to specify the blank @file{content.xml} that will be used
11366in the final output.
11367@end itemize
11368
11369@node Creating one-off styles, Customizing tables in @acronym{ODT} export, Working with OpenDocument style files, Advanced topics in @acronym{ODT} export
11370@subsubsection Creating one-off styles
11371
11372There are times when you would want one-off formatting in the exported
11373document. You can achieve this by embedding raw OpenDocument XML in the Org
11374file. The use of this feature is better illustrated with couple of examples.
11375
11376@enumerate
11377@item Embedding ODT tags as part of regular text
11378
11379You can include simple OpenDocument tags by prefixing them with
11380@samp{@@}. For example, to highlight a region of text do the following:
11381
11382@example
11383@@<text:span text:style-name="Highlight">This is a
11384highlighted text@@</text:span>. But this is a
11385regular text.
11386@end example
11387
11388@strong{Hint:} To see the above example in action, edit your
11389@file{styles.xml}(@pxref{x-orgodtstyles-xml,,Factory styles}) and add a
11390custom @samp{Highlight} style as shown below.
11391
11392@example
11393<style:style style:name="Highlight" style:family="text">
11394 <style:text-properties fo:background-color="#ff0000"/>
11395</style:style>
11396@end example
11397
11398@item Embedding a one-line OpenDocument XML
11399
11400You can add a simple OpenDocument one-liner using the @code{#+ODT:}
11401directive. For example, to force a page break do the following:
11402
11403@example
11404#+ODT: <text:p text:style-name="PageBreak"/>
11405@end example
11406
11407@strong{Hint:} To see the above example in action, edit your
11408@file{styles.xml}(@pxref{x-orgodtstyles-xml,,Factory styles}) and add a
11409custom @samp{PageBreak} style as shown below.
11410
11411@example
11412<style:style style:name="PageBreak" style:family="paragraph"
11413 style:parent-style-name="Text_20_body">
11414 <style:paragraph-properties fo:break-before="page"/>
11415</style:style>
11416@end example
11417
11418@item Embedding a block of OpenDocument XML
11419
11420You can add a large block of OpenDocument XML using the
11421@code{#+BEGIN_ODT}@dots{}@code{#+END_ODT} construct.
11422
11423For example, to create a one-off paragraph that uses bold text, do the
11424following:
11425
11426@example
11427#+BEGIN_ODT
11428<text:p text:style-name="Text_20_body_20_bold">
11429This paragraph is specially formatted and uses bold text.
11430</text:p>
11431#+END_ODT
11432@end example
11433
11434@end enumerate
11435
11436@node Customizing tables in @acronym{ODT} export, Validating OpenDocument XML, Creating one-off styles, Advanced topics in @acronym{ODT} export
11437@subsubsection Customizing tables in @acronym{ODT} export
11438@cindex tables, in ODT export
11439
11440@cindex #+ATTR_ODT
11441You can override the default formatting of the table by specifying a custom
11442table style with the @code{#+ATTR_ODT} line. For a discussion on default
11443formatting of tables @pxref{Tables in @acronym{ODT} export}.
11444
11445This feature closely mimics the way table templates are defined in the
11446OpenDocument-v1.2
11447specification.@footnote{@url{http://docs.oasis-open.org/office/v1.2/OpenDocument-v1.2.html,
11448OpenDocument-v1.2 Specification}}
11449
11450
11451
11452@subsubheading Custom table styles - an illustration
11453
11454To have a quick preview of this feature, install the below setting and export
11455the table that follows.
11456
11457@lisp
11458(setq org-export-odt-table-styles
11459 (append org-export-odt-table-styles
11460 '(("TableWithHeaderRowAndColumn" "Custom"
11461 ((use-first-row-styles . t)
11462 (use-first-column-styles . t)))
11463 ("TableWithFirstRowandLastRow" "Custom"
11464 ((use-first-row-styles . t)
11465 (use-last-row-styles . t))))))
11466@end lisp
11467
11468@example
11469#+ATTR_ODT: TableWithHeaderRowAndColumn
11470| Name | Phone | Age |
11471| Peter | 1234 | 17 |
11472| Anna | 4321 | 25 |
11473@end example
11474
11475In the above example, you used a template named @samp{Custom} and installed
11476two table styles with the names @samp{TableWithHeaderRowAndColumn} and
11477@samp{TableWithFirstRowandLastRow}. (@strong{Important:} The OpenDocument
11478styles needed for producing the above template have been pre-defined for you.
11479These styles are available under the section marked @samp{Custom Table
11480Template} in @file{OrgOdtContentTemplate.xml}
11481(@pxref{x-orgodtcontenttemplate-xml,,Factory styles}). If you need
11482additional templates you have to define these styles yourselves.
11483
11484@subsubheading Custom table styles - the nitty-gritty
11485To use this feature proceed as follows:
11486
11487@enumerate
11488@item
11489Create a table template@footnote{See the @code{<table:table-template>}
11490element of the OpenDocument-v1.2 specification}
11491
11492A table template is nothing but a set of @samp{table-cell} and
11493@samp{paragraph} styles for each of the following table cell categories:
11494
11495@itemize @minus
11496@item Body
11497@item First column
11498@item Last column
11499@item First row
11500@item Last row
11501@item Even row
11502@item Odd row
11503@item Even column
11504@item Odd Column
11505@end itemize
11506
11507The names for the above styles must be chosen based on the name of the table
11508template using a well-defined convention.
11509
11510The naming convention is better illustrated with an example. For a table
11511template with the name @samp{Custom}, the needed style names are listed in
11512the following table.
11513
11514@multitable {Table cell type} {CustomEvenColumnTableCell} {CustomEvenColumnTableParagraph}
11515@headitem Table cell type
11516@tab @code{table-cell} style
11517@tab @code{paragraph} style
11518@item
11519@tab
11520@tab
11521@item Body
11522@tab @samp{CustomTableCell}
11523@tab @samp{CustomTableParagraph}
11524@item First column
11525@tab @samp{CustomFirstColumnTableCell}
11526@tab @samp{CustomFirstColumnTableParagraph}
11527@item Last column
11528@tab @samp{CustomLastColumnTableCell}
11529@tab @samp{CustomLastColumnTableParagraph}
11530@item First row
11531@tab @samp{CustomFirstRowTableCell}
11532@tab @samp{CustomFirstRowTableParagraph}
11533@item Last row
11534@tab @samp{CustomLastRowTableCell}
11535@tab @samp{CustomLastRowTableParagraph}
11536@item Even row
11537@tab @samp{CustomEvenRowTableCell}
11538@tab @samp{CustomEvenRowTableParagraph}
11539@item Odd row
11540@tab @samp{CustomOddRowTableCell}
11541@tab @samp{CustomOddRowTableParagraph}
11542@item Even column
11543@tab @samp{CustomEvenColumnTableCell}
11544@tab @samp{CustomEvenColumnTableParagraph}
11545@item Odd column
11546@tab @samp{CustomOddColumnTableCell}
11547@tab @samp{CustomOddColumnTableParagraph}
11548@end multitable
11549
11550To create a table template with the name @samp{Custom}, define the above
11551styles in the
11552@code{<office:automatic-styles>}...@code{</office:automatic-styles>} element
11553of the content template file (@pxref{x-orgodtcontenttemplate-xml,,Factory
11554styles}).
11555
11556@item
11557Define a table style@footnote{See the attributes @code{table:template-name},
11558@code{table:use-first-row-styles}, @code{table:use-last-row-styles},
11559@code{table:use-first-column-styles}, @code{table:use-last-column-styles},
11560@code{table:use-banding-rows-styles}, and
11561@code{table:use-banding-column-styles} of the @code{<table:table>} element in
11562the OpenDocument-v1.2 specification}
11563
11564@vindex org-export-odt-table-styles
11565To define a table style, create an entry for the style in the variable
11566@code{org-export-odt-table-styles} and specify the following:
11567
11568@itemize @minus
11569@item the name of the table template created in step (1)
11570@item the set of cell styles in that template that are to be activated
11571@end itemize
11572
11573For example, the entry below defines two different table styles
11574@samp{TableWithHeaderRowsAndColumns} and @samp{TableWithHeaderColumns} based
11575on the same template @samp{Custom}. The styles achieve their intended effect
11576by selectively activating the individual cell styles in that template.
11577
11578@lisp
11579(setq org-export-odt-table-styles
11580 (append org-export-odt-table-styles
11581 '(("TableWithHeaderRowAndColumn" "Custom"
11582 ((use-first-row-styles . t)
11583 (use-first-column-styles . t)))
11584 ("TableWithFirstRowandLastRow" "Custom"
11585 ((use-first-row-styles . t)
11586 (use-last-row-styles . t))))))
11587@end lisp
11588
11589@item
11590Associate a table with the table style
11591
11592To do this, specify the table style created in step (2) as part of
11593the @code{ATTR_ODT} line as shown below.
11594
11595@example
11596#+ATTR_ODT: TableWithHeaderRowAndColumn
11597| Name | Phone | Age |
11598| Peter | 1234 | 17 |
11599| Anna | 4321 | 25 |
11600@end example
11601@end enumerate
11602
11603@node Validating OpenDocument XML, , Customizing tables in @acronym{ODT} export, Advanced topics in @acronym{ODT} export
11604@subsubsection Validating OpenDocument XML
11605
11606Occasionally, you will discover that the document created by the
11607@acronym{ODT} exporter cannot be opened by your favorite application. One of
11608the common reasons for this is that the @file{.odt} file is corrupt. In such
11609cases, you may want to validate the document against the OpenDocument RELAX
11610NG Compact Syntax (RNC) schema.
11611
11612For de-compressing the @file{.odt} file@footnote{@file{.odt} files are
11613nothing but @samp{zip} archives}: @inforef{File Archives,,emacs}. For
11614general help with validation (and schema-sensitive editing) of XML files:
11615@inforef{Introduction,,nxml-mode}.
11616
11617@vindex org-export-odt-schema-dir
11618If you have ready access to OpenDocument @file{.rnc} files and the needed
11619schema-locating rules in a single folder, you can customize the variable
11620@code{org-export-odt-schema-dir} to point to that directory. The
11621@acronym{ODT} exporter will take care of updating the
11622@code{rng-schema-locating-files} for you.
10809 11623
10810@c end opendocument 11624@c end opendocument
10811 11625
10812@node TaskJuggler export, Freemind export, OpenDocumentText export, Exporting 11626@node TaskJuggler export, Freemind export, OpenDocument Text export, Exporting
10813@section TaskJuggler export 11627@section TaskJuggler export
10814@cindex TaskJuggler export 11628@cindex TaskJuggler export
10815@cindex Project management 11629@cindex Project management
@@ -10820,7 +11634,7 @@ resource assignments based on the project outline and the constraints that
10820you have provided. 11634you have provided.
10821 11635
10822The TaskJuggler exporter is a bit different from other exporters, such as the 11636The TaskJuggler exporter is a bit different from other exporters, such as the
10823HTML and LaTeX exporters for example, in that it does not export all the 11637@code{HTML} and @LaTeX{} exporters for example, in that it does not export all the
10824nodes of a document or strictly follow the order of the nodes in the 11638nodes of a document or strictly follow the order of the nodes in the
10825document. 11639document.
10826 11640
@@ -10842,7 +11656,7 @@ Export as TaskJuggler file and then open the file with TaskJugglerUI.
10842@subsection Tasks 11656@subsection Tasks
10843 11657
10844@vindex org-export-taskjuggler-project-tag 11658@vindex org-export-taskjuggler-project-tag
10845Create your tasks as you usually do with Org-mode. Assign efforts to each 11659Create your tasks as you usually do with Org mode. Assign efforts to each
10846task using properties (it is easiest to do this in the column view). You 11660task using properties (it is easiest to do this in the column view). You
10847should end up with something similar to the example by Peter Jones in 11661should end up with something similar to the example by Peter Jones in
10848@url{http://www.contextualdevelopment.com/static/artifacts/articles/2008/project-planning/project-planning.org}. 11662@url{http://www.contextualdevelopment.com/static/artifacts/articles/2008/project-planning/project-planning.org}.
@@ -10954,9 +11768,9 @@ file will be @file{myfile.mm}.
10954@section XOXO export 11768@section XOXO export
10955@cindex XOXO export 11769@cindex XOXO export
10956 11770
10957Org-mode contains an exporter that produces XOXO-style output. 11771Org mode contains an exporter that produces XOXO-style output.
10958Currently, this exporter only handles the general outline structure and 11772Currently, this exporter only handles the general outline structure and
10959does not interpret any additional Org-mode features. 11773does not interpret any additional Org mode features.
10960 11774
10961@table @kbd 11775@table @kbd
10962@orgcmd{C-c C-e x,org-export-as-xoxo} 11776@orgcmd{C-c C-e x,org-export-as-xoxo}
@@ -10975,10 +11789,10 @@ Export only the visible part of the document.
10975@vindex org-icalendar-use-scheduled 11789@vindex org-icalendar-use-scheduled
10976@vindex org-icalendar-categories 11790@vindex org-icalendar-categories
10977@vindex org-icalendar-alarm-time 11791@vindex org-icalendar-alarm-time
10978Some people use Org-mode for keeping track of projects, but still prefer a 11792Some people use Org mode for keeping track of projects, but still prefer a
10979standard calendar application for anniversaries and appointments. In this 11793standard calendar application for anniversaries and appointments. In this
10980case it can be useful to show deadlines and other time-stamped items in Org 11794case it can be useful to show deadlines and other time-stamped items in Org
10981files in the calendar application. Org-mode can export calendar information 11795files in the calendar application. Org mode can export calendar information
10982in the standard iCalendar format. If you also want to have TODO entries 11796in the standard iCalendar format. If you also want to have TODO entries
10983included in the export, configure the variable 11797included in the export, configure the variable
10984@code{org-icalendar-include-todo}. Plain timestamps are exported as VEVENT, 11798@code{org-icalendar-include-todo}. Plain timestamps are exported as VEVENT,
@@ -11422,7 +12236,7 @@ Defaults to @code{nil}.
11422@subsection Generating an index 12236@subsection Generating an index
11423@cindex index, in a publishing project 12237@cindex index, in a publishing project
11424 12238
11425Org-mode can generate an index across the files of a publishing project. 12239Org mode can generate an index across the files of a publishing project.
11426 12240
11427@multitable @columnfractions 0.25 0.75 12241@multitable @columnfractions 0.25 0.75
11428@item @code{:makeindex} 12242@item @code{:makeindex}
@@ -11442,7 +12256,7 @@ a title, style information, etc.
11442 12256
11443For those people already utilizing third party sync tools such as 12257For those people already utilizing third party sync tools such as
11444@command{rsync} or @command{unison}, it might be preferable not to use the built in 12258@command{rsync} or @command{unison}, it might be preferable not to use the built in
11445@i{remote} publishing facilities of Org-mode which rely heavily on 12259@i{remote} publishing facilities of Org mode which rely heavily on
11446Tramp. Tramp, while very useful and powerful, tends not to be 12260Tramp. Tramp, while very useful and powerful, tends not to be
11447so efficient for multiple file transfer and has been known to cause problems 12261so efficient for multiple file transfer and has been known to cause problems
11448under heavy usage. 12262under heavy usage.
@@ -11581,7 +12395,7 @@ This may be necessary in particular if files include other files via
11581@cindex Davison, Dan 12395@cindex Davison, Dan
11582@cindex source code, working with 12396@cindex source code, working with
11583 12397
11584Source code can be included in Org-mode documents using a @samp{src} block, 12398Source code can be included in Org mode documents using a @samp{src} block,
11585e.g.@: 12399e.g.@:
11586 12400
11587@example 12401@example
@@ -11592,26 +12406,26 @@ e.g.@:
11592#+END_SRC 12406#+END_SRC
11593@end example 12407@end example
11594 12408
11595Org-mode provides a number of features for working with live source code, 12409Org mode provides a number of features for working with live source code,
11596including editing of code blocks in their native major-mode, evaluation of 12410including editing of code blocks in their native major-mode, evaluation of
11597code blocks, converting code blocks into source files (known as @dfn{tangling} 12411code blocks, converting code blocks into source files (known as @dfn{tangling}
11598in literate programming), and exporting code blocks and their 12412in literate programming), and exporting code blocks and their
11599results in several formats. This functionality was contributed by Eric 12413results in several formats. This functionality was contributed by Eric
11600Schulte and Dan Davison, and was originally named Org-babel. 12414Schulte and Dan Davison, and was originally named Org-babel.
11601 12415
11602The following sections describe Org-mode's code block handling facilities. 12416The following sections describe Org mode's code block handling facilities.
11603 12417
11604@menu 12418@menu
11605* Structure of code blocks:: Code block syntax described 12419* Structure of code blocks:: Code block syntax described
11606* Editing source code:: Language major-mode editing 12420* Editing source code:: Language major-mode editing
11607* Exporting code blocks:: Export contents and/or results 12421* Exporting code blocks:: Export contents and/or results
11608* Extracting source code:: Create pure source code files 12422* Extracting source code:: Create pure source code files
11609* Evaluating code blocks:: Place results of evaluation in the Org-mode buffer 12423* Evaluating code blocks:: Place results of evaluation in the Org mode buffer
11610* Library of Babel:: Use and contribute to a library of useful code blocks 12424* Library of Babel:: Use and contribute to a library of useful code blocks
11611* Languages:: List of supported code block languages 12425* Languages:: List of supported code block languages
11612* Header arguments:: Configure code block functionality 12426* Header arguments:: Configure code block functionality
11613* Results of evaluation:: How evaluation results are handled 12427* Results of evaluation:: How evaluation results are handled
11614* Noweb reference syntax:: Literate programming in Org-mode 12428* Noweb reference syntax:: Literate programming in Org mode
11615* Key bindings and useful functions:: Work quickly with code blocks 12429* Key bindings and useful functions:: Work quickly with code blocks
11616* Batch execution:: Call functions from the command line 12430* Batch execution:: Call functions from the command line
11617@end menu 12431@end menu
@@ -11623,18 +12437,26 @@ The following sections describe Org-mode's code block handling facilities.
11623@section Structure of code blocks 12437@section Structure of code blocks
11624@cindex code block, structure 12438@cindex code block, structure
11625@cindex source code, block structure 12439@cindex source code, block structure
12440@cindex #+NAME
12441@cindex #+BEGIN_SRC
11626 12442
11627The structure of code blocks is as follows: 12443Live code blocks can be specified with a @samp{src} block or
12444inline.@footnote{Note that @samp{src} blocks may be inserted using Org mode's
12445@ref{Easy Templates} system} The structure of a @samp{src} block is
11628 12446
11629@example 12447@example
11630#+srcname: <name> 12448#+NAME: <name>
11631#+begin_src <language> <switches> <header arguments> 12449#+BEGIN_SRC <language> <switches> <header arguments>
11632 <body> 12450 <body>
11633#+end_src 12451#+END_SRC
11634@end example 12452@end example
11635 12453
11636Switches and header arguments are optional. Code can also be embedded in text 12454The @code{#+NAME:} line is optional, and can be used to name the code
11637inline using 12455block. Live code blocks require that a language be specified on the
12456@code{#+BEGIN_SRC} line. Switches and header arguments are optional.
12457@cindex source code, inline
12458
12459Live code blocks can also be specified inline using
11638 12460
11639@example 12461@example
11640src_<language>@{<body>@} 12462src_<language>@{<body>@}
@@ -11647,26 +12469,30 @@ src_<language>[<header arguments>]@{<body>@}
11647@end example 12469@end example
11648 12470
11649@table @code 12471@table @code
11650@item <name> 12472@item <#+NAME: name>
11651This name is associated with the code block. This is similar to the 12473This line associates a name with the code block. This is similar to the
11652@samp{#+tblname} lines that can be used to name tables in Org-mode files. 12474@code{#+TBLNAME: NAME} lines that can be used to name tables in Org mode
11653Referencing the name of a code block makes it possible to evaluate the 12475files. Referencing the name of a code block makes it possible to evaluate
11654block from other places in the file, other files, or from Org-mode table 12476the block from other places in the file, from other files, or from Org mode
11655formulas (see @ref{The spreadsheet}). Names are assumed to be unique by 12477table formulas (see @ref{The spreadsheet}). Names are assumed to be unique
11656evaluation functions and the behavior of multiple blocks of the same name is 12478and the behavior of Org mode when two or more blocks share the same name is
11657undefined. 12479undefined.
12480@cindex #+NAME
11658@item <language> 12481@item <language>
11659The language of the code in the block. 12482The language of the code in the block (see @ref{Languages}).
12483@cindex source code, language
11660@item <switches> 12484@item <switches>
11661Optional switches controlling exportation of the code block (see switches discussion in 12485Optional switches control code block export (see the discussion of switches in
11662@ref{Literal examples}) 12486@ref{Literal examples})
12487@cindex source code, switches
11663@item <header arguments> 12488@item <header arguments>
11664Optional header arguments control many aspects of evaluation, export and 12489Optional header arguments control many aspects of evaluation, export and
11665tangling of code blocks. See the @ref{Header arguments}. 12490tangling of code blocks (see @ref{Header arguments}).
11666Header arguments can also be set on a per-buffer or per-subtree 12491Header arguments can also be set on a per-buffer or per-subtree
11667basis using properties. 12492basis using properties.
12493@item source code, header arguments
11668@item <body> 12494@item <body>
11669The source code. 12495Source code in the specified language.
11670@end table 12496@end table
11671 12497
11672@comment node-name, next, previous, up 12498@comment node-name, next, previous, up
@@ -11715,12 +12541,12 @@ variable @code{org-src-fontify-natively}.
11715@cindex code block, exporting 12541@cindex code block, exporting
11716@cindex source code, exporting 12542@cindex source code, exporting
11717 12543
11718It is possible to export the @emph{contents} of code blocks, the 12544It is possible to export the @emph{code} of code blocks, the @emph{results}
11719@emph{results} of code block evaluation, @emph{neither}, or @emph{both}. For 12545of code block evaluation, @emph{both} the code and the results of code block
11720most languages, the default exports the contents of code blocks. However, for 12546evaluation, or @emph{none}. For most languages, the default exports code.
11721some languages (e.g.@: @code{ditaa}) the default exports the results of code 12547However, for some languages (e.g.@: @code{ditaa}) the default exports the
11722block evaluation. For information on exporting code block bodies, see 12548results of code block evaluation. For information on exporting code block
11723@ref{Literal examples}. 12549bodies, see @ref{Literal examples}.
11724 12550
11725The @code{:exports} header argument can be used to specify export 12551The @code{:exports} header argument can be used to specify export
11726behavior: 12552behavior:
@@ -11732,7 +12558,7 @@ The default in most languages. The body of the code block is exported, as
11732described in @ref{Literal examples}. 12558described in @ref{Literal examples}.
11733@item :exports results 12559@item :exports results
11734The code block will be evaluated and the results will be placed in the 12560The code block will be evaluated and the results will be placed in the
11735Org-mode buffer for export, either updating previous results of the code 12561Org mode buffer for export, either updating previous results of the code
11736block located anywhere in the buffer or, if no previous results exist, 12562block located anywhere in the buffer or, if no previous results exist,
11737placing the results immediately after the code block. The body of the code 12563placing the results immediately after the code block. The body of the code
11738block will not be exported. 12564block will not be exported.
@@ -11745,8 +12571,8 @@ Neither the code block nor its results will be exported.
11745It is possible to inhibit the evaluation of code blocks during export. 12571It is possible to inhibit the evaluation of code blocks during export.
11746Setting the @code{org-export-babel-evaluate} variable to @code{nil} will 12572Setting the @code{org-export-babel-evaluate} variable to @code{nil} will
11747ensure that no code blocks are evaluated as part of the export process. This 12573ensure that no code blocks are evaluated as part of the export process. This
11748can be useful in situations where potentially untrusted Org-mode files are 12574can be useful in situations where potentially untrusted Org mode files are
11749exported in an automated fashion, for example when Org-mode is used as the 12575exported in an automated fashion, for example when Org mode is used as the
11750markup language for a wiki. 12576markup language for a wiki.
11751 12577
11752@comment node-name, next, previous, up 12578@comment node-name, next, previous, up
@@ -11798,14 +12624,15 @@ of tangled code files.
11798@cindex source code, evaluating 12624@cindex source code, evaluating
11799 12625
11800Code blocks can be evaluated@footnote{Whenever code is evaluated there is a 12626Code blocks can be evaluated@footnote{Whenever code is evaluated there is a
11801potential for that code to do harm. Org-mode provides a number of safeguards 12627potential for that code to do harm. Org mode provides safeguards to ensure
11802to ensure that it only evaluates code with explicit confirmation from the 12628that code is only evaluated after explicit confirmation from the user. For
11803user. For information on these safeguards (and on how to disable them) see 12629information on these safeguards (and on how to disable them) see @ref{Code
11804@ref{Code evaluation security}.} and the results placed in the Org-mode 12630evaluation security}.} and the results of evaluation optionally placed in the
11805buffer. By default, evaluation is only turned on for @code{emacs-lisp} code 12631Org mode buffer. By default, the evaluation facility is only enabled for
11806blocks, however support exists for evaluating blocks in many languages. See 12632Lisp code blocks specified as @code{emacs-lisp}. However, souce code blocks
11807@ref{Languages} for a list of supported languages. See @ref{Structure of 12633in many languages can be evaluated within Org mode (see @ref{Languages} for a
11808code blocks} for information on the syntax used to define a code block. 12634list of supported languages and @ref{Structure of code blocks} for
12635information on the syntax used to define a code block).
11809 12636
11810@kindex C-c C-c 12637@kindex C-c C-c
11811There are a number of ways to evaluate code blocks. The simplest is to press 12638There are a number of ways to evaluate code blocks. The simplest is to press
@@ -11813,64 +12640,52 @@ There are a number of ways to evaluate code blocks. The simplest is to press
11813@code{org-babel-no-eval-on-ctrl-c-ctrl-c} variable can be used to remove code 12640@code{org-babel-no-eval-on-ctrl-c-ctrl-c} variable can be used to remove code
11814evaluation from the @kbd{C-c C-c} key binding.}. This will call the 12641evaluation from the @kbd{C-c C-c} key binding.}. This will call the
11815@code{org-babel-execute-src-block} function to evaluate the block and insert 12642@code{org-babel-execute-src-block} function to evaluate the block and insert
11816its results into the Org-mode buffer. 12643its results into the Org mode buffer.
12644@cindex #+CALL
11817 12645
11818It is also possible to evaluate named code blocks from anywhere in an 12646It is also possible to evaluate named code blocks from anywhere in an
11819Org-mode buffer or an Org-mode table. @code{#+call} (or synonymously 12647Org mode buffer or an Org mode table. Live code blocks located in the current
11820@code{#+function} or @code{#+lob}) lines can be used to remotely execute code 12648Org mode buffer or in the ``Library of Babel'' (see @ref{Library of Babel})
11821blocks located in the current Org-mode buffer or in the ``Library of Babel'' 12649can be executed. Named code blocks can be executed with a separate
11822(see @ref{Library of Babel}). These lines use the following syntax to place 12650@code{#+CALL:} line or inline within a block of text.
11823a call on a line by itself. 12651
12652The syntax of the @code{#+CALL:} line is
11824 12653
11825@example 12654@example
11826#+call: <name>(<arguments>) 12655#+CALL: <name>(<arguments>)
11827#+call: <name>[<header args>](<arguments>) <header args> 12656#+CALL: <name>[<inside header arguments>](<arguments>) <end header arguments>
11828@end example 12657@end example
11829 12658
11830The following syntax can be used to place these calls within a block of 12659The syntax for inline evaluation of named code blocks is
11831prose.
11832 12660
11833@example 12661@example
11834...prose... call_<name>(<arguments>) ...prose... 12662... call_<name>(<arguments>) ...
11835...prose... call_<name>[<header args>](<arguments>)[<header args>] ...prose... 12663... call_<name>[<inside header arguments>](<arguments>)[<end header arguments>] ...
11836@end example 12664@end example
11837 12665
11838@table @code 12666@table @code
11839@item <name> 12667@item <name>
11840The name of the code block to be evaluated. 12668The name of the code block to be evaluated (see @ref{Structure of code blocks}).
11841@item <arguments> 12669@item <arguments>
11842Arguments specified in this section will be passed to the code block. These 12670Arguments specified in this section will be passed to the code block. These
11843arguments should relate to @code{:var} header arguments in the called code 12671arguments use standard function call syntax, rather than
11844block expressed using standard function call syntax. For example if the 12672header argument syntax. For example, a @code{#+CALL:} line that passes the
11845original code block named @code{double} has the header argument @code{:var 12673number four to a code block named @code{double}, which declares the header
11846n=2}, then the call line passing the number four to that block would be 12674argument @code{:var n=2}, would be written as @code{#+CALL: double(n=4)}.
11847written as @code{#+call: double(n=2)}. 12675@item <inside header arguments>
11848@item <header args> 12676Inside header arguments are passed through and applied to the named code
11849Header arguments can be placed either inside the call to the code block or at 12677block. These arguments use header argument syntax rather than standard
11850the end of the line as shown below. 12678function call syntax. Inside header arguments affect how the code block is
11851 12679evaluated. For example, @code{[:results output]} will collect the results of
11852@example 12680everything printed to @code{STDOUT} during execution of the code block.
11853#+call: code_bloc_name[XXXX](arguments) YYYY 12681@item <end header arguments>
11854@end example 12682End header arguments are applied to the calling instance and do not affect
11855 12683evaluation of the named code block. They affect how the results are
11856Header arguments located in these two locations are treated differently. 12684incorporated into the Org mode buffer and how the call line is exported. For
11857 12685example, @code{:results html} will insert the results of the call line
11858@table @code 12686evaluation in the Org buffer, wrapped in a @code{BEGIN_HTML:} block.
11859@item XXXX 12687
11860Those placed in the @code{XXXX} location are passed through and applied to 12688For more examples of passing header arguments to @code{#+CALL:} lines see
11861the code block being called. These header arguments affect how the code
11862block is evaluated, for example @code{[:results output]} will collect the
11863results from @code{STDOUT} of the called code block.
11864@item YYYY
11865Those placed in the @code{YYYY} location are applied to the call line and do
11866not affect the code block being called. These header arguments affect how
11867the results are incorporated into the Org-mode buffer when the call line is
11868evaluated, and how the call line is exported. For example @code{:results
11869org} at the end of the call line will insert the results of the call line
11870inside of an Org-mode block.
11871@end table
11872
11873For more examples of passing header arguments to @code{#+call:} lines see
11874@ref{Header arguments in function calls}. 12689@ref{Header arguments in function calls}.
11875@end table 12690@end table
11876 12691
@@ -11880,18 +12695,22 @@ For more examples of passing header arguments to @code{#+call:} lines see
11880@cindex source code, library 12695@cindex source code, library
11881@cindex code block, library 12696@cindex code block, library
11882 12697
11883The ``Library of Babel'' is a library of code blocks 12698The ``Library of Babel'' consists of code blocks that can be called from any
11884that can be called from any Org-mode file. The library is housed in an 12699Org mode file. Code blocks defined in the ``Library of Babel'' can be called
11885Org-mode file located in the @samp{contrib} directory of Org-mode. 12700remotely as if they were in the current Org mode buffer (see @ref{Evaluating
11886Org-mode users can deposit functions they believe to be generally 12701code blocks} for information on the syntax of remote code block evaluation).
11887useful in the library. 12702
12703
12704The central repository of code blocks in the ``Library of Babel'' is housed
12705in an Org mode file located in the @samp{contrib} directory of Org mode.
12706
12707Users can add code blocks they believe to be generally useful to their
12708``Library of Babel.'' The code blocks can be stored in any Org mode file and
12709then loaded into the library with @code{org-babel-lob-ingest}.
11888 12710
11889Code blocks defined in the ``Library of Babel'' can be called remotely as if
11890they were in the current Org-mode buffer (see @ref{Evaluating code blocks}
11891for information on the syntax of remote code block evaluation).
11892 12711
11893@kindex C-c C-v i 12712@kindex C-c C-v i
11894Code blocks located in any Org-mode file can be loaded into the ``Library of 12713Code blocks located in any Org mode file can be loaded into the ``Library of
11895Babel'' with the @code{org-babel-lob-ingest} function, bound to @kbd{C-c C-v 12714Babel'' with the @code{org-babel-lob-ingest} function, bound to @kbd{C-c C-v
11896i}. 12715i}.
11897 12716
@@ -11916,7 +12735,7 @@ Code blocks in the following languages are supported.
11916@item Ledger @tab ledger @tab Lisp @tab lisp 12735@item Ledger @tab ledger @tab Lisp @tab lisp
11917@item Lilypond @tab lilypond @tab MATLAB @tab matlab 12736@item Lilypond @tab lilypond @tab MATLAB @tab matlab
11918@item Mscgen @tab mscgen @tab Objective Caml @tab ocaml 12737@item Mscgen @tab mscgen @tab Objective Caml @tab ocaml
11919@item Octave @tab octave @tab Org-mode @tab org 12738@item Octave @tab octave @tab Org mode @tab org
11920@item Oz @tab oz @tab Perl @tab perl 12739@item Oz @tab oz @tab Perl @tab perl
11921@item Plantuml @tab plantuml @tab Python @tab python 12740@item Plantuml @tab plantuml @tab Python @tab python
11922@item R @tab R @tab Ruby @tab ruby 12741@item R @tab R @tab Ruby @tab ruby
@@ -11980,7 +12799,7 @@ specific (and having higher priority) than the last.
11980* System-wide header arguments:: Set global default values 12799* System-wide header arguments:: Set global default values
11981* Language-specific header arguments:: Set default values by language 12800* Language-specific header arguments:: Set default values by language
11982* Buffer-wide header arguments:: Set default values for a specific buffer 12801* Buffer-wide header arguments:: Set default values for a specific buffer
11983* Header arguments in Org-mode properties:: Set default values for a buffer or heading 12802* Header arguments in Org mode properties:: Set default values for a buffer or heading
11984* Code block specific header arguments:: The most common way to set values 12803* Code block specific header arguments:: The most common way to set values
11985* Header arguments in function calls:: The most specific level 12804* Header arguments in function calls:: The most specific level
11986@end menu 12805@end menu
@@ -12031,12 +12850,11 @@ Each language can define its own set of default header arguments. See the
12031language-specific documentation available online at 12850language-specific documentation available online at
12032@uref{http://orgmode.org/worg/org-contrib/babel}. 12851@uref{http://orgmode.org/worg/org-contrib/babel}.
12033 12852
12034@node Buffer-wide header arguments, Header arguments in Org-mode properties, Language-specific header arguments, Using header arguments 12853@node Buffer-wide header arguments, Header arguments in Org mode properties, Language-specific header arguments, Using header arguments
12035@subsubheading Buffer-wide header arguments 12854@subsubheading Buffer-wide header arguments
12036Buffer-wide header arguments may be specified through the use of a special 12855Buffer-wide header arguments may be specified as properties through the use
12037line placed anywhere in an Org-mode file. The line consists of the 12856of @code{#+PROPERTY:} lines placed anywhere in an Org mode file (see
12038@code{#+BABEL:} keyword followed by a series of header arguments which may be 12857@ref{Property syntax}).
12039specified using the standard header argument syntax.
12040 12858
12041For example the following would set @code{session} to @code{*R*}, and 12859For example the following would set @code{session} to @code{*R*}, and
12042@code{results} to @code{silent} for every code block in the buffer, ensuring 12860@code{results} to @code{silent} for every code block in the buffer, ensuring
@@ -12044,24 +12862,27 @@ that all execution took place in the same session, and no results would be
12044inserted into the buffer. 12862inserted into the buffer.
12045 12863
12046@example 12864@example
12047#+BABEL: :session *R* :results silent 12865#+PROPERTY: session *R*
12866#+PROPERTY: results silent
12048@end example 12867@end example
12049 12868
12050@node Header arguments in Org-mode properties, Code block specific header arguments, Buffer-wide header arguments, Using header arguments 12869@node Header arguments in Org mode properties, Code block specific header arguments, Buffer-wide header arguments, Using header arguments
12051@subsubheading Header arguments in Org-mode properties 12870@subsubheading Header arguments in Org mode properties
12052 12871
12053Header arguments are also read from Org-mode properties (see @ref{Property 12872Header arguments are also read from Org mode properties (see @ref{Property
12054syntax}), which can be set on a buffer-wide or per-heading basis. An example 12873syntax}), which can be set on a buffer-wide or per-heading basis. An example
12055of setting a header argument for all code blocks in a buffer is 12874of setting a header argument for all code blocks in a buffer is
12056 12875
12057@example 12876@example
12058#+property: tangle yes 12877#+PROPERTY: tangle yes
12059@end example 12878@end example
12060 12879
12880@vindex org-use-property-inheritance
12061When properties are used to set default header arguments, they are looked up 12881When properties are used to set default header arguments, they are looked up
12062with inheritance, so the value of the @code{:cache} header argument will default 12882with inheritance, regardless of the value of
12063to @code{yes} in all code blocks in the subtree rooted at the following 12883@code{org-use-property-inheritance}. In the following example the value of
12064heading: 12884the @code{:cache} header argument will default to @code{yes} in all code
12885blocks in the subtree rooted at the following heading:
12065 12886
12066@example 12887@example
12067* outline header 12888* outline header
@@ -12075,45 +12896,47 @@ heading:
12075Properties defined in this way override the properties set in 12896Properties defined in this way override the properties set in
12076@code{org-babel-default-header-args}. It is convenient to use the 12897@code{org-babel-default-header-args}. It is convenient to use the
12077@code{org-set-property} function bound to @kbd{C-c C-x p} to set properties 12898@code{org-set-property} function bound to @kbd{C-c C-x p} to set properties
12078in Org-mode documents. 12899in Org mode documents.
12079 12900
12080@node Code block specific header arguments, Header arguments in function calls, Header arguments in Org-mode properties, Using header arguments 12901@node Code block specific header arguments, Header arguments in function calls, Header arguments in Org mode properties, Using header arguments
12081@subsubheading Code block specific header arguments 12902@subsubheading Code block specific header arguments
12082 12903
12083The most common way to assign values to header arguments is at the 12904The most common way to assign values to header arguments is at the
12084code block level. This can be done by listing a sequence of header 12905code block level. This can be done by listing a sequence of header
12085arguments and their values as part of the @code{#+begin_src} line. 12906arguments and their values as part of the @code{#+BEGIN_SRC} line.
12086Properties set in this way override both the values of 12907Properties set in this way override both the values of
12087@code{org-babel-default-header-args} and header arguments specified as 12908@code{org-babel-default-header-args} and header arguments specified as
12088properties. In the following example, the @code{:results} header argument 12909properties. In the following example, the @code{:results} header argument
12089is set to @code{silent}, meaning the results of execution will not be 12910is set to @code{silent}, meaning the results of execution will not be
12090inserted in the buffer, and the @code{:exports} header argument is set to 12911inserted in the buffer, and the @code{:exports} header argument is set to
12091@code{code}, meaning only the body of the code block will be 12912@code{code}, meaning only the body of the code block will be
12092preserved on export to HTML or LaTeX. 12913preserved on export to HTML or @LaTeX{}.
12093 12914
12094@example 12915@example
12095#+source: factorial 12916#+NAME: factorial
12096#+begin_src haskell :results silent :exports code :var n=0 12917#+BEGIN_SRC haskell :results silent :exports code :var n=0
12097fac 0 = 1 12918fac 0 = 1
12098fac n = n * fac (n-1) 12919fac n = n * fac (n-1)
12099#+end_src 12920#+END_SRC
12100@end example 12921@end example
12101Similarly, it is possible to set header arguments for inline code blocks: 12922Similarly, it is possible to set header arguments for inline code blocks
12102 12923
12103@example 12924@example
12104src_haskell[:exports both]@{fac 5@} 12925src_haskell[:exports both]@{fac 5@}
12105@end example 12926@end example
12106 12927
12107Code block header arguments can span multiple lines using =#+header:= or 12928Code block header arguments can span multiple lines using @code{#+HEADER:} or
12108=#+headers:= lines preceding a code block or nested in between the name and 12929@code{#+HEADERS:} lines preceding a code block or nested between the
12109body of a named code block. 12930@code{#+NAME:} line and the @code{#+BEGIN_SRC} line of a named code block.
12931@cindex #+HEADER:
12932@cindex #+HEADERS:
12110 12933
12111Multi-line header arguments on an un-named code block: 12934Multi-line header arguments on an un-named code block:
12112@example 12935@example
12113 #+headers: :var data1=1 12936 #+HEADERS: :var data1=1
12114 #+begin_src emacs-lisp :var data2=2 12937 #+BEGIN_SRC emacs-lisp :var data2=2
12115 (message "data1:%S, data2:%S" data1 data2) 12938 (message "data1:%S, data2:%S" data1 data2)
12116 #+end_src 12939 #+END_SRC
12117 12940
12118 #+results: 12941 #+results:
12119 : data1:1, data2:2 12942 : data1:1, data2:2
@@ -12121,11 +12944,11 @@ Multi-line header arguments on an un-named code block:
12121 12944
12122Multi-line header arguments on a named code block: 12945Multi-line header arguments on a named code block:
12123@example 12946@example
12124 #+source: named-block 12947 #+NAME: named-block
12125 #+header: :var data=2 12948 #+HEADER: :var data=2
12126 #+begin_src emacs-lisp 12949 #+BEGIN_SRC emacs-lisp
12127 (message "data:%S" data) 12950 (message "data:%S" data)
12128 #+end_src 12951 #+END_SRC
12129 12952
12130 #+results: named-block 12953 #+results: named-block
12131 : data:2 12954 : data:2
@@ -12136,25 +12959,26 @@ Multi-line header arguments on a named code block:
12136@subsubheading Header arguments in function calls 12959@subsubheading Header arguments in function calls
12137 12960
12138At the most specific level, header arguments for ``Library of Babel'' or 12961At the most specific level, header arguments for ``Library of Babel'' or
12139function call lines can be set as shown in the two examples below. For more 12962@code{#+CALL:} lines can be set as shown in the two examples below. For more
12140information on the structure of @code{#+call:} lines see @ref{Evaluating code 12963information on the structure of @code{#+CALL:} lines see @ref{Evaluating code
12141blocks}. 12964blocks}.
12142 12965
12143The following will apply the @code{:exports results} header argument to the 12966The following will apply the @code{:exports results} header argument to the
12144evaluation of the @code{#+call:} line. 12967evaluation of the @code{#+CALL:} line.
12145@example 12968@example
12146#+call: factorial(n=5) :exports results 12969#+CALL: factorial(n=5) :exports results
12147@end example 12970@end example
12148 12971
12149The following will apply the @code{:session special} header argument to the 12972The following will apply the @code{:session special} header argument to the
12150evaluation of the @code{factorial} code block. 12973evaluation of the @code{factorial} code block.
12151@example 12974@example
12152#+call: factorial[:session special](n=5) 12975#+CALL: factorial[:session special](n=5)
12153@end example 12976@end example
12154 12977
12155@node Specific header arguments, , Using header arguments, Header arguments 12978@node Specific header arguments, , Using header arguments, Header arguments
12156@subsection Specific header arguments 12979@subsection Specific header arguments
12157The following header arguments are defined: 12980Header arguments consist of an initial colon followed by the name of the
12981argument in lowercase letters. The following header arguments are defined:
12158 12982
12159@menu 12983@menu
12160* var:: Pass arguments to code blocks 12984* var:: Pass arguments to code blocks
@@ -12193,13 +13017,18 @@ Additional header arguments are defined on a language-specific basis, see
12193The @code{:var} header argument is used to pass arguments to code blocks. 13017The @code{:var} header argument is used to pass arguments to code blocks.
12194The specifics of how arguments are included in a code block vary by language; 13018The specifics of how arguments are included in a code block vary by language;
12195these are addressed in the language-specific documentation. However, the 13019these are addressed in the language-specific documentation. However, the
12196syntax used to specify arguments is the same across all languages. The 13020syntax used to specify arguments is the same across all languages. In every
12197values passed to arguments can be literal values, values from org-mode tables 13021case, variables require a default value when they are declared.
12198and literal example blocks, the results of other code blocks, or Emacs Lisp 13022
12199code---see the ``Emacs Lisp evaluation of variables'' heading below. 13023The values passed to arguments can either be literal values, references, or
13024Emacs Lisp code (see @ref{var, Emacs Lisp evaluation of variables}). References
13025include anything in the Org mode file that takes a @code{#+NAME:},
13026@code{#+TBLNAME:}, or @code{#+RESULTS:} line. This includes tables, lists,
13027@code{#+BEGIN_EXAMPLE} blocks, other code blocks, and the results of other
13028code blocks.
12200 13029
12201These values can be indexed in a manner similar to arrays---see the 13030Argument values can be indexed in a manner similar to arrays (see @ref{var,
12202``indexable variable values'' heading below. 13031Indexable variable values}).
12203 13032
12204The following syntax is used to pass arguments to code blocks using the 13033The following syntax is used to pass arguments to code blocks using the
12205@code{:var} header argument. 13034@code{:var} header argument.
@@ -12208,76 +13037,122 @@ The following syntax is used to pass arguments to code blocks using the
12208:var name=assign 13037:var name=assign
12209@end example 13038@end example
12210 13039
12211where @code{assign} can take one of the following forms 13040The argument, @code{assign}, can either be a literal value, such as a string
13041@samp{"string"} or a number @samp{9}, or a reference to a table, a list, a
13042literal example, another code block (with or without arguments), or the
13043results of evaluating another code block.
12212 13044
12213@itemize @bullet 13045Here are examples of passing values by reference:
12214@item literal value 13046
12215either a string @code{"string"} or a number @code{9}. 13047@table @dfn
12216@item reference
12217a table name:
12218 13048
13049@item table
13050an Org mode table named with either a @code{#+NAME:} or @code{#+TBLNAME:} line
12219@example 13051@example
12220#+tblname: example-table 13052#+TBLNAME: example-table
12221| 1 | 13053| 1 |
12222| 2 | 13054| 2 |
12223| 3 | 13055| 3 |
12224| 4 | 13056| 4 |
12225 13057
12226#+source: table-length 13058#+NAME: table-length
12227#+begin_src emacs-lisp :var table=example-table 13059#+BEGIN_SRC emacs-lisp :var table=example-table
12228(length table) 13060(length table)
12229#+end_src 13061#+END_SRC
12230 13062
12231#+results: table-length 13063#+results: table-length
12232: 4 13064: 4
12233@end example 13065@end example
12234 13066
12235a code block name, as assigned by @code{#+srcname:}, followed by 13067@item list
12236parentheses: 13068a simple list named with a @code{#+NAME:} line (note that nesting is not
13069carried through to the source code block)
12237 13070
12238@example 13071@example
12239#+begin_src emacs-lisp :var length=table-length() 13072#+NAME: example-list
13073 - simple
13074 - not
13075 - nested
13076 - list
13077
13078#+BEGIN_SRC emacs-lisp :var x=example-list
13079 (print x)
13080#+END_SRC
13081
13082#+results:
13083| simple | list |
13084@end example
13085
13086@item code block without arguments
13087a code block name (from the example above), as assigned by @code{#+NAME:},
13088optionally followed by parentheses
13089
13090@example
13091#+BEGIN_SRC emacs-lisp :var length=table-length()
12240(* 2 length) 13092(* 2 length)
12241#+end_src 13093#+END_SRC
12242 13094
12243#+results: 13095#+results:
12244: 8 13096: 8
12245@end example 13097@end example
12246 13098
12247In addition, an argument can be passed to the code block referenced 13099@item code block with arguments
12248by @code{:var}. The argument is passed within the parentheses following the 13100a code block name, as assigned by @code{#+NAME:}, followed by parentheses and
12249code block name: 13101optional arguments passed within the parentheses following the
13102code block name using standard function call syntax
12250 13103
12251@example 13104@example
12252#+source: double 13105#+NAME: double
12253#+begin_src emacs-lisp :var input=8 13106#+BEGIN_SRC emacs-lisp :var input=8
12254(* 2 input) 13107(* 2 input)
12255#+end_src 13108#+END_SRC
12256 13109
12257#+results: double 13110#+results: double
12258: 16 13111: 16
12259 13112
12260#+source: squared 13113#+NAME: squared
12261#+begin_src emacs-lisp :var input=double(input=1) 13114#+BEGIN_SRC emacs-lisp :var input=double(input=1)
12262(* input input) 13115(* input input)
12263#+end_src 13116#+END_SRC
12264 13117
12265#+results: squared 13118#+results: squared
12266: 4 13119: 4
12267@end example 13120@end example
12268@end itemize 13121
13122@item literal example
13123a literal example block named with a @code{#+NAME:} line
13124
13125@example
13126#+NAME: literal-example
13127#+BEGIN_EXAMPLE
13128A literal example
13129on two lines
13130#+END_EXAMPLE
13131
13132#+NAME: read-literal-example
13133#+BEGIN_SRC emacs-lisp :var x=literal-example
13134 (concatenate 'string x " for you.")
13135#+END_SRC
13136
13137#+results: read-literal-example
13138: A literal example
13139: on two lines for you.
13140
13141@end example
13142
13143@end table
12269 13144
12270@subsubheading Alternate argument syntax 13145@subsubheading Alternate argument syntax
12271It is also possible to specify arguments in a potentially more natural way 13146It is also possible to specify arguments in a potentially more natural way
12272using the @code{#+source:} line of a code block. As in the following 13147using the @code{#+NAME:} line of a code block. As in the following
12273example arguments can be packed inside of parenthesis, separated by commas, 13148example, arguments can be packed inside of parentheses, separated by commas,
12274following the source name. 13149following the source name.
12275 13150
12276@example 13151@example
12277#+source: double(input=0, x=2) 13152#+NAME: double(input=0, x=2)
12278#+begin_src emacs-lisp 13153#+BEGIN_SRC emacs-lisp
12279(* 2 (+ input x)) 13154(* 2 (+ input x))
12280#+end_src 13155#+END_SRC
12281@end example 13156@end example
12282 13157
12283@subsubheading Indexable variable values 13158@subsubheading Indexable variable values
@@ -12291,15 +13166,15 @@ following example assigns the last cell of the first row the table
12291@code{example-table} to the variable @code{data}: 13166@code{example-table} to the variable @code{data}:
12292 13167
12293@example 13168@example
12294#+results: example-table 13169#+NAME: example-table
12295| 1 | a | 13170| 1 | a |
12296| 2 | b | 13171| 2 | b |
12297| 3 | c | 13172| 3 | c |
12298| 4 | d | 13173| 4 | d |
12299 13174
12300#+begin_src emacs-lisp :var data=example-table[0,-1] 13175#+BEGIN_SRC emacs-lisp :var data=example-table[0,-1]
12301 data 13176 data
12302#+end_src 13177#+END_SRC
12303 13178
12304#+results: 13179#+results:
12305: a 13180: a
@@ -12311,16 +13186,16 @@ example the following assigns the middle three rows of @code{example-table}
12311to @code{data}. 13186to @code{data}.
12312 13187
12313@example 13188@example
12314#+results: example-table 13189#+NAME: example-table
12315| 1 | a | 13190| 1 | a |
12316| 2 | b | 13191| 2 | b |
12317| 3 | c | 13192| 3 | c |
12318| 4 | d | 13193| 4 | d |
12319| 5 | 3 | 13194| 5 | 3 |
12320 13195
12321#+begin_src emacs-lisp :var data=example-table[1:3] 13196#+BEGIN_SRC emacs-lisp :var data=example-table[1:3]
12322 data 13197 data
12323#+end_src 13198#+END_SRC
12324 13199
12325#+results: 13200#+results:
12326| 2 | b | 13201| 2 | b |
@@ -12334,15 +13209,15 @@ interpreted to mean the entire range and as such are equivalent to
12334column is referenced. 13209column is referenced.
12335 13210
12336@example 13211@example
12337#+results: example-table 13212#+NAME: example-table
12338| 1 | a | 13213| 1 | a |
12339| 2 | b | 13214| 2 | b |
12340| 3 | c | 13215| 3 | c |
12341| 4 | d | 13216| 4 | d |
12342 13217
12343#+begin_src emacs-lisp :var data=example-table[,0] 13218#+BEGIN_SRC emacs-lisp :var data=example-table[,0]
12344 data 13219 data
12345#+end_src 13220#+END_SRC
12346 13221
12347#+results: 13222#+results:
12348| 1 | 2 | 3 | 4 | 13223| 1 | 2 | 3 | 4 |
@@ -12353,16 +13228,16 @@ Any number of dimensions can be indexed. Dimensions are separated from one
12353another by commas, as shown in the following example. 13228another by commas, as shown in the following example.
12354 13229
12355@example 13230@example
12356#+source: 3D 13231#+NAME: 3D
12357#+begin_src emacs-lisp 13232#+BEGIN_SRC emacs-lisp
12358 '(((1 2 3) (4 5 6) (7 8 9)) 13233 '(((1 2 3) (4 5 6) (7 8 9))
12359 ((10 11 12) (13 14 15) (16 17 18)) 13234 ((10 11 12) (13 14 15) (16 17 18))
12360 ((19 20 21) (22 23 24) (25 26 27))) 13235 ((19 20 21) (22 23 24) (25 26 27)))
12361#+end_src 13236#+END_SRC
12362 13237
12363#+begin_src emacs-lisp :var data=3D[1,,1] 13238#+BEGIN_SRC emacs-lisp :var data=3D[1,,1]
12364 data 13239 data
12365#+end_src 13240#+END_SRC
12366 13241
12367#+results: 13242#+results:
12368| 11 | 14 | 17 | 13243| 11 | 14 | 17 |
@@ -12371,31 +13246,31 @@ another by commas, as shown in the following example.
12371@subsubheading Emacs Lisp evaluation of variables 13246@subsubheading Emacs Lisp evaluation of variables
12372 13247
12373Emacs lisp code can be used to initialize variable values. When a variable 13248Emacs lisp code can be used to initialize variable values. When a variable
12374value starts with @code{(}, @code{[}, @code{'} or @code{`} it will be evaluated as 13249value starts with @code{(}, @code{[}, @code{'} or @code{`} it will be
12375Emacs Lisp and the result of the evaluation will be assigned as the variable 13250evaluated as Emacs Lisp and the result of the evaluation will be assigned as
12376value. The following example demonstrates use of this evaluation to reliably 13251the variable value. The following example demonstrates use of this
12377pass the file-name of the org-mode buffer to a code block---note that 13252evaluation to reliably pass the file-name of the Org mode buffer to a code
12378evaluation of header arguments is guaranteed to take place in the original 13253block---note that evaluation of header arguments is guaranteed to take place
12379org-mode file, while there is no such guarantee for evaluation of the code 13254in the original Org mode file, while there is no such guarantee for
12380block body. 13255evaluation of the code block body.
12381 13256
12382@example 13257@example
12383#+begin_src sh :var filename=(buffer-file-name) :exports both 13258#+BEGIN_SRC sh :var filename=(buffer-file-name) :exports both
12384 wc -w $filename 13259 wc -w $filename
12385#+end_src 13260#+END_SRC
12386@end example 13261@end example
12387 13262
12388Note that values read from tables and lists will not be evaluated as 13263Note that values read from tables and lists will not be evaluated as
12389Emacs Lisp, as shown in the following example. 13264Emacs Lisp, as shown in the following example.
12390 13265
12391@example 13266@example
12392#+results: table 13267#+NAME: table
12393| (a b c) | 13268| (a b c) |
12394 13269
12395#+headers: :var data=table[0,0] 13270#+HEADERS: :var data=table[0,0]
12396#+begin_src perl 13271#+BEGIN_SRC perl
12397 $data 13272 $data
12398#+end_src 13273#+END_SRC
12399 13274
12400#+results: 13275#+results:
12401: (a b c) 13276: (a b c)
@@ -12414,7 +13289,7 @@ from the code block
12414@item 13289@item
12415@b{type} header arguments specify what type of result the code block will 13290@b{type} header arguments specify what type of result the code block will
12416return---which has implications for how they will be inserted into the 13291return---which has implications for how they will be inserted into the
12417Org-mode buffer 13292Org mode buffer
12418@item 13293@item
12419@b{handling} header arguments specify how the results of evaluating the code 13294@b{handling} header arguments specify how the results of evaluating the code
12420block should be handled. 13295block should be handled.
@@ -12445,28 +13320,28 @@ table or scalar depending on their value.
12445 13320
12446@itemize @bullet 13321@itemize @bullet
12447@item @code{table}, @code{vector} 13322@item @code{table}, @code{vector}
12448The results should be interpreted as an Org-mode table. If a single value is 13323The results should be interpreted as an Org mode table. If a single value is
12449returned, it will be converted into a table with one row and one column. 13324returned, it will be converted into a table with one row and one column.
12450E.g., @code{:results value table}. 13325E.g., @code{:results value table}.
12451@item @code{list} 13326@item @code{list}
12452The results should be interpreted as an Org-mode list. If a single scalar 13327The results should be interpreted as an Org mode list. If a single scalar
12453value is returned it will be converted into a list with only one element. 13328value is returned it will be converted into a list with only one element.
12454@item @code{scalar}, @code{verbatim} 13329@item @code{scalar}, @code{verbatim}
12455The results should be interpreted literally---they will not be 13330The results should be interpreted literally---they will not be
12456converted into a table. The results will be inserted into the Org-mode 13331converted into a table. The results will be inserted into the Org mode
12457buffer as quoted text. E.g., @code{:results value verbatim}. 13332buffer as quoted text. E.g., @code{:results value verbatim}.
12458@item @code{file} 13333@item @code{file}
12459The results will be interpreted as the path to a file, and will be inserted 13334The results will be interpreted as the path to a file, and will be inserted
12460into the Org-mode buffer as a file link. E.g., @code{:results value file}. 13335into the Org mode buffer as a file link. E.g., @code{:results value file}.
12461@item @code{raw}, @code{org} 13336@item @code{raw}, @code{org}
12462The results are interpreted as raw Org-mode code and are inserted directly 13337The results are interpreted as raw Org mode code and are inserted directly
12463into the buffer. If the results look like a table they will be aligned as 13338into the buffer. If the results look like a table they will be aligned as
12464such by Org-mode. E.g., @code{:results value raw}. 13339such by Org mode. E.g., @code{:results value raw}.
12465@item @code{html} 13340@item @code{html}
12466Results are assumed to be HTML and will be enclosed in a @code{begin_html} 13341Results are assumed to be HTML and will be enclosed in a @code{begin_html}
12467block. E.g., @code{:results value html}. 13342block. E.g., @code{:results value html}.
12468@item @code{latex} 13343@item @code{latex}
12469Results assumed to be LaTeX and are enclosed in a @code{begin_latex} block. 13344Results assumed to be @LaTeX{} and are enclosed in a @code{begin_latex} block.
12470E.g., @code{:results value latex}. 13345E.g., @code{:results value latex}.
12471@item @code{code} 13346@item @code{code}
12472Result are assumed to be parsable code and are enclosed in a code block. 13347Result are assumed to be parsable code and are enclosed in a code block.
@@ -12488,10 +13363,10 @@ results once they are collected.
12488@itemize @bullet 13363@itemize @bullet
12489@item @code{silent} 13364@item @code{silent}
12490The results will be echoed in the minibuffer but will not be inserted into 13365The results will be echoed in the minibuffer but will not be inserted into
12491the Org-mode buffer. E.g., @code{:results output silent}. 13366the Org mode buffer. E.g., @code{:results output silent}.
12492@item @code{replace} 13367@item @code{replace}
12493The default value. Any existing results will be removed, and the new results 13368The default value. Any existing results will be removed, and the new results
12494will be inserted into the Org-mode buffer in their place. E.g., 13369will be inserted into the Org mode buffer in their place. E.g.,
12495@code{:results output replace}. 13370@code{:results output replace}.
12496@item @code{append} 13371@item @code{append}
12497If there are pre-existing results of the code block then the new results will 13372If there are pre-existing results of the code block then the new results will
@@ -12507,9 +13382,9 @@ inserted as with @code{replace}.
12507@subsubsection @code{:file} 13382@subsubsection @code{:file}
12508 13383
12509The header argument @code{:file} is used to specify an external file in which 13384The header argument @code{:file} is used to specify an external file in which
12510to save code block results. After code block evaluation an Org-mode style 13385to save code block results. After code block evaluation an Org mode style
12511@code{[[file:]]} link (see @ref{Link format}) to the file will be inserted 13386@code{[[file:]]} link (see @ref{Link format}) to the file will be inserted
12512into the Org-mode buffer. Some languages including R, gnuplot, dot, and 13387into the Org mode buffer. Some languages including R, gnuplot, dot, and
12513ditaa provide special handling of the @code{:file} header argument 13388ditaa provide special handling of the @code{:file} header argument
12514automatically wrapping the code block body in the boilerplate code required 13389automatically wrapping the code block body in the boilerplate code required
12515to save output to the specified file. This is often useful for saving 13390to save output to the specified file. This is often useful for saving
@@ -12538,9 +13413,9 @@ In other words, if you want your plot to go into a folder called @file{Work}
12538in your home directory, you could use 13413in your home directory, you could use
12539 13414
12540@example 13415@example
12541#+begin_src R :file myplot.png :dir ~/Work 13416#+BEGIN_SRC R :file myplot.png :dir ~/Work
12542matplot(matrix(rnorm(100), 10), type="l") 13417matplot(matrix(rnorm(100), 10), type="l")
12543#+end_src 13418#+END_SRC
12544@end example 13419@end example
12545 13420
12546@subsubheading Remote execution 13421@subsubheading Remote execution
@@ -12548,14 +13423,14 @@ A directory on a remote machine can be specified using tramp file syntax, in
12548which case the code will be evaluated on the remote machine. An example is 13423which case the code will be evaluated on the remote machine. An example is
12549 13424
12550@example 13425@example
12551#+begin_src R :file plot.png :dir /dand@@yakuba.princeton.edu: 13426#+BEGIN_SRC R :file plot.png :dir /dand@@yakuba.princeton.edu:
12552plot(1:10, main=system("hostname", intern=TRUE)) 13427plot(1:10, main=system("hostname", intern=TRUE))
12553#+end_src 13428#+END_SRC
12554@end example 13429@end example
12555 13430
12556Text results will be returned to the local Org-mode buffer as usual, and file 13431Text results will be returned to the local Org mode buffer as usual, and file
12557output will be created on the remote machine with relative paths interpreted 13432output will be created on the remote machine with relative paths interpreted
12558relative to the remote directory. An Org-mode link to the remote file will be 13433relative to the remote directory. An Org mode link to the remote file will be
12559created. 13434created.
12560 13435
12561So, in the above example a plot will be created on the remote machine, 13436So, in the above example a plot will be created on the remote machine,
@@ -12581,7 +13456,7 @@ currently made to alter the directory associated with an existing session.
12581@code{:dir} should typically not be used to create files during export with 13456@code{:dir} should typically not be used to create files during export with
12582@code{:exports results} or @code{:exports both}. The reason is that, in order 13457@code{:exports results} or @code{:exports both}. The reason is that, in order
12583to retain portability of exported material between machines, during export 13458to retain portability of exported material between machines, during export
12584links inserted into the buffer will *not* be expanded against @code{default 13459links inserted into the buffer will @emph{not} be expanded against @code{default
12585directory}. Therefore, if @code{default-directory} is altered using 13460directory}. Therefore, if @code{default-directory} is altered using
12586@code{:dir}, it is probable that the file will be created in a location to 13461@code{:dir}, it is probable that the file will be created in a location to
12587which the link does not point. 13462which the link does not point.
@@ -12591,7 +13466,7 @@ which the link does not point.
12591@subsubsection @code{:exports} 13466@subsubsection @code{:exports}
12592 13467
12593The @code{:exports} header argument specifies what should be included in HTML 13468The @code{:exports} header argument specifies what should be included in HTML
12594or LaTeX exports of the Org-mode file. 13469or @LaTeX{} exports of the Org mode file.
12595 13470
12596@itemize @bullet 13471@itemize @bullet
12597@item @code{code} 13472@item @code{code}
@@ -12616,14 +13491,14 @@ block should be included in tangled extraction of source code files.
12616@itemize @bullet 13491@itemize @bullet
12617@item @code{tangle} 13492@item @code{tangle}
12618The code block is exported to a source code file named after the full path 13493The code block is exported to a source code file named after the full path
12619(including the directory) and file name (w/o extension) of the Org-mode file. 13494(including the directory) and file name (w/o extension) of the Org mode file.
12620E.g., @code{:tangle yes}. 13495E.g., @code{:tangle yes}.
12621@item @code{no} 13496@item @code{no}
12622The default. The code block is not exported to a source code file. 13497The default. The code block is not exported to a source code file.
12623E.g., @code{:tangle no}. 13498E.g., @code{:tangle no}.
12624@item other 13499@item other
12625Any other string passed to the @code{:tangle} header argument is interpreted 13500Any other string passed to the @code{:tangle} header argument is interpreted
12626as a path (directory and file name relative to the directory of the Org-mode 13501as a path (directory and file name relative to the directory of the Org mode
12627file) to which the block will be exported. E.g., @code{:tangle path}. 13502file) to which the block will be exported. E.g., @code{:tangle path}.
12628@end itemize 13503@end itemize
12629 13504
@@ -12650,7 +13525,7 @@ original Org file from which the code was tangled.
12650@item @code{yes} 13525@item @code{yes}
12651A synonym for ``link'' to maintain backwards compatibility. 13526A synonym for ``link'' to maintain backwards compatibility.
12652@item @code{org} 13527@item @code{org}
12653Include text from the org-mode file as a comment. 13528Include text from the Org mode file as a comment.
12654 13529
12655The text is picked from the leading context of the tangled code and is 13530The text is picked from the leading context of the tangled code and is
12656limited by the nearest headline or source block as the case may be. 13531limited by the nearest headline or source block as the case may be.
@@ -12751,37 +13626,39 @@ concatenated together to form the replacement text.
12751 13626
12752By setting this header argument at the sub-tree or file level, simple code 13627By setting this header argument at the sub-tree or file level, simple code
12753block concatenation may be achieved. For example, when tangling the 13628block concatenation may be achieved. For example, when tangling the
12754following Org-mode file, the bodies of code blocks will be concatenated into 13629following Org mode file, the bodies of code blocks will be concatenated into
12755the resulting pure code file. 13630the resulting pure code file@footnote{(The example needs property inheritance
13631to be turned on for the @code{noweb-ref} property, see @ref{Property
13632inheritance}).}.
12756 13633
12757@example 13634@example
12758 #+begin_src sh :tangle yes :noweb yes :shebang #!/bin/sh 13635 #+BEGIN_SRC sh :tangle yes :noweb yes :shebang #!/bin/sh
12759 <<fullest-disk>> 13636 <<fullest-disk>>
12760 #+end_src 13637 #+END_SRC
12761 * the mount point of the fullest disk 13638 * the mount point of the fullest disk
12762 :PROPERTIES: 13639 :PROPERTIES:
12763 :noweb-ref: fullest-disk 13640 :noweb-ref: fullest-disk
12764 :END: 13641 :END:
12765 13642
12766 ** query all mounted disks 13643 ** query all mounted disks
12767 #+begin_src sh 13644 #+BEGIN_SRC sh
12768 df \ 13645 df \
12769 #+end_src 13646 #+END_SRC
12770 13647
12771 ** strip the header row 13648 ** strip the header row
12772 #+begin_src sh 13649 #+BEGIN_SRC sh
12773 |sed '1d' \ 13650 |sed '1d' \
12774 #+end_src 13651 #+END_SRC
12775 13652
12776 ** sort by the percent full 13653 ** sort by the percent full
12777 #+begin_src sh 13654 #+BEGIN_SRC sh
12778 |awk '@{print $5 " " $6@}'|sort -n |tail -1 \ 13655 |awk '@{print $5 " " $6@}'|sort -n |tail -1 \
12779 #+end_src 13656 #+END_SRC
12780 13657
12781 ** extract the mount point 13658 ** extract the mount point
12782 #+begin_src sh 13659 #+BEGIN_SRC sh
12783 |awk '@{print $2@}' 13660 |awk '@{print $2@}'
12784 #+end_src 13661 #+END_SRC
12785@end example 13662@end example
12786 13663
12787@node cache, sep, noweb-ref, Specific header arguments 13664@node cache, sep, noweb-ref, Specific header arguments
@@ -12811,18 +13688,18 @@ invalidated and the code block is re-run. In the following example,
12811changed since it was last run. 13688changed since it was last run.
12812 13689
12813@example 13690@example
12814 #+srcname: random 13691 #+NAME: random
12815 #+begin_src R :cache yes 13692 #+BEGIN_SRC R :cache yes
12816 runif(1) 13693 runif(1)
12817 #+end_src 13694 #+END_SRC
12818 13695
12819 #+results[a2a72cd647ad44515fab62e144796432793d68e1]: random 13696 #+results[a2a72cd647ad44515fab62e144796432793d68e1]: random
12820 0.4659510825295 13697 0.4659510825295
12821 13698
12822 #+srcname: caller 13699 #+NAME: caller
12823 #+begin_src emacs-lisp :var x=random :cache yes 13700 #+BEGIN_SRC emacs-lisp :var x=random :cache yes
12824 x 13701 x
12825 #+end_src 13702 #+END_SRC
12826 13703
12827 #+results[bec9c8724e397d5df3b696502df3ed7892fc4f5f]: caller 13704 #+results[bec9c8724e397d5df3b696502df3ed7892fc4f5f]: caller
12828 0.254227238707244 13705 0.254227238707244
@@ -12832,7 +13709,7 @@ changed since it was last run.
12832@subsubsection @code{:sep} 13709@subsubsection @code{:sep}
12833 13710
12834The @code{:sep} header argument can be used to control the delimiter used 13711The @code{:sep} header argument can be used to control the delimiter used
12835when writing tabular results out to files external to Org-mode. This is used 13712when writing tabular results out to files external to Org mode. This is used
12836either when opening tabular results of a code block by calling the 13713either when opening tabular results of a code block by calling the
12837@code{org-open-at-point} function bound to @kbd{C-c C-o} on the code block, 13714@code{org-open-at-point} function bound to @kbd{C-c C-o} on the code block,
12838or when writing code block results to an external file (see @ref{file}) 13715or when writing code block results to an external file (see @ref{file})
@@ -12856,17 +13733,17 @@ variable and raises an error. Setting @code{:hlines no} or relying on the
12856default value yields the following results. 13733default value yields the following results.
12857 13734
12858@example 13735@example
12859#+tblname: many-cols 13736#+TBLNAME: many-cols
12860| a | b | c | 13737| a | b | c |
12861|---+---+---| 13738|---+---+---|
12862| d | e | f | 13739| d | e | f |
12863|---+---+---| 13740|---+---+---|
12864| g | h | i | 13741| g | h | i |
12865 13742
12866#+source: echo-table 13743#+NAME: echo-table
12867#+begin_src python :var tab=many-cols 13744#+BEGIN_SRC python :var tab=many-cols
12868 return tab 13745 return tab
12869#+end_src 13746#+END_SRC
12870 13747
12871#+results: echo-table 13748#+results: echo-table
12872| a | b | c | 13749| a | b | c |
@@ -12878,17 +13755,17 @@ default value yields the following results.
12878Leaves hlines in the table. Setting @code{:hlines yes} has this effect. 13755Leaves hlines in the table. Setting @code{:hlines yes} has this effect.
12879 13756
12880@example 13757@example
12881#+tblname: many-cols 13758#+TBLNAME: many-cols
12882| a | b | c | 13759| a | b | c |
12883|---+---+---| 13760|---+---+---|
12884| d | e | f | 13761| d | e | f |
12885|---+---+---| 13762|---+---+---|
12886| g | h | i | 13763| g | h | i |
12887 13764
12888#+source: echo-table 13765#+NAME: echo-table
12889#+begin_src python :var tab=many-cols :hlines yes 13766#+BEGIN_SRC python :var tab=many-cols :hlines yes
12890 return tab 13767 return tab
12891#+end_src 13768#+END_SRC
12892 13769
12893#+results: echo-table 13770#+results: echo-table
12894| a | b | c | 13771| a | b | c |
@@ -12904,6 +13781,10 @@ Leaves hlines in the table. Setting @code{:hlines yes} has this effect.
12904 13781
12905The @code{:colnames} header argument accepts the values @code{yes}, 13782The @code{:colnames} header argument accepts the values @code{yes},
12906@code{no}, or @code{nil} for unassigned. The default value is @code{nil}. 13783@code{no}, or @code{nil} for unassigned. The default value is @code{nil}.
13784Note that the behavior of the @code{:colnames} header argument may differ
13785across languages. For example Emacs Lisp code blocks ignore the
13786@code{:colnames} header argument entirely given the ease with which tables
13787with column names may be handled directly in Emacs Lisp.
12907 13788
12908@itemize @bullet 13789@itemize @bullet
12909@item @code{nil} 13790@item @code{nil}
@@ -12913,16 +13794,16 @@ names will be removed from the table before
12913processing, then reapplied to the results. 13794processing, then reapplied to the results.
12914 13795
12915@example 13796@example
12916#+tblname: less-cols 13797#+TBLNAME: less-cols
12917| a | 13798| a |
12918|---| 13799|---|
12919| b | 13800| b |
12920| c | 13801| c |
12921 13802
12922#+srcname: echo-table-again 13803#+NAME: echo-table-again
12923#+begin_src python :var tab=less-cols 13804#+BEGIN_SRC python :var tab=less-cols
12924 return [[val + '*' for val in row] for row in tab] 13805 return [[val + '*' for val in row] for row in tab]
12925#+end_src 13806#+END_SRC
12926 13807
12927#+results: echo-table-again 13808#+results: echo-table-again
12928| a | 13809| a |
@@ -12958,14 +13839,14 @@ The first column of the table is removed from the table before processing,
12958and is then reapplied to the results. 13839and is then reapplied to the results.
12959 13840
12960@example 13841@example
12961#+tblname: with-rownames 13842#+TBLNAME: with-rownames
12962| one | 1 | 2 | 3 | 4 | 5 | 13843| one | 1 | 2 | 3 | 4 | 5 |
12963| two | 6 | 7 | 8 | 9 | 10 | 13844| two | 6 | 7 | 8 | 9 | 10 |
12964 13845
12965#+srcname: echo-table-once-again 13846#+NAME: echo-table-once-again
12966#+begin_src python :var tab=with-rownames :rownames yes 13847#+BEGIN_SRC python :var tab=with-rownames :rownames yes
12967 return [[val + 10 for val in row] for row in tab] 13848 return [[val + 10 for val in row] for row in tab]
12968#+end_src 13849#+END_SRC
12969 13850
12970#+results: echo-table-once-again 13851#+results: echo-table-once-again
12971| one | 11 | 12 | 13 | 14 | 15 | 13852| one | 11 | 12 | 13 | 14 | 15 |
@@ -12988,12 +13869,23 @@ permissions of the tangled file are set to make it executable.
12988@node eval, , shebang, Specific header arguments 13869@node eval, , shebang, Specific header arguments
12989@subsubsection @code{:eval} 13870@subsubsection @code{:eval}
12990The @code{:eval} header argument can be used to limit the evaluation of 13871The @code{:eval} header argument can be used to limit the evaluation of
12991specific code blocks. @code{:eval} accepts two arguments ``never'' and 13872specific code blocks. The @code{:eval} header argument can be useful for
12992``query''. @code{:eval never} will ensure that a code block is never 13873protecting against the evaluation of dangerous code blocks or to ensure that
12993evaluated, this can be useful for protecting against the evaluation of 13874evaluation will require a query regardless of the value of the
12994dangerous code blocks. @code{:eval query} will require a query for every 13875@code{org-confirm-babel-evaluate} variable. The possible values of
12995execution of a code block regardless of the value of the 13876@code{:eval} and their effects are shown below.
12996@code{org-confirm-babel-evaluate} variable. 13877
13878@table @code
13879@item never or no
13880The code block will not be evaluated under any circumstances.
13881@item query
13882Evaluation of the code block will require a query.
13883@item never-export or no-export
13884The code block will not be evaluated during export but may still be called
13885interactively.
13886@item query-export
13887Evaluation of the code block during export will require a query.
13888@end table
12997 13889
12998If this header argument is not set then evaluation is determined by the value 13890If this header argument is not set then evaluation is determined by the value
12999of the @code{org-confirm-babel-evaluate} variable see @ref{Code evaluation 13891of the @code{org-confirm-babel-evaluate} variable see @ref{Code evaluation
@@ -13016,7 +13908,7 @@ of the possible results header arguments see @ref{results}.
13016@end multitable 13908@end multitable
13017 13909
13018Note: With @code{:results value}, the result in both @code{:session} and 13910Note: With @code{:results value}, the result in both @code{:session} and
13019non-session is returned to Org-mode as a table (a one- or two-dimensional 13911non-session is returned to Org mode as a table (a one- or two-dimensional
13020vector of strings or numbers) when appropriate. 13912vector of strings or numbers) when appropriate.
13021 13913
13022@subsection Non-session 13914@subsection Non-session
@@ -13062,26 +13954,26 @@ were passed to a non-interactive interpreter running as an external
13062process. For example, compare the following two blocks: 13954process. For example, compare the following two blocks:
13063 13955
13064@example 13956@example
13065#+begin_src python :results output 13957#+BEGIN_SRC python :results output
13066 print "hello" 13958 print "hello"
13067 2 13959 2
13068 print "bye" 13960 print "bye"
13069#+end_src 13961#+END_SRC
13070 13962
13071#+resname: 13963#+results:
13072: hello 13964: hello
13073: bye 13965: bye
13074@end example 13966@end example
13075 13967
13076In non-session mode, the `2' is not printed and does not appear. 13968In non-session mode, the `2' is not printed and does not appear.
13077@example 13969@example
13078#+begin_src python :results output :session 13970#+BEGIN_SRC python :results output :session
13079 print "hello" 13971 print "hello"
13080 2 13972 2
13081 print "bye" 13973 print "bye"
13082#+end_src 13974#+END_SRC
13083 13975
13084#+resname: 13976#+results:
13085: hello 13977: hello
13086: 2 13978: 2
13087: bye 13979: bye
@@ -13109,7 +14001,8 @@ When a code block is tangled or evaluated, whether or not ``noweb''
13109references are expanded depends upon the value of the @code{:noweb} header 14001references are expanded depends upon the value of the @code{:noweb} header
13110argument. If @code{:noweb yes}, then a Noweb reference is expanded before 14002argument. If @code{:noweb yes}, then a Noweb reference is expanded before
13111evaluation. If @code{:noweb no}, the default, then the reference is not 14003evaluation. If @code{:noweb no}, the default, then the reference is not
13112expanded before evaluation. 14004expanded before evaluation. See the @ref{noweb-ref} header argument for
14005a more flexible way to resolve noweb references.
13113 14006
13114Note: the default value, @code{:noweb no}, was chosen to ensure that 14007Note: the default value, @code{:noweb no}, was chosen to ensure that
13115correct code is not broken in a language, such as Ruby, where 14008correct code is not broken in a language, such as Ruby, where
@@ -13117,11 +14010,17 @@ correct code is not broken in a language, such as Ruby, where
13117syntactically valid in languages that you use, then please consider setting 14010syntactically valid in languages that you use, then please consider setting
13118the default value. 14011the default value.
13119 14012
14013Note: if noweb tangling is slow in large Org-mode files consider setting the
14014@code{*org-babel-use-quick-and-dirty-noweb-expansion*} variable to true.
14015This will result in faster noweb reference resolution at the expense of not
14016correctly resolving inherited values of the @code{:noweb-ref} header
14017argument.
14018
13120@node Key bindings and useful functions, Batch execution, Noweb reference syntax, Working With Source Code 14019@node Key bindings and useful functions, Batch execution, Noweb reference syntax, Working With Source Code
13121@section Key bindings and useful functions 14020@section Key bindings and useful functions
13122@cindex code block, key bindings 14021@cindex code block, key bindings
13123 14022
13124Many common Org-mode key sequences are re-bound depending on 14023Many common Org mode key sequences are re-bound depending on
13125the context. 14024the context.
13126 14025
13127Within a code block, the following key bindings 14026Within a code block, the following key bindings
@@ -13138,7 +14037,7 @@ are active:
13138@item @kbd{M-@key{down}} @tab @code{org-babel-pop-to-session} 14037@item @kbd{M-@key{down}} @tab @code{org-babel-pop-to-session}
13139@end multitable 14038@end multitable
13140 14039
13141In an Org-mode buffer, the following key bindings are active: 14040In an Org mode buffer, the following key bindings are active:
13142 14041
13143@multitable @columnfractions 0.45 0.55 14042@multitable @columnfractions 0.45 0.55
13144@kindex C-c C-v a 14043@kindex C-c C-v a
@@ -13255,7 +14154,7 @@ emacs -Q --batch -l $ORGINSTALL \
13255@cindex tag completion 14154@cindex tag completion
13256@cindex link abbreviations, completion of 14155@cindex link abbreviations, completion of
13257 14156
13258Emacs would not be Emacs without completion, and Org-mode uses it whenever it 14157Emacs would not be Emacs without completion, and Org mode uses it whenever it
13259makes sense. If you prefer an @i{iswitchb}- or @i{ido}-like interface for 14158makes sense. If you prefer an @i{iswitchb}- or @i{ido}-like interface for
13260some of the completion prompts, you can specify your preference by setting at 14159some of the completion prompts, you can specify your preference by setting at
13261most one of the variables @code{org-completion-use-iswitchb} 14160most one of the variables @code{org-completion-use-iswitchb}
@@ -13290,7 +14189,7 @@ buffer.
13290After @samp{[}, complete link abbreviations (@pxref{Link abbreviations}). 14189After @samp{[}, complete link abbreviations (@pxref{Link abbreviations}).
13291@item 14190@item
13292After @samp{#+}, complete the special keywords like @samp{TYP_TODO} or 14191After @samp{#+}, complete the special keywords like @samp{TYP_TODO} or
13293@samp{OPTIONS} which set file-specific options for Org-mode. When the 14192@samp{OPTIONS} which set file-specific options for Org mode. When the
13294option keyword is already complete, pressing @kbd{M-@key{TAB}} again 14193option keyword is already complete, pressing @kbd{M-@key{TAB}} again
13295will insert example settings for this keyword. 14194will insert example settings for this keyword.
13296@item 14195@item
@@ -13306,7 +14205,7 @@ Elsewhere, complete dictionary words using Ispell.
13306@cindex template insertion 14205@cindex template insertion
13307@cindex insertion, of templates 14206@cindex insertion, of templates
13308 14207
13309Org-mode supports insertion of empty structural elements (like 14208Org mode supports insertion of empty structural elements (like
13310@code{#+BEGIN_SRC} and @code{#+END_SRC} pairs) with just a few key 14209@code{#+BEGIN_SRC} and @code{#+END_SRC} pairs) with just a few key
13311strokes. This is achieved through a native template expansion mechanism. 14210strokes. This is achieved through a native template expansion mechanism.
13312Note that Emacs has several other template mechanisms which could be used in 14211Note that Emacs has several other template mechanisms which could be used in
@@ -13438,7 +14337,7 @@ lines into the buffer (@pxref{In-buffer settings}).
13438@cindex in-buffer settings 14337@cindex in-buffer settings
13439@cindex special keywords 14338@cindex special keywords
13440 14339
13441Org-mode uses special lines in the buffer to define settings on a 14340Org mode uses special lines in the buffer to define settings on a
13442per-file basis. These lines start with a @samp{#+} followed by a 14341per-file basis. These lines start with a @samp{#+} followed by a
13443keyword, a colon, and then individual words defining a setting. Several 14342keyword, a colon, and then individual words defining a setting. Several
13444setting words can be in the same line, but you can also have multiple 14343setting words can be in the same line, but you can also have multiple
@@ -13497,14 +14396,14 @@ buffer, most useful for specifying the allowed values of a property.
13497@item #+SETUPFILE: file 14396@item #+SETUPFILE: file
13498This line defines a file that holds more in-buffer setup. Normally this is 14397This line defines a file that holds more in-buffer setup. Normally this is
13499entirely ignored. Only when the buffer is parsed for option-setting lines 14398entirely ignored. Only when the buffer is parsed for option-setting lines
13500(i.e.@: when starting Org-mode for a file, when pressing @kbd{C-c C-c} in a 14399(i.e.@: when starting Org mode for a file, when pressing @kbd{C-c C-c} in a
13501settings line, or when exporting), then the contents of this file are parsed 14400settings line, or when exporting), then the contents of this file are parsed
13502as if they had been included in the buffer. In particular, the file can be 14401as if they had been included in the buffer. In particular, the file can be
13503any other Org-mode file with internal setup. You can visit the file the 14402any other Org mode file with internal setup. You can visit the file the
13504cursor is in the line with @kbd{C-c '}. 14403cursor is in the line with @kbd{C-c '}.
13505@item #+STARTUP: 14404@item #+STARTUP:
13506@cindex #+STARTUP: 14405@cindex #+STARTUP:
13507This line sets options to be used at startup of Org-mode, when an 14406This line sets options to be used at startup of Org mode, when an
13508Org file is being visited. 14407Org file is being visited.
13509 14408
13510The first set of options deals with the initial visibility of the outline 14409The first set of options deals with the initial visibility of the outline
@@ -13527,7 +14426,7 @@ showeverything @r{show even drawer contents}
13527@cindex @code{indent}, STARTUP keyword 14426@cindex @code{indent}, STARTUP keyword
13528@cindex @code{noindent}, STARTUP keyword 14427@cindex @code{noindent}, STARTUP keyword
13529Dynamic virtual indentation is controlled by the variable 14428Dynamic virtual indentation is controlled by the variable
13530@code{org-startup-indented}@footnote{Emacs 23 and Org-mode 6.29 are required} 14429@code{org-startup-indented}@footnote{Emacs 23 and Org mode 6.29 are required}
13531@example 14430@example
13532indent @r{start with @code{org-indent-mode} turned on} 14431indent @r{start with @code{org-indent-mode} turned on}
13533noindent @r{start with @code{org-indent-mode} turned off} 14432noindent @r{start with @code{org-indent-mode} turned off}
@@ -13748,6 +14647,8 @@ ordered list.
13748@item 14647@item
13749If the cursor is on the @code{#+BEGIN} line of a dynamic block, the 14648If the cursor is on the @code{#+BEGIN} line of a dynamic block, the
13750block is updated. 14649block is updated.
14650@item
14651If the cursor is at a timestamp, fix the day name in the timestamp.
13751@end itemize 14652@end itemize
13752 14653
13753@node Clean view, TTY keys, The very busy C-c C-c key, Miscellaneous 14654@node Clean view, TTY keys, The very busy C-c C-c key, Miscellaneous
@@ -13956,11 +14857,11 @@ setup. See the installation instructions in the file
13956@item @file{cdlatex.el} by Carsten Dominik 14857@item @file{cdlatex.el} by Carsten Dominik
13957@cindex @file{cdlatex.el} 14858@cindex @file{cdlatex.el}
13958@cindex Dominik, Carsten 14859@cindex Dominik, Carsten
13959Org-mode can make use of the CDLa@TeX{} package to efficiently enter 14860Org mode can make use of the CD@LaTeX{} package to efficiently enter
13960@LaTeX{} fragments into Org files. See @ref{CDLaTeX mode}. 14861@LaTeX{} fragments into Org files. See @ref{CDLaTeX mode}.
13961@item @file{imenu.el} by Ake Stenhoff and Lars Lindberg 14862@item @file{imenu.el} by Ake Stenhoff and Lars Lindberg
13962@cindex @file{imenu.el} 14863@cindex @file{imenu.el}
13963Imenu allows menu access to an index of items in a file. Org-mode 14864Imenu allows menu access to an index of items in a file. Org mode
13964supports Imenu---all you need to do to get the index is the following: 14865supports Imenu---all you need to do to get the index is the following:
13965@lisp 14866@lisp
13966(add-hook 'org-mode-hook 14867(add-hook 'org-mode-hook
@@ -13977,7 +14878,7 @@ Org used to use this package for capture, but no longer does.
13977@cindex @file{speedbar.el} 14878@cindex @file{speedbar.el}
13978@cindex Ludlam, Eric M. 14879@cindex Ludlam, Eric M.
13979Speedbar is a package that creates a special frame displaying files and 14880Speedbar is a package that creates a special frame displaying files and
13980index items in files. Org-mode supports Speedbar and allows you to 14881index items in files. Org mode supports Speedbar and allows you to
13981drill into Org files directly from the Speedbar. It also allows you to 14882drill into Org files directly from the Speedbar. It also allows you to
13982restrict the scope of agenda commands to a file or a subtree by using 14883restrict the scope of agenda commands to a file or a subtree by using
13983the command @kbd{<} in the Speedbar frame. 14884the command @kbd{<} in the Speedbar frame.
@@ -13991,8 +14892,8 @@ the command @kbd{<} in the Speedbar frame.
13991Complex ASCII tables with automatic line wrapping, column- and row-spanning, 14892Complex ASCII tables with automatic line wrapping, column- and row-spanning,
13992and alignment can be created using the Emacs table package by Takaaki Ota 14893and alignment can be created using the Emacs table package by Takaaki Ota
13993(@uref{http://sourceforge.net/projects/table}, and also part of Emacs 22). 14894(@uref{http://sourceforge.net/projects/table}, and also part of Emacs 22).
13994Org-mode will recognize these tables and export them properly. Because of 14895Org mode will recognize these tables and export them properly. Because of
13995interference with other Org-mode functionality, you unfortunately cannot edit 14896interference with other Org mode functionality, you unfortunately cannot edit
13996these tables directly in the buffer. Instead, you need to use the command 14897these tables directly in the buffer. Instead, you need to use the command
13997@kbd{C-c '} to edit them, similar to source code snippets. 14898@kbd{C-c '} to edit them, similar to source code snippets.
13998 14899
@@ -14002,7 +14903,7 @@ Edit a @file{table.el} table. Works when the cursor is in a table.el table.
14002@c 14903@c
14003@orgcmd{C-c ~,org-table-create-with-table.el} 14904@orgcmd{C-c ~,org-table-create-with-table.el}
14004Insert a @file{table.el} table. If there is already a table at point, this 14905Insert a @file{table.el} table. If there is already a table at point, this
14005command converts it between the @file{table.el} format and the Org-mode 14906command converts it between the @file{table.el} format and the Org mode
14006format. See the documentation string of the command 14907format. See the documentation string of the command
14007@code{org-convert-table} for the restrictions under which this is 14908@code{org-convert-table} for the restrictions under which this is
14008possible. 14909possible.
@@ -14011,13 +14912,13 @@ possible.
14011@item @file{footnote.el} by Steven L. Baur 14912@item @file{footnote.el} by Steven L. Baur
14012@cindex @file{footnote.el} 14913@cindex @file{footnote.el}
14013@cindex Baur, Steven L. 14914@cindex Baur, Steven L.
14014Org-mode recognizes numerical footnotes as provided by this package. 14915Org mode recognizes numerical footnotes as provided by this package.
14015However, Org-mode also has its own footnote support (@pxref{Footnotes}), 14916However, Org mode also has its own footnote support (@pxref{Footnotes}),
14016which makes using @file{footnote.el} unnecessary. 14917which makes using @file{footnote.el} unnecessary.
14017@end table 14918@end table
14018 14919
14019@node Conflicts, , Cooperation, Interaction 14920@node Conflicts, , Cooperation, Interaction
14020@subsection Packages that lead to conflicts with Org-mode 14921@subsection Packages that lead to conflicts with Org mode
14021 14922
14022@table @asis 14923@table @asis
14023 14924
@@ -14029,7 +14930,7 @@ This conflicts with the use of @kbd{S-@key{cursor}} commands in Org to change
14029timestamps, TODO keywords, priorities, and item bullet types if the cursor is 14930timestamps, TODO keywords, priorities, and item bullet types if the cursor is
14030at such a location. By default, @kbd{S-@key{cursor}} commands outside 14931at such a location. By default, @kbd{S-@key{cursor}} commands outside
14031special contexts don't do anything, but you can customize the variable 14932special contexts don't do anything, but you can customize the variable
14032@code{org-support-shift-select}. Org-mode then tries to accommodate shift 14933@code{org-support-shift-select}. Org mode then tries to accommodate shift
14033selection by (i) using it outside of the special contexts where special 14934selection by (i) using it outside of the special contexts where special
14034commands apply, and by (ii) extending an existing active region even if the 14935commands apply, and by (ii) extending an existing active region even if the
14035cursor moves across a special context. 14936cursor moves across a special context.
@@ -14044,7 +14945,7 @@ region. In fact, Emacs 23 has this built-in in the form of
14044@code{shift-selection-mode}, see previous paragraph. If you are using Emacs 14945@code{shift-selection-mode}, see previous paragraph. If you are using Emacs
1404523, you probably don't want to use another package for this purpose. However, 1494623, you probably don't want to use another package for this purpose. However,
14046if you prefer to leave these keys to a different package while working in 14947if you prefer to leave these keys to a different package while working in
14047Org-mode, configure the variable @code{org-replace-disputed-keys}. When set, 14948Org mode, configure the variable @code{org-replace-disputed-keys}. When set,
14048Org will move the following key bindings in Org files, and in the agenda 14949Org will move the following key bindings in Org files, and in the agenda
14049buffer (but not during date selection). 14950buffer (but not during date selection).
14050 14951
@@ -14069,7 +14970,7 @@ fixed this problem:
14069(add-hook 'org-mode-hook 14970(add-hook 'org-mode-hook
14070 (lambda () 14971 (lambda ()
14071 (org-set-local 'yas/trigger-key [tab]) 14972 (org-set-local 'yas/trigger-key [tab])
14072 (define-key yas/keymap [tab] 'yas/next-field-group))) 14973 (define-key yas/keymap [tab] 'yas/next-field-or-maybe-expand)))
14073@end lisp 14974@end lisp
14074 14975
14075The latest version of yasnippet doesn't play well with Org mode. If the 14976The latest version of yasnippet doesn't play well with Org mode. If the
@@ -14096,7 +14997,7 @@ Then, tell Org mode what to do with the new function:
14096@cindex @file{windmove.el} 14997@cindex @file{windmove.el}
14097This package also uses the @kbd{S-<cursor>} keys, so everything written 14998This package also uses the @kbd{S-<cursor>} keys, so everything written
14098in the paragraph above about CUA mode also applies here. If you want make 14999in the paragraph above about CUA mode also applies here. If you want make
14099the windmove function active in locations where Org-mode does not have 15000the windmove function active in locations where Org mode does not have
14100special functionality on @kbd{S-@key{cursor}}, add this to your 15001special functionality on @kbd{S-@key{cursor}}, add this to your
14101configuration: 15002configuration:
14102 15003
@@ -14112,7 +15013,7 @@ configuration:
14112@cindex @file{viper.el} 15013@cindex @file{viper.el}
14113@kindex C-c / 15014@kindex C-c /
14114Viper uses @kbd{C-c /} and therefore makes this key not access the 15015Viper uses @kbd{C-c /} and therefore makes this key not access the
14115corresponding Org-mode command @code{org-sparse-tree}. You need to find 15016corresponding Org mode command @code{org-sparse-tree}. You need to find
14116another key for this command, or override the key in 15017another key for this command, or override the key in
14117@code{viper-vi-global-user-map} with 15018@code{viper-vi-global-user-map} with
14118 15019
@@ -14197,7 +15098,7 @@ maintained by the Worg project and can be found at
14197 15098
14198A large number of add-on packages have been written by various authors. 15099A large number of add-on packages have been written by various authors.
14199These packages are not part of Emacs, but they are distributed as contributed 15100These packages are not part of Emacs, but they are distributed as contributed
14200packages with the separate release available at the Org-mode home page at 15101packages with the separate release available at the Org mode home page at
14201@uref{http://orgmode.org}. The list of contributed packages, along with 15102@uref{http://orgmode.org}. The list of contributed packages, along with
14202documentation about each package, is maintained by the Worg project at 15103documentation about each package, is maintained by the Worg project at
14203@uref{http://orgmode.org/worg/org-contrib/}. 15104@uref{http://orgmode.org/worg/org-contrib/}.
@@ -14321,7 +15222,7 @@ Add-ons can tap into this functionality by providing a function that detects
14321special context for that add-on and executes functionality appropriate for 15222special context for that add-on and executes functionality appropriate for
14322the context. Here is an example from Dan Davison's @file{org-R.el} which 15223the context. Here is an example from Dan Davison's @file{org-R.el} which
14323allows you to evaluate commands based on the @file{R} programming language 15224allows you to evaluate commands based on the @file{R} programming language
14324@footnote{@file{org-R.el} has been replaced by the org-mode functionality 15225@footnote{@file{org-R.el} has been replaced by the Org mode functionality
14325described in @ref{Working With Source Code} and is now obsolete.}. For this 15226described in @ref{Working With Source Code} and is now obsolete.}. For this
14326package, special contexts are lines that start with @code{#+R:} or 15227package, special contexts are lines that start with @code{#+R:} or
14327@code{#+RR:}. 15228@code{#+RR:}.
@@ -14374,12 +15275,12 @@ can use Org's facilities to edit and structure lists by turning
14374 15275
14375@menu 15276@menu
14376* Radio tables:: Sending and receiving radio tables 15277* Radio tables:: Sending and receiving radio tables
14377* A LaTeX example:: Step by step, almost a tutorial 15278* A @LaTeX{} example:: Step by step, almost a tutorial
14378* Translator functions:: Copy and modify 15279* Translator functions:: Copy and modify
14379* Radio lists:: Doing the same for lists 15280* Radio lists:: Doing the same for lists
14380@end menu 15281@end menu
14381 15282
14382@node Radio tables, A LaTeX example, Tables in arbitrary syntax, Tables in arbitrary syntax 15283@node Radio tables, A @LaTeX{} example, Tables in arbitrary syntax, Tables in arbitrary syntax
14383@subsection Radio tables 15284@subsection Radio tables
14384@cindex radio tables 15285@cindex radio tables
14385 15286
@@ -14447,7 +15348,7 @@ makes this comment-toggling very easy, in particular if you bind it to a
14447key. 15348key.
14448@end itemize 15349@end itemize
14449 15350
14450@node A LaTeX example, Translator functions, Radio tables, Tables in arbitrary syntax 15351@node A @LaTeX{} example, Translator functions, Radio tables, Tables in arbitrary syntax
14451@subsection A @LaTeX{} example of radio tables 15352@subsection A @LaTeX{} example of radio tables
14452@cindex @LaTeX{}, and Orgtbl mode 15353@cindex @LaTeX{}, and Orgtbl mode
14453 15354
@@ -14557,7 +15458,7 @@ applied. Similar to @code{fmt}, functions of two arguments can be
14557supplied instead of strings. 15458supplied instead of strings.
14558@end table 15459@end table
14559 15460
14560@node Translator functions, Radio lists, A LaTeX example, Tables in arbitrary syntax 15461@node Translator functions, Radio lists, A @LaTeX{} example, Tables in arbitrary syntax
14561@subsection Translator functions 15462@subsection Translator functions
14562@cindex HTML, and Orgtbl mode 15463@cindex HTML, and Orgtbl mode
14563@cindex translator function 15464@cindex translator function
@@ -14877,7 +15778,7 @@ You may also modify parameters on the fly like this:
14877@example 15778@example
14878emacs -batch -l ~/.emacs \ 15779emacs -batch -l ~/.emacs \
14879 -eval '(org-batch-agenda "a" \ 15780 -eval '(org-batch-agenda "a" \
14880 org-agenda-span month \ 15781 org-agenda-span (quote month) \
14881 org-agenda-include-diary nil \ 15782 org-agenda-include-diary nil \
14882 org-agenda-files (quote ("~/org/project.org")))' \ 15783 org-agenda-files (quote ("~/org/project.org")))' \
14883 | lpr 15784 | lpr
@@ -15139,7 +16040,7 @@ The following example counts the number of entries with TODO keyword
15139 16040
15140@uref{http://mobileorg.ncogni.to/, MobileOrg} is an application for the 16041@uref{http://mobileorg.ncogni.to/, MobileOrg} is an application for the
15141@i{iPhone/iPod Touch} series of devices, developed by Richard Moreland. 16042@i{iPhone/iPod Touch} series of devices, developed by Richard Moreland.
15142@i{MobileOrg} offers offline viewing and capture support for an Org-mode 16043@i{MobileOrg} offers offline viewing and capture support for an Org mode
15143system rooted on a ``real'' computer. It does also allow you to record 16044system rooted on a ``real'' computer. It does also allow you to record
15144changes to existing entries. Android users should check out 16045changes to existing entries. Android users should check out
15145@uref{http://wiki.github.com/matburt/mobileorg-android/, MobileOrg Android} 16046@uref{http://wiki.github.com/matburt/mobileorg-android/, MobileOrg Android}
@@ -15168,7 +16069,7 @@ in-buffer settings, but it will understand the logistics of TODO state
15168 16069
15169MobileOrg needs to interact with Emacs through a directory on a server. If you 16070MobileOrg needs to interact with Emacs through a directory on a server. If you
15170are using a public server, you should consider to encrypt the files that are 16071are using a public server, you should consider to encrypt the files that are
15171uploaded to the server. This can be done with Org-mode 7.02 and with 16072uploaded to the server. This can be done with Org mode 7.02 and with
15172@i{MobileOrg 1.5} (iPhone version), and you need an @file{openssl} 16073@i{MobileOrg 1.5} (iPhone version), and you need an @file{openssl}
15173installation on your system. To turn on encryption, set a password in 16074installation on your system. To turn on encryption, set a password in
15174@i{MobileOrg} and, on the Emacs side, configure the variable 16075@i{MobileOrg} and, on the Emacs side, configure the variable
@@ -15191,7 +16092,7 @@ Emacs about it:
15191(setq org-mobile-directory "~/Dropbox/MobileOrg") 16092(setq org-mobile-directory "~/Dropbox/MobileOrg")
15192@end lisp 16093@end lisp
15193 16094
15194Org-mode has commands to put files for @i{MobileOrg} into that directory, 16095Org mode has commands to put files for @i{MobileOrg} into that directory,
15195and to read captured notes from there. 16096and to read captured notes from there.
15196 16097
15197@node Pushing to MobileOrg, Pulling from MobileOrg, Setting up the staging area, MobileOrg 16098@node Pushing to MobileOrg, Pulling from MobileOrg, Setting up the staging area, MobileOrg
@@ -15204,7 +16105,7 @@ can be included by customizing @code{org-mobile-files}. File names will be
15204staged with paths relative to @code{org-directory}, so all files should be 16105staged with paths relative to @code{org-directory}, so all files should be
15205inside this directory. The push operation also creates a special Org file 16106inside this directory. The push operation also creates a special Org file
15206@file{agendas.org} with all custom agenda view defined by the 16107@file{agendas.org} with all custom agenda view defined by the
15207user@footnote{While creating the agendas, Org-mode will force ID properties 16108user@footnote{While creating the agendas, Org mode will force ID properties
15208on all referenced entries, so that these entries can be uniquely identified 16109on all referenced entries, so that these entries can be uniquely identified
15209if @i{MobileOrg} flags them for further action. If you do not want to get 16110if @i{MobileOrg} flags them for further action. If you do not want to get
15210these properties in so many entries, you can set the variable 16111these properties in so many entries, you can set the variable
@@ -15305,7 +16206,7 @@ Before I get to this list, a few special mentions are in order:
15305@table @i 16206@table @i
15306@item Bastien Guerry 16207@item Bastien Guerry
15307Bastien has written a large number of extensions to Org (most of them 16208Bastien has written a large number of extensions to Org (most of them
15308integrated into the core by now), including the LaTeX exporter and the plain 16209integrated into the core by now), including the @LaTeX{} exporter and the plain
15309list parser. His support during the early days, when he basically acted as 16210list parser. His support during the early days, when he basically acted as
15310co-maintainer, was central to the success of this project. Bastien also 16211co-maintainer, was central to the success of this project. Bastien also
15311invented Worg, helped establishing the Web presence of Org, and sponsors 16212invented Worg, helped establishing the Web presence of Org, and sponsors
@@ -15340,13 +16241,13 @@ know what I am missing here!
15340@i{Thomas Baumann} wrote @file{org-bbdb.el} and @file{org-mhe.el}. 16241@i{Thomas Baumann} wrote @file{org-bbdb.el} and @file{org-mhe.el}.
15341@item 16242@item
15342@i{Christophe Bataillon} created the great unicorn logo that we use on the 16243@i{Christophe Bataillon} created the great unicorn logo that we use on the
15343Org-mode website. 16244Org mode website.
15344@item 16245@item
15345@i{Alex Bochannek} provided a patch for rounding timestamps. 16246@i{Alex Bochannek} provided a patch for rounding timestamps.
15346@item 16247@item
15347@i{Jan Böcker} wrote @file{org-docview.el}. 16248@i{Jan Böcker} wrote @file{org-docview.el}.
15348@item 16249@item
15349@i{Brad Bozarth} showed how to pull RSS feed data into Org-mode files. 16250@i{Brad Bozarth} showed how to pull RSS feed data into Org mode files.
15350@item 16251@item
15351@i{Tom Breton} wrote @file{org-choose.el}. 16252@i{Tom Breton} wrote @file{org-choose.el}.
15352@item 16253@item
@@ -15522,7 +16423,7 @@ tweaks and features.
15522extension system, added support for mairix, and proposed the mapping API. 16423extension system, added support for mairix, and proposed the mapping API.
15523@item 16424@item
15524@i{Ulf Stegemann} created the table to translate special symbols to HTML, 16425@i{Ulf Stegemann} created the table to translate special symbols to HTML,
15525LaTeX, UTF-8, Latin-1 and ASCII. 16426@LaTeX{}, UTF-8, Latin-1 and ASCII.
15526@item 16427@item
15527@i{Andy Stewart} contributed code to @file{org-w3m.el}, to copy HTML content 16428@i{Andy Stewart} contributed code to @file{org-w3m.el}, to copy HTML content
15528with links transformation to Org syntax. 16429with links transformation to Org syntax.
@@ -15530,10 +16431,10 @@ with links transformation to Org syntax.
15530@i{David O'Toole} wrote @file{org-publish.el} and drafted the manual 16431@i{David O'Toole} wrote @file{org-publish.el} and drafted the manual
15531chapter about publishing. 16432chapter about publishing.
15532@item 16433@item
15533@i{Jambunathan K} contributed the OpenDocumentText exporter. 16434@i{Jambunathan K} contributed the @acronym{ODT} exporter.
15534@item 16435@item
15535@i{Sebastien Vauban} reported many issues with LaTeX and BEAMER export and 16436@i{Sebastien Vauban} reported many issues with @LaTeX{} and BEAMER export and
15536enabled source code highlighting in Gnus. 16437enabled source code highlighling in Gnus.
15537@item 16438@item
15538@i{Stefan Vollmar} organized a video-recorded talk at the 16439@i{Stefan Vollmar} organized a video-recorded talk at the
15539Max-Planck-Institute for Neurology. He also inspired the creation of a 16440Max-Planck-Institute for Neurology. He also inspired the creation of a