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