aboutsummaryrefslogtreecommitdiffstats
path: root/doc
diff options
context:
space:
mode:
authorBastien Guerry2013-11-12 14:06:26 +0100
committerBastien Guerry2013-11-12 14:06:26 +0100
commit271672fad74cdbc9065d23d6e6cee1b8540f571b (patch)
treed322b956ec0e74ee33b22354ef00839b23b1618d /doc
parentf201cf3a8143b0b34b07769fc7d73dd14761b87b (diff)
downloademacs-271672fad74cdbc9065d23d6e6cee1b8540f571b.tar.gz
emacs-271672fad74cdbc9065d23d6e6cee1b8540f571b.zip
Merge Org version 8.2.3a.
Diffstat (limited to 'doc')
-rw-r--r--doc/misc/ChangeLog480
-rw-r--r--doc/misc/org.texi5495
2 files changed, 3814 insertions, 2161 deletions
diff --git a/doc/misc/ChangeLog b/doc/misc/ChangeLog
index 1396fc12f43..976922a3978 100644
--- a/doc/misc/ChangeLog
+++ b/doc/misc/ChangeLog
@@ -1,3 +1,483 @@
12013-11-12 Aaron Ecay <aaronecay@gmail.com>
2
3 * org.texi (Exporting code blocks): Document the 'inline-only
4 setting for `org-export-babel-evaluate'. Document how :var
5 introduces code block dependencies.
6
72013-11-12 Achim Gratz <Stromeko@Stromeko.DE>
8
9 * org.texi (Header arguments): Document header-args[:lang]
10 properties and remove deprecated old-style properties from
11 documentation.
12
13 * org.texi (Agenda commands): Remove footnote from @tsubheading
14 and add a sentence with the reference instead.
15
162013-11-12 Bastien Guerry <bzg@gnu.org>
17
18 * org.texi (Catching invisible edits):
19 * org.texi (Plain lists, Plain lists):
20 * org.texi (Advanced configuration):
21 * org.texi (Tag groups):
22 * org.texi (Conventions):
23 * org.texi (Checkboxes, Radio lists):
24 * org.texi (Top, Summary, Exporting):
25 * org.texi (In-buffer settings): Fix typos.
26
27 * org.texi (Refile and copy): Document `org-copy' and `C-3 C-c
28 C-w'. Add an index entry for `org-refile-keep'.
29
30 * org.texi (Plain lists): Add an index entry for sorting plain
31 list. Document sorting by checked status for check lists.
32
33 * org.texi (Publishing options): Fix old variable names.
34
35 * org.texi (Orgstruct mode): Fix suggested setting of
36 `orgstruct-heading-prefix-regexp'.
37
38 * org.texi (Export settings): Document
39 `org-export-allow-bind-keywords'.
40
41 * org.texi (History and Acknowledgments): Small rephrasing.
42
43 * org.texi (Template elements): Add a footnote about tags accepted
44 in a year datetree.
45
46 * org.texi (Beamer export, @LaTeX{} and PDF export)
47 (Header and sectioning, @LaTeX{} specific attributes): Enhance
48 style.
49
50 * org.texi (Agenda commands): Add a footnote about dragging agenda
51 lines: it does not persist and it does not change the .org files.
52
53 * org.texi (Agenda commands): Add a table heading for dragging
54 agenda lines forward/backward.
55
56 * org.texi (Agenda commands): Add documentation for
57 `org-agenda-bulk-toggle' and `org-agenda-bulk-toggle-all'.
58
59 * org.texi (Publishing options): Update the list of options.
60 (Simple example, Complex example): Fix the examples.
61
62 * org.texi (Formula syntax for Calc): Don't use a bold font the
63 warning.
64
65 * org.texi (Other built-in back-ends): New section.
66
67 * org.texi (Editing source code): Document
68 `org-edit-src-auto-save-idle-delay' and
69 `org-edit-src-turn-on-auto-save'.
70
71 * org.texi (External links): Document contributed link types
72 separately.
73
74 * org.texi (Closing items): Document
75 `org-closed-keep-when-no-todo'.
76
77 * org.texi (Export back-ends): Rename from "Export formats".
78 (The Export Dispatcher): Remove reference to
79 `org-export-run-in-background'.
80 (Export settings): Minor rewrites.
81 (ASCII/Latin-1/UTF-8 export): Update variable's name.
82 (In-buffer settings): Add #+HTML_HEAD_EXTRA.
83
84 * org.texi (Export in foreign buffers): New section.
85 (Exporting): Remove documentation about converting the selected
86 region.
87
88 * org.texi (Advanced configuration): Put the filter valid types in
89 a table. Use @lisp and @smalllisp.
90
91 * org.texi: Use @code{nil} instead of nil. Update the maintainer
92 contact info.
93
94 * org.texi (Exporting): Better introductory sentence. Add a note
95 about conversion commands.
96 (Feedback, Orgstruct mode, Built-in table editor)
97 (Built-in table editor, Orgtbl mode, Updating the table)
98 (Property syntax, Capturing column view, Capture)
99 (Agenda files, Agenda commands, CDLaTeX mode, CDLaTeX mode)
100 (Exporting, Extending ODT export)
101 (Working with @LaTeX{} math snippets, dir, Customization)
102 (Radio tables, A @LaTeX{} example, Pulling from MobileOrg):
103 Uniformly use @kbd{M-x command RET}.
104
105 * org.texi (Filtering/limiting agenda items): New subsection.
106 Document the use of `org-agenda-max-*' options and
107 `org-agenda-limit-interactively' from the agenda.
108 (Agenda commands): Move details about filtering commands to
109 the new section, only include a summary here.
110 (Customizing tables in ODT export)
111 (System-wide header arguments, Conflicts, Dynamic blocks): Use
112 spaces for indentation.
113
114 * org.texi (Emphasis and monospace): Mention `org-emphasis-alist'.
115
116 * org.texi (Links in HTML export, Images in HTML export)
117 (post): Fix syntax within #+ATTR_*.
118 (Tables in HTML export): Document `org-html-table-row-tags'
119 and use `org-html-table-default-attributes' instead of
120 `org-html-table-tag'.
121
122 * org.texi (Publishing action, Publishing options)
123 (Publishing links): Major rewrite. Enhance explanations for
124 `org-org-publish-to-org'. Remove reference to
125 `org-export-run-in-background'.
126
127 * org.texi: Fix many small typos. Use #+NAME instead of
128 #+TBLNAME. Use @smalllisp instead of @example.
129 (Special symbols): Add index?
130 (HTML preamble and postamble): Don't mention obsolete use of
131 opt-plist.
132 (JavaScript support): Don't mention the org-jsinfo.el file as it
133 has been merged with ox-html.el.
134
135 * org.texi (Installation, Feedback, Setting Options)
136 (Code evaluation security, org-crypt.el): Use @lisp instead of
137 @example.
138 (Agenda commands): Use @table instead of @example.
139
140 * org.texi (Adding hyperlink types): New appendix.
141
142 * org.texi (ODT export commands, Extending ODT export)
143 (Applying custom styles, Images in ODT export)
144 (Labels and captions in ODT export)
145 (Literal examples in ODT export)
146 (Configuring a document converter)
147 (Working with OpenDocument style files)
148 (Customizing tables in ODT export)
149 (Validating OpenDocument XML): Fix options names.
150
151 * org.texi (History and Acknowledgments): Update acknowledgments
152 to Nicolas. Add Nicolas Goaziou to the list of contributors.
153
154 * org.texi (System-wide header arguments): Don't use "customizing"
155 for setting a variable. Also remove comments.
156
157 * org.texi (Weekly/daily agenda): Add `org-agenda-start-day' and
158 `org-agenda-start-on-weekday' to the variable index and document
159 them.
160
161 * org.texi (Sparse trees, Agenda commands)
162 (@LaTeX{} fragments, Selective export, Export options)
163 (The export dispatcher, ASCII/Latin-1/UTF-8 export)
164 (HTML Export commands, @LaTeX{}/PDF export commands)
165 (iCalendar export, Publishing options, Triggering publication)
166 (In-buffer settings): Update to reflect changes from the new
167 export engine.
168
169 * org.texi (Matching tags and properties): More examples. Explain
170 group tags expansion as regular expressions.
171
172 * org.texi (Tag groups): New section.
173
174 * org.texi (Setting tags): Tiny formatting fixes.
175
176 * org.texi (Plain lists, Checkboxes): Use non-obsolete variable
177 names.
178
179 * org.texi (Storing searches): Add "agenda" and "agenda*" to the
180 concept index. Include example for these agenda views.
181 (Special agenda views): Mention the "agenda*" agenda view.
182
183 * org.texi (Repeated tasks): Document how to ignore a repeater
184 when using both a scheduled and a deadline timetamp.
185
186 * org.texi (Global and local cycling): Wrap in a new subsection.
187 (Initial visibility, Catching invisible edits): New subsections.
188
189 * org.texi (Visibility cycling): Mention that
190 `org-agenda-inhibit-startup' will prevent visibility setting when
191 the agenda opens an Org file for the first time.
192
193 * org.texi (Org syntax): New section.
194
195 * org.texi (Orgstruct mode): Document
196 `orgstruct-heading-prefix-regexp'.
197
198 * org.texi (Speeding up your agendas): New section.
199
200 * org.texi (Installation): When installing Org from ELPA, users
201 should do this from an Emacs session where no .org file has been
202 visited.
203
204 * org.texi (CSS support, In-buffer settings): Update HTML options
205 names.
206
207 * org.texi (Structure editing): Update documentation for
208 `org-insert-heading-or-item'.
209 (Plain lists, Relative timer): Update index entry.
210
211 * org.texi (JavaScript support): Update variable names.
212
213 * org.texi (comments): Minor formatting fix.
214
215 * org.texi (@LaTeX{} fragments): Minor enhancement.
216
217 * org.texi: Update the list contributions.
218
219 * org.texi (Agenda commands): Exporting the agenda to an .org file
220 will not copy the subtrees and the inherited tags. Document
221 `org-agenda-filter-by-regexp'.
222
223 * org.texi (Publishing action, Complex example): Fix names of
224 publishing functions.
225
226 * org.texi (Top, Exporting): Delete references to Freemind.
227 (Freemind export): Delete section.
228
229 * org.texi (Top, Exporting): Delete references to the XOXO export.
230 (XOXO export): Delete section.
231
232 * org.texi (Capture): Mention that org-remember.el is not
233 supported anymore.
234
235 * org.texi (Top, Exporting, Beamer class export): Delete
236 references to the TaskJuggler export.
237 (History and Acknowledgments): Mention that the TaskJuggler has
238 been rewritten by Nicolas and now lives in the contrib/ directory
239 of Org's distribution. Mention that Jambunathan rewrote the HTML
240 exporter. Remove Jambunathan from my own acknowledgments.
241 (TaskJuggler export): Delete.
242
243 * org.texi (HTML preamble and postamble)
244 (Tables in HTML export, Images in HTML export)
245 (Math formatting in HTML export, CSS support)
246 (@LaTeX{} and PDF export, Publishing options): Fix the names of
247 the HTML export and publishing options.
248
249 * org.texi (Literal examples, Export options)
250 (@LaTeX{} and PDF export, Header and sectioning)
251 (Publishing options): Fix LaTeX options names.
252
253 * org.texi (Export options, CSS support, In-buffer settings): Fix
254 references to HTML_LINK_* and HTML_STYLE keywords.
255
256 * org.texi (Export options, In-buffer settings): Fix references to
257 #+SELECT_TAGS and #+EXCLUDE_TAGS and remove reference to #+XSLT.
258
259 * org.texi (Top, Markup, Initial text, Images and tables)
260 (@LaTeX{} fragments, @LaTeX{} fragments, Exporting)
261 (Export options, JavaScript support, Beamer class export): Remove
262 references to the DocBook export, which has been deleted.
263 (History and Acknowledgments): Mention that DocBook has been
264 deleted, suggest to use the Texinfo exporter instead, then to
265 convert the .texi to DocBook with makeinfo.
266 (Links in ODT export, Tables in ODT export): Fix indices.
267
268 * org.texi (Deadlines and scheduling): Add a variable to the
269 index. Add documentation about delays for scheduled tasks.
270
271 * org.texi (Emphasis and monospace): Mention
272 `org-fontify-emphasized-text' and
273 `org-emphasis-regexp-components'.
274
275 * org.texi (References): Small enhancement.
276
277 * org.texi (Column width and alignment): Make the example visually
278 more clear.
279
280 * org.texi (The clock table): Document :mstart and :wstart as a
281 way to set the starting day of the week.
282
283 * org.texi (In-buffer settings): Document new startup keywords.
284 Thanks to John J Foerch for this idea.
285
286 * org.texi (Include files): Tiny formatting fix.
287
288 * org.texi (Activation): Point to the "Conflicts" section.
289
2902013-11-12 Carsten Dominik <carsten.dominik@gmail.com>
291
292 * org.texi (CSS support): Clarify this section.
293
294 * org.texi (@LaTeX{} specific attributes): Document that tabu and
295 tabularx packages are not in the default set of packages.
296
297 * org.texi (Agenda commands): Document fortnight view.
298
299 * org.texi: Document conflict with ecomplete.el.
300
301 * org.texi (History and Acknowledgments): Acknowledgements for
302 Jason Dunsmore and Rakcspace.
303
304 * org.texi: Rename org-crypt.el node to org-crypt.
305
306 * org.texi (A @LaTeX{} example): Fix typo in variable name.
307
308 * org.texi (MobileOrg): Mention the new iPhone developer.
309
310 * org.texi (Table of contents) Improve documentation of TOC
311 placement.
312
313 * org.texi: Explain that date/time information at read-date prompt
314 should start at the beginning, not anywhere in the middle of a
315 long string.
316
3172013-11-12 Christopher Schmidt <christopher@ch.ristopher.com>
318
319 * org.texi (Orgstruct mode): Fix wrong regexp.
320
3212013-11-12 Eric Abrahamsen <eric@ericabrahamsen.net>
322
323 * org.texi: Document export to (X)HTML flavors.
324
3252013-11-12 Eric Schulte <schulte.eric@gmail.com>
326
327 * org.texi (Extracting source code): Mention the prefix argument
328 to org-babel-tangle.
329 (noweb): Removed erroneous negative.
330 (Specific header arguments): Document new header arguments.
331 Documentation for new tangle-mode header argument.
332 (Top): Documentation for new tangle-mode header argument.
333 (rownames): Documentation for new tangle-mode header argument.
334 Mention elisp as special rowname case.
335 (tangle-mode): Documentation for new tangle-mode header argument.
336 (post): Documentation and an example of usage.
337 (var): Remove the "Alternate argument syntax" section from the
338 documentation.
339 (hlines): Note that :hline has no effect for Emacs Lisp code
340 blocks.
341
3422013-11-12 Feng Shu <tumashu@gmail.com>
343
344 * org.texi (@LaTeX{} fragments, Previewing @LaTeX{} fragments)
345 (Math formatting in HTML export)
346 (Working with @LaTeX{} math snippets): Add document about creating
347 formula image with imagemagick.
348
349 * org.texi (@LaTeX{} specific attributes): Document `:caption'
350 attribute of #+ATTR_LATEX.
351
3522013-11-12 Grégoire Jadi <gregoire.jadi@gmail.com>
353
354 * org.texi (Handling links): Fix a typo in
355 `org-startup-with-inline-images' documentation.
356
357 * org.texi (Previewing @LaTeX{} fragments): Document the startup
358 keywords to use for previewing LaTeX fragments or not.
359 (Summary of in-buffer settings): Improve formatting and add an
360 entry for the variable `org-startup-with-latex-preview'.
361
362 * org.texi (Property syntax): Recall the user to refresh the org
363 buffer when properties are set on a per-file basis.
364
3652013-11-12 Gustav Wikström <gustav.erik@gmail.com> (tiny change)
366
367 * org.texi (Matching tags and properties): Clarification.
368
3692013-11-12 Ippei Furuhashi <top.tuna+orgmode@gmail.com>
370
371 * org.texi (Editing and debugging formulas): Add an example when a
372 table has multiple #+TBLFM lines.
373
3742013-11-12 Ivan Vilata i Balaguer <ivan@selidor.net> (tiny change)
375
376 * org.texi (The clock table): Document acceptance of relative
377 times in tstart and tend, link to syntax description and provide
378 example.
379
3802013-11-12 Jarmo Hurri <jarmo.hurri@syk.fi>
381
382 * org.texi (The spreadsheet): Document lookup functions.
383
3842013-11-12 Kodi Arfer <git@arfer.net> (tiny change)
385
386 * org.text (CSS support): Mention .figure-number, .listing-number,
387 and .table-number.
388
3892013-11-12 Michael Brand <michael.ch.brand@gmail.com>
390
391 * org.texi
392 (Formula syntax for Calc, Emacs Lisp forms as formulas): Reformat
393 spreadsheet formula mode strings and some examples from @example
394 block with xy @r{yz} to @table.
395
396 * org.texi (Formula syntax for Calc): Improve the documentation of
397 empty fields in formulas for spreadsheet. Add explanation and
398 example for empty field. Extend explanations of format
399 specifiers. Add a sentence to mention Calc defmath.
400
401 * org.texi (Column formulas): Add a sentence to be more explicit
402 about when a table header is mandatory.
403
4042013-11-12 Nicolas Goaziou <n.goaziou@gmail.com>
405
406 * org.texi (Subscripts and superscripts): Remove reference to
407 quoted underscores until this mechanism is implemented again.
408
409 * org.texi (Beamer export): Be more accurate about BEAMER_OPT
410 property.
411
412 * org.texi (Document title): Subtree export is no longer triggered
413 by marking one as the region.
414 (Horizontal rules): LaTeX export doesn't use "\hrule" anymore, and
415 giving examples isn't very useful: "horizontal rule" is, at least,
416 as explicit as <hr/>.
417
418 * org.texi (HTML doctypes): Reflect keyword removal.
419 (CSS support): Reflect keyword removal.
420
421 * org.texi (@LaTeX{} specific attributes): Document new :float
422 values.
423
424 * org.texi (Export settings): Improve documentation.
425
426 * org.texi (Math formatting in HTML export): Fix OPTIONS item's name.
427 (Text areas in HTML export): Update text areas.
428 (HTML Export commands): Update export commands.
429
430 * org.texi (Header and sectioning): Add a footnote about the
431 different between LATEX_HEADER_EXTRA and LATEX_HEADER.
432
433 * org.texi (The Export Dispatcher): Document
434 `org-export-in-background'.
435
436 * org.texi (Footnotes): Export back-ends do not use
437 `org-footnote-normalize' anymore.
438
439 * org.texi: Document variable changes.
440
441 * org.texi (Export settings): Doument p: item in OPTIONS keyword.
442
443 * org.texi (Exporting): Massive rewrite of the first sections.
444 (Selective export): Delete.
445 (The Export Dispatcher): Rewrite.
446 (Export options): Rewrite as "Export settings".
447
448 * org.texi: Small changes to documentation for embedded LaTeX.
449
450 * org.texi (Internal links): Document #+NAME keyword and
451 cross-referencing during export.
452
453 * org.texi (Include files): Remove reference to :prefix1
454 and :prefix. Give more details for :minlevel.
455
456 * org.texi (Macro replacement): Fix macro name. Update
457 documentation about possible locations and escaping mechanism.
458
459 * org.texi (Table of contents): Update documentation. Document
460 lists of listings and lists of tables. Add documentation for
461 optional title and #+TOC: keyword.
462
4632013-11-12 Rick Frankel <rick@rickster.com>
464
465 * org.texi (results): Add Format section, broken out of Type
466 section to match code.
467 (hlines, colnames): Remove incorrect Emacs Lisp exception. Note
468 that the actual default handling (at least for python and
469 emacs-lisp) does not seem to match the description.
470
4712013-11-12 Sacha Chua <sacha@sachachua.com> (tiny change)
472
473 * org.texi (The date/time prompt): Update the documentation to
474 reflect the new way `org-read-date-get-relative' handles weekdays.
475
4762013-11-12 Yasushi Shoji <yashi@atmark-techno.com>
477
478 * org.texi (Resolving idle time): Document
479 `org-clock-x11idle-program-name'.
480
12013-10-24 Michael Albinus <michael.albinus@gmx.de> 4812013-10-24 Michael Albinus <michael.albinus@gmx.de>
2 482
3 * ert.texi (Running Tests Interactively): Adapt examle output. 483 * ert.texi (Running Tests Interactively): Adapt examle output.
diff --git a/doc/misc/org.texi b/doc/misc/org.texi
index 832976e9ea0..94f7ac30ac8 100644
--- a/doc/misc/org.texi
+++ b/doc/misc/org.texi
@@ -2,7 +2,8 @@
2@c %**start of header 2@c %**start of header
3@setfilename ../../info/org 3@setfilename ../../info/org
4@settitle The Org Manual 4@settitle The Org Manual
5@set VERSION 7.9.3f (GNU Emacs 24.3) 5
6@include org-version.inc
6 7
7@c Use proper quote and backtick for code sections in PDF output 8@c Use proper quote and backtick for code sections in PDF output
8@c Cf. Texinfo manual 14.2 9@c Cf. Texinfo manual 14.2
@@ -10,7 +11,7 @@
10@set txicodequotebacktick 11@set txicodequotebacktick
11 12
12@c Version and Contact Info 13@c Version and Contact Info
13@set MAINTAINERSITE @uref{http://orgmode.org,maintainers webpage} 14@set MAINTAINERSITE @uref{http://orgmode.org,maintainers web page}
14@set AUTHOR Carsten Dominik 15@set AUTHOR Carsten Dominik
15@set MAINTAINER Carsten Dominik 16@set MAINTAINER Carsten Dominik
16@set MAINTAINEREMAIL @email{carsten at orgmode dot org} 17@set MAINTAINEREMAIL @email{carsten at orgmode dot org}
@@ -287,7 +288,8 @@ modify this GNU manual.''
287 288
288@subtitle Release @value{VERSION} 289@subtitle Release @value{VERSION}
289@author by Carsten Dominik 290@author by Carsten Dominik
290with contributions by David O'Toole, Bastien Guerry, Philip Rooke, Dan Davison, Eric Schulte, Thomas Dye and Jambunathan K. 291with contributions by David O'Toole, Bastien Guerry, Philip Rooke, Dan
292Davison, Eric Schulte, Thomas Dye, Jambunathan K and Nicolas Goaziou.
291 293
292@c The following two commands start the copyright page. 294@c The following two commands start the copyright page.
293@page 295@page
@@ -320,7 +322,7 @@ with contributions by David O'Toole, Bastien Guerry, Philip Rooke, Dan Davison,
320* Capture - Refile - Archive:: The ins and outs for projects 322* Capture - Refile - Archive:: The ins and outs for projects
321* Agenda Views:: Collecting information into views 323* Agenda Views:: Collecting information into views
322* Markup:: Prepare text for rich export 324* Markup:: Prepare text for rich export
323* Exporting:: Sharing and publishing of notes 325* Exporting:: Sharing and publishing notes
324* Publishing:: Create a web site of linked Org files 326* Publishing:: Create a web site of linked Org files
325* Working With Source Code:: Export, evaluate, and tangle code blocks 327* Working With Source Code:: Export, evaluate, and tangle code blocks
326* Miscellaneous:: All the rest which did not fit elsewhere 328* Miscellaneous:: All the rest which did not fit elsewhere
@@ -357,6 +359,18 @@ Document structure
357* Blocks:: Folding blocks 359* Blocks:: Folding blocks
358* Footnotes:: How footnotes are defined in Org's syntax 360* Footnotes:: How footnotes are defined in Org's syntax
359* Orgstruct mode:: Structure editing outside Org 361* Orgstruct mode:: Structure editing outside Org
362* Org syntax:: Formal description of Org's syntax
363
364Visibility cycling
365
366* Global and local cycling:: Cycling through various visibility states
367* Initial visibility:: Setting the initial visibility state
368* Catching invisible edits:: Preventing mistakes when editing invisible parts
369
370Global and local cycling
371
372* Initial visibility:: Setting the initial visibility state
373* Catching invisible edits:: Preventing mistakes when editing invisible parts
360 374
361Tables 375Tables
362 376
@@ -375,6 +389,7 @@ The spreadsheet
375* Durations and time values:: How to compute durations and time values 389* Durations and time values:: How to compute durations and time values
376* Field and range formulas:: Formula for specific (ranges of) fields 390* Field and range formulas:: Formula for specific (ranges of) fields
377* Column formulas:: Formulas valid for an entire column 391* Column formulas:: Formulas valid for an entire column
392* Lookup functions:: Lookup functions for searching tables
378* Editing and debugging formulas:: Fixing formulas 393* Editing and debugging formulas:: Fixing formulas
379* Updating the table:: Recomputing all dependent fields 394* Updating the table:: Recomputing all dependent fields
380* Advanced features:: Field and column names, parameters and automatic recalc 395* Advanced features:: Field and column names, parameters and automatic recalc
@@ -423,6 +438,7 @@ Tags
423 438
424* Tag inheritance:: Tags use the tree structure of the outline 439* Tag inheritance:: Tags use the tree structure of the outline
425* Setting tags:: How to assign tags to a headline 440* Setting tags:: How to assign tags to a headline
441* Tag groups:: Use one tag to search for several tags
426* Tag searches:: Searching for combinations of tags 442* Tag searches:: Searching for combinations of tags
427 443
428Properties and columns 444Properties and columns
@@ -477,7 +493,7 @@ Capture - Refile - Archive
477* Attachments:: Add files to tasks 493* Attachments:: Add files to tasks
478* RSS Feeds:: Getting input from RSS feeds 494* RSS Feeds:: Getting input from RSS feeds
479* Protocols:: External (e.g., Browser) access to Emacs and Org 495* Protocols:: External (e.g., Browser) access to Emacs and Org
480* Refiling notes:: Moving a tree from one place to another 496* Refile and copy:: Moving/copying a tree from one place to another
481* Archiving:: What to do with finished projects 497* Archiving:: What to do with finished projects
482 498
483Capture 499Capture
@@ -521,7 +537,8 @@ Presentation and sorting
521 537
522* Categories:: Not all tasks are equal 538* Categories:: Not all tasks are equal
523* Time-of-day specifications:: How the agenda knows the time 539* Time-of-day specifications:: How the agenda knows the time
524* Sorting of agenda items:: The order of things 540* Sorting agenda items:: The order of things
541* Filtering/limiting agenda items:: Dynamically narrow the agenda
525 542
526Custom agenda views 543Custom agenda views
527 544
@@ -532,19 +549,19 @@ Custom agenda views
532Markup for rich export 549Markup for rich export
533 550
534* Structural markup elements:: The basic structure as seen by the exporter 551* Structural markup elements:: The basic structure as seen by the exporter
535* Images and tables:: Tables and Images will be included 552* Images and tables:: Images, tables and caption mechanism
536* Literal examples:: Source code examples with special formatting 553* Literal examples:: Source code examples with special formatting
537* Include files:: Include additional files into a document 554* Include files:: Include additional files into a document
538* Index entries:: Making an index 555* Index entries:: Making an index
539* Macro replacement:: Use macros to create complex output 556* Macro replacement:: Use macros to create templates
540* Embedded @LaTeX{}:: LaTeX can be freely used inside Org documents 557* Embedded @LaTeX{}:: LaTeX can be freely used inside Org documents
558* Special blocks:: Containers targeted at export back-ends
541 559
542Structural markup elements 560Structural markup elements
543 561
544* Document title:: Where the title is taken from 562* Document title:: Where the title is taken from
545* Headings and sections:: The document structure as seen by the exporter 563* Headings and sections:: The document structure as seen by the exporter
546* Table of contents:: The if and where of the table of contents 564* Table of contents:: The if and where of the table of contents
547* Initial text:: Text before the first heading?
548* Lists:: Lists 565* Lists:: Lists
549* Paragraphs:: Paragraphs 566* Paragraphs:: Paragraphs
550* Footnote markup:: Footnotes 567* Footnote markup:: Footnotes
@@ -562,22 +579,24 @@ Embedded @LaTeX{}
562 579
563Exporting 580Exporting
564 581
565* Selective export:: Using tags to select and exclude trees 582* The Export Dispatcher:: The main exporter interface
566* Export options:: Per-file export settings 583* Export back-ends:: Built-in export formats
567* The export dispatcher:: How to access exporter commands 584* Export settings:: Generic export settings
568* ASCII/Latin-1/UTF-8 export:: Exporting to flat files with encoding 585* ASCII/Latin-1/UTF-8 export:: Exporting to flat files with encoding
586* Beamer export:: Exporting as a Beamer presentation
569* HTML export:: Exporting to HTML 587* HTML export:: Exporting to HTML
570* @LaTeX{} and PDF export:: Exporting to @LaTeX{}, and processing to PDF 588* @LaTeX{} and PDF export:: Exporting to @LaTeX{}, and processing to PDF
571* DocBook export:: Exporting to DocBook 589* Markdown export:: Exporting to Markdown
572* OpenDocument Text export:: Exporting to OpenDocument Text 590* OpenDocument Text export:: Exporting to OpenDocument Text
573* TaskJuggler export:: Exporting to TaskJuggler 591* iCalendar export:: Exporting to iCalendar
574* Freemind export:: Exporting to Freemind mind maps 592* Other built-in back-ends:: Exporting to @code{Texinfo}, a man page, or Org
575* XOXO export:: Exporting to XOXO 593* Export in foreign buffers:: Author tables in lists in Org syntax
576* iCalendar export:: Exporting in iCalendar format 594* Advanced configuration:: Fine-tuning the export output
577 595
578HTML export 596HTML export
579 597
580* HTML Export commands:: How to invoke HTML export 598* HTML Export commands:: How to invoke HTML export
599* HTML doctypes:: Org can export to various (X)HTML flavors
581* HTML preamble and postamble:: How to insert a preamble and a postamble 600* HTML preamble and postamble:: How to insert a preamble and a postamble
582* Quoting HTML tags:: Using direct HTML in Org mode 601* Quoting HTML tags:: Using direct HTML in Org mode
583* Links in HTML export:: How links will be interpreted and formatted 602* Links in HTML export:: How links will be interpreted and formatted
@@ -590,21 +609,10 @@ HTML export
590 609
591@LaTeX{} and PDF export 610@LaTeX{} and PDF export
592 611
593* @LaTeX{}/PDF export commands:: 612* @LaTeX{} export commands:: How to export to LaTeX and PDF
594* Header and sectioning:: Setting up the export file structure 613* Header and sectioning:: Setting up the export file structure
595* Quoting @LaTeX{} code:: Incorporating literal @LaTeX{} code 614* Quoting @LaTeX{} code:: Incorporating literal @LaTeX{} code
596* Tables in @LaTeX{} export:: Options for exporting tables to @LaTeX{} 615* @LaTeX{} specific attributes:: Controlling @LaTeX{} output
597* Images in @LaTeX{} export:: How to insert figures into @LaTeX{} output
598* Beamer class export:: Turning the file into a presentation
599
600DocBook export
601
602* DocBook export commands:: How to invoke DocBook export
603* Quoting DocBook code:: Incorporating DocBook code in Org files
604* Recursive sections:: Recursive sections in DocBook
605* Tables in DocBook export:: Tables are exported as HTML tables
606* Images in DocBook export:: How to insert figures into DocBook output
607* Special characters:: How to handle special characters
608 616
609OpenDocument Text export 617OpenDocument Text export
610 618
@@ -680,8 +688,8 @@ Using header arguments
680 688
681* System-wide header arguments:: Set global default values 689* System-wide header arguments:: Set global default values
682* Language-specific header arguments:: Set default values by language 690* Language-specific header arguments:: Set default values by language
683* Buffer-wide header arguments:: Set default values for a specific buffer
684* Header arguments in Org mode properties:: Set default values for a buffer or heading 691* Header arguments in Org mode properties:: Set default values for a buffer or heading
692* Language-specific header arguments in Org mode properties:: Set langugage-specific default values for a buffer or heading
685* Code block specific header arguments:: The most common way to set values 693* Code block specific header arguments:: The most common way to set values
686* Header arguments in function calls:: The most specific level 694* Header arguments in function calls:: The most specific level
687 695
@@ -714,8 +722,12 @@ Specific header arguments
714* colnames:: Handle column names in tables 722* colnames:: Handle column names in tables
715* rownames:: Handle row names in tables 723* rownames:: Handle row names in tables
716* shebang:: Make tangled files executable 724* shebang:: Make tangled files executable
725* tangle-mode:: Set permission of tangled files
717* eval:: Limit evaluation of specific code blocks 726* eval:: Limit evaluation of specific code blocks
718* wrap:: Mark source block evaluation results 727* wrap:: Mark source block evaluation results
728* post:: Post processing of code block results
729* prologue:: Text to prepend to code block body
730* epilogue:: Text to append to code block body
719 731
720Miscellaneous 732Miscellaneous
721 733
@@ -729,7 +741,7 @@ Miscellaneous
729* Clean view:: Getting rid of leading stars in the outline 741* Clean view:: Getting rid of leading stars in the outline
730* TTY keys:: Using Org on a tty 742* TTY keys:: Using Org on a tty
731* Interaction:: Other Emacs packages 743* Interaction:: Other Emacs packages
732* org-crypt.el:: Encrypting Org files 744* org-crypt:: Encrypting Org files
733 745
734Interaction with other packages 746Interaction with other packages
735 747
@@ -741,11 +753,13 @@ Hacking
741* Hooks:: How to reach into Org's internals 753* Hooks:: How to reach into Org's internals
742* Add-on packages:: Available extensions 754* Add-on packages:: Available extensions
743* Adding hyperlink types:: New custom link types 755* Adding hyperlink types:: New custom link types
756* Adding export back-ends:: How to write new export back-ends
744* Context-sensitive commands:: How to add functionality to such commands 757* Context-sensitive commands:: How to add functionality to such commands
745* Tables in arbitrary syntax:: Orgtbl for @LaTeX{} and other programs 758* Tables in arbitrary syntax:: Orgtbl for @LaTeX{} and other programs
746* Dynamic blocks:: Automatically filled blocks 759* Dynamic blocks:: Automatically filled blocks
747* Special agenda views:: Customized views 760* Special agenda views:: Customized views
748* Extracting agenda information:: Postprocessing of agenda information 761* Speeding up your agendas:: Tips on how to speed up your agendas
762* Extracting agenda information:: Post-processing of agenda information
749* Using the property API:: Writing programs that use entry properties 763* Using the property API:: Writing programs that use entry properties
750* Using the mapping API:: Mapping over all or selected entries 764* Using the mapping API:: Mapping over all or selected entries
751 765
@@ -754,7 +768,7 @@ Tables and lists in arbitrary syntax
754* Radio tables:: Sending and receiving radio tables 768* Radio tables:: Sending and receiving radio tables
755* A @LaTeX{} example:: Step by step, almost a tutorial 769* A @LaTeX{} example:: Step by step, almost a tutorial
756* Translator functions:: Copy and modify 770* Translator functions:: Copy and modify
757* Radio lists:: Doing the same for lists 771* Radio lists:: Sending and receiving lists
758 772
759MobileOrg 773MobileOrg
760 774
@@ -794,7 +808,7 @@ timestamps, and scheduling. It dynamically compiles entries into an
794agenda that utilizes and smoothly integrates much of the Emacs calendar 808agenda that utilizes and smoothly integrates much of the Emacs calendar
795and diary. Plain text URL-like links connect to websites, emails, 809and diary. Plain text URL-like links connect to websites, emails,
796Usenet messages, BBDB entries, and any files related to the projects. 810Usenet messages, BBDB entries, and any files related to the projects.
797For printing and sharing of notes, an Org file can be exported as a 811For printing and sharing notes, an Org file can be exported as a
798structured ASCII file, as HTML, or (TODO and agenda items only) as an 812structured ASCII file, as HTML, or (TODO and agenda items only) as an
799iCalendar file. It can also serve as a publishing tool for a set of 813iCalendar file. It can also serve as a publishing tool for a set of
800linked web pages. 814linked web pages.
@@ -828,7 +842,7 @@ ends, for example:
828@pindex GTD, Getting Things Done 842@pindex GTD, Getting Things Done
829@r{@bullet{} an environment in which to implement David Allen's GTD system} 843@r{@bullet{} an environment in which to implement David Allen's GTD system}
830@r{@bullet{} a simple hypertext system, with HTML and @LaTeX{} export} 844@r{@bullet{} a simple hypertext system, with HTML and @LaTeX{} export}
831@r{@bullet{} a publishing tool to create a set of interlinked webpages} 845@r{@bullet{} a publishing tool to create a set of interlinked web pages}
832@r{@bullet{} an environment for literate programming} 846@r{@bullet{} an environment for literate programming}
833@end example 847@end example
834 848
@@ -867,10 +881,11 @@ We @b{strongly recommend} to stick to a single installation method.
867 881
868Recent Emacs distributions include a packaging system which lets you install 882Recent Emacs distributions include a packaging system which lets you install
869Elisp libraries. You can install Org with @kbd{M-x package-install RET org}. 883Elisp libraries. You can install Org with @kbd{M-x package-install RET org}.
870To make sure your Org configuration is well taken into account, initialize 884You need to do this in a session where no @code{.org} file has been visited.
871the package system with @code{(package-initialize)} before setting any Org 885Then, to make sure your Org configuration is taken into account, initialize
872option. If you want to use Org's package repository, check out the 886the package system with @code{(package-initialize)} in your @file{.emacs}
873@uref{http://orgmode.org/elpa.html, Org ELPA page}. 887before setting any Org option. If you want to use Org's package repository,
888check out the @uref{http://orgmode.org/elpa.html, Org ELPA page}.
874 889
875@subsubheading Downloading Org as an archive 890@subsubheading Downloading Org as an archive
876 891
@@ -878,17 +893,17 @@ You can download Org latest release from @uref{http://orgmode.org/, Org's
878website}. In this case, make sure you set the load-path correctly in your 893website}. In this case, make sure you set the load-path correctly in your
879@file{.emacs}: 894@file{.emacs}:
880 895
881@example 896@lisp
882(add-to-list 'load-path "~/path/to/orgdir/lisp") 897(add-to-list 'load-path "~/path/to/orgdir/lisp")
883@end example 898@end lisp
884 899
885The downloaded archive contains contributed libraries that are not included 900The downloaded archive contains contributed libraries that are not included
886in Emacs. If you want to use them, add the @file{contrib} directory to your 901in Emacs. If you want to use them, add the @file{contrib} directory to your
887load-path: 902load-path:
888 903
889@example 904@lisp
890(add-to-list 'load-path "~/path/to/orgdir/contrib/lisp" t) 905(add-to-list 'load-path "~/path/to/orgdir/contrib/lisp" t)
891@end example 906@end lisp
892 907
893Optionally, you can compile the files and/or install them in your system. 908Optionally, you can compile the files and/or install them in your system.
894Run @code{make help} to list compilation and installation options. 909Run @code{make help} to list compilation and installation options.
@@ -1001,10 +1016,10 @@ version of Org available---if you are running an outdated version, it is
1001quite possible that the bug has been fixed already. If the bug persists, 1016quite possible that the bug has been fixed already. If the bug persists,
1002prepare a report and provide as much information as possible, including the 1017prepare a report and provide as much information as possible, including the
1003version information of Emacs (@kbd{M-x emacs-version @key{RET}}) and Org 1018version information of Emacs (@kbd{M-x emacs-version @key{RET}}) and Org
1004(@kbd{M-x org-version @key{RET}}), as well as the Org related setup in 1019(@kbd{M-x org-version RET}), as well as the Org related setup in
1005@file{.emacs}. The easiest way to do this is to use the command 1020@file{.emacs}. The easiest way to do this is to use the command
1006@example 1021@example
1007@kbd{M-x org-submit-bug-report} 1022@kbd{M-x org-submit-bug-report RET}
1008@end example 1023@end example
1009@noindent which will put all this information into an Emacs mail buffer so 1024@noindent which will put all this information into an Emacs mail buffer so
1010that you only need to add your description. If you re not sending the Email 1025that you only need to add your description. If you re not sending the Email
@@ -1025,7 +1040,7 @@ is not necessary. In that case it is sufficient to start Emacs as
1025@code{emacs -Q}. The @code{minimal-org.el} setup file can have contents as 1040@code{emacs -Q}. The @code{minimal-org.el} setup file can have contents as
1026shown below. 1041shown below.
1027 1042
1028@example 1043@lisp
1029;;; Minimal setup to load latest `org-mode' 1044;;; Minimal setup to load latest `org-mode'
1030 1045
1031;; activate debugging 1046;; activate debugging
@@ -1036,7 +1051,7 @@ shown below.
1036;; add latest org-mode to load path 1051;; add latest org-mode to load path
1037(add-to-list 'load-path (expand-file-name "/path/to/org-mode/lisp")) 1052(add-to-list 'load-path (expand-file-name "/path/to/org-mode/lisp"))
1038(add-to-list 'load-path (expand-file-name "/path/to/org-mode/contrib/lisp" t)) 1053(add-to-list 'load-path (expand-file-name "/path/to/org-mode/contrib/lisp" t))
1039@end example 1054@end lisp
1040 1055
1041If an error occurs, a backtrace can be very useful (see below on how to 1056If an error occurs, a backtrace can be very useful (see below on how to
1042create one). Often a small example file helps, along with clear information 1057create one). Often a small example file helps, along with clear information
@@ -1064,7 +1079,7 @@ Reload uncompiled versions of all Org mode Lisp files. The backtrace
1064contains much more information if it is produced with uncompiled code. 1079contains much more information if it is produced with uncompiled code.
1065To do this, use 1080To do this, use
1066@example 1081@example
1067C-u M-x org-reload RET 1082@kbd{C-u M-x org-reload RET}
1068@end example 1083@end example
1069@noindent 1084@noindent
1070or select @code{Org -> Refresh/Reload -> Reload Org uncompiled} from the 1085or select @code{Org -> Refresh/Reload -> Reload Org uncompiled} from the
@@ -1109,7 +1124,7 @@ and @i{environment keywords} (like @code{#+BEGIN_HTML} to start a @code{HTML}
1109environment). They are written in uppercase in the manual to enhance its 1124environment). They are written in uppercase in the manual to enhance its
1110readability, but you can use lowercase in your Org files@footnote{Easy 1125readability, but you can use lowercase in your Org files@footnote{Easy
1111templates insert lowercase keywords and Babel dynamically inserts 1126templates insert lowercase keywords and Babel dynamically inserts
1112@code{#+results}.} 1127@code{#+results}.}.
1113 1128
1114@subsubheading Keybindings and commands 1129@subsubheading Keybindings and commands
1115@kindex C-c a 1130@kindex C-c a
@@ -1152,6 +1167,7 @@ edit the structure of the document.
1152* Blocks:: Folding blocks 1167* Blocks:: Folding blocks
1153* Footnotes:: How footnotes are defined in Org's syntax 1168* Footnotes:: How footnotes are defined in Org's syntax
1154* Orgstruct mode:: Structure editing outside Org 1169* Orgstruct mode:: Structure editing outside Org
1170* Org syntax:: Formal description of Org's syntax
1155@end menu 1171@end menu
1156 1172
1157@node Outlines, Headlines, Document Structure, Document Structure 1173@node Outlines, Headlines, Document Structure, Document Structure
@@ -1213,6 +1229,15 @@ variable @code{org-cycle-separator-lines} to modify this behavior.
1213@cindex show hidden text 1229@cindex show hidden text
1214@cindex hide text 1230@cindex hide text
1215 1231
1232@menu
1233* Global and local cycling:: Cycling through various visibility states
1234* Initial visibility:: Setting the initial visibility state
1235* Catching invisible edits:: Preventing mistakes when editing invisible parts
1236@end menu
1237
1238@node Global and local cycling, Initial visibility, Visibility cycling, Visibility cycling
1239@subsection Global and local cycling
1240
1216Outlines make it possible to hide parts of the text in the buffer. 1241Outlines make it possible to hide parts of the text in the buffer.
1217Org uses just two commands, bound to @key{TAB} and 1242Org uses just two commands, bound to @key{TAB} and
1218@kbd{S-@key{TAB}} to change the visibility in the buffer. 1243@kbd{S-@key{TAB}} to change the visibility in the buffer.
@@ -1295,6 +1320,15 @@ the previously used indirect buffer.
1295Copy the @i{visible} text in the region into the kill ring. 1320Copy the @i{visible} text in the region into the kill ring.
1296@end table 1321@end table
1297 1322
1323@menu
1324* Initial visibility:: Setting the initial visibility state
1325* Catching invisible edits:: Preventing mistakes when editing invisible parts
1326@end menu
1327
1328@node Initial visibility, Catching invisible edits, Global and local cycling, Visibility cycling
1329@subsection Initial visibility
1330
1331@cindex visibility, initialize
1298@vindex org-startup-folded 1332@vindex org-startup-folded
1299@vindex org-agenda-inhibit-startup 1333@vindex org-agenda-inhibit-startup
1300@cindex @code{overview}, STARTUP keyword 1334@cindex @code{overview}, STARTUP keyword
@@ -1302,11 +1336,13 @@ Copy the @i{visible} text in the region into the kill ring.
1302@cindex @code{showall}, STARTUP keyword 1336@cindex @code{showall}, STARTUP keyword
1303@cindex @code{showeverything}, STARTUP keyword 1337@cindex @code{showeverything}, STARTUP keyword
1304 1338
1305When Emacs first visits an Org file, the global state is set to 1339When Emacs first visits an Org file, the global state is set to OVERVIEW,
1306OVERVIEW, i.e., only the top level headlines are visible. This can be 1340i.e., only the top level headlines are visible@footnote{When
1307configured through the variable @code{org-startup-folded}, or on a 1341@code{org-agenda-inhibit-startup} is non-@code{nil}, Org will not honor the default
1308per-file basis by adding one of the following lines anywhere in the 1342visibility state when first opening a file for the agenda (@pxref{Speeding up
1309buffer: 1343your agendas}).} This can be configured through the variable
1344@code{org-startup-folded}, or on a per-file basis by adding one of the
1345following lines anywhere in the buffer:
1310 1346
1311@example 1347@example
1312#+STARTUP: overview 1348#+STARTUP: overview
@@ -1317,7 +1353,7 @@ buffer:
1317 1353
1318The startup visibility options are ignored when the file is open for the 1354The startup visibility options are ignored when the file is open for the
1319first time during the agenda generation: if you want the agenda to honor 1355first time during the agenda generation: if you want the agenda to honor
1320the startup visibility, set @code{org-agenda-inhibit-startup} to nil. 1356the startup visibility, set @code{org-agenda-inhibit-startup} to @code{nil}.
1321 1357
1322@cindex property, VISIBILITY 1358@cindex property, VISIBILITY
1323@noindent 1359@noindent
@@ -1325,6 +1361,7 @@ Furthermore, any entries with a @samp{VISIBILITY} property (@pxref{Properties
1325and Columns}) will get their visibility adapted accordingly. Allowed values 1361and Columns}) will get their visibility adapted accordingly. Allowed values
1326for this property are @code{folded}, @code{children}, @code{content}, and 1362for this property are @code{folded}, @code{children}, @code{content}, and
1327@code{all}. 1363@code{all}.
1364
1328@table @asis 1365@table @asis
1329@orgcmd{C-u C-u @key{TAB},org-set-startup-visibility} 1366@orgcmd{C-u C-u @key{TAB},org-set-startup-visibility}
1330Switch back to the startup visibility of the buffer, i.e., whatever is 1367Switch back to the startup visibility of the buffer, i.e., whatever is
@@ -1332,6 +1369,17 @@ requested by startup options and @samp{VISIBILITY} properties in individual
1332entries. 1369entries.
1333@end table 1370@end table
1334 1371
1372@node Catching invisible edits, , Initial visibility, Visibility cycling
1373@subsection Catching invisible edits
1374
1375@vindex org-catch-invisible-edits
1376@cindex edits, catching invisible
1377Sometimes you may inadvertently edit an invisible part of the buffer and be
1378confused on what has been edited and how to undo the mistake. Setting
1379@code{org-catch-invisible-edits} to non-@code{nil} will help prevent this. See the
1380docstring of this option on how Org should catch invisible edits and process
1381them.
1382
1335@node Motion, Structure editing, Visibility cycling, Document Structure 1383@node Motion, Structure editing, Visibility cycling, Document Structure
1336@section Motion 1384@section Motion
1337@cindex motion, between headlines 1385@cindex motion, between headlines
@@ -1369,7 +1417,7 @@ q @r{Quit}
1369@end example 1417@end example
1370@vindex org-goto-interface 1418@vindex org-goto-interface
1371@noindent 1419@noindent
1372See also the variable @code{org-goto-interface}. 1420See also the option @code{org-goto-interface}.
1373@end table 1421@end table
1374 1422
1375@node Structure editing, Sparse trees, Motion, Document Structure 1423@node Structure editing, Sparse trees, Motion, Document Structure
@@ -1388,17 +1436,20 @@ See also the variable @code{org-goto-interface}.
1388@table @asis 1436@table @asis
1389@orgcmd{M-@key{RET},org-insert-heading} 1437@orgcmd{M-@key{RET},org-insert-heading}
1390@vindex org-M-RET-may-split-line 1438@vindex org-M-RET-may-split-line
1391Insert new heading with same level as current. If the cursor is in a plain 1439Insert a new heading/item with the same level than the one at point.
1392list item, a new item is created (@pxref{Plain lists}). To force creation of 1440If the cursor is in a plain list item, a new item is created
1393a new headline, use a prefix argument. When this command is used in the 1441(@pxref{Plain lists}). To prevent this behavior in lists, call the
1394middle of a line, the line is split and the rest of the line becomes the new 1442command with a prefix argument. When this command is used in the
1395headline@footnote{If you do not want the line to be split, customize the 1443middle of a line, the line is split and the rest of the line becomes
1396variable @code{org-M-RET-may-split-line}.}. If the command is used at the 1444the new item or headline@footnote{If you do not want the line to be
1397beginning of a headline, the new headline is created before the current line. 1445split, customize the variable @code{org-M-RET-may-split-line}.}. If
1398If at the beginning of any other line, the content of that line is made the 1446the command is used at the @emph{beginning} of a headline, the new
1399new heading. If the command is used at the end of a folded subtree (i.e., 1447headline is created before the current line. If the command is used
1400behind the ellipses at the end of a headline), then a headline like the 1448at the @emph{end} of a folded subtree (i.e., behind the ellipses at
1401current one will be inserted after the end of the subtree. 1449the end of a headline), then a headline will be
1450inserted after the end of the subtree. Calling this command with
1451@kbd{C-u C-u} will unconditionally respect the headline's content and
1452create a new item at the end of the parent subtree.
1402@orgcmd{C-@key{RET},org-insert-heading-respect-content} 1453@orgcmd{C-@key{RET},org-insert-heading-respect-content}
1403Just like @kbd{M-@key{RET}}, except when adding a new heading below the 1454Just like @kbd{M-@key{RET}}, except when adding a new heading below the
1404current heading, the new heading is placed after the body instead of before 1455current heading, the new heading is placed after the body instead of before
@@ -1450,7 +1501,7 @@ headline marker like @samp{****}.
1450@orgcmd{C-y,org-yank} 1501@orgcmd{C-y,org-yank}
1451@vindex org-yank-adjusted-subtrees 1502@vindex org-yank-adjusted-subtrees
1452@vindex org-yank-folded-subtrees 1503@vindex org-yank-folded-subtrees
1453Depending on the variables @code{org-yank-adjusted-subtrees} and 1504Depending on the options @code{org-yank-adjusted-subtrees} and
1454@code{org-yank-folded-subtrees}, Org's internal @code{yank} command will 1505@code{org-yank-folded-subtrees}, Org's internal @code{yank} command will
1455paste subtrees folded and in a clever way, using the same command as @kbd{C-c 1506paste subtrees folded and in a clever way, using the same command as @kbd{C-c
1456C-x C-y}. With the default settings, no level adjustment will take place, 1507C-x C-y}. With the default settings, no level adjustment will take place,
@@ -1468,7 +1519,7 @@ to create a number of tasks related to a series of lectures to prepare. For
1468more details, see the docstring of the command 1519more details, see the docstring of the command
1469@code{org-clone-subtree-with-time-shift}. 1520@code{org-clone-subtree-with-time-shift}.
1470@orgcmd{C-c C-w,org-refile} 1521@orgcmd{C-c C-w,org-refile}
1471Refile entry or region to a different location. @xref{Refiling notes}. 1522Refile entry or region to a different location. @xref{Refile and copy}.
1472@orgcmd{C-c ^,org-sort} 1523@orgcmd{C-c ^,org-sort}
1473Sort same-level entries. When there is an active region, all entries in the 1524Sort same-level entries. When there is an active region, all entries in the
1474region will be sorted. Otherwise the children of the current headline are 1525region will be sorted. Otherwise the children of the current headline are
@@ -1550,11 +1601,10 @@ Jump to the next sparse tree match in this buffer.
1550Jump to the previous sparse tree match in this buffer. 1601Jump to the previous sparse tree match in this buffer.
1551@end table 1602@end table
1552 1603
1553
1554@noindent 1604@noindent
1555@vindex org-agenda-custom-commands 1605@vindex org-agenda-custom-commands
1556For frequently used sparse trees of specific search strings, you can 1606For frequently used sparse trees of specific search strings, you can
1557use the variable @code{org-agenda-custom-commands} to define fast 1607use the option @code{org-agenda-custom-commands} to define fast
1558keyboard access to specific sparse trees. These commands will then be 1608keyboard access to specific sparse trees. These commands will then be
1559accessible through the agenda dispatcher (@pxref{Agenda dispatcher}). 1609accessible through the agenda dispatcher (@pxref{Agenda dispatcher}).
1560For example: 1610For example:
@@ -1570,15 +1620,15 @@ a sparse tree matching the string @samp{FIXME}.
1570The other sparse tree commands select headings based on TODO keywords, 1620The other sparse tree commands select headings based on TODO keywords,
1571tags, or properties and will be discussed later in this manual. 1621tags, or properties and will be discussed later in this manual.
1572 1622
1573@kindex C-c C-e v 1623@kindex C-c C-e C-v
1574@cindex printing sparse trees 1624@cindex printing sparse trees
1575@cindex visible text, printing 1625@cindex visible text, printing
1576To print a sparse tree, you can use the Emacs command 1626To print a sparse tree, you can use the Emacs command
1577@code{ps-print-buffer-with-faces} which does not print invisible parts 1627@code{ps-print-buffer-with-faces} which does not print invisible parts
1578of the document @footnote{This does not work under XEmacs, because 1628of the document @footnote{This does not work under XEmacs, because
1579XEmacs uses selective display for outlining, not text properties.}. 1629XEmacs uses selective display for outlining, not text properties.}.
1580Or you can use the command @kbd{C-c C-e v} to export only the visible 1630Or you can use @kbd{C-c C-e C-v} to export only the visible part of
1581part of the document and print the resulting file. 1631the document and print the resulting file.
1582 1632
1583@node Plain lists, Drawers, Sparse trees, Document Structure 1633@node Plain lists, Drawers, Sparse trees, Document Structure
1584@section Plain lists 1634@section Plain lists
@@ -1604,12 +1654,12 @@ is supported, it may be better to not use it for plain list items.} as
1604bullets. 1654bullets.
1605@item 1655@item
1606@vindex org-plain-list-ordered-item-terminator 1656@vindex org-plain-list-ordered-item-terminator
1607@vindex org-alphabetical-lists 1657@vindex org-list-allow-alphabetical
1608@emph{Ordered} list items start with a numeral followed by either a period or 1658@emph{Ordered} list items start with a numeral followed by either a period or
1609a right parenthesis@footnote{You can filter out any of them by configuring 1659a right parenthesis@footnote{You can filter out any of them by configuring
1610@code{org-plain-list-ordered-item-terminator}.}, such as @samp{1.} or 1660@code{org-plain-list-ordered-item-terminator}.}, such as @samp{1.} or
1611@samp{1)}@footnote{You can also get @samp{a.}, @samp{A.}, @samp{a)} and 1661@samp{1)}@footnote{You can also get @samp{a.}, @samp{A.}, @samp{a)} and
1612@samp{A)} by configuring @code{org-alphabetical-lists}. To minimize 1662@samp{A)} by configuring @code{org-list-allow-alphabetical}. To minimize
1613confusion with normal text, those are limited to one character only. Beyond 1663confusion with normal text, those are limited to one character only. Beyond
1614that limit, bullets will automatically fallback to numbers.}. If you want a 1664that limit, bullets will automatically fallback to numbers.}. If you want a
1615list to start with a different value (e.g., 20), start the text of the item 1665list to start with a different value (e.g., 20), start the text of the item
@@ -1629,11 +1679,11 @@ line. In particular, if an ordered list reaches number @samp{10.}, then the
1629list. An item ends before the next line that is less or equally indented 1679list. An item ends before the next line that is less or equally indented
1630than its bullet/number. 1680than its bullet/number.
1631 1681
1632@vindex org-empty-line-terminates-plain-lists 1682@vindex org-list-empty-line-terminates-plain-lists
1633A list ends whenever every item has ended, which means before any line less 1683A list ends whenever every item has ended, which means before any line less
1634or equally indented than items at top level. It also ends before two blank 1684or equally indented than items at top level. It also ends before two blank
1635lines@footnote{See also @code{org-empty-line-terminates-plain-lists}.}. In 1685lines@footnote{See also @code{org-list-empty-line-terminates-plain-lists}.}.
1636that case, all items are closed. Here is an example: 1686In that case, all items are closed. Here is an example:
1637 1687
1638@example 1688@example
1639@group 1689@group
@@ -1705,7 +1755,7 @@ one.
1705 1755
1706@table @kbd 1756@table @kbd
1707@kindex M-S-@key{RET} 1757@kindex M-S-@key{RET}
1708@item M-S-RET 1758@item M-S-@key{RET}
1709Insert a new item with a checkbox (@pxref{Checkboxes}). 1759Insert a new item with a checkbox (@pxref{Checkboxes}).
1710@kindex S-@key{down} 1760@kindex S-@key{down}
1711@item S-up 1761@item S-up
@@ -1724,7 +1774,7 @@ similar effect.
1724@item M-up 1774@item M-up
1725@itemx M-down 1775@itemx M-down
1726Move the item including subitems up/down@footnote{See 1776Move the item including subitems up/down@footnote{See
1727@code{org-liste-use-circular-motion} for a cyclic behavior.} (swap with 1777@code{org-list-use-circular-motion} for a cyclic behavior.} (swap with
1728previous/next item of same indentation). If the list is ordered, renumbering 1778previous/next item of same indentation). If the list is ordered, renumbering
1729is automatic. 1779is automatic.
1730@kindex M-@key{left} 1780@kindex M-@key{left}
@@ -1734,8 +1784,8 @@ is automatic.
1734Decrease/increase the indentation of an item, leaving children alone. 1784Decrease/increase the indentation of an item, leaving children alone.
1735@kindex M-S-@key{left} 1785@kindex M-S-@key{left}
1736@kindex M-S-@key{right} 1786@kindex M-S-@key{right}
1737@item M-S-left 1787@item M-S-@key{left}
1738@itemx M-S-right 1788@itemx M-S-@key{right}
1739Decrease/increase the indentation of the item, including subitems. 1789Decrease/increase the indentation of the item, including subitems.
1740Initially, the item tree is selected based on current indentation. When 1790Initially, the item tree is selected based on current indentation. When
1741these commands are executed several times in direct succession, the initially 1791these commands are executed several times in direct succession, the initially
@@ -1781,9 +1831,11 @@ This command also cycles bullet styles when the cursor in on the bullet or
1781anywhere in an item line, details depending on 1831anywhere in an item line, details depending on
1782@code{org-support-shift-select}. 1832@code{org-support-shift-select}.
1783@kindex C-c ^ 1833@kindex C-c ^
1834@cindex sorting, of plain list
1784@item C-c ^ 1835@item C-c ^
1785Sort the plain list. You will be prompted for the sorting method: 1836Sort the plain list. You will be prompted for the sorting method:
1786numerically, alphabetically, by time, or by custom function. 1837numerically, alphabetically, by time, by checked status for check lists,
1838or by a custom function.
1787@end table 1839@end table
1788 1840
1789@node Drawers, Blocks, Plain lists, Document Structure 1841@node Drawers, Blocks, Plain lists, Document Structure
@@ -1797,10 +1849,9 @@ numerically, alphabetically, by time, or by custom function.
1797@kindex C-c C-x d 1849@kindex C-c C-x d
1798Sometimes you want to keep information associated with an entry, but you 1850Sometimes you want to keep information associated with an entry, but you
1799normally don't want to see it. For this, Org mode has @emph{drawers}. 1851normally don't want to see it. For this, Org mode has @emph{drawers}.
1800Drawers need to be configured with the variable 1852Drawers need to be configured with the option @code{org-drawers}@footnote{You
1801@code{org-drawers}@footnote{You can define additional drawers on a 1853can define additional drawers on a per-file basis with a line like
1802per-file basis with a line like @code{#+DRAWERS: HIDDEN STATE}}. Drawers 1854@code{#+DRAWERS: HIDDEN STATE}}. Drawers look like this:
1803look like this:
1804 1855
1805@example 1856@example
1806** This is a headline 1857** This is a headline
@@ -1833,6 +1884,12 @@ want to store a quick note in the LOGBOOK drawer, in a similar way to state chan
1833Add a time-stamped note to the LOGBOOK drawer. 1884Add a time-stamped note to the LOGBOOK drawer.
1834@end table 1885@end table
1835 1886
1887@vindex org-export-with-drawers
1888You can select the name of the drawers which should be exported with
1889@code{org-export-with-drawers}. In that case, drawer contents will appear in
1890export output. Property drawers are not affected by this variable and are
1891never exported.
1892
1836@node Blocks, Footnotes, Drawers, Document Structure 1893@node Blocks, Footnotes, Drawers, Document Structure
1837@section Blocks 1894@section Blocks
1838 1895
@@ -1842,7 +1899,7 @@ Org mode uses begin...end blocks for various purposes from including source
1842code examples (@pxref{Literal examples}) to capturing time logging 1899code examples (@pxref{Literal examples}) to capturing time logging
1843information (@pxref{Clocking work time}). These blocks can be folded and 1900information (@pxref{Clocking work time}). These blocks can be folded and
1844unfolded by pressing TAB in the begin line. You can also get all blocks 1901unfolded by pressing TAB in the begin line. You can also get all blocks
1845folded at startup by configuring the variable @code{org-hide-block-startup} 1902folded at startup by configuring the option @code{org-hide-block-startup}
1846or on a per-file basis by using 1903or on a per-file basis by using
1847 1904
1848@cindex @code{hideblocks}, STARTUP keyword 1905@cindex @code{hideblocks}, STARTUP keyword
@@ -1857,13 +1914,13 @@ or on a per-file basis by using
1857@cindex footnotes 1914@cindex footnotes
1858 1915
1859Org mode supports the creation of footnotes. In contrast to the 1916Org mode supports the creation of footnotes. In contrast to the
1860@file{footnote.el} package, Org mode's footnotes are designed for work on a 1917@file{footnote.el} package, Org mode's footnotes are designed for work on
1861larger document, not only for one-off documents like emails. The basic 1918a larger document, not only for one-off documents like emails.
1862syntax is similar to the one used by @file{footnote.el}, i.e., a footnote is 1919
1863defined in a paragraph that is started by a footnote marker in square 1920A footnote is started by a footnote marker in square brackets in column 0, no
1864brackets in column 0, no indentation allowed. If you need a paragraph break 1921indentation allowed. It ends at the next footnote definition, headline, or
1865inside a footnote, use the @LaTeX{} idiom @samp{\par}. The footnote reference 1922after two consecutive empty lines. The footnote reference is simply the
1866is simply the marker in square brackets, inside text. For example: 1923marker in square brackets, inside text. For example:
1867 1924
1868@example 1925@example
1869The Org homepage[fn:1] now looks a lot better than it used to. 1926The Org homepage[fn:1] now looks a lot better than it used to.
@@ -1913,11 +1970,11 @@ is at a definition, jump to the (first) reference.
1913@vindex org-footnote-define-inline 1970@vindex org-footnote-define-inline
1914@vindex org-footnote-section 1971@vindex org-footnote-section
1915@vindex org-footnote-auto-adjust 1972@vindex org-footnote-auto-adjust
1916Otherwise, create a new footnote. Depending on the variable 1973Otherwise, create a new footnote. Depending on the option
1917@code{org-footnote-define-inline}@footnote{The corresponding in-buffer 1974@code{org-footnote-define-inline}@footnote{The corresponding in-buffer
1918setting is: @code{#+STARTUP: fninline} or @code{#+STARTUP: nofninline}}, the 1975setting is: @code{#+STARTUP: fninline} or @code{#+STARTUP: nofninline}}, the
1919definition will be placed right into the text as part of the reference, or 1976definition will be placed right into the text as part of the reference, or
1920separately into the location determined by the variable 1977separately into the location determined by the option
1921@code{org-footnote-section}. 1978@code{org-footnote-section}.
1922 1979
1923When this command is called with a prefix argument, a menu of additional 1980When this command is called with a prefix argument, a menu of additional
@@ -1928,17 +1985,16 @@ s @r{Sort the footnote definitions by reference sequence. During editing,}
1928 @r{sequence. If you want them sorted, use this command, which will} 1985 @r{sequence. If you want them sorted, use this command, which will}
1929 @r{also move entries according to @code{org-footnote-section}. Automatic} 1986 @r{also move entries according to @code{org-footnote-section}. Automatic}
1930 @r{sorting after each insertion/deletion can be configured using the} 1987 @r{sorting after each insertion/deletion can be configured using the}
1931 @r{variable @code{org-footnote-auto-adjust}.} 1988 @r{option @code{org-footnote-auto-adjust}.}
1932r @r{Renumber the simple @code{fn:N} footnotes. Automatic renumbering} 1989r @r{Renumber the simple @code{fn:N} footnotes. Automatic renumbering}
1933 @r{after each insertion/deletion can be configured using the variable} 1990 @r{after each insertion/deletion can be configured using the option}
1934 @r{@code{org-footnote-auto-adjust}.} 1991 @r{@code{org-footnote-auto-adjust}.}
1935S @r{Short for first @code{r}, then @code{s} action.} 1992S @r{Short for first @code{r}, then @code{s} action.}
1936n @r{Normalize the footnotes by collecting all definitions (including} 1993n @r{Normalize the footnotes by collecting all definitions (including}
1937 @r{inline definitions) into a special section, and then numbering them} 1994 @r{inline definitions) into a special section, and then numbering them}
1938 @r{in sequence. The references will then also be numbers. This is} 1995 @r{in sequence. The references will then also be numbers. This is}
1939 @r{meant to be the final step before finishing a document (e.g., sending} 1996 @r{meant to be the final step before finishing a document (e.g., sending}
1940 @r{off an email). The exporters do this automatically, and so could} 1997 @r{off an email).}
1941 @r{something like @code{message-send-hook}.}
1942d @r{Delete the footnote at point, and all definitions of and references} 1998d @r{Delete the footnote at point, and all definitions of and references}
1943 @r{to it.} 1999 @r{to it.}
1944@end example 2000@end example
@@ -1960,7 +2016,7 @@ Footnote labels are also links to the corresponding definition/reference, and
1960you can use the usual commands to follow these links. 2016you can use the usual commands to follow these links.
1961@end table 2017@end table
1962 2018
1963@node Orgstruct mode, , Footnotes, Document Structure 2019@node Orgstruct mode, Org syntax, Footnotes, Document Structure
1964@section The Orgstruct minor mode 2020@section The Orgstruct minor mode
1965@cindex Orgstruct mode 2021@cindex Orgstruct mode
1966@cindex minor mode for structure editing 2022@cindex minor mode for structure editing
@@ -1968,7 +2024,7 @@ you can use the usual commands to follow these links.
1968If you like the intuitive way the Org mode structure editing and list 2024If you like the intuitive way the Org mode structure editing and list
1969formatting works, you might want to use these commands in other modes like 2025formatting works, you might want to use these commands in other modes like
1970Text mode or Mail mode as well. The minor mode @code{orgstruct-mode} makes 2026Text mode or Mail mode as well. The minor mode @code{orgstruct-mode} makes
1971this possible. Toggle the mode with @kbd{M-x orgstruct-mode}, or 2027this possible. Toggle the mode with @kbd{M-x orgstruct-mode RET}, or
1972turn it on by default, for example in Message mode, with one of: 2028turn it on by default, for example in Message mode, with one of:
1973 2029
1974@lisp 2030@lisp
@@ -1980,10 +2036,42 @@ When this mode is active and the cursor is on a line that looks to Org like a
1980headline or the first line of a list item, most structure editing commands 2036headline or the first line of a list item, most structure editing commands
1981will work, even if the same keys normally have different functionality in the 2037will work, even if the same keys normally have different functionality in the
1982major mode you are using. If the cursor is not in one of those special 2038major mode you are using. If the cursor is not in one of those special
1983lines, Orgstruct mode lurks silently in the shadows. When you use 2039lines, Orgstruct mode lurks silently in the shadows.
1984@code{orgstruct++-mode}, Org will also export indentation and autofill 2040
1985settings into that mode, and detect item context after the first line of an 2041When you use @code{orgstruct++-mode}, Org will also export indentation and
1986item. 2042autofill settings into that mode, and detect item context after the first
2043line of an item.
2044
2045@vindex orgstruct-heading-prefix-regexp
2046You can also use Org structure editing to fold and unfold headlines in
2047@emph{any} file, provided you defined @code{orgstruct-heading-prefix-regexp}:
2048the regular expression must match the local prefix to use before Org's
2049headlines. For example, if you set this variable to @code{";; "} in Emacs
2050Lisp files, you will be able to fold and unfold headlines in Emacs Lisp
2051commented lines. Some commands like @code{org-demote} are disabled when the
2052prefix is set, but folding/unfolding will work correctly.
2053
2054@node Org syntax, , Orgstruct mode, Document Structure
2055@section Org syntax
2056@cindex Org syntax
2057
2058A reference document providing a formal description of Org's syntax is
2059available as @uref{http://orgmode.org/worg/dev/org-syntax.html, a draft on
2060Worg}, written and maintained by Nicolas Goaziou. It defines Org's core
2061internal concepts such as @code{headlines}, @code{sections}, @code{affiliated
2062keywords}, @code{(greater) elements} and @code{objects}. Each part of an Org
2063file falls into one of the categories above.
2064
2065To explore the abstract structure of an Org buffer, run this in a buffer:
2066
2067@lisp
2068M-: (org-element-parse-buffer) RET
2069@end lisp
2070
2071It will output a list containing the buffer's content represented as an
2072abstract structure. The export engine relies on the information stored in
2073this list. Most interactive commands (e.g., for structure editing) also
2074rely on the syntactic meaning of the surrounding context.
1987 2075
1988@node Tables, Hyperlinks, Document Structure, Top 2076@node Tables, Hyperlinks, Document Structure, Top
1989@chapter Tables 2077@chapter Tables
@@ -2046,7 +2134,7 @@ inserting and deleting avoids shifting other fields. Also, when
2046typing @emph{immediately after the cursor was moved into a new field 2134typing @emph{immediately after the cursor was moved into a new field
2047with @kbd{@key{TAB}}, @kbd{S-@key{TAB}} or @kbd{@key{RET}}}, the 2135with @kbd{@key{TAB}}, @kbd{S-@key{TAB}} or @kbd{@key{RET}}}, the
2048field is automatically made blank. If this behavior is too 2136field is automatically made blank. If this behavior is too
2049unpredictable for you, configure the variables 2137unpredictable for you, configure the options
2050@code{org-enable-table-editor} and @code{org-table-auto-blank-field}. 2138@code{org-enable-table-editor} and @code{org-table-auto-blank-field}.
2051 2139
2052@table @kbd 2140@table @kbd
@@ -2066,7 +2154,7 @@ table. But it is easier just to start typing, like
2066 2154
2067@tsubheading{Re-aligning and field motion} 2155@tsubheading{Re-aligning and field motion}
2068@orgcmd{C-c C-c,org-table-align} 2156@orgcmd{C-c C-c,org-table-align}
2069Re-align the table without moving the cursor. 2157Re-align the table and don't move to another field.
2070@c 2158@c
2071@orgcmd{<TAB>,org-table-next-field} 2159@orgcmd{<TAB>,org-table-next-field}
2072Re-align the table, move to the next field. Creates a new row if 2160Re-align the table, move to the next field. Creates a new row if
@@ -2165,7 +2253,7 @@ be inserted with @kbd{C-y}.
2165@vindex org-table-copy-increment 2253@vindex org-table-copy-increment
2166When current field is empty, copy from first non-empty field above. When not 2254When current field is empty, copy from first non-empty field above. When not
2167empty, copy current field down to next row and move cursor along with it. 2255empty, copy current field down to next row and move cursor along with it.
2168Depending on the variable @code{org-table-copy-increment}, integer field 2256Depending on the option @code{org-table-copy-increment}, integer field
2169values will be incremented during copy. Integers that are too large will not 2257values will be incremented during copy. Integers that are too large will not
2170be incremented. Also, a @code{0} prefix argument temporarily disables the 2258be incremented. Also, a @code{0} prefix argument temporarily disables the
2171increment. This key is also used by shift-selection and related modes 2259increment. This key is also used by shift-selection and related modes
@@ -2181,7 +2269,7 @@ window follow the cursor through the table and always show the current
2181field. The follow mode exits automatically when the cursor leaves the table, 2269field. The follow mode exits automatically when the cursor leaves the table,
2182or when you repeat this command with @kbd{C-u C-u C-c `}. 2270or when you repeat this command with @kbd{C-u C-u C-c `}.
2183@c 2271@c
2184@item M-x org-table-import 2272@item M-x org-table-import RET
2185Import a file as a table. The table should be TAB or whitespace 2273Import a file as a table. The table should be TAB or whitespace
2186separated. Use, for example, to import a spreadsheet table or data 2274separated. Use, for example, to import a spreadsheet table or data
2187from a database, because these programs generally can write 2275from a database, because these programs generally can write
@@ -2194,12 +2282,12 @@ Tables can also be imported by pasting tabular text into the Org
2194buffer, selecting the pasted text with @kbd{C-x C-x} and then using the 2282buffer, selecting the pasted text with @kbd{C-x C-x} and then using the
2195@kbd{C-c |} command (see above under @i{Creation and conversion}). 2283@kbd{C-c |} command (see above under @i{Creation and conversion}).
2196@c 2284@c
2197@item M-x org-table-export 2285@item M-x org-table-export RET
2198@findex org-table-export 2286@findex org-table-export
2199@vindex org-table-export-default-format 2287@vindex org-table-export-default-format
2200Export the table, by default as a TAB-separated file. Use for data 2288Export the table, by default as a TAB-separated file. Use for data
2201exchange with, for example, spreadsheet or database programs. The format 2289exchange with, for example, spreadsheet or database programs. The format
2202used to export the file can be configured in the variable 2290used to export the file can be configured in the option
2203@code{org-table-export-default-format}. You may also use properties 2291@code{org-table-export-default-format}. You may also use properties
2204@code{TABLE_EXPORT_FILE} and @code{TABLE_EXPORT_FORMAT} to specify the file 2292@code{TABLE_EXPORT_FILE} and @code{TABLE_EXPORT_FORMAT} to specify the file
2205name and the format for table export in a subtree. Org supports quite 2293name and the format for table export in a subtree. Org supports quite
@@ -2274,7 +2362,7 @@ If you would like to overrule the automatic alignment of number-rich columns
2274to the right and of string-rich column to the left, you can use @samp{<r>}, 2362to the right and of string-rich column to the left, you can use @samp{<r>},
2275@samp{<c>}@footnote{Centering does not work inside Emacs, but it does have an 2363@samp{<c>}@footnote{Centering does not work inside Emacs, but it does have an
2276effect when exporting to HTML.} or @samp{<l>} in a similar fashion. You may 2364effect when exporting to HTML.} or @samp{<l>} in a similar fashion. You may
2277also combine alignment and field width like this: @samp{<l10>}. 2365also combine alignment and field width like this: @samp{<r10>}.
2278 2366
2279Lines which only contain these formatting cookies will be removed 2367Lines which only contain these formatting cookies will be removed
2280automatically when exporting the document. 2368automatically when exporting the document.
@@ -2323,7 +2411,7 @@ every vertical line you would like to have:
2323If you like the intuitive way the Org table editor works, you 2411If you like the intuitive way the Org table editor works, you
2324might also want to use it in other modes like Text mode or Mail mode. 2412might also want to use it in other modes like Text mode or Mail mode.
2325The minor mode Orgtbl mode makes this possible. You can always toggle 2413The minor mode Orgtbl mode makes this possible. You can always toggle
2326the mode with @kbd{M-x orgtbl-mode}. To turn it on by default, for 2414the mode with @kbd{M-x orgtbl-mode RET}. To turn it on by default, for
2327example in Message mode, use 2415example in Message mode, use
2328 2416
2329@lisp 2417@lisp
@@ -2359,6 +2447,7 @@ formula, moving these references by arrow keys
2359* Durations and time values:: How to compute durations and time values 2447* Durations and time values:: How to compute durations and time values
2360* Field and range formulas:: Formula for specific (ranges of) fields 2448* Field and range formulas:: Formula for specific (ranges of) fields
2361* Column formulas:: Formulas valid for an entire column 2449* Column formulas:: Formulas valid for an entire column
2450* Lookup functions:: Lookup functions for searching tables
2362* Editing and debugging formulas:: Fixing formulas 2451* Editing and debugging formulas:: Fixing formulas
2363* Updating the table:: Recomputing all dependent fields 2452* Updating the table:: Recomputing all dependent fields
2364* Advanced features:: Field and column names, parameters and automatic recalc 2453* Advanced features:: Field and column names, parameters and automatic recalc
@@ -2384,8 +2473,8 @@ combination like @code{B3}, meaning the 2nd field in the 3rd row.
2384@vindex org-table-use-standard-references 2473@vindex org-table-use-standard-references
2385However, Org prefers@footnote{Org will understand references typed by the 2474However, Org prefers@footnote{Org will understand references typed by the
2386user as @samp{B4}, but it will not use this syntax when offering a formula 2475user as @samp{B4}, but it will not use this syntax when offering a formula
2387for editing. You can customize this behavior using the variable 2476for editing. You can customize this behavior using the option
2388@code{org-table-use-standard-references}.} to use another, more general 2477@code{org-table-use-standard-references}.} to use another, more general
2389representation that looks like this: 2478representation that looks like this:
2390@example 2479@example
2391@@@var{row}$@var{column} 2480@@@var{row}$@var{column}
@@ -2452,15 +2541,15 @@ $1..$3 @r{first three fields in the current row}
2452$P..$Q @r{range, using column names (see under Advanced)} 2541$P..$Q @r{range, using column names (see under Advanced)}
2453$<<<..$>> @r{start in third column, continue to the one but last} 2542$<<<..$>> @r{start in third column, continue to the one but last}
2454@@2$1..@@4$3 @r{6 fields between these two fields (same as @code{A2..C4})} 2543@@2$1..@@4$3 @r{6 fields between these two fields (same as @code{A2..C4})}
2455@@-1$-2..@@-1 @r{in the first row up, 3 fields from 2 columns on the left} 2544@@-1$-2..@@-1 @r{3 fields in the row above, starting from 2 columns on the left}
2456@@I..II @r{between first and second hline, short for @code{@@I..@@II}} 2545@@I..II @r{between first and second hline, short for @code{@@I..@@II}}
2457@end example 2546@end example
2458 2547
2459@noindent Range references return a vector of values that can be fed 2548@noindent Range references return a vector of values that can be fed
2460into Calc vector functions. Empty fields in ranges are normally 2549into Calc vector functions. Empty fields in ranges are normally suppressed,
2461suppressed, so that the vector contains only the non-empty fields (but 2550so that the vector contains only the non-empty fields. For other options
2462see the @samp{E} mode switch below). If there are no non-empty fields, 2551with the mode switches @samp{E}, @samp{N} and examples @pxref{Formula syntax
2463@samp{[0]} is returned to avoid syntax errors in formulas. 2552for Calc}.
2464 2553
2465@subsubheading Field coordinates in formulas 2554@subsubheading Field coordinates in formulas
2466@cindex field coordinates 2555@cindex field coordinates
@@ -2493,7 +2582,7 @@ number of rows.
2493 2582
2494@vindex org-table-formula-constants 2583@vindex org-table-formula-constants
2495@samp{$name} is interpreted as the name of a column, parameter or 2584@samp{$name} is interpreted as the name of a column, parameter or
2496constant. Constants are defined globally through the variable 2585constant. Constants are defined globally through the option
2497@code{org-table-formula-constants}, and locally (for the file) through a 2586@code{org-table-formula-constants}, and locally (for the file) through a
2498line like 2587line like
2499 2588
@@ -2526,7 +2615,7 @@ numbers.
2526@cindex references, to a different table 2615@cindex references, to a different table
2527@cindex name, of column or field 2616@cindex name, of column or field
2528@cindex constants, in calculations 2617@cindex constants, in calculations
2529@cindex #+TBLNAME 2618@cindex #+NAME, for table
2530 2619
2531You may also reference constants, fields and ranges from a different table, 2620You may also reference constants, fields and ranges from a different table,
2532either in the current file or even in a different file. The syntax is 2621either in the current file or even in a different file. The syntax is
@@ -2537,7 +2626,7 @@ remote(NAME-OR-ID,REF)
2537 2626
2538@noindent 2627@noindent
2539where NAME can be the name of a table in the current file as set by a 2628where NAME can be the name of a table in the current file as set by a
2540@code{#+TBLNAME: NAME} line before the table. It can also be the ID of an 2629@code{#+NAME: Name} line before the table. It can also be the ID of an
2541entry, even in a different file, and the reference then refers to the first 2630entry, even in a different file, and the reference then refers to the first
2542table in that entry. REF is an absolute field or range reference as 2631table in that entry. REF is an absolute field or range reference as
2543described above for example @code{@@3$3} or @code{$somename}, valid in the 2632described above for example @code{@@3$3} or @code{$somename}, valid in the
@@ -2548,14 +2637,13 @@ referenced table.
2548@cindex formula syntax, Calc 2637@cindex formula syntax, Calc
2549@cindex syntax, of formulas 2638@cindex syntax, of formulas
2550 2639
2551A formula can be any algebraic expression understood by the Emacs 2640A formula can be any algebraic expression understood by the Emacs @file{Calc}
2552@file{Calc} package. @b{Note that @file{calc} has the 2641package. Note that @file{calc} has the non-standard convention that @samp{/}
2553non-standard convention that @samp{/} has lower precedence than 2642has lower precedence than @samp{*}, so that @samp{a/b*c} is interpreted as
2554@samp{*}, so that @samp{a/b*c} is interpreted as @samp{a/(b*c)}.} Before 2643@samp{a/(b*c)}. Before evaluation by @code{calc-eval} (@pxref{Calling Calc
2555evaluation by @code{calc-eval} (@pxref{Calling Calc from 2644from Your Programs, calc-eval, Calling Calc from Your Lisp Programs, calc,
2556Your Programs, calc-eval, Calling Calc from Your Lisp Programs, calc, GNU 2645GNU Emacs Calc Manual}), variable substitution takes place according to the
2557Emacs Calc Manual}), 2646rules described above.
2558variable substitution takes place according to the rules described above.
2559@cindex vectors, in table calculations 2647@cindex vectors, in table calculations
2560The range vectors can be directly fed into the Calc vector functions 2648The range vectors can be directly fed into the Calc vector functions
2561like @samp{vmean} and @samp{vsum}. 2649like @samp{vmean} and @samp{vsum}.
@@ -2568,33 +2656,52 @@ string consists of flags to influence Calc and other modes during
2568execution. By default, Org uses the standard Calc modes (precision 2656execution. By default, Org uses the standard Calc modes (precision
256912, angular units degrees, fraction and symbolic modes off). The display 265712, angular units degrees, fraction and symbolic modes off). The display
2570format, however, has been changed to @code{(float 8)} to keep tables 2658format, however, has been changed to @code{(float 8)} to keep tables
2571compact. The default settings can be configured using the variable 2659compact. The default settings can be configured using the option
2572@code{org-calc-default-modes}. 2660@code{org-calc-default-modes}.
2573 2661
2574@example 2662@noindent List of modes:
2575p20 @r{set the internal Calc calculation precision to 20 digits} 2663
2576n3 s3 e2 f4 @r{Normal, scientific, engineering, or fixed} 2664@table @asis
2577 @r{format of the result of Calc passed back to Org.} 2665@item @code{p20}
2578 @r{Calc formatting is unlimited in precision as} 2666Set the internal Calc calculation precision to 20 digits.
2579 @r{long as the Calc calculation precision is greater.} 2667@item @code{n3}, @code{s3}, @code{e2}, @code{f4}
2580D R @r{angle modes: degrees, radians} 2668Normal, scientific, engineering or fixed format of the result of Calc passed
2581F S @r{fraction and symbolic modes} 2669back to Org. Calc formatting is unlimited in precision as long as the Calc
2582N @r{interpret all fields as numbers, use 0 for non-numbers} 2670calculation precision is greater.
2583E @r{keep empty fields in ranges} 2671@item @code{D}, @code{R}
2584L @r{literal} 2672Degree and radian angle modes of Calc.
2585@end example 2673@item @code{F}, @code{S}
2674Fraction and symbolic modes of Calc.
2675@item @code{T}, @code{t}
2676Duration computations in Calc or Lisp, @pxref{Durations and time values}.
2677@item @code{E}
2678If and how to consider empty fields. Without @samp{E} empty fields in range
2679references are suppressed so that the Calc vector or Lisp list contains only
2680the non-empty fields. With @samp{E} the empty fields are kept. For empty
2681fields in ranges or empty field references the value @samp{nan} (not a
2682number) is used in Calc formulas and the empty string is used for Lisp
2683formulas. Add @samp{N} to use 0 instead for both formula types. For the
2684value of a field the mode @samp{N} has higher precedence than @samp{E}.
2685@item @code{N}
2686Interpret all fields as numbers, use 0 for non-numbers. See the next section
2687to see how this is essential for computations with Lisp formulas. In Calc
2688formulas it is used only occasionally because there number strings are
2689already interpreted as numbers without @samp{N}.
2690@item @code{L}
2691Literal, for Lisp formulas only. See the next section.
2692@end table
2586 2693
2587@noindent 2694@noindent
2588Unless you use large integer numbers or high-precision-calculation 2695Unless you use large integer numbers or high-precision-calculation and
2589and -display for floating point numbers you may alternatively provide a 2696-display for floating point numbers you may alternatively provide a
2590@code{printf} format specifier to reformat the Calc result after it has been 2697@samp{printf} format specifier to reformat the Calc result after it has been
2591passed back to Org instead of letting Calc already do the 2698passed back to Org instead of letting Calc already do the
2592formatting@footnote{The @code{printf} reformatting is limited in precision 2699formatting@footnote{The @samp{printf} reformatting is limited in precision
2593because the value passed to it is converted into an @code{integer} or 2700because the value passed to it is converted into an @samp{integer} or
2594@code{double}. The @code{integer} is limited in size by truncating the 2701@samp{double}. The @samp{integer} is limited in size by truncating the
2595signed value to 32 bits. The @code{double} is limited in precision to 64 2702signed value to 32 bits. The @samp{double} is limited in precision to 64
2596bits overall which leaves approximately 16 significant decimal digits.}. 2703bits overall which leaves approximately 16 significant decimal digits.}. A
2597A few examples: 2704few examples:
2598 2705
2599@example 2706@example
2600$1+$2 @r{Sum of first and second field} 2707$1+$2 @r{Sum of first and second field}
@@ -2605,19 +2712,38 @@ $0;%.1f @r{Reformat current cell to 1 decimal}
2605$c/$1/$cm @r{Hz -> cm conversion, using @file{constants.el}} 2712$c/$1/$cm @r{Hz -> cm conversion, using @file{constants.el}}
2606tan($1);Dp3s1 @r{Compute in degrees, precision 3, display SCI 1} 2713tan($1);Dp3s1 @r{Compute in degrees, precision 3, display SCI 1}
2607sin($1);Dp3%.1e @r{Same, but use printf specifier for display} 2714sin($1);Dp3%.1e @r{Same, but use printf specifier for display}
2608vmean($2..$7) @r{Compute column range mean, using vector function}
2609vmean($2..$7);EN @r{Same, but treat empty fields as 0}
2610taylor($3,x=7,2) @r{Taylor series of $3, at x=7, second degree} 2715taylor($3,x=7,2) @r{Taylor series of $3, at x=7, second degree}
2611@end example 2716@end example
2612 2717
2613Calc also contains a complete set of logical operations. For example 2718Calc also contains a complete set of logical operations, (@pxref{Logical
2719Operations, , Logical Operations, calc, GNU Emacs Calc Manual}). For example
2614 2720
2615@example 2721@table @code
2616if($1<20,teen,string("")) @r{"teen" if age $1 less than 20, else empty} 2722@item if($1 < 20, teen, string(""))
2617@end example 2723"teen" if age $1 is less than 20, else the Org table result field is set to
2724empty with the empty string.
2725@item if("$1" == "nan" || "$2" == "nan", string(""), $1 + $2); E
2726Sum of the first two columns. When at least one of the input fields is empty
2727the Org table result field is set to empty.
2728@item if(typeof(vmean($1..$7)) == 12, string(""), vmean($1..$7); E
2729Mean value of a range unless there is any empty field. Every field in the
2730range that is empty is replaced by @samp{nan} which lets @samp{vmean} result
2731in @samp{nan}. Then @samp{typeof == 12} detects the @samp{nan} from
2732@samp{vmean} and the Org table result field is set to empty. Use this when
2733the sample set is expected to never have missing values.
2734@item if("$1..$7" == "[]", string(""), vmean($1..$7))
2735Mean value of a range with empty fields skipped. Every field in the range
2736that is empty is skipped. When all fields in the range are empty the mean
2737value is not defined and the Org table result field is set to empty. Use
2738this when the sample set can have a variable size.
2739@item vmean($1..$7); EN
2740To complete the example before: Mean value of a range with empty fields
2741counting as samples with value 0. Use this only when incomplete sample sets
2742should be padded with 0 to the full size.
2743@end table
2618 2744
2619Note that you can also use two org-specific flags @code{T} and @code{t} for 2745You can add your own Calc functions defined in Emacs Lisp with @code{defmath}
2620durations computations @ref{Durations and time values}. 2746and use them in formula syntax for Calc.
2621 2747
2622@node Formula syntax for Lisp, Durations and time values, Formula syntax for Calc, The spreadsheet 2748@node Formula syntax for Lisp, Durations and time values, Formula syntax for Calc, The spreadsheet
2623@subsection Emacs Lisp forms as formulas 2749@subsection Emacs Lisp forms as formulas
@@ -2646,14 +2772,14 @@ fields, so you can embed them in list or vector syntax.
2646Here are a few examples---note how the @samp{N} mode is used when we do 2772Here are a few examples---note how the @samp{N} mode is used when we do
2647computations in Lisp: 2773computations in Lisp:
2648 2774
2649@example 2775@table @code
2650@r{Swap the first two characters of the content of column 1} 2776@item '(concat (substring $1 1 2) (substring $1 0 1) (substring $1 2))
2651 '(concat (substring $1 1 2) (substring $1 0 1) (substring $1 2)) 2777Swap the first two characters of the content of column 1.
2652@r{Add columns 1 and 2, equivalent to Calc's @code{$1+$2}} 2778@item '(+ $1 $2);N
2653 '(+ $1 $2);N 2779Add columns 1 and 2, equivalent to Calc's @code{$1+$2}.
2654@r{Compute the sum of columns 1--4, like Calc's @code{vsum($1..$4)}} 2780@item '(apply '+ '($1..$4));N
2655 '(apply '+ '($1..$4));N 2781Compute the sum of columns 1 to 4, like Calc's @code{vsum($1..$4)}.
2656@end example 2782@end table
2657 2783
2658@node Durations and time values, Field and range formulas, Formula syntax for Lisp, The spreadsheet 2784@node Durations and time values, Field and range formulas, Formula syntax for Lisp, The spreadsheet
2659@subsection Durations and time values 2785@subsection Durations and time values
@@ -2677,7 +2803,7 @@ formulas or Elisp formulas:
2677Input duration values must be of the form @code{[HH:MM[:SS]}, where seconds 2803Input duration values must be of the form @code{[HH:MM[:SS]}, where seconds
2678are optional. With the @code{T} flag, computed durations will be displayed 2804are optional. With the @code{T} flag, computed durations will be displayed
2679as @code{HH:MM:SS} (see the first formula above). With the @code{t} flag, 2805as @code{HH:MM:SS} (see the first formula above). With the @code{t} flag,
2680computed durations will be displayed according to the value of the variable 2806computed durations will be displayed according to the value of the option
2681@code{org-table-duration-custom-format}, which defaults to @code{'hours} and 2807@code{org-table-duration-custom-format}, which defaults to @code{'hours} and
2682will display the result as a fraction of hours (see the second formula in the 2808will display the result as a fraction of hours (see the second formula in the
2683example above). 2809example above).
@@ -2741,7 +2867,7 @@ can also be used to assign a formula to some but not all fields in a row.
2741Named field, see @ref{Advanced features}. 2867Named field, see @ref{Advanced features}.
2742@end table 2868@end table
2743 2869
2744@node Column formulas, Editing and debugging formulas, Field and range formulas, The spreadsheet 2870@node Column formulas, Lookup functions, Field and range formulas, The spreadsheet
2745@subsection Column formulas 2871@subsection Column formulas
2746@cindex column formula 2872@cindex column formula
2747@cindex formula, for table column 2873@cindex formula, for table column
@@ -2749,10 +2875,13 @@ Named field, see @ref{Advanced features}.
2749When you assign a formula to a simple column reference like @code{$3=}, the 2875When you assign a formula to a simple column reference like @code{$3=}, the
2750same formula will be used in all fields of that column, with the following 2876same formula will be used in all fields of that column, with the following
2751very convenient exceptions: (i) If the table contains horizontal separator 2877very convenient exceptions: (i) If the table contains horizontal separator
2752hlines, everything before the first such line is considered part of the table 2878hlines with rows above and below, everything before the first such hline is
2753@emph{header} and will not be modified by column formulas. (ii) Fields that 2879considered part of the table @emph{header} and will not be modified by column
2754already get a value from a field/range formula will be left alone by column 2880formulas. Therefore a header is mandatory when you use column formulas and
2755formulas. These conditions make column formulas very easy to use. 2881want to add hlines to group rows, like for example to separate a total row at
2882the bottom from the summand rows above. (ii) Fields that already get a value
2883from a field/range formula will be left alone by column formulas. These
2884conditions make column formulas very easy to use.
2756 2885
2757To assign a formula to a column, type it directly into any field in the 2886To assign a formula to a column, type it directly into any field in the
2758column, preceded by an equal sign, like @samp{=$1+$2}. When you press 2887column, preceded by an equal sign, like @samp{=$1+$2}. When you press
@@ -2777,19 +2906,62 @@ stores it. With a numeric prefix argument(e.g., @kbd{C-5 C-c =}) the command
2777will apply it to that many consecutive fields in the current column. 2906will apply it to that many consecutive fields in the current column.
2778@end table 2907@end table
2779 2908
2780@node Editing and debugging formulas, Updating the table, Column formulas, The spreadsheet 2909@node Lookup functions, Editing and debugging formulas, Column formulas, The spreadsheet
2910@subsection Lookup functions
2911@cindex lookup functions in tables
2912@cindex table lookup functions
2913
2914Org has three predefined Emacs Lisp functions for lookups in tables.
2915@table @code
2916@item (org-lookup-first VAL S-LIST R-LIST &optional PREDICATE)
2917@findex org-lookup-first
2918Searches for the first element @code{S} in list @code{S-LIST} for which
2919@lisp
2920(PREDICATE VAL S)
2921@end lisp
2922is @code{t}; returns the value from the corresponding position in list
2923@code{R-LIST}. The default @code{PREDICATE} is @code{equal}. Note that the
2924parameters @code{VAL} and @code{S} are passed to @code{PREDICATE} in the same
2925order as the corresponding parameters are in the call to
2926@code{org-lookup-first}, where @code{VAL} precedes @code{S-LIST}. If
2927@code{R-LIST} is @code{nil}, the matching element @code{S} of @code{S-LIST}
2928is returned.
2929@item (org-lookup-last VAL S-LIST R-LIST &optional PREDICATE)
2930@findex org-lookup-last
2931Similar to @code{org-lookup-first} above, but searches for the @i{last}
2932element for which @code{PREDICATE} is @code{t}.
2933@item (org-lookup-all VAL S-LIST R-LIST &optional PREDICATE)
2934@findex org-lookup-all
2935Similar to @code{org-lookup-first}, but searches for @i{all} elements for
2936which @code{PREDICATE} is @code{t}, and returns @i{all} corresponding
2937values. This function can not be used by itself in a formula, because it
2938returns a list of values. However, powerful lookups can be built when this
2939function is combined with other Emacs Lisp functions.
2940@end table
2941
2942If the ranges used in these functions contain empty fields, the @code{E} mode
2943for the formula should usually be specified: otherwise empty fields will not be
2944included in @code{S-LIST} and/or @code{R-LIST} which can, for example, result
2945in an incorrect mapping from an element of @code{S-LIST} to the corresponding
2946element of @code{R-LIST}.
2947
2948These three functions can be used to implement associative arrays, count
2949matching cells, rank results, group data etc. For practical examples
2950see @uref{http://orgmode.org/worg/org-tutorials/org-lookups.html, this
2951tutorial on Worg}.
2952
2953@node Editing and debugging formulas, Updating the table, Lookup functions, The spreadsheet
2781@subsection Editing and debugging formulas 2954@subsection Editing and debugging formulas
2782@cindex formula editing 2955@cindex formula editing
2783@cindex editing, of table formulas 2956@cindex editing, of table formulas
2784 2957
2785@vindex org-table-use-standard-references 2958@vindex org-table-use-standard-references
2786You can edit individual formulas in the minibuffer or directly in the 2959You can edit individual formulas in the minibuffer or directly in the field.
2787field. Org can also prepare a special buffer with all active 2960Org can also prepare a special buffer with all active formulas of a table.
2788formulas of a table. When offering a formula for editing, Org 2961When offering a formula for editing, Org converts references to the standard
2789converts references to the standard format (like @code{B3} or @code{D&}) 2962format (like @code{B3} or @code{D&}) if possible. If you prefer to only work
2790if possible. If you prefer to only work with the internal format (like 2963with the internal format (like @code{@@3$2} or @code{$4}), configure the
2791@code{@@3$2} or @code{$4}), configure the variable 2964option @code{org-table-use-standard-references}.
2792@code{org-table-use-standard-references}.
2793 2965
2794@table @kbd 2966@table @kbd
2795@orgcmdkkc{C-c =,C-u C-c =,org-table-eval-formula} 2967@orgcmdkkc{C-c =,C-u C-c =,org-table-eval-formula}
@@ -2821,6 +2993,7 @@ active formula, the cursor in the formula editor will mark it.
2821While inside the special buffer, Org will automatically highlight 2993While inside the special buffer, Org will automatically highlight
2822any field or range reference at the cursor position. You may edit, 2994any field or range reference at the cursor position. You may edit,
2823remove and add formulas, and use the following commands: 2995remove and add formulas, and use the following commands:
2996
2824@table @kbd 2997@table @kbd
2825@orgcmdkkc{C-c C-c,C-x C-s,org-table-fedit-finish} 2998@orgcmdkkc{C-c C-c,C-x C-s,org-table-fedit-finish}
2826Exit the formula editor and store the modified formulas. With @kbd{C-u} 2999Exit the formula editor and store the modified formulas. With @kbd{C-u}
@@ -2872,6 +3045,52 @@ You may edit the @samp{#+TBLFM} directly and re-apply the changed
2872equations with @kbd{C-c C-c} in that line or with the normal 3045equations with @kbd{C-c C-c} in that line or with the normal
2873recalculation commands in the table. 3046recalculation commands in the table.
2874 3047
3048@anchor{Using multiple #+TBLFM lines}
3049@subsubheading Using multiple #+TBLFM lines
3050@cindex #+TBLFM line, multiple
3051@cindex #+TBLFM
3052@cindex #+TBLFM, switching
3053@kindex C-c C-c
3054
3055You may apply the formula temporarily. This is useful when you
3056switch the formula. Place multiple @samp{#+TBLFM} lines right
3057after the table, and then press @kbd{C-c C-c} on the formula to
3058apply. Here is an example:
3059
3060@example
3061| x | y |
3062|---+---|
3063| 1 | |
3064| 2 | |
3065#+TBLFM: $2=$1*1
3066#+TBLFM: $2=$1*2
3067@end example
3068
3069@noindent
3070Pressing @kbd{C-c C-c} in the line of @samp{#+TBLFM: $2=$1*2} yields:
3071
3072@example
3073| x | y |
3074|---+---|
3075| 1 | 2 |
3076| 2 | 4 |
3077#+TBLFM: $2=$1*1
3078#+TBLFM: $2=$1*2
3079@end example
3080
3081@noindent
3082Note: If you recalculate this table (with @kbd{C-u C-c *}, for example), you
3083will get the following result of applying only the first @samp{#+TBLFM} line.
3084
3085@example
3086| x | y |
3087|---+---|
3088| 1 | 1 |
3089| 2 | 2 |
3090#+TBLFM: $2=$1*1
3091#+TBLFM: $2=$1*2
3092@end example
3093
2875@subsubheading Debugging formulas 3094@subsubheading Debugging formulas
2876@cindex formula debugging 3095@cindex formula debugging
2877@cindex debugging, of table formulas 3096@cindex debugging, of table formulas
@@ -2910,10 +3129,10 @@ hline are left alone, assuming that these are part of the table header.
2910Iterate the table by recomputing it until no further changes occur. 3129Iterate the table by recomputing it until no further changes occur.
2911This may be necessary if some computed fields use the value of other 3130This may be necessary if some computed fields use the value of other
2912fields that are computed @i{later} in the calculation sequence. 3131fields that are computed @i{later} in the calculation sequence.
2913@item M-x org-table-recalculate-buffer-tables 3132@item M-x org-table-recalculate-buffer-tables RET
2914@findex org-table-recalculate-buffer-tables 3133@findex org-table-recalculate-buffer-tables
2915Recompute all tables in the current buffer. 3134Recompute all tables in the current buffer.
2916@item M-x org-table-iterate-buffer-tables 3135@item M-x org-table-iterate-buffer-tables RET
2917@findex org-table-iterate-buffer-tables 3136@findex org-table-iterate-buffer-tables
2918Iterate all tables in the current buffer, in order to converge table-to-table 3137Iterate all tables in the current buffer, in order to converge table-to-table
2919dependencies. 3138dependencies.
@@ -2966,6 +3185,7 @@ empty first field.
2966 3185
2967@cindex marking characters, tables 3186@cindex marking characters, tables
2968The marking characters have the following meaning: 3187The marking characters have the following meaning:
3188
2969@table @samp 3189@table @samp
2970@item ! 3190@item !
2971The fields in this line define names for the columns, so that you may 3191The fields in this line define names for the columns, so that you may
@@ -3167,10 +3387,8 @@ internal structure of all links, use the menu entry
3167If the link does not look like a URL, it is considered to be internal in the 3387If the link does not look like a URL, it is considered to be internal in the
3168current file. The most important case is a link like 3388current file. The most important case is a link like
3169@samp{[[#my-custom-id]]} which will link to the entry with the 3389@samp{[[#my-custom-id]]} which will link to the entry with the
3170@code{CUSTOM_ID} property @samp{my-custom-id}. Such custom IDs are very good 3390@code{CUSTOM_ID} property @samp{my-custom-id}. You are responsible yourself
3171for HTML export (@pxref{HTML export}) where they produce pretty section 3391to make sure these custom IDs are unique in a file.
3172links. You are responsible yourself to make sure these custom IDs are unique
3173in a file.
3174 3392
3175Links such as @samp{[[My Target]]} or @samp{[[My Target][Find my target]]} 3393Links such as @samp{[[My Target]]} or @samp{[[My Target][Find my target]]}
3176lead to a text search in the current file. 3394lead to a text search in the current file.
@@ -3178,27 +3396,48 @@ lead to a text search in the current file.
3178The link can be followed with @kbd{C-c C-o} when the cursor is on the link, 3396The link can be followed with @kbd{C-c C-o} when the cursor is on the link,
3179or with a mouse click (@pxref{Handling links}). Links to custom IDs will 3397or with a mouse click (@pxref{Handling links}). Links to custom IDs will
3180point to the corresponding headline. The preferred match for a text link is 3398point to the corresponding headline. The preferred match for a text link is
3181a @i{dedicated target}: the same string in double angular brackets. Targets 3399a @i{dedicated target}: the same string in double angular brackets, like
3182may be located anywhere; sometimes it is convenient to put them into a 3400@samp{<<My Target>>}.
3183comment line. For example 3401
3402@cindex #+NAME
3403If no dedicated target exists, the link will then try to match the exact name
3404of an element within the buffer. Naming is done with the @code{#+NAME}
3405keyword, which has to be put the line before the element it refers to, as in
3406the following example
3184 3407
3185@example 3408@example
3186# <<My Target>> 3409#+NAME: My Target
3410| a | table |
3411|----+------------|
3412| of | four cells |
3187@end example 3413@end example
3188 3414
3189@noindent In HTML export (@pxref{HTML export}), such targets will become 3415If none of the above succeeds, Org will search for a headline that is exactly
3190named anchors for direct access through @samp{http} links@footnote{Note that
3191text before the first headline is usually not exported, so the first such
3192target should be after the first headline, or in the line directly before the
3193first headline.}.
3194
3195If no dedicated target exists, Org will search for a headline that is exactly
3196the link text but may also include a TODO keyword and tags@footnote{To insert 3416the link text but may also include a TODO keyword and tags@footnote{To insert
3197a link targeting a headline, in-buffer completion can be used. Just type a 3417a link targeting a headline, in-buffer completion can be used. Just type
3198star followed by a few optional letters into the buffer and press 3418a star followed by a few optional letters into the buffer and press
3199@kbd{M-@key{TAB}}. All headlines in the current buffer will be offered as 3419@kbd{M-@key{TAB}}. All headlines in the current buffer will be offered as
3200completions.}. In non-Org files, the search will look for the words in the 3420completions.}.
3201link text. In the above example the search would be for @samp{my target}. 3421
3422During export, internal links will be used to mark objects and assign them
3423a number. Marked objects will then be referenced by links pointing to them.
3424In particular, links without a description will appear as the number assigned
3425to the marked object@footnote{When targeting a @code{#+NAME} keyword,
3426@code{#+CAPTION} keyword is mandatory in order to get proper numbering
3427(@pxref{Images and tables}).}. In the following excerpt from an Org buffer
3428
3429@example
3430- one item
3431- <<target>>another item
3432Here we refer to item [[target]].
3433@end example
3434
3435@noindent
3436The last sentence will appear as @samp{Here we refer to item 2} when
3437exported.
3438
3439In non-Org files, the search will look for the words in the link text. In
3440the above example the search would be for @samp{my target}.
3202 3441
3203Following a link pushes a mark onto Org's own mark ring. You can 3442Following a link pushes a mark onto Org's own mark ring. You can
3204return to the previous position with @kbd{C-c &}. Using this command 3443return to the previous position with @kbd{C-c &}. Using this command
@@ -3229,26 +3468,23 @@ cursor on or at a target.
3229@section External links 3468@section External links
3230@cindex links, external 3469@cindex links, external
3231@cindex external links 3470@cindex external links
3232@cindex links, external
3233@cindex Gnus links 3471@cindex Gnus links
3234@cindex BBDB links 3472@cindex BBDB links
3235@cindex IRC links 3473@cindex IRC links
3236@cindex URL links 3474@cindex URL links
3237@cindex file links 3475@cindex file links
3238@cindex VM links
3239@cindex RMAIL links 3476@cindex RMAIL links
3240@cindex WANDERLUST links
3241@cindex MH-E links 3477@cindex MH-E links
3242@cindex USENET links 3478@cindex USENET links
3243@cindex SHELL links 3479@cindex SHELL links
3244@cindex Info links 3480@cindex Info links
3245@cindex Elisp links 3481@cindex Elisp links
3246 3482
3247Org supports links to files, websites, Usenet and email messages, 3483Org supports links to files, websites, Usenet and email messages, BBDB
3248BBDB database entries and links to both IRC conversations and their 3484database entries and links to both IRC conversations and their logs.
3249logs. External links are URL-like locators. They start with a short 3485External links are URL-like locators. They start with a short identifying
3250identifying string followed by a colon. There can be no space after 3486string followed by a colon. There can be no space after the colon. The
3251the colon. The following list shows examples for each link type. 3487following list shows examples for each link type.
3252 3488
3253@example 3489@example
3254http://www.astro.uva.nl/~dominik @r{on the web} 3490http://www.astro.uva.nl/~dominik @r{on the web}
@@ -3263,8 +3499,8 @@ file:sometextfile::NNN @r{file, jump to line number}
3263file:projects.org @r{another Org file} 3499file:projects.org @r{another Org file}
3264file:projects.org::some words @r{text search in Org file}@footnote{ 3500file:projects.org::some words @r{text search in Org file}@footnote{
3265The actual behavior of the search will depend on the value of 3501The actual behavior of the search will depend on the value of
3266the variable @code{org-link-search-must-match-exact-headline}. If its value 3502the option @code{org-link-search-must-match-exact-headline}. If its value
3267is nil, then a fuzzy text search will be done. If it is t, then only the 3503is @code{nil}, then a fuzzy text search will be done. If it is t, then only the
3268exact headline will be matched. If the value is @code{'query-to-create}, 3504exact headline will be matched. If the value is @code{'query-to-create},
3269then an exact headline will be searched; if it is not found, then the user 3505then an exact headline will be searched; if it is not found, then the user
3270will be queried to create it.} 3506will be queried to create it.}
@@ -3275,13 +3511,6 @@ docview:papers/last.pdf::NNN @r{open in doc-view mode at page}
3275id:B7423F4D-2E8A-471B-8810-C40F074717E9 @r{Link to heading by ID} 3511id:B7423F4D-2E8A-471B-8810-C40F074717E9 @r{Link to heading by ID}
3276news:comp.emacs @r{Usenet link} 3512news:comp.emacs @r{Usenet link}
3277mailto:adent@@galaxy.net @r{Mail link} 3513mailto:adent@@galaxy.net @r{Mail link}
3278vm:folder @r{VM folder link}
3279vm:folder#id @r{VM message link}
3280vm://myself@@some.where.org/folder#id @r{VM on remote machine}
3281vm-imap:account:folder @r{VM IMAP folder link}
3282vm-imap:account:folder#id @r{VM IMAP message link}
3283wl:folder @r{WANDERLUST folder link}
3284wl:folder#id @r{WANDERLUST message link}
3285mhe:folder @r{MH-E folder link} 3514mhe:folder @r{MH-E folder link}
3286mhe:folder#id @r{MH-E message link} 3515mhe:folder#id @r{MH-E message link}
3287rmail:folder @r{RMAIL folder link} 3516rmail:folder @r{RMAIL folder link}
@@ -3296,11 +3525,27 @@ elisp:org-agenda @r{Interactive Elisp command}
3296elisp:(find-file-other-frame "Elisp.org") @r{Elisp form to evaluate} 3525elisp:(find-file-other-frame "Elisp.org") @r{Elisp form to evaluate}
3297@end example 3526@end example
3298 3527
3528@cindex VM links
3529@cindex WANDERLUST links
3530On top of these built-in link types, some are available through the
3531@code{contrib/} directory (@pxref{Installation}). For example, these links
3532to VM or Wanderlust messages are available when you load the corresponding
3533libraries from the @code{contrib/} directory:
3534
3535@example
3536vm:folder @r{VM folder link}
3537vm:folder#id @r{VM message link}
3538vm://myself@@some.where.org/folder#id @r{VM on remote machine}
3539vm-imap:account:folder @r{VM IMAP folder link}
3540vm-imap:account:folder#id @r{VM IMAP message link}
3541wl:folder @r{WANDERLUST folder link}
3542wl:folder#id @r{WANDERLUST message link}
3543@end example
3544
3299For customizing Org to add new link types @ref{Adding hyperlink types}. 3545For customizing Org to add new link types @ref{Adding hyperlink types}.
3300 3546
3301A link should be enclosed in double brackets and may contain a 3547A link should be enclosed in double brackets and may contain a descriptive
3302descriptive text to be displayed instead of the URL (@pxref{Link 3548text to be displayed instead of the URL (@pxref{Link format}), for example:
3303format}), for example:
3304 3549
3305@example 3550@example
3306[[http://www.gnu.org/software/emacs/][GNU Emacs]] 3551[[http://www.gnu.org/software/emacs/][GNU Emacs]]
@@ -3349,14 +3594,13 @@ timestamp in the headline.}.
3349If the headline has a @code{CUSTOM_ID} property, a link to this custom ID 3594If the headline has a @code{CUSTOM_ID} property, a link to this custom ID
3350will be stored. In addition or alternatively (depending on the value of 3595will be stored. In addition or alternatively (depending on the value of
3351@code{org-id-link-to-org-use-id}), a globally unique @code{ID} property will 3596@code{org-id-link-to-org-use-id}), a globally unique @code{ID} property will
3352be created and/or used to construct a link@footnote{The library @code{org-id} 3597be created and/or used to construct a link@footnote{The library
3353must first be loaded, either through @code{org-customize} by enabling 3598@file{org-id.el} must first be loaded, either through @code{org-customize} by
3354@code{id} in @code{org-modules} , or by adding @code{(require 'org-id)} in 3599enabling @code{org-id} in @code{org-modules}, or by adding @code{(require
3355your @file{.emacs}.}. So using this command in Org 3600'org-id)} in your @file{.emacs}.}. So using this command in Org buffers will
3356buffers will potentially create two links: a human-readable from the custom 3601potentially create two links: a human-readable from the custom ID, and one
3357ID, and one that is globally unique and works even if the entry is moved from 3602that is globally unique and works even if the entry is moved from file to
3358file to file. Later, when inserting the link, you need to decide which one 3603file. Later, when inserting the link, you need to decide which one to use.
3359to use.
3360 3604
3361@b{Email/News clients: VM, Rmail, Wanderlust, MH-E, Gnus}@* 3605@b{Email/News clients: VM, Rmail, Wanderlust, MH-E, Gnus}@*
3362Pretty much all Emacs mail clients are supported. The link will point to the 3606Pretty much all Emacs mail clients are supported. The link will point to the
@@ -3371,10 +3615,10 @@ Links created in a BBDB buffer will point to the current entry.
3371 3615
3372@b{Chat: IRC}@* 3616@b{Chat: IRC}@*
3373@vindex org-irc-link-to-logs 3617@vindex org-irc-link-to-logs
3374For IRC links, if you set the variable @code{org-irc-link-to-logs} to 3618For IRC links, if you set the option @code{org-irc-link-to-logs} to @code{t},
3375@code{t}, a @samp{file:/} style link to the relevant point in the logs for 3619a @samp{file:/} style link to the relevant point in the logs for the current
3376the current conversation is created. Otherwise an @samp{irc:/} style link to 3620conversation is created. Otherwise an @samp{irc:/} style link to the
3377the user/channel/server under the point will be stored. 3621user/channel/server under the point will be stored.
3378 3622
3379@b{Other files}@* 3623@b{Other files}@*
3380For any other files, the link will point to the file, with a search string 3624For any other files, the link will point to the file, with a search string
@@ -3476,7 +3720,7 @@ would. Under Emacs 22 and later, @kbd{mouse-1} will also follow a link.
3476@vindex org-display-internal-link-with-indirect-buffer 3720@vindex org-display-internal-link-with-indirect-buffer
3477Like @kbd{mouse-2}, but force file links to be opened with Emacs, and 3721Like @kbd{mouse-2}, but force file links to be opened with Emacs, and
3478internal links to be displayed in another window@footnote{See the 3722internal links to be displayed in another window@footnote{See the
3479variable @code{org-display-internal-link-with-indirect-buffer}}. 3723option @code{org-display-internal-link-with-indirect-buffer}}.
3480@c 3724@c
3481@orgcmd{C-c C-x C-v,org-toggle-inline-images} 3725@orgcmd{C-c C-x C-v,org-toggle-inline-images}
3482@cindex inlining images 3726@cindex inlining images
@@ -3490,7 +3734,7 @@ be inlined during export. When called with a prefix argument, also display
3490images that do have a link description. You can ask for inline images to be 3734images that do have a link description. You can ask for inline images to be
3491displayed at startup by configuring the variable 3735displayed at startup by configuring the variable
3492@code{org-startup-with-inline-images}@footnote{with corresponding 3736@code{org-startup-with-inline-images}@footnote{with corresponding
3493@code{#+STARTUP} keywords @code{inlineimages} and @code{inlineimages}}. 3737@code{#+STARTUP} keywords @code{inlineimages} and @code{noinlineimages}}.
3494@orgcmd{C-c %,org-mark-ring-push} 3738@orgcmd{C-c %,org-mark-ring-push}
3495@cindex mark ring 3739@cindex mark ring
3496Push the current position onto the mark ring, to be able to return 3740Push the current position onto the mark ring, to be able to return
@@ -3728,7 +3972,7 @@ Rotate the TODO state of the current item among
3728If TODO keywords have fast access keys (see @ref{Fast access to TODO 3972If TODO keywords have fast access keys (see @ref{Fast access to TODO
3729states}), you will be prompted for a TODO keyword through the fast selection 3973states}), you will be prompted for a TODO keyword through the fast selection
3730interface; this is the default behavior when 3974interface; this is the default behavior when
3731@var{org-use-fast-todo-selection} is @code{non-nil}. 3975@code{org-use-fast-todo-selection} is non-@code{nil}.
3732 3976
3733The same rotation can also be done ``remotely'' from the timeline and agenda 3977The same rotation can also be done ``remotely'' from the timeline and agenda
3734buffers with the @kbd{t} command key (@pxref{Agenda commands}). 3978buffers with the @kbd{t} command key (@pxref{Agenda commands}).
@@ -3736,7 +3980,7 @@ buffers with the @kbd{t} command key (@pxref{Agenda commands}).
3736@orgkey{C-u C-c C-t} 3980@orgkey{C-u C-c C-t}
3737When TODO keywords have no selection keys, select a specific keyword using 3981When TODO keywords have no selection keys, select a specific keyword using
3738completion; otherwise force cycling through TODO states with no prompt. When 3982completion; otherwise force cycling through TODO states with no prompt. When
3739@var{org-use-fast-todo-selection} is set to @code{prefix}, use the fast 3983@code{org-use-fast-todo-selection} is set to @code{prefix}, use the fast
3740selection interface. 3984selection interface.
3741 3985
3742@kindex S-@key{right} 3986@kindex S-@key{right}
@@ -3754,12 +3998,11 @@ with @code{shift-selection-mode}. See also the variable
3754View TODO items in a @emph{sparse tree} (@pxref{Sparse trees}). Folds the 3998View TODO items in a @emph{sparse tree} (@pxref{Sparse trees}). Folds the
3755entire buffer, but shows all TODO items (with not-DONE state) and the 3999entire buffer, but shows all TODO items (with not-DONE state) and the
3756headings hierarchy above them. With a prefix argument (or by using @kbd{C-c 4000headings hierarchy above them. With a prefix argument (or by using @kbd{C-c
3757/ T}), search for a specific TODO@. You will be prompted for the keyword, and 4001/ T}), search for a specific TODO@. You will be prompted for the keyword,
3758you can also give a list of keywords like @code{KWD1|KWD2|...} to list 4002and you can also give a list of keywords like @code{KWD1|KWD2|...} to list
3759entries that match any one of these keywords. With a numeric prefix argument 4003entries that match any one of these keywords. With a numeric prefix argument
3760N, show the tree for the Nth keyword in the variable 4004N, show the tree for the Nth keyword in the option @code{org-todo-keywords}.
3761@code{org-todo-keywords}. With two prefix arguments, find all TODO states, 4005With two prefix arguments, find all TODO states, both un-done and done.
3762both un-done and done.
3763@orgcmd{C-c a t,org-todo-list} 4006@orgcmd{C-c a t,org-todo-list}
3764Show the global TODO list. Collects the TODO items (with not-DONE states) 4007Show the global TODO list. Collects the TODO items (with not-DONE states)
3765from all agenda files (@pxref{Agenda Views}) into a single buffer. The new 4008from all agenda files (@pxref{Agenda Views}) into a single buffer. The new
@@ -3930,7 +4173,7 @@ each keyword, in parentheses@footnote{All characters are allowed except
3930@vindex org-fast-tag-selection-include-todo 4173@vindex org-fast-tag-selection-include-todo
3931If you then press @kbd{C-c C-t} followed by the selection key, the entry 4174If you then press @kbd{C-c C-t} followed by the selection key, the entry
3932will be switched to this state. @kbd{SPC} can be used to remove any TODO 4175will be switched to this state. @kbd{SPC} can be used to remove any TODO
3933keyword from an entry.@footnote{Check also the variable 4176keyword from an entry.@footnote{Check also the option
3934@code{org-fast-tag-selection-include-todo}, it allows you to change the TODO 4177@code{org-fast-tag-selection-include-todo}, it allows you to change the TODO
3935state through the tags interface (@pxref{Setting tags}), in case you like to 4178state through the tags interface (@pxref{Setting tags}), in case you like to
3936mingle the two concepts. Note that this means you need to come up with 4179mingle the two concepts. Note that this means you need to come up with
@@ -3994,7 +4237,7 @@ Org mode highlights TODO keywords with special faces: @code{org-todo}
3994for keywords indicating that an item still has to be acted upon, and 4237for keywords indicating that an item still has to be acted upon, and
3995@code{org-done} for keywords indicating that an item is finished. If 4238@code{org-done} for keywords indicating that an item is finished. If
3996you are using more than 2 different states, you might want to use 4239you are using more than 2 different states, you might want to use
3997special faces for some of them. This can be done using the variable 4240special faces for some of them. This can be done using the option
3998@code{org-todo-keyword-faces}. For example: 4241@code{org-todo-keyword-faces}. For example:
3999 4242
4000@lisp 4243@lisp
@@ -4007,7 +4250,7 @@ special faces for some of them. This can be done using the variable
4007 4250
4008While using a list with face properties as shown for CANCELED @emph{should} 4251While using a list with face properties as shown for CANCELED @emph{should}
4009work, this does not always seem to be the case. If necessary, define a 4252work, this does not always seem to be the case. If necessary, define a
4010special face and use that. A string is interpreted as a color. The variable 4253special face and use that. A string is interpreted as a color. The option
4011@code{org-faces-easy-properties} determines if that color is interpreted as a 4254@code{org-faces-easy-properties} determines if that color is interpreted as a
4012foreground or a background color. 4255foreground or a background color.
4013 4256
@@ -4023,7 +4266,7 @@ dependencies. Usually, a parent TODO task should not be marked DONE until
4023all subtasks (defined as children tasks) are marked as DONE@. And sometimes 4266all subtasks (defined as children tasks) are marked as DONE@. And sometimes
4024there is a logical sequence to a number of (sub)tasks, so that one task 4267there is a logical sequence to a number of (sub)tasks, so that one task
4025cannot be acted upon before all siblings above it are done. If you customize 4268cannot be acted upon before all siblings above it are done. If you customize
4026the variable @code{org-enforce-todo-dependencies}, Org will block entries 4269the option @code{org-enforce-todo-dependencies}, Org will block entries
4027from changing state to DONE while they have children that are not DONE@. 4270from changing state to DONE while they have children that are not DONE@.
4028Furthermore, if an entry has a property @code{ORDERED}, each of its children 4271Furthermore, if an entry has a property @code{ORDERED}, each of its children
4029will be blocked until all earlier siblings are marked DONE@. Here is an 4272will be blocked until all earlier siblings are marked DONE@. Here is an
@@ -4050,21 +4293,21 @@ example:
4050Toggle the @code{ORDERED} property of the current entry. A property is used 4293Toggle the @code{ORDERED} property of the current entry. A property is used
4051for this behavior because this should be local to the current entry, not 4294for this behavior because this should be local to the current entry, not
4052inherited like a tag. However, if you would like to @i{track} the value of 4295inherited like a tag. However, if you would like to @i{track} the value of
4053this property with a tag for better visibility, customize the variable 4296this property with a tag for better visibility, customize the option
4054@code{org-track-ordered-property-with-tag}. 4297@code{org-track-ordered-property-with-tag}.
4055@orgkey{C-u C-u C-u C-c C-t} 4298@orgkey{C-u C-u C-u C-c C-t}
4056Change TODO state, circumventing any state blocking. 4299Change TODO state, circumventing any state blocking.
4057@end table 4300@end table
4058 4301
4059@vindex org-agenda-dim-blocked-tasks 4302@vindex org-agenda-dim-blocked-tasks
4060If you set the variable @code{org-agenda-dim-blocked-tasks}, TODO entries 4303If you set the option @code{org-agenda-dim-blocked-tasks}, TODO entries
4061that cannot be closed because of such dependencies will be shown in a dimmed 4304that cannot be closed because of such dependencies will be shown in a dimmed
4062font or even made invisible in agenda views (@pxref{Agenda Views}). 4305font or even made invisible in agenda views (@pxref{Agenda Views}).
4063 4306
4064@cindex checkboxes and TODO dependencies 4307@cindex checkboxes and TODO dependencies
4065@vindex org-enforce-todo-dependencies 4308@vindex org-enforce-todo-dependencies
4066You can also block changes of TODO states by looking at checkboxes 4309You can also block changes of TODO states by looking at checkboxes
4067(@pxref{Checkboxes}). If you set the variable 4310(@pxref{Checkboxes}). If you set the option
4068@code{org-enforce-todo-checkbox-dependencies}, an entry that has unchecked 4311@code{org-enforce-todo-checkbox-dependencies}, an entry that has unchecked
4069checkboxes will be blocked from switching to DONE. 4312checkboxes will be blocked from switching to DONE.
4070 4313
@@ -4102,13 +4345,17 @@ in-buffer setting is: @code{#+STARTUP: logdone}}
4102(setq org-log-done 'time) 4345(setq org-log-done 'time)
4103@end lisp 4346@end lisp
4104 4347
4348@vindex org-closed-keep-when-no-todo
4105@noindent 4349@noindent
4106Then each time you turn an entry from a TODO (not-done) state into any 4350Then each time you turn an entry from a TODO (not-done) state into any of the
4107of the DONE states, a line @samp{CLOSED: [timestamp]} will be inserted 4351DONE states, a line @samp{CLOSED: [timestamp]} will be inserted just after
4108just after the headline. If you turn the entry back into a TODO item 4352the headline. If you turn the entry back into a TODO item through further
4109through further state cycling, that line will be removed again. If you 4353state cycling, that line will be removed again. If you turn the entry back
4110want to record a note along with the timestamp, use@footnote{The 4354to a non-TODO state (by pressing @key{C-c C-t SPC} for example), that line
4111corresponding in-buffer setting is: @code{#+STARTUP: lognotedone}} 4355will also be removed, unless you set @code{org-closed-keep-when-no-todo} to
4356non-@code{nil}. If you want to record a note along with the timestamp,
4357use@footnote{The corresponding in-buffer setting is: @code{#+STARTUP:
4358lognotedone}.}
4112 4359
4113@lisp 4360@lisp
4114(setq org-log-done 'note) 4361(setq org-log-done 'note)
@@ -4134,11 +4381,11 @@ When TODO keywords are used as workflow states (@pxref{Workflow states}), you
4134might want to keep track of when a state change occurred and maybe take a 4381might want to keep track of when a state change occurred and maybe take a
4135note about this change. You can either record just a timestamp, or a 4382note about this change. You can either record just a timestamp, or a
4136time-stamped note for a change. These records will be inserted after the 4383time-stamped note for a change. These records will be inserted after the
4137headline as an itemized list, newest first@footnote{See the variable 4384headline as an itemized list, newest first@footnote{See the option
4138@code{org-log-states-order-reversed}}. When taking a lot of notes, you might 4385@code{org-log-states-order-reversed}}. When taking a lot of notes, you might
4139want to get the notes out of the way into a drawer (@pxref{Drawers}). 4386want to get the notes out of the way into a drawer (@pxref{Drawers}).
4140Customize the variable @code{org-log-into-drawer} to get this behavior---the 4387Customize @code{org-log-into-drawer} to get this behavior---the recommended
4141recommended drawer for this is called @code{LOGBOOK}@footnote{Note that the 4388drawer for this is called @code{LOGBOOK}@footnote{Note that the
4142@code{LOGBOOK} drawer is unfolded when pressing @key{SPC} in the agenda to 4389@code{LOGBOOK} drawer is unfolded when pressing @key{SPC} in the agenda to
4143show an entry---use @key{C-u SPC} to keep it folded here}. You can also 4390show an entry---use @key{C-u SPC} to keep it folded here}. You can also
4144overrule the setting of this variable for a subtree by setting a 4391overrule the setting of this variable for a subtree by setting a
@@ -4186,7 +4433,7 @@ to a buffer:
4186@cindex property, LOGGING 4433@cindex property, LOGGING
4187In order to define logging settings that are local to a subtree or a 4434In order to define logging settings that are local to a subtree or a
4188single item, define a LOGGING property in this entry. Any non-empty 4435single item, define a LOGGING property in this entry. Any non-empty
4189LOGGING property resets all logging settings to nil. You may then turn 4436LOGGING property resets all logging settings to @code{nil}. You may then turn
4190on logging for this specific tree using STARTUP keywords like 4437on logging for this specific tree using STARTUP keywords like
4191@code{lognotedone} or @code{logrepeat}, as well as adding state specific 4438@code{lognotedone} or @code{logrepeat}, as well as adding state specific
4192settings like @code{TODO(!)}. For example 4439settings like @code{TODO(!)}. For example
@@ -4215,8 +4462,7 @@ called ``habits''. A habit has the following properties:
4215 4462
4216@enumerate 4463@enumerate
4217@item 4464@item
4218You have enabled the @code{habits} module by customizing the variable 4465You have enabled the @code{habits} module by customizing @code{org-modules}.
4219@code{org-modules}.
4220@item 4466@item
4221The habit is a TODO item, with a TODO keyword representing an open state. 4467The habit is a TODO item, with a TODO keyword representing an open state.
4222@item 4468@item
@@ -4298,7 +4544,7 @@ The amount of history, in days before today, to appear in consistency graphs.
4298@item org-habit-following-days 4544@item org-habit-following-days
4299The number of days after today that will appear in consistency graphs. 4545The number of days after today that will appear in consistency graphs.
4300@item org-habit-show-habits-only-for-today 4546@item org-habit-show-habits-only-for-today
4301If non-nil, only show habits in today's agenda view. This is set to true by 4547If non-@code{nil}, only show habits in today's agenda view. This is set to true by
4302default. 4548default.
4303@end table 4549@end table
4304 4550
@@ -4326,7 +4572,7 @@ By default, Org mode supports three priorities: @samp{A}, @samp{B}, and
4326treated just like priority @samp{B}. Priorities make a difference only for 4572treated just like priority @samp{B}. Priorities make a difference only for
4327sorting in the agenda (@pxref{Weekly/daily agenda}); outside the agenda, they 4573sorting in the agenda (@pxref{Weekly/daily agenda}); outside the agenda, they
4328have no inherent meaning to Org mode. The cookies can be highlighted with 4574have no inherent meaning to Org mode. The cookies can be highlighted with
4329special faces by customizing the variable @code{org-priority-faces}. 4575special faces by customizing @code{org-priority-faces}.
4330 4576
4331Priorities can be attached to any outline node; they do not need to be TODO 4577Priorities can be attached to any outline node; they do not need to be TODO
4332items. 4578items.
@@ -4353,7 +4599,7 @@ also used to modify timestamps (@pxref{Creating timestamps}). See also
4353@vindex org-highest-priority 4599@vindex org-highest-priority
4354@vindex org-lowest-priority 4600@vindex org-lowest-priority
4355@vindex org-default-priority 4601@vindex org-default-priority
4356You can change the range of allowed priorities by setting the variables 4602You can change the range of allowed priorities by setting the options
4357@code{org-highest-priority}, @code{org-lowest-priority}, and 4603@code{org-highest-priority}, @code{org-lowest-priority}, and
4358@code{org-default-priority}. For an individual buffer, you may set 4604@code{org-default-priority}. For an individual buffer, you may set
4359these values (highest, lowest, default) like this (please make sure that 4605these values (highest, lowest, default) like this (please make sure that
@@ -4397,7 +4643,7 @@ this issue.
4397 4643
4398@vindex org-hierarchical-todo-statistics 4644@vindex org-hierarchical-todo-statistics
4399If you would like to have the statistics cookie count any TODO entries in the 4645If you would like to have the statistics cookie count any TODO entries in the
4400subtree (not just direct children), configure the variable 4646subtree (not just direct children), configure
4401@code{org-hierarchical-todo-statistics}. To do this for a single subtree, 4647@code{org-hierarchical-todo-statistics}. To do this for a single subtree,
4402include the word @samp{recursive} into the value of the @code{COOKIE_DATA} 4648include the word @samp{recursive} into the value of the @code{COOKIE_DATA}
4403property. 4649property.
@@ -4462,15 +4708,15 @@ checked.
4462@cindex statistics, for checkboxes 4708@cindex statistics, for checkboxes
4463@cindex checkbox statistics 4709@cindex checkbox statistics
4464@cindex property, COOKIE_DATA 4710@cindex property, COOKIE_DATA
4465@vindex org-hierarchical-checkbox-statistics 4711@vindex org-checkbox-hierarchical-statistics
4466The @samp{[2/4]} and @samp{[1/3]} in the first and second line are cookies 4712The @samp{[2/4]} and @samp{[1/3]} in the first and second line are cookies
4467indicating how many checkboxes present in this entry have been checked off, 4713indicating how many checkboxes present in this entry have been checked off,
4468and the total number of checkboxes present. This can give you an idea on how 4714and the total number of checkboxes present. This can give you an idea on how
4469many checkboxes remain, even without opening a folded entry. The cookies can 4715many checkboxes remain, even without opening a folded entry. The cookies can
4470be placed into a headline or into (the first line of) a plain list item. 4716be placed into a headline or into (the first line of) a plain list item.
4471Each cookie covers checkboxes of direct children structurally below the 4717Each cookie covers checkboxes of direct children structurally below the
4472headline/item on which the cookie appears@footnote{Set the variable 4718headline/item on which the cookie appears@footnote{Set the option
4473@code{org-hierarchical-checkbox-statistics} if you want such cookies to 4719@code{org-checkbox-hierarchical-statistics} if you want such cookies to
4474count all checkboxes below the cookie, not just those belonging to direct 4720count all checkboxes below the cookie, not just those belonging to direct
4475children.}. You have to insert the cookie yourself by typing either 4721children.}. You have to insert the cookie yourself by typing either
4476@samp{[/]} or @samp{[%]}. With @samp{[/]} you get an @samp{n out of m} 4722@samp{[/]} or @samp{[%]}. With @samp{[/]} you get an @samp{n out of m}
@@ -4522,8 +4768,7 @@ Toggle the @code{ORDERED} property of the entry, to toggle if checkboxes must
4522be checked off in sequence. A property is used for this behavior because 4768be checked off in sequence. A property is used for this behavior because
4523this should be local to the current entry, not inherited like a tag. 4769this should be local to the current entry, not inherited like a tag.
4524However, if you would like to @i{track} the value of this property with a tag 4770However, if you would like to @i{track} the value of this property with a tag
4525for better visibility, customize the variable 4771for better visibility, customize @code{org-track-ordered-property-with-tag}.
4526@code{org-track-ordered-property-with-tag}.
4527@orgcmd{C-c #,org-update-statistics-cookies} 4772@orgcmd{C-c #,org-update-statistics-cookies}
4528Update the statistics cookie in the current outline entry. When called with 4773Update the statistics cookie in the current outline entry. When called with
4529a @kbd{C-u} prefix, update the entire file. Checkbox statistic cookies are 4774a @kbd{C-u} prefix, update the entire file. Checkbox statistic cookies are
@@ -4550,13 +4795,14 @@ headline. Tags are normal words containing letters, numbers, @samp{_}, and
4550@samp{@@}. Tags must be preceded and followed by a single colon, e.g., 4795@samp{@@}. Tags must be preceded and followed by a single colon, e.g.,
4551@samp{:work:}. Several tags can be specified, as in @samp{:work:urgent:}. 4796@samp{:work:}. Several tags can be specified, as in @samp{:work:urgent:}.
4552Tags will by default be in bold face with the same color as the headline. 4797Tags will by default be in bold face with the same color as the headline.
4553You may specify special faces for specific tags using the variable 4798You may specify special faces for specific tags using the option
4554@code{org-tag-faces}, in much the same way as you can for TODO keywords 4799@code{org-tag-faces}, in much the same way as you can for TODO keywords
4555(@pxref{Faces for TODO keywords}). 4800(@pxref{Faces for TODO keywords}).
4556 4801
4557@menu 4802@menu
4558* Tag inheritance:: Tags use the tree structure of the outline 4803* Tag inheritance:: Tags use the tree structure of the outline
4559* Setting tags:: How to assign tags to a headline 4804* Setting tags:: How to assign tags to a headline
4805* Tag groups:: Use one tag to search for several tags
4560* Tag searches:: Searching for combinations of tags 4806* Tag searches:: Searching for combinations of tags
4561@end menu 4807@end menu
4562 4808
@@ -4602,8 +4848,8 @@ on, all the sublevels in the same tree will (for a simple match form) match
4602as well@footnote{This is only true if the search does not involve more 4848as well@footnote{This is only true if the search does not involve more
4603complex tests including properties (@pxref{Property searches}).}. The list 4849complex tests including properties (@pxref{Property searches}).}. The list
4604of matches may then become very long. If you only want to see the first tags 4850of matches may then become very long. If you only want to see the first tags
4605match in a subtree, configure the variable 4851match in a subtree, configure @code{org-tags-match-list-sublevels} (not
4606@code{org-tags-match-list-sublevels} (not recommended). 4852recommended).
4607 4853
4608@vindex org-agenda-use-tag-inheritance 4854@vindex org-agenda-use-tag-inheritance
4609Tag inheritance is relevant when the agenda search tries to match a tag, 4855Tag inheritance is relevant when the agenda search tries to match a tag,
@@ -4611,10 +4857,10 @@ either in the @code{tags} or @code{tags-todo} agenda types. In other agenda
4611types, @code{org-use-tag-inheritance} has no effect. Still, you may want to 4857types, @code{org-use-tag-inheritance} has no effect. Still, you may want to
4612have your tags correctly set in the agenda, so that tag filtering works fine, 4858have your tags correctly set in the agenda, so that tag filtering works fine,
4613with inherited tags. Set @code{org-agenda-use-tag-inheritance} to control 4859with inherited tags. Set @code{org-agenda-use-tag-inheritance} to control
4614this: the default value includes all agenda types, but setting this to nil 4860this: the default value includes all agenda types, but setting this to @code{nil}
4615can really speed up agenda generation. 4861can really speed up agenda generation.
4616 4862
4617@node Setting tags, Tag searches, Tag inheritance, Tags 4863@node Setting tags, Tag groups, Tag inheritance, Tags
4618@section Setting tags 4864@section Setting tags
4619@cindex setting tags 4865@cindex setting tags
4620@cindex tags, setting 4866@cindex tags, setting
@@ -4635,6 +4881,7 @@ to @code{org-tags-column}. When called with a @kbd{C-u} prefix, all
4635tags in the current buffer will be aligned to that column, just to make 4881tags in the current buffer will be aligned to that column, just to make
4636things look nice. TAGS are automatically realigned after promotion, 4882things look nice. TAGS are automatically realigned after promotion,
4637demotion, and TODO state changes (@pxref{TODO basics}). 4883demotion, and TODO state changes (@pxref{TODO basics}).
4884
4638@orgcmd{C-c C-c,org-set-tags-command} 4885@orgcmd{C-c C-c,org-set-tags-command}
4639When the cursor is in a headline, this does the same as @kbd{C-c C-q}. 4886When the cursor is in a headline, this does the same as @kbd{C-c C-q}.
4640@end table 4887@end table
@@ -4722,7 +4969,7 @@ and @samp{@@tennisclub} should be selected. Multiple such groups are allowed.
4722these lines to activate any changes. 4969these lines to activate any changes.
4723 4970
4724@noindent 4971@noindent
4725To set these mutually exclusive groups in the variable @code{org-tags-alist}, 4972To set these mutually exclusive groups in the variable @code{org-tag-alist},
4726you must use the dummy tags @code{:startgroup} and @code{:endgroup} instead 4973you must use the dummy tags @code{:startgroup} and @code{:endgroup} instead
4727of the braces. Similarly, you can use @code{:newline} to indicate a line 4974of the braces. Similarly, you can use @code{:newline} to indicate a line
4728break. The previous example would be set globally by the following 4975break. The previous example would be set globally by the following
@@ -4785,17 +5032,58 @@ alternatively with @kbd{C-c C-c C-c w}. Adding the non-predefined tag
4785 5032
4786@vindex org-fast-tag-selection-single-key 5033@vindex org-fast-tag-selection-single-key
4787If you find that most of the time you need only a single key press to 5034If you find that most of the time you need only a single key press to
4788modify your list of tags, set the variable 5035modify your list of tags, set @code{org-fast-tag-selection-single-key}.
4789@code{org-fast-tag-selection-single-key}. Then you no longer have to 5036Then you no longer have to press @key{RET} to exit fast tag selection---it
4790press @key{RET} to exit fast tag selection---it will immediately exit 5037will immediately exit after the first change. If you then occasionally
4791after the first change. If you then occasionally need more keys, press 5038need more keys, press @kbd{C-c} to turn off auto-exit for the current tag
4792@kbd{C-c} to turn off auto-exit for the current tag selection process 5039selection process (in effect: start selection with @kbd{C-c C-c C-c}
4793(in effect: start selection with @kbd{C-c C-c C-c} instead of @kbd{C-c 5040instead of @kbd{C-c C-c}). If you set the variable to the value
4794C-c}). If you set the variable to the value @code{expert}, the special 5041@code{expert}, the special window is not even shown for single-key tag
4795window is not even shown for single-key tag selection, it comes up only 5042selection, it comes up only when you press an extra @kbd{C-c}.
4796when you press an extra @kbd{C-c}. 5043
4797 5044@node Tag groups, Tag searches, Setting tags, Tags
4798@node Tag searches, , Setting tags, Tags 5045@section Tag groups
5046
5047@cindex group tags
5048@cindex tags, groups
5049In a set of mutually exclusive tags, the first tag can be defined as a
5050@emph{group tag}. When you search for a group tag, it will return matches
5051for all members in the group. In an agenda view, filtering by a group tag
5052will display headlines tagged with at least one of the members of the
5053group. This makes tag searches and filters even more flexible.
5054
5055You can set group tags by inserting a colon between the group tag and other
5056tags---beware that all whitespaces are mandatory so that Org can parse this
5057line correctly:
5058
5059@example
5060#+TAGS: @{ @@read : @@read_book @@read_ebook @}
5061@end example
5062
5063In this example, @samp{@@read} is a @emph{group tag} for a set of three
5064tags: @samp{@@read}, @samp{@@read_book} and @samp{@@read_ebook}.
5065
5066You can also use the @code{:grouptags} keyword directly when setting
5067@code{org-tag-alist}:
5068
5069@lisp
5070(setq org-tag-alist '((:startgroup . nil)
5071 ("@@read" . nil)
5072 (:grouptags . nil)
5073 ("@@read_book" . nil)
5074 ("@@read_ebook" . nil)
5075 (:endgroup . nil)))
5076@end lisp
5077
5078You cannot nest group tags or use a group tag as a tag in another group.
5079
5080@kindex C-c C-x q
5081@vindex org-group-tags
5082If you want to ignore group tags temporarily, toggle group tags support
5083with @command{org-toggle-tags-groups}, bound to @kbd{C-c C-x q}. If you
5084want to disable tag groups completely, set @code{org-group-tags} to @code{nil}.
5085
5086@node Tag searches, , Tag groups, Tags
4799@section Tag searches 5087@section Tag searches
4800@cindex tag searches 5088@cindex tag searches
4801@cindex searching for tags 5089@cindex searching for tags
@@ -4805,15 +5093,16 @@ information into special lists.
4805 5093
4806@table @kbd 5094@table @kbd
4807@orgcmdkkc{C-c / m,C-c \\,org-match-sparse-tree} 5095@orgcmdkkc{C-c / m,C-c \\,org-match-sparse-tree}
4808Create a sparse tree with all headlines matching a tags search. With a 5096Create a sparse tree with all headlines matching a tags/property/TODO search.
4809@kbd{C-u} prefix argument, ignore headlines that are not a TODO line. 5097With a @kbd{C-u} prefix argument, ignore headlines that are not a TODO line.
4810@orgcmd{C-c a m,org-tags-view}
4811Create a global list of tag matches from all agenda files.
4812@xref{Matching tags and properties}. 5098@xref{Matching tags and properties}.
5099@orgcmd{C-c a m,org-tags-view}
5100Create a global list of tag matches from all agenda files. @xref{Matching
5101tags and properties}.
4813@orgcmd{C-c a M,org-tags-view} 5102@orgcmd{C-c a M,org-tags-view}
4814@vindex org-tags-match-list-sublevels 5103@vindex org-tags-match-list-sublevels
4815Create a global list of tag matches from all agenda files, but check 5104Create a global list of tag matches from all agenda files, but check
4816only TODO items and force checking subitems (see variable 5105only TODO items and force checking subitems (see the option
4817@code{org-tags-match-list-sublevels}). 5106@code{org-tags-match-list-sublevels}).
4818@end table 5107@end table
4819 5108
@@ -4908,6 +5197,9 @@ file, use a line like
4908#+PROPERTY: NDisks_ALL 1 2 3 4 5197#+PROPERTY: NDisks_ALL 1 2 3 4
4909@end example 5198@end example
4910 5199
5200Contrary to properties set from a special drawer, you have to refresh the
5201buffer with @kbd{C-c C-c} to activate this changes.
5202
4911If you want to add to the value of an existing property, append a @code{+} to 5203If you want to add to the value of an existing property, append a @code{+} to
4912the property name. The following results in the property @code{var} having 5204the property name. The following results in the property @code{var} having
4913the value ``foo=1 bar=2''. 5205the value ``foo=1 bar=2''.
@@ -4954,7 +5246,7 @@ in the current file will be offered as possible completions.
4954@orgcmd{C-c C-x p,org-set-property} 5246@orgcmd{C-c C-x p,org-set-property}
4955Set a property. This prompts for a property name and a value. If 5247Set a property. This prompts for a property name and a value. If
4956necessary, the property drawer is created as well. 5248necessary, the property drawer is created as well.
4957@item C-u M-x org-insert-drawer 5249@item C-u M-x org-insert-drawer RET
4958@cindex org-insert-drawer 5250@cindex org-insert-drawer
4959Insert a property drawer into the current entry. The drawer will be 5251Insert a property drawer into the current entry. The drawer will be
4960inserted early in the entry, but after the lines with planning 5252inserted early in the entry, but after the lines with planning
@@ -5033,6 +5325,7 @@ FILE @r{The filename the entry is located in.}
5033 5325
5034To create sparse trees and special lists with selection based on properties, 5326To create sparse trees and special lists with selection based on properties,
5035the same commands are used as for tag searches (@pxref{Tag searches}). 5327the same commands are used as for tag searches (@pxref{Tag searches}).
5328
5036@table @kbd 5329@table @kbd
5037@orgcmdkkc{C-c / m,C-c \\,org-match-sparse-tree} 5330@orgcmdkkc{C-c / m,C-c \\,org-match-sparse-tree}
5038Create a sparse tree with all matching entries. With a 5331Create a sparse tree with all matching entries. With a
@@ -5043,7 +5336,7 @@ Create a global list of tag/property matches from all agenda files.
5043@orgcmd{C-c a M,org-tags-view} 5336@orgcmd{C-c a M,org-tags-view}
5044@vindex org-tags-match-list-sublevels 5337@vindex org-tags-match-list-sublevels
5045Create a global list of tag matches from all agenda files, but check 5338Create a global list of tag matches from all agenda files, but check
5046only TODO items and force checking of subitems (see variable 5339only TODO items and force checking of subitems (see the option
5047@code{org-tags-match-list-sublevels}). 5340@code{org-tags-match-list-sublevels}).
5048@end table 5341@end table
5049 5342
@@ -5077,7 +5370,7 @@ useful, you can turn it on by setting the variable
5077@code{org-use-property-inheritance}. It may be set to @code{t} to make 5370@code{org-use-property-inheritance}. It may be set to @code{t} to make
5078all properties inherited from the parent, to a list of properties 5371all properties inherited from the parent, to a list of properties
5079that should be inherited, or to a regular expression that matches 5372that should be inherited, or to a regular expression that matches
5080inherited properties. If a property has the value @samp{nil}, this is 5373inherited properties. If a property has the value @code{nil}, this is
5081interpreted as an explicit undefine of the property, so that inheritance 5374interpreted as an explicit undefine of the property, so that inheritance
5082search will stop at this value and return @code{nil}. 5375search will stop at this value and return @code{nil}.
5083 5376
@@ -5351,7 +5644,7 @@ global @r{make a global view, including all headings in the file}
5351 @r{run column view at the top of this file} 5644 @r{run column view at the top of this file}
5352"@var{ID}" @r{call column view in the tree that has an @code{:ID:}} 5645"@var{ID}" @r{call column view in the tree that has an @code{:ID:}}
5353 @r{property with the value @i{label}. You can use} 5646 @r{property with the value @i{label}. You can use}
5354 @r{@kbd{M-x org-id-copy} to create a globally unique ID for} 5647 @r{@kbd{M-x org-id-copy RET} to create a globally unique ID for}
5355 @r{the current entry and copy it to the kill-ring.} 5648 @r{the current entry and copy it to the kill-ring.}
5356@end example 5649@end example
5357@item :hlines 5650@item :hlines
@@ -5604,10 +5897,9 @@ the following column).
5604@vindex org-read-date-prefer-future 5897@vindex org-read-date-prefer-future
5605When Org mode prompts for a date/time, the default is shown in default 5898When Org mode prompts for a date/time, the default is shown in default
5606date/time format, and the prompt therefore seems to ask for a specific 5899date/time format, and the prompt therefore seems to ask for a specific
5607format. But it will in fact accept any string containing some date and/or 5900format. But it will in fact accept date/time information in a variety of
5608time information, and it is really smart about interpreting your input. You 5901formats. Generally, the information should start at the beginning of the
5609can, for example, use @kbd{C-y} to paste a (possibly multi-line) string 5902string. Org mode will find whatever information is in
5610copied from an email message. Org mode will find whatever information is in
5611there and derive anything you have not specified from the @emph{default date 5903there and derive anything you have not specified from the @emph{default date
5612and time}. The default is usually the current date and time, but when 5904and time}. The default is usually the current date and time, but when
5613modifying an existing timestamp, or when entering the second stamp of a 5905modifying an existing timestamp, or when entering the second stamp of a
@@ -5630,7 +5922,7 @@ in @b{bold}.
563014 @result{} @b{2006}-@b{06}-14 592214 @result{} @b{2006}-@b{06}-14
563112 @result{} @b{2006}-@b{07}-12 592312 @result{} @b{2006}-@b{07}-12
56322/5 @result{} @b{2007}-02-05 59242/5 @result{} @b{2007}-02-05
5633Fri @result{} nearest Friday (default date or later) 5925Fri @result{} nearest Friday after the default date
5634sep 15 @result{} @b{2006}-09-15 5926sep 15 @result{} @b{2006}-09-15
5635feb 15 @result{} @b{2007}-02-15 5927feb 15 @result{} @b{2007}-02-15
5636sep 12 9 @result{} 2009-09-12 5928sep 12 9 @result{} 2009-09-12
@@ -5641,13 +5933,12 @@ w4 @result{} ISO week for of the current year @b{2006}
56412012-w04-5 @result{} Same as above 59332012-w04-5 @result{} Same as above
5642@end example 5934@end example
5643 5935
5644Furthermore you can specify a relative date by giving, as the 5936Furthermore you can specify a relative date by giving, as the @emph{first}
5645@emph{first} thing in the input: a plus/minus sign, a number and a 5937thing in the input: a plus/minus sign, a number and a letter ([hdwmy]) to
5646letter ([dwmy]) to indicate change in days, weeks, months, or years. With a 5938indicate change in hours, days, weeks, months, or years. With a single plus
5647single plus or minus, the date is always relative to today. With a 5939or minus, the date is always relative to today. With a double plus or minus,
5648double plus or minus, it is relative to the default date. If instead of 5940it is relative to the default date. If instead of a single letter, you use
5649a single letter, you use the abbreviation of day name, the date will be 5941the abbreviation of day name, the date will be the Nth such day, e.g.:
5650the Nth such day, e.g.:
5651 5942
5652@example 5943@example
5653+0 @result{} today 5944+0 @result{} today
@@ -5656,7 +5947,8 @@ the Nth such day, e.g.:
5656+4 @result{} same as above 5947+4 @result{} same as above
5657+2w @result{} two weeks from today 5948+2w @result{} two weeks from today
5658++5 @result{} five days from default date 5949++5 @result{} five days from default date
5659+2tue @result{} second Tuesday from now. 5950+2tue @result{} second Tuesday from now
5951-wed @result{} last Wednesday
5660@end example 5952@end example
5661 5953
5662@vindex parse-time-months 5954@vindex parse-time-months
@@ -5720,7 +6012,7 @@ The actions of the date/time prompt may seem complex, but I assure you they
5720will grow on you, and you will start getting annoyed by pretty much any other 6012will grow on you, and you will start getting annoyed by pretty much any other
5721way of entering a date/time out there. To help you understand what is going 6013way of entering a date/time out there. To help you understand what is going
5722on, the current interpretation of your input will be displayed live in the 6014on, the current interpretation of your input will be displayed live in the
5723minibuffer@footnote{If you find this distracting, turn the display of with 6015minibuffer@footnote{If you find this distracting, turn the display off with
5724@code{org-read-date-display-live}.}. 6016@code{org-read-date-display-live}.}.
5725 6017
5726@node Custom time format, , The date/time prompt, Creating timestamps 6018@node Custom time format, , The date/time prompt, Creating timestamps
@@ -5734,7 +6026,7 @@ minibuffer@footnote{If you find this distracting, turn the display of with
5734Org mode uses the standard ISO notation for dates and times as it is 6026Org mode uses the standard ISO notation for dates and times as it is
5735defined in ISO 8601. If you cannot get used to this and require another 6027defined in ISO 8601. If you cannot get used to this and require another
5736representation of date and time to keep you happy, you can get it by 6028representation of date and time to keep you happy, you can get it by
5737customizing the variables @code{org-display-custom-times} and 6029customizing the options @code{org-display-custom-times} and
5738@code{org-time-stamp-custom-formats}. 6030@code{org-time-stamp-custom-formats}.
5739 6031
5740@table @kbd 6032@table @kbd
@@ -5784,6 +6076,7 @@ Meaning: the task (most likely a TODO item, though not necessarily) is supposed
5784to be finished on that date. 6076to be finished on that date.
5785 6077
5786@vindex org-deadline-warning-days 6078@vindex org-deadline-warning-days
6079@vindex org-agenda-skip-deadline-prewarning-if-scheduled
5787On the deadline date, the task will be listed in the agenda. In 6080On the deadline date, the task will be listed in the agenda. In
5788addition, the agenda for @emph{today} will carry a warning about the 6081addition, the agenda for @emph{today} will carry a warning about the
5789approaching or missed deadline, starting 6082approaching or missed deadline, starting
@@ -5798,7 +6091,9 @@ until the entry is marked DONE@. An example:
5798 6091
5799You can specify a different lead time for warnings for a specific 6092You can specify a different lead time for warnings for a specific
5800deadlines using the following syntax. Here is an example with a warning 6093deadlines using the following syntax. Here is an example with a warning
5801period of 5 days @code{DEADLINE: <2004-02-29 Sun -5d>}. 6094period of 5 days @code{DEADLINE: <2004-02-29 Sun -5d>}. This warning is
6095deactivated if the task get scheduled and you set
6096@code{org-agenda-skip-deadline-prewarning-if-scheduled} to @code{t}.
5802 6097
5803@item SCHEDULED 6098@item SCHEDULED
5804@cindex SCHEDULED keyword 6099@cindex SCHEDULED keyword
@@ -5819,6 +6114,17 @@ the task will automatically be forwarded until completed.
5819 SCHEDULED: <2004-12-25 Sat> 6114 SCHEDULED: <2004-12-25 Sat>
5820@end example 6115@end example
5821 6116
6117@vindex org-scheduled-delay-days
6118@vindex org-agenda-skip-scheduled-delay-if-deadline
6119If you want to @emph{delay} the display of this task in the agenda, use
6120@code{SCHEDULED: <2004-12-25 Sat -2d>}: the task is still scheduled on the
612125th but will appear two days later. In case the task contains a repeater,
6122the delay is considered to affect all occurrences; if you want the delay to
6123only affect the first scheduled occurrence of the task, use @code{--2d}
6124instead. See @code{org-scheduled-delay-days} and
6125@code{org-agenda-skip-scheduled-delay-if-deadline} for details on how to
6126control this globally or per agenda.
6127
5822@noindent 6128@noindent
5823@b{Important:} Scheduling an item in Org mode should @i{not} be 6129@b{Important:} Scheduling an item in Org mode should @i{not} be
5824understood in the same way that we understand @i{scheduling a meeting}. 6130understood in the same way that we understand @i{scheduling a meeting}.
@@ -5979,8 +6285,14 @@ special repeaters @samp{++} and @samp{.+}. For example:
5979 today. 6285 today.
5980@end example 6286@end example
5981 6287
5982You may have both scheduling and deadline information for a specific 6288@vindex org-agenda-skip-scheduled-if-deadline-is-shown
5983task---just make sure that the repeater intervals on both are the same. 6289You may have both scheduling and deadline information for a specific task.
6290If the repeater is set for the scheduling information only, you probably want
6291the repeater to be ignored after the deadline. If so, set the variable
6292@code{org-agenda-skip-scheduled-if-deadline-is-shown} to
6293@code{repeated-after-deadline}. If you want both scheduling and deadline
6294information to repeat after the same interval, set the same repeater for both
6295timestamps.
5984 6296
5985An alternative to using a repeater is to create a number of copies of a task 6297An alternative to using a repeater is to create a number of copies of a task
5986subtree, with dates shifted in each copy. The command @kbd{C-c C-x c} was 6298subtree, with dates shifted in each copy. The command @kbd{C-c C-x c} was
@@ -6192,7 +6504,14 @@ be selected:
6192 thisyear, lastyear, thisyear-@var{N} @r{a relative year} 6504 thisyear, lastyear, thisyear-@var{N} @r{a relative year}
6193 @r{Use @kbd{S-@key{left}/@key{right}} keys to shift the time interval.} 6505 @r{Use @kbd{S-@key{left}/@key{right}} keys to shift the time interval.}
6194:tstart @r{A time string specifying when to start considering times.} 6506:tstart @r{A time string specifying when to start considering times.}
6507 @r{Relative times like @code{"<-2w>"} can also be used. See}
6508 @r{@ref{Matching tags and properties} for relative time syntax.}
6195:tend @r{A time string specifying when to stop considering times.} 6509:tend @r{A time string specifying when to stop considering times.}
6510 @r{Relative times like @code{"<now>"} can also be used. See}
6511 @r{@ref{Matching tags and properties} for relative time syntax.}
6512:wstart @r{The starting day of the week. The default is 1 for monday.}
6513:mstart @r{The starting day of the month. The default 1 is for the first}
6514 @r{day of the month.}
6196:step @r{@code{week} or @code{day}, to split the table into chunks.} 6515:step @r{@code{week} or @code{day}, to split the table into chunks.}
6197 @r{To use this, @code{:block} or @code{:tstart}, @code{:tend} are needed.} 6516 @r{To use this, @code{:block} or @code{:tstart}, @code{:tend} are needed.}
6198:stepskip0 @r{Do not show steps that have zero time.} 6517:stepskip0 @r{Do not show steps that have zero time.}
@@ -6243,6 +6562,11 @@ only to fit it into the manual.}
6243 :tend "<2006-08-10 Thu 12:00>" 6562 :tend "<2006-08-10 Thu 12:00>"
6244#+END: clocktable 6563#+END: clocktable
6245@end example 6564@end example
6565A range starting a week ago and ending right now could be written as
6566@example
6567#+BEGIN: clocktable :tstart "<-1w>" :tend "<now>"
6568#+END: clocktable
6569@end example
6246A summary of the current subtree with % times would be 6570A summary of the current subtree with % times would be
6247@example 6571@example
6248#+BEGIN: clocktable :scope subtree :link t :formula % 6572#+BEGIN: clocktable :scope subtree :link t :formula %
@@ -6260,6 +6584,7 @@ would be
6260 6584
6261@subsubheading Resolving idle time 6585@subsubheading Resolving idle time
6262@cindex resolve idle time 6586@cindex resolve idle time
6587@vindex org-clock-x11idle-program-name
6263 6588
6264@cindex idle, resolve, dangling 6589@cindex idle, resolve, dangling
6265If you clock in on a work item, and then walk away from your 6590If you clock in on a work item, and then walk away from your
@@ -6273,12 +6598,14 @@ as 10 or 15, Emacs can alert you when you get back to your computer after
6273being idle for that many minutes@footnote{On computers using Mac OS X, 6598being idle for that many minutes@footnote{On computers using Mac OS X,
6274idleness is based on actual user idleness, not just Emacs' idle time. For 6599idleness is based on actual user idleness, not just Emacs' idle time. For
6275X11, you can install a utility program @file{x11idle.c}, available in the 6600X11, you can install a utility program @file{x11idle.c}, available in the
6276@code{contrib/scripts} directory of the Org git distribution, to get the same 6601@code{contrib/scripts} directory of the Org git distribution, or install the
6277general treatment of idleness. On other systems, idle time refers to Emacs 6602@file{xprintidle} package and set it to the variable
6278idle time only.}, and ask what you want to do with the idle time. There will 6603@code{org-clock-x11idle-program-name} if you are running Debian, to get the
6279be a question waiting for you when you get back, indicating how much idle 6604same general treatment of idleness. On other systems, idle time refers to
6280time has passed (constantly updated with the current amount), as well as a 6605Emacs idle time only.}, and ask what you want to do with the idle time.
6281set of choices to correct the discrepancy: 6606There will be a question waiting for you when you get back, indicating how
6607much idle time has passed (constantly updated with the current amount), as
6608well as a set of choices to correct the discrepancy:
6282 6609
6283@table @kbd 6610@table @kbd
6284@item k 6611@item k
@@ -6470,7 +6797,7 @@ trees to an archive file keeps the system compact and fast.
6470* Attachments:: Add files to tasks 6797* Attachments:: Add files to tasks
6471* RSS Feeds:: Getting input from RSS feeds 6798* RSS Feeds:: Getting input from RSS feeds
6472* Protocols:: External (e.g., Browser) access to Emacs and Org 6799* Protocols:: External (e.g., Browser) access to Emacs and Org
6473* Refiling notes:: Moving a tree from one place to another 6800* Refile and copy:: Moving/copying a tree from one place to another
6474* Archiving:: What to do with finished projects 6801* Archiving:: What to do with finished projects
6475@end menu 6802@end menu
6476 6803
@@ -6478,25 +6805,22 @@ trees to an archive file keeps the system compact and fast.
6478@section Capture 6805@section Capture
6479@cindex capture 6806@cindex capture
6480 6807
6481Org's method for capturing new items is heavily inspired by John Wiegley 6808Capture lets you quickly store notes with little interruption of your work
6482excellent remember package. Up to version 6.36 Org used a special setup 6809flow. Org's method for capturing new items is heavily inspired by John
6483for @file{remember.el}. @file{org-remember.el} is still part of Org mode for 6810Wiegley excellent @file{remember.el} package. Up to version 6.36, Org
6484backward compatibility with existing setups. You can find the documentation 6811used a special setup for @file{remember.el}, then replaced it with
6485for org-remember at @url{http://orgmode.org/org-remember.pdf}. 6812@file{org-remember.el}. As of version 8.0, @file{org-remember.el} has
6813been completely replaced by @file{org-capture.el}.
6486 6814
6487The new capturing setup described here is preferred and should be used by new 6815If your configuration depends on @file{org-remember.el}, you need to update
6488users. To convert your @code{org-remember-templates}, run the command 6816it and use the setup described below. To convert your
6817@code{org-remember-templates}, run the command
6489@example 6818@example
6490@kbd{M-x org-capture-import-remember-templates @key{RET}} 6819@kbd{M-x org-capture-import-remember-templates RET}
6491@end example 6820@end example
6492@noindent and then customize the new variable with @kbd{M-x 6821@noindent and then customize the new variable with @kbd{M-x
6493customize-variable org-capture-templates}, check the result, and save the 6822customize-variable org-capture-templates}, check the result, and save the
6494customization. You can then use both remember and capture until 6823customization.
6495you are familiar with the new mechanism.
6496
6497Capture lets you quickly store notes with little interruption of your work
6498flow. The basic process of capturing is very similar to remember, but Org
6499does enhance it with templates and more.
6500 6824
6501@menu 6825@menu
6502* Setting up capture:: Where notes will be stored 6826* Setting up capture:: Where notes will be stored
@@ -6512,10 +6836,12 @@ a global key@footnote{Please select your own key, @kbd{C-c c} is only a
6512suggestion.} for capturing new material. 6836suggestion.} for capturing new material.
6513 6837
6514@vindex org-default-notes-file 6838@vindex org-default-notes-file
6515@example 6839@smalllisp
6840@group
6516(setq org-default-notes-file (concat org-directory "/notes.org")) 6841(setq org-default-notes-file (concat org-directory "/notes.org"))
6517(define-key global-map "\C-cc" 'org-capture) 6842(define-key global-map "\C-cc" 'org-capture)
6518@end example 6843@end group
6844@end smalllisp
6519 6845
6520@node Using capture, Capture templates, Setting up capture, Capture 6846@node Using capture, Capture templates, Setting up capture, Capture
6521@subsection Using capture 6847@subsection Using capture
@@ -6537,7 +6863,7 @@ so that you can resume your work without further distraction. When called
6537with a prefix arg, finalize and then jump to the captured item. 6863with a prefix arg, finalize and then jump to the captured item.
6538 6864
6539@orgcmd{C-c C-w,org-capture-refile} 6865@orgcmd{C-c C-w,org-capture-refile}
6540Finalize the capture process by refiling (@pxref{Refiling notes}) the note to 6866Finalize the capture process by refiling (@pxref{Refile and copy}) the note to
6541a different place. Please realize that this is a normal refiling command 6867a different place. Please realize that this is a normal refiling command
6542that will be executed---so the cursor position at the moment you run this 6868that will be executed---so the cursor position at the moment you run this
6543command is important. If you have inserted a tree with a parent and 6869command is important. If you have inserted a tree with a parent and
@@ -6594,13 +6920,15 @@ your file @file{~/org/gtd.org}. Also, a date tree in the file
6594@file{journal.org} should capture journal entries. A possible configuration 6920@file{journal.org} should capture journal entries. A possible configuration
6595would look like: 6921would look like:
6596 6922
6597@example 6923@smalllisp
6924@group
6598(setq org-capture-templates 6925(setq org-capture-templates
6599 '(("t" "Todo" entry (file+headline "~/org/gtd.org" "Tasks") 6926 '(("t" "Todo" entry (file+headline "~/org/gtd.org" "Tasks")
6600 "* TODO %?\n %i\n %a") 6927 "* TODO %?\n %i\n %a")
6601 ("j" "Journal" entry (file+datetree "~/org/journal.org") 6928 ("j" "Journal" entry (file+datetree "~/org/journal.org")
6602 "* %?\nEntered on %U\n %i\n %a"))) 6929 "* %?\nEntered on %U\n %i\n %a")))
6603@end example 6930@end group
6931@end smalllisp
6604 6932
6605@noindent If you then press @kbd{C-c c t}, Org will prepare the template 6933@noindent If you then press @kbd{C-c c t}, Org will prepare the template
6606for you like this: 6934for you like this:
@@ -6613,7 +6941,7 @@ for you like this:
6613During expansion of the template, @code{%a} has been replaced by a link to 6941During expansion of the template, @code{%a} has been replaced by a link to
6614the location from where you called the capture command. This can be 6942the location from where you called the capture command. This can be
6615extremely useful for deriving tasks from emails, for example. You fill in 6943extremely useful for deriving tasks from emails, for example. You fill in
6616the task definition, press @code{C-c C-c} and Org returns you to the same 6944the task definition, press @kbd{C-c C-c} and Org returns you to the same
6617place where you started the capture process. 6945place where you started the capture process.
6618 6946
6619To define special keys to capture to a particular template without going 6947To define special keys to capture to a particular template without going
@@ -6645,9 +6973,9 @@ single key, or @code{"bt"} for selection with two keys. When using
6645several keys, keys using the same prefix key must be sequential 6973several keys, keys using the same prefix key must be sequential
6646in the list and preceded by a 2-element entry explaining the 6974in the list and preceded by a 2-element entry explaining the
6647prefix key, for example 6975prefix key, for example
6648@example 6976@smalllisp
6649 ("b" "Templates for marking stuff to buy") 6977 ("b" "Templates for marking stuff to buy")
6650@end example 6978@end smalllisp
6651@noindent If you do not define a template for the @kbd{C} key, this key will 6979@noindent If you do not define a template for the @kbd{C} key, this key will
6652be used to open the customize buffer for this complex variable. 6980be used to open the customize buffer for this complex variable.
6653 6981
@@ -6657,6 +6985,7 @@ selection.
6657 6985
6658@item type 6986@item type
6659The type of entry, a symbol. Valid values are: 6987The type of entry, a symbol. Valid values are:
6988
6660@table @code 6989@table @code
6661@item entry 6990@item entry
6662An Org mode node, with a headline. Will be filed as the child of the target 6991An Org mode node, with a headline. Will be filed as the child of the target
@@ -6685,6 +7014,7 @@ the empty string, it defaults to @code{org-default-notes-file}. A file can
6685also be given as a variable, function, or Emacs Lisp form. 7014also be given as a variable, function, or Emacs Lisp form.
6686 7015
6687Valid values are: 7016Valid values are:
7017
6688@table @code 7018@table @code
6689@item (file "path/to/file") 7019@item (file "path/to/file")
6690Text will be placed at the beginning or end of that file. 7020Text will be placed at the beginning or end of that file.
@@ -6702,7 +7032,10 @@ For non-unique headings, the full path is safer.
6702Use a regular expression to position the cursor. 7032Use a regular expression to position the cursor.
6703 7033
6704@item (file+datetree "path/to/file") 7034@item (file+datetree "path/to/file")
6705Will create a heading in a date tree for today's date. 7035Will create a heading in a date tree for today's date@footnote{Datetree
7036headlines for years accept tags, so if you use both @code{* 2013 :noexport:}
7037and @code{* 2013} in your file, the capture will refile the note to the first
7038one matched.}.
6706 7039
6707@item (file+datetree+prompt "path/to/file") 7040@item (file+datetree+prompt "path/to/file")
6708Will create a heading in a date tree, but will prompt for the date. 7041Will create a heading in a date tree, but will prompt for the date.
@@ -6729,6 +7062,7 @@ more details.
6729@item properties 7062@item properties
6730The rest of the entry is a property list of additional options. 7063The rest of the entry is a property list of additional options.
6731Recognized properties are: 7064Recognized properties are:
7065
6732@table @code 7066@table @code
6733@item :prepend 7067@item :prepend
6734Normally new captured information will be appended at 7068Normally new captured information will be appended at
@@ -6782,7 +7116,9 @@ dynamic insertion of content. The templates are expanded in the order given her
6782@smallexample 7116@smallexample
6783%[@var{file}] @r{Insert the contents of the file given by @var{file}.} 7117%[@var{file}] @r{Insert the contents of the file given by @var{file}.}
6784%(@var{sexp}) @r{Evaluate Elisp @var{sexp} and replace with the result.} 7118%(@var{sexp}) @r{Evaluate Elisp @var{sexp} and replace with the result.}
6785 @r{The sexp must return a string.} 7119 @r{For convenience, %:keyword (see below) placeholders}
7120 @r{within the expression will be expanded prior to this.}
7121 @r{The sexp must return a string.}
6786%<...> @r{The result of format-time-string on the ... format specification.} 7122%<...> @r{The result of format-time-string on the ... format specification.}
6787%t @r{Timestamp, date only.} 7123%t @r{Timestamp, date only.}
6788%T @r{Timestamp, with date and time.} 7124%T @r{Timestamp, with date and time.}
@@ -6855,22 +7191,22 @@ To place the cursor after template expansion use:
6855 7191
6856@vindex org-capture-templates-contexts 7192@vindex org-capture-templates-contexts
6857To control whether a capture template should be accessible from a specific 7193To control whether a capture template should be accessible from a specific
6858context, you can customize @var{org-capture-templates-contexts}. Let's say 7194context, you can customize @code{org-capture-templates-contexts}. Let's say
6859for example that you have a capture template @code{"p"} for storing Gnus 7195for example that you have a capture template @code{"p"} for storing Gnus
6860emails containing patches. Then you would configure this option like this: 7196emails containing patches. Then you would configure this option like this:
6861 7197
6862@example 7198@smalllisp
6863(setq org-capture-templates-contexts 7199(setq org-capture-templates-contexts
6864 '(("p" (in-mode . "message-mode")))) 7200 '(("p" (in-mode . "message-mode"))))
6865@end example 7201@end smalllisp
6866 7202
6867You can also tell that the command key @code{"p"} should refer to another 7203You can also tell that the command key @code{"p"} should refer to another
6868template. In that case, add this command key like this: 7204template. In that case, add this command key like this:
6869 7205
6870@example 7206@smalllisp
6871(setq org-capture-templates-contexts 7207(setq org-capture-templates-contexts
6872 '(("p" "q" (in-mode . "message-mode")))) 7208 '(("p" "q" (in-mode . "message-mode"))))
6873@end example 7209@end smalllisp
6874 7210
6875See the docstring of the variable for more information. 7211See the docstring of the variable for more information.
6876 7212
@@ -6901,7 +7237,6 @@ directory.
6901@noindent The following commands deal with attachments: 7237@noindent The following commands deal with attachments:
6902 7238
6903@table @kbd 7239@table @kbd
6904
6905@orgcmd{C-c C-a,org-attach} 7240@orgcmd{C-c C-a,org-attach}
6906The dispatcher for commands related to the attachment system. After these 7241The dispatcher for commands related to the attachment system. After these
6907keys, a list of commands is displayed and you must press an additional key 7242keys, a list of commands is displayed and you must press an additional key
@@ -6975,12 +7310,14 @@ web to import tasks into Org. To access feeds, configure the variable
6975@code{org-feed-alist}. The docstring of this variable has detailed 7310@code{org-feed-alist}. The docstring of this variable has detailed
6976information. Here is just an example: 7311information. Here is just an example:
6977 7312
6978@example 7313@smalllisp
7314@group
6979(setq org-feed-alist 7315(setq org-feed-alist
6980 '(("Slashdot" 7316 '(("Slashdot"
6981 "http://rss.slashdot.org/Slashdot/slashdot" 7317 "http://rss.slashdot.org/Slashdot/slashdot"
6982 "~/txt/org/feeds.org" "Slashdot Entries"))) 7318 "~/txt/org/feeds.org" "Slashdot Entries")))
6983@end example 7319@end group
7320@end smalllisp
6984 7321
6985@noindent 7322@noindent
6986will configure that new items from the feed provided by 7323will configure that new items from the feed provided by
@@ -7009,7 +7346,7 @@ list of drawers in that file:
7009For more information, including how to read atom feeds, see 7346For more information, including how to read atom feeds, see
7010@file{org-feed.el} and the docstring of @code{org-feed-alist}. 7347@file{org-feed.el} and the docstring of @code{org-feed-alist}.
7011 7348
7012@node Protocols, Refiling notes, RSS Feeds, Capture - Refile - Archive 7349@node Protocols, Refile and copy, RSS Feeds, Capture - Refile - Archive
7013@section Protocols for external access 7350@section Protocols for external access
7014@cindex protocols, for external access 7351@cindex protocols, for external access
7015@cindex emacsserver 7352@cindex emacsserver
@@ -7023,17 +7360,22 @@ a remote website you are looking at with the browser. See
7023@uref{http://orgmode.org/worg/org-contrib/org-protocol.php} for detailed 7360@uref{http://orgmode.org/worg/org-contrib/org-protocol.php} for detailed
7024documentation and setup instructions. 7361documentation and setup instructions.
7025 7362
7026@node Refiling notes, Archiving, Protocols, Capture - Refile - Archive 7363@node Refile and copy, Archiving, Protocols, Capture - Refile - Archive
7027@section Refiling notes 7364@section Refile and copy
7028@cindex refiling notes 7365@cindex refiling notes
7366@cindex copying notes
7029 7367
7030When reviewing the captured data, you may want to refile some of the entries 7368When reviewing the captured data, you may want to refile or to copy some of
7031into a different list, for example into a project. Cutting, finding the 7369the entries into a different list, for example into a project. Cutting,
7032right location, and then pasting the note is cumbersome. To simplify this 7370finding the right location, and then pasting the note is cumbersome. To
7033process, you can use the following special command: 7371simplify this process, you can use the following special command:
7034 7372
7035@table @kbd 7373@table @kbd
7374@orgcmd{C-c M-w,org-copy}
7375@findex org-copy
7376Copying works like refiling, except that the original note is not deleted.
7036@orgcmd{C-c C-w,org-refile} 7377@orgcmd{C-c C-w,org-refile}
7378@findex org-refile
7037@vindex org-reverse-note-order 7379@vindex org-reverse-note-order
7038@vindex org-refile-targets 7380@vindex org-refile-targets
7039@vindex org-refile-use-outline-path 7381@vindex org-refile-use-outline-path
@@ -7041,6 +7383,7 @@ process, you can use the following special command:
7041@vindex org-refile-allow-creating-parent-nodes 7383@vindex org-refile-allow-creating-parent-nodes
7042@vindex org-log-refile 7384@vindex org-log-refile
7043@vindex org-refile-use-cache 7385@vindex org-refile-use-cache
7386@vindex org-refile-keep
7044Refile the entry or region at point. This command offers possible locations 7387Refile the entry or region at point. This command offers possible locations
7045for refiling the entry and lets you select one with completion. The item (or 7388for refiling the entry and lets you select one with completion. The item (or
7046all items in the region) is filed below the target heading as a subitem. 7389all items in the region) is filed below the target heading as a subitem.
@@ -7064,13 +7407,17 @@ Use the refile interface to jump to a heading.
7064Jump to the location where @code{org-refile} last moved a tree to. 7407Jump to the location where @code{org-refile} last moved a tree to.
7065@item C-2 C-c C-w 7408@item C-2 C-c C-w
7066Refile as the child of the item currently being clocked. 7409Refile as the child of the item currently being clocked.
7410@item C-3 C-c C-w
7411Refile and keep the entry in place. Also see @code{org-refile-keep} to make
7412this the default behavior, and beware that this may result in duplicated
7413@code{ID} properties.
7067@orgcmdtkc{C-0 C-c C-w @ @r{or} @ C-u C-u C-u C-c C-w,C-0 C-c C-w,org-refile-cache-clear} 7414@orgcmdtkc{C-0 C-c C-w @ @r{or} @ C-u C-u C-u C-c C-w,C-0 C-c C-w,org-refile-cache-clear}
7068Clear the target cache. Caching of refile targets can be turned on by 7415Clear the target cache. Caching of refile targets can be turned on by
7069setting @code{org-refile-use-cache}. To make the command see new possible 7416setting @code{org-refile-use-cache}. To make the command see new possible
7070targets, you have to clear the cache with this command. 7417targets, you have to clear the cache with this command.
7071@end table 7418@end table
7072 7419
7073@node Archiving, , Refiling notes, Capture - Refile - Archive 7420@node Archiving, , Refile and copy, Capture - Refile - Archive
7074@section Archiving 7421@section Archiving
7075@cindex archiving 7422@cindex archiving
7076 7423
@@ -7307,7 +7654,7 @@ Remove current file from the list of agenda files.
7307@itemx C-, 7654@itemx C-,
7308Cycle through agenda file list, visiting one file after the other. 7655Cycle through agenda file list, visiting one file after the other.
7309@kindex M-x org-iswitchb 7656@kindex M-x org-iswitchb
7310@item M-x org-iswitchb 7657@item M-x org-iswitchb RET
7311Command to use an @code{iswitchb}-like interface to switch to and between Org 7658Command to use an @code{iswitchb}-like interface to switch to and between Org
7312buffers. 7659buffers.
7313@end table 7660@end table
@@ -7338,6 +7685,7 @@ Remove the permanent restriction created by @kbd{C-c C-x <}.
7338@noindent 7685@noindent
7339When working with @file{speedbar.el}, you can use the following commands in 7686When working with @file{speedbar.el}, you can use the following commands in
7340the Speedbar frame: 7687the Speedbar frame:
7688
7341@table @kbd 7689@table @kbd
7342@orgcmdtkc{< @r{in the speedbar frame},<,org-speedbar-set-agenda-restriction} 7690@orgcmdtkc{< @r{in the speedbar frame},<,org-speedbar-set-agenda-restriction}
7343Permanently restrict the agenda to the item---either an Org file or a subtree 7691Permanently restrict the agenda to the item---either an Org file or a subtree
@@ -7358,6 +7706,7 @@ following we will assume that @kbd{C-c a} is indeed how the dispatcher
7358is accessed and list keyboard access to commands accordingly. After 7706is accessed and list keyboard access to commands accordingly. After
7359pressing @kbd{C-c a}, an additional letter is required to execute a 7707pressing @kbd{C-c a}, an additional letter is required to execute a
7360command. The dispatcher offers the following default commands: 7708command. The dispatcher offers the following default commands:
7709
7361@table @kbd 7710@table @kbd
7362@item a 7711@item a
7363Create the calendar-like agenda (@pxref{Weekly/daily agenda}). 7712Create the calendar-like agenda (@pxref{Weekly/daily agenda}).
@@ -7446,11 +7795,16 @@ C-c a a}) you may set the number of days to be displayed.
7446 7795
7447@vindex org-agenda-span 7796@vindex org-agenda-span
7448@vindex org-agenda-ndays 7797@vindex org-agenda-ndays
7798@vindex org-agenda-start-day
7799@vindex org-agenda-start-on-weekday
7449The default number of days displayed in the agenda is set by the variable 7800The default number of days displayed in the agenda is set by the variable
7450@code{org-agenda-span} (or the obsolete @code{org-agenda-ndays}). This 7801@code{org-agenda-span} (or the obsolete @code{org-agenda-ndays}). This
7451variable can be set to any number of days you want to see by default in the 7802variable can be set to any number of days you want to see by default in the
7452agenda, or to a span name, such a @code{day}, @code{week}, @code{month} or 7803agenda, or to a span name, such as @code{day}, @code{week}, @code{month} or
7453@code{year}. 7804@code{year}. For weekly agendas, the default is to start on the previous
7805monday (see @code{org-agenda-start-on-weekday}). You can also set the start
7806date using a date shift: @code{(setq org-agenda-start-day "+10d")} will
7807start the agenda ten days from today in the future.
7454 7808
7455Remote editing from the agenda buffer means, for example, that you can 7809Remote editing from the agenda buffer means, for example, that you can
7456change the dates of deadlines and appointments from the agenda buffer. 7810change the dates of deadlines and appointments from the agenda buffer.
@@ -7656,16 +8010,21 @@ commands}.
7656@subsubheading Match syntax 8010@subsubheading Match syntax
7657 8011
7658@cindex Boolean logic, for tag/property searches 8012@cindex Boolean logic, for tag/property searches
7659A search string can use Boolean operators @samp{&} for AND and @samp{|} for 8013A search string can use Boolean operators @samp{&} for @code{AND} and
7660OR@. @samp{&} binds more strongly than @samp{|}. Parentheses are currently 8014@samp{|} for @code{OR}@. @samp{&} binds more strongly than @samp{|}.
7661not implemented. Each element in the search is either a tag, a regular 8015Parentheses are not implemented. Each element in the search is either a
7662expression matching tags, or an expression like @code{PROPERTY OPERATOR 8016tag, a regular expression matching tags, or an expression like
7663VALUE} with a comparison operator, accessing a property value. Each element 8017@code{PROPERTY OPERATOR VALUE} with a comparison operator, accessing a
7664may be preceded by @samp{-}, to select against it, and @samp{+} is syntactic 8018property value. Each element may be preceded by @samp{-}, to select
7665sugar for positive selection. The AND operator @samp{&} is optional when 8019against it, and @samp{+} is syntactic sugar for positive selection. The
7666@samp{+} or @samp{-} is present. Here are some examples, using only tags. 8020@code{AND} operator @samp{&} is optional when @samp{+} or @samp{-} is
8021present. Here are some examples, using only tags.
7667 8022
7668@table @samp 8023@table @samp
8024@item work
8025Select headlines tagged @samp{:work:}.
8026@item work&boss
8027Select headlines tagged @samp{:work:} and @samp{:boss:}.
7669@item +work-boss 8028@item +work-boss
7670Select headlines tagged @samp{:work:}, but discard those also tagged 8029Select headlines tagged @samp{:work:}, but discard those also tagged
7671@samp{:boss:}. 8030@samp{:boss:}.
@@ -7682,6 +8041,13 @@ braces. For example,
7682@samp{work+@{^boss.*@}} matches headlines that contain the tag 8041@samp{work+@{^boss.*@}} matches headlines that contain the tag
7683@samp{:work:} and any tag @i{starting} with @samp{boss}. 8042@samp{:work:} and any tag @i{starting} with @samp{boss}.
7684 8043
8044@cindex group tags, as regular expressions
8045Group tags (@pxref{Tag groups}) are expanded as regular expressions. E.g.,
8046if @samp{:work:} is a group tag for the group @samp{:work:lab:conf:}, then
8047searching for @samp{work} will search for @samp{@{\(?:work\|lab\|conf\)@}}
8048and searching for @samp{-work} will search for all headlines but those with
8049one of the tag in the group (i.e., @samp{-@{\(?:work\|lab\|conf\)@}}).
8050
7685@cindex TODO keyword matching, with tags search 8051@cindex TODO keyword matching, with tags search
7686@cindex level, require for tags/property match 8052@cindex level, require for tags/property match
7687@cindex category, require for tags/property match 8053@cindex category, require for tags/property match
@@ -7690,16 +8056,20 @@ You may also test for properties (@pxref{Properties and Columns}) at the same
7690time as matching tags. The properties may be real properties, or special 8056time as matching tags. The properties may be real properties, or special
7691properties that represent other metadata (@pxref{Special properties}). For 8057properties that represent other metadata (@pxref{Special properties}). For
7692example, the ``property'' @code{TODO} represents the TODO keyword of the 8058example, the ``property'' @code{TODO} represents the TODO keyword of the
7693entry. Or, the ``property'' @code{LEVEL} represents the level of an entry. 8059entry and the ``propety'' @code{PRIORITY} represents the PRIORITY keyword of
7694So a search @samp{+LEVEL=3+boss-TODO="DONE"} lists all level three headlines 8060the entry. The ITEM special property cannot currently be used in tags/property
7695that have the tag @samp{boss} and are @emph{not} marked with the TODO keyword
7696DONE@. In buffers with @code{org-odd-levels-only} set, @samp{LEVEL} does not
7697count the number of stars, but @samp{LEVEL=2} will correspond to 3 stars etc.
7698The ITEM special property cannot currently be used in tags/property
7699searches@footnote{But @pxref{x-agenda-skip-entry-regexp, 8061searches@footnote{But @pxref{x-agenda-skip-entry-regexp,
7700,skipping entries based on regexp}.}. 8062,skipping entries based on regexp}.}.
7701 8063
8064Except the @pxref{Special properties}, one other ``property'' can also be
8065used. @code{LEVEL} represents the level of an entry. So a search
8066@samp{+LEVEL=3+boss-TODO="DONE"} lists all level three headlines that have
8067the tag @samp{boss} and are @emph{not} marked with the TODO keyword DONE@.
8068In buffers with @code{org-odd-levels-only} set, @samp{LEVEL} does not count
8069the number of stars, but @samp{LEVEL=2} will correspond to 3 stars etc.
8070
7702Here are more examples: 8071Here are more examples:
8072
7703@table @samp 8073@table @samp
7704@item work+TODO="WAITING" 8074@item work+TODO="WAITING"
7705Select @samp{:work:}-tagged TODO lines with the specific TODO 8075Select @samp{:work:}-tagged TODO lines with the specific TODO
@@ -7899,7 +8269,8 @@ associated with the item.
7899@menu 8269@menu
7900* Categories:: Not all tasks are equal 8270* Categories:: Not all tasks are equal
7901* Time-of-day specifications:: How the agenda knows the time 8271* Time-of-day specifications:: How the agenda knows the time
7902* Sorting of agenda items:: The order of things 8272* Sorting agenda items:: The order of things
8273* Filtering/limiting agenda items:: Dynamically narrow the agenda
7903@end menu 8274@end menu
7904 8275
7905@node Categories, Time-of-day specifications, Presentation and sorting, Presentation and sorting 8276@node Categories, Time-of-day specifications, Presentation and sorting, Presentation and sorting
@@ -7936,7 +8307,7 @@ longer than 10 characters.
7936You can set up icons for category by customizing the 8307You can set up icons for category by customizing the
7937@code{org-agenda-category-icon-alist} variable. 8308@code{org-agenda-category-icon-alist} variable.
7938 8309
7939@node Time-of-day specifications, Sorting of agenda items, Categories, Presentation and sorting 8310@node Time-of-day specifications, Sorting agenda items, Categories, Presentation and sorting
7940@subsection Time-of-day specifications 8311@subsection Time-of-day specifications
7941@cindex time-of-day specification 8312@cindex time-of-day specification
7942 8313
@@ -7987,8 +8358,8 @@ The time grid can be turned on and off with the variable
7987@code{org-agenda-use-time-grid}, and can be configured with 8358@code{org-agenda-use-time-grid}, and can be configured with
7988@code{org-agenda-time-grid}. 8359@code{org-agenda-time-grid}.
7989 8360
7990@node Sorting of agenda items, , Time-of-day specifications, Presentation and sorting 8361@node Sorting agenda items, Filtering/limiting agenda items, Time-of-day specifications, Presentation and sorting
7991@subsection Sorting of agenda items 8362@subsection Sorting agenda items
7992@cindex sorting, of agenda items 8363@cindex sorting, of agenda items
7993@cindex priorities, of agenda items 8364@cindex priorities, of agenda items
7994Before being inserted into a view, the items are sorted. How this is 8365Before being inserted into a view, the items are sorted. How this is
@@ -8021,6 +8392,189 @@ Sorting can be customized using the variable
8021@code{org-agenda-sorting-strategy}, and may also include criteria based on 8392@code{org-agenda-sorting-strategy}, and may also include criteria based on
8022the estimated effort of an entry (@pxref{Effort estimates}). 8393the estimated effort of an entry (@pxref{Effort estimates}).
8023 8394
8395@node Filtering/limiting agenda items, , Sorting agenda items, Presentation and sorting
8396@subsection Filtering/limiting agenda items
8397
8398Agenda built-in or customized commands are statically defined. Agenda
8399filters and limits provide two ways of dynamically narrowing down the list of
8400agenda entries: @emph{fitlers} and @emph{limits}. Filters only act on the
8401display of the items, while limits take effect before the list of agenda
8402entries is built. Filter are more often used interactively, while limits are
8403mostly useful when defined as local variables within custom agenda commands.
8404
8405@subsubheading Filtering in the agenda
8406@cindex filtering, by tag, category, top headline and effort, in agenda
8407@cindex tag filtering, in agenda
8408@cindex category filtering, in agenda
8409@cindex top headline filtering, in agenda
8410@cindex effort filtering, in agenda
8411@cindex query editing, in agenda
8412
8413@table @kbd
8414@orgcmd{/,org-agenda-filter-by-tag}
8415@vindex org-agenda-tag-filter-preset
8416Filter the agenda view with respect to a tag and/or effort estimates. The
8417difference between this and a custom agenda command is that filtering is very
8418fast, so that you can switch quickly between different filters without having
8419to recreate the agenda.@footnote{Custom commands can preset a filter by
8420binding the variable @code{org-agenda-tag-filter-preset} as an option. This
8421filter will then be applied to the view and persist as a basic filter through
8422refreshes and more secondary filtering. The filter is a global property of
8423the entire agenda view---in a block agenda, you should only set this in the
8424global options section, not in the section of an individual block.}
8425
8426You will be prompted for a tag selection letter; @key{SPC} will mean any tag at
8427all. Pressing @key{TAB} at that prompt will offer use completion to select a
8428tag (including any tags that do not have a selection character). The command
8429then hides all entries that do not contain or inherit this tag. When called
8430with prefix arg, remove the entries that @emph{do} have the tag. A second
8431@kbd{/} at the prompt will turn off the filter and unhide any hidden entries.
8432If the first key you press is either @kbd{+} or @kbd{-}, the previous filter
8433will be narrowed by requiring or forbidding the selected additional tag.
8434Instead of pressing @kbd{+} or @kbd{-} after @kbd{/}, you can also
8435immediately use the @kbd{\} command.
8436
8437@vindex org-sort-agenda-noeffort-is-high
8438In order to filter for effort estimates, you should set up allowed
8439efforts globally, for example
8440@lisp
8441(setq org-global-properties
8442 '(("Effort_ALL". "0 0:10 0:30 1:00 2:00 3:00 4:00")))
8443@end lisp
8444You can then filter for an effort by first typing an operator, one of
8445@kbd{<}, @kbd{>}, and @kbd{=}, and then the one-digit index of an effort
8446estimate in your array of allowed values, where @kbd{0} means the 10th value.
8447The filter will then restrict to entries with effort smaller-or-equal, equal,
8448or larger-or-equal than the selected value. If the digits 0--9 are not used
8449as fast access keys to tags, you can also simply press the index digit
8450directly without an operator. In this case, @kbd{<} will be assumed. For
8451application of the operator, entries without a defined effort will be treated
8452according to the value of @code{org-sort-agenda-noeffort-is-high}. To filter
8453for tasks without effort definition, press @kbd{?} as the operator.
8454
8455Org also supports automatic, context-aware tag filtering. If the variable
8456@code{org-agenda-auto-exclude-function} is set to a user-defined function,
8457that function can decide which tags should be excluded from the agenda
8458automatically. Once this is set, the @kbd{/} command then accepts @kbd{RET}
8459as a sub-option key and runs the auto exclusion logic. For example, let's
8460say you use a @code{Net} tag to identify tasks which need network access, an
8461@code{Errand} tag for errands in town, and a @code{Call} tag for making phone
8462calls. You could auto-exclude these tags based on the availability of the
8463Internet, and outside of business hours, with something like this:
8464
8465@smalllisp
8466@group
8467(defun org-my-auto-exclude-function (tag)
8468 (and (cond
8469 ((string= tag "Net")
8470 (/= 0 (call-process "/sbin/ping" nil nil nil
8471 "-c1" "-q" "-t1" "mail.gnu.org")))
8472 ((or (string= tag "Errand") (string= tag "Call"))
8473 (let ((hour (nth 2 (decode-time))))
8474 (or (< hour 8) (> hour 21)))))
8475 (concat "-" tag)))
8476
8477(setq org-agenda-auto-exclude-function 'org-my-auto-exclude-function)
8478@end group
8479@end smalllisp
8480
8481@orgcmd{\\,org-agenda-filter-by-tag-refine}
8482Narrow the current agenda filter by an additional condition. When called with
8483prefix arg, remove the entries that @emph{do} have the tag, or that do match
8484the effort criterion. You can achieve the same effect by pressing @kbd{+} or
8485@kbd{-} as the first key after the @kbd{/} command.
8486
8487@c
8488@kindex [
8489@kindex ]
8490@kindex @{
8491@kindex @}
8492@item [ ] @{ @}
8493@table @i
8494@item @r{in} search view
8495add new search words (@kbd{[} and @kbd{]}) or new regular expressions
8496(@kbd{@{} and @kbd{@}}) to the query string. The opening bracket/brace will
8497add a positive search term prefixed by @samp{+}, indicating that this search
8498term @i{must} occur/match in the entry. The closing bracket/brace will add a
8499negative search term which @i{must not} occur/match in the entry for it to be
8500selected.
8501@end table
8502
8503@orgcmd{<,org-agenda-filter-by-category}
8504@vindex org-agenda-category-filter-preset
8505
8506Filter the current agenda view with respect to the category of the item at
8507point. Pressing @code{<} another time will remove this filter. You can add
8508a filter preset through the option @code{org-agenda-category-filter-preset}
8509(see below.)
8510
8511@orgcmd{^,org-agenda-filter-by-top-headline}
8512Filter the current agenda view and only display the siblings and the parent
8513headline of the one at point.
8514
8515@orgcmd{=,org-agenda-filter-by-regexp}
8516@vindex org-agenda-regexp-filter-preset
8517
8518Filter the agenda view by a regular expression: only show agenda entries
8519matching the regular expression the user entered. When called with a prefix
8520argument, it will filter @emph{out} entries matching the regexp. With two
8521universal prefix arguments, it will remove all the regexp filters, which can
8522be accumulated. You can add a filter preset through the option
8523@code{org-agenda-category-filter-preset} (see below.)
8524
8525@orgcmd{|,org-agenda-filter-remove-all}
8526Remove all filters in the current agenda view.
8527@end table
8528
8529@subsubheading Setting limits for the agenda
8530@cindex limits, in agenda
8531@vindex org-agenda-max-entries
8532@vindex org-agenda-max-effort
8533@vindex org-agenda-max-todos
8534@vindex org-agenda-max-tags
8535
8536Here is a list of options that you can set, either globally, or locally in
8537your custom agenda views@pxref{Custom agenda views}.
8538
8539@table @var
8540@item org-agenda-max-entries
8541Limit the number of entries.
8542@item org-agenda-max-effort
8543Limit the duration of accumulated efforts (as minutes).
8544@item org-agenda-max-todos
8545Limit the number of entries with TODO keywords.
8546@item org-agenda-max-tags
8547Limit the number of tagged entries.
8548@end table
8549
8550When set to a positive integer, each option will exclude entries from other
8551catogories: for example, @code{(setq org-agenda-max-effort 100)} will limit
8552the agenda to 100 minutes of effort and exclude any entry that as no effort
8553property. If you want to include entries with no effort property, use a
8554negative value for @code{org-agenda-max-effort}.
8555
8556One useful setup is to use @code{org-agenda-max-entries} locally in a custom
8557command. For example, this custom command will display the next five entries
8558with a @code{NEXT} TODO keyword.
8559
8560@smalllisp
8561(setq org-agenda-custom-commands
8562 '(("n" todo "NEXT"
8563 ((org-agenda-max-entries 5)))))
8564@end smalllisp
8565
8566Once you mark one of these five entry as @code{DONE}, rebuilding the agenda
8567will again the next five entries again, including the first entry that was
8568excluded so far.
8569
8570You can also dynamically set temporary limits@footnote{Those temporary limits
8571are lost when rebuilding the agenda.}:
8572
8573@table @kbd
8574@orgcmd{~,org-agenda-limit-interactively}
8575This prompts for the type of limit to apply and its value.
8576@end table
8577
8024@node Agenda commands, Custom agenda views, Presentation and sorting, Agenda Views 8578@node Agenda commands, Custom agenda views, Presentation and sorting, Agenda Views
8025@section Commands in the agenda buffer 8579@section Commands in the agenda buffer
8026@cindex commands, in agenda buffer 8580@cindex commands, in agenda buffer
@@ -8088,6 +8642,7 @@ Delete other windows.
8088@c 8642@c
8089@orgcmdkskc{v d,d,org-agenda-day-view} 8643@orgcmdkskc{v d,d,org-agenda-day-view}
8090@xorgcmdkskc{v w,w,org-agenda-week-view} 8644@xorgcmdkskc{v w,w,org-agenda-week-view}
8645@xorgcmd{v t,org-agenda-fortnight-view}
8091@xorgcmd{v m,org-agenda-month-view} 8646@xorgcmd{v m,org-agenda-month-view}
8092@xorgcmd{v y,org-agenda-year-view} 8647@xorgcmd{v y,org-agenda-year-view}
8093@xorgcmd{v SPC,org-agenda-reset-view} 8648@xorgcmd{v SPC,org-agenda-reset-view}
@@ -8134,7 +8689,7 @@ entries that have been clocked on that day. You can configure the entry
8134types that should be included in log mode using the variable 8689types that should be included in log mode using the variable
8135@code{org-agenda-log-mode-items}. When called with a @kbd{C-u} prefix, show 8690@code{org-agenda-log-mode-items}. When called with a @kbd{C-u} prefix, show
8136all possible logbook entries, including state changes. When called with two 8691all possible logbook entries, including state changes. When called with two
8137prefix args @kbd{C-u C-u}, show only logging information, nothing else. 8692prefix arguments @kbd{C-u C-u}, show only logging information, nothing else.
8138@kbd{v L} is equivalent to @kbd{C-u v l}. 8693@kbd{v L} is equivalent to @kbd{C-u v l}.
8139@c 8694@c
8140@orgcmdkskc{v [,[,org-agenda-manipulate-query-add} 8695@orgcmdkskc{v [,[,org-agenda-manipulate-query-add}
@@ -8152,7 +8707,7 @@ press @kbd{v a} again.
8152@vindex org-agenda-start-with-clockreport-mode 8707@vindex org-agenda-start-with-clockreport-mode
8153@vindex org-clock-report-include-clocking-task 8708@vindex org-clock-report-include-clocking-task
8154Toggle Clockreport mode. In Clockreport mode, the daily/weekly agenda will 8709Toggle Clockreport mode. In Clockreport mode, the daily/weekly agenda will
8155always show a table with the clocked times for the timespan and file scope 8710always show a table with the clocked times for the time span and file scope
8156covered by the current agenda view. The initial setting for this mode in new 8711covered by the current agenda view. The initial setting for this mode in new
8157agenda buffers can be set with the variable 8712agenda buffers can be set with the variable
8158@code{org-agenda-start-with-clockreport-mode}. By using a prefix argument 8713@code{org-agenda-start-with-clockreport-mode}. By using a prefix argument
@@ -8212,108 +8767,39 @@ Remove the restriction lock on the agenda, if it is currently restricted to a
8212file or subtree (@pxref{Agenda files}). 8767file or subtree (@pxref{Agenda files}).
8213 8768
8214@tsubheading{Secondary filtering and query editing} 8769@tsubheading{Secondary filtering and query editing}
8215@cindex filtering, by tag category and effort, in agenda
8216@cindex tag filtering, in agenda
8217@cindex category filtering, in agenda
8218@cindex effort filtering, in agenda
8219@cindex query editing, in agenda
8220 8770
8221@orgcmd{<,org-agenda-filter-by-category} 8771For a detailed description of these commands, see @pxref{Filtering/limiting
8222@vindex org-agenda-category-filter-preset 8772agenda items}.
8223
8224Filter the current agenda view with respect to the category of the item at
8225point. Pressing @code{<} another time will remove this filter. You can add
8226a filter preset through the option @code{org-agenda-category-filter-preset}
8227(see below.)
8228 8773
8229@orgcmd{/,org-agenda-filter-by-tag} 8774@orgcmd{/,org-agenda-filter-by-tag}
8230@vindex org-agenda-tag-filter-preset 8775@vindex org-agenda-tag-filter-preset
8231Filter the current agenda view with respect to a tag and/or effort estimates. 8776Filter the agenda view with respect to a tag and/or effort estimates.
8232The difference between this and a custom agenda command is that filtering is
8233very fast, so that you can switch quickly between different filters without
8234having to recreate the agenda.@footnote{Custom commands can preset a filter by
8235binding the variable @code{org-agenda-tag-filter-preset} as an option. This
8236filter will then be applied to the view and persist as a basic filter through
8237refreshes and more secondary filtering. The filter is a global property of
8238the entire agenda view---in a block agenda, you should only set this in the
8239global options section, not in the section of an individual block.}
8240 8777
8241You will be prompted for a tag selection letter; @key{SPC} will mean any tag at 8778@orgcmd{\\,org-agenda-filter-by-tag-refine}
8242all. Pressing @key{TAB} at that prompt will offer use completion to select a 8779Narrow the current agenda filter by an additional condition.
8243tag (including any tags that do not have a selection character). The command
8244then hides all entries that do not contain or inherit this tag. When called
8245with prefix arg, remove the entries that @emph{do} have the tag. A second
8246@kbd{/} at the prompt will turn off the filter and unhide any hidden entries.
8247If the first key you press is either @kbd{+} or @kbd{-}, the previous filter
8248will be narrowed by requiring or forbidding the selected additional tag.
8249Instead of pressing @kbd{+} or @kbd{-} after @kbd{/}, you can also
8250immediately use the @kbd{\} command.
8251 8780
8252@vindex org-sort-agenda-noeffort-is-high 8781@orgcmd{<,org-agenda-filter-by-category}
8253In order to filter for effort estimates, you should set up allowed 8782@vindex org-agenda-category-filter-preset
8254efforts globally, for example
8255@lisp
8256(setq org-global-properties
8257 '(("Effort_ALL". "0 0:10 0:30 1:00 2:00 3:00 4:00")))
8258@end lisp
8259You can then filter for an effort by first typing an operator, one of
8260@kbd{<}, @kbd{>}, and @kbd{=}, and then the one-digit index of an effort
8261estimate in your array of allowed values, where @kbd{0} means the 10th value.
8262The filter will then restrict to entries with effort smaller-or-equal, equal,
8263or larger-or-equal than the selected value. If the digits 0--9 are not used
8264as fast access keys to tags, you can also simply press the index digit
8265directly without an operator. In this case, @kbd{<} will be assumed. For
8266application of the operator, entries without a defined effort will be treated
8267according to the value of @code{org-sort-agenda-noeffort-is-high}. To filter
8268for tasks without effort definition, press @kbd{?} as the operator.
8269 8783
8270Org also supports automatic, context-aware tag filtering. If the variable 8784Filter the current agenda view with respect to the category of the item at
8271@code{org-agenda-auto-exclude-function} is set to a user-defined function, 8785point. Pressing @code{<} another time will remove this filter.
8272that function can decide which tags should be excluded from the agenda
8273automatically. Once this is set, the @kbd{/} command then accepts @kbd{RET}
8274as a sub-option key and runs the auto exclusion logic. For example, let's
8275say you use a @code{Net} tag to identify tasks which need network access, an
8276@code{Errand} tag for errands in town, and a @code{Call} tag for making phone
8277calls. You could auto-exclude these tags based on the availability of the
8278Internet, and outside of business hours, with something like this:
8279 8786
8280@lisp 8787@orgcmd{^,org-agenda-filter-by-top-headline}
8281@group 8788Filter the current agenda view and only display the siblings and the parent
8282(defun org-my-auto-exclude-function (tag) 8789headline of the one at point.
8283 (and (cond
8284 ((string= tag "Net")
8285 (/= 0 (call-process "/sbin/ping" nil nil nil
8286 "-c1" "-q" "-t1" "mail.gnu.org")))
8287 ((or (string= tag "Errand") (string= tag "Call"))
8288 (let ((hour (nth 2 (decode-time))))
8289 (or (< hour 8) (> hour 21)))))
8290 (concat "-" tag)))
8291 8790
8292(setq org-agenda-auto-exclude-function 'org-my-auto-exclude-function) 8791@orgcmd{=,org-agenda-filter-by-regexp}
8293@end group 8792@vindex org-agenda-regexp-filter-preset
8294@end lisp
8295 8793
8296@orgcmd{\\,org-agenda-filter-by-tag-refine} 8794Filter the agenda view by a regular expression: only show agenda entries
8297Narrow the current agenda filter by an additional condition. When called with 8795matching the regular expression the user entered. When called with a prefix
8298prefix arg, remove the entries that @emph{do} have the tag, or that do match 8796argument, it will filter @emph{out} entries matching the regexp. With two
8299the effort criterion. You can achieve the same effect by pressing @kbd{+} or 8797universal prefix arguments, it will remove all the regexp filters, which can
8300@kbd{-} as the first key after the @kbd{/} command. 8798be accumulated. You can add a filter preset through the option
8799@code{org-agenda-category-filter-preset} (see below.)
8301 8800
8302@c 8801@orgcmd{|,org-agenda-filter-remove-all}
8303@kindex [ 8802Remove all filters in the current agenda view.
8304@kindex ]
8305@kindex @{
8306@kindex @}
8307@item [ ] @{ @}
8308@table @i
8309@item @r{in} search view
8310add new search words (@kbd{[} and @kbd{]}) or new regular expressions
8311(@kbd{@{} and @kbd{@}}) to the query string. The opening bracket/brace will
8312add a positive search term prefixed by @samp{+}, indicating that this search
8313term @i{must} occur/match in the entry. The closing bracket/brace will add a
8314negative search term which @i{must not} occur/match in the entry for it to be
8315selected.
8316@end table
8317 8803
8318@tsubheading{Remote editing} 8804@tsubheading{Remote editing}
8319@cindex remote editing, from agenda 8805@cindex remote editing, from agenda
@@ -8440,29 +8926,50 @@ Jump to the running clock in another window.
8440@c 8926@c
8441@orgcmd{k,org-agenda-capture} 8927@orgcmd{k,org-agenda-capture}
8442Like @code{org-capture}, but use the date at point as the default date for 8928Like @code{org-capture}, but use the date at point as the default date for
8443the capture template. See @var{org-capture-use-agenda-date} to make this 8929the capture template. See @code{org-capture-use-agenda-date} to make this
8444the default behavior of @code{org-capture}. 8930the default behavior of @code{org-capture}.
8445@cindex capturing, from agenda 8931@cindex capturing, from agenda
8446@vindex org-capture-use-agenda-date 8932@vindex org-capture-use-agenda-date
8447 8933
8934@tsubheading{Dragging agenda lines forward/backward}
8935@cindex dragging, agenda lines
8936
8937@orgcmd{M-<up>,org-agenda-drag-line-backward}
8938Drag the line at point backward one line@footnote{Moving agenda lines does
8939not persist after an agenda refresh and does not modify the contributing
8940@file{.org} files}. With a numeric prefix argument, drag backward by that
8941many lines.
8942
8943@orgcmd{M-<down>,org-agenda-drag-line-forward}
8944Drag the line at point forward one line. With a numeric prefix argument,
8945drag forward by that many lines.
8946
8448@tsubheading{Bulk remote editing selected entries} 8947@tsubheading{Bulk remote editing selected entries}
8449@cindex remote editing, bulk, from agenda 8948@cindex remote editing, bulk, from agenda
8450@vindex org-agenda-bulk-persistent-marks
8451@vindex org-agenda-bulk-custom-functions 8949@vindex org-agenda-bulk-custom-functions
8452 8950
8453@orgcmd{m,org-agenda-bulk-mark} 8951@orgcmd{m,org-agenda-bulk-mark}
8454Mark the entry at point for bulk action. With prefix arg, mark that many 8952Mark the entry at point for bulk action. With numeric prefix argument, mark
8455successive entries. 8953that many successive entries.
8456@c 8954@c
8457@orgcmd{%,org-agenda-bulk-mark-regexp} 8955@orgcmd{*,org-agenda-bulk-mark-all}
8458Mark entries matching a regular expression for bulk action. 8956Mark all visible agenda entries for bulk action.
8459@c 8957@c
8460@orgcmd{u,org-agenda-bulk-unmark} 8958@orgcmd{u,org-agenda-bulk-unmark}
8461Unmark entry for bulk action. 8959Unmark entry at point for bulk action.
8462@c 8960@c
8463@orgcmd{U,org-agenda-bulk-remove-all-marks} 8961@orgcmd{U,org-agenda-bulk-remove-all-marks}
8464Unmark all marked entries for bulk action. 8962Unmark all marked entries for bulk action.
8465@c 8963@c
8964@orgcmd{M-m,org-agenda-bulk-toggle}
8965Toggle mark of the entry at point for bulk action.
8966@c
8967@orgcmd{M-*,org-agenda-bulk-toggle-all}
8968Toggle marks of all visible entries for bulk action.
8969@c
8970@orgcmd{%,org-agenda-bulk-mark-regexp}
8971Mark entries matching a regular expression for bulk action.
8972@c
8466@orgcmd{B,org-agenda-bulk-action} 8973@orgcmd{B,org-agenda-bulk-action}
8467Bulk action: act on all marked entries in the agenda. This will prompt for 8974Bulk action: act on all marked entries in the agenda. This will prompt for
8468another key to select the action to be applied. The prefix arg to @kbd{B} 8975another key to select the action to be applied. The prefix arg to @kbd{B}
@@ -8471,40 +8978,55 @@ these special timestamps. By default, marks are removed after the bulk. If
8471you want them to persist, set @code{org-agenda-bulk-persistent-marks} to 8978you want them to persist, set @code{org-agenda-bulk-persistent-marks} to
8472@code{t} or hit @kbd{p} at the prompt. 8979@code{t} or hit @kbd{p} at the prompt.
8473 8980
8474@example 8981@table @kbd
8475* @r{Toggle persistent marks.} 8982@item *
8476$ @r{Archive all selected entries.} 8983Toggle persistent marks.
8477A @r{Archive entries by moving them to their respective archive siblings.} 8984@item $
8478t @r{Change TODO state. This prompts for a single TODO keyword and} 8985Archive all selected entries.
8479 @r{changes the state of all selected entries, bypassing blocking and} 8986@item A
8480 @r{suppressing logging notes (but not timestamps).} 8987Archive entries by moving them to their respective archive siblings.
8481+ @r{Add a tag to all selected entries.} 8988@item t
8482- @r{Remove a tag from all selected entries.} 8989Change TODO state. This prompts for a single TODO keyword and changes the
8483s @r{Schedule all items to a new date. To shift existing schedule dates} 8990state of all selected entries, bypassing blocking and suppressing logging
8484 @r{by a fixed number of days, use something starting with double plus} 8991notes (but not timestamps).
8485 @r{at the prompt, for example @samp{++8d} or @samp{++2w}.} 8992@item +
8486d @r{Set deadline to a specific date.} 8993Add a tag to all selected entries.
8487r @r{Prompt for a single refile target and move all entries. The entries} 8994@item -
8488 @r{will no longer be in the agenda; refresh (@kbd{g}) to bring them back.} 8995Remove a tag from all selected entries.
8489S @r{Reschedule randomly into the coming N days. N will be prompted for.} 8996@item s
8490 @r{With prefix arg (@kbd{C-u B S}), scatter only across weekdays.} 8997Schedule all items to a new date. To shift existing schedule dates by a
8491f @r{Apply a function@footnote{You can also create persistent custom functions through@code{org-agenda-bulk-custom-functions}.} to marked entries.} 8998fixed number of days, use something starting with double plus at the prompt,
8492 @r{For example, the function below sets the CATEGORY property of the} 8999for example @samp{++8d} or @samp{++2w}.
8493 @r{entries to web.} 9000@item d
8494 @r{(defun set-category ()} 9001Set deadline to a specific date.
8495 @r{ (interactive "P")} 9002@item r
8496 @r{ (let* ((marker (or (org-get-at-bol 'org-hd-marker)} 9003Prompt for a single refile target and move all entries. The entries will no
8497 @r{ (org-agenda-error)))} 9004longer be in the agenda; refresh (@kbd{g}) to bring them back.
8498 @r{ (buffer (marker-buffer marker)))} 9005@item S
8499 @r{ (with-current-buffer buffer} 9006Reschedule randomly into the coming N days. N will be prompted for. With
8500 @r{ (save-excursion} 9007prefix arg (@kbd{C-u B S}), scatter only across weekdays.
8501 @r{ (save-restriction} 9008@item f
8502 @r{ (widen)} 9009Apply a function@footnote{You can also create persistent custom functions
8503 @r{ (goto-char marker)} 9010through @code{org-agenda-bulk-custom-functions}.} to marked entries. For
8504 @r{ (org-back-to-heading t)} 9011example, the function below sets the CATEGORY property of the entries to web.
8505 @r{ (org-set-property "CATEGORY" "web"))))))}
8506@end example
8507 9012
9013@lisp
9014@group
9015(defun set-category ()
9016 (interactive "P")
9017 (let* ((marker (or (org-get-at-bol 'org-hd-marker)
9018 (org-agenda-error)))
9019 (buffer (marker-buffer marker)))
9020 (with-current-buffer buffer
9021 (save-excursion
9022 (save-restriction
9023 (widen)
9024 (goto-char marker)
9025 (org-back-to-heading t)
9026 (org-set-property "CATEGORY" "web"))))))
9027@end group
9028@end lisp
9029@end table
8508 9030
8509@tsubheading{Calendar commands} 9031@tsubheading{Calendar commands}
8510@cindex calendar commands, from agenda 9032@cindex calendar commands, from agenda
@@ -8551,7 +9073,7 @@ calendars.
8551@orgcmd{H,org-agenda-holidays} 9073@orgcmd{H,org-agenda-holidays}
8552Show holidays for three months around the cursor date. 9074Show holidays for three months around the cursor date.
8553 9075
8554@item M-x org-export-icalendar-combine-agenda-files 9076@item M-x org-icalendar-combine-agenda-files RET
8555Export a single iCalendar file containing entries from all agenda files. 9077Export a single iCalendar file containing entries from all agenda files.
8556This is a globally available command, and also available in the agenda menu. 9078This is a globally available command, and also available in the agenda menu.
8557 9079
@@ -8561,12 +9083,13 @@ This is a globally available command, and also available in the agenda menu.
8561@cindex agenda views, exporting 9083@cindex agenda views, exporting
8562@vindex org-agenda-exporter-settings 9084@vindex org-agenda-exporter-settings
8563Write the agenda view to a file. Depending on the extension of the selected 9085Write the agenda view to a file. Depending on the extension of the selected
8564file name, the view will be exported as HTML (extension @file{.html} or 9086file name, the view will be exported as HTML (@file{.html} or @file{.htm}),
8565@file{.htm}), Postscript (extension @file{.ps}), PDF (extension @file{.pdf}), 9087Postscript (@file{.ps}), PDF (@file{.pdf}), Org (@file{.org}) and plain text
8566and plain text (any other extension). When called with a @kbd{C-u} prefix 9088(any other extension). When exporting to Org, only the body of original
8567argument, immediately open the newly created file. Use the variable 9089headlines are exported, not subtrees or inherited tags. When called with a
8568@code{org-agenda-exporter-settings} to set options for @file{ps-print} and 9090@kbd{C-u} prefix argument, immediately open the newly created file. Use the
8569for @file{htmlize} to be used during export. 9091variable @code{org-agenda-exporter-settings} to set options for
9092@file{ps-print} and for @file{htmlize} to be used during export.
8570 9093
8571@tsubheading{Quit and Exit} 9094@tsubheading{Quit and Exit}
8572@orgcmd{q,org-agenda-quit} 9095@orgcmd{q,org-agenda-quit}
@@ -8606,6 +9129,8 @@ buffer).
8606@kindex C-c a C 9129@kindex C-c a C
8607@vindex org-agenda-custom-commands 9130@vindex org-agenda-custom-commands
8608@cindex agenda views, main example 9131@cindex agenda views, main example
9132@cindex agenda, as an agenda views
9133@cindex agenda*, as an agenda views
8609@cindex tags, as an agenda view 9134@cindex tags, as an agenda view
8610@cindex todo, as an agenda view 9135@cindex todo, as an agenda view
8611@cindex tags-todo 9136@cindex tags-todo
@@ -8616,13 +9141,15 @@ buffer).
8616Custom commands are configured in the variable 9141Custom commands are configured in the variable
8617@code{org-agenda-custom-commands}. You can customize this variable, for 9142@code{org-agenda-custom-commands}. You can customize this variable, for
8618example by pressing @kbd{C-c a C}. You can also directly set it with Emacs 9143example by pressing @kbd{C-c a C}. You can also directly set it with Emacs
8619Lisp in @file{.emacs}. The following example contains all valid search 9144Lisp in @file{.emacs}. The following example contains all valid agenda
8620types: 9145views:
8621 9146
8622@lisp 9147@lisp
8623@group 9148@group
8624(setq org-agenda-custom-commands 9149(setq org-agenda-custom-commands
8625 '(("w" todo "WAITING") 9150 '(("x" agenda)
9151 ("y" agenda*)
9152 ("w" todo "WAITING")
8626 ("W" todo-tree "WAITING") 9153 ("W" todo-tree "WAITING")
8627 ("u" tags "+boss-urgent") 9154 ("u" tags "+boss-urgent")
8628 ("v" tags-todo "+boss-urgent") 9155 ("v" tags-todo "+boss-urgent")
@@ -8648,6 +9175,15 @@ expression to be used for the matching. The example above will
8648therefore define: 9175therefore define:
8649 9176
8650@table @kbd 9177@table @kbd
9178@item C-c a x
9179as a global search for agenda entries planned@footnote{@emph{Planned} means
9180here that these entries have some planning information attached to them, like
9181a time-stamp, a scheduled or a deadline string. See
9182@code{org-agenda-entry-types} on how to set what planning information will be
9183taken into account.} this week/day.
9184@item C-c a y
9185as a global search for agenda entries planned this week/day, but only those
9186with an hour specification like @code{[h]h:mm}---think of them as appointments.
8651@item C-c a w 9187@item C-c a w
8652as a global search for TODO entries with @samp{WAITING} as the TODO 9188as a global search for TODO entries with @samp{WAITING} as the TODO
8653keyword 9189keyword
@@ -8782,23 +9318,23 @@ yourself.
8782 9318
8783@vindex org-agenda-custom-commands-contexts 9319@vindex org-agenda-custom-commands-contexts
8784To control whether an agenda command should be accessible from a specific 9320To control whether an agenda command should be accessible from a specific
8785context, you can customize @var{org-agenda-custom-commands-contexts}. Let's 9321context, you can customize @code{org-agenda-custom-commands-contexts}. Let's
8786say for example that you have an agenda commands @code{"o"} displaying a view 9322say for example that you have an agenda commands @code{"o"} displaying a view
8787that you only need when reading emails. Then you would configure this option 9323that you only need when reading emails. Then you would configure this option
8788like this: 9324like this:
8789 9325
8790@example 9326@lisp
8791(setq org-agenda-custom-commands-contexts 9327(setq org-agenda-custom-commands-contexts
8792 '(("o" (in-mode . "message-mode")))) 9328 '(("o" (in-mode . "message-mode"))))
8793@end example 9329@end lisp
8794 9330
8795You can also tell that the command key @code{"o"} should refer to another 9331You can also tell that the command key @code{"o"} should refer to another
8796command key @code{"r"}. In that case, add this command key like this: 9332command key @code{"r"}. In that case, add this command key like this:
8797 9333
8798@example 9334@lisp
8799(setq org-agenda-custom-commands-contexts 9335(setq org-agenda-custom-commands-contexts
8800 '(("o" "r" (in-mode . "message-mode")))) 9336 '(("o" "r" (in-mode . "message-mode"))))
8801@end example 9337@end lisp
8802 9338
8803See the docstring of the variable for more information. 9339See the docstring of the variable for more information.
8804 9340
@@ -9009,19 +9545,20 @@ spent (via @code{CLOCKSUM}) and with the planned total effort for it.
9009@chapter Markup for rich export 9545@chapter Markup for rich export
9010 9546
9011When exporting Org mode documents, the exporter tries to reflect the 9547When exporting Org mode documents, the exporter tries to reflect the
9012structure of the document as accurately as possible in the backend. Since 9548structure of the document as accurately as possible in the back-end. Since
9013export targets like HTML, @LaTeX{}, or DocBook allow much richer formatting, 9549export targets like HTML, @LaTeX{} allow much richer formatting, Org mode has
9014Org mode has rules on how to prepare text for rich export. This section 9550rules on how to prepare text for rich export. This section summarizes the
9015summarizes the markup rules used in an Org mode buffer. 9551markup rules used in an Org mode buffer.
9016 9552
9017@menu 9553@menu
9018* Structural markup elements:: The basic structure as seen by the exporter 9554* Structural markup elements:: The basic structure as seen by the exporter
9019* Images and tables:: Tables and Images will be included 9555* Images and tables:: Images, tables and caption mechanism
9020* Literal examples:: Source code examples with special formatting 9556* Literal examples:: Source code examples with special formatting
9021* Include files:: Include additional files into a document 9557* Include files:: Include additional files into a document
9022* Index entries:: Making an index 9558* Index entries:: Making an index
9023* Macro replacement:: Use macros to create complex output 9559* Macro replacement:: Use macros to create templates
9024* Embedded @LaTeX{}:: LaTeX can be freely used inside Org documents 9560* Embedded @LaTeX{}:: LaTeX can be freely used inside Org documents
9561* Special blocks:: Containers targeted at export back-ends
9025@end menu 9562@end menu
9026 9563
9027@node Structural markup elements, Images and tables, Markup, Markup 9564@node Structural markup elements, Images and tables, Markup, Markup
@@ -9031,7 +9568,6 @@ summarizes the markup rules used in an Org mode buffer.
9031* Document title:: Where the title is taken from 9568* Document title:: Where the title is taken from
9032* Headings and sections:: The document structure as seen by the exporter 9569* Headings and sections:: The document structure as seen by the exporter
9033* Table of contents:: The if and where of the table of contents 9570* Table of contents:: The if and where of the table of contents
9034* Initial text:: Text before the first heading?
9035* Lists:: Lists 9571* Lists:: Lists
9036* Paragraphs:: Paragraphs 9572* Paragraphs:: Paragraphs
9037* Footnote markup:: Footnotes 9573* Footnote markup:: Footnotes
@@ -9053,15 +9589,13 @@ The title of the exported document is taken from the special line
9053@end example 9589@end example
9054 9590
9055@noindent 9591@noindent
9056If this line does not exist, the title is derived from the first non-empty, 9592If this line does not exist, the title will be the name of the file
9057non-comment line in the buffer. If no such line exists, or if you have 9593associated to buffer, without extension, or the buffer name.
9058turned off exporting of the text before the first headline (see below), the
9059title will be the file name without extension.
9060 9594
9061@cindex property, EXPORT_TITLE 9595@cindex property, EXPORT_TITLE
9062If you are exporting only a subtree by marking is as the region, the heading 9596If you are exporting only a subtree, its heading will become the title of the
9063of the subtree will become the title of the document. If the subtree has a 9597document. If the subtree has a property @code{EXPORT_TITLE}, that will take
9064property @code{EXPORT_TITLE}, that will take precedence. 9598precedence.
9065 9599
9066@node Headings and sections, Table of contents, Document title, Structural markup elements 9600@node Headings and sections, Table of contents, Document title, Structural markup elements
9067@subheading Headings and sections 9601@subheading Headings and sections
@@ -9081,58 +9615,55 @@ per-file basis with a line
9081#+OPTIONS: H:4 9615#+OPTIONS: H:4
9082@end example 9616@end example
9083 9617
9084@node Table of contents, Initial text, Headings and sections, Structural markup elements 9618@node Table of contents, Lists, Headings and sections, Structural markup elements
9085@subheading Table of contents 9619@subheading Table of contents
9086@cindex table of contents, markup rules 9620@cindex table of contents, markup rules
9087 9621
9622@cindex #+TOC
9088@vindex org-export-with-toc 9623@vindex org-export-with-toc
9089The table of contents is normally inserted directly before the first headline 9624The table of contents is normally inserted directly before the first headline
9090of the file. If you would like to get it to a different location, insert the 9625of the file. The depth of the table is by default the same as the number of
9091string @code{[TABLE-OF-CONTENTS]} on a line by itself at the desired 9626headline levels, but you can choose a smaller number, or turn off the table
9092location. The depth of the table of contents is by default the same as the 9627of contents entirely, by configuring the variable @code{org-export-with-toc},
9093number of headline levels, but you can choose a smaller number, or turn off 9628or on a per-file basis with a line like
9094the table of contents entirely, by configuring the variable
9095@code{org-export-with-toc}, or on a per-file basis with a line like
9096 9629
9097@example 9630@example
9098#+OPTIONS: toc:2 (only to two levels in TOC) 9631#+OPTIONS: toc:2 (only to two levels in TOC)
9099#+OPTIONS: toc:nil (no TOC at all) 9632#+OPTIONS: toc:nil (no default TOC at all)
9100@end example 9633@end example
9101 9634
9102@node Initial text, Lists, Table of contents, Structural markup elements 9635If you would like to move the table of contents to a different location, you
9103@subheading Text before the first headline 9636should turn off the detault table using @code{org-export-with-toc} or
9104@cindex text before first headline, markup rules 9637@code{#+OPTIONS} and insert @code{#+TOC: headlines N} at the desired
9105@cindex #+TEXT 9638location(s).
9106
9107Org mode normally exports the text before the first headline, and even uses
9108the first line as the document title. The text will be fully marked up. If
9109you need to include literal HTML, @LaTeX{}, or DocBook code, use the special
9110constructs described below in the sections for the individual exporters.
9111 9639
9112@vindex org-export-skip-text-before-1st-heading 9640@example
9113Some people like to use the space before the first headline for setup and 9641#+OPTIONS: toc:nil (no default TOC)
9114internal links and therefore would like to control the exported text before 9642...
9115the first headline in a different way. You can do so by setting the variable 9643#+TOC: headlines 2 (insert TOC here, with two headline levels)
9116@code{org-export-skip-text-before-1st-heading} to @code{t}. On a per-file 9644@end example
9117basis, you can get the same effect with @samp{#+OPTIONS: skip:t}.
9118 9645
9119@noindent 9646Multiple @code{#+TOC: headline} lines are allowed. The same @code{TOC}
9120If you still want to have some text before the first headline, use the 9647keyword can also generate a list of all tables (resp.@: all listings) with a
9121@code{#+TEXT} construct: 9648caption in the buffer.
9122 9649
9123@example 9650@example
9124#+OPTIONS: skip:t 9651#+TOC: listings (build a list of listings)
9125#+TEXT: This text will go before the *first* headline. 9652#+TOC: tables (build a list of tables)
9126#+TEXT: [TABLE-OF-CONTENTS]
9127#+TEXT: This goes between the table of contents and the *first* headline
9128@end example 9653@end example
9129 9654
9130@node Lists, Paragraphs, Initial text, Structural markup elements 9655@cindex property, ALT_TITLE
9656The headline's title usually determines its corresponding entry in a table of
9657contents. However, it is possible to specify an alternative title by
9658setting @code{ALT_TITLE} property accordingly. It will then be used when
9659building the table.
9660
9661@node Lists, Paragraphs, Table of contents, Structural markup elements
9131@subheading Lists 9662@subheading Lists
9132@cindex lists, markup rules 9663@cindex lists, markup rules
9133 9664
9134Plain lists as described in @ref{Plain lists}, are translated to the backend's 9665Plain lists as described in @ref{Plain lists}, are translated to the back-end's
9135syntax for such lists. Most backends support unordered, ordered, and 9666syntax for such lists. Most back-ends support unordered, ordered, and
9136description lists. 9667description lists.
9137 9668
9138@node Paragraphs, Footnote markup, Lists, Structural markup elements 9669@node Paragraphs, Footnote markup, Lists, Structural markup elements
@@ -9184,7 +9715,7 @@ but not any simpler
9184@cindex @file{footnote.el} 9715@cindex @file{footnote.el}
9185 9716
9186Footnotes defined in the way described in @ref{Footnotes}, will be exported 9717Footnotes defined in the way described in @ref{Footnotes}, will be exported
9187by all backends. Org allows multiple references to the same note, and 9718by all back-ends. Org allows multiple references to the same note, and
9188multiple footnotes side by side. 9719multiple footnotes side by side.
9189 9720
9190@node Emphasis and monospace, Horizontal rules, Footnote markup, Structural markup elements 9721@node Emphasis and monospace, Horizontal rules, Footnote markup, Structural markup elements
@@ -9196,16 +9727,27 @@ multiple footnotes side by side.
9196@cindex verbatim text, markup rules 9727@cindex verbatim text, markup rules
9197@cindex code text, markup rules 9728@cindex code text, markup rules
9198@cindex strike-through text, markup rules 9729@cindex strike-through text, markup rules
9730@vindex org-fontify-emphasized-text
9731@vindex org-emphasis-regexp-components
9732@vindex org-emphasis-alist
9199You can make words @b{*bold*}, @i{/italic/}, _underlined_, @code{=code=} 9733You can make words @b{*bold*}, @i{/italic/}, _underlined_, @code{=code=}
9200and @code{~verbatim~}, and, if you must, @samp{+strike-through+}. Text 9734and @code{~verbatim~}, and, if you must, @samp{+strike-through+}. Text
9201in the code and verbatim string is not processed for Org mode specific 9735in the code and verbatim string is not processed for Org mode specific
9202syntax; it is exported verbatim. 9736syntax, it is exported verbatim.
9737
9738To turn off fontification for marked up text, you can set
9739@code{org-fontify-emphasized-text} to @code{nil}. To narrow down the list of
9740available markup syntax, you can customize @code{org-emphasis-alist}. To fine
9741tune what characters are allowed before and after the markup characters, you
9742can tweak @code{org-emphasis-regexp-components}. Beware that changing one of
9743the above variables will no take effect until you reload Org, for which you
9744may need to restart Emacs.
9203 9745
9204@node Horizontal rules, Comment lines, Emphasis and monospace, Structural markup elements 9746@node Horizontal rules, Comment lines, Emphasis and monospace, Structural markup elements
9205@subheading Horizontal rules 9747@subheading Horizontal rules
9206@cindex horizontal rules, markup rules 9748@cindex horizontal rules, markup rules
9207A line consisting of only dashes, and at least 5 of them, will be exported as 9749A line consisting of only dashes, and at least 5 of them, will be exported as
9208a horizontal line (@samp{<hr/>} in HTML and @code{\hrule} in @LaTeX{}). 9750a horizontal line.
9209 9751
9210@node Comment lines, , Horizontal rules, Structural markup elements 9752@node Comment lines, , Horizontal rules, Structural markup elements
9211@subheading Comment lines 9753@subheading Comment lines
@@ -9231,45 +9773,48 @@ Toggle the COMMENT keyword at the beginning of an entry.
9231 9773
9232@cindex tables, markup rules 9774@cindex tables, markup rules
9233@cindex #+CAPTION 9775@cindex #+CAPTION
9234@cindex #+LABEL 9776@cindex #+NAME
9235Both the native Org mode tables (@pxref{Tables}) and tables formatted with 9777Both the native Org mode tables (@pxref{Tables}) and tables formatted with
9236the @file{table.el} package will be exported properly. For Org mode tables, 9778the @file{table.el} package will be exported properly. For Org mode tables,
9237the lines before the first horizontal separator line will become table header 9779the lines before the first horizontal separator line will become table header
9238lines. You can use the following lines somewhere before the table to assign 9780lines. You can use the following lines somewhere before the table to assign
9239a caption and a label for cross references, and in the text you can refer to 9781a caption and a label for cross references, and in the text you can refer to
9240the object with @code{\ref@{tab:basic-data@}}: 9782the object with @code{[[tab:basic-data]]} (@pxref{Internal links}):
9241 9783
9242@example 9784@example
9243#+CAPTION: This is the caption for the next table (or link) 9785#+CAPTION: This is the caption for the next table (or link)
9244#+LABEL: tab:basic-data 9786#+NAME: tab:basic-data
9245 | ... | ...| 9787 | ... | ...|
9246 |-----|----| 9788 |-----|----|
9247@end example 9789@end example
9248 9790
9249Optionally, the caption can take the form: 9791Optionally, the caption can take the form:
9250@example 9792@example
9251#+CAPTION: [Caption for list of figures]@{Caption for table (or link).@} 9793#+CAPTION[Caption for list of tables]: Caption for table.
9252@end example 9794@end example
9253 9795
9254@cindex inlined images, markup rules 9796@cindex inlined images, markup rules
9255Some backends (HTML, @LaTeX{}, and DocBook) allow you to directly include 9797Some back-ends allow you to directly include images into the exported
9256images into the exported document. Org does this, if a link to an image 9798document. Org does this, if a link to an image files does not have
9257files does not have a description part, for example @code{[[./img/a.jpg]]}. 9799a description part, for example @code{[[./img/a.jpg]]}. If you wish to
9258If you wish to define a caption for the image and maybe a label for internal 9800define a caption for the image and maybe a label for internal cross
9259cross references, make sure that the link is on a line by itself and precede 9801references, make sure that the link is on a line by itself and precede it
9260it with @code{#+CAPTION} and @code{#+LABEL} as follows: 9802with @code{#+CAPTION} and @code{#+NAME} as follows:
9261 9803
9262@example 9804@example
9263#+CAPTION: This is the caption for the next figure link (or table) 9805#+CAPTION: This is the caption for the next figure link (or table)
9264#+LABEL: fig:SED-HR4049 9806#+NAME: fig:SED-HR4049
9265[[./img/a.jpg]] 9807[[./img/a.jpg]]
9266@end example 9808@end example
9267 9809
9268You may also define additional attributes for the figure. As this is 9810@noindent
9269backend-specific, see the sections about the individual backends for more 9811Such images can be displayed within the buffer. @xref{Handling links,the
9270information. 9812discussion of image links}.
9271 9813
9272@xref{Handling links,the discussion of image links}. 9814Even though images and tables are prominent examples of captioned structures,
9815the same caption mechanism can apply to many others (e.g., @LaTeX{}
9816equations, source code blocks). Depending on the export back-end, those may
9817or may not be handled.
9273 9818
9274@node Literal examples, Include files, Images and tables, Markup 9819@node Literal examples, Include files, Images and tables, Markup
9275@section Literal examples 9820@section Literal examples
@@ -9302,11 +9847,11 @@ Here is an example
9302If the example is source code from a programming language, or any other text 9847If the example is source code from a programming language, or any other text
9303that can be marked up by font-lock in Emacs, you can ask for the example to 9848that can be marked up by font-lock in Emacs, you can ask for the example to
9304look like the fontified Emacs buffer@footnote{This works automatically for 9849look like the fontified Emacs buffer@footnote{This works automatically for
9305the HTML backend (it requires version 1.34 of the @file{htmlize.el} package, 9850the HTML back-end (it requires version 1.34 of the @file{htmlize.el} package,
9306which is distributed with Org). Fontified code chunks in @LaTeX{} can be 9851which is distributed with Org). Fontified code chunks in @LaTeX{} can be
9307achieved using either the listings or the 9852achieved using either the listings or the
9308@url{http://code.google.com/p/minted, minted,} package. Refer to 9853@url{http://code.google.com/p/minted, minted,} package. Refer to
9309@code{org-export-latex-listings} documentation for details.}. This is done 9854@code{org-latex-listings} documentation for details.}. This is done
9310with the @samp{src} block, where you also need to specify the name of the 9855with the @samp{src} block, where you also need to specify the name of the
9311major mode that should be used to fontify the example@footnote{Code in 9856major mode that should be used to fontify the example@footnote{Code in
9312@samp{src} blocks may also be evaluated either interactively or on export. 9857@samp{src} blocks may also be evaluated either interactively or on export.
@@ -9398,20 +9943,24 @@ include your @file{.emacs} file, you could use:
9398@example 9943@example
9399#+INCLUDE: "~/.emacs" src emacs-lisp 9944#+INCLUDE: "~/.emacs" src emacs-lisp
9400@end example 9945@end example
9946
9401@noindent 9947@noindent
9402The optional second and third parameter are the markup (e.g., @samp{quote}, 9948The optional second and third parameter are the markup (e.g., @samp{quote},
9403@samp{example}, or @samp{src}), and, if the markup is @samp{src}, the 9949@samp{example}, or @samp{src}), and, if the markup is @samp{src}, the
9404language for formatting the contents. The markup is optional; if it is not 9950language for formatting the contents. The markup is optional; if it is not
9405given, the text will be assumed to be in Org mode format and will be 9951given, the text will be assumed to be in Org mode format and will be
9406processed normally. The include line will also allow additional keyword 9952processed normally.
9407parameters @code{:prefix1} and @code{:prefix} to specify prefixes for the 9953
9408first line and for each following line, @code{:minlevel} in order to get 9954Contents of the included file will belong to the same structure (headline,
9409Org mode content demoted to a specified level, as well as any options 9955item) containing the @code{INCLUDE} keyword. In particular, headlines within
9410accepted by the selected markup. For example, to include a file as an item, 9956the file will become children of the current section. That behaviour can be
9411use 9957changed by providing an additional keyword parameter, @code{:minlevel}. In
9958that case, all headlines in the included file will be shifted so the one with
9959the lowest level reaches that specified level. For example, to make a file
9960become a sibling of the current top-level headline, use
9412 9961
9413@example 9962@example
9414#+INCLUDE: "~/snippets/xx" :prefix1 " + " :prefix " " 9963#+INCLUDE: "~/my-book/chapter2.org" :minlevel 1
9415@end example 9964@end example
9416 9965
9417You can also include a portion of a file by specifying a lines range using 9966You can also include a portion of a file by specifying a lines range using
@@ -9460,21 +10009,24 @@ You can define text snippets with
9460#+MACRO: name replacement text $1, $2 are arguments 10009#+MACRO: name replacement text $1, $2 are arguments
9461@end example 10010@end example
9462 10011
9463@noindent which can be referenced anywhere in the document (even in 10012@noindent which can be referenced in
9464code examples) with @code{@{@{@{name(arg1,arg2)@}@}@}}. In addition to 10013paragraphs, verse blocks, table cells and some keywords with
9465defined macros, @code{@{@{@{title@}@}@}}, @code{@{@{@{author@}@}@}}, etc., 10014@code{@{@{@{name(arg1,arg2)@}@}@}}@footnote{Since commas separate arguments,
9466will reference information set by the @code{#+TITLE:}, @code{#+AUTHOR:}, and 10015commas within arguments have to be escaped with a backslash character.
9467similar lines. Also, @code{@{@{@{date(@var{FORMAT})@}@}@}} and 10016Conversely, backslash characters before a comma, and only them, need to be
10017escaped with another backslash character.}. In addition to defined macros,
10018@code{@{@{@{title@}@}@}}, @code{@{@{@{author@}@}@}}, etc., will reference
10019information set by the @code{#+TITLE:}, @code{#+AUTHOR:}, and similar lines.
10020Also, @code{@{@{@{time(@var{FORMAT})@}@}@}} and
9468@code{@{@{@{modification-time(@var{FORMAT})@}@}@}} refer to current date time 10021@code{@{@{@{modification-time(@var{FORMAT})@}@}@}} refer to current date time
9469and to the modification time of the file being exported, respectively. 10022and to the modification time of the file being exported, respectively.
9470@var{FORMAT} should be a format string understood by 10023@var{FORMAT} should be a format string understood by
9471@code{format-time-string}. 10024@code{format-time-string}.
9472 10025
9473Macro expansion takes place during export, and some people use it to 10026Macro expansion takes place during export.
9474construct complex HTML code.
9475 10027
9476 10028
9477@node Embedded @LaTeX{}, , Macro replacement, Markup 10029@node Embedded @LaTeX{}, Special blocks, Macro replacement, Markup
9478@section Embedded @LaTeX{} 10030@section Embedded @LaTeX{}
9479@cindex @TeX{} interpretation 10031@cindex @TeX{} interpretation
9480@cindex @LaTeX{} interpretation 10032@cindex @LaTeX{} interpretation
@@ -9487,7 +10039,7 @@ Donald E. Knuth's @TeX{} system. Many of the features described here as
9487distinction.} is widely used to typeset scientific documents. Org mode 10039distinction.} is widely used to typeset scientific documents. Org mode
9488supports embedding @LaTeX{} code into its files, because many academics are 10040supports embedding @LaTeX{} code into its files, because many academics are
9489used to writing and reading @LaTeX{} source code, and because it can be 10041used to writing and reading @LaTeX{} source code, and because it can be
9490readily processed to produce pretty output for a number of export backends. 10042readily processed to produce pretty output for a number of export back-ends.
9491 10043
9492@menu 10044@menu
9493* Special symbols:: Greek letters and other symbols 10045* Special symbols:: Greek letters and other symbols
@@ -9506,11 +10058,11 @@ readily processed to produce pretty output for a number of export backends.
9506@cindex HTML entities 10058@cindex HTML entities
9507@cindex @LaTeX{} entities 10059@cindex @LaTeX{} entities
9508 10060
9509You can use @LaTeX{} macros to insert special symbols like @samp{\alpha} to 10061You can use @LaTeX{}-like syntax to insert special symbols like @samp{\alpha}
9510indicate the Greek letter, or @samp{\to} to indicate an arrow. Completion 10062to indicate the Greek letter, or @samp{\to} to indicate an arrow. Completion
9511for these macros is available, just type @samp{\} and maybe a few letters, 10063for these symbols is available, just type @samp{\} and maybe a few letters,
9512and press @kbd{M-@key{TAB}} to see possible completions. Unlike @LaTeX{} 10064and press @kbd{M-@key{TAB}} to see possible completions. Unlike @LaTeX{}
9513code, Org mode allows these macros to be present without surrounding math 10065code, Org mode allows these symbols to be present without surrounding math
9514delimiters, for example: 10066delimiters, for example:
9515 10067
9516@example 10068@example
@@ -9519,7 +10071,7 @@ Angles are written as Greek letters \alpha, \beta and \gamma.
9519 10071
9520@vindex org-entities 10072@vindex org-entities
9521During export, these symbols will be transformed into the native format of 10073During export, these symbols will be transformed into the native format of
9522the exporter backend. Strings like @code{\alpha} will be exported as 10074the exporter back-end. Strings like @code{\alpha} will be exported as
9523@code{&alpha;} in the HTML output, and as @code{$\alpha$} in the @LaTeX{} 10075@code{&alpha;} in the HTML output, and as @code{$\alpha$} in the @LaTeX{}
9524output. Similarly, @code{\nbsp} will become @code{&nbsp;} in HTML and 10076output. Similarly, @code{\nbsp} will become @code{&nbsp;} in HTML and
9525@code{~} in @LaTeX{}. If you need such a symbol inside a word, terminate it 10077@code{~} in @LaTeX{}. If you need such a symbol inside a word, terminate it
@@ -9531,12 +10083,13 @@ A large number of entities is provided, with names taken from both HTML and
9531@samp{...} are all converted into special commands creating hyphens of 10083@samp{...} are all converted into special commands creating hyphens of
9532different lengths or a compact set of dots. 10084different lengths or a compact set of dots.
9533 10085
9534If you would like to see entities displayed as UTF8 characters, use the 10086If you would like to see entities displayed as UTF-8 characters, use the
9535following command@footnote{You can turn this on by default by setting the 10087following command@footnote{You can turn this on by default by setting the
9536variable @code{org-pretty-entities}, or on a per-file base with the 10088variable @code{org-pretty-entities}, or on a per-file base with the
9537@code{#+STARTUP} option @code{entitiespretty}.}: 10089@code{#+STARTUP} option @code{entitiespretty}.}:
9538 10090
9539@table @kbd 10091@table @kbd
10092@cindex @code{entitiespretty}, STARTUP keyword
9540@kindex C-c C-x \ 10093@kindex C-c C-x \
9541@item C-c C-x \ 10094@item C-c C-x \
9542Toggle display of entities as UTF-8 characters. This does not change the 10095Toggle display of entities as UTF-8 characters. This does not change the
@@ -9549,31 +10102,23 @@ for display purposes only.
9549@cindex subscript 10102@cindex subscript
9550@cindex superscript 10103@cindex superscript
9551 10104
9552Just like in @LaTeX{}, @samp{^} and @samp{_} are used to indicate super- 10105Just like in @LaTeX{}, @samp{^} and @samp{_} are used to indicate super- and
9553and subscripts. Again, these can be used without embedding them in 10106subscripts. Again, these can be used without embedding them in math-mode
9554math-mode delimiters. To increase the readability of ASCII text, it is 10107delimiters. To increase the readability of ASCII text, it is not necessary
9555not necessary (but OK) to surround multi-character sub- and superscripts 10108(but OK) to surround multi-character sub- and superscripts with curly braces.
9556with curly braces. For example 10109For example
9557 10110
9558@example 10111@example
9559The mass of the sun is M_sun = 1.989 x 10^30 kg. The radius of 10112The mass of the sun is M_sun = 1.989 x 10^30 kg. The radius of
9560the sun is R_@{sun@} = 6.96 x 10^8 m. 10113the sun is R_@{sun@} = 6.96 x 10^8 m.
9561@end example 10114@end example
9562 10115
9563@vindex org-export-with-sub-superscripts 10116@vindex org-use-sub-superscripts
9564To avoid interpretation as raised or lowered text, you can quote @samp{^} and 10117If you write a text where the underscore is often used in a different
9565@samp{_} with a backslash: @samp{\^} and @samp{\_}. If you write a text 10118context, Org's convention to always interpret these as subscripts can get in
9566where the underscore is often used in a different context, Org's convention 10119your way. Configure the variable @code{org-use-sub-superscripts} to change
9567to always interpret these as subscripts can get in your way. Configure the 10120this convention. For example, when setting this variable to @code{@{@}},
9568variable @code{org-export-with-sub-superscripts} to globally change this 10121@samp{a_b} will not be interpreted as a subscript, but @samp{a_@{b@}} will.
9569convention, or use, on a per-file basis:
9570
9571@example
9572#+OPTIONS: ^:@{@}
9573@end example
9574
9575@noindent With this setting, @samp{a_b} will not be interpreted as a
9576subscript, but @samp{a_@{b@}} will.
9577 10122
9578@table @kbd 10123@table @kbd
9579@kindex C-c C-x \ 10124@kindex C-c C-x \
@@ -9589,31 +10134,31 @@ format sub- and superscripts in a WYSIWYM way.
9589@vindex org-format-latex-header 10134@vindex org-format-latex-header
9590Going beyond symbols and sub- and superscripts, a full formula language is 10135Going beyond symbols and sub- and superscripts, a full formula language is
9591needed. Org mode can contain @LaTeX{} math fragments, and it supports ways 10136needed. Org mode can contain @LaTeX{} math fragments, and it supports ways
9592to process these for several export backends. When exporting to @LaTeX{}, 10137to process these for several export back-ends. When exporting to @LaTeX{},
9593the code is obviously left as it is. When exporting to HTML, Org invokes the 10138the code is obviously left as it is. When exporting to HTML, Org invokes the
9594@uref{http://www.mathjax.org, MathJax library} (@pxref{Math formatting in 10139@uref{http://www.mathjax.org, MathJax library} (@pxref{Math formatting in
9595HTML export}) to process and display the math@footnote{If you plan to use 10140HTML export}) to process and display the math@footnote{If you plan to use
9596this regularly or on pages with significant page views, you should install 10141this regularly or on pages with significant page views, you should install
9597@file{MathJax} on your own 10142@file{MathJax} on your own server in order to limit the load of our server.}.
9598server in order to limit the load of our server.}. Finally, it can also 10143Finally, it can also process the mathematical expressions into
9599process the mathematical expressions into images@footnote{For this to work 10144images@footnote{For this to work you need to be on a system with a working
9600you need to be on a system with a working @LaTeX{} installation. You also 10145@LaTeX{} installation. You also need the @file{dvipng} program or the
9601need the @file{dvipng} program or the @file{convert}, respectively available 10146@file{convert}, respectively available at
9602at @url{http://sourceforge.net/projects/dvipng/} and from the 10147@url{http://sourceforge.net/projects/dvipng/} and from the @file{imagemagick}
9603@file{imagemagick} suite. The @LaTeX{} header that will be used when 10148suite. The @LaTeX{} header that will be used when processing a fragment can
9604processing a fragment can be configured with the variable 10149be configured with the variable @code{org-format-latex-header}.} that can be
9605@code{org-format-latex-header}.} that can be displayed in a browser or in 10150displayed in a browser.
9606DocBook documents.
9607 10151
9608@LaTeX{} fragments don't need any special marking at all. The following 10152@LaTeX{} fragments don't need any special marking at all. The following
9609snippets will be identified as @LaTeX{} source code: 10153snippets will be identified as @LaTeX{} source code:
9610@itemize @bullet 10154@itemize @bullet
9611@item 10155@item
9612Environments of any kind@footnote{When @file{MathJax} is used, only the 10156Environments of any kind@footnote{When @file{MathJax} is used, only the
9613environment recognized by @file{MathJax} will be processed. When 10157environments recognized by @file{MathJax} will be processed. When
9614@file{dvipng} is used to create images, any @LaTeX{} environments will be 10158@file{dvipng} program or @file{imagemagick} suite is used to create images,
9615handled.}. The only requirement is that the @code{\begin} statement appears 10159any @LaTeX{} environment will be handled.}. The only requirement is that the
9616on a new line, preceded by only whitespace. 10160@code{\begin} and @code{\end} statements appear on a new line, at the
10161beginning of the line or after whitespaces only.
9617@item 10162@item
9618Text within the usual @LaTeX{} math delimiters. To avoid conflicts with 10163Text within the usual @LaTeX{} math delimiters. To avoid conflicts with
9619currency specifications, single @samp{$} characters are only recognized as 10164currency specifications, single @samp{$} characters are only recognized as
@@ -9627,40 +10172,44 @@ For the other delimiters, there is no such restriction, so when in doubt, use
9627@noindent For example: 10172@noindent For example:
9628 10173
9629@example 10174@example
9630\begin@{equation@} % arbitrary environments, 10175\begin@{equation@}
9631x=\sqrt@{b@} % even tables, figures 10176x=\sqrt@{b@}
9632\end@{equation@} % etc 10177\end@{equation@}
9633 10178
9634If $a^2=b$ and \( b=2 \), then the solution must be 10179If $a^2=b$ and \( b=2 \), then the solution must be
9635either $$ a=+\sqrt@{2@} $$ or \[ a=-\sqrt@{2@} \]. 10180either $$ a=+\sqrt@{2@} $$ or \[ a=-\sqrt@{2@} \].
9636@end example 10181@end example
9637 10182
9638@noindent 10183@c FIXME
9639@vindex org-format-latex-options 10184@c @noindent
9640If you need any of the delimiter ASCII sequences for other purposes, you 10185@c @vindex org-format-latex-options
9641can configure the option @code{org-format-latex-options} to deselect the 10186@c If you need any of the delimiter ASCII sequences for other purposes, you
9642ones you do not wish to have interpreted by the @LaTeX{} converter. 10187@c can configure the option @code{org-format-latex-options} to deselect the
10188@c ones you do not wish to have interpreted by the @LaTeX{} converter.
9643 10189
9644@vindex org-export-with-LaTeX-fragments 10190@vindex org-export-with-latex
9645@LaTeX{} processing can be configured with the variable 10191@LaTeX{} processing can be configured with the variable
9646@code{org-export-with-LaTeX-fragments}. The default setting is @code{t} 10192@code{org-export-with-latex}. The default setting is @code{t} which means
9647which means @file{MathJax} for HTML, and no processing for DocBook, ASCII and 10193@file{MathJax} for HTML, and no processing for ASCII and @LaTeX{} back-ends.
9648@LaTeX{} backends. You can also set this variable on a per-file basis using one 10194You can also set this variable on a per-file basis using one of these
9649of these lines: 10195lines:
9650 10196
9651@example 10197@example
9652#+OPTIONS: LaTeX:t @r{Do the right thing automatically (MathJax)} 10198#+OPTIONS: tex:t @r{Do the right thing automatically (MathJax)}
9653#+OPTIONS: LaTeX:dvipng @r{Force using dvipng images} 10199#+OPTIONS: tex:nil @r{Do not process @LaTeX{} fragments at all}
9654#+OPTIONS: LaTeX:nil @r{Do not process @LaTeX{} fragments at all} 10200#+OPTIONS: tex:verbatim @r{Verbatim export, for jsMath or so}
9655#+OPTIONS: LaTeX:verbatim @r{Verbatim export, for jsMath or so}
9656@end example 10201@end example
9657 10202
9658@node Previewing @LaTeX{} fragments, CDLaTeX mode, @LaTeX{} fragments, Embedded @LaTeX{} 10203@node Previewing @LaTeX{} fragments, CDLaTeX mode, @LaTeX{} fragments, Embedded @LaTeX{}
9659@subsection Previewing @LaTeX{} fragments 10204@subsection Previewing @LaTeX{} fragments
9660@cindex @LaTeX{} fragments, preview 10205@cindex @LaTeX{} fragments, preview
9661 10206
9662If you have @file{dvipng} installed, @LaTeX{} fragments can be processed to 10207@vindex org-latex-create-formula-image-program
9663produce preview images of the typeset expressions: 10208If you have @file{dvipng} or @file{imagemagick} installed@footnote{Choose the
10209converter by setting the variable
10210@code{org-latex-create-formula-image-program} accordingly.}, @LaTeX{}
10211fragments can be processed to produce preview images of the typeset
10212expressions:
9664 10213
9665@table @kbd 10214@table @kbd
9666@kindex C-c C-x C-l 10215@kindex C-c C-x C-l
@@ -9682,6 +10231,19 @@ some aspects of the preview. In particular, the @code{:scale} (and for HTML
9682export, @code{:html-scale}) property can be used to adjust the size of the 10231export, @code{:html-scale}) property can be used to adjust the size of the
9683preview images. 10232preview images.
9684 10233
10234@vindex org-startup-with-latex-preview
10235You can turn on the previewing of all @LaTeX{} fragments in a file with
10236
10237@example
10238#+STARTUP: latexpreview
10239@end example
10240
10241To disable it, simply use
10242
10243@example
10244#+STARTUP: nolatexpreview
10245@end example
10246
9685@node CDLaTeX mode, , Previewing @LaTeX{} fragments, Embedded @LaTeX{} 10247@node CDLaTeX mode, , Previewing @LaTeX{} fragments, Embedded @LaTeX{}
9686@subsection Using CD@LaTeX{} to enter math 10248@subsection Using CD@LaTeX{} to enter math
9687@cindex CD@LaTeX{} 10249@cindex CD@LaTeX{}
@@ -9694,7 +10256,7 @@ some of the features of CD@LaTeX{} mode. You need to install
9694AUC@TeX{}) from @url{http://www.astro.uva.nl/~dominik/Tools/cdlatex}. 10256AUC@TeX{}) from @url{http://www.astro.uva.nl/~dominik/Tools/cdlatex}.
9695Don't use CD@LaTeX{} mode itself under Org mode, but use the light 10257Don't use CD@LaTeX{} mode itself under Org mode, but use the light
9696version @code{org-cdlatex-mode} that comes as part of Org mode. Turn it 10258version @code{org-cdlatex-mode} that comes as part of Org mode. Turn it
9697on for the current buffer with @code{M-x org-cdlatex-mode}, or for all 10259on for the current buffer with @kbd{M-x org-cdlatex-mode RET}, or for all
9698Org files with 10260Org files with
9699 10261
9700@lisp 10262@lisp
@@ -9719,7 +10281,7 @@ the second brace. Even outside fragments, @key{TAB} will expand
9719environment abbreviations at the beginning of a line. For example, if 10281environment abbreviations at the beginning of a line. For example, if
9720you write @samp{equ} at the beginning of a line and press @key{TAB}, 10282you write @samp{equ} at the beginning of a line and press @key{TAB},
9721this abbreviation will be expanded to an @code{equation} environment. 10283this abbreviation will be expanded to an @code{equation} environment.
9722To get a list of all abbreviations, type @kbd{M-x cdlatex-command-help}. 10284To get a list of all abbreviations, type @kbd{M-x cdlatex-command-help RET}.
9723@item 10285@item
9724@kindex _ 10286@kindex _
9725@kindex ^ 10287@kindex ^
@@ -9743,235 +10305,394 @@ modification will work only inside @LaTeX{} fragments; outside the quote
9743is normal. 10305is normal.
9744@end itemize 10306@end itemize
9745 10307
10308@node Special blocks, , Embedded @LaTeX{}, Markup
10309@section Special blocks
10310@cindex Special blocks
10311
10312Org syntax includes pre-defined blocks (@pxref{Paragraphs} and @ref{Literal
10313examples}). It is also possible to create blocks containing raw code
10314targeted at a specific back-ends (e.g., @samp{#+BEGIN_LATEX}).
10315
10316Any other block is a @emph{special block}. Each export back-end decides if
10317they should be exported, and how. When the block is ignored, its contents
10318are still exported, as if the block were not there. For example, when
10319exporting a @samp{#+BEGIN_TEST} block, HTML back-end wraps its contents
10320within @samp{<div name="test">} tag. Refer to back-end specific
10321documentation for more information.
10322
9746@node Exporting, Publishing, Markup, Top 10323@node Exporting, Publishing, Markup, Top
9747@chapter Exporting 10324@chapter Exporting
9748@cindex exporting 10325@cindex exporting
9749 10326
9750Org mode documents can be exported into a variety of other formats. For 10327The Org mode export facilities can be used to export Org documents or parts
9751printing and sharing of notes, ASCII export produces a readable and simple 10328of Org documents to a variety of other formats. In addition, these
9752version of an Org file. HTML export allows you to publish a notes file on 10329facilities can be used with @code{orgtbl-mode} and/or @code{orgstruct-mode}
9753the web, while the XOXO format provides a solid base for exchange with a 10330in foreign buffers so you can author tables and lists in Org syntax and
9754broad range of other applications. @LaTeX{} export lets you use Org mode and 10331convert them in place to the target language.
9755its structured editing functions to easily create @LaTeX{} files. DocBook 10332
9756export makes it possible to convert Org files to many other formats using 10333ASCII export produces a readable and simple version of an Org file for
9757DocBook tools. OpenDocument Text (ODT) export allows seamless 10334printing and sharing notes. HTML export allows you to easily publish notes
9758collaboration across organizational boundaries. For project management you 10335on the web, or to build full-fledged websites. @LaTeX{} export lets you use
9759can create gantt and resource charts by using TaskJuggler export. To 10336Org mode and its structured editing functions to create arbitrarily complex
9760incorporate entries with associated times like deadlines or appointments into 10337@LaTeX{} files for any kind of document. OpenDocument Text (ODT) export
9761a desktop calendar program like iCal, Org mode can also produce extracts in 10338allows seamless collaboration across organizational boundaries. Markdown
9762the iCalendar format. Currently, Org mode only supports export, not import of 10339export lets you seamlessly collaborate with other developers. Finally, iCal
9763these different formats. 10340export can extract entries with deadlines or appointments to produce a file
9764 10341in the iCalendar format.
9765Org supports export of selected regions when @code{transient-mark-mode} is
9766enabled (default in Emacs 23).
9767 10342
9768@menu 10343@menu
9769* Selective export:: Using tags to select and exclude trees 10344* The Export Dispatcher:: The main exporter interface
9770* Export options:: Per-file export settings 10345* Export back-ends:: Built-in export formats
9771* The export dispatcher:: How to access exporter commands 10346* Export settings:: Generic export settings
9772* ASCII/Latin-1/UTF-8 export:: Exporting to flat files with encoding 10347* ASCII/Latin-1/UTF-8 export:: Exporting to flat files with encoding
10348* Beamer export:: Exporting as a Beamer presentation
9773* HTML export:: Exporting to HTML 10349* HTML export:: Exporting to HTML
9774* @LaTeX{} and PDF export:: Exporting to @LaTeX{}, and processing to PDF 10350* @LaTeX{} and PDF export:: Exporting to @LaTeX{}, and processing to PDF
9775* DocBook export:: Exporting to DocBook 10351* Markdown export:: Exporting to Markdown
9776* OpenDocument Text export:: Exporting to OpenDocument Text 10352* OpenDocument Text export:: Exporting to OpenDocument Text
9777* TaskJuggler export:: Exporting to TaskJuggler 10353* iCalendar export:: Exporting to iCalendar
9778* Freemind export:: Exporting to Freemind mind maps 10354* Other built-in back-ends:: Exporting to @code{Texinfo}, a man page, or Org
9779* XOXO export:: Exporting to XOXO 10355* Export in foreign buffers:: Author tables in lists in Org syntax
9780* iCalendar export:: Exporting in iCalendar format 10356* Advanced configuration:: Fine-tuning the export output
9781@end menu 10357@end menu
9782 10358
9783@node Selective export, Export options, Exporting, Exporting 10359@node The Export Dispatcher, Export back-ends, Exporting, Exporting
9784@section Selective export 10360@section The Export Dispatcher
9785@cindex export, selective by tags or TODO keyword 10361@vindex org-export-dispatch-use-expert-ui
10362@cindex Export, dispatcher
10363
10364The main entry point for export related tasks is the dispatcher, a
10365hierarchical menu from which it is possible to select an export format and
10366toggle export options@footnote{It is also possible to use a less intrusive
10367interface by setting @code{org-export-dispatch-use-expert-ui} to a
10368non-@code{nil} value. In that case, only a prompt is visible from the
10369minibuffer. From there one can still switch back to regular menu by pressing
10370@key{?}.} from which it is possible to select an export format and to toggle
10371export options.
10372
10373@c @quotation
10374@table @asis
10375@orgcmd{C-c C-e,org-export-dispatch}
9786 10376
9787@vindex org-export-select-tags 10377Dispatch for export and publishing commands. When called with a @kbd{C-u}
9788@vindex org-export-exclude-tags 10378prefix argument, repeat the last export command on the current buffer while
9789@cindex org-export-with-tasks 10379preserving toggled options. If the current buffer hasn't changed and subtree
9790You may use tags to select the parts of a document that should be exported, 10380export was activated, the command will affect that same subtree.
9791or to exclude parts from export. This behavior is governed by two variables: 10381@end table
9792@code{org-export-select-tags} and @code{org-export-exclude-tags}, 10382@c @end quotation
9793respectively defaulting to @code{'(:export:)} and @code{'(:noexport:)}.
9794 10383
9795@enumerate 10384Normally the entire buffer is exported, but if there is an active region
9796@item 10385only that part of the buffer will be exported.
9797Org first checks if any of the @emph{select} tags is present in the
9798buffer. If yes, all trees that do not carry one of these tags will be
9799excluded. If a selected tree is a subtree, the heading hierarchy above it
9800will also be selected for export, but not the text below those headings.
9801 10386
9802@item 10387Several export options (@pxref{Export settings}) can be toggled from the
9803If none of the select tags is found, the whole buffer will be selected for 10388export dispatcher with the following key combinations:
9804export.
9805 10389
9806@item 10390@table @kbd
9807Finally, all subtrees that are marked by any of the @emph{exclude} tags will 10391@item C-a
9808be removed from the export buffer. 10392@vindex org-export-async-init-file
9809@end enumerate 10393Toggle asynchronous export. Asynchronous export uses an external Emacs
10394process that is configured with a specified initialization file.
9810 10395
9811The variable @code{org-export-with-tasks} can be configured to select which 10396While exporting asynchronously, the output is not displayed. It is stored in
9812kind of tasks should be included for export. See the docstring of the 10397a list called ``the export stack'', and can be viewed from there. The stack
9813variable for more information. 10398can be reached by calling the dispatcher with a double @kbd{C-u} prefix
10399argument, or with @kbd{&} key from the dispatcher.
9814 10400
9815@node Export options, The export dispatcher, Selective export, Exporting 10401@vindex org-export-in-background
9816@section Export options 10402To make this behaviour the default, customize the variable
9817@cindex options, for export 10403@code{org-export-in-background}.
9818 10404
9819@cindex completion, of option keywords 10405@item C-b
9820The exporter recognizes special lines in the buffer which provide 10406Toggle body-only export. Its effect depends on the back-end used.
9821additional information. These lines may be put anywhere in the file. 10407Typically, if the back-end has a header section (like @code{<head>...</head>}
9822The whole set of lines can be inserted into the buffer with @kbd{C-c 10408in the HTML back-end), a body-only export will not include this header.
9823C-e t}. For individual lines, a good way to make sure the keyword is 10409
9824correct is to type @samp{#+} and then use @kbd{M-@key{TAB}} completion 10410@item C-s
9825(@pxref{Completion}). For a summary of other in-buffer settings not 10411@vindex org-export-initial-scope
9826specifically related to export, see @ref{In-buffer settings}. 10412Toggle subtree export. The top heading becomes the document title.
9827In particular, note that you can place commonly-used (export) options in 10413
9828a separate file which can be included using @code{#+SETUPFILE}. 10414You can change the default state of this option by setting
10415@code{org-export-initial-scope}.
10416
10417@item C-v
10418Toggle visible-only export. Only export the text that is currently
10419visible, i.e. not hidden by outline visibility in the buffer.
9829 10420
9830@table @kbd
9831@orgcmd{C-c C-e t,org-insert-export-options-template}
9832Insert template with export options, see example below.
9833@end table 10421@end table
9834 10422
9835@cindex #+TITLE 10423@vindex org-export-copy-to-kill-ring
9836@cindex #+AUTHOR 10424With the exception of asynchronous export, a successful export process writes
9837@cindex #+DATE 10425its output to the kill-ring. You can configure this behavior by altering the
9838@cindex #+EMAIL 10426option @code{org-export-copy-to-kill-ring}.
9839@cindex #+DESCRIPTION 10427
9840@cindex #+KEYWORDS 10428@node Export back-ends, Export settings, The Export Dispatcher, Exporting
9841@cindex #+LANGUAGE 10429@section Export back-ends
9842@cindex #+TEXT 10430@cindex Export, back-ends
9843@cindex #+OPTIONS 10431
9844@cindex #+BIND 10432An export back-end is a library that translates Org syntax into a foreign
9845@cindex #+LINK_UP 10433format. An export format is not available until the proper back-end has been
9846@cindex #+LINK_HOME 10434loaded.
9847@cindex #+EXPORT_SELECT_TAGS 10435
9848@cindex #+EXPORT_EXCLUDE_TAGS 10436@vindex org-export-backends
9849@cindex #+XSLT 10437By default, the following four back-ends are loaded: @code{ascii},
9850@cindex #+LaTeX_HEADER 10438@code{html}, @code{icalendar} and @code{latex}. It is possible to add more
10439(or remove some) by customizing @code{org-export-backends}.
10440
10441Built-in back-ends include:
10442
10443@itemize
10444@item ascii (ASCII format)
10445@item beamer (@LaTeX{} Beamer format)
10446@item html (HTML format)
10447@item icalendar (iCalendar format)
10448@item latex (@LaTeX{} format)
10449@item man (Man page format)
10450@item md (Markdown format)
10451@item odt (OpenDocument Text format)
10452@item texinfo (Texinfo format)
10453@end itemize
10454
10455Other back-ends might be found in the @code{contrib/} directory
10456(@pxref{Installation}).
10457
10458@node Export settings, ASCII/Latin-1/UTF-8 export, Export back-ends, Exporting
10459@section Export settings
10460@cindex Export, settings
10461
10462Export options can be set: globally with variables; for an individual file by
10463making variables buffer-local with in-buffer settings (@pxref{In-buffer
10464settings}), by setting individual keywords, or by specifying them in a
10465compact form with the @code{#+OPTIONS} keyword; or for a tree by setting
10466properties (@pxref{Properties and Columns}). Options set at a specific level
10467override options set at a more general level.
10468
10469@cindex #+SETUPFILE
10470In-buffer settings may appear anywhere in the file, either directly or
10471indirectly through a file included using @samp{#+SETUPFILE: filename} syntax.
10472Option keyword sets tailored to a particular back-end can be inserted from
10473the export dispatcher (@pxref{The Export Dispatcher}) using the @code{Insert
10474template} command by pressing @key{#}. To insert keywords individually,
10475a good way to make sure the keyword is correct is to type @code{#+} and then
10476to use @kbd{M-<TAB>} for completion.
10477
10478The export keywords available for every back-end, and their equivalent global
10479variables, include:
10480
10481@table @samp
10482@item AUTHOR
9851@vindex user-full-name 10483@vindex user-full-name
10484The document author (@code{user-full-name}).
10485
10486@item CREATOR
10487@vindex org-export-creator-string
10488Entity responsible for output generation (@code{org-export-creator-string}).
10489
10490@item DATE
10491@vindex org-export-date-timestamp-format
10492A date or a time-stamp@footnote{The variable
10493@code{org-export-date-timestamp-format} defines how this time-stamp will be
10494exported.}.
10495
10496@item DESCRIPTION
10497The document description. Back-ends handle it as they see fit (e.g., for the
10498XHTML meta tag), if at all. You can use several such keywords for long
10499descriptions.
10500
10501@item EMAIL
9852@vindex user-mail-address 10502@vindex user-mail-address
10503The email address (@code{user-mail-address}).
10504
10505@item KEYWORDS
10506The keywords defining the contents of the document. Back-ends handle it as
10507they see fit (e.g., for the XHTML meta tag), if at all. You can use several
10508such keywords if the list is long.
10509
10510@item LANGUAGE
9853@vindex org-export-default-language 10511@vindex org-export-default-language
9854@vindex org-export-date-timestamp-format 10512The language used for translating some strings
9855@example 10513(@code{org-export-default-language}). E.g., @samp{#+LANGUAGE: fr} will tell
9856#+TITLE: the title to be shown (default is the buffer name) 10514Org to translate @emph{File} (english) into @emph{Fichier} (french) in the
9857#+AUTHOR: the author (default taken from @code{user-full-name}) 10515clocktable.
9858#+DATE: a date, an Org timestamp@footnote{@code{org-export-date-timestamp-format} defines how this timestamp will be exported.}, or a format string for @code{format-time-string}
9859#+EMAIL: his/her email address (default from @code{user-mail-address})
9860#+DESCRIPTION: the page description, e.g., for the XHTML meta tag
9861#+KEYWORDS: the page keywords, e.g., for the XHTML meta tag
9862#+LANGUAGE: language for HTML, e.g., @samp{en} (@code{org-export-default-language})
9863#+TEXT: Some descriptive text to be inserted at the beginning.
9864#+TEXT: Several lines may be given.
9865#+OPTIONS: H:2 num:t toc:t \n:nil @@:t ::t |:t ^:t f:t TeX:t ...
9866#+BIND: lisp-var lisp-val, e.g., @code{org-export-latex-low-levels itemize}
9867 @r{You need to confirm using these, or configure @code{org-export-allow-BIND}}
9868#+LINK_UP: the ``up'' link of an exported page
9869#+LINK_HOME: the ``home'' link of an exported page
9870#+LaTeX_HEADER: extra line(s) for the @LaTeX{} header, like \usepackage@{xyz@}
9871#+EXPORT_SELECT_TAGS: Tags that select a tree for export
9872#+EXPORT_EXCLUDE_TAGS: Tags that exclude a tree from export
9873#+XSLT: the XSLT stylesheet used by DocBook exporter to generate FO file
9874@end example
9875 10516
9876@noindent 10517@item SELECT_TAGS
9877The @code{#+OPTIONS} line is a compact@footnote{If you want to configure many options 10518@vindex org-export-select-tags
9878this way, you can use several @code{#+OPTIONS} lines.} form to specify export 10519The tags that select a tree for export (@code{org-export-select-tags}). The
9879settings. Here you can: 10520default value is @code{:export:}. Within a subtree tagged with
9880@cindex headline levels 10521@code{:export:}, you can still exclude entries with @code{:noexport:} (see
9881@cindex section-numbers 10522below).
9882@cindex table of contents 10523
9883@cindex line-break preservation 10524@item EXCLUDE_TAGS
9884@cindex quoted HTML tags 10525The tags that exclude a tree from export (@code{org-export-exclude-tags}).
9885@cindex fixed-width sections 10526The default value is @code{:noexport:}. Entries with the @code{:noexport:}
9886@cindex tables 10527tag will be unconditionally excluded from the export, even if they have an
9887@cindex @TeX{}-like syntax for sub- and superscripts 10528@code{:export:} tag.
9888@cindex footnotes 10529
9889@cindex special strings 10530@item TITLE
9890@cindex emphasized text 10531The title to be shown (otherwise derived from buffer's name). You can use
9891@cindex @TeX{} macros 10532several such keywords for long titles.
9892@cindex @LaTeX{} fragments 10533@end table
9893@cindex author info, in export 10534
9894@cindex time info, in export 10535The @code{#+OPTIONS} keyword is a compact@footnote{If you want to configure
9895@vindex org-export-plist-vars 10536many options this way, you can use several @code{#+OPTIONS} lines.} form that
9896@vindex org-export-author-info 10537recognizes the following arguments:
9897@vindex org-export-creator-info 10538
9898@vindex org-export-email-info 10539@table @code
10540@item ':
10541@vindex org-export-with-smart-quotes
10542Toggle smart quotes (@code{org-export-with-smart-quotes}).
10543
10544@item *:
10545Toggle emphasized text (@code{org-export-with-emphasize}).
10546
10547@item -:
10548@vindex org-export-with-special-strings
10549Toggle conversion of special strings
10550(@code{org-export-with-special-strings}).
10551
10552@item ::
10553@vindex org-export-with-fixed-width
10554Toggle fixed-width sections
10555(@code{org-export-with-fixed-width}).
10556
10557@item <:
10558@vindex org-export-with-timestamps
10559Toggle inclusion of any time/date active/inactive stamps
10560(@code{org-export-with-timestamps}).
10561
10562@item :
10563@vindex org-export-preserve-breaks
10564Toggle line-break-preservation (@code{org-export-preserve-breaks}).
10565
10566@item ^:
10567@vindex org-export-with-sub-superscripts
10568Toggle @TeX{}-like syntax for sub- and superscripts. If you write "^:@{@}",
10569@samp{a_@{b@}} will be interpreted, but the simple @samp{a_b} will be left as
10570it is (@code{org-export-with-sub-superscripts}).
10571
10572@item arch:
10573@vindex org-export-with-archived-trees
10574Configure export of archived trees. Can be set to @code{headline} to only
10575process the headline, skipping its contents
10576(@code{org-export-with-archived-trees}).
10577
10578@item author:
10579@vindex org-export-with-author
10580Toggle inclusion of author name into exported file
10581(@code{org-export-with-author}).
10582
10583@item c:
10584@vindex org-export-with-clocks
10585Toggle inclusion of CLOCK keywords (@code{org-export-with-clocks}).
10586
10587@item creator:
10588@vindex org-export-with-creator
10589Configure inclusion of creator info into exported file. It may be set to
10590@code{comment} (@code{org-export-with-creator}).
10591
10592@item d:
10593@vindex org-export-with-drawers
10594Toggle inclusion of drawers, or list drawers to include
10595(@code{org-export-with-drawers}).
10596
10597@item e:
10598@vindex org-export-with-entities
10599Toggle inclusion of entities (@code{org-export-with-entities}).
10600
10601@item email:
10602@vindex org-export-with-email
10603Toggle inclusion of the author's e-mail into exported file
10604(@code{org-export-with-email}).
10605
10606@item f:
10607@vindex org-export-with-footnotes
10608Toggle the inclusion of footnotes (@code{org-export-with-footnotes}).
10609
10610@item H:
10611@vindex org-export-headline-levels
10612Set the number of headline levels for export
10613(@code{org-export-headline-levels}). Below that level, headlines are treated
10614differently. In most back-ends, they become list items.
10615
10616@item inline:
10617@vindex org-export-with-inlinetasks
10618Toggle inclusion of inlinetasks (@code{org-export-with-inlinetasks}).
10619
10620@item num:
10621@vindex org-export-with-section-numbers
10622Toggle section-numbers (@code{org-export-with-section-numbers}). It can also
10623be set to a number @samp{n}, so only headlines at that level or above will be
10624numbered.
10625
10626@item p:
10627@vindex org-export-with-planning
10628Toggle export of planning information (@code{org-export-with-planning}).
10629``Planning information'' is the line containing the @code{SCHEDULED:}, the
10630@code{DEADLINE:} or the @code{CLOSED:} cookies or a combination of them.
10631
10632@item pri:
10633@vindex org-export-with-priority
10634Toggle inclusion of priority cookies (@code{org-export-with-priority}).
10635
10636@item stat:
10637@vindex org-export-with-statistics-cookies
10638Toggle inclusion of statistics cookies
10639(@code{org-export-with-statistics-cookies}).
10640
10641@item tags:
10642@vindex org-export-with-tags
10643Toggle inclusion of tags, may also be @code{not-in-toc}
10644(@code{org-export-with-tags}).
10645
10646@item tasks:
10647@vindex org-export-with-tasks
10648Toggle inclusion of tasks (TODO items), can be @code{nil} to remove all
10649tasks, @code{todo} to remove DONE tasks, or a list of keywords to keep
10650(@code{org-export-with-tasks}).
10651
10652@item tex:
10653@vindex org-export-with-latex
10654Configure export of @LaTeX{} fragments and environments. It may be set to
10655@code{verbatim} (@code{org-export-with-latex}).
10656
10657@item timestamp:
9899@vindex org-export-time-stamp-file 10658@vindex org-export-time-stamp-file
9900@example 10659Toggle inclusion of the creation time into exported file
9901H: @r{set the number of headline levels for export} 10660(@code{org-export-time-stamp-file}).
9902num: @r{turn on/off section-numbers}
9903toc: @r{turn on/off table of contents, or set level limit (integer)}
9904\n: @r{turn on/off line-break-preservation (DOES NOT WORK)}
9905@@: @r{turn on/off quoted HTML tags}
9906:: @r{turn on/off fixed-width sections}
9907|: @r{turn on/off tables}
9908^: @r{turn on/off @TeX{}-like syntax for sub- and superscripts. If}
9909 @r{you write "^:@{@}", @code{a_@{b@}} will be interpreted, but}
9910 @r{the simple @code{a_b} will be left as it is.}
9911-: @r{turn on/off conversion of special strings.}
9912f: @r{turn on/off footnotes like this[1].}
9913todo: @r{turn on/off inclusion of TODO keywords into exported text}
9914tasks: @r{turn on/off inclusion of tasks (TODO items), can be nil to remove}
9915 @r{all tasks, @code{todo} to remove DONE tasks, or list of kwds to keep}
9916pri: @r{turn on/off priority cookies}
9917tags: @r{turn on/off inclusion of tags, may also be @code{not-in-toc}}
9918<: @r{turn on/off inclusion of any time/date stamps like DEADLINES}
9919*: @r{turn on/off emphasized text (bold, italic, underlined)}
9920TeX: @r{turn on/off simple @TeX{} macros in plain text}
9921LaTeX: @r{configure export of @LaTeX{} fragments. Default @code{auto}}
9922skip: @r{turn on/off skipping the text before the first heading}
9923author: @r{turn on/off inclusion of author name/email into exported file}
9924email: @r{turn on/off inclusion of author email into exported file}
9925creator: @r{turn on/off inclusion of creator info into exported file}
9926timestamp: @r{turn on/off inclusion creation time into exported file}
9927d: @r{turn on/off inclusion of drawers, or list drawers to include}
9928@end example
9929@noindent
9930These options take effect in both the HTML and @LaTeX{} export, except for
9931@code{TeX} and @code{LaTeX} options, which are respectively @code{t} and
9932@code{nil} for the @LaTeX{} export.
9933
9934The default values for these and many other options are given by a set of
9935variables. For a list of such variables, the corresponding OPTIONS keys and
9936also the publishing keys (@pxref{Project alist}), see the constant
9937@code{org-export-plist-vars}.
9938
9939When exporting only a single subtree by selecting it with @kbd{C-c @@} before
9940calling an export command, the subtree can overrule some of the file's export
9941settings with properties @code{EXPORT_FILE_NAME}, @code{EXPORT_TITLE},
9942@code{EXPORT_TEXT}, @code{EXPORT_AUTHOR}, @code{EXPORT_DATE}, and
9943@code{EXPORT_OPTIONS}.
9944
9945@node The export dispatcher, ASCII/Latin-1/UTF-8 export, Export options, Exporting
9946@section The export dispatcher
9947@cindex dispatcher, for export commands
9948
9949All export commands can be reached using the export dispatcher, which is a
9950prefix key that prompts for an additional key specifying the command.
9951Normally the entire file is exported, but if there is an active region that
9952contains one outline tree, the first heading is used as document title and
9953the subtrees are exported.
9954 10661
9955@table @kbd 10662@item toc:
9956@orgcmd{C-c C-e,org-export} 10663@vindex org-export-with-toc
9957@vindex org-export-run-in-background 10664Toggle inclusion of the table of contents, or set the level limit
9958Dispatcher for export and publishing commands. Displays a help-window 10665(@code{org-export-with-toc}).
9959listing the additional key(s) needed to launch an export or publishing 10666
9960command. The prefix arg is passed through to the exporter. A double prefix 10667@item todo:
9961@kbd{C-u C-u} causes most commands to be executed in the background, in a 10668@vindex org-export-with-todo-keywords
9962separate Emacs process@footnote{To make this behavior the default, customize 10669Toggle inclusion of TODO keywords into exported text
9963the variable @code{org-export-run-in-background}.}. 10670(@code{org-export-with-todo-keywords}).
9964@orgcmd{C-c C-e v,org-export-visible} 10671
9965Like @kbd{C-c C-e}, but only export the text that is currently visible 10672@item |:
9966(i.e., not hidden by outline visibility). 10673@vindex org-export-with-tables
9967@orgcmd{C-u C-u C-c C-e,org-export} 10674Toggle inclusion of tables (@code{org-export-with-tables}).
9968@vindex org-export-run-in-background
9969Call the exporter, but reverse the setting of
9970@code{org-export-run-in-background}, i.e., request background processing if
9971not set, or force processing in the current Emacs process if set.
9972@end table 10675@end table
9973 10676
9974@node ASCII/Latin-1/UTF-8 export, HTML export, The export dispatcher, Exporting 10677@cindex property, EXPORT_FILE_NAME
10678When exporting only a subtree, each of the previous keywords@footnote{With
10679the exception of @samp{SETUPFILE}.} can be overriden locally by special node
10680properties. These begin with @samp{EXPORT_}, followed by the name of the
10681keyword they supplant. For example, @samp{DATE} and @samp{OPTIONS} keywords
10682become, respectively, @samp{EXPORT_DATE} and @samp{EXPORT_OPTIONS}
10683properties. Subtree export also supports the self-explicit
10684@samp{EXPORT_FILE_NAME} property@footnote{There is no buffer-wide equivalent
10685for this property. The file name in this case is derived from the file
10686associated to the buffer, if possible, or asked to the user otherwise.}.
10687
10688@cindex #+BIND
10689@vindex org-export-allow-bind-keywords
10690If @code{org-export-allow-bind-keywords} is non-@code{nil}, Emacs variables
10691can become buffer-local during export by using the BIND keyword. Its syntax
10692is @samp{#+BIND: variable value}. This is particularly useful for in-buffer
10693settings that cannot be changed using specific keywords.
10694
10695@node ASCII/Latin-1/UTF-8 export, Beamer export, Export settings, Exporting
9975@section ASCII/Latin-1/UTF-8 export 10696@section ASCII/Latin-1/UTF-8 export
9976@cindex ASCII export 10697@cindex ASCII export
9977@cindex Latin-1 export 10698@cindex Latin-1 export
@@ -9981,58 +10702,277 @@ ASCII export produces a simple and very readable version of an Org mode
9981file, containing only plain ASCII@. Latin-1 and UTF-8 export augment the file 10702file, containing only plain ASCII@. Latin-1 and UTF-8 export augment the file
9982with special characters and symbols available in these encodings. 10703with special characters and symbols available in these encodings.
9983 10704
9984@cindex region, active 10705@vindex org-ascii-links-to-notes
9985@cindex active region 10706Links are exported in a footnote-like style, with the descriptive part in the
9986@cindex transient-mark-mode 10707text and the link in a note before the next heading. See the variable
10708@code{org-ascii-links-to-notes} for details and other options.
10709
10710@subheading ASCII export commands
10711
9987@table @kbd 10712@table @kbd
9988@orgcmd{C-c C-e a,org-export-as-ascii} 10713@orgcmd{C-c C-e t a/l/u,org-ascii-export-to-ascii}
9989@cindex property, EXPORT_FILE_NAME
9990Export as an ASCII file. For an Org file, @file{myfile.org}, the ASCII file 10714Export as an ASCII file. For an Org file, @file{myfile.org}, the ASCII file
9991will be @file{myfile.txt}. The file will be overwritten without 10715will be @file{myfile.txt}. The file will be overwritten without warning.
9992warning. If there is an active region@footnote{This requires 10716When the original file is @file{myfile.txt}, the resulting file becomes
9993@code{transient-mark-mode} be turned on.}, only the region will be 10717@file{myfile.txt.txt} in order to prevent data loss.
9994exported. If the selected region is a single tree@footnote{To select the 10718@orgcmd{C-c C-e t A/L/U,org-ascii-export-as-ascii}
9995current subtree, use @kbd{C-c @@}.}, the tree head will
9996become the document title. If the tree head entry has or inherits an
9997@code{EXPORT_FILE_NAME} property, that name will be used for the
9998export.
9999@orgcmd{C-c C-e A,org-export-as-ascii-to-buffer}
10000Export to a temporary buffer. Do not create a file. 10719Export to a temporary buffer. Do not create a file.
10001@orgcmd{C-c C-e n,org-export-as-latin1}
10002@xorgcmd{C-c C-e N,org-export-as-latin1-to-buffer}
10003Like the above commands, but use Latin-1 encoding.
10004@orgcmd{C-c C-e u,org-export-as-utf8}
10005@xorgcmd{C-c C-e U,org-export-as-utf8-to-buffer}
10006Like the above commands, but use UTF-8 encoding.
10007@item C-c C-e v a/n/u
10008Export only the visible part of the document.
10009@end table 10720@end table
10010 10721
10011@cindex headline levels, for exporting 10722@subheading Header and sectioning structure
10012In the exported version, the first 3 outline levels will become 10723
10013headlines, defining a general document structure. Additional levels 10724In the exported version, the first three outline levels become headlines,
10014will be exported as itemized lists. If you want that transition to occur 10725defining a general document structure. Additional levels are exported as
10015at a different level, specify it with a prefix argument. For example, 10726lists. The transition can also occur at a different level (@pxref{Export
10727settings}).
10728
10729@subheading Quoting ASCII text
10730
10731You can insert text that will only appear when using @code{ASCII} back-end
10732with the following constructs:
10016 10733
10734@cindex #+ASCII
10735@cindex #+BEGIN_ASCII
10017@example 10736@example
10018@kbd{C-1 C-c C-e a} 10737Text @@@@ascii:and additional text@@@@ within a paragraph.
10738
10739#+ASCII: Some text
10740
10741#+BEGIN_ASCII
10742All lines in this block will appear only when using this back-end.
10743#+END_ASCII
10019@end example 10744@end example
10020 10745
10021@noindent 10746@subheading ASCII specific attributes
10022creates only top level headlines and exports the rest as items. When 10747@cindex #+ATTR_ASCII
10023headlines are converted to items, the indentation of the text following 10748@cindex horizontal rules, in ASCII export
10024the headline is changed to fit nicely under the item. This is done with 10749
10025the assumption that the first body line indicates the base indentation of 10750@code{ASCII} back-end only understands one attribute, @code{:width}, which
10026the body text. Any indentation larger than this is adjusted to preserve 10751specifies the length, in characters, of a given horizontal rule. It must be
10027the layout relative to the first line. Should there be lines with less 10752specified using an @code{ATTR_ASCII} line, directly preceding the rule.
10028indentation than the first one, these are left alone. 10753
10029 10754@example
10030@vindex org-export-ascii-links-to-notes 10755#+ATTR_ASCII: :width 10
10031Links will be exported in a footnote-like style, with the descriptive part in 10756-----
10032the text and the link in a note before the next heading. See the variable 10757@end example
10033@code{org-export-ascii-links-to-notes} for details and other options. 10758
10034 10759@node Beamer export, HTML export, ASCII/Latin-1/UTF-8 export, Exporting
10035@node HTML export, @LaTeX{} and PDF export, ASCII/Latin-1/UTF-8 export, Exporting 10760@section Beamer export
10761@cindex Beamer export
10762
10763The @LaTeX{} class @emph{Beamer} allows production of high quality
10764presentations using @LaTeX{} and pdf processing. Org mode has special
10765support for turning an Org mode file or tree into a Beamer presentation.
10766
10767@subheading Beamer export commands
10768
10769@table @kbd
10770@orgcmd{C-c C-e l b,org-beamer-export-to-latex}
10771Export as a @LaTeX{} file. For an Org file @file{myfile.org}, the @LaTeX{}
10772file will be @file{myfile.tex}. The file will be overwritten without
10773warning.
10774@orgcmd{C-c C-e l B,org-beamer-export-as-latex}
10775Export to a temporary buffer. Do not create a file.
10776@orgcmd{C-c C-e l P,org-beamer-export-to-pdf}
10777Export as @LaTeX{} and then process to PDF.
10778@item C-c C-e l O
10779Export as @LaTeX{} and then process to PDF, then open the resulting PDF file.
10780@end table
10781
10782@subheading Sectioning, Frames and Blocks
10783
10784Any tree with not-too-deep level nesting should in principle be exportable as
10785a Beamer presentation. Headlines fall into three categories: sectioning
10786elements, frames and blocks.
10787
10788@itemize @minus
10789@item
10790@vindex org-beamer-frame-level
10791Headlines become frames when their level is equal to
10792@code{org-beamer-frame-level} or @code{H} value in an @code{OPTIONS} line
10793(@pxref{Export settings}).
10794
10795@cindex property, BEAMER_ENV
10796Though, if a headline in the current tree has a @code{BEAMER_ENV} property
10797set to either to @code{frame} or @code{fullframe}, its level overrides the
10798variable. A @code{fullframe} is a frame with an empty (ignored) title.
10799
10800@item
10801@vindex org-beamer-environments-default
10802@vindex org-beamer-environments-extra
10803All frame's children become @code{block} environments. Special block types
10804can be enforced by setting headline's @code{BEAMER_ENV} property@footnote{If
10805this property is set, the entry will also get a @code{:B_environment:} tag to
10806make this visible. This tag has no semantic meaning, it is only a visual
10807aid.} to an appropriate value (see @code{org-beamer-environments-default} for
10808supported values and @code{org-beamer-environments-extra} for adding more).
10809
10810@item
10811@cindex property, BEAMER_REF
10812As a special case, if the @code{BEAMER_ENV} property is set to either
10813@code{appendix}, @code{note}, @code{noteNH} or @code{againframe}, the
10814headline will become, respectively, an appendix, a note (within frame or
10815between frame, depending on its level), a note with its title ignored or an
10816@code{\againframe} command. In the latter case, a @code{BEAMER_REF} property
10817is mandatory in order to refer to the frame being resumed, and contents are
10818ignored.
10819
10820Also, a headline with an @code{ignoreheading} environment will have its
10821contents only inserted in the output. This special value is useful to have
10822data between frames, or to properly close a @code{column} environment.
10823@end itemize
10824
10825@cindex property, BEAMER_ACT
10826@cindex property, BEAMER_OPT
10827Headlines also support @code{BEAMER_ACT} and @code{BEAMER_OPT} properties.
10828The former is translated as an overlay/action specification, or a default
10829overlay specification when enclosed within square brackets. The latter
10830specifies options@footnote{The @code{fragile} option is added automatically
10831if it contains code that requires a verbatim environment, though.} for the
10832current frame or block. The export back-end will automatically wrap
10833properties within angular or square brackets when appropriate.
10834
10835@cindex property, BEAMER_COL
10836Moreover, headlines handle the @code{BEAMER_COL} property. Its value should
10837be a decimal number representing the width of the column as a fraction of the
10838total text width. If the headline has no specific environment, its title
10839will be ignored and its contents will fill the column created. Otherwise,
10840the block will fill the whole column and the title will be preserved. Two
10841contiguous headlines with a non-@code{nil} @code{BEAMER_COL} value share the same
10842@code{columns} @LaTeX{} environment. It will end before the next headline
10843without such a property. This environment is generated automatically.
10844Although, it can also be explicitly created, with a special @code{columns}
10845value for @code{BEAMER_ENV} property (if it needs to be set up with some
10846specific options, for example).
10847
10848@subheading Beamer specific syntax
10849
10850Beamer back-end is an extension of @LaTeX{} back-end. As such, all @LaTeX{}
10851specific syntax (e.g., @samp{#+LATEX:} or @samp{#+ATTR_LATEX:}) is
10852recognized. See @ref{@LaTeX{} and PDF export} for more information.
10853
10854@cindex #+BEAMER_THEME
10855@cindex #+BEAMER_COLOR_THEME
10856@cindex #+BEAMER_FONT_THEME
10857@cindex #+BEAMER_INNER_THEME
10858@cindex #+BEAMER_OUTER_THEME
10859Beamer export introduces a number of keywords to insert code in the
10860document's header. Four control appearance of the presentantion:
10861@code{#+BEAMER_THEME}, @code{#+BEAMER_COLOR_THEME},
10862@code{#+BEAMER_FONT_THEME}, @code{#+BEAMER_INNER_THEME} and
10863@code{#+BEAMER_OUTER_THEME}. All of them accept optional arguments
10864within square brackets. The last one, @code{#+BEAMER_HEADER}, is more
10865generic and allows you to append any line of code in the header.
10866
10867@example
10868#+BEAMER_THEME: Rochester [height=20pt]
10869#+BEAMER_COLOR_THEME: spruce
10870@end example
10871
10872Table of contents generated from @code{toc:t} @code{OPTION} keyword are
10873wrapped within a @code{frame} environment. Those generated from a @code{TOC}
10874keyword (@pxref{Table of contents}) are not. In that case, it is also
10875possible to specify options, enclosed within square brackets.
10876
10877@example
10878#+TOC: headlines [currentsection]
10879@end example
10880
10881Beamer specific code can be inserted with the following constructs:
10882
10883@cindex #+BEAMER
10884@cindex #+BEGIN_BEAMER
10885@example
10886#+BEAMER: \pause
10887
10888#+BEGIN_BEAMER
10889All lines in this block will appear only when using this back-end.
10890#+END_BEAMER
10891
10892Text @@@@beamer:some code@@@@ within a paragraph.
10893@end example
10894
10895In particular, this last example can be used to add overlay specifications to
10896objects whose type is among @code{bold}, @code{item}, @code{link},
10897@code{radio-target} and @code{target}, when the value is enclosed within
10898angular brackets and put at the beginning the object.
10899
10900@example
10901A *@@@@beamer:<2->@@@@useful* feature
10902@end example
10903
10904@cindex #+ATTR_BEAMER
10905Eventually, every plain list has support for @code{:environment},
10906@code{:overlay} and @code{:options} attributes through
10907@code{ATTR_BEAMER} affiliated keyword. The first one allows the use
10908of a different environment, the second sets overlay specifications and
10909the last one inserts optional arguments in current list environment.
10910
10911@example
10912#+ATTR_BEAMER: :overlay +-
10913- item 1
10914- item 2
10915@end example
10916
10917@subheading Editing support
10918
10919You can turn on a special minor mode @code{org-beamer-mode} for faster
10920editing with:
10921
10922@example
10923#+STARTUP: beamer
10924@end example
10925
10926@table @kbd
10927@orgcmd{C-c C-b,org-beamer-select-environment}
10928In @code{org-beamer-mode}, this key offers fast selection of a Beamer
10929environment or the @code{BEAMER_COL} property.
10930@end table
10931
10932Also, a template for useful in-buffer settings or properties can be inserted
10933into the buffer with @kbd{M-x org-beamer-insert-options-template}. Among
10934other things, this will install a column view format which is very handy for
10935editing special properties used by Beamer.
10936
10937@subheading An example
10938
10939Here is a simple example Org document that is intended for Beamer export.
10940
10941@smallexample
10942#+TITLE: Example Presentation
10943#+AUTHOR: Carsten Dominik
10944#+OPTIONS: H:2
10945#+LATEX_CLASS: beamer
10946#+LATEX_CLASS_OPTIONS: [presentation]
10947#+BEAMER_THEME: Madrid
10948#+COLUMNS: %45ITEM %10BEAMER_ENV(Env) %10BEAMER_ACT(Act) %4BEAMER_COL(Col) %8BEAMER_OPT(Opt)
10949
10950* This is the first structural section
10951
10952** Frame 1
10953*** Thanks to Eric Fraga :B_block:BMCOL:
10954 :PROPERTIES:
10955 :BEAMER_COL: 0.48
10956 :BEAMER_ENV: block
10957 :END:
10958 for the first viable Beamer setup in Org
10959*** Thanks to everyone else :B_block:BMCOL:
10960 :PROPERTIES:
10961 :BEAMER_COL: 0.48
10962 :BEAMER_ACT: <2->
10963 :BEAMER_ENV: block
10964 :END:
10965 for contributing to the discussion
10966**** This will be formatted as a beamer note :B_note:
10967 :PROPERTIES:
10968 :BEAMER_env: note
10969 :END:
10970** Frame 2 (where we will not use columns)
10971*** Request
10972 Please test this stuff!
10973@end smallexample
10974
10975@node HTML export, @LaTeX{} and PDF export, Beamer export, Exporting
10036@section HTML export 10976@section HTML export
10037@cindex HTML export 10977@cindex HTML export
10038 10978
@@ -10042,6 +10982,7 @@ language, but with additional support for tables.
10042 10982
10043@menu 10983@menu
10044* HTML Export commands:: How to invoke HTML export 10984* HTML Export commands:: How to invoke HTML export
10985* HTML doctypes:: Org can export to various (X)HTML flavors
10045* HTML preamble and postamble:: How to insert a preamble and a postamble 10986* HTML preamble and postamble:: How to insert a preamble and a postamble
10046* Quoting HTML tags:: Using direct HTML in Org mode 10987* Quoting HTML tags:: Using direct HTML in Org mode
10047* Links in HTML export:: How links will be interpreted and formatted 10988* Links in HTML export:: How links will be interpreted and formatted
@@ -10053,100 +10994,161 @@ language, but with additional support for tables.
10053* JavaScript support:: Info and Folding in a web browser 10994* JavaScript support:: Info and Folding in a web browser
10054@end menu 10995@end menu
10055 10996
10056@node HTML Export commands, HTML preamble and postamble, HTML export, HTML export 10997@node HTML Export commands, HTML doctypes, HTML export, HTML export
10057@subsection HTML export commands 10998@subsection HTML export commands
10058 10999
10059@cindex region, active
10060@cindex active region
10061@cindex transient-mark-mode
10062@table @kbd 11000@table @kbd
10063@orgcmd{C-c C-e h,org-export-as-html} 11001@orgcmd{C-c C-e h h,org-html-export-to-html}
10064@cindex property, EXPORT_FILE_NAME
10065Export as a HTML file. For an Org file @file{myfile.org}, 11002Export as a HTML file. For an Org file @file{myfile.org},
10066the HTML file will be @file{myfile.html}. The file will be overwritten 11003the HTML file will be @file{myfile.html}. The file will be overwritten
10067without warning. If there is an active region@footnote{This requires 11004without warning.
10068@code{transient-mark-mode} be turned on.}, only the region will be 11005@kbd{C-c C-e h o}
10069exported. If the selected region is a single tree@footnote{To select the
10070current subtree, use @kbd{C-c @@}.}, the tree head will become the document
10071title. If the tree head entry has, or inherits, an @code{EXPORT_FILE_NAME}
10072property, that name will be used for the export.
10073@orgcmd{C-c C-e b,org-export-as-html-and-open}
10074Export as a HTML file and immediately open it with a browser. 11006Export as a HTML file and immediately open it with a browser.
10075@orgcmd{C-c C-e H,org-export-as-html-to-buffer} 11007@orgcmd{C-c C-e h H,org-html-export-as-html}
10076Export to a temporary buffer. Do not create a file. 11008Export to a temporary buffer. Do not create a file.
10077@orgcmd{C-c C-e R,org-export-region-as-html}
10078Export the active region to a temporary buffer. With a prefix argument, do
10079not produce the file header and footer, but just the plain HTML section for
10080the region. This is good for cut-and-paste operations.
10081@item C-c C-e v h/b/H/R
10082Export only the visible part of the document.
10083@item M-x org-export-region-as-html
10084Convert the region to HTML under the assumption that it was in Org mode
10085syntax before. This is a global command that can be invoked in any
10086buffer.
10087@item M-x org-replace-region-by-HTML
10088Replace the active region (assumed to be in Org mode syntax) by HTML
10089code.
10090@end table 11009@end table
10091 11010
10092@cindex headline levels, for exporting 11011@c FIXME Exporting sublevels
10093In the exported version, the first 3 outline levels will become headlines, 11012@c @cindex headline levels, for exporting
10094defining a general document structure. Additional levels will be exported as 11013@c In the exported version, the first 3 outline levels will become headlines,
10095itemized lists. If you want that transition to occur at a different level, 11014@c defining a general document structure. Additional levels will be exported as
10096specify it with a numeric prefix argument. For example, 11015@c itemized lists. If you want that transition to occur at a different level,
11016@c specify it with a numeric prefix argument. For example,
11017
11018@c @example
11019@c @kbd{C-2 C-c C-e b}
11020@c @end example
11021
11022@c @noindent
11023@c creates two levels of headings and does the rest as items.
11024
11025@node HTML doctypes, HTML preamble and postamble, HTML Export commands, HTML export
11026@subsection HTML doctypes
11027@vindex org-html-doctype
11028@vindex org-html-doctype-alist
11029
11030Org can export to various (X)HTML flavors.
11031
11032Setting the variable @code{org-html-doctype} allows you to export to different
11033(X)HTML variants. The exported HTML will be adjusted according to the sytax
11034requirements of that variant. You can either set this variable to a doctype
11035string directly, in which case the exporter will try to adjust the syntax
11036automatically, or you can use a ready-made doctype. The ready-made options
11037are:
11038
11039@itemize
11040@item
11041``html4-strict''
11042@item
11043``html4-transitional''
11044@item
11045``html4-frameset''
11046@item
11047``xhtml-strict''
11048@item
11049``xhtml-transitional''
11050@item
11051``xhtml-frameset''
11052@item
11053``xhtml-11''
11054@item
11055``html5''
11056@item
11057``xhtml5''
11058@end itemize
11059
11060See the variable @code{org-html-doctype-alist} for details. The default is
11061``xhtml-strict''.
11062
11063@subsubheading Fancy HTML5 export
11064@vindex org-html-html5-fancy
11065@vindex org-html-html5-elements
11066
11067HTML5 introduces several new element types. By default, Org will not make
11068use of these element types, but you can set @code{org-html-html5-fancy} to
11069@code{t} (or set @code{html5-fancy} item in an @code{OPTIONS} line), to
11070enable a few new block-level elements. These are created using arbitrary
11071#+BEGIN and #+END blocks. For instance:
10097 11072
10098@example 11073@example
10099@kbd{C-2 C-c C-e b} 11074#+BEGIN_ASIDE
11075Lorem ipsum
11076#+END_ASIDE
10100@end example 11077@end example
10101 11078
10102@noindent 11079Will export to:
10103creates two levels of headings and does the rest as items. 11080
11081@example
11082<aside>
11083 <p>Lorem ipsum</p>
11084</aside>
11085@end example
10104 11086
11087While this:
10105 11088
10106@node HTML preamble and postamble, Quoting HTML tags, HTML Export commands, HTML export 11089@example
11090#+ATTR_HTML: :controls controls :width 350
11091#+BEGIN_VIDEO
11092#+HTML: <source src="movie.mp4" type="video/mp4">
11093#+HTML: <source src="movie.ogg" type="video/ogg">
11094Your browser does not support the video tag.
11095#+END_VIDEO
11096@end example
11097
11098Becomes:
11099
11100@example
11101<video controls="controls" width="350">
11102 <source src="movie.mp4" type="video/mp4">
11103 <source src="movie.ogg" type="video/ogg">
11104 <p>Your browser does not support the video tag.</p>
11105</video>
11106@end example
11107
11108Special blocks that do not correspond to HTML5 elements (see
11109@code{org-html-html5-elements}) will revert to the usual behavior,
11110i.e. #+BEGIN_LEDERHOSEN will still export to <div class=''lederhosen''>.
11111
11112Headlines cannot appear within special blocks. To wrap a headline and its
11113contents in e.g. <section> or <article> tags, set the @code{HTML_CONTAINER}
11114property on the headline itself.
11115
11116@node HTML preamble and postamble, Quoting HTML tags, HTML doctypes, HTML export
10107@subsection HTML preamble and postamble 11117@subsection HTML preamble and postamble
10108@vindex org-export-html-preamble 11118@vindex org-html-preamble
10109@vindex org-export-html-postamble 11119@vindex org-html-postamble
10110@vindex org-export-html-preamble-format 11120@vindex org-html-preamble-format
10111@vindex org-export-html-postamble-format 11121@vindex org-html-postamble-format
10112@vindex org-export-html-validation-link 11122@vindex org-html-validation-link
10113@vindex org-export-author-info 11123@vindex org-export-creator-string
10114@vindex org-export-email-info
10115@vindex org-export-creator-info
10116@vindex org-export-time-stamp-file 11124@vindex org-export-time-stamp-file
10117 11125
10118The HTML exporter lets you define a preamble and a postamble. 11126The HTML exporter lets you define a preamble and a postamble.
10119 11127
10120The default value for @code{org-export-html-preamble} is @code{t}, which 11128The default value for @code{org-html-preamble} is @code{t}, which means
10121means that the preamble is inserted depending on the relevant format string 11129that the preamble is inserted depending on the relevant format string in
10122in @code{org-export-html-preamble-format}. 11130@code{org-html-preamble-format}.
10123 11131
10124Setting @code{org-export-html-preamble} to a string will override the default 11132Setting @code{org-html-preamble} to a string will override the default format
10125format string. Setting it to a function, will insert the output of the 11133string. If you set it to a function, it will insert the output of the
10126function, which must be a string; such a function takes no argument but you 11134function, which must be a string. Setting to @code{nil} will not insert any
10127can check against the value of @code{opt-plist}, which contains the list of 11135preamble.
10128publishing properties for the current file. Setting to @code{nil} will not 11136
10129insert any preamble. 11137The default value for @code{org-html-postamble} is @code{'auto}, which means
10130 11138that the HTML exporter will look for information about the author, the email,
10131The default value for @code{org-export-html-postamble} is @code{'auto}, which 11139the creator and the date, and build the postamble from these values. Setting
10132means that the HTML exporter will look for the value of 11140@code{org-html-postamble} to @code{t} will insert the postamble from the
10133@code{org-export-author-info}, @code{org-export-email-info}, 11141relevant format string found in @code{org-html-postamble-format}. Setting it
10134@code{org-export-creator-info} and @code{org-export-time-stamp-file}, 11142to @code{nil} will not insert any postamble.
10135@code{org-export-html-validation-link} and build the postamble from these
10136values. Setting @code{org-export-html-postamble} to @code{t} will insert the
10137postamble from the relevant format string found in
10138@code{org-export-html-postamble-format}. Setting it to @code{nil} will not
10139insert any postamble.
10140 11143
10141@node Quoting HTML tags, Links in HTML export, HTML preamble and postamble, HTML export 11144@node Quoting HTML tags, Links in HTML export, HTML preamble and postamble, HTML export
10142@subsection Quoting HTML tags 11145@subsection Quoting HTML tags
10143 11146
10144Plain @samp{<} and @samp{>} are always transformed to @samp{&lt;} and 11147Plain @samp{<} and @samp{>} are always transformed to @samp{&lt;} and
10145@samp{&gt;} in HTML export. If you want to include simple HTML tags 11148@samp{&gt;} in HTML export. If you want to include raw HTML code, which
10146which should be interpreted as such, mark them with @samp{@@} as in 11149should only appear in HTML export, mark it with @samp{@@@@html:} as in
10147@samp{@@<b>bold text@@</b>}. Note that this really works only for 11150@samp{@@@@html:<b>@@@@bold text@@@@html:</b>@@@@}. For more extensive HTML
10148simple tags. For more extensive HTML that should be copied verbatim to 11151that should be copied verbatim to the exported file use either
10149the exported file use either
10150 11152
10151@cindex #+HTML 11153@cindex #+HTML
10152@cindex #+BEGIN_HTML 11154@cindex #+BEGIN_HTML
@@ -10187,37 +11189,42 @@ and @code{style} attributes for a link:
10187 11189
10188@cindex #+ATTR_HTML 11190@cindex #+ATTR_HTML
10189@example 11191@example
10190#+ATTR_HTML: title="The Org mode homepage" style="color:red;" 11192#+ATTR_HTML: :title The Org mode homepage :style color:red;
10191[[http://orgmode.org]] 11193[[http://orgmode.org]]
10192@end example 11194@end example
10193 11195
10194@node Tables in HTML export, Images in HTML export, Links in HTML export, HTML export 11196@node Tables in HTML export, Images in HTML export, Links in HTML export, HTML export
10195@subsection Tables 11197@subsection Tables
10196@cindex tables, in HTML 11198@cindex tables, in HTML
10197@vindex org-export-html-table-tag 11199@vindex org-html-table-default-attributes
10198 11200
10199Org mode tables are exported to HTML using the table tag defined in 11201Org mode tables are exported to HTML using the table attributes defined in
10200@code{org-export-html-table-tag}. The default setting makes tables without 11202@code{org-html-table-default-attributes}. The default setting makes tables
10201cell borders and frame. If you would like to change this for individual 11203without cell borders and frame. If you would like to change this for
10202tables, place something like the following before the table: 11204individual tables, place something like the following before the table:
10203 11205
10204@cindex #+CAPTION 11206@cindex #+CAPTION
10205@cindex #+ATTR_HTML 11207@cindex #+ATTR_HTML
10206@example 11208@example
10207#+CAPTION: This is a table with lines around and between cells 11209#+CAPTION: This is a table with lines around and between cells
10208#+ATTR_HTML: border="2" rules="all" frame="border" 11210#+ATTR_HTML: :border 2 :rules all :frame border
10209@end example 11211@end example
10210 11212
11213@vindex org-html-table-row-tags
11214You can also modify the default tags used for each row by setting
11215@code{org-html-table-row-tags}. See the docstring for an example on
11216how to use this option.
11217
10211@node Images in HTML export, Math formatting in HTML export, Tables in HTML export, HTML export 11218@node Images in HTML export, Math formatting in HTML export, Tables in HTML export, HTML export
10212@subsection Images in HTML export 11219@subsection Images in HTML export
10213 11220
10214@cindex images, inline in HTML 11221@cindex images, inline in HTML
10215@cindex inlining images in HTML 11222@cindex inlining images in HTML
10216@vindex org-export-html-inline-images 11223@vindex org-html-inline-images
10217HTML export can inline images given as links in the Org file, and 11224HTML export can inline images given as links in the Org file, and
10218it can make an image the clickable part of a link. By 11225it can make an image the clickable part of a link. By
10219default@footnote{But see the variable 11226default@footnote{But see the variable
10220@code{org-export-html-inline-images}.}, images are inlined if a link does 11227@code{org-html-inline-images}.}, images are inlined if a link does
10221not have a description. So @samp{[[file:myimg.jpg]]} will be inlined, 11228not have a description. So @samp{[[file:myimg.jpg]]} will be inlined,
10222while @samp{[[file:myimg.jpg][the image]]} will just produce a link 11229while @samp{[[file:myimg.jpg][the image]]} will just produce a link
10223@samp{the image} that points to the image. If the description part 11230@samp{the image} that points to the image. If the description part
@@ -10238,7 +11245,7 @@ support text viewers and accessibility, and align it to the right.
10238@cindex #+ATTR_HTML 11245@cindex #+ATTR_HTML
10239@example 11246@example
10240#+CAPTION: A black cat stalking a spider 11247#+CAPTION: A black cat stalking a spider
10241#+ATTR_HTML: alt="cat/spider image" title="Action!" align="right" 11248#+ATTR_HTML: :alt cat/spider image :title Action! :align right
10242[[./img/a.jpg]] 11249[[./img/a.jpg]]
10243@end example 11250@end example
10244 11251
@@ -10249,36 +11256,43 @@ You could use @code{http} addresses just as well.
10249@subsection Math formatting in HTML export 11256@subsection Math formatting in HTML export
10250@cindex MathJax 11257@cindex MathJax
10251@cindex dvipng 11258@cindex dvipng
11259@cindex imagemagick
10252 11260
10253@LaTeX{} math snippets (@pxref{@LaTeX{} fragments}) can be displayed in two 11261@LaTeX{} math snippets (@pxref{@LaTeX{} fragments}) can be displayed in two
10254different ways on HTML pages. The default is to use the 11262different ways on HTML pages. The default is to use the
10255@uref{http://www.mathjax.org, MathJax system} which should work out of the 11263@uref{http://www.mathjax.org, MathJax system} which should work out of the
10256box with Org mode installation because @code{http://orgmode.org} serves 11264box with Org mode installation because @uref{http://orgmode.org} serves
10257@file{MathJax} for Org mode users for small applications and for testing 11265@file{MathJax} for Org mode users for small applications and for testing
10258purposes. @b{If you plan to use this regularly or on pages with significant 11266purposes. @b{If you plan to use this regularly or on pages with significant
10259page views, you should install@footnote{Installation instructions can be 11267page views, you should install@footnote{Installation instructions can be
10260found on the MathJax website, see 11268found on the MathJax website, see
10261@uref{http://www.mathjax.org/resources/docs/?installation.html}.} MathJax on 11269@uref{http://www.mathjax.org/resources/docs/?installation.html}.} MathJax on
10262your own server in order to limit the load of our server.} To configure 11270your own server in order to limit the load of our server.} To configure
10263@file{MathJax}, use the variable @code{org-export-html-mathjax-options} or 11271@file{MathJax}, use the variable @code{org-html-mathjax-options} or
10264insert something like the following into the buffer: 11272insert something like the following into the buffer:
10265 11273
10266@example 11274@example
10267#+MATHJAX: align:"left" mathml:t path:"/MathJax/MathJax.js" 11275#+HTML_MATHJAX: align:"left" mathml:t path:"/MathJax/MathJax.js"
10268@end example 11276@end example
10269 11277
10270@noindent See the docstring of the variable 11278@noindent See the docstring of the variable
10271@code{org-export-html-mathjax-options} for the meaning of the parameters in 11279@code{org-html-mathjax-options} for the meaning of the parameters in
10272this line. 11280this line.
10273 11281
10274If you prefer, you can also request that @LaTeX{} fragments are processed 11282If you prefer, you can also request that @LaTeX{} fragments are processed
10275into small images that will be inserted into the browser page. Before the 11283into small images that will be inserted into the browser page. Before the
10276availability of MathJax, this was the default method for Org files. This 11284availability of MathJax, this was the default method for Org files. This
10277method requires that the @file{dvipng} program is available on your system. 11285method requires that the @file{dvipng} program or @file{imagemagick} suite is
10278You can still get this processing with 11286available on your system. You can still get this processing with
11287
11288@example
11289#+OPTIONS: tex:dvipng
11290@end example
11291
11292or:
10279 11293
10280@example 11294@example
10281#+OPTIONS: LaTeX:dvipng 11295#+OPTIONS: tex:imagemagick
10282@end example 11296@end example
10283 11297
10284@node Text areas in HTML export, CSS support, Math formatting in HTML export, HTML export 11298@node Text areas in HTML export, CSS support, Math formatting in HTML export, HTML export
@@ -10287,15 +11301,16 @@ You can still get this processing with
10287@cindex text areas, in HTML 11301@cindex text areas, in HTML
10288An alternative way to publish literal code examples in HTML is to use text 11302An alternative way to publish literal code examples in HTML is to use text
10289areas, where the example can even be edited before pasting it into an 11303areas, where the example can even be edited before pasting it into an
10290application. It is triggered by a @code{-t} switch at an @code{example} or 11304application. It is triggered by @code{:textarea} attribute at an
10291@code{src} block. Using this switch disables any options for syntax and 11305@code{example} or @code{src} block.
10292label highlighting, and line numbering, which may be present. You may also 11306
10293use @code{-h} and @code{-w} switches to specify the height and width of the 11307You may also use @code{:height} and @code{:width} attributes to specify the
10294text area, which default to the number of lines in the example, and 80, 11308height and width of the text area, which default to the number of lines in
10295respectively. For example 11309the example, and 80, respectively. For example
10296 11310
10297@example 11311@example
10298#+BEGIN_EXAMPLE -t -w 40 11312#+ATTR_HTML: :textarea t :width 40
11313#+BEGIN_EXAMPLE
10299 (defun org-xor (a b) 11314 (defun org-xor (a b)
10300 "Exclusive or." 11315 "Exclusive or."
10301 (if a (not b) b)) 11316 (if a (not b) b))
@@ -10308,15 +11323,15 @@ respectively. For example
10308@cindex CSS, for HTML export 11323@cindex CSS, for HTML export
10309@cindex HTML export, CSS 11324@cindex HTML export, CSS
10310 11325
10311@vindex org-export-html-todo-kwd-class-prefix 11326@vindex org-html-todo-kwd-class-prefix
10312@vindex org-export-html-tag-class-prefix 11327@vindex org-html-tag-class-prefix
10313You can also give style information for the exported file. The HTML exporter 11328You can modify the CSS style definitions for the exported file. The HTML
10314assigns the following special CSS classes@footnote{If the classes on TODO 11329exporter assigns the following special CSS classes@footnote{If the classes on
10315keywords and tags lead to conflicts, use the variables 11330TODO keywords and tags lead to conflicts, use the variables
10316@code{org-export-html-todo-kwd-class-prefix} and 11331@code{org-html-todo-kwd-class-prefix} and @code{org-html-tag-class-prefix} to
10317@code{org-export-html-tag-class-prefix} to make them unique.} to appropriate 11332make them unique.} to appropriate parts of the document---your style
10318parts of the document---your style specifications may change these, in 11333specifications may change these, in addition to any of the standard classes
10319addition to any of the standard classes like for headlines, tables, etc. 11334like for headlines, tables, etc.
10320@example 11335@example
10321p.author @r{author information, including email} 11336p.author @r{author information, including email}
10322p.date @r{publishing date} 11337p.date @r{publishing date}
@@ -10336,6 +11351,9 @@ p.creator @r{creator info, about org mode version}
10336div.outline-N @r{div for outline level N (headline plus text))} 11351div.outline-N @r{div for outline level N (headline plus text))}
10337div.outline-text-N @r{extra div for text at outline level N} 11352div.outline-text-N @r{extra div for text at outline level N}
10338.section-number-N @r{section number in headlines, different for each level} 11353.section-number-N @r{section number in headlines, different for each level}
11354.figure-number @r{label like "Figure 1:"}
11355.table-number @r{label like "Table 1:"}
11356.listing-number @r{label like "Listing 1:"}
10339div.figure @r{how to format an inlined image} 11357div.figure @r{how to format an inlined image}
10340pre.src @r{formatted source code} 11358pre.src @r{formatted source code}
10341pre.example @r{normal example} 11359pre.example @r{normal example}
@@ -10346,24 +11364,26 @@ p.footnote @r{footnote definition paragraph, containing a footnote}
10346.footnum @r{footnote number in footnote definition (always <sup>)} 11364.footnum @r{footnote number in footnote definition (always <sup>)}
10347@end example 11365@end example
10348 11366
10349@vindex org-export-html-style-default 11367@vindex org-html-style-default
10350@vindex org-export-html-style-include-default 11368@vindex org-html-head-include-default-style
10351@vindex org-export-html-style 11369@vindex org-html-head
10352@vindex org-export-html-extra 11370@vindex org-html-head-extra
10353@vindex org-export-html-style-default 11371@cindex #+HTML_INCLUDE_STYLE
10354Each exported file contains a compact default style that defines these 11372Each exported file contains a compact default style that defines these
10355classes in a basic way@footnote{This style is defined in the constant 11373classes in a basic way@footnote{This style is defined in the constant
10356@code{org-export-html-style-default}, which you should not modify. To turn 11374@code{org-html-style-default}, which you should not modify. To turn
10357inclusion of these defaults off, customize 11375inclusion of these defaults off, customize
10358@code{org-export-html-style-include-default}}. You may overwrite these 11376@code{org-html-head-include-default-style} or set @code{html-style} to
10359settings, or add to them by using the variables @code{org-export-html-style} 11377@code{nil} in an @code{OPTIONS} line.}. You may overwrite these settings, or
10360(for Org-wide settings) and @code{org-export-html-style-extra} (for more 11378add to them by using the variables @code{org-html-head} and
10361fine-grained settings, like file-local settings). To set the latter variable 11379@code{org-html-head-extra}. You can override the global values of these
10362individually for each file, you can use 11380variables for each file by using these keywords:
10363 11381
10364@cindex #+STYLE 11382@cindex #+HTML_HEAD
11383@cindex #+HTML_HEAD_EXTRA
10365@example 11384@example
10366#+STYLE: <link rel="stylesheet" type="text/css" href="stylesheet.css" /> 11385#+HTML_HEAD: <link rel="stylesheet" type="text/css" href="style1.css" />
11386#+HTML_HEAD_EXTRA: <link rel="alternate stylesheet" type="text/css" href="style2.css" />
10367@end example 11387@end example
10368 11388
10369@noindent 11389@noindent
@@ -10392,15 +11412,12 @@ as well, press @kbd{?} for an overview of the available keys). The second
10392view type is a @emph{folding} view much like Org provides inside Emacs. The 11412view type is a @emph{folding} view much like Org provides inside Emacs. The
10393script is available at @url{http://orgmode.org/org-info.js} and you can find 11413script is available at @url{http://orgmode.org/org-info.js} and you can find
10394the documentation for it at @url{http://orgmode.org/worg/code/org-info-js/}. 11414the documentation for it at @url{http://orgmode.org/worg/code/org-info-js/}.
10395We host the script at our site, but if you use it a lot, you might 11415We host the script at our site, but if you use it a lot, you might not want
10396not want to be dependent on @url{http://orgmode.org} and prefer to install a local 11416to be dependent on @url{http://orgmode.org} and prefer to install a local
10397copy on your own web server. 11417copy on your own web server.
10398 11418
10399To use the script, you need to make sure that the @file{org-jsinfo.el} module 11419All it then takes to use this program is adding a single line to the Org
10400gets loaded. It should be loaded by default, but you can try @kbd{M-x 11420file:
10401customize-variable @key{RET} org-modules @key{RET}} to convince yourself that
10402this is indeed the case. All it then takes to make use of the program is
10403adding a single line to the Org file:
10404 11421
10405@cindex #+INFOJS_OPT 11422@cindex #+INFOJS_OPT
10406@example 11423@example
@@ -10440,92 +11457,61 @@ buttons: @r{Should view-toggle buttons be everywhere? When @code{nil} (the}
10440 @r{default), only one such button will be present.} 11457 @r{default), only one such button will be present.}
10441@end example 11458@end example
10442@noindent 11459@noindent
10443@vindex org-infojs-options 11460@vindex org-html-infojs-options
10444@vindex org-export-html-use-infojs 11461@vindex org-html-use-infojs
10445You can choose default values for these options by customizing the variable 11462You can choose default values for these options by customizing the variable
10446@code{org-infojs-options}. If you always want to apply the script to your 11463@code{org-html-infojs-options}. If you always want to apply the script to your
10447pages, configure the variable @code{org-export-html-use-infojs}. 11464pages, configure the variable @code{org-html-use-infojs}.
10448 11465
10449@node @LaTeX{} and PDF export, DocBook export, HTML export, Exporting 11466@node @LaTeX{} and PDF export, Markdown export, HTML export, Exporting
10450@section @LaTeX{} and PDF export 11467@section @LaTeX{} and PDF export
10451@cindex @LaTeX{} export 11468@cindex @LaTeX{} export
10452@cindex PDF export 11469@cindex PDF export
10453@cindex Guerry, Bastien 11470
10454 11471@LaTeX{} export can produce an arbitrarily complex LaTeX document of any
10455Org mode contains a @LaTeX{} exporter written by Bastien Guerry. With 11472standard or custom document class. With further processing@footnote{The
10456further processing@footnote{The default @LaTeX{} output is designed for 11473default @LaTeX{} output is designed for processing with @code{pdftex} or
10457processing with @code{pdftex} or @LaTeX{}. It includes packages that are not 11474@LaTeX{}. It includes packages that are not compatible with @code{xetex} and
10458compatible with @code{xetex} and possibly @code{luatex}. See the variables 11475possibly @code{luatex}. The @LaTeX{} exporter can be configured to support
10459@code{org-export-latex-default-packages-alist} and 11476alternative TeX engines, see the options
10460@code{org-export-latex-packages-alist}.}, this backend is also used to 11477@code{org-latex-default-packages-alist} and @code{org-latex-packages-alist}.},
10461produce PDF output. Since the @LaTeX{} output uses @file{hyperref} to 11478which the @LaTeX{} exporter is able to control, this back-end is able to
10462implement links and cross references, the PDF output file will be fully 11479produce PDF output. Because the @LaTeX{} exporter can be configured to use
10463linked. Beware of the fact that your @code{org} file has to be properly 11480the @code{hyperref} package, the default setup produces fully-linked PDF
10464structured in order to be correctly exported: respect the hierarchy of 11481output.
10465sections. 11482
11483As in @LaTeX{}, blank lines are meaningful for this back-end: a paragraph
11484will not be started if two contiguous syntactical elements are not separated
11485by an empty line.
11486
11487This back-end also offers enhanced support for footnotes. Thus, it handles
11488nested footnotes, footnotes in tables and footnotes in a list item's
11489description.
10466 11490
10467@menu 11491@menu
10468* @LaTeX{}/PDF export commands:: 11492* @LaTeX{} export commands:: How to export to LaTeX and PDF
10469* Header and sectioning:: Setting up the export file structure 11493* Header and sectioning:: Setting up the export file structure
10470* Quoting @LaTeX{} code:: Incorporating literal @LaTeX{} code 11494* Quoting @LaTeX{} code:: Incorporating literal @LaTeX{} code
10471* Tables in @LaTeX{} export:: Options for exporting tables to @LaTeX{} 11495* @LaTeX{} specific attributes:: Controlling @LaTeX{} output
10472* Images in @LaTeX{} export:: How to insert figures into @LaTeX{} output
10473* Beamer class export:: Turning the file into a presentation
10474@end menu 11496@end menu
10475 11497
10476@node @LaTeX{}/PDF export commands, Header and sectioning, @LaTeX{} and PDF export, @LaTeX{} and PDF export 11498@node @LaTeX{} export commands, Header and sectioning, @LaTeX{} and PDF export, @LaTeX{} and PDF export
10477@subsection @LaTeX{} export commands 11499@subsection @LaTeX{} export commands
10478 11500
10479@cindex region, active
10480@cindex active region
10481@cindex transient-mark-mode
10482@table @kbd 11501@table @kbd
10483@orgcmd{C-c C-e l,org-export-as-latex} 11502@orgcmd{C-c C-e l l,org-latex-export-to-latex}
10484@cindex property EXPORT_FILE_NAME 11503Export as a @LaTeX{} file. For an Org file @file{myfile.org}, the @LaTeX{}
10485Export as a @LaTeX{} file. For an Org file 11504file will be @file{myfile.tex}. The file will be overwritten without
10486@file{myfile.org}, the @LaTeX{} file will be @file{myfile.tex}. The file will 11505warning.
10487be overwritten without warning. If there is an active region@footnote{This 11506@orgcmd{C-c C-e l L,org-latex-export-as-latex}
10488requires @code{transient-mark-mode} be turned on.}, only the region will be
10489exported. If the selected region is a single tree@footnote{To select the
10490current subtree, use @kbd{C-c @@}.}, the tree head will become the document
10491title. If the tree head entry has or inherits an @code{EXPORT_FILE_NAME}
10492property, that name will be used for the export.
10493@orgcmd{C-c C-e L,org-export-as-latex-to-buffer}
10494Export to a temporary buffer. Do not create a file. 11507Export to a temporary buffer. Do not create a file.
10495@item C-c C-e v l/L 11508@orgcmd{C-c C-e l p,org-latex-export-to-pdf}
10496Export only the visible part of the document.
10497@item M-x org-export-region-as-latex
10498Convert the region to @LaTeX{} under the assumption that it was in Org mode
10499syntax before. This is a global command that can be invoked in any
10500buffer.
10501@item M-x org-replace-region-by-latex
10502Replace the active region (assumed to be in Org mode syntax) by @LaTeX{}
10503code.
10504@orgcmd{C-c C-e p,org-export-as-pdf}
10505Export as @LaTeX{} and then process to PDF. 11509Export as @LaTeX{} and then process to PDF.
10506@orgcmd{C-c C-e d,org-export-as-pdf-and-open} 11510@item C-c C-e l o
10507Export as @LaTeX{} and then process to PDF, then open the resulting PDF file. 11511Export as @LaTeX{} and then process to PDF, then open the resulting PDF file.
10508@end table 11512@end table
10509 11513
10510@cindex headline levels, for exporting 11514@node Header and sectioning, Quoting @LaTeX{} code, @LaTeX{} export commands, @LaTeX{} and PDF export
10511@vindex org-latex-low-levels
10512In the exported version, the first 3 outline levels will become
10513headlines, defining a general document structure. Additional levels
10514will be exported as description lists. The exporter can ignore them or
10515convert them to a custom string depending on
10516@code{org-latex-low-levels}.
10517
10518If you want that transition to occur at a different level, specify it
10519with a numeric prefix argument. For example,
10520
10521@example
10522@kbd{C-2 C-c C-e l}
10523@end example
10524
10525@noindent
10526creates two levels of headings and does the rest as items.
10527
10528@node Header and sectioning, Quoting @LaTeX{} code, @LaTeX{}/PDF export commands, @LaTeX{} and PDF export
10529@subsection Header and sectioning structure 11515@subsection Header and sectioning structure
10530@cindex @LaTeX{} class 11516@cindex @LaTeX{} class
10531@cindex @LaTeX{} sectioning structure 11517@cindex @LaTeX{} sectioning structure
@@ -10533,493 +11519,368 @@ creates two levels of headings and does the rest as items.
10533@cindex header, for @LaTeX{} files 11519@cindex header, for @LaTeX{} files
10534@cindex sectioning structure, for @LaTeX{} export 11520@cindex sectioning structure, for @LaTeX{} export
10535 11521
11522By default, the first three outline levels become headlines, defining a
11523general document structure. Additional levels are exported as @code{itemize}
11524or @code{enumerate} lists. The transition can also occur at a different
11525level (@pxref{Export settings}).
11526
10536By default, the @LaTeX{} output uses the class @code{article}. 11527By default, the @LaTeX{} output uses the class @code{article}.
10537 11528
10538@vindex org-export-latex-default-class 11529@vindex org-latex-default-class
10539@vindex org-export-latex-classes 11530@vindex org-latex-classes
10540@vindex org-export-latex-default-packages-alist 11531@vindex org-latex-default-packages-alist
10541@vindex org-export-latex-packages-alist 11532@vindex org-latex-packages-alist
10542@cindex #+LaTeX_HEADER
10543@cindex #+LaTeX_CLASS
10544@cindex #+LaTeX_CLASS_OPTIONS
10545@cindex property, LaTeX_CLASS
10546@cindex property, LaTeX_CLASS_OPTIONS
10547You can change this globally by setting a different value for 11533You can change this globally by setting a different value for
10548@code{org-export-latex-default-class} or locally by adding an option like 11534@code{org-latex-default-class} or locally by adding an option like
10549@code{#+LaTeX_CLASS: myclass} in your file, or with a @code{:LaTeX_CLASS:} 11535@code{#+LATEX_CLASS: myclass} in your file, or with
10550property that applies when exporting a region containing only this (sub)tree. 11536a @code{EXPORT_LATEX_CLASS} property that applies when exporting a region
10551The class must be listed in @code{org-export-latex-classes}. This variable 11537containing only this (sub)tree. The class must be listed in
10552defines a header template for each class@footnote{Into which the values of 11538@code{org-latex-classes}. This variable defines a header template for each
10553@code{org-export-latex-default-packages-alist} and 11539class@footnote{Into which the values of
10554@code{org-export-latex-packages-alist} are spliced.}, and allows you to 11540@code{org-latex-default-packages-alist} and @code{org-latex-packages-alist}
10555define the sectioning structure for each class. You can also define your own 11541are spliced.}, and allows you to define the sectioning structure for each
10556classes there. @code{#+LaTeX_CLASS_OPTIONS} or a @code{:LaTeX_CLASS_OPTIONS:} 11542class. You can also define your own classes there.
10557property can specify the options for the @code{\documentclass} macro. The 11543
10558options to documentclass have to be provided, as expected by @LaTeX{}, within 11544@cindex #+LATEX_CLASS
10559square brackets. You can also use @code{#+LaTeX_HEADER: \usepackage@{xyz@}} 11545@cindex #+LATEX_CLASS_OPTIONS
10560to add lines to the header. See the docstring of 11546@cindex property, EXPORT_LATEX_CLASS
10561@code{org-export-latex-classes} for more information. An example is shown 11547@cindex property, EXPORT_LATEX_CLASS_OPTIONS
10562below. 11548The @code{LATEX_CLASS_OPTIONS} keyword or @code{EXPORT_LATEX_CLASS_OPTIONS}
10563 11549property can specify the options for the @code{\documentclass} macro. These
10564@example 11550options have to be provided, as expected by @LaTeX{}, within square brackets.
10565#+LaTeX_CLASS: article 11551
10566#+LaTeX_CLASS_OPTIONS: [a4paper] 11552@cindex #+LATEX_HEADER
10567#+LaTeX_HEADER: \usepackage@{xyz@} 11553@cindex #+LATEX_HEADER_EXTRA
11554You can also use the @code{LATEX_HEADER} and
11555@code{LATEX_HEADER_EXTRA}@footnote{Unlike @code{LATEX_HEADER}, contents
11556from @code{LATEX_HEADER_EXTRA} keywords will not be loaded when previewing
11557@LaTeX{} snippets (@pxref{Previewing @LaTeX{} fragments}).} keywords in order
11558to add lines to the header. See the docstring of @code{org-latex-classes} for
11559more information.
11560
11561An example is shown below.
11562
11563@example
11564#+LATEX_CLASS: article
11565#+LATEX_CLASS_OPTIONS: [a4paper]
11566#+LATEX_HEADER: \usepackage@{xyz@}
10568 11567
10569* Headline 1 11568* Headline 1
10570 some text 11569 some text
10571@end example 11570@end example
10572 11571
10573@node Quoting @LaTeX{} code, Tables in @LaTeX{} export, Header and sectioning, @LaTeX{} and PDF export 11572@node Quoting @LaTeX{} code, @LaTeX{} specific attributes, Header and sectioning, @LaTeX{} and PDF export
10574@subsection Quoting @LaTeX{} code 11573@subsection Quoting @LaTeX{} code
10575 11574
10576Embedded @LaTeX{} as described in @ref{Embedded @LaTeX{}}, will be correctly 11575Embedded @LaTeX{} as described in @ref{Embedded @LaTeX{}}, will be correctly
10577inserted into the @LaTeX{} file. This includes simple macros like 11576inserted into the @LaTeX{} file. Furthermore, you can add special code that
10578@samp{\ref@{LABEL@}} to create a cross reference to a figure. Furthermore, 11577should only be present in @LaTeX{} export with the following constructs:
10579you can add special code that should only be present in @LaTeX{} export with
10580the following constructs:
10581 11578
10582@cindex #+LaTeX 11579@cindex #+LATEX
10583@cindex #+BEGIN_LaTeX 11580@cindex #+BEGIN_LATEX
10584@example 11581@example
10585#+LaTeX: Literal @LaTeX{} code for export 11582Code within @@@@latex:some code@@@@ a paragraph.
10586@end example
10587 11583
10588@noindent or 11584#+LATEX: Literal @LaTeX{} code for export
10589@cindex #+BEGIN_LaTeX
10590 11585
10591@example 11586#+BEGIN_LATEX
10592#+BEGIN_LaTeX
10593All lines between these markers are exported literally 11587All lines between these markers are exported literally
10594#+END_LaTeX 11588#+END_LATEX
10595@end example 11589@end example
10596 11590
11591@node @LaTeX{} specific attributes, , Quoting @LaTeX{} code, @LaTeX{} and PDF export
11592@subsection @LaTeX{} specific attributes
11593@cindex #+ATTR_LATEX
11594
11595@LaTeX{} understands attributes specified in an @code{ATTR_LATEX} line. They
11596affect tables, images, plain lists, special blocks and source blocks.
10597 11597
10598@node Tables in @LaTeX{} export, Images in @LaTeX{} export, Quoting @LaTeX{} code, @LaTeX{} and PDF export 11598@subsubheading Tables in @LaTeX{} export
10599@subsection Tables in @LaTeX{} export
10600@cindex tables, in @LaTeX{} export 11599@cindex tables, in @LaTeX{} export
10601 11600
10602For @LaTeX{} export of a table, you can specify a label, a caption and 11601For @LaTeX{} export of a table, you can specify a label and a caption
10603placement options (@pxref{Images and tables}). You can also use the 11602(@pxref{Images and tables}). You can also use attributes to control table
10604@code{ATTR_LaTeX} line to request a @code{longtable} environment for the 11603layout and contents. Valid @LaTeX{} attributes include:
10605table, so that it may span several pages, or to change the default table 11604
10606environment from @code{table} to @code{table*} or to change the default inner 11605@table @code
10607tabular environment to @code{tabularx} or @code{tabulary}. Finally, you can 11606@item :mode
10608set the alignment string, and (with @code{tabularx} or @code{tabulary}) the 11607@vindex org-latex-default-table-mode
10609width: 11608Nature of table's contents. It can be set to @code{table}, @code{math},
11609@code{inline-math} or @code{verbatim}. In particular, when in @code{math} or
11610@code{inline-math} mode, every cell is exported as-is, horizontal rules are
11611ignored and the table will be wrapped in a math environment. Also,
11612contiguous tables sharing the same math mode will be wrapped within the same
11613environment. Default mode is determined in
11614@code{org-latex-default-table-mode}.
11615@item :environment
11616@vindex org-latex-default-table-environment
11617Environment used for the table. It can be set to any @LaTeX{} table
11618environment, like @code{tabularx}@footnote{Requires adding the
11619@code{tabularx} package to @code{org-latex-packages-alist}.},
11620@code{longtable}, @code{array}, @code{tabu}@footnote{Requires adding the
11621@code{tabu} package to @code{org-latex-packages-alist}.},
11622@code{bmatrix}@enddots{} It defaults to
11623@code{org-latex-default-table-environment} value.
11624@item :caption
11625@code{#+CAPTION} keyword is the simplest way to set a caption for a table
11626(@pxref{Images and tables}). If you need more advanced commands for that
11627task, you can use @code{:caption} attribute instead. Its value should be raw
11628@LaTeX{} code. It has precedence over @code{#+CAPTION}.
11629@item :float
11630@itemx :placement
11631Float environment for the table. Possible values are @code{sidewaystable},
11632@code{multicolumn}, @code{t} and @code{nil}. When unspecified, a table with
11633a caption will have a @code{table} environment. Moreover, @code{:placement}
11634attribute can specify the positioning of the float.
11635@item :align
11636@itemx :font
11637@itemx :width
11638Set, respectively, the alignment string of the table, its font size and its
11639width. They only apply on regular tables.
11640@item :spread
11641Boolean specific to the @code{tabu} and @code{longtabu} environments, and
11642only takes effect when used in conjunction with the @code{:width} attribute.
11643When @code{:spread} is non-@code{nil}, the table will be spread or shrunk by the
11644value of @code{:width}.
11645@item :booktabs
11646@itemx :center
11647@itemx :rmlines
11648@vindex org-latex-tables-booktabs
11649@vindex org-latex-tables-centered
11650They toggle, respectively, @code{booktabs} usage (assuming the package is
11651properly loaded), table centering and removal of every horizontal rule but
11652the first one (in a "table.el" table only). In particular,
11653@code{org-latex-tables-booktabs} (respectively @code{org-latex-tables-centered})
11654activates the first (respectively second) attribute globally.
11655@item :math-prefix
11656@itemx :math-suffix
11657@itemx :math-arguments
11658A string that will be inserted, respectively, before the table within the
11659math environment, after the table within the math environment, and between
11660the macro name and the contents of the table. The @code{:math-arguments}
11661attribute is used for matrix macros that require more than one argument
11662(e.g., @code{qbordermatrix}).
11663@end table
11664
11665Thus, attributes can be used in a wide array of situations, like writing
11666a table that will span over multiple pages, or a matrix product:
10610 11667
10611@cindex #+CAPTION
10612@cindex #+LABEL
10613@cindex #+ATTR_LaTeX
10614@example 11668@example
10615#+CAPTION: A long table 11669#+ATTR_LATEX: :environment longtable :align l|lp@{3cm@}r|l
10616#+LABEL: tbl:long
10617#+ATTR_LaTeX: longtable align=l|lp@{3cm@}r|l
10618| ..... | ..... | 11670| ..... | ..... |
10619| ..... | ..... | 11671| ..... | ..... |
11672
11673#+ATTR_LATEX: :mode math :environment bmatrix :math-suffix \times
11674| a | b |
11675| c | d |
11676#+ATTR_LATEX: :mode math :environment bmatrix
11677| 1 | 2 |
11678| 3 | 4 |
10620@end example 11679@end example
10621 11680
10622or to specify a multicolumn table with @code{tabulary} 11681In the example below, @LaTeX{} command
11682@code{\bicaption@{HeadingA@}@{HeadingB@}} will set the caption.
10623 11683
10624@cindex #+CAPTION
10625@cindex #+LABEL
10626@cindex #+ATTR_LaTeX
10627@example 11684@example
10628#+CAPTION: A wide table with tabulary 11685#+ATTR_LATEX: :caption \bicaption@{HeadingA@}@{HeadingB@}
10629#+LABEL: tbl:wide
10630#+ATTR_LaTeX: table* tabulary width=\textwidth
10631| ..... | ..... | 11686| ..... | ..... |
10632| ..... | ..... | 11687| ..... | ..... |
10633@end example 11688@end example
10634 11689
10635@node Images in @LaTeX{} export, Beamer class export, Tables in @LaTeX{} export, @LaTeX{} and PDF export 11690
10636@subsection Images in @LaTeX{} export 11691@subsubheading Images in @LaTeX{} export
10637@cindex images, inline in @LaTeX{} 11692@cindex images, inline in @LaTeX{}
10638@cindex inlining images in @LaTeX{} 11693@cindex inlining images in @LaTeX{}
10639 11694
10640Images that are linked to without a description part in the link, like 11695Images that are linked to without a description part in the link, like
10641@samp{[[file:img.jpg]]} or @samp{[[./img.jpg]]} will be inserted into the PDF 11696@samp{[[file:img.jpg]]} or @samp{[[./img.jpg]]} will be inserted into the PDF
10642output file resulting from @LaTeX{} processing. Org will use an 11697output file resulting from @LaTeX{} processing. Org will use an
10643@code{\includegraphics} macro to insert the image. If you have specified a 11698@code{\includegraphics} macro to insert the image@footnote{In the case of
10644caption and/or a label as described in @ref{Images and tables}, the figure 11699TikZ (@url{http://sourceforge.net/projects/pgf/}) images, it will become an
10645will be wrapped into a @code{figure} environment and thus become a floating 11700@code{\input} macro wrapped within a @code{tikzpicture} environment.}.
10646element. You can use an @code{#+ATTR_LaTeX:} line to specify various other 11701
10647options. You can ask org to export an image as a float without specifying 11702You can specify specify image width or height with, respectively,
10648a label or a caption by using the keyword @code{float} in this line. Various 11703@code{:width} and @code{:height} attributes. It is also possible to add any
10649optional arguments to the @code{\includegraphics} macro can also be specified 11704other option with the @code{:options} attribute, as shown in the following
10650in this fashion. To modify the placement option of the floating environment, 11705example:
10651add something like @samp{placement=[h!]} to the attributes. It is to be noted
10652this option can be used with tables as well@footnote{One can also take
10653advantage of this option to pass other, unrelated options into the figure or
10654table environment. For an example see the section ``Exporting org files'' in
10655@url{http://orgmode.org/worg/org-hacks.html}}.
10656
10657If you would like to let text flow around the image, add the word @samp{wrap}
10658to the @code{#+ATTR_LaTeX:} line, which will make the figure occupy the left
10659half of the page. To fine-tune, the @code{placement} field will be the set
10660of additional arguments needed by the @code{wrapfigure} environment. Note
10661that if you change the size of the image, you need to use compatible settings
10662for @code{\includegraphics} and @code{wrapfigure}.
10663 11706
10664@cindex #+CAPTION
10665@cindex #+LABEL
10666@cindex #+ATTR_LaTeX
10667@example 11707@example
10668#+CAPTION: The black-body emission of the disk around HR 4049 11708#+ATTR_LATEX: :width 5cm :options angle=90
10669#+LABEL: fig:SED-HR4049
10670#+ATTR_LaTeX: width=5cm,angle=90
10671[[./img/sed-hr4049.pdf]] 11709[[./img/sed-hr4049.pdf]]
10672
10673#+ATTR_LaTeX: width=0.38\textwidth wrap placement=@{r@}@{0.4\textwidth@}
10674[[./img/hst.png]]
10675@end example 11710@end example
10676 11711
10677If you wish to include an image which spans multiple columns in a page, you 11712If you need a specific command for the caption, use @code{:caption}
10678can use the keyword @code{multicolumn} in the @code{#+ATTR_LaTeX} line. This 11713attribute. It will override standard @code{#+CAPTION} value, if any.
10679will export the image wrapped in a @code{figure*} environment.
10680
10681If you need references to a label created in this way, write
10682@samp{\ref@{fig:SED-HR4049@}} just like in @LaTeX{}.
10683
10684@node Beamer class export, , Images in @LaTeX{} export, @LaTeX{} and PDF export
10685@subsection Beamer class export
10686
10687The @LaTeX{} class @file{beamer} allows production of high quality presentations
10688using @LaTeX{} and pdf processing. Org mode has special support for turning an
10689Org mode file or tree into a @file{beamer} presentation.
10690
10691When the @LaTeX{} class for the current buffer (as set with @code{#+LaTeX_CLASS:
10692beamer}) or subtree (set with a @code{LaTeX_CLASS} property) is
10693@code{beamer}, a special export mode will turn the file or tree into a beamer
10694presentation. Any tree with not-too-deep level nesting should in principle be
10695exportable as a beamer presentation. By default, the top-level entries (or
10696the first level below the selected subtree heading) will be turned into
10697frames, and the outline structure below this level will become itemize lists.
10698You can also configure the variable @code{org-beamer-frame-level} to a
10699different level---then the hierarchy above frames will produce the sectioning
10700structure of the presentation.
10701 11714
10702A template for useful in-buffer settings or properties can be inserted into 11715@example
10703the buffer with @kbd{M-x org-insert-beamer-options-template}. Among other 11716#+ATTR_LATEX: :caption \bicaption@{HeadingA@}@{HeadingB@}
10704things, this will install a column view format which is very handy for 11717[[./img/sed-hr4049.pdf]]
10705editing special properties used by beamer. 11718@end example
10706
10707You can influence the structure of the presentation using the following
10708properties:
10709 11719
10710@table @code 11720If you have specified a caption as described in @ref{Images and tables}, the
10711@item BEAMER_env 11721picture will be wrapped into a @code{figure} environment and thus become
10712The environment that should be used to format this entry. Valid environments 11722a floating element. You can also ask Org to export an image as a float
10713are defined in the constant @code{org-beamer-environments-default}, and you 11723without specifying caption by setting the @code{:float} attribute. You may
10714can define more in @code{org-beamer-environments-extra}. If this property is 11724also set it to:
10715set, the entry will also get a @code{:B_environment:} tag to make this 11725@itemize @minus
10716visible. This tag has no semantic meaning, it is only a visual aid. 11726@item
10717@item BEAMER_envargs 11727@code{t}: if you want to use the standard @samp{figure} environment. It is
10718The beamer-special arguments that should be used for the environment, like 11728used by default if you provide a caption to the image.
10719@code{[t]} or @code{[<+->]} of @code{<2-3>}. If the @code{BEAMER_col} 11729@item
10720property is also set, something like @code{C[t]} can be added here as well to 11730@code{multicolumn}: if you wish to include an image which spans multiple
10721set an options argument for the implied @code{columns} environment. 11731columns in a page. This will export the image wrapped in a @code{figure*}
10722@code{c[t]} or @code{c<2->} will set an options for the implied @code{column}
10723environment. 11732environment.
10724@item BEAMER_col 11733@item
10725The width of a column that should start with this entry. If this property is 11734@code{wrap}: if you would like to let text flow around the image. It will
10726set, the entry will also get a @code{:BMCOL:} property to make this visible. 11735make the figure occupy the left half of the page.
10727Also this tag is only a visual aid. When this is a plain number, it will be 11736@item
10728interpreted as a fraction of @code{\textwidth}. Otherwise it will be assumed 11737@code{nil}: if you need to avoid any floating environment, even when
10729that you have specified the units, like @samp{3cm}. The first such property 11738a caption is provided.
10730in a frame will start a @code{columns} environment to surround the columns. 11739@end itemize
10731This environment is closed when an entry has a @code{BEAMER_col} property 11740@noindent
10732with value 0 or 1, or automatically at the end of the frame. 11741To modify the placement option of any floating environment, set the
10733@item BEAMER_extra 11742@code{placement} attribute.
10734Additional commands that should be inserted after the environment has been
10735opened. For example, when creating a frame, this can be used to specify
10736transitions.
10737@end table
10738
10739Frames will automatically receive a @code{fragile} option if they contain
10740source code that uses the verbatim environment. Special @file{beamer}
10741specific code can be inserted using @code{#+BEAMER:} and
10742@code{#+BEGIN_BEAMER...#+END_BEAMER} constructs, similar to other export
10743backends, but with the difference that @code{#+LaTeX:} stuff will be included
10744in the presentation as well.
10745
10746Outline nodes with @code{BEAMER_env} property value @samp{note} or
10747@samp{noteNH} will be formatted as beamer notes, i,e, they will be wrapped
10748into @code{\note@{...@}}. The former will include the heading as part of the
10749note text, the latter will ignore the heading of that node. To simplify note
10750generation, it is actually enough to mark the note with a @emph{tag} (either
10751@code{:B_note:} or @code{:B_noteNH:}) instead of creating the
10752@code{BEAMER_env} property.
10753
10754You can turn on a special minor mode @code{org-beamer-mode} for editing
10755support with
10756 11743
10757@example 11744@example
10758#+STARTUP: beamer 11745#+ATTR_LATEX: :float wrap :width 0.38\textwidth :placement @{r@}@{0.4\textwidth@}
11746[[./img/hst.png]]
10759@end example 11747@end example
10760 11748
10761@table @kbd 11749If the @code{:comment-include} attribute is set to a non-@code{nil} value,
10762@orgcmd{C-c C-b,org-beamer-select-environment} 11750the @LaTeX{} @code{\includegraphics} macro will be commented out.
10763In @code{org-beamer-mode}, this key offers fast selection of a beamer
10764environment or the @code{BEAMER_col} property.
10765@end table
10766
10767Column view provides a great way to set the environment of a node and other
10768important parameters. Make sure you are using a COLUMN format that is geared
10769toward this special purpose. The command @kbd{M-x
10770org-insert-beamer-options-template} defines such a format.
10771
10772Here is a simple example Org document that is intended for beamer export.
10773
10774@smallexample
10775#+LaTeX_CLASS: beamer
10776#+TITLE: Example Presentation
10777#+AUTHOR: Carsten Dominik
10778#+LaTeX_CLASS_OPTIONS: [presentation]
10779#+BEAMER_FRAME_LEVEL: 2
10780#+BEAMER_HEADER_EXTRA: \usetheme@{Madrid@}\usecolortheme@{default@}
10781#+COLUMNS: %35ITEM %10BEAMER_env(Env) %10BEAMER_envargs(Args) %4BEAMER_col(Col) %8BEAMER_extra(Ex)
10782
10783* This is the first structural section
10784
10785** Frame 1 \\ with a subtitle
10786*** Thanks to Eric Fraga :BMCOL:B_block:
10787 :PROPERTIES:
10788 :BEAMER_env: block
10789 :BEAMER_envargs: C[t]
10790 :BEAMER_col: 0.5
10791 :END:
10792 for the first viable beamer setup in Org
10793*** Thanks to everyone else :BMCOL:B_block:
10794 :PROPERTIES:
10795 :BEAMER_col: 0.5
10796 :BEAMER_env: block
10797 :BEAMER_envargs: <2->
10798 :END:
10799 for contributing to the discussion
10800**** This will be formatted as a beamer note :B_note:
10801** Frame 2 \\ where we will not use columns
10802*** Request :B_block:
10803 Please test this stuff!
10804 :PROPERTIES:
10805 :BEAMER_env: block
10806 :END:
10807@end smallexample
10808
10809For more information, see the documentation on Worg.
10810 11751
10811@node DocBook export, OpenDocument Text export, @LaTeX{} and PDF export, Exporting 11752@subsubheading Plain lists in @LaTeX{} export
10812@section DocBook export 11753@cindex plain lists, in @LaTeX{} export
10813@cindex DocBook export
10814@cindex PDF export
10815@cindex Cui, Baoqiu
10816 11754
10817Org contains a DocBook exporter written by Baoqiu Cui. Once an Org file is 11755Plain lists accept two optional attributes: @code{:environment} and
10818exported to DocBook format, it can be further processed to produce other 11756@code{:options}. The first one allows the use of a non-standard
10819formats, including PDF, HTML, man pages, etc., using many available DocBook 11757environment (e.g., @samp{inparaenum}). The second one specifies
10820tools and stylesheets. 11758optional arguments for that environment (square brackets may be
11759omitted).
10821 11760
10822Currently DocBook exporter only supports DocBook V5.0. 11761@example
11762#+ATTR_LATEX: :environment compactitem :options $\circ$
11763- you need ``paralist'' package to reproduce this example.
11764@end example
10823 11765
10824@menu 11766@subsubheading Source blocks in @LaTeX{} export
10825* DocBook export commands:: How to invoke DocBook export 11767@cindex source blocks, in @LaTeX{} export
10826* Quoting DocBook code:: Incorporating DocBook code in Org files
10827* Recursive sections:: Recursive sections in DocBook
10828* Tables in DocBook export:: Tables are exported as HTML tables
10829* Images in DocBook export:: How to insert figures into DocBook output
10830* Special characters:: How to handle special characters
10831@end menu
10832 11768
10833@node DocBook export commands, Quoting DocBook code, DocBook export, DocBook export 11769In addition to syntax defined in @ref{Literal examples}, names and captions
10834@subsection DocBook export commands 11770(@pxref{Images and tables}), source blocks also accept a @code{:float}
11771attribute. You may set it to:
11772@itemize @minus
11773@item
11774@code{t}: if you want to make the source block a float. It is the default
11775value when a caption is provided.
11776@item
11777@code{mulicolumn}: if you wish to include a source block which spans multiple
11778colums in a page.
11779@item
11780@code{nil}: if you need to avoid any floating evironment, even when a caption
11781is provided. It is useful for source code that may not fit in a single page.
11782@end itemize
10835 11783
10836@cindex region, active 11784@example
10837@cindex active region 11785#+ATTR_LATEX: :float nil
10838@cindex transient-mark-mode 11786#+BEGIN_SRC emacs-lisp
10839@table @kbd 11787Code that may not fit in a single page.
10840@orgcmd{C-c C-e D,org-export-as-docbook} 11788#+END_SRC
10841@cindex property EXPORT_FILE_NAME 11789@end example
10842Export as a DocBook file. For an Org file, @file{myfile.org}, the DocBook XML
10843file will be @file{myfile.xml}. The file will be overwritten without
10844warning. If there is an active region@footnote{This requires
10845@code{transient-mark-mode} to be turned on}, only the region will be
10846exported. If the selected region is a single tree@footnote{To select the
10847current subtree, use @kbd{C-c @@}.}, the tree head will become the document
10848title. If the tree head entry has, or inherits, an @code{EXPORT_FILE_NAME}
10849property, that name will be used for the export.
10850@orgcmd{C-c C-e V,org-export-as-docbook-pdf-and-open}
10851Export as a DocBook file, process to PDF, then open the resulting PDF file.
10852
10853@vindex org-export-docbook-xslt-proc-command
10854@vindex org-export-docbook-xsl-fo-proc-command
10855Note that, in order to produce PDF output based on an exported DocBook file,
10856you need to have XSLT processor and XSL-FO processor software installed on your
10857system. Check variables @code{org-export-docbook-xslt-proc-command} and
10858@code{org-export-docbook-xsl-fo-proc-command}.
10859
10860@vindex org-export-docbook-xslt-stylesheet
10861The stylesheet argument @code{%s} in variable
10862@code{org-export-docbook-xslt-proc-command} is replaced by the value of
10863variable @code{org-export-docbook-xslt-stylesheet}, which needs to be set by
10864the user. You can also overrule this global setting on a per-file basis by
10865adding an in-buffer setting @code{#+XSLT:} to the Org file.
10866
10867@orgkey{C-c C-e v D}
10868Export only the visible part of the document.
10869@end table
10870 11790
10871@node Quoting DocBook code, Recursive sections, DocBook export commands, DocBook export 11791@subsubheading Special blocks in @LaTeX{} export
10872@subsection Quoting DocBook code 11792@cindex special blocks, in @LaTeX{} export
10873 11793
10874You can quote DocBook code in Org files and copy it verbatim into exported 11794In @LaTeX{} back-end, special blocks become environments of the same name.
10875DocBook file with the following constructs: 11795Value of @code{:options} attribute will be appended as-is to that
11796environment's opening string. For example:
10876 11797
10877@cindex #+DOCBOOK
10878@cindex #+BEGIN_DOCBOOK
10879@example 11798@example
10880#+DOCBOOK: Literal DocBook code for export 11799#+ATTR_LATEX: :options [Proof of important theorem]
11800#+BEGIN_PROOF
11801...
11802Therefore, any even number greater than 2 is the sum of two primes.
11803#+END_PROOF
10881@end example 11804@end example
10882 11805
10883@noindent or 11806@noindent
10884@cindex #+BEGIN_DOCBOOK 11807becomes
10885 11808
10886@example 11809@example
10887#+BEGIN_DOCBOOK 11810\begin@{proof@}[Proof of important theorem]
10888All lines between these markers are exported by DocBook exporter 11811...
10889literally. 11812Therefore, any even number greater than 2 is the sum of two primes.
10890#+END_DOCBOOK 11813\end@{proof@}
10891@end example 11814@end example
10892 11815
10893For example, you can use the following lines to include a DocBook warning 11816If you need to insert a specific caption command, use @code{:caption}
10894admonition. As to what this warning says, you should pay attention to the 11817attribute. It will override standard @code{#+CAPTION} value, if any. For
10895document context when quoting DocBook code in Org files. You may make 11818example:
10896exported DocBook XML files invalid by not quoting DocBook code correctly.
10897 11819
10898@example 11820@example
10899#+BEGIN_DOCBOOK 11821#+ATTR_LATEX: :caption \MyCaption@{HeadingA@}
10900<warning> 11822#+BEGIN_PROOF
10901 <para>You should know what you are doing when quoting DocBook XML code 11823...
10902 in your Org file. Invalid DocBook XML may be generated by 11824#+END_PROOF
10903 DocBook exporter if you are not careful!</para>
10904</warning>
10905#+END_DOCBOOK
10906@end example 11825@end example
10907 11826
10908@node Recursive sections, Tables in DocBook export, Quoting DocBook code, DocBook export 11827@subsubheading Horizontal rules
10909@subsection Recursive sections 11828@cindex horizontal rules, in @LaTeX{} export
10910@cindex DocBook recursive sections
10911
10912DocBook exporter exports Org files as articles using the @code{article}
10913element in DocBook. Recursive sections, i.e., @code{section} elements, are
10914used in exported articles. Top level headlines in Org files are exported as
10915top level sections, and lower level headlines are exported as nested
10916sections. The entire structure of Org files will be exported completely, no
10917matter how many nested levels of headlines there are.
10918
10919Using recursive sections makes it easy to port and reuse exported DocBook
10920code in other DocBook document types like @code{book} or @code{set}.
10921 11829
10922@node Tables in DocBook export, Images in DocBook export, Recursive sections, DocBook export 11830Width and thickness of a given horizontal rule can be controlled with,
10923@subsection Tables in DocBook export 11831respectively, @code{:width} and @code{:thickness} attributes:
10924@cindex tables, in DocBook export
10925 11832
10926Tables in Org files are exported as HTML tables, which have been supported since
10927DocBook V4.3.
10928
10929If a table does not have a caption, an informal table is generated using the
10930@code{informaltable} element; otherwise, a formal table will be generated
10931using the @code{table} element.
10932
10933@node Images in DocBook export, Special characters, Tables in DocBook export, DocBook export
10934@subsection Images in DocBook export
10935@cindex images, inline in DocBook
10936@cindex inlining images in DocBook
10937
10938Images that are linked to without a description part in the link, like
10939@samp{[[file:img.jpg]]} or @samp{[[./img.jpg]]}, will be exported to DocBook
10940using @code{mediaobject} elements. Each @code{mediaobject} element contains
10941an @code{imageobject} that wraps an @code{imagedata} element. If you have
10942specified a caption for an image as described in @ref{Images and tables}, a
10943@code{caption} element will be added in @code{mediaobject}. If a label is
10944also specified, it will be exported as an @code{xml:id} attribute of the
10945@code{mediaobject} element.
10946
10947@vindex org-export-docbook-default-image-attributes
10948Image attributes supported by the @code{imagedata} element, like @code{align}
10949or @code{width}, can be specified in two ways: you can either customize
10950variable @code{org-export-docbook-default-image-attributes} or use the
10951@code{#+ATTR_DOCBOOK:} line. Attributes specified in variable
10952@code{org-export-docbook-default-image-attributes} are applied to all inline
10953images in the Org file to be exported (unless they are overridden by image
10954attributes specified in @code{#+ATTR_DOCBOOK:} lines).
10955
10956The @code{#+ATTR_DOCBOOK:} line can be used to specify additional image
10957attributes or override default image attributes for individual images. If
10958the same attribute appears in both the @code{#+ATTR_DOCBOOK:} line and
10959variable @code{org-export-docbook-default-image-attributes}, the former
10960takes precedence. Here is an example about how image attributes can be
10961set:
10962
10963@cindex #+CAPTION
10964@cindex #+LABEL
10965@cindex #+ATTR_DOCBOOK
10966@example 11833@example
10967#+CAPTION: The logo of Org mode 11834#+ATTR_LATEX: :width .6\textwidth :thickness 0.8pt
10968#+LABEL: unicorn-svg 11835-----
10969#+ATTR_DOCBOOK: scalefit="1" width="100%" depth="100%"
10970[[./img/org-mode-unicorn.svg]]
10971@end example 11836@end example
10972 11837
10973@vindex org-export-docbook-inline-image-extensions 11838@node Markdown export, OpenDocument Text export, @LaTeX{} and PDF export, Exporting
10974By default, DocBook exporter recognizes the following image file types: 11839@section Markdown export
10975@file{jpeg}, @file{jpg}, @file{png}, @file{gif}, and @file{svg}. You can 11840@cindex Markdown export
10976customize variable @code{org-export-docbook-inline-image-extensions} to add
10977more types to this list as long as DocBook supports them.
10978 11841
10979@node Special characters, , Images in DocBook export, DocBook export 11842@code{md} export back-end generates Markdown syntax@footnote{Vanilla flavour,
10980@subsection Special characters in DocBook export 11843as defined at @url{http://daringfireball.net/projects/markdown/}.} for an Org
10981@cindex Special characters in DocBook export 11844mode buffer.
10982 11845
10983@vindex org-export-docbook-doctype 11846It is built over HTML back-end: any construct not supported by Markdown
10984@vindex org-entities 11847syntax (e.g., tables) will be controlled and translated by @code{html}
10985Special characters that are written in @TeX{}-like syntax, such as @code{\alpha}, 11848back-end (@pxref{HTML export}).
10986@code{\Gamma}, and @code{\Zeta}, are supported by DocBook exporter. These
10987characters are rewritten to XML entities, like @code{&alpha;},
10988@code{&Gamma;}, and @code{&Zeta;}, based on the list saved in variable
10989@code{org-entities}. As long as the generated DocBook file includes the
10990corresponding entities, these special characters are recognized.
10991 11849
10992You can customize variable @code{org-export-docbook-doctype} to include the 11850@subheading Markdown export commands
10993entities you need. For example, you can set variable
10994@code{org-export-docbook-doctype} to the following value to recognize all
10995special characters included in XHTML entities:
10996 11851
10997@example 11852@table @kbd
10998"<!DOCTYPE article [ 11853@orgcmd{C-c C-e m m,org-md-export-to-markdown}
10999<!ENTITY % xhtml1-symbol PUBLIC 11854Export as a text file written in Markdown syntax. For an Org file,
11000\"-//W3C//ENTITIES Symbol for HTML//EN//XML\" 11855@file{myfile.org}, the resulting file will be @file{myfile.md}. The file
11001\"http://www.w3.org/2003/entities/2007/xhtml1-symbol.ent\" 11856will be overwritten without warning.
11002> 11857@orgcmd{C-c C-e m M,org-md-export-as-markdown}
11003%xhtml1-symbol; 11858Export to a temporary buffer. Do not create a file.
11004]> 11859@item C-c C-e m o
11005" 11860Export as a text file with Markdown syntax, then open it.
11006@end example 11861@end table
11862
11863@subheading Header and sectioning structure
11864
11865@vindex org-md-headline-style
11866Markdown export can generate both @code{atx} and @code{setext} types for
11867headlines, according to @code{org-md-headline-style}. The former introduces
11868a hard limit of two levels, whereas the latter pushes it to six. Headlines
11869below that limit are exported as lists. You can also set a soft limit before
11870that one (@pxref{Export settings}).
11007 11871
11008@c begin opendocument 11872@c begin opendocument
11009 11873
11010@node OpenDocument Text export, TaskJuggler export, DocBook export, Exporting 11874@node OpenDocument Text export, iCalendar export, Markdown export, Exporting
11011@section OpenDocument Text export 11875@section OpenDocument Text export
11012@cindex K, Jambunathan
11013@cindex ODT 11876@cindex ODT
11014@cindex OpenDocument 11877@cindex OpenDocument
11015@cindex export, OpenDocument 11878@cindex export, OpenDocument
11016@cindex LibreOffice 11879@cindex LibreOffice
11017@cindex org-odt.el
11018@cindex org-modules
11019 11880
11020Org Mode@footnote{Versions 7.8 or later} supports export to OpenDocument Text 11881Org mode@footnote{Versions 7.8 or later} supports export to OpenDocument Text
11021(ODT) format using the @file{org-odt.el} module. Documents created 11882(ODT) format. Documents created by this exporter use the
11022by this exporter use the @cite{OpenDocument-v1.2 11883@cite{OpenDocument-v1.2
11023specification}@footnote{@url{http://docs.oasis-open.org/office/v1.2/OpenDocument-v1.2.html, 11884specification}@footnote{@url{http://docs.oasis-open.org/office/v1.2/OpenDocument-v1.2.html,
11024Open Document Format for Office Applications (OpenDocument) Version 1.2}} and 11885Open Document Format for Office Applications (OpenDocument) Version 1.2}} and
11025are compatible with LibreOffice 3.4. 11886are compatible with LibreOffice 3.4.
@@ -11054,14 +11915,14 @@ output. Check the availability of this program before proceeding further.
11054@cindex active region 11915@cindex active region
11055@cindex transient-mark-mode 11916@cindex transient-mark-mode
11056@table @kbd 11917@table @kbd
11057@orgcmd{C-c C-e o,org-export-as-odt} 11918@orgcmd{C-c C-e o o,org-odt-export-to-odt}
11058@cindex property EXPORT_FILE_NAME 11919@cindex property EXPORT_FILE_NAME
11059 11920
11060Export as OpenDocument Text file. 11921Export as OpenDocument Text file.
11061 11922
11062@vindex org-export-odt-preferred-output-format 11923@vindex org-odt-preferred-output-format
11063If @code{org-export-odt-preferred-output-format} is specified, automatically 11924If @code{org-odt-preferred-output-format} is specified, automatically convert
11064convert the exported file to that format. @xref{x-export-to-other-formats, , 11925the exported file to that format. @xref{x-export-to-other-formats, ,
11065Automatically exporting to other formats}. 11926Automatically exporting to other formats}.
11066 11927
11067For an Org file @file{myfile.org}, the ODT file will be 11928For an Org file @file{myfile.org}, the ODT file will be
@@ -11073,13 +11934,13 @@ tree head will become the document title. If the tree head entry has, or
11073inherits, an @code{EXPORT_FILE_NAME} property, that name will be used for the 11934inherits, an @code{EXPORT_FILE_NAME} property, that name will be used for the
11074export. 11935export.
11075 11936
11076@orgcmd{C-c C-e O,org-export-as-odt-and-open} 11937@kbd{C-c C-e o O}
11077Export as an OpenDocument Text file and open the resulting file. 11938Export as an OpenDocument Text file and open the resulting file.
11078 11939
11079@vindex org-export-odt-preferred-output-format 11940@vindex org-odt-preferred-output-format
11080If @code{org-export-odt-preferred-output-format} is specified, open the 11941If @code{org-odt-preferred-output-format} is specified, open the converted
11081converted file instead. @xref{x-export-to-other-formats, , Automatically 11942file instead. @xref{x-export-to-other-formats, , Automatically exporting to
11082exporting to other formats}. 11943other formats}.
11083@end table 11944@end table
11084 11945
11085@node Extending ODT export, Applying custom styles, ODT export commands, OpenDocument Text export 11946@node Extending ODT export, Applying custom styles, ODT export commands, OpenDocument Text export
@@ -11095,7 +11956,7 @@ one format (say @samp{csv}) to another format (say @samp{ods} or @samp{xls}).
11095If you have a working installation of LibreOffice, a document converter is 11956If you have a working installation of LibreOffice, a document converter is
11096pre-configured for you and you can use it right away. If you would like to 11957pre-configured for you and you can use it right away. If you would like to
11097use @file{unoconv} as your preferred converter, customize the variable 11958use @file{unoconv} as your preferred converter, customize the variable
11098@code{org-export-odt-convert-process} to point to @code{unoconv}. You can 11959@code{org-odt-convert-process} to point to @code{unoconv}. You can
11099also use your own favorite converter or tweak the default settings of the 11960also use your own favorite converter or tweak the default settings of the
11100@file{LibreOffice} and @samp{unoconv} converters. @xref{Configuring a 11961@file{LibreOffice} and @samp{unoconv} converters. @xref{Configuring a
11101document converter}. 11962document converter}.
@@ -11103,12 +11964,12 @@ document converter}.
11103@subsubsection Automatically exporting to other formats 11964@subsubsection Automatically exporting to other formats
11104@anchor{x-export-to-other-formats} 11965@anchor{x-export-to-other-formats}
11105 11966
11106@vindex org-export-odt-preferred-output-format 11967@vindex org-odt-preferred-output-format
11107Very often, you will find yourself exporting to ODT format, only to 11968Very often, you will find yourself exporting to ODT format, only to
11108immediately save the exported document to other formats like @samp{doc}, 11969immediately save the exported document to other formats like @samp{doc},
11109@samp{docx}, @samp{rtf}, @samp{pdf} etc. In such cases, you can specify your 11970@samp{docx}, @samp{rtf}, @samp{pdf} etc. In such cases, you can specify your
11110preferred output format by customizing the variable 11971preferred output format by customizing the variable
11111@code{org-export-odt-preferred-output-format}. This way, the export commands 11972@code{org-odt-preferred-output-format}. This way, the export commands
11112(@pxref{x-export-to-odt,,Exporting to ODT}) can be extended to export to a 11973(@pxref{x-export-to-odt,,Exporting to ODT}) can be extended to export to a
11113format that is of immediate interest to you. 11974format that is of immediate interest to you.
11114 11975
@@ -11121,10 +11982,10 @@ ODT format. LibreOffice converter, mentioned above, is one such
11121converter. Once a converter is configured, you can interact with it using 11982converter. Once a converter is configured, you can interact with it using
11122the following command. 11983the following command.
11123 11984
11124@vindex org-export-odt-convert 11985@vindex org-odt-convert
11125@table @kbd 11986@table @kbd
11126 11987
11127@item M-x org-export-odt-convert 11988@item M-x org-odt-convert RET
11128Convert an existing document from one format to another. With a prefix 11989Convert an existing document from one format to another. With a prefix
11129argument, also open the newly produced file. 11990argument, also open the newly produced file.
11130@end table 11991@end table
@@ -11161,8 +12022,8 @@ OpenDocument Text (@file{.odt}) or OpenDocument Template (@file{.ott}) file.
11161 12022
11162@item 12023@item
11163@cindex #+ODT_STYLES_FILE 12024@cindex #+ODT_STYLES_FILE
11164@vindex org-export-odt-styles-file 12025@vindex org-odt-styles-file
11165Customize the variable @code{org-export-odt-styles-file} and point it to the 12026Customize the variable @code{org-odt-styles-file} and point it to the
11166newly created file. For additional configuration options 12027newly created file. For additional configuration options
11167@pxref{x-overriding-factory-styles,,Overriding factory styles}. 12028@pxref{x-overriding-factory-styles,,Overriding factory styles}.
11168 12029
@@ -11192,7 +12053,7 @@ the factory settings.
11192 12053
11193@node Links in ODT export, Tables in ODT export, Applying custom styles, OpenDocument Text export 12054@node Links in ODT export, Tables in ODT export, Applying custom styles, OpenDocument Text export
11194@subsection Links in ODT export 12055@subsection Links in ODT export
11195@cindex tables, in DocBook export 12056@cindex links, in ODT export
11196 12057
11197ODT exporter creates native cross-references for internal links. It creates 12058ODT exporter creates native cross-references for internal links. It creates
11198Internet-style links for all other links. 12059Internet-style links for all other links.
@@ -11206,7 +12067,7 @@ with a cross-reference and sequence number of the labeled entity.
11206 12067
11207@node Tables in ODT export, Images in ODT export, Links in ODT export, OpenDocument Text export 12068@node Tables in ODT export, Images in ODT export, Links in ODT export, OpenDocument Text export
11208@subsection Tables in ODT export 12069@subsection Tables in ODT export
11209@cindex tables, in DocBook export 12070@cindex tables, in ODT export
11210 12071
11211Export of native Org mode tables (@pxref{Tables}) and simple @file{table.el} 12072Export of native Org mode tables (@pxref{Tables}) and simple @file{table.el}
11212tables is supported. However, export of complex @file{table.el} tables---tables 12073tables is supported. However, export of complex @file{table.el} tables---tables
@@ -11285,17 +12146,17 @@ You can control the size and scale of the embedded images using the
11285@code{#+ATTR_ODT} attribute. 12146@code{#+ATTR_ODT} attribute.
11286 12147
11287@cindex identify, ImageMagick 12148@cindex identify, ImageMagick
11288@vindex org-export-odt-pixels-per-inch 12149@vindex org-odt-pixels-per-inch
11289The exporter specifies the desired size of the image in the final document in 12150The exporter specifies the desired size of the image in the final document in
11290units of centimeters. In order to scale the embedded images, the exporter 12151units of centimeters. In order to scale the embedded images, the exporter
11291queries for pixel dimensions of the images using one of a) ImageMagick's 12152queries for pixel dimensions of the images using one of a) ImageMagick's
11292@file{identify} program or b) Emacs `create-image' and `image-size' 12153@file{identify} program or b) Emacs `create-image' and `image-size'
11293APIs.@footnote{Use of @file{ImageMagick} is only desirable. However, if you 12154APIs@footnote{Use of @file{ImageMagick} is only desirable. However, if you
11294routinely produce documents that have large images or you export your Org 12155routinely produce documents that have large images or you export your Org
11295files that has images using a Emacs batch script, then the use of 12156files that has images using a Emacs batch script, then the use of
11296@file{ImageMagick} is mandatory.} The pixel dimensions are subsequently 12157@file{ImageMagick} is mandatory.}. The pixel dimensions are subsequently
11297converted in to units of centimeters using 12158converted in to units of centimeters using
11298@code{org-export-odt-pixels-per-inch}. The default value of this variable is 12159@code{org-odt-pixels-per-inch}. The default value of this variable is
11299set to @code{display-pixels-per-inch}. You can tweak this variable to 12160set to @code{display-pixels-per-inch}. You can tweak this variable to
11300achieve the best results. 12161achieve the best results.
11301 12162
@@ -11404,27 +12265,34 @@ You can use the following commands to quickly verify the reliability of
11404the @LaTeX{}-to-MathML converter. 12265the @LaTeX{}-to-MathML converter.
11405 12266
11406@table @kbd 12267@table @kbd
11407 12268@item M-x org-odt-export-as-odf RET
11408@item M-x org-export-as-odf
11409Convert a @LaTeX{} math snippet to an OpenDocument formula (@file{.odf}) file. 12269Convert a @LaTeX{} math snippet to an OpenDocument formula (@file{.odf}) file.
11410 12270
11411@item M-x org-export-as-odf-and-open 12271@item M-x org-odt-export-as-odf-and-open RET
11412Convert a @LaTeX{} math snippet to an OpenDocument formula (@file{.odf}) file 12272Convert a @LaTeX{} math snippet to an OpenDocument formula (@file{.odf}) file
11413and open the formula file with the system-registered application. 12273and open the formula file with the system-registered application.
11414@end table 12274@end table
11415 12275
11416@cindex dvipng 12276@cindex dvipng
12277@cindex imagemagick
11417@item PNG images 12278@item PNG images
11418 12279
11419This option is activated on a per-file basis with 12280This option is activated on a per-file basis with
11420 12281
11421@example 12282@example
11422#+OPTIONS: LaTeX:dvipng 12283#+OPTIONS: tex:dvipng
12284@end example
12285
12286or:
12287
12288@example
12289#+OPTIONS: tex:imagemagick
11423@end example 12290@end example
11424 12291
11425With this option, @LaTeX{} fragments are processed into PNG images and the 12292With this option, @LaTeX{} fragments are processed into PNG images and the
11426resulting images are embedded in the exported document. This method requires 12293resulting images are embedded in the exported document. This method requires
11427that the @file{dvipng} program be available on your system. 12294that the @file{dvipng} program or @file{imagemagick} suite be available on
12295your system.
11428@end enumerate 12296@end enumerate
11429 12297
11430@node Working with MathML or OpenDocument formula files, , Working with @LaTeX{} math snippets, Math formatting in ODT export 12298@node Working with MathML or OpenDocument formula files, , Working with @LaTeX{} math snippets, Math formatting in ODT export
@@ -11471,15 +12339,15 @@ It could be rendered as shown below in the exported document.
11471Figure 2: Bell curve 12339Figure 2: Bell curve
11472@end example 12340@end example
11473 12341
11474@vindex org-export-odt-category-strings 12342@vindex org-odt-category-map-alist
11475You can modify the category component of the caption by customizing the 12343You can modify the category component of the caption by customizing the
11476variable @code{org-export-odt-category-strings}. For example, to tag all 12344option @code{org-odt-category-map-alist}. For example, to tag all embedded
11477embedded images with the string @samp{Illustration} (instead of the default 12345images with the string @samp{Illustration} (instead of the default
11478@samp{Figure}) use the following setting. 12346@samp{Figure}) use the following setting:
11479 12347
11480@lisp 12348@lisp
11481(setq org-export-odt-category-strings 12349(setq org-odt-category-map-alist
11482 '(("en" "Table" "Illustration" "Equation" "Equation"))) 12350 (("__Figure__" "Illustration" "value" "Figure" org-odt--enumerable-image-p)))
11483@end lisp 12351@end lisp
11484 12352
11485With this, previous image will be captioned as below in the exported 12353With this, previous image will be captioned as below in the exported
@@ -11500,14 +12368,14 @@ fontification to be turned on.} The auto-generated styles have @samp{OrgSrc}
11500as prefix and inherit their color from the faces used by Emacs 12368as prefix and inherit their color from the faces used by Emacs
11501@code{font-lock} library for the source language. 12369@code{font-lock} library for the source language.
11502 12370
11503@vindex org-export-odt-fontify-srcblocks 12371@vindex org-odt-fontify-srcblocks
11504If you prefer to use your own custom styles for fontification, you can do so 12372If you prefer to use your own custom styles for fontification, you can do
11505by customizing the variable 12373so by customizing the option
11506@code{org-export-odt-create-custom-styles-for-srcblocks}. 12374@code{org-odt-create-custom-styles-for-srcblocks}.
11507 12375
11508@vindex org-export-odt-create-custom-styles-for-srcblocks 12376@vindex org-odt-create-custom-styles-for-srcblocks
11509You can turn off fontification of literal examples by customizing the 12377You can turn off fontification of literal examples by customizing the
11510variable @code{org-export-odt-fontify-srcblocks}. 12378option @code{org-odt-fontify-srcblocks}.
11511 12379
11512@node Advanced topics in ODT export, , Literal examples in ODT export, OpenDocument Text export 12380@node Advanced topics in ODT export, , Literal examples in ODT export, OpenDocument Text export
11513@subsection Advanced topics in ODT export 12381@subsection Advanced topics in ODT export
@@ -11538,27 +12406,27 @@ like to tweak the default converter settings, proceed as below.
11538@enumerate 12406@enumerate
11539@item Register the converter 12407@item Register the converter
11540 12408
11541@vindex org-export-odt-convert-processes 12409@vindex org-odt-convert-processes
11542Name your converter and add it to the list of known converters by customizing 12410Name your converter and add it to the list of known converters by
11543the variable @code{org-export-odt-convert-processes}. Also specify how the 12411customizing the option @code{org-odt-convert-processes}. Also specify how
11544converter can be invoked via command-line to effect the conversion. 12412the converter can be invoked via command-line to effect the conversion.
11545 12413
11546@item Configure its capabilities 12414@item Configure its capabilities
11547 12415
11548@vindex org-export-odt-convert-capabilities 12416@vindex org-odt-convert-capabilities
11549@anchor{x-odt-converter-capabilities} 12417@anchor{x-odt-converter-capabilities} Specify the set of formats the
11550Specify the set of formats the converter can handle by customizing the 12418converter can handle by customizing the variable
11551variable @code{org-export-odt-convert-capabilities}. Use the default value 12419@code{org-odt-convert-capabilities}. Use the default value for this
11552for this variable as a guide for configuring your converter. As suggested by 12420variable as a guide for configuring your converter. As suggested by the
11553the default setting, you can specify the full set of formats supported by the 12421default setting, you can specify the full set of formats supported by the
11554converter and not limit yourself to specifying formats that are related to 12422converter and not limit yourself to specifying formats that are related to
11555just the OpenDocument Text format. 12423just the OpenDocument Text format.
11556 12424
11557@item Choose the converter 12425@item Choose the converter
11558 12426
11559@vindex org-export-odt-convert-process 12427@vindex org-odt-convert-process
11560Select the newly added converter as the preferred one by customizing the 12428Select the newly added converter as the preferred one by customizing the
11561variable @code{org-export-odt-convert-process}. 12429option @code{org-odt-convert-process}.
11562@end enumerate 12430@end enumerate
11563 12431
11564@node Working with OpenDocument style files, Creating one-off styles, Configuring a document converter, Advanced topics in ODT export 12432@node Working with OpenDocument style files, Creating one-off styles, Configuring a document converter, Advanced topics in ODT export
@@ -11626,9 +12494,9 @@ customize these variables to override the factory styles used by the
11626exporter. 12494exporter.
11627 12495
11628@itemize 12496@itemize
11629@anchor{x-org-export-odt-styles-file} 12497@anchor{x-org-odt-styles-file}
11630@item 12498@item
11631@code{org-export-odt-styles-file} 12499@code{org-odt-styles-file}
11632 12500
11633Use this variable to specify the @file{styles.xml} that will be used in the 12501Use this variable to specify the @file{styles.xml} that will be used in the
11634final output. You can specify one of the following values: 12502final output. You can specify one of the following values:
@@ -11657,9 +12525,9 @@ like header and footer images.
11657Use the default @file{styles.xml} 12525Use the default @file{styles.xml}
11658@end enumerate 12526@end enumerate
11659 12527
11660@anchor{x-org-export-odt-content-template-file} 12528@anchor{x-org-odt-content-template-file}
11661@item 12529@item
11662@code{org-export-odt-content-template-file} 12530@code{org-odt-content-template-file}
11663 12531
11664Use this variable to specify the blank @file{content.xml} that will be used 12532Use this variable to specify the blank @file{content.xml} that will be used
11665in the final output. 12533in the final output.
@@ -11709,7 +12577,7 @@ custom @samp{PageBreak} style as shown below.
11709 12577
11710@example 12578@example
11711<style:style style:name="PageBreak" style:family="paragraph" 12579<style:style style:name="PageBreak" style:family="paragraph"
11712 style:parent-style-name="Text_20_body"> 12580 style:parent-style-name="Text_20_body">
11713 <style:paragraph-properties fo:break-before="page"/> 12581 <style:paragraph-properties fo:break-before="page"/>
11714</style:style> 12582</style:style>
11715@end example 12583@end example
@@ -11746,22 +12614,21 @@ OpenDocument-v1.2
11746specification.@footnote{@url{http://docs.oasis-open.org/office/v1.2/OpenDocument-v1.2.html, 12614specification.@footnote{@url{http://docs.oasis-open.org/office/v1.2/OpenDocument-v1.2.html,
11747OpenDocument-v1.2 Specification}} 12615OpenDocument-v1.2 Specification}}
11748 12616
11749
11750
11751@subsubheading Custom table styles: an illustration 12617@subsubheading Custom table styles: an illustration
11752 12618
11753To have a quick preview of this feature, install the below setting and export 12619@vindex org-odt-table-styles
11754the table that follows. 12620To have a quick preview of this feature, install the below setting and
12621export the table that follows:
11755 12622
11756@lisp 12623@lisp
11757(setq org-export-odt-table-styles 12624(setq org-odt-table-styles
11758 (append org-export-odt-table-styles 12625 (append org-odt-table-styles
11759 '(("TableWithHeaderRowAndColumn" "Custom" 12626 '(("TableWithHeaderRowAndColumn" "Custom"
11760 ((use-first-row-styles . t) 12627 ((use-first-row-styles . t)
11761 (use-first-column-styles . t))) 12628 (use-first-column-styles . t)))
11762 ("TableWithFirstRowandLastRow" "Custom" 12629 ("TableWithFirstRowandLastRow" "Custom"
11763 ((use-first-row-styles . t) 12630 ((use-first-row-styles . t)
11764 (use-last-row-styles . t)))))) 12631 (use-last-row-styles . t))))))
11765@end lisp 12632@end lisp
11766 12633
11767@example 12634@example
@@ -11774,9 +12641,9 @@ the table that follows.
11774In the above example, you used a template named @samp{Custom} and installed 12641In the above example, you used a template named @samp{Custom} and installed
11775two table styles with the names @samp{TableWithHeaderRowAndColumn} and 12642two table styles with the names @samp{TableWithHeaderRowAndColumn} and
11776@samp{TableWithFirstRowandLastRow}. (@strong{Important:} The OpenDocument 12643@samp{TableWithFirstRowandLastRow}. (@strong{Important:} The OpenDocument
11777styles needed for producing the above template have been pre-defined for you. 12644styles needed for producing the above template have been pre-defined for
11778These styles are available under the section marked @samp{Custom Table 12645you. These styles are available under the section marked @samp{Custom
11779Template} in @file{OrgOdtContentTemplate.xml} 12646Table Template} in @file{OrgOdtContentTemplate.xml}
11780(@pxref{x-orgodtcontenttemplate-xml,,Factory styles}). If you need 12647(@pxref{x-orgodtcontenttemplate-xml,,Factory styles}). If you need
11781additional templates you have to define these styles yourselves. 12648additional templates you have to define these styles yourselves.
11782 12649
@@ -11860,9 +12727,9 @@ Define a table style@footnote{See the attributes @code{table:template-name},
11860@code{table:use-banding-column-styles} of the @code{<table:table>} element in 12727@code{table:use-banding-column-styles} of the @code{<table:table>} element in
11861the OpenDocument-v1.2 specification} 12728the OpenDocument-v1.2 specification}
11862 12729
11863@vindex org-export-odt-table-styles 12730@vindex org-odt-table-styles
11864To define a table style, create an entry for the style in the variable 12731To define a table style, create an entry for the style in the variable
11865@code{org-export-odt-table-styles} and specify the following: 12732@code{org-odt-table-styles} and specify the following:
11866 12733
11867@itemize @minus 12734@itemize @minus
11868@item the name of the table template created in step (1) 12735@item the name of the table template created in step (1)
@@ -11875,14 +12742,14 @@ based on the same template @samp{Custom}. The styles achieve their intended
11875effect by selectively activating the individual cell styles in that template. 12742effect by selectively activating the individual cell styles in that template.
11876 12743
11877@lisp 12744@lisp
11878(setq org-export-odt-table-styles 12745(setq org-odt-table-styles
11879 (append org-export-odt-table-styles 12746 (append org-odt-table-styles
11880 '(("TableWithHeaderRowAndColumn" "Custom" 12747 '(("TableWithHeaderRowAndColumn" "Custom"
11881 ((use-first-row-styles . t) 12748 ((use-first-row-styles . t)
11882 (use-first-column-styles . t))) 12749 (use-first-column-styles . t)))
11883 ("TableWithFirstRowandLastRow" "Custom" 12750 ("TableWithFirstRowandLastRow" "Custom"
11884 ((use-first-row-styles . t) 12751 ((use-first-row-styles . t)
11885 (use-last-row-styles . t)))))) 12752 (use-last-row-styles . t))))))
11886@end lisp 12753@end lisp
11887 12754
11888@item 12755@item
@@ -11913,173 +12780,15 @@ nothing but @samp{zip} archives}: @inforef{File Archives,,emacs}. For
11913general help with validation (and schema-sensitive editing) of XML files: 12780general help with validation (and schema-sensitive editing) of XML files:
11914@inforef{Introduction,,nxml-mode}. 12781@inforef{Introduction,,nxml-mode}.
11915 12782
11916@vindex org-export-odt-schema-dir 12783@vindex org-odt-schema-dir
11917If you have ready access to OpenDocument @file{.rnc} files and the needed 12784If you have ready access to OpenDocument @file{.rnc} files and the needed
11918schema-locating rules in a single folder, you can customize the variable 12785schema-locating rules in a single folder, you can customize the variable
11919@code{org-export-odt-schema-dir} to point to that directory. The 12786@code{org-odt-schema-dir} to point to that directory. The ODT exporter
11920ODT exporter will take care of updating the 12787will take care of updating the @code{rng-schema-locating-files} for you.
11921@code{rng-schema-locating-files} for you.
11922 12788
11923@c end opendocument 12789@c end opendocument
11924 12790
11925@node TaskJuggler export, Freemind export, OpenDocument Text export, Exporting 12791@node iCalendar export, Other built-in back-ends, OpenDocument Text export, Exporting
11926@section TaskJuggler export
11927@cindex TaskJuggler export
11928@cindex Project management
11929
11930@uref{http://www.taskjuggler.org/, TaskJuggler} is a project management tool.
11931It provides an optimizing scheduler that computes your project time lines and
11932resource assignments based on the project outline and the constraints that
11933you have provided.
11934
11935The TaskJuggler exporter is a bit different from other exporters, such as the
11936@code{HTML} and @LaTeX{} exporters for example, in that it does not export all the
11937nodes of a document or strictly follow the order of the nodes in the
11938document.
11939
11940Instead the TaskJuggler exporter looks for a tree that defines the tasks and
11941a optionally tree that defines the resources for this project. It then
11942creates a TaskJuggler file based on these trees and the attributes defined in
11943all the nodes.
11944
11945@subsection TaskJuggler export commands
11946
11947@table @kbd
11948@orgcmd{C-c C-e j,org-export-as-taskjuggler}
11949Export as a TaskJuggler file.
11950
11951@orgcmd{C-c C-e J,org-export-as-taskjuggler-and-open}
11952Export as a TaskJuggler file and then open the file with TaskJugglerUI.
11953@end table
11954
11955@subsection Tasks
11956
11957@vindex org-export-taskjuggler-project-tag
11958Create your tasks as you usually do with Org mode. Assign efforts to each
11959task using properties (it is easiest to do this in the column view). You
11960should end up with something similar to the example by Peter Jones in
11961@url{http://www.contextualdevelopment.com/static/artifacts/articles/2008/project-planning/project-planning.org}.
11962Now mark the top node of your tasks with a tag named
11963@code{:taskjuggler_project:} (or whatever you customized
11964@code{org-export-taskjuggler-project-tag} to). You are now ready to export
11965the project plan with @kbd{C-c C-e J} which will export the project plan and
11966open a gantt chart in TaskJugglerUI.
11967
11968@subsection Resources
11969
11970@vindex org-export-taskjuggler-resource-tag
11971Next you can define resources and assign those to work on specific tasks. You
11972can group your resources hierarchically. Tag the top node of the resources
11973with @code{:taskjuggler_resource:} (or whatever you customized
11974@code{org-export-taskjuggler-resource-tag} to). You can optionally assign an
11975identifier (named @samp{resource_id}) to the resources (using the standard
11976Org properties commands, @pxref{Property syntax}) or you can let the exporter
11977generate identifiers automatically (the exporter picks the first word of the
11978headline as the identifier as long as it is unique---see the documentation of
11979@code{org-taskjuggler-get-unique-id}). Using that identifier you can then
11980allocate resources to tasks. This is again done with the @samp{allocate}
11981property on the tasks. Do this in column view or when on the task type
11982@kbd{C-c C-x p allocate @key{RET} <resource_id> @key{RET}}.
11983
11984Once the allocations are done you can again export to TaskJuggler and check
11985in the Resource Allocation Graph which person is working on what task at what
11986time.
11987
11988@subsection Export of properties
11989
11990The exporter also takes TODO state information into consideration, i.e., if a
11991task is marked as done it will have the corresponding attribute in
11992TaskJuggler (@samp{complete 100}). Also it will export any property on a task
11993resource or resource node which is known to TaskJuggler, such as
11994@samp{limits}, @samp{vacation}, @samp{shift}, @samp{booking},
11995@samp{efficiency}, @samp{journalentry}, @samp{rate} for resources or
11996@samp{account}, @samp{start}, @samp{note}, @samp{duration}, @samp{end},
11997@samp{journalentry}, @samp{milestone}, @samp{reference}, @samp{responsible},
11998@samp{scheduling}, etc.@: for tasks.
11999
12000@subsection Dependencies
12001
12002The exporter will handle dependencies that are defined in the tasks either
12003with the @samp{ORDERED} attribute (@pxref{TODO dependencies}), with the
12004@samp{BLOCKER} attribute (see @file{org-depend.el}) or alternatively with a
12005@samp{depends} attribute. Both the @samp{BLOCKER} and the @samp{depends}
12006attribute can be either @samp{previous-sibling} or a reference to an
12007identifier (named @samp{task_id}) which is defined for another task in the
12008project. @samp{BLOCKER} and the @samp{depends} attribute can define multiple
12009dependencies separated by either space or comma. You can also specify
12010optional attributes on the dependency by simply appending it. The following
12011examples should illustrate this:
12012
12013@example
12014* Preparation
12015 :PROPERTIES:
12016 :task_id: preparation
12017 :ORDERED: t
12018 :END:
12019* Training material
12020 :PROPERTIES:
12021 :task_id: training_material
12022 :ORDERED: t
12023 :END:
12024** Markup Guidelines
12025 :PROPERTIES:
12026 :Effort: 2d
12027 :END:
12028** Workflow Guidelines
12029 :PROPERTIES:
12030 :Effort: 2d
12031 :END:
12032* Presentation
12033 :PROPERTIES:
12034 :Effort: 2d
12035 :BLOCKER: training_material @{ gapduration 1d @} preparation
12036 :END:
12037@end example
12038
12039@subsection Reports
12040
12041@vindex org-export-taskjuggler-default-reports
12042TaskJuggler can produce many kinds of reports (e.g., gantt chart, resource
12043allocation, etc). The user defines what kind of reports should be generated
12044for a project in the TaskJuggler file. The exporter will automatically insert
12045some default reports in the file. These defaults are defined in
12046@code{org-export-taskjuggler-default-reports}. They can be modified using
12047customize along with a number of other options. For a more complete list, see
12048@kbd{M-x customize-group @key{RET} org-export-taskjuggler @key{RET}}.
12049
12050For more information and examples see the Org-taskjuggler tutorial at
12051@uref{http://orgmode.org/worg/org-tutorials/org-taskjuggler.html}.
12052
12053@node Freemind export, XOXO export, TaskJuggler export, Exporting
12054@section Freemind export
12055@cindex Freemind export
12056@cindex mind map
12057
12058The Freemind exporter was written by Lennart Borgman.
12059
12060@table @kbd
12061@orgcmd{C-c C-e m,org-export-as-freemind}
12062Export as a Freemind mind map. For an Org file @file{myfile.org}, the Freemind
12063file will be @file{myfile.mm}.
12064@end table
12065
12066@node XOXO export, iCalendar export, Freemind export, Exporting
12067@section XOXO export
12068@cindex XOXO export
12069
12070Org mode contains an exporter that produces XOXO-style output.
12071Currently, this exporter only handles the general outline structure and
12072does not interpret any additional Org mode features.
12073
12074@table @kbd
12075@orgcmd{C-c C-e x,org-export-as-xoxo}
12076Export as an XOXO file. For an Org file @file{myfile.org}, the XOXO file will be
12077@file{myfile.html}.
12078@orgkey{C-c C-e v x}
12079Export only the visible part of the document.
12080@end table
12081
12082@node iCalendar export, , XOXO export, Exporting
12083@section iCalendar export 12792@section iCalendar export
12084@cindex iCalendar export 12793@cindex iCalendar export
12085 12794
@@ -12118,19 +12827,19 @@ In this way the UID remains unique, but a synchronization program can still
12118figure out from which entry all the different instances originate. 12827figure out from which entry all the different instances originate.
12119 12828
12120@table @kbd 12829@table @kbd
12121@orgcmd{C-c C-e i,org-export-icalendar-this-file} 12830@orgcmd{C-c C-e c f,org-icalendar-export-to-ics}
12122Create iCalendar entries for the current file and store them in the same 12831Create iCalendar entries for the current buffer and store them in the same
12123directory, using a file extension @file{.ics}. 12832directory, using a file extension @file{.ics}.
12124@orgcmd{C-c C-e I, org-export-icalendar-all-agenda-files} 12833@orgcmd{C-c C-e c a, org-icalendar-export-agenda-files}
12125@vindex org-agenda-files 12834@vindex org-agenda-files
12126Like @kbd{C-c C-e i}, but do this for all files in 12835Like @kbd{C-c C-e c f}, but do this for all files in
12127@code{org-agenda-files}. For each of these files, a separate iCalendar 12836@code{org-agenda-files}. For each of these files, a separate iCalendar
12128file will be written. 12837file will be written.
12129@orgcmd{C-c C-e c,org-export-icalendar-combine-agenda-files} 12838@orgcmd{C-c C-e c c,org-icalendar-combine-agenda-files}
12130@vindex org-combined-agenda-icalendar-file 12839@vindex org-icalendar-combined-agenda-file
12131Create a single large iCalendar file from all files in 12840Create a single large iCalendar file from all files in
12132@code{org-agenda-files} and write it to the file given by 12841@code{org-agenda-files} and write it to the file given by
12133@code{org-combined-agenda-icalendar-file}. 12842@code{org-icalendar-combined-agenda-file}.
12134@end table 12843@end table
12135 12844
12136@vindex org-use-property-inheritance 12845@vindex org-use-property-inheritance
@@ -12148,6 +12857,233 @@ and the description from the body (limited to
12148How this calendar is best read and updated, depends on the application 12857How this calendar is best read and updated, depends on the application
12149you are using. The FAQ covers this issue. 12858you are using. The FAQ covers this issue.
12150 12859
12860@node Other built-in back-ends, Export in foreign buffers, iCalendar export, Exporting
12861@section Other built-in back-ends
12862@cindex export back-ends, built-in
12863@vindex org-export-backends
12864
12865On top of the aforemetioned back-ends, Org comes with other built-in ones:
12866
12867@itemize
12868@item @file{ox-man.el}: export to a man page.
12869@item @file{ox-texinfo.el}: export to @code{Texinfo} format.
12870@item @file{ox-org.el}: export to an Org document.
12871@end itemize
12872
12873To activate these export back-end, customize @code{org-export-backends} or
12874load them directly with e.g., @code{(require 'ox-texinfo)}. This will add
12875new keys in the export dispatcher (@pxref{The Export Dispatcher}).
12876
12877See the comment section of these files for more information on how to use
12878them.
12879
12880@node Export in foreign buffers, Advanced configuration, Other built-in back-ends, Exporting
12881@section Export in foreign buffers
12882
12883Most built-in back-ends come with a command to convert the selected region
12884into a selected format and replace this region by the exported output. Here
12885is a list of such conversion commands:
12886
12887@table @code
12888@item org-html-convert-region-to-html
12889Convert the selected region into HTML.
12890@item org-latex-convert-region-to-latex
12891Convert the selected region into @LaTeX{}.
12892@item org-texinfo-convert-region-to-texinfo
12893Convert the selected region into @code{Texinfo}.
12894@item org-md-convert-region-to-md
12895Convert the selected region into @code{MarkDown}.
12896@end table
12897
12898This is particularily useful for converting tables and lists in foreign
12899buffers. E.g., in a HTML buffer, you can turn on @code{orgstruct-mode}, then
12900use Org commands for editing a list, and finally select and convert the list
12901with @code{M-x org-html-convert-region-to-html RET}.
12902
12903@node Advanced configuration, , Export in foreign buffers, Exporting
12904@section Advanced configuration
12905
12906@subheading Hooks
12907
12908@vindex org-export-before-processing-hook
12909@vindex org-export-before-parsing-hook
12910Two hooks are run during the first steps of the export process. The first
12911one, @code{org-export-before-processing-hook} is called before expanding
12912macros, Babel code and include keywords in the buffer. The second one,
12913@code{org-export-before-parsing-hook}, as its name suggests, happens just
12914before parsing the buffer. Their main use is for heavy duties, that is
12915duties involving structural modifications of the document. For example, one
12916may want to remove every headline in the buffer during export. The following
12917code can achieve this:
12918
12919@lisp
12920@group
12921(defun my-headline-removal (backend)
12922 "Remove all headlines in the current buffer.
12923BACKEND is the export back-end being used, as a symbol."
12924 (org-map-entries
12925 (lambda () (delete-region (point) (progn (forward-line) (point))))))
12926
12927(add-hook 'org-export-before-parsing-hook 'my-headline-removal)
12928@end group
12929@end lisp
12930
12931Note that functions used in these hooks require a mandatory argument,
12932a symbol representing the back-end used.
12933
12934@subheading Filters
12935
12936@cindex Filters, exporting
12937Filters are lists of functions applied on a specific part of the output from
12938a given back-end. More explicitly, each time a back-end transforms an Org
12939object or element into another language, all functions within a given filter
12940type are called in turn on the string produced. The string returned by the
12941last function will be the one used in the final output.
12942
12943There are filters sets for each type of element or object, for plain text,
12944for the parse tree, for the export options and for the final output. They
12945are all named after the same scheme: @code{org-export-filter-TYPE-functions},
12946where @code{TYPE} is the type targeted by the filter. Valid types are:
12947
12948@multitable @columnfractions .33 .33 .33
12949@item bold
12950@tab babel-call
12951@tab center-block
12952@item clock
12953@tab code
12954@tab comment
12955@item comment-block
12956@tab diary-sexp
12957@tab drawer
12958@item dynamic-block
12959@tab entity
12960@tab example-block
12961@item export-block
12962@tab export-snippet
12963@tab final-output
12964@item fixed-width
12965@tab footnote-definition
12966@tab footnote-reference
12967@item headline
12968@tab horizontal-rule
12969@tab inline-babel-call
12970@item inline-src-block
12971@tab inlinetask
12972@tab italic
12973@item item
12974@tab keyword
12975@tab latex-environment
12976@item latex-fragment
12977@tab line-break
12978@tab link
12979@item node-property
12980@tab options
12981@tab paragraph
12982@item parse-tree
12983@tab plain-list
12984@tab plain-text
12985@item planning
12986@tab property-drawer
12987@tab quote-block
12988@item quote-section
12989@tab radio-target
12990@tab section
12991@item special-block
12992@tab src-block
12993@tab statistics-cookie
12994@item strike-through
12995@tab subscript
12996@tab superscript
12997@item table
12998@tab table-cell
12999@tab table-row
13000@item target
13001@tab timestamp
13002@tab underline
13003@item verbatim
13004@tab verse-block
13005@tab
13006@end multitable
13007
13008For example, the following snippet allows me to use non-breaking spaces in
13009the Org buffer and get them translated into @LaTeX{} without using the
13010@code{\nbsp} macro (where @code{_} stands for the non-breaking space):
13011
13012@lisp
13013@group
13014(defun my-latex-filter-nobreaks (text backend info)
13015 "Ensure \" \" are properly handled in LaTeX export."
13016 (when (org-export-derived-backend-p backend 'latex)
13017 (replace-regexp-in-string " " "~" text)))
13018
13019(add-to-list 'org-export-filter-plain-text-functions
13020 'my-latex-filter-nobreaks)
13021@end group
13022@end lisp
13023
13024Three arguments must be provided to a filter: the code being changed, the
13025back-end used, and some information about the export process. You can safely
13026ignore the third argument for most purposes. Note the use of
13027@code{org-export-derived-backend-p}, which ensures that the filter will only
13028be applied when using @code{latex} back-end or any other back-end derived
13029from it (e.g., @code{beamer}).
13030
13031@subheading Extending an existing back-end
13032
13033This is obviously the most powerful customization, since the changes happen
13034at the parser level. Indeed, some export back-ends are built as extensions
13035of other ones (e.g. Markdown back-end an extension of HTML back-end).
13036
13037Extending a back-end means that if an element type is not transcoded by the
13038new back-end, it will be handled by the original one. Hence you can extend
13039specific parts of a back-end without too much work.
13040
13041As an example, imagine we want the @code{ascii} back-end to display the
13042language used in a source block, when it is available, but only when some
13043attribute is non-@code{nil}, like the following:
13044
13045@example
13046#+ATTR_ASCII: :language t
13047@end example
13048
13049Because that back-end is lacking in that area, we are going to create a new
13050back-end, @code{my-ascii} that will do the job.
13051
13052@lisp
13053@group
13054(defun my-ascii-src-block (src-block contents info)
13055 "Transcode a SRC-BLOCK element from Org to ASCII.
13056CONTENTS is nil. INFO is a plist used as a communication
13057channel."
13058 (if (not (org-export-read-attribute :attr_ascii src-block :language))
13059 (org-export-with-backend 'ascii src-block contents info)
13060 (concat
13061 (format ",--[ %s ]--\n%s`----"
13062 (org-element-property :language src-block)
13063 (replace-regexp-in-string
13064 "^" "| "
13065 (org-element-normalize-string
13066 (org-export-format-code-default src-block info)))))))
13067
13068(org-export-define-derived-backend 'my-ascii 'ascii
13069 :translate-alist '((src-block . my-ascii-src-block)))
13070@end group
13071@end lisp
13072
13073The @code{my-ascii-src-block} function looks at the attribute above the
13074element. If it isn’t true, it gives hand to the @code{ascii} back-end.
13075Otherwise, it creates a box around the code, leaving room for the language.
13076A new back-end is then created. It only changes its behaviour when
13077translating @code{src-block} type element. Now, all it takes to use the new
13078back-end is calling the following from an Org buffer:
13079
13080@smalllisp
13081(org-export-to-buffer 'my-ascii "*Org MY-ASCII Export*")
13082@end smalllisp
13083
13084It is obviously possible to write an interactive function for this, install
13085it in the export dispatcher menu, and so on.
13086
12151@node Publishing, Working With Source Code, Exporting, Top 13087@node Publishing, Working With Source Code, Exporting, Top
12152@chapter Publishing 13088@chapter Publishing
12153@cindex publishing 13089@cindex publishing
@@ -12227,7 +13163,7 @@ and where to put published files.
12227@tab Directory containing publishing source files 13163@tab Directory containing publishing source files
12228@item @code{:publishing-directory} 13164@item @code{:publishing-directory}
12229@tab Directory where output files will be published. You can directly 13165@tab Directory where output files will be published. You can directly
12230publish to a webserver using a file name syntax appropriate for 13166publish to a web server using a file name syntax appropriate for
12231the Emacs @file{tramp} package. Or you can publish to a local directory and 13167the Emacs @file{tramp} package. Or you can publish to a local directory and
12232use external tools to upload your website (@pxref{Uploading files}). 13168use external tools to upload your website (@pxref{Uploading files}).
12233@item @code{:preparation-function} 13169@item @code{:preparation-function}
@@ -12266,7 +13202,7 @@ extension.
12266and @code{:exclude}. 13202and @code{:exclude}.
12267 13203
12268@item @code{:recursive} 13204@item @code{:recursive}
12269@tab Non-nil means, check base-directory recursively for files to publish. 13205@tab non-@code{nil} means, check base-directory recursively for files to publish.
12270@end multitable 13206@end multitable
12271 13207
12272@node Publishing action, Publishing options, Selecting files, Configuration 13208@node Publishing action, Publishing options, Selecting files, Configuration
@@ -12276,201 +13212,164 @@ and @code{:exclude}.
12276Publishing means that a file is copied to the destination directory and 13212Publishing means that a file is copied to the destination directory and
12277possibly transformed in the process. The default transformation is to export 13213possibly transformed in the process. The default transformation is to export
12278Org files as HTML files, and this is done by the function 13214Org files as HTML files, and this is done by the function
12279@code{org-publish-org-to-html} which calls the HTML exporter (@pxref{HTML 13215@code{org-html-publish-to-html}, which calls the HTML exporter (@pxref{HTML
12280export}). But you also can publish your content as PDF files using 13216export}). But you also can publish your content as PDF files using
12281@code{org-publish-org-to-pdf}, or as @code{ascii}, @code{latin1} or 13217@code{org-latex-publish-to-pdf} or as @code{ascii}, @code{Texinfo}, etc.,
12282@code{utf8} encoded files using the corresponding functions. If you want to 13218using the corresponding functions.
12283publish the Org file itself, but with @i{archived}, @i{commented}, and 13219
12284@i{tag-excluded} trees removed, use @code{org-publish-org-to-org} and set the 13220If you want to publish the Org file as an @code{.org} file but with the
12285parameters @code{:plain-source} and/or @code{:htmlized-source}. This will 13221@i{archived}, @i{commented} and @i{tag-excluded} trees removed, use the
12286produce @file{file.org} and @file{file.org.html} in the publishing 13222function @code{org-org-publish-to-org}. This will produce @file{file.org}
12287directory@footnote{@file{file-source.org} and @file{file-source.org.html} if 13223and put it in the publishing directory. If you want a htmlized version of
12288source and publishing directories are equal. Note that with this kind of 13224this file, set the parameter @code{:htmlized-source} to @code{t}, it will
12289setup, you need to add @code{:exclude "-source\\.org"} to the project 13225produce @file{file.org.html} in the publishing directory@footnote{If the
12290definition in @code{org-publish-project-alist} to prevent the published 13226publishing directory is the same than the source directory, @file{file.org}
12291source files from being considered as new org files the next time the project 13227will be exported as @file{file.org.org}, so probably don't want to do this.}.
12292is published.}. Other files like images only need to be copied to the 13228
12293publishing destination; for this you may use @code{org-publish-attachment}. 13229Other files like images only need to be copied to the publishing destination.
12294For non-Org files, you always need to specify the publishing function: 13230For this you can use @code{org-publish-attachment}. For non-org files, you
13231always need to specify the publishing function:
12295 13232
12296@multitable @columnfractions 0.3 0.7 13233@multitable @columnfractions 0.3 0.7
12297@item @code{:publishing-function} 13234@item @code{:publishing-function}
12298@tab Function executing the publication of a file. This may also be a 13235@tab Function executing the publication of a file. This may also be a
12299list of functions, which will all be called in turn. 13236list of functions, which will all be called in turn.
12300@item @code{:plain-source}
12301@tab Non-nil means, publish plain source.
12302@item @code{:htmlized-source} 13237@item @code{:htmlized-source}
12303@tab Non-nil means, publish htmlized source. 13238@tab non-@code{nil} means, publish htmlized source.
12304@end multitable 13239@end multitable
12305 13240
12306The function must accept three arguments: a property list containing at least 13241The function must accept three arguments: a property list containing at least
12307a @code{:publishing-directory} property, the name of the file to be 13242a @code{:publishing-directory} property, the name of the file to be published
12308published, and the path to the publishing directory of the output file. It 13243and the path to the publishing directory of the output file. It should take
12309should take the specified file, make the necessary transformation (if any) 13244the specified file, make the necessary transformation (if any) and place the
12310and place the result into the destination folder. 13245result into the destination folder.
12311 13246
12312@node Publishing options, Publishing links, Publishing action, Configuration 13247@node Publishing options, Publishing links, Publishing action, Configuration
12313@subsection Options for the HTML/@LaTeX{} exporters 13248@subsection Options for the exporters
12314@cindex options, for publishing 13249@cindex options, for publishing
12315 13250
12316The property list can be used to set many export options for the HTML 13251The property list can be used to set many export options for the exporters.
12317and @LaTeX{} exporters. In most cases, these properties correspond to user 13252In most cases, these properties correspond to user variables in Org. The
12318variables in Org. The table below lists these properties along 13253first table below lists these properties along with the variable they belong
12319with the variable they belong to. See the documentation string for the 13254to. The second table list HTML specific properties. See the documentation
12320respective variable for details. 13255string of these options for details.
12321 13256
12322@vindex org-export-html-link-up
12323@vindex org-export-html-link-home
12324@vindex org-export-default-language
12325@vindex org-display-custom-times 13257@vindex org-display-custom-times
13258@vindex org-export-default-language
13259@vindex org-export-exclude-tags
12326@vindex org-export-headline-levels 13260@vindex org-export-headline-levels
12327@vindex org-export-with-section-numbers
12328@vindex org-export-section-number-format
12329@vindex org-export-with-toc
12330@vindex org-export-preserve-breaks 13261@vindex org-export-preserve-breaks
13262@vindex org-export-publishing-directory
13263@vindex org-export-select-tags
12331@vindex org-export-with-archived-trees 13264@vindex org-export-with-archived-trees
13265@vindex org-export-with-author
13266@vindex org-export-with-creator
13267@vindex org-export-with-drawers
13268@vindex org-export-with-email
12332@vindex org-export-with-emphasize 13269@vindex org-export-with-emphasize
12333@vindex org-export-with-sub-superscripts 13270@vindex org-export-with-fixed-width
12334@vindex org-export-with-special-strings
12335@vindex org-export-with-footnotes 13271@vindex org-export-with-footnotes
12336@vindex org-export-with-drawers 13272@vindex org-export-with-latex
13273@vindex org-export-with-planning
13274@vindex org-export-with-priority
13275@vindex org-export-with-section-numbers
13276@vindex org-export-with-special-strings
13277@vindex org-export-with-sub-superscripts
13278@vindex org-export-with-tables
12337@vindex org-export-with-tags 13279@vindex org-export-with-tags
12338@vindex org-export-with-todo-keywords
12339@vindex org-export-with-tasks 13280@vindex org-export-with-tasks
12340@vindex org-export-with-done-tasks
12341@vindex org-export-with-priority
12342@vindex org-export-with-TeX-macros
12343@vindex org-export-with-LaTeX-fragments
12344@vindex org-export-skip-text-before-1st-heading
12345@vindex org-export-with-fixed-width
12346@vindex org-export-with-timestamps 13281@vindex org-export-with-timestamps
12347@vindex org-export-author-info 13282@vindex org-export-with-toc
12348@vindex org-export-email-info 13283@vindex org-export-with-todo-keywords
12349@vindex org-export-creator-info
12350@vindex org-export-time-stamp-file
12351@vindex org-export-with-tables
12352@vindex org-export-highlight-first-table-line
12353@vindex org-export-html-style-include-default
12354@vindex org-export-html-style-include-scripts
12355@vindex org-export-html-style
12356@vindex org-export-html-style-extra
12357@vindex org-export-html-link-org-files-as-html
12358@vindex org-export-html-inline-images
12359@vindex org-export-html-extension
12360@vindex org-export-html-table-tag
12361@vindex org-export-html-expand
12362@vindex org-export-html-with-timestamp
12363@vindex org-export-publishing-directory
12364@vindex org-export-html-preamble
12365@vindex org-export-html-postamble
12366@vindex user-full-name
12367@vindex user-mail-address 13284@vindex user-mail-address
12368@vindex org-export-select-tags
12369@vindex org-export-exclude-tags
12370 13285
12371@multitable @columnfractions 0.32 0.68 13286@multitable @columnfractions 0.32 0.68
12372@item @code{:link-up} @tab @code{org-export-html-link-up} 13287@item @code{:archived-trees} @tab @code{org-export-with-archived-trees}
12373@item @code{:link-home} @tab @code{org-export-html-link-home} 13288@item @code{:exclude-tags} @tab @code{org-export-exclude-tags}
12374@item @code{:language} @tab @code{org-export-default-language}
12375@item @code{:customtime} @tab @code{org-display-custom-times}
12376@item @code{:headline-levels} @tab @code{org-export-headline-levels} 13289@item @code{:headline-levels} @tab @code{org-export-headline-levels}
12377@item @code{:section-numbers} @tab @code{org-export-with-section-numbers} 13290@item @code{:language} @tab @code{org-export-default-language}
12378@item @code{:section-number-format} @tab @code{org-export-section-number-format}
12379@item @code{:table-of-contents} @tab @code{org-export-with-toc}
12380@item @code{:preserve-breaks} @tab @code{org-export-preserve-breaks} 13291@item @code{:preserve-breaks} @tab @code{org-export-preserve-breaks}
12381@item @code{:archived-trees} @tab @code{org-export-with-archived-trees}
12382@item @code{:emphasize} @tab @code{org-export-with-emphasize}
12383@item @code{:sub-superscript} @tab @code{org-export-with-sub-superscripts}
12384@item @code{:special-strings} @tab @code{org-export-with-special-strings}
12385@item @code{:footnotes} @tab @code{org-export-with-footnotes}
12386@item @code{:drawers} @tab @code{org-export-with-drawers}
12387@item @code{:tags} @tab @code{org-export-with-tags}
12388@item @code{:todo-keywords} @tab @code{org-export-with-todo-keywords}
12389@item @code{:tasks} @tab @code{org-export-with-tasks}
12390@item @code{:priority} @tab @code{org-export-with-priority}
12391@item @code{:TeX-macros} @tab @code{org-export-with-TeX-macros}
12392@item @code{:LaTeX-fragments} @tab @code{org-export-with-LaTeX-fragments}
12393@item @code{:latex-listings} @tab @code{org-export-latex-listings}
12394@item @code{:skip-before-1st-heading} @tab @code{org-export-skip-text-before-1st-heading}
12395@item @code{:fixed-width} @tab @code{org-export-with-fixed-width}
12396@item @code{:timestamps} @tab @code{org-export-with-timestamps}
12397@item @code{:author} @tab @code{user-full-name}
12398@item @code{:email} @tab @code{user-mail-address} : @code{addr;addr;..}
12399@item @code{:author-info} @tab @code{org-export-author-info}
12400@item @code{:email-info} @tab @code{org-export-email-info}
12401@item @code{:creator-info} @tab @code{org-export-creator-info}
12402@item @code{:tables} @tab @code{org-export-with-tables}
12403@item @code{:table-auto-headline} @tab @code{org-export-highlight-first-table-line}
12404@item @code{:style-include-default} @tab @code{org-export-html-style-include-default}
12405@item @code{:style-include-scripts} @tab @code{org-export-html-style-include-scripts}
12406@item @code{:style} @tab @code{org-export-html-style}
12407@item @code{:style-extra} @tab @code{org-export-html-style-extra}
12408@item @code{:convert-org-links} @tab @code{org-export-html-link-org-files-as-html}
12409@item @code{:inline-images} @tab @code{org-export-html-inline-images}
12410@item @code{:html-extension} @tab @code{org-export-html-extension}
12411@item @code{:html-preamble} @tab @code{org-export-html-preamble}
12412@item @code{:html-postamble} @tab @code{org-export-html-postamble}
12413@item @code{:xml-declaration} @tab @code{org-export-html-xml-declaration}
12414@item @code{:html-table-tag} @tab @code{org-export-html-table-tag}
12415@item @code{:expand-quoted-html} @tab @code{org-export-html-expand}
12416@item @code{:timestamp} @tab @code{org-export-html-with-timestamp}
12417@item @code{:publishing-directory} @tab @code{org-export-publishing-directory} 13292@item @code{:publishing-directory} @tab @code{org-export-publishing-directory}
13293@item @code{:section-numbers} @tab @code{org-export-with-section-numbers}
12418@item @code{:select-tags} @tab @code{org-export-select-tags} 13294@item @code{:select-tags} @tab @code{org-export-select-tags}
12419@item @code{:exclude-tags} @tab @code{org-export-exclude-tags} 13295@item @code{:with-author} @tab @code{org-export-with-author}
12420@item @code{:latex-image-options} @tab @code{org-export-latex-image-default-option} 13296@item @code{:with-creator} @tab @code{org-export-with-creator}
13297@item @code{:with-drawers} @tab @code{org-export-with-drawers}
13298@item @code{:with-email} @tab @code{org-export-with-email}
13299@item @code{:with-emphasize} @tab @code{org-export-with-emphasize}
13300@item @code{:with-fixed-width} @tab @code{org-export-with-fixed-width}
13301@item @code{:with-footnotes} @tab @code{org-export-with-footnotes}
13302@item @code{:with-latex} @tab @code{org-export-with-latex}
13303@item @code{:with-planning} @tab @code{org-export-with-planning}
13304@item @code{:with-priority} @tab @code{org-export-with-priority}
13305@item @code{:with-special-strings} @tab @code{org-export-with-special-strings}
13306@item @code{:with-sub-superscript} @tab @code{org-export-with-sub-superscripts}
13307@item @code{:with-tables} @tab @code{org-export-with-tables}
13308@item @code{:with-tags} @tab @code{org-export-with-tags}
13309@item @code{:with-tasks} @tab @code{org-export-with-tasks}
13310@item @code{:with-timestamps} @tab @code{org-export-with-timestamps}
13311@item @code{:with-toc} @tab @code{org-export-with-toc}
13312@item @code{:with-todo-keywords} @tab @code{org-export-with-todo-keywords}
12421@end multitable 13313@end multitable
12422 13314
12423Most of the @code{org-export-with-*} variables have the same effect in 13315@vindex org-html-doctype
12424both HTML and @LaTeX{} exporters, except for @code{:TeX-macros} and 13316@vindex org-html-xml-declaration
12425@code{:LaTeX-fragments} options, respectively @code{nil} and @code{t} in the 13317@vindex org-html-link-up
12426@LaTeX{} export. See @code{org-export-plist-vars} to check this list of 13318@vindex org-html-link-home
12427options. 13319@vindex org-html-link-org-files-as-html
12428 13320@vindex org-html-head
13321@vindex org-html-head-extra
13322@vindex org-html-inline-images
13323@vindex org-html-extension
13324@vindex org-html-preamble
13325@vindex org-html-postamble
13326@vindex org-html-table-default-attributes
13327@vindex org-html-head-include-default-style
13328@vindex org-html-head-include-scripts
13329@multitable @columnfractions 0.32 0.68
13330@item @code{:html-doctype} @tab @code{org-html-doctype}
13331@item @code{:html-xml-declaration} @tab @code{org-html-xml-declaration}
13332@item @code{:html-link-up} @tab @code{org-html-link-up}
13333@item @code{:html-link-home} @tab @code{org-html-link-home}
13334@item @code{:html-link-org-as-html} @tab @code{org-html-link-org-files-as-html}
13335@item @code{:html-head} @tab @code{org-html-head}
13336@item @code{:html-head-extra} @tab @code{org-html-head-extra}
13337@item @code{:html-inline-images} @tab @code{org-html-inline-images}
13338@item @code{:html-extension} @tab @code{org-html-extension}
13339@item @code{:html-preamble} @tab @code{org-html-preamble}
13340@item @code{:html-postamble} @tab @code{org-html-postamble}
13341@item @code{:html-table-attributes} @tab @code{org-html-table-default-attributes}
13342@item @code{:html-head-include-default-style} @tab @code{org-html-head-include-default-style}
13343@item @code{:html-head-include-scripts} @tab @code{org-html-head-include-scripts}
13344@end multitable
12429 13345
13346Most of the @code{org-export-with-*} variables have the same effect in each
13347exporter.
12430 13348
12431@vindex org-publish-project-alist 13349@vindex org-publish-project-alist
12432When a property is given a value in @code{org-publish-project-alist}, 13350When a property is given a value in @code{org-publish-project-alist}, its
12433its setting overrides the value of the corresponding user variable (if 13351setting overrides the value of the corresponding user variable (if any)
12434any) during publishing. Options set within a file (@pxref{Export 13352during publishing. Options set within a file (@pxref{Export settings}),
12435options}), however, override everything. 13353however, override everything.
12436 13354
12437@node Publishing links, Sitemap, Publishing options, Configuration 13355@node Publishing links, Sitemap, Publishing options, Configuration
12438@subsection Links between published files 13356@subsection Links between published files
12439@cindex links, publishing 13357@cindex links, publishing
12440 13358
12441To create a link from one Org file to another, you would use 13359To create a link from one Org file to another, you would use something like
12442something like @samp{[[file:foo.org][The foo]]} or simply 13360@samp{[[file:foo.org][The foo]]} or simply @samp{file:foo.org.}
12443@samp{file:foo.org.} (@pxref{Hyperlinks}). When published, this link 13361(@pxref{Hyperlinks}). When published, this link becomes a link to
12444becomes a link to @file{foo.html}. In this way, you can interlink the 13362@file{foo.html}. You can thus interlink the pages of your "org web" project
12445pages of your "org web" project and the links will work as expected when 13363and the links will work as expected when you publish them to HTML@. If you
12446you publish them to HTML@. If you also publish the Org source file and want 13364also publish the Org source file and want to link to it, use an @code{http:}
12447to link to that, use an @code{http:} link instead of a @code{file:} link, 13365link instead of a @code{file:} link, because @code{file:} links are converted
12448because @code{file:} links are converted to link to the corresponding 13366to link to the corresponding @file{html} file.
12449@file{html} file.
12450 13367
12451You may also link to related files, such as images. Provided you are careful 13368You may also link to related files, such as images. Provided you are careful
12452with relative file names, and provided you have also configured Org to upload 13369with relative file names, and provided you have also configured Org to upload
12453the related files, these links will work too. See @ref{Complex example}, for 13370the related files, these links will work too. See @ref{Complex example}, for
12454an example of this usage. 13371an example of this usage.
12455 13372
12456Sometimes an Org file to be published may contain links that are
12457only valid in your production environment, but not in the publishing
12458location. In this case, use the property
12459
12460@multitable @columnfractions 0.4 0.6
12461@item @code{:link-validation-function}
12462@tab Function to validate links
12463@end multitable
12464
12465@noindent
12466to define a function for checking link validity. This function must
12467accept two arguments, the file name and a directory relative to which
12468the file name is interpreted in the production environment. If this
12469function returns @code{nil}, then the HTML generator will only insert a
12470description into the HTML file, but no link. One option for this
12471function is @code{org-publish-validate-link} which checks if the given
12472file is part of any project in @code{org-publish-project-alist}.
12473
12474@node Sitemap, Generating an index, Publishing links, Configuration 13373@node Sitemap, Generating an index, Publishing links, Configuration
12475@subsection Generating a sitemap 13374@subsection Generating a sitemap
12476@cindex sitemap, of published pages 13375@cindex sitemap, of published pages
@@ -12480,7 +13379,7 @@ a map of files for a given project.
12480 13379
12481@multitable @columnfractions 0.35 0.65 13380@multitable @columnfractions 0.35 0.65
12482@item @code{:auto-sitemap} 13381@item @code{:auto-sitemap}
12483@tab When non-nil, publish a sitemap during @code{org-publish-current-project} 13382@tab When non-@code{nil}, publish a sitemap during @code{org-publish-current-project}
12484or @code{org-publish-all}. 13383or @code{org-publish-all}.
12485 13384
12486@item @code{:sitemap-filename} 13385@item @code{:sitemap-filename}
@@ -12525,7 +13424,7 @@ a sitemap entry's date is to be formatted. This property bypasses
12525@code{org-publish-sitemap-date-format} which defaults to @code{%Y-%m-%d}. 13424@code{org-publish-sitemap-date-format} which defaults to @code{%Y-%m-%d}.
12526 13425
12527@item @code{:sitemap-sans-extension} 13426@item @code{:sitemap-sans-extension}
12528@tab When non-nil, remove filenames' extensions from the generated sitemap. 13427@tab When non-@code{nil}, remove filenames' extensions from the generated sitemap.
12529Useful to have cool URIs (see @uref{http://www.w3.org/Provider/Style/URI}). 13428Useful to have cool URIs (see @uref{http://www.w3.org/Provider/Style/URI}).
12530Defaults to @code{nil}. 13429Defaults to @code{nil}.
12531 13430
@@ -12539,7 +13438,7 @@ Org mode can generate an index across the files of a publishing project.
12539 13438
12540@multitable @columnfractions 0.25 0.75 13439@multitable @columnfractions 0.25 0.75
12541@item @code{:makeindex} 13440@item @code{:makeindex}
12542@tab When non-nil, generate in index in the file @file{theindex.org} and 13441@tab When non-@code{nil}, generate in index in the file @file{theindex.org} and
12543publish it as @file{theindex.html}. 13442publish it as @file{theindex.html}.
12544@end multitable 13443@end multitable
12545 13444
@@ -12605,10 +13504,10 @@ directory on the local machine.
12605 :base-directory "~/org/" 13504 :base-directory "~/org/"
12606 :publishing-directory "~/public_html" 13505 :publishing-directory "~/public_html"
12607 :section-numbers nil 13506 :section-numbers nil
12608 :table-of-contents nil 13507 :with-toc nil
12609 :style "<link rel=\"stylesheet\" 13508 :html-head "<link rel=\"stylesheet\"
12610 href=\"../other/mystyle.css\" 13509 href=\"../other/mystyle.css\"
12611 type=\"text/css\"/>"))) 13510 type=\"text/css\"/>")))
12612@end lisp 13511@end lisp
12613 13512
12614@node Complex example, , Simple example, Sample configuration 13513@node Complex example, , Simple example, Sample configuration
@@ -12638,12 +13537,12 @@ right place on the web server, and publishing images to it.
12638 :base-directory "~/org/" 13537 :base-directory "~/org/"
12639 :base-extension "org" 13538 :base-extension "org"
12640 :publishing-directory "/ssh:user@@host:~/html/notebook/" 13539 :publishing-directory "/ssh:user@@host:~/html/notebook/"
12641 :publishing-function org-publish-org-to-html 13540 :publishing-function org-html-publish-to-html
12642 :exclude "PrivatePage.org" ;; regexp 13541 :exclude "PrivatePage.org" ;; regexp
12643 :headline-levels 3 13542 :headline-levels 3
12644 :section-numbers nil 13543 :section-numbers nil
12645 :table-of-contents nil 13544 :with-toc nil
12646 :style "<link rel=\"stylesheet\" 13545 :html-head "<link rel=\"stylesheet\"
12647 href=\"../other/mystyle.css\" type=\"text/css\"/>" 13546 href=\"../other/mystyle.css\" type=\"text/css\"/>"
12648 :html-preamble t) 13547 :html-preamble t)
12649 13548
@@ -12667,13 +13566,13 @@ right place on the web server, and publishing images to it.
12667Once properly configured, Org can publish with the following commands: 13566Once properly configured, Org can publish with the following commands:
12668 13567
12669@table @kbd 13568@table @kbd
12670@orgcmd{C-c C-e X,org-publish} 13569@orgcmd{C-c C-e P x,org-publish}
12671Prompt for a specific project and publish all files that belong to it. 13570Prompt for a specific project and publish all files that belong to it.
12672@orgcmd{C-c C-e P,org-publish-current-project} 13571@orgcmd{C-c C-e P p,org-publish-current-project}
12673Publish the project containing the current file. 13572Publish the project containing the current file.
12674@orgcmd{C-c C-e F,org-publish-current-file} 13573@orgcmd{C-c C-e P f,org-publish-current-file}
12675Publish only the current file. 13574Publish only the current file.
12676@orgcmd{C-c C-e E,org-publish-all} 13575@orgcmd{C-c C-e P a,org-publish-all}
12677Publish every project. 13576Publish every project.
12678@end table 13577@end table
12679 13578
@@ -12770,7 +13669,7 @@ src_<language>[<header arguments>]@{<body>@}
12770@table @code 13669@table @code
12771@item <#+NAME: name> 13670@item <#+NAME: name>
12772This line associates a name with the code block. This is similar to the 13671This line associates a name with the code block. This is similar to the
12773@code{#+TBLNAME: NAME} lines that can be used to name tables in Org mode 13672@code{#+NAME: Name} lines that can be used to name tables in Org mode
12774files. Referencing the name of a code block makes it possible to evaluate 13673files. Referencing the name of a code block makes it possible to evaluate
12775the block from other places in the file, from other files, or from Org mode 13674the block from other places in the file, from other files, or from Org mode
12776table formulas (see @ref{The spreadsheet}). Names are assumed to be unique 13675table formulas (see @ref{The spreadsheet}). Names are assumed to be unique
@@ -12802,11 +13701,16 @@ Source code in the specified language.
12802@cindex code block, editing 13701@cindex code block, editing
12803@cindex source code, editing 13702@cindex source code, editing
12804 13703
13704@vindex org-edit-src-auto-save-idle-delay
13705@vindex org-edit-src-turn-on-auto-save
12805@kindex C-c ' 13706@kindex C-c '
12806Use @kbd{C-c '} to edit the current code block. This brings up 13707Use @kbd{C-c '} to edit the current code block. This brings up a language
12807a language major-mode edit buffer containing the body of the code 13708major-mode edit buffer containing the body of the code block. Manually
12808block. Saving this buffer will write the new contents back to the Org 13709saving this buffer with @key{C-x C-s} will write the contents back to the Org
12809buffer. Use @kbd{C-c '} again to exit. 13710buffer. You can also set @code{org-edit-src-auto-save-idle-delay} to save the
13711base buffer after some idle delay, or @code{org-edit-src-turn-on-auto-save}
13712to auto-save this buffer into a separate file using @code{auto-save-mode}.
13713Use @kbd{C-c '} again to exit.
12810 13714
12811The @code{org-src-mode} minor mode will be active in the edit buffer. The 13715The @code{org-src-mode} minor mode will be active in the edit buffer. The
12812following variables can be used to configure the behavior of the edit 13716following variables can be used to configure the behavior of the edit
@@ -12826,7 +13730,7 @@ This variable is especially useful for tangling languages such as
12826Python, in which whitespace indentation in the output is critical. 13730Python, in which whitespace indentation in the output is critical.
12827@item org-src-ask-before-returning-to-edit-buffer 13731@item org-src-ask-before-returning-to-edit-buffer
12828By default, Org will ask before returning to an open edit buffer. Set this 13732By default, Org will ask before returning to an open edit buffer. Set this
12829variable to nil to switch without asking. 13733variable to @code{nil} to switch without asking.
12830@end table 13734@end table
12831 13735
12832To turn on native code fontification in the @emph{Org} buffer, configure the 13736To turn on native code fontification in the @emph{Org} buffer, configure the
@@ -12851,6 +13755,7 @@ The @code{:exports} header argument can be used to specify export
12851behavior: 13755behavior:
12852 13756
12853@subsubheading Header arguments: 13757@subsubheading Header arguments:
13758
12854@table @code 13759@table @code
12855@item :exports code 13760@item :exports code
12856The default in most languages. The body of the code block is exported, as 13761The default in most languages. The body of the code block is exported, as
@@ -12872,7 +13777,12 @@ Setting the @code{org-export-babel-evaluate} variable to @code{nil} will
12872ensure that no code blocks are evaluated as part of the export process. This 13777ensure that no code blocks are evaluated as part of the export process. This
12873can be useful in situations where potentially untrusted Org mode files are 13778can be useful in situations where potentially untrusted Org mode files are
12874exported in an automated fashion, for example when Org mode is used as the 13779exported in an automated fashion, for example when Org mode is used as the
12875markup language for a wiki. 13780markup language for a wiki. It is also possible to set this variable to
13781@code{‘inline-only}. In that case, only inline code blocks will be
13782evaluated, in order to insert their results. Non-inline code blocks are
13783assumed to have their results already inserted in the buffer by manual
13784evaluation. This setting is useful to avoid expensive recalculations during
13785export, not to provide security.
12876 13786
12877@comment node-name, next, previous, up 13787@comment node-name, next, previous, up
12878@comment Extracting source code, Evaluating code blocks, Exporting code blocks, Working With Source Code 13788@comment Extracting source code, Evaluating code blocks, Exporting code blocks, Working With Source Code
@@ -12889,6 +13799,7 @@ using @code{org-babel-expand-src-block} which can expand both variable and
12889``noweb'' style references (see @ref{Noweb reference syntax}). 13799``noweb'' style references (see @ref{Noweb reference syntax}).
12890 13800
12891@subsubheading Header arguments 13801@subsubheading Header arguments
13802
12892@table @code 13803@table @code
12893@item :tangle no 13804@item :tangle no
12894The default. The code block is not included in the tangled output. 13805The default. The code block is not included in the tangled output.
@@ -12902,14 +13813,18 @@ Include the code block in the tangled output to file @samp{filename}.
12902 13813
12903@kindex C-c C-v t 13814@kindex C-c C-v t
12904@subsubheading Functions 13815@subsubheading Functions
13816
12905@table @code 13817@table @code
12906@item org-babel-tangle 13818@item org-babel-tangle
12907Tangle the current file. Bound to @kbd{C-c C-v t}. 13819Tangle the current file. Bound to @kbd{C-c C-v t}.
13820
13821With prefix argument only tangle the current code block.
12908@item org-babel-tangle-file 13822@item org-babel-tangle-file
12909Choose a file to tangle. Bound to @kbd{C-c C-v f}. 13823Choose a file to tangle. Bound to @kbd{C-c C-v f}.
12910@end table 13824@end table
12911 13825
12912@subsubheading Hooks 13826@subsubheading Hooks
13827
12913@table @code 13828@table @code
12914@item org-babel-post-tangle-hook 13829@item org-babel-post-tangle-hook
12915This hook is run from within code files tangled by @code{org-babel-tangle}. 13830This hook is run from within code files tangled by @code{org-babel-tangle}.
@@ -12917,6 +13832,21 @@ Example applications could include post-processing, compilation or evaluation
12917of tangled code files. 13832of tangled code files.
12918@end table 13833@end table
12919 13834
13835@subsubheading Jumping between code and Org
13836
13837When tangling code from an Org-mode buffer to a source code file, you'll
13838frequently find yourself viewing the file of tangled source code (e.g., many
13839debuggers point to lines of the source code file). It is useful to be able
13840to navigate from the tangled source to the Org-mode buffer from which the
13841code originated.
13842
13843The @code{org-babel-tangle-jump-to-org} function provides this jumping from
13844code to Org-mode functionality. Two header arguments are required for
13845jumping to work, first the @code{padline} (@ref{padline}) option must be set
13846to true (the default setting), second the @code{comments} (@ref{comments})
13847header argument must be set to @code{links}, which will insert comments into
13848the source code buffer which point back to the original Org-mode file.
13849
12920@node Evaluating code blocks, Library of Babel, Extracting source code, Working With Source Code 13850@node Evaluating code blocks, Library of Babel, Extracting source code, Working With Source Code
12921@section Evaluating code blocks 13851@section Evaluating code blocks
12922@cindex code block, evaluating 13852@cindex code block, evaluating
@@ -12943,7 +13873,7 @@ used to define a code block).
12943@kindex C-c C-c 13873@kindex C-c C-c
12944There are a number of ways to evaluate code blocks. The simplest is to press 13874There are a number of ways to evaluate code blocks. The simplest is to press
12945@kbd{C-c C-c} or @kbd{C-c C-v e} with the point on a code block@footnote{The 13875@kbd{C-c C-c} or @kbd{C-c C-v e} with the point on a code block@footnote{The
12946@code{org-babel-no-eval-on-ctrl-c-ctrl-c} variable can be used to remove code 13876option @code{org-babel-no-eval-on-ctrl-c-ctrl-c} can be used to remove code
12947evaluation from the @kbd{C-c C-c} key binding.}. This will call the 13877evaluation from the @kbd{C-c C-c} key binding.}. This will call the
12948@code{org-babel-execute-src-block} function to evaluate the block and insert 13878@code{org-babel-execute-src-block} function to evaluate the block and insert
12949its results into the Org mode buffer. 13879its results into the Org mode buffer.
@@ -13054,10 +13984,10 @@ Language-specific documentation is available for some languages. If
13054available, it can be found at 13984available, it can be found at
13055@uref{http://orgmode.org/worg/org-contrib/babel/languages.html}. 13985@uref{http://orgmode.org/worg/org-contrib/babel/languages.html}.
13056 13986
13057The @code{org-babel-load-languages} controls which languages are enabled for 13987The option @code{org-babel-load-languages} controls which languages are
13058evaluation (by default only @code{emacs-lisp} is enabled). This variable can 13988enabled for evaluation (by default only @code{emacs-lisp} is enabled). This
13059be set using the customization interface or by adding code like the following 13989variable can be set using the customization interface or by adding code like
13060to your emacs configuration. 13990the following to your emacs configuration.
13061 13991
13062@quotation 13992@quotation
13063The following disables @code{emacs-lisp} evaluation and enables evaluation of 13993The following disables @code{emacs-lisp} evaluation and enables evaluation of
@@ -13099,13 +14029,16 @@ describes each header argument in detail.
13099@node Using header arguments, Specific header arguments, Header arguments, Header arguments 14029@node Using header arguments, Specific header arguments, Header arguments, Header arguments
13100@subsection Using header arguments 14030@subsection Using header arguments
13101 14031
13102The values of header arguments can be set in six different ways, each more 14032The values of header arguments can be set in several way. When the header
13103specific (and having higher priority) than the last. 14033arguments in each layer have been determined, they are combined in order from
14034the first, least specific (having the lowest priority) up to the last, most
14035specific (having the highest priority). A header argument with a higher
14036priority replaces the same header argument specified at lower priority.
13104@menu 14037@menu
13105* System-wide header arguments:: Set global default values 14038* System-wide header arguments:: Set global default values
13106* Language-specific header arguments:: Set default values by language 14039* Language-specific header arguments:: Set default values by language
13107* Buffer-wide header arguments:: Set default values for a specific buffer
13108* Header arguments in Org mode properties:: Set default values for a buffer or heading 14040* Header arguments in Org mode properties:: Set default values for a buffer or heading
14041* Language-specific header arguments in Org mode properties:: Set language-specific default values for a buffer or heading
13109* Code block specific header arguments:: The most common way to set values 14042* Code block specific header arguments:: The most common way to set values
13110* Header arguments in function calls:: The most specific level 14043* Header arguments in function calls:: The most specific level
13111@end menu 14044@end menu
@@ -13114,7 +14047,7 @@ specific (and having higher priority) than the last.
13114@node System-wide header arguments, Language-specific header arguments, Using header arguments, Using header arguments 14047@node System-wide header arguments, Language-specific header arguments, Using header arguments, Using header arguments
13115@subsubheading System-wide header arguments 14048@subsubheading System-wide header arguments
13116@vindex org-babel-default-header-args 14049@vindex org-babel-default-header-args
13117System-wide values of header arguments can be specified by customizing the 14050System-wide values of header arguments can be specified by adapting the
13118@code{org-babel-default-header-args} variable: 14051@code{org-babel-default-header-args} variable:
13119 14052
13120@example 14053@example
@@ -13125,20 +14058,6 @@ System-wide values of header arguments can be specified by customizing the
13125:noweb => "no" 14058:noweb => "no"
13126@end example 14059@end example
13127 14060
13128@c @example
13129@c org-babel-default-header-args is a variable defined in `org-babel.el'.
13130@c Its value is
13131@c ((:session . "none")
13132@c (:results . "replace")
13133@c (:exports . "code")
13134@c (:cache . "no")
13135@c (:noweb . "no"))
13136
13137
13138@c Documentation:
13139@c Default arguments to use when evaluating a code block.
13140@c @end example
13141
13142For example, the following example could be used to set the default value of 14061For example, the following example could be used to set the default value of
13143@code{:noweb} header arguments to @code{yes}. This would have the effect of 14062@code{:noweb} header arguments to @code{yes}. This would have the effect of
13144expanding @code{:noweb} references by default when evaluating source code 14063expanding @code{:noweb} references by default when evaluating source code
@@ -13147,64 +14066,88 @@ blocks.
13147@lisp 14066@lisp
13148(setq org-babel-default-header-args 14067(setq org-babel-default-header-args
13149 (cons '(:noweb . "yes") 14068 (cons '(:noweb . "yes")
13150 (assq-delete-all :noweb org-babel-default-header-args))) 14069 (assq-delete-all :noweb org-babel-default-header-args)))
13151@end lisp 14070@end lisp
13152 14071
13153@node Language-specific header arguments, Buffer-wide header arguments, System-wide header arguments, Using header arguments 14072@node Language-specific header arguments, Header arguments in Org mode properties, System-wide header arguments, Using header arguments
13154@subsubheading Language-specific header arguments 14073@subsubheading Language-specific header arguments
13155Each language can define its own set of default header arguments. See the 14074Each language can define its own set of default header arguments in variable
13156language-specific documentation available online at 14075@code{org-babel-default-header-args:<lang>}, where @code{<lang>} is the name
14076of the language. See the language-specific documentation available online at
13157@uref{http://orgmode.org/worg/org-contrib/babel}. 14077@uref{http://orgmode.org/worg/org-contrib/babel}.
13158 14078
13159@node Buffer-wide header arguments, Header arguments in Org mode properties, Language-specific header arguments, Using header arguments 14079@node Header arguments in Org mode properties, Language-specific header arguments in Org mode properties, Language-specific header arguments, Using header arguments
13160@subsubheading Buffer-wide header arguments 14080@subsubheading Header arguments in Org mode properties
14081
13161Buffer-wide header arguments may be specified as properties through the use 14082Buffer-wide header arguments may be specified as properties through the use
13162of @code{#+PROPERTY:} lines placed anywhere in an Org mode file (see 14083of @code{#+PROPERTY:} lines placed anywhere in an Org mode file (see
13163@ref{Property syntax}). 14084@ref{Property syntax}).
13164 14085
13165For example the following would set @code{session} to @code{*R*}, and 14086For example the following would set @code{session} to @code{*R*} (only for R
13166@code{results} to @code{silent} for every code block in the buffer, ensuring 14087code blocks), and @code{results} to @code{silent} for every code block in the
13167that all execution took place in the same session, and no results would be 14088buffer, ensuring that all execution took place in the same session, and no
13168inserted into the buffer. 14089results would be inserted into the buffer.
13169 14090
13170@example 14091@example
13171#+PROPERTY: session *R* 14092#+PROPERTY: header-args:R :session *R*
13172#+PROPERTY: results silent 14093#+PROPERTY: header-args :results silent
13173@end example
13174
13175@node Header arguments in Org mode properties, Code block specific header arguments, Buffer-wide header arguments, Using header arguments
13176@subsubheading Header arguments in Org mode properties
13177
13178Header arguments are also read from Org mode properties (see @ref{Property
13179syntax}), which can be set on a buffer-wide or per-heading basis. An example
13180of setting a header argument for all code blocks in a buffer is
13181
13182@example
13183#+PROPERTY: tangle yes
13184@end example 14094@end example
13185 14095
14096Header arguments read from Org mode properties can also be set on a
14097per-subtree basis using property drawers (see @ref{Property syntax}).
13186@vindex org-use-property-inheritance 14098@vindex org-use-property-inheritance
13187When properties are used to set default header arguments, they are looked up 14099When properties are used to set default header arguments, they are always
13188with inheritance, regardless of the value of 14100looked up with inheritance, regardless of the value of
13189@code{org-use-property-inheritance}. In the following example the value of 14101@code{org-use-property-inheritance}. Properties are evaluated as seen by the
14102outermost call or source block.@footnote{The deprecated syntax for default
14103header argument properties, using the name of the header argument as a
14104property name directly, evaluates the property as seen by the corresponding
14105source block definition. This behaviour has been kept for backwards
14106compatibility.}
14107
14108In the following example the value of
13190the @code{:cache} header argument will default to @code{yes} in all code 14109the @code{:cache} header argument will default to @code{yes} in all code
13191blocks in the subtree rooted at the following heading: 14110blocks in the subtree rooted at the following heading:
13192 14111
13193@example 14112@example
13194* outline header 14113* outline header
13195 :PROPERTIES: 14114 :PROPERTIES:
13196 :cache: yes 14115 :header-args: :cache yes
13197 :END: 14116 :END:
13198@end example 14117@end example
13199 14118
13200@kindex C-c C-x p 14119@kindex C-c C-x p
13201@vindex org-babel-default-header-args 14120@vindex org-babel-default-header-args
13202Properties defined in this way override the properties set in 14121Properties defined in this way override the properties set in
13203@code{org-babel-default-header-args}. It is convenient to use the 14122@code{org-babel-default-header-args} and are applied for all activated
13204@code{org-set-property} function bound to @kbd{C-c C-x p} to set properties 14123languages. It is convenient to use the @code{org-set-property} function
13205in Org mode documents. 14124bound to @kbd{C-c C-x p} to set properties in Org mode documents.
13206 14125
13207@node Code block specific header arguments, Header arguments in function calls, Header arguments in Org mode properties, Using header arguments 14126@node Language-specific header arguments in Org mode properties, Code block specific header arguments, Header arguments in Org mode properties, Using header arguments
14127@subsubheading Language-specific header arguments in Org mode properties
14128
14129Language-specific header arguments are also read from properties
14130@code{header-args:<lang>} where @code{<lang>} is the name of the language
14131targeted. As an example
14132
14133@example
14134* Heading
14135 :PROPERTIES:
14136 :header-args:clojure: :session *clojure-1*
14137 :header-args:R: :session *R*
14138 :END:
14139** Subheading
14140 :PROPERTIES:
14141 :header-args:clojure: :session *clojure-2*
14142 :END:
14143@end example
14144
14145would independently set a default session header argument for R and clojure
14146for calls and source blocks under subtree ``Heading'' and change to a
14147different clojure setting for evaluations under subtree ``Subheading'', while
14148the R session is inherited from ``Heading'' and therefore unchanged.
14149
14150@node Code block specific header arguments, Header arguments in function calls, Language-specific header arguments in Org mode properties, Using header arguments
13208@subsubheading Code block specific header arguments 14151@subsubheading Code block specific header arguments
13209 14152
13210The most common way to assign values to header arguments is at the 14153The most common way to assign values to header arguments is at the
@@ -13318,8 +14261,12 @@ argument in lowercase letters. The following header arguments are defined:
13318* colnames:: Handle column names in tables 14261* colnames:: Handle column names in tables
13319* rownames:: Handle row names in tables 14262* rownames:: Handle row names in tables
13320* shebang:: Make tangled files executable 14263* shebang:: Make tangled files executable
14264* tangle-mode:: Set permission of tangled files
13321* eval:: Limit evaluation of specific code blocks 14265* eval:: Limit evaluation of specific code blocks
13322* wrap:: Mark source block evaluation results 14266* wrap:: Mark source block evaluation results
14267* post:: Post processing of code block results
14268* prologue:: Text to prepend to code block body
14269* epilogue:: Text to append to code block body
13323@end menu 14270@end menu
13324 14271
13325Additional header arguments are defined on a language-specific basis, see 14272Additional header arguments are defined on a language-specific basis, see
@@ -13334,11 +14281,13 @@ syntax used to specify arguments is the same across all languages. In every
13334case, variables require a default value when they are declared. 14281case, variables require a default value when they are declared.
13335 14282
13336The values passed to arguments can either be literal values, references, or 14283The values passed to arguments can either be literal values, references, or
13337Emacs Lisp code (see @ref{var, Emacs Lisp evaluation of variables}). References 14284Emacs Lisp code (see @ref{var, Emacs Lisp evaluation of variables}).
13338include anything in the Org mode file that takes a @code{#+NAME:}, 14285References include anything in the Org mode file that takes a @code{#+NAME:}
13339@code{#+TBLNAME:}, or @code{#+RESULTS:} line. This includes tables, lists, 14286or @code{#+RESULTS:} line: tables, lists, @code{#+BEGIN_EXAMPLE} blocks,
13340@code{#+BEGIN_EXAMPLE} blocks, other code blocks, and the results of other 14287other code blocks and the results of other code blocks.
13341code blocks. 14288
14289Note: When a reference is made to another code block, the referenced block
14290will be evaluated unless it has current cached results (see @ref{cache}).
13342 14291
13343Argument values can be indexed in a manner similar to arrays (see @ref{var, 14292Argument values can be indexed in a manner similar to arrays (see @ref{var,
13344Indexable variable values}). 14293Indexable variable values}).
@@ -13360,10 +14309,10 @@ Here are examples of passing values by reference:
13360@table @dfn 14309@table @dfn
13361 14310
13362@item table 14311@item table
13363an Org mode table named with either a @code{#+NAME:} or @code{#+TBLNAME:} line 14312an Org mode table named with either a @code{#+NAME:} line
13364 14313
13365@example 14314@example
13366#+TBLNAME: example-table 14315#+NAME: example-table
13367| 1 | 14316| 1 |
13368| 2 | 14317| 2 |
13369| 3 | 14318| 3 |
@@ -13456,19 +14405,6 @@ on two lines
13456 14405
13457@end table 14406@end table
13458 14407
13459@subsubheading Alternate argument syntax
13460It is also possible to specify arguments in a potentially more natural way
13461using the @code{#+NAME:} line of a code block. As in the following
13462example, arguments can be packed inside of parentheses, separated by commas,
13463following the source name.
13464
13465@example
13466#+NAME: double(input=0, x=2)
13467#+BEGIN_SRC emacs-lisp
13468(* 2 (+ input x))
13469#+END_SRC
13470@end example
13471
13472@subsubheading Indexable variable values 14408@subsubheading Indexable variable values
13473It is possible to reference portions of variable values by ``indexing'' into 14409It is possible to reference portions of variable values by ``indexing'' into
13474the variables. Indexes are 0 based with negative values counting back from 14410the variables. Indexes are 0 based with negative values counting back from
@@ -13593,7 +14529,7 @@ Emacs Lisp, as shown in the following example.
13593@node results, file, var, Specific header arguments 14529@node results, file, var, Specific header arguments
13594@subsubsection @code{:results} 14530@subsubsection @code{:results}
13595 14531
13596There are three classes of @code{:results} header argument. Only one option 14532There are four classes of @code{:results} header argument. Only one option
13597per class may be supplied per code block. 14533per class may be supplied per code block.
13598 14534
13599@itemize @bullet 14535@itemize @bullet
@@ -13602,6 +14538,10 @@ per class may be supplied per code block.
13602from the code block 14538from the code block
13603@item 14539@item
13604@b{type} header arguments specify what type of result the code block will 14540@b{type} header arguments specify what type of result the code block will
14541return---which has implications for how they will be processed before
14542insertion into the Org mode buffer
14543@item
14544@b{format} header arguments specify what type of result the code block will
13605return---which has implications for how they will be inserted into the 14545return---which has implications for how they will be inserted into the
13606Org mode buffer 14546Org mode buffer
13607@item 14547@item
@@ -13647,6 +14587,15 @@ buffer as quoted text. E.g., @code{:results value verbatim}.
13647@item @code{file} 14587@item @code{file}
13648The results will be interpreted as the path to a file, and will be inserted 14588The results will be interpreted as the path to a file, and will be inserted
13649into the Org mode buffer as a file link. E.g., @code{:results value file}. 14589into the Org mode buffer as a file link. E.g., @code{:results value file}.
14590@end itemize
14591
14592@subsubheading Format
14593
14594The following options are mutually exclusive and specify what type of results
14595the code block will return. By default, results are inserted according to the
14596type as specified above.
14597
14598@itemize @bullet
13650@item @code{raw} 14599@item @code{raw}
13651The results are interpreted as raw Org mode code and are inserted directly 14600The results are interpreted as raw Org mode code and are inserted directly
13652into the buffer. If the results look like a table they will be aligned as 14601into the buffer. If the results look like a table they will be aligned as
@@ -13728,7 +14677,7 @@ While the @code{:file} header argument can be used to specify the path to the
13728output file, @code{:dir} specifies the default directory during code block 14677output file, @code{:dir} specifies the default directory during code block
13729execution. If it is absent, then the directory associated with the current 14678execution. If it is absent, then the directory associated with the current
13730buffer is used. In other words, supplying @code{:dir path} temporarily has 14679buffer is used. In other words, supplying @code{:dir path} temporarily has
13731the same effect as changing the current directory with @kbd{M-x cd path}, and 14680the same effect as changing the current directory with @kbd{M-x cd path RET}, and
13732then not supplying @code{:dir}. Under the surface, @code{:dir} simply sets 14681then not supplying @code{:dir}. Under the surface, @code{:dir} simply sets
13733the value of the Emacs variable @code{default-directory}. 14682the value of the Emacs variable @code{default-directory}.
13734 14683
@@ -13853,7 +14802,6 @@ original Org file from which the code was tangled.
13853A synonym for ``link'' to maintain backwards compatibility. 14802A synonym for ``link'' to maintain backwards compatibility.
13854@item @code{org} 14803@item @code{org}
13855Include text from the Org mode file as a comment. 14804Include text from the Org mode file as a comment.
13856
13857The text is picked from the leading context of the tangled code and is 14805The text is picked from the leading context of the tangled code and is
13858limited by the nearest headline or source block as the case may be. 14806limited by the nearest headline or source block as the case may be.
13859@item @code{both} 14807@item @code{both}
@@ -13925,7 +14873,7 @@ references will not be expanded when the code block is exported.
13925@item @code{strip-export} 14873@item @code{strip-export}
13926``Noweb'' syntax references in the body of the code block will be expanded 14874``Noweb'' syntax references in the body of the code block will be expanded
13927before the block is evaluated or tangled. However, ``noweb'' syntax 14875before the block is evaluated or tangled. However, ``noweb'' syntax
13928references will not be removed when the code block is exported. 14876references will be removed when the code block is exported.
13929@item @code{eval} 14877@item @code{eval}
13930``Noweb'' syntax references in the body of the code block will only be 14878``Noweb'' syntax references in the body of the code block will only be
13931expanded before the block is evaluated. 14879expanded before the block is evaluated.
@@ -14085,7 +15033,7 @@ variable and raises an error. Setting @code{:hlines no} or relying on the
14085default value yields the following results. 15033default value yields the following results.
14086 15034
14087@example 15035@example
14088#+TBLNAME: many-cols 15036#+NAME: many-cols
14089| a | b | c | 15037| a | b | c |
14090|---+---+---| 15038|---+---+---|
14091| d | e | f | 15039| d | e | f |
@@ -14107,7 +15055,7 @@ default value yields the following results.
14107Leaves hlines in the table. Setting @code{:hlines yes} has this effect. 15055Leaves hlines in the table. Setting @code{:hlines yes} has this effect.
14108 15056
14109@example 15057@example
14110#+TBLNAME: many-cols 15058#+NAME: many-cols
14111| a | b | c | 15059| a | b | c |
14112|---+---+---| 15060|---+---+---|
14113| d | e | f | 15061| d | e | f |
@@ -14134,9 +15082,7 @@ Leaves hlines in the table. Setting @code{:hlines yes} has this effect.
14134The @code{:colnames} header argument accepts the values @code{yes}, 15082The @code{:colnames} header argument accepts the values @code{yes},
14135@code{no}, or @code{nil} for unassigned. The default value is @code{nil}. 15083@code{no}, or @code{nil} for unassigned. The default value is @code{nil}.
14136Note that the behavior of the @code{:colnames} header argument may differ 15084Note that the behavior of the @code{:colnames} header argument may differ
14137across languages. For example Emacs Lisp code blocks ignore the 15085across languages.
14138@code{:colnames} header argument entirely given the ease with which tables
14139with column names may be handled directly in Emacs Lisp.
14140 15086
14141@itemize @bullet 15087@itemize @bullet
14142@item @code{nil} 15088@item @code{nil}
@@ -14146,7 +15092,7 @@ names will be removed from the table before
14146processing, then reapplied to the results. 15092processing, then reapplied to the results.
14147 15093
14148@example 15094@example
14149#+TBLNAME: less-cols 15095#+NAME: less-cols
14150| a | 15096| a |
14151|---| 15097|---|
14152| b | 15098| b |
@@ -14179,8 +15125,10 @@ hline)
14179@node rownames, shebang, colnames, Specific header arguments 15125@node rownames, shebang, colnames, Specific header arguments
14180@subsubsection @code{:rownames} 15126@subsubsection @code{:rownames}
14181 15127
14182The @code{:rownames} header argument can take on the values @code{yes} 15128The @code{:rownames} header argument can take on the values @code{yes} or
14183or @code{no}, with a default value of @code{no}. 15129@code{no}, with a default value of @code{no}. Note that Emacs Lisp code
15130blocks ignore the @code{:rownames} header argument entirely given the ease
15131with which tables with row names may be handled directly in Emacs Lisp.
14184 15132
14185@itemize @bullet 15133@itemize @bullet
14186@item @code{no} 15134@item @code{no}
@@ -14191,7 +15139,7 @@ The first column of the table is removed from the table before processing,
14191and is then reapplied to the results. 15139and is then reapplied to the results.
14192 15140
14193@example 15141@example
14194#+TBLNAME: with-rownames 15142#+NAME: with-rownames
14195| one | 1 | 2 | 3 | 4 | 5 | 15143| one | 1 | 2 | 3 | 4 | 5 |
14196| two | 6 | 7 | 8 | 9 | 10 | 15144| two | 6 | 7 | 8 | 9 | 10 |
14197 15145
@@ -14210,7 +15158,7 @@ variable indexing @xref{var, Indexable variable values}.
14210 15158
14211@end itemize 15159@end itemize
14212 15160
14213@node shebang, eval, rownames, Specific header arguments 15161@node shebang, tangle-mode, rownames, Specific header arguments
14214@subsubsection @code{:shebang} 15162@subsubsection @code{:shebang}
14215 15163
14216Setting the @code{:shebang} header argument to a string value 15164Setting the @code{:shebang} header argument to a string value
@@ -14218,7 +15166,21 @@ Setting the @code{:shebang} header argument to a string value
14218first line of any tangled file holding the code block, and the file 15166first line of any tangled file holding the code block, and the file
14219permissions of the tangled file are set to make it executable. 15167permissions of the tangled file are set to make it executable.
14220 15168
14221@node eval, wrap, shebang, Specific header arguments 15169
15170@node tangle-mode, eval, shebang, Specific header arguments
15171@subsubsection @code{:tangle-mode}
15172
15173The @code{tangle-mode} header argument controls the permission set on tangled
15174files. The value of this header argument will be passed to
15175@code{set-file-modes}. For example, to set a tangled file as read only use
15176@code{:tangle-mode (identity #o444)}, or to set a tangled file as executable
15177use @code{:tangle-mode (identity #o755)}. Blocks with @code{shebang}
15178(@ref{shebang}) header arguments will automatically be made executable unless
15179the @code{tangle-mode} header argument is also used. The behavior is
15180undefined if multiple code blocks with different values for the
15181@code{tangle-mode} header argument are tangled to the same file.
15182
15183@node eval, wrap, tangle-mode, Specific header arguments
14222@subsubsection @code{:eval} 15184@subsubsection @code{:eval}
14223The @code{:eval} header argument can be used to limit the evaluation of 15185The @code{:eval} header argument can be used to limit the evaluation of
14224specific code blocks. The @code{:eval} header argument can be useful for 15186specific code blocks. The @code{:eval} header argument can be useful for
@@ -14243,7 +15205,7 @@ If this header argument is not set then evaluation is determined by the value
14243of the @code{org-confirm-babel-evaluate} variable see @ref{Code evaluation 15205of the @code{org-confirm-babel-evaluate} variable see @ref{Code evaluation
14244security}. 15206security}.
14245 15207
14246@node wrap, , eval, Specific header arguments 15208@node wrap, post, eval, Specific header arguments
14247@subsubsection @code{:wrap} 15209@subsubsection @code{:wrap}
14248The @code{:wrap} header argument is used to mark the results of source block 15210The @code{:wrap} header argument is used to mark the results of source block
14249evaluation. The header argument can be passed a string that will be appended 15211evaluation. The header argument can be passed a string that will be appended
@@ -14251,6 +15213,59 @@ to @code{#+BEGIN_} and @code{#+END_}, which will then be used to wrap the
14251results. If not string is specified then the results will be wrapped in a 15213results. If not string is specified then the results will be wrapped in a
14252@code{#+BEGIN/END_RESULTS} block. 15214@code{#+BEGIN/END_RESULTS} block.
14253 15215
15216@node post, prologue, wrap, Specific header arguments
15217@subsubsection @code{:post}
15218The @code{:post} header argument is used to post-process the results of a
15219code block execution. When a post argument is given, the results of the code
15220block will temporarily be bound to the @code{*this*} variable. This variable
15221may then be included in header argument forms such as those used in @ref{var}
15222header argument specifications allowing passing of results to other code
15223blocks, or direct execution via Emacs Lisp.
15224
15225The following example illustrates the usage of the @code{:post} header
15226argument.
15227
15228@example
15229#+name: attr_wrap
15230#+begin_src sh :var data="" :var width="\\textwidth" :results output
15231 echo "#+ATTR_LATEX :width $width"
15232 echo "$data"
15233#+end_src
15234
15235#+header: :file /tmp/it.png
15236#+begin_src dot :post attr_wrap(width="5cm", data=*this*) :results drawer
15237 digraph@{
15238 a -> b;
15239 b -> c;
15240 c -> a;
15241 @}
15242#+end_src
15243
15244#+RESULTS:
15245:RESULTS:
15246#+ATTR_LATEX :width 5cm
15247[[file:/tmp/it.png]]
15248:END:
15249@end example
15250
15251@node prologue, epilogue, post, Specific header arguments
15252@subsubsection @code{:prologue}
15253The value of the @code{prologue} header argument will be prepended to the
15254code block body before execution. For example, @code{:prologue "reset"} may
15255be used to reset a gnuplot session before execution of a particular code
15256block, or the following configuration may be used to do this for all gnuplot
15257code blocks. Also see @ref{epilogue}.
15258
15259@lisp
15260(add-to-list 'org-babel-default-header-args:gnuplot
15261 '((:prologue . "reset")))
15262@end lisp
15263
15264@node epilogue, , prologue, Specific header arguments
15265@subsubsection @code{:epilogue}
15266The value of the @code{epilogue} header argument will be appended to the code
15267block body before execution. Also see @ref{prologue}.
15268
14254@node Results of evaluation, Noweb reference syntax, Header arguments, Working With Source Code 15269@node Results of evaluation, Noweb reference syntax, Header arguments, Working With Source Code
14255@section Results of evaluation 15270@section Results of evaluation
14256@cindex code block, results of evaluation 15271@cindex code block, results of evaluation
@@ -14380,7 +15395,7 @@ syntactically valid in languages that you use, then please consider setting
14380the default value. 15395the default value.
14381 15396
14382Note: if noweb tangling is slow in large Org mode files consider setting the 15397Note: if noweb tangling is slow in large Org mode files consider setting the
14383@code{*org-babel-use-quick-and-dirty-noweb-expansion*} variable to true. 15398@code{org-babel-use-quick-and-dirty-noweb-expansion} variable to @code{t}.
14384This will result in faster noweb reference resolution at the expense of not 15399This will result in faster noweb reference resolution at the expense of not
14385correctly resolving inherited values of the @code{:noweb-ref} header 15400correctly resolving inherited values of the @code{:noweb-ref} header
14386argument. 15401argument.
@@ -14540,7 +15555,7 @@ emacs -Q --batch \
14540* Clean view:: Getting rid of leading stars in the outline 15555* Clean view:: Getting rid of leading stars in the outline
14541* TTY keys:: Using Org on a tty 15556* TTY keys:: Using Org on a tty
14542* Interaction:: Other Emacs packages 15557* Interaction:: Other Emacs packages
14543* org-crypt.el:: Encrypting Org files 15558* org-crypt:: Encrypting Org files
14544@end menu 15559@end menu
14545 15560
14546 15561
@@ -14694,19 +15709,19 @@ which take off the default security brakes.
14694 15709
14695@defopt org-confirm-babel-evaluate 15710@defopt org-confirm-babel-evaluate
14696When t (the default), the user is asked before every code block evaluation. 15711When t (the default), the user is asked before every code block evaluation.
14697When nil, the user is not asked. When set to a function, it is called with 15712When @code{nil}, the user is not asked. When set to a function, it is called with
14698two arguments (language and body of the code block) and should return t to 15713two arguments (language and body of the code block) and should return t to
14699ask and nil not to ask. 15714ask and @code{nil} not to ask.
14700@end defopt 15715@end defopt
14701 15716
14702For example, here is how to execute "ditaa" code (which is considered safe) 15717For example, here is how to execute "ditaa" code (which is considered safe)
14703without asking: 15718without asking:
14704 15719
14705@example 15720@lisp
14706(defun my-org-confirm-babel-evaluate (lang body) 15721(defun my-org-confirm-babel-evaluate (lang body)
14707 (not (string= lang "ditaa"))) ; don't ask for ditaa 15722 (not (string= lang "ditaa"))) ; don't ask for ditaa
14708(setq org-confirm-babel-evaluate 'my-org-confirm-babel-evaluate) 15723(setq org-confirm-babel-evaluate 'my-org-confirm-babel-evaluate)
14709@end example 15724@end lisp
14710 15725
14711@item Following @code{shell} and @code{elisp} links 15726@item Following @code{shell} and @code{elisp} links
14712Org has two link types that can directly evaluate code (@pxref{External 15727Org has two link types that can directly evaluate code (@pxref{External
@@ -14734,7 +15749,7 @@ either by the @i{calc} interpreter, or by the @i{Emacs Lisp} interpreter.
14734There are more than 500 variables that can be used to customize 15749There are more than 500 variables that can be used to customize
14735Org. For the sake of compactness of the manual, I am not 15750Org. For the sake of compactness of the manual, I am not
14736describing the variables here. A structured overview of customization 15751describing the variables here. A structured overview of customization
14737variables is available with @kbd{M-x org-customize}. Or select 15752variables is available with @kbd{M-x org-customize RET}. Or select
14738@code{Browse Org Group} from the @code{Org->Customization} menu. Many 15753@code{Browse Org Group} from the @code{Org->Customization} menu. Many
14739settings can also be activated on a per-file basis, by putting special 15754settings can also be activated on a per-file basis, by putting special
14740lines into the buffer (@pxref{In-buffer settings}). 15755lines into the buffer (@pxref{In-buffer settings}).
@@ -14809,7 +15824,7 @@ as if they had been included in the buffer. In particular, the file can be
14809any other Org mode file with internal setup. You can visit the file the 15824any other Org mode file with internal setup. You can visit the file the
14810cursor is in the line with @kbd{C-c '}. 15825cursor is in the line with @kbd{C-c '}.
14811@item #+STARTUP: 15826@item #+STARTUP:
14812@cindex #+STARTUP: 15827@cindex #+STARTUP
14813This line sets options to be used at startup of Org mode, when an 15828This line sets options to be used at startup of Org mode, when an
14814Org file is being visited. 15829Org file is being visited.
14815 15830
@@ -14862,6 +15877,18 @@ inlineimages @r{show inline images}
14862noinlineimages @r{don't show inline images on startup} 15877noinlineimages @r{don't show inline images on startup}
14863@end example 15878@end example
14864 15879
15880@vindex org-startup-with-latex-preview
15881When visiting a file, @LaTeX{} fragments can be converted to images
15882automatically. The variable @code{org-startup-with-latex-preview} which
15883controls this behavior, is set to @code{nil} by default to avoid delays on
15884startup.
15885@cindex @code{latexpreview}, STARTUP keyword
15886@cindex @code{nolatexpreview}, STARTUP keyword
15887@example
15888latexpreview @r{preview @LaTeX{} fragments}
15889nolatexpreview @r{don't preview @LaTeX{} fragments}
15890@end example
15891
14865@vindex org-log-done 15892@vindex org-log-done
14866@vindex org-log-note-clock-out 15893@vindex org-log-note-clock-out
14867@vindex org-log-repeat 15894@vindex org-log-repeat
@@ -14885,25 +15912,34 @@ configured using these options (see variables @code{org-log-done},
14885@cindex @code{logrefile}, STARTUP keyword 15912@cindex @code{logrefile}, STARTUP keyword
14886@cindex @code{lognoterefile}, STARTUP keyword 15913@cindex @code{lognoterefile}, STARTUP keyword
14887@cindex @code{nologrefile}, STARTUP keyword 15914@cindex @code{nologrefile}, STARTUP keyword
14888@example 15915@cindex @code{logdrawer}, STARTUP keyword
14889logdone @r{record a timestamp when an item is marked DONE} 15916@cindex @code{nologdrawer}, STARTUP keyword
14890lognotedone @r{record timestamp and a note when DONE} 15917@cindex @code{logstatesreversed}, STARTUP keyword
14891nologdone @r{don't record when items are marked DONE} 15918@cindex @code{nologstatesreversed}, STARTUP keyword
14892logrepeat @r{record a time when reinstating a repeating item} 15919@example
14893lognoterepeat @r{record a note when reinstating a repeating item} 15920logdone @r{record a timestamp when an item is marked DONE}
14894nologrepeat @r{do not record when reinstating repeating item} 15921lognotedone @r{record timestamp and a note when DONE}
14895lognoteclock-out @r{record a note when clocking out} 15922nologdone @r{don't record when items are marked DONE}
14896nolognoteclock-out @r{don't record a note when clocking out} 15923logrepeat @r{record a time when reinstating a repeating item}
14897logreschedule @r{record a timestamp when scheduling time changes} 15924lognoterepeat @r{record a note when reinstating a repeating item}
14898lognotereschedule @r{record a note when scheduling time changes} 15925nologrepeat @r{do not record when reinstating repeating item}
14899nologreschedule @r{do not record when a scheduling date changes} 15926lognoteclock-out @r{record a note when clocking out}
14900logredeadline @r{record a timestamp when deadline changes} 15927nolognoteclock-out @r{don't record a note when clocking out}
14901lognoteredeadline @r{record a note when deadline changes} 15928logreschedule @r{record a timestamp when scheduling time changes}
14902nologredeadline @r{do not record when a deadline date changes} 15929lognotereschedule @r{record a note when scheduling time changes}
14903logrefile @r{record a timestamp when refiling} 15930nologreschedule @r{do not record when a scheduling date changes}
14904lognoterefile @r{record a note when refiling} 15931logredeadline @r{record a timestamp when deadline changes}
14905nologrefile @r{do not record when refiling} 15932lognoteredeadline @r{record a note when deadline changes}
15933nologredeadline @r{do not record when a deadline date changes}
15934logrefile @r{record a timestamp when refiling}
15935lognoterefile @r{record a note when refiling}
15936nologrefile @r{do not record when refiling}
15937logdrawer @r{store log into drawer}
15938nologdrawer @r{store log outside of drawer}
15939logstatesreversed @r{reverse the order of states notes}
15940nologstatesreversed @r{do not reverse the order of states notes}
14906@end example 15941@end example
15942
14907@vindex org-hide-leading-stars 15943@vindex org-hide-leading-stars
14908@vindex org-odd-levels-only 15944@vindex org-odd-levels-only
14909Here are the options for hiding leading stars in outline headings, and for 15945Here are the options for hiding leading stars in outline headings, and for
@@ -14922,6 +15958,7 @@ noindent @r{no virtual indentation according to outline level}
14922odd @r{allow only odd outline levels (1,3,...)} 15958odd @r{allow only odd outline levels (1,3,...)}
14923oddeven @r{allow all outline levels} 15959oddeven @r{allow all outline levels}
14924@end example 15960@end example
15961
14925@vindex org-put-time-stamp-overlays 15962@vindex org-put-time-stamp-overlays
14926@vindex org-time-stamp-overlay-formats 15963@vindex org-time-stamp-overlay-formats
14927To turn on custom format overlays over timestamps (variables 15964To turn on custom format overlays over timestamps (variables
@@ -14931,6 +15968,7 @@ To turn on custom format overlays over timestamps (variables
14931@example 15968@example
14932customtime @r{overlay custom time format} 15969customtime @r{overlay custom time format}
14933@end example 15970@end example
15971
14934@vindex constants-unit-system 15972@vindex constants-unit-system
14935The following options influence the table spreadsheet (variable 15973The following options influence the table spreadsheet (variable
14936@code{constants-unit-system}). 15974@code{constants-unit-system}).
@@ -14940,6 +15978,7 @@ The following options influence the table spreadsheet (variable
14940constcgs @r{@file{constants.el} should use the c-g-s unit system} 15978constcgs @r{@file{constants.el} should use the c-g-s unit system}
14941constSI @r{@file{constants.el} should use the SI unit system} 15979constSI @r{@file{constants.el} should use the SI unit system}
14942@end example 15980@end example
15981
14943@vindex org-footnote-define-inline 15982@vindex org-footnote-define-inline
14944@vindex org-footnote-auto-label 15983@vindex org-footnote-auto-label
14945@vindex org-footnote-auto-adjust 15984@vindex org-footnote-auto-adjust
@@ -14966,6 +16005,7 @@ fnplain @r{create @code{[1]}-like labels automatically}
14966fnadjust @r{automatically renumber and sort footnotes} 16005fnadjust @r{automatically renumber and sort footnotes}
14967nofnadjust @r{do not renumber and sort automatically} 16006nofnadjust @r{do not renumber and sort automatically}
14968@end example 16007@end example
16008
14969@cindex org-hide-block-startup 16009@cindex org-hide-block-startup
14970To hide blocks on startup, use these keywords. The corresponding variable is 16010To hide blocks on startup, use these keywords. The corresponding variable is
14971@code{org-hide-block-startup}. 16011@code{org-hide-block-startup}.
@@ -14975,6 +16015,7 @@ To hide blocks on startup, use these keywords. The corresponding variable is
14975hideblocks @r{Hide all begin/end blocks on startup} 16015hideblocks @r{Hide all begin/end blocks on startup}
14976nohideblocks @r{Do not hide blocks on startup} 16016nohideblocks @r{Do not hide blocks on startup}
14977@end example 16017@end example
16018
14978@cindex org-pretty-entities 16019@cindex org-pretty-entities
14979The display of entities as UTF-8 characters is governed by the variable 16020The display of entities as UTF-8 characters is governed by the variable
14980@code{org-pretty-entities} and the keywords 16021@code{org-pretty-entities} and the keywords
@@ -14984,20 +16025,29 @@ The display of entities as UTF-8 characters is governed by the variable
14984entitiespretty @r{Show entities as UTF-8 characters where possible} 16025entitiespretty @r{Show entities as UTF-8 characters where possible}
14985entitiesplain @r{Leave entities plain} 16026entitiesplain @r{Leave entities plain}
14986@end example 16027@end example
16028
14987@item #+TAGS: TAG1(c1) TAG2(c2) 16029@item #+TAGS: TAG1(c1) TAG2(c2)
14988@vindex org-tag-alist 16030@vindex org-tag-alist
14989These lines (several such lines are allowed) specify the valid tags in 16031These lines (several such lines are allowed) specify the valid tags in
14990this file, and (potentially) the corresponding @emph{fast tag selection} 16032this file, and (potentially) the corresponding @emph{fast tag selection}
14991keys. The corresponding variable is @code{org-tag-alist}. 16033keys. The corresponding variable is @code{org-tag-alist}.
16034@cindex #+TBLFM
14992@item #+TBLFM: 16035@item #+TBLFM:
14993This line contains the formulas for the table directly above the line. 16036This line contains the formulas for the table directly above the line.
14994@item #+TITLE:, #+AUTHOR:, #+EMAIL:, #+LANGUAGE:, #+TEXT:, #+DATE:, 16037
14995@itemx #+OPTIONS:, #+BIND:, #+XSLT:, 16038Table can have multiple lines containing @samp{#+TBLFM:}. Note
16039that only the first line of @samp{#+TBLFM:} will be applied when
16040you recalculate the table. For more details see @ref{Using
16041multiple #+TBLFM lines} in @ref{Editing and debugging formulas}.
16042
16043@item #+TITLE:, #+AUTHOR:, #+EMAIL:, #+LANGUAGE:, #+DATE:,
16044@itemx #+OPTIONS:, #+BIND:,
14996@itemx #+DESCRIPTION:, #+KEYWORDS:, 16045@itemx #+DESCRIPTION:, #+KEYWORDS:,
14997@itemx #+LaTeX_HEADER:, #+STYLE:, #+LINK_UP:, #+LINK_HOME:, 16046@itemx #+LaTeX_HEADER:, #+LaTeX_HEADER_EXTRA:,
14998@itemx #+EXPORT_SELECT_TAGS:, #+EXPORT_EXCLUDE_TAGS: 16047@itemx #+HTML_HEAD:, #+HTML_HEAD_EXTRA:, #+HTML_LINK_UP:, #+HTML_LINK_HOME:,
16048@itemx #+SELECT_TAGS:, #+EXCLUDE_TAGS:
14999These lines provide settings for exporting files. For more details see 16049These lines provide settings for exporting files. For more details see
15000@ref{Export options}. 16050@ref{Export settings}.
15001@item #+TODO: #+SEQ_TODO: #+TYP_TODO: 16051@item #+TODO: #+SEQ_TODO: #+TYP_TODO:
15002@vindex org-todo-keywords 16052@vindex org-todo-keywords
15003These lines set the TODO keywords and their interpretation in the 16053These lines set the TODO keywords and their interpretation in the
@@ -15042,7 +16092,7 @@ If the cursor is in a property line or at the start or end of a property
15042drawer, offer property commands. 16092drawer, offer property commands.
15043@item 16093@item
15044If the cursor is at a footnote reference, go to the corresponding 16094If the cursor is at a footnote reference, go to the corresponding
15045definition, and vice versa. 16095definition, and @emph{vice versa}.
15046@item 16096@item
15047If the cursor is on a statistics cookie, update it. 16097If the cursor is on a statistics cookie, update it.
15048@item 16098@item
@@ -15221,7 +16271,7 @@ tty you would rather use @kbd{C-c .} to re-insert the timestamp.
15221@end multitable 16271@end multitable
15222 16272
15223 16273
15224@node Interaction, org-crypt.el, TTY keys, Miscellaneous 16274@node Interaction, org-crypt, TTY keys, Miscellaneous
15225@section Interaction with other packages 16275@section Interaction with other packages
15226@cindex packages, interaction with other 16276@cindex packages, interaction with other
15227Org lives in the world of GNU Emacs and interacts in various ways 16277Org lives in the world of GNU Emacs and interacts in various ways
@@ -15367,6 +16417,18 @@ Yes, these are unfortunately more difficult to remember. If you want
15367to have other replacement keys, look at the variable 16417to have other replacement keys, look at the variable
15368@code{org-disputed-keys}. 16418@code{org-disputed-keys}.
15369 16419
16420@item @file{ecomplete.el} by Lars Magne Ingebrigtsen @email{larsi@@gnus.org}
16421@cindex @file{ecomplete.el}
16422
16423Ecomplete provides ``electric'' address completion in address header
16424lines in message buffers. Sadly Orgtbl mode cuts ecompletes power
16425supply: No completion happens when Orgtbl mode is enabled in message
16426buffers while entering text in address header lines. If one wants to
16427use ecomplete one should @emph{not} follow the advice to automagically
16428turn on Orgtbl mode in message buffers (see @ref{Orgtbl mode}), but
16429instead---after filling in the message headers---turn on Orgtbl mode
16430manually when needed in the messages body.
16431
15370@item @file{filladapt.el} by Kyle Jones 16432@item @file{filladapt.el} by Kyle Jones
15371@cindex @file{filladapt.el} 16433@cindex @file{filladapt.el}
15372 16434
@@ -15381,7 +16443,7 @@ this:
15381 16443
15382@item @file{yasnippet.el} 16444@item @file{yasnippet.el}
15383@cindex @file{yasnippet.el} 16445@cindex @file{yasnippet.el}
15384The way Org mode binds the TAB key (binding to @code{[tab]} instead of 16446The way Org mode binds the @key{TAB} key (binding to @code{[tab]} instead of
15385@code{"\t"}) overrules YASnippet's access to this key. The following code 16447@code{"\t"}) overrules YASnippet's access to this key. The following code
15386fixed this problem: 16448fixed this problem:
15387 16449
@@ -15406,10 +16468,10 @@ Then, tell Org mode what to do with the new function:
15406@lisp 16468@lisp
15407(add-hook 'org-mode-hook 16469(add-hook 'org-mode-hook
15408 (lambda () 16470 (lambda ()
15409 (make-variable-buffer-local 'yas/trigger-key) 16471 (make-variable-buffer-local 'yas/trigger-key)
15410 (setq yas/trigger-key [tab]) 16472 (setq yas/trigger-key [tab])
15411 (add-to-list 'org-tab-first-hook 'yas/org-very-safe-expand) 16473 (add-to-list 'org-tab-first-hook 'yas/org-very-safe-expand)
15412 (define-key yas/keymap [tab] 'yas/next-field))) 16474 (define-key yas/keymap [tab] 'yas/next-field)))
15413@end lisp 16475@end lisp
15414 16476
15415@item @file{windmove.el} by Hovav Shacham 16477@item @file{windmove.el} by Hovav Shacham
@@ -15440,9 +16502,11 @@ another key for this command, or override the key in
15440(define-key viper-vi-global-user-map "C-c /" 'org-sparse-tree) 16502(define-key viper-vi-global-user-map "C-c /" 'org-sparse-tree)
15441@end lisp 16503@end lisp
15442 16504
16505
16506
15443@end table 16507@end table
15444 16508
15445@node org-crypt.el, , Interaction, Miscellaneous 16509@node org-crypt, , Interaction, Miscellaneous
15446@section org-crypt.el 16510@section org-crypt.el
15447@cindex @file{org-crypt.el} 16511@cindex @file{org-crypt.el}
15448@cindex @code{org-decrypt-entry} 16512@cindex @code{org-decrypt-entry}
@@ -15458,7 +16522,7 @@ customize the @code{org-crypt-tag-matcher} setting.
15458To use org-crypt it is suggested that you have the following in your 16522To use org-crypt it is suggested that you have the following in your
15459@file{.emacs}: 16523@file{.emacs}:
15460 16524
15461@example 16525@lisp
15462(require 'org-crypt) 16526(require 'org-crypt)
15463(org-crypt-use-before-save-magic) 16527(org-crypt-use-before-save-magic)
15464(setq org-tags-exclude-from-inheritance (quote ("crypt"))) 16528(setq org-tags-exclude-from-inheritance (quote ("crypt")))
@@ -15476,7 +16540,7 @@ To use org-crypt it is suggested that you have the following in your
15476 ;; To turn it off only locally, you can insert this: 16540 ;; To turn it off only locally, you can insert this:
15477 ;; 16541 ;;
15478 ;; # -*- buffer-auto-save-file-name: nil; -*- 16542 ;; # -*- buffer-auto-save-file-name: nil; -*-
15479@end example 16543@end lisp
15480 16544
15481Excluding the crypt tag from inheritance prevents already encrypted text 16545Excluding the crypt tag from inheritance prevents already encrypted text
15482being encrypted again. 16546being encrypted again.
@@ -15492,11 +16556,13 @@ Org.
15492* Hooks:: How to reach into Org's internals 16556* Hooks:: How to reach into Org's internals
15493* Add-on packages:: Available extensions 16557* Add-on packages:: Available extensions
15494* Adding hyperlink types:: New custom link types 16558* Adding hyperlink types:: New custom link types
16559* Adding export back-ends:: How to write new export back-ends
15495* Context-sensitive commands:: How to add functionality to such commands 16560* Context-sensitive commands:: How to add functionality to such commands
15496* Tables in arbitrary syntax:: Orgtbl for @LaTeX{} and other programs 16561* Tables in arbitrary syntax:: Orgtbl for @LaTeX{} and other programs
15497* Dynamic blocks:: Automatically filled blocks 16562* Dynamic blocks:: Automatically filled blocks
15498* Special agenda views:: Customized views 16563* Special agenda views:: Customized views
15499* Extracting agenda information:: Postprocessing of agenda information 16564* Speeding up your agendas:: Tips on how to speed up your agendas
16565* Extracting agenda information:: Post-processing of agenda information
15500* Using the property API:: Writing programs that use entry properties 16566* Using the property API:: Writing programs that use entry properties
15501* Using the mapping API:: Mapping over all or selected entries 16567* Using the mapping API:: Mapping over all or selected entries
15502@end menu 16568@end menu
@@ -15516,15 +16582,14 @@ maintained by the Worg project and can be found at
15516@cindex add-on packages 16582@cindex add-on packages
15517 16583
15518A large number of add-on packages have been written by various authors. 16584A large number of add-on packages have been written by various authors.
16585
15519These packages are not part of Emacs, but they are distributed as contributed 16586These packages are not part of Emacs, but they are distributed as contributed
15520packages with the separate release available at the Org mode home page at 16587packages with the separate release available at @uref{http://orgmode.org}.
15521@uref{http://orgmode.org}. The list of contributed packages, along with 16588See the @file{contrib/README} file in the source code directory for a list of
15522documentation about each package, is maintained by the Worg project at 16589contributed files. You may also find some more information on the Worg page:
15523@uref{http://orgmode.org/worg/org-contrib/}. 16590@uref{http://orgmode.org/worg/org-contrib/}.
15524 16591
15525 16592@node Adding hyperlink types, Adding export back-ends, Add-on packages, Hacking
15526
15527@node Adding hyperlink types, Context-sensitive commands, Add-on packages, Hacking
15528@section Adding hyperlink types 16593@section Adding hyperlink types
15529@cindex hyperlinks, adding new types 16594@cindex hyperlinks, adding new types
15530 16595
@@ -15627,7 +16692,37 @@ When it makes sense for your new link type, you may also define a function
15627support for inserting such a link with @kbd{C-c C-l}. Such a function should 16692support for inserting such a link with @kbd{C-c C-l}. Such a function should
15628not accept any arguments, and return the full link with prefix. 16693not accept any arguments, and return the full link with prefix.
15629 16694
15630@node Context-sensitive commands, Tables in arbitrary syntax, Adding hyperlink types, Hacking 16695@node Adding export back-ends, Context-sensitive commands, Adding hyperlink types, Hacking
16696@section Adding export back-ends
16697@cindex Export, writing back-ends
16698
16699Org 8.0 comes with a completely rewritten export engine which makes it easy
16700to write new export back-ends, either from scratch, or from deriving them
16701from existing ones.
16702
16703Your two entry points are respectively @code{org-export-define-backend} and
16704@code{org-export-define-derived-backend}. To grok these functions, you
16705should first have a look at @file{ox-latex.el} (for how to define a new
16706back-end from scratch) and @file{ox-beamer.el} (for how to derive a new
16707back-end from an existing one.
16708
16709When creating a new back-end from scratch, the basic idea is to set the name
16710of the back-end (as a symbol) and an an alist of elements and export
16711functions. On top of this, you will need to set additional keywords like
16712@code{:menu-entry} (to display the back-end in the export dispatcher),
16713@code{:export-block} (to specify what blocks should not be exported by this
16714back-end), and @code{:options-alist} (to let the user set export options that
16715are specific to this back-end.)
16716
16717Deriving a new back-end is similar, except that you need to set
16718@code{:translate-alist} to an alist of export functions that should be used
16719instead of the parent back-end functions.
16720
16721For a complete reference documentation, see
16722@url{http://orgmode.org/worg/dev/org-export-reference.html, the Org Export
16723Reference on Worg}.
16724
16725@node Context-sensitive commands, Tables in arbitrary syntax, Adding export back-ends, Hacking
15631@section Context-sensitive commands 16726@section Context-sensitive commands
15632@cindex context-sensitive commands, hooks 16727@cindex context-sensitive commands, hooks
15633@cindex add-ons, context-sensitive commands 16728@cindex add-ons, context-sensitive commands
@@ -15696,7 +16791,7 @@ can use Org's facilities to edit and structure lists by turning
15696* Radio tables:: Sending and receiving radio tables 16791* Radio tables:: Sending and receiving radio tables
15697* A @LaTeX{} example:: Step by step, almost a tutorial 16792* A @LaTeX{} example:: Step by step, almost a tutorial
15698* Translator functions:: Copy and modify 16793* Translator functions:: Copy and modify
15699* Radio lists:: Doing the same for lists 16794* Radio lists:: Sending and receiving lists
15700@end menu 16795@end menu
15701 16796
15702@node Radio tables, A @LaTeX{} example, Tables in arbitrary syntax, Tables in arbitrary syntax 16797@node Radio tables, A @LaTeX{} example, Tables in arbitrary syntax, Tables in arbitrary syntax
@@ -15704,9 +16799,10 @@ can use Org's facilities to edit and structure lists by turning
15704@cindex radio tables 16799@cindex radio tables
15705 16800
15706To define the location of the target table, you first need to create two 16801To define the location of the target table, you first need to create two
15707lines that are comments in the current mode, but contain magic words for 16802lines that are comments in the current mode, but contain magic words
15708Orgtbl mode to find. Orgtbl mode will insert the translated table 16803@code{BEGIN/END RECEIVE ORGTBL} for Orgtbl mode to find. Orgtbl mode will
15709between these lines, replacing whatever was there before. For example: 16804insert the translated table between these lines, replacing whatever was there
16805before. For example in C mode where comments are between @code{/* ... */}:
15710 16806
15711@example 16807@example
15712/* BEGIN RECEIVE ORGTBL table_name */ 16808/* BEGIN RECEIVE ORGTBL table_name */
@@ -15744,8 +16840,8 @@ removal of these columns, the function never knows that there have been
15744additional columns. 16840additional columns.
15745 16841
15746@item :no-escape t 16842@item :no-escape t
15747When non-nil, do not escape special characters @code{&%#_^} when exporting 16843When non-@code{nil}, do not escape special characters @code{&%#_^} when exporting
15748the table. The default value is nil. 16844the table. The default value is @code{nil}.
15749@end table 16845@end table
15750 16846
15751@noindent 16847@noindent
@@ -15766,7 +16862,7 @@ in @LaTeX{}.
15766@item 16862@item
15767You can just comment the table line-by-line whenever you want to process 16863You can just comment the table line-by-line whenever you want to process
15768the file, and uncomment it whenever you need to edit the table. This 16864the file, and uncomment it whenever you need to edit the table. This
15769only sounds tedious---the command @kbd{M-x orgtbl-toggle-comment} 16865only sounds tedious---the command @kbd{M-x orgtbl-toggle-comment RET}
15770makes this comment-toggling very easy, in particular if you bind it to a 16866makes this comment-toggling very easy, in particular if you bind it to a
15771key. 16867key.
15772@end itemize 16868@end itemize
@@ -15780,8 +16876,8 @@ The best way to wrap the source table in @LaTeX{} is to use the
15780activated by placing @code{\usepackage@{comment@}} into the document 16876activated by placing @code{\usepackage@{comment@}} into the document
15781header. Orgtbl mode can insert a radio table skeleton@footnote{By 16877header. Orgtbl mode can insert a radio table skeleton@footnote{By
15782default this works only for @LaTeX{}, HTML, and Texinfo. Configure the 16878default this works only for @LaTeX{}, HTML, and Texinfo. Configure the
15783variable @code{orgtbl-radio-tables} to install templates for other 16879variable @code{orgtbl-radio-table-templates} to install templates for other
15784modes.} with the command @kbd{M-x orgtbl-insert-radio-table}. You will 16880modes.} with the command @kbd{M-x orgtbl-insert-radio-table RET}. You will
15785be prompted for a table name, let's say we use @samp{salesfigures}. You 16881be prompted for a table name, let's say we use @samp{salesfigures}. You
15786will then get the following template: 16882will then get the following template:
15787 16883
@@ -15860,7 +16956,7 @@ interprets the following parameters (see also @pxref{Translator functions}):
15860@table @code 16956@table @code
15861@item :splice nil/t 16957@item :splice nil/t
15862When set to t, return only table body lines, don't wrap them into a 16958When set to t, return only table body lines, don't wrap them into a
15863tabular environment. Default is nil. 16959tabular environment. Default is @code{nil}.
15864 16960
15865@item :fmt fmt 16961@item :fmt fmt
15866A format to be used to wrap each field, it should contain @code{%s} for the 16962A format to be used to wrap each field, it should contain @code{%s} for the
@@ -16052,7 +17148,7 @@ The corresponding block writer function could look like this:
16052(defun org-dblock-write:block-update-time (params) 17148(defun org-dblock-write:block-update-time (params)
16053 (let ((fmt (or (plist-get params :format) "%d. %m. %Y"))) 17149 (let ((fmt (or (plist-get params :format) "%d. %m. %Y")))
16054 (insert "Last block update at: " 17150 (insert "Last block update at: "
16055 (format-time-string fmt (current-time))))) 17151 (format-time-string fmt (current-time)))))
16056@end lisp 17152@end lisp
16057 17153
16058If you want to make sure that all dynamic blocks are always up-to-date, 17154If you want to make sure that all dynamic blocks are always up-to-date,
@@ -16064,21 +17160,25 @@ written in a way such that it does nothing in buffers that are not in
16064You can narrow the current buffer to the current dynamic block (like any 17160You can narrow the current buffer to the current dynamic block (like any
16065other block) with @code{org-narrow-to-block}. 17161other block) with @code{org-narrow-to-block}.
16066 17162
16067@node Special agenda views, Extracting agenda information, Dynamic blocks, Hacking 17163@node Special agenda views, Speeding up your agendas, Dynamic blocks, Hacking
16068@section Special agenda views 17164@section Special agenda views
16069@cindex agenda views, user-defined 17165@cindex agenda views, user-defined
16070 17166
16071@vindex org-agenda-skip-function 17167@vindex org-agenda-skip-function
16072@vindex org-agenda-skip-function-global 17168@vindex org-agenda-skip-function-global
16073Org provides a special hook that can be used to narrow down the selection 17169Org provides a special hook that can be used to narrow down the selection
16074made by these agenda views: @code{agenda}, @code{todo}, @code{alltodo}, 17170made by these agenda views: @code{agenda}, @code{agenda*}@footnote{The
16075@code{tags}, @code{tags-todo}, @code{tags-tree}. You may specify a function 17171@code{agenda*} view is the same than @code{agenda} except that it only
16076that is used at each match to verify if the match should indeed be part of 17172considers @emph{appointments}, i.e., scheduled and deadline items that have a
16077the agenda view, and if not, how much should be skipped. You can specify a 17173time specification @code{[h]h:mm} in their time-stamps.}, @code{todo},
16078global condition that will be applied to all agenda views, this condition 17174@code{alltodo}, @code{tags}, @code{tags-todo}, @code{tags-tree}. You may
16079would be stored in the variable @code{org-agenda-skip-function-global}. More 17175specify a function that is used at each match to verify if the match should
16080commonly, such a definition is applied only to specific custom searches, 17176indeed be part of the agenda view, and if not, how much should be skipped.
16081using @code{org-agenda-skip-function}. 17177You can specify a global condition that will be applied to all agenda views,
17178this condition would be stored in the variable
17179@code{org-agenda-skip-function-global}. More commonly, such a definition is
17180applied only to specific custom searches, using
17181@code{org-agenda-skip-function}.
16082 17182
16083Let's say you want to produce a list of projects that contain a WAITING 17183Let's say you want to produce a list of projects that contain a WAITING
16084tag anywhere in the project tree. Let's further assume that you have 17184tag anywhere in the project tree. Let's further assume that you have
@@ -16165,7 +17265,48 @@ like this, even without defining a special function:
16165 (org-agenda-overriding-header "Projects waiting for something: ")))) 17265 (org-agenda-overriding-header "Projects waiting for something: "))))
16166@end lisp 17266@end lisp
16167 17267
16168@node Extracting agenda information, Using the property API, Special agenda views, Hacking 17268@node Speeding up your agendas, Extracting agenda information, Special agenda views, Hacking
17269@section Speeding up your agendas
17270@cindex agenda views, optimization
17271
17272When your Org files grow in both number and size, agenda commands may start
17273to become slow. Below are some tips on how to speed up the agenda commands.
17274
17275@enumerate
17276@item
17277Reduce the number of Org agenda files: this will reduce the slowliness caused
17278by accessing to a hard drive.
17279@item
17280Reduce the number of DONE and archived headlines: this way the agenda does
17281not need to skip them.
17282@item
17283@vindex org-agenda-dim-blocked-tasks
17284Inhibit the dimming of blocked tasks:
17285@lisp
17286(setq org-agenda-dim-blocked-tasks nil)
17287@end lisp
17288@item
17289@vindex org-startup-folded
17290@vindex org-agenda-inhibit-startup
17291Inhibit agenda files startup options:
17292@lisp
17293(setq org-agenda-inhibit-startup nil)
17294@end lisp
17295@item
17296@vindex org-agenda-show-inherited-tags
17297@vindex org-agenda-use-tag-inheritance
17298Disable tag inheritance in agenda:
17299@lisp
17300(setq org-agenda-use-tag-inheritance nil)
17301@end lisp
17302@end enumerate
17303
17304You can set these options for specific agenda views only. See the docstrings
17305of these variables for details on why they affect the agenda generation, and
17306this @uref{http://orgmode.org/worg/agenda-optimization.html, dedicated Worg
17307page} for further explanations.
17308
17309@node Extracting agenda information, Using the property API, Speeding up your agendas, Hacking
16169@section Extracting agenda information 17310@section Extracting agenda information
16170@cindex agenda, pipe 17311@cindex agenda, pipe
16171@cindex Scripts, for agenda processing 17312@cindex Scripts, for agenda processing
@@ -16282,27 +17423,27 @@ This includes the TODO keyword, the tags, time strings for deadline,
16282scheduled, and clocking, and any additional properties defined in the 17423scheduled, and clocking, and any additional properties defined in the
16283entry. The return value is an alist. Keys may occur multiple times 17424entry. The return value is an alist. Keys may occur multiple times
16284if the property key was used several times.@* 17425if the property key was used several times.@*
16285POM may also be nil, in which case the current entry is used. 17426POM may also be @code{nil}, in which case the current entry is used.
16286If WHICH is nil or `all', get all properties. If WHICH is 17427If WHICH is @code{nil} or `all', get all properties. If WHICH is
16287`special' or `standard', only get that subclass. 17428`special' or `standard', only get that subclass.
16288@end defun 17429@end defun
16289@vindex org-use-property-inheritance 17430@vindex org-use-property-inheritance
16290@findex org-insert-property-drawer 17431@findex org-insert-property-drawer
16291@defun org-entry-get pom property &optional inherit 17432@defun org-entry-get pom property &optional inherit
16292Get value of PROPERTY for entry at point-or-marker POM@. By default, 17433Get value of @code{PROPERTY} for entry at point-or-marker @code{POM}@. By default,
16293this only looks at properties defined locally in the entry. If INHERIT 17434this only looks at properties defined locally in the entry. If @code{INHERIT}
16294is non-nil and the entry does not have the property, then also check 17435is non-@code{nil} and the entry does not have the property, then also check
16295higher levels of the hierarchy. If INHERIT is the symbol 17436higher levels of the hierarchy. If @code{INHERIT} is the symbol
16296@code{selective}, use inheritance if and only if the setting of 17437@code{selective}, use inheritance if and only if the setting of
16297@code{org-use-property-inheritance} selects PROPERTY for inheritance. 17438@code{org-use-property-inheritance} selects @code{PROPERTY} for inheritance.
16298@end defun 17439@end defun
16299 17440
16300@defun org-entry-delete pom property 17441@defun org-entry-delete pom property
16301Delete the property PROPERTY from entry at point-or-marker POM. 17442Delete the property @code{PROPERTY} from entry at point-or-marker POM.
16302@end defun 17443@end defun
16303 17444
16304@defun org-entry-put pom property value 17445@defun org-entry-put pom property value
16305Set PROPERTY to VALUE for entry at point-or-marker POM. 17446Set @code{PROPERTY} to @code{VALUE} for entry at point-or-marker POM.
16306@end defun 17447@end defun
16307 17448
16308@defun org-buffer-property-keys &optional include-specials 17449@defun org-buffer-property-keys &optional include-specials
@@ -16314,28 +17455,29 @@ Insert a property drawer for the current entry. Also
16314@end defun 17455@end defun
16315 17456
16316@defun org-entry-put-multivalued-property pom property &rest values 17457@defun org-entry-put-multivalued-property pom property &rest values
16317Set PROPERTY at point-or-marker POM to VALUES@. VALUES should be a list of 17458Set @code{PROPERTY} at point-or-marker @code{POM} to @code{VALUES}@.
16318strings. They will be concatenated, with spaces as separators. 17459@code{VALUES} should be a list of strings. They will be concatenated, with
17460spaces as separators.
16319@end defun 17461@end defun
16320 17462
16321@defun org-entry-get-multivalued-property pom property 17463@defun org-entry-get-multivalued-property pom property
16322Treat the value of the property PROPERTY as a whitespace-separated list of 17464Treat the value of the property @code{PROPERTY} as a whitespace-separated
16323values and return the values as a list of strings. 17465list of values and return the values as a list of strings.
16324@end defun 17466@end defun
16325 17467
16326@defun org-entry-add-to-multivalued-property pom property value 17468@defun org-entry-add-to-multivalued-property pom property value
16327Treat the value of the property PROPERTY as a whitespace-separated list of 17469Treat the value of the property @code{PROPERTY} as a whitespace-separated
16328values and make sure that VALUE is in this list. 17470list of values and make sure that @code{VALUE} is in this list.
16329@end defun 17471@end defun
16330 17472
16331@defun org-entry-remove-from-multivalued-property pom property value 17473@defun org-entry-remove-from-multivalued-property pom property value
16332Treat the value of the property PROPERTY as a whitespace-separated list of 17474Treat the value of the property @code{PROPERTY} as a whitespace-separated
16333values and make sure that VALUE is @emph{not} in this list. 17475list of values and make sure that @code{VALUE} is @emph{not} in this list.
16334@end defun 17476@end defun
16335 17477
16336@defun org-entry-member-in-multivalued-property pom property value 17478@defun org-entry-member-in-multivalued-property pom property value
16337Treat the value of the property PROPERTY as a whitespace-separated list of 17479Treat the value of the property @code{PROPERTY} as a whitespace-separated
16338values and check if VALUE is in this list. 17480list of values and check if @code{VALUE} is in this list.
16339@end defun 17481@end defun
16340 17482
16341@defopt org-property-allowed-value-functions 17483@defopt org-property-allowed-value-functions
@@ -16359,30 +17501,29 @@ functions for each or selected entries. The main entry point for this API
16359is: 17501is:
16360 17502
16361@defun org-map-entries func &optional match scope &rest skip 17503@defun org-map-entries func &optional match scope &rest skip
16362Call FUNC at each headline selected by MATCH in SCOPE. 17504Call @code{FUNC} at each headline selected by @code{MATCH} in @code{SCOPE}.
16363 17505
16364FUNC is a function or a Lisp form. The function will be called without 17506@code{FUNC} is a function or a Lisp form. The function will be called
16365arguments, with the cursor positioned at the beginning of the headline. 17507without arguments, with the cursor positioned at the beginning of the
16366The return values of all calls to the function will be collected and 17508headline. The return values of all calls to the function will be collected
16367returned as a list. 17509and returned as a list.
16368 17510
16369The call to FUNC will be wrapped into a save-excursion form, so FUNC 17511The call to @code{FUNC} will be wrapped into a save-excursion form, so
16370does not need to preserve point. After evaluation, the cursor will be 17512@code{FUNC} does not need to preserve point. After evaluation, the cursor
16371moved to the end of the line (presumably of the headline of the 17513will be moved to the end of the line (presumably of the headline of the
16372processed entry) and search continues from there. Under some 17514processed entry) and search continues from there. Under some circumstances,
16373circumstances, this may not produce the wanted results. For example, 17515this may not produce the wanted results. For example, if you have removed
16374if you have removed (e.g., archived) the current (sub)tree it could 17516(e.g., archived) the current (sub)tree it could mean that the next entry will
16375mean that the next entry will be skipped entirely. In such cases, you 17517be skipped entirely. In such cases, you can specify the position from where
16376can specify the position from where search should continue by making 17518search should continue by making @code{FUNC} set the variable
16377FUNC set the variable `org-map-continue-from' to the desired buffer 17519@code{org-map-continue-from} to the desired buffer position.
16378position.
16379 17520
16380MATCH is a tags/property/todo match as it is used in the agenda match view. 17521@code{MATCH} is a tags/property/todo match as it is used in the agenda match
16381Only headlines that are matched by this query will be considered during 17522view. Only headlines that are matched by this query will be considered
16382the iteration. When MATCH is nil or t, all headlines will be 17523during the iteration. When @code{MATCH} is @code{nil} or @code{t}, all
16383visited by the iteration. 17524headlines will be visited by the iteration.
16384 17525
16385SCOPE determines the scope of this command. It can be any of: 17526@code{SCOPE} determines the scope of this command. It can be any of:
16386 17527
16387@example 17528@example
16388nil @r{the current buffer, respecting the restriction if any} 17529nil @r{the current buffer, respecting the restriction if any}
@@ -16420,17 +17561,18 @@ Here are a couple of functions that might be handy:
16420 17561
16421@defun org-todo &optional arg 17562@defun org-todo &optional arg
16422Change the TODO state of the entry. See the docstring of the functions for 17563Change the TODO state of the entry. See the docstring of the functions for
16423the many possible values for the argument ARG. 17564the many possible values for the argument @code{ARG}.
16424@end defun 17565@end defun
16425 17566
16426@defun org-priority &optional action 17567@defun org-priority &optional action
16427Change the priority of the entry. See the docstring of this function for the 17568Change the priority of the entry. See the docstring of this function for the
16428possible values for ACTION. 17569possible values for @code{ACTION}.
16429@end defun 17570@end defun
16430 17571
16431@defun org-toggle-tag tag &optional onoff 17572@defun org-toggle-tag tag &optional onoff
16432Toggle the tag TAG in the current entry. Setting ONOFF to either @code{on} 17573Toggle the tag @code{TAG} in the current entry. Setting @code{ONOFF} to
16433or @code{off} will not toggle tag, but ensure that it is either on or off. 17574either @code{on} or @code{off} will not toggle tag, but ensure that it is
17575either on or off.
16434@end defun 17576@end defun
16435 17577
16436@defun org-promote 17578@defun org-promote
@@ -16466,10 +17608,10 @@ The following example counts the number of entries with TODO keyword
16466@i{MobileOrg} is the name of the mobile companion app for Org mode, currently 17608@i{MobileOrg} is the name of the mobile companion app for Org mode, currently
16467available for iOS and for Android. @i{MobileOrg} offers offline viewing and 17609available for iOS and for Android. @i{MobileOrg} offers offline viewing and
16468capture support for an Org mode system rooted on a ``real'' computer. It 17610capture support for an Org mode system rooted on a ``real'' computer. It
16469does also allow you to record changes to existing entries. 17611does also allow you to record changes to existing entries. The
16470The @uref{http://mobileorg.ncogni.to/, iOS implementation} for the 17612@uref{https://github.com/MobileOrg/, iOS implementation} for the
16471@i{iPhone/iPod Touch/iPad} series of devices, was developed by Richard 17613@i{iPhone/iPod Touch/iPad} series of devices, was started by Richard Moreland
16472Moreland. Android users should check out 17614and is now in the hands Sean Escriva. Android users should check out
16473@uref{http://wiki.github.com/matburt/mobileorg-android/, MobileOrg Android} 17615@uref{http://wiki.github.com/matburt/mobileorg-android/, MobileOrg Android}
16474by Matt Jones. The two implementations are not identical but offer similar 17616by Matt Jones. The two implementations are not identical but offer similar
16475features. 17617features.
@@ -16479,7 +17621,7 @@ format that can be displayed by @i{MobileOrg}, and for integrating notes
16479captured and changes made by @i{MobileOrg} into the main system. 17621captured and changes made by @i{MobileOrg} into the main system.
16480 17622
16481For changing tags and TODO states in MobileOrg, you should have set up the 17623For changing tags and TODO states in MobileOrg, you should have set up the
16482customization variables @code{org-todo-keywords} and @code{org-tags-alist} to 17624customization variables @code{org-todo-keywords} and @code{org-tag-alist} to
16483cover all important tags and TODO keywords, even if individual files use only 17625cover all important tags and TODO keywords, even if individual files use only
16484part of these. MobileOrg will also offer you states and tags set up with 17626part of these. MobileOrg will also offer you states and tags set up with
16485in-buffer settings, but it will understand the logistics of TODO state 17627in-buffer settings, but it will understand the logistics of TODO state
@@ -16580,6 +17722,7 @@ should then go through these entries and do whatever actions are necessary.
16580If a note has been stored while flagging an entry in @i{MobileOrg}, that note 17722If a note has been stored while flagging an entry in @i{MobileOrg}, that note
16581will be displayed in the echo area when the cursor is on the corresponding 17723will be displayed in the echo area when the cursor is on the corresponding
16582agenda line. 17724agenda line.
17725
16583@table @kbd 17726@table @kbd
16584@kindex ? 17727@kindex ?
16585@item ? 17728@item ?
@@ -16596,11 +17739,11 @@ this flagged entry is finished.
16596@kindex C-c a ? 17739@kindex C-c a ?
16597If you are not able to process all flagged entries directly, you can always 17740If you are not able to process all flagged entries directly, you can always
16598return to this agenda view@footnote{Note, however, that there is a subtle 17741return to this agenda view@footnote{Note, however, that there is a subtle
16599difference. The view created automatically by @kbd{M-x org-mobile-pull 17742difference. The view created automatically by @kbd{M-x org-mobile-pull RET}
16600@key{RET}} is guaranteed to search all files that have been addressed by the 17743is guaranteed to search all files that have been addressed by the last pull.
16601last pull. This might include a file that is not currently in your list of 17744This might include a file that is not currently in your list of agenda files.
16602agenda files. If you later use @kbd{C-c a ?} to regenerate the view, only 17745If you later use @kbd{C-c a ?} to regenerate the view, only the current
16603the current agenda files will be searched.} using @kbd{C-c a ?}. 17746agenda files will be searched.} using @kbd{C-c a ?}.
16604 17747
16605@node History and Acknowledgments, GNU Free Documentation License, MobileOrg, Top 17748@node History and Acknowledgments, GNU Free Documentation License, MobileOrg, Top
16606@appendix History and acknowledgments 17749@appendix History and acknowledgments
@@ -16660,7 +17803,7 @@ of his great @file{remember.el}.
16660Without Sebastian, the HTML/XHTML publishing of Org would be the pitiful work 17803Without Sebastian, the HTML/XHTML publishing of Org would be the pitiful work
16661of an ignorant amateur. Sebastian has pushed this part of Org onto a much 17804of an ignorant amateur. Sebastian has pushed this part of Org onto a much
16662higher level. He also wrote @file{org-info.js}, a Java script for displaying 17805higher level. He also wrote @file{org-info.js}, a Java script for displaying
16663webpages derived from Org using an Info-like or a folding interface with 17806web pages derived from Org using an Info-like or a folding interface with
16664single-key navigation. 17807single-key navigation.
16665@end table 17808@end table
16666 17809
@@ -16674,8 +17817,8 @@ would not be complete without adding a few more acknowledgements and thanks
16674to Carsten's ones above. 17817to Carsten's ones above.
16675 17818
16676I am first grateful to Carsten for his trust while handing me over the 17819I am first grateful to Carsten for his trust while handing me over the
16677maintainership of Org. His support as been great since day one of this new 17820maintainership of Org. His unremitting support is what really helped me
16678adventure, and it helped a lot. 17821getting more confident over time, with both the community and the code.
16679 17822
16680When I took over maintainership, I knew I would have to make Org more 17823When I took over maintainership, I knew I would have to make Org more
16681collaborative than ever, as I would have to rely on people that are more 17824collaborative than ever, as I would have to rely on people that are more
@@ -16689,15 +17832,13 @@ Eric is maintaining the Babel parts of Org. His reactivity here kept me away
16689from worrying about possible bugs here and let me focus on other parts. 17832from worrying about possible bugs here and let me focus on other parts.
16690 17833
16691@item Nicolas Goaziou 17834@item Nicolas Goaziou
16692Nicolas is maintaining the consistency of the deepest parts of Org. His work 17835Nicolas is maintaining the consistency of the deepest parts of Org. His
16693on @file{org-element.el} and @file{org-export.el} has been outstanding, and 17836work on @file{org-element.el} and @file{ox.el} has been outstanding, and
16694opened the doors for many new ideas and features. 17837opened the doors for many new ideas and features. He rewrote many of the
16695 17838old exporters to use the new export engine, and helped with documenting
16696@item Jambunathan K 17839this major change. More importantly (if that's possible), he has been more
16697Jambunathan contributed the ODT exporter, definitely a killer feature of 17840than reliable during all the work done for Org 8.0, and always very
16698Org mode. He also contributed the new HTML exporter, which is another core 17841reactive on the mailing list.
16699feature of Org. Here too, I knew I could rely on him to fix bugs in these
16700areas and to patiently explain the users what was the problems and solutions.
16701 17842
16702@item Achim Gratz 17843@item Achim Gratz
16703Achim rewrote the building process of Org, turning some @emph{ad hoc} tools 17844Achim rewrote the building process of Org, turning some @emph{ad hoc} tools
@@ -16721,8 +17862,17 @@ complete if the ones above were not mentioned in this manual.
16721@item 17862@item
16722@i{Russel Adams} came up with the idea for drawers. 17863@i{Russel Adams} came up with the idea for drawers.
16723@item 17864@item
17865@i{Suvayu Ali} has steadily helped on the mailing list, providing useful
17866feedback on many features and several patches.
17867@item
17868@i{Luis Anaya} wrote @file{ox-man.el}.
17869@item
16724@i{Thomas Baumann} wrote @file{org-bbdb.el} and @file{org-mhe.el}. 17870@i{Thomas Baumann} wrote @file{org-bbdb.el} and @file{org-mhe.el}.
16725@item 17871@item
17872@i{Michael Brand} helped by reporting many bugs and testing many features.
17873He also implemented the distinction between empty fields and 0-value fields
17874in Org's spreadsheets.
17875@item
16726@i{Christophe Bataillon} created the great unicorn logo that we use on the 17876@i{Christophe Bataillon} created the great unicorn logo that we use on the
16727Org mode website. 17877Org mode website.
16728@item 17878@item
@@ -16746,7 +17896,11 @@ calculations and improved XEmacs compatibility, in particular by porting
16746@item 17896@item
16747@i{Sacha Chua} suggested copying some linking code from Planner. 17897@i{Sacha Chua} suggested copying some linking code from Planner.
16748@item 17898@item
16749@i{Baoqiu Cui} contributed the DocBook exporter. 17899@i{Toby S. Cubitt} contributed to the code for clock formats.
17900@item
17901@i{Baoqiu Cui} contributed the DocBook exporter. It has been deleted from
17902Org 8.0: you can now export to Texinfo and export the @file{.texi} file to
17903DocBook using @code{makeinfo}.
16750@item 17904@item
16751@i{Eddward DeVilla} proposed and tested checkbox statistics. He also 17905@i{Eddward DeVilla} proposed and tested checkbox statistics. He also
16752came up with the idea of properties, and that there should be an API for 17906came up with the idea of properties, and that there should be an API for
@@ -16758,16 +17912,23 @@ them.
16758inspired some of the early development, including HTML export. He also 17912inspired some of the early development, including HTML export. He also
16759asked for a way to narrow wide table columns. 17913asked for a way to narrow wide table columns.
16760@item 17914@item
17915@i{Jason Dunsmore} has been maintaining the Org-Mode server at Rackspace for
17916several years now. He also sponsered the hosting costs until Rackspace
17917started to host us for free.
17918@item
16761@i{Thomas S. Dye} contributed documentation on Worg and helped integrating 17919@i{Thomas S. Dye} contributed documentation on Worg and helped integrating
16762the Org-Babel documentation into the manual. 17920the Org-Babel documentation into the manual.
16763@item 17921@item
16764@i{Christian Egli} converted the documentation into Texinfo format, inspired 17922@i{Christian Egli} converted the documentation into Texinfo format, inspired
16765the agenda, patched CSS formatting into the HTML exporter, and wrote 17923the agenda, patched CSS formatting into the HTML exporter, and wrote
16766@file{org-taskjuggler.el}. 17924@file{org-taskjuggler.el}, which has been rewritten by Nicolas Goaziou as
17925@file{ox-taskjuggler.el} for Org 8.0.
16767@item 17926@item
16768@i{David Emery} provided a patch for custom CSS support in exported 17927@i{David Emery} provided a patch for custom CSS support in exported
16769HTML agendas. 17928HTML agendas.
16770@item 17929@item
17930@i{Sean Escriva} took over MobileOrg development on the iPhone platform.
17931@item
16771@i{Nic Ferrier} contributed mailcap and XOXO support. 17932@i{Nic Ferrier} contributed mailcap and XOXO support.
16772@item 17933@item
16773@i{Miguel A. Figueroa-Villanueva} implemented hierarchical checkboxes. 17934@i{Miguel A. Figueroa-Villanueva} implemented hierarchical checkboxes.
@@ -16789,7 +17950,9 @@ publication through Network Theory Ltd.
16789@item 17950@item
16790@i{Niels Giesen} had the idea to automatically archive DONE trees. 17951@i{Niels Giesen} had the idea to automatically archive DONE trees.
16791@item 17952@item
16792@i{Nicolas Goaziou} rewrote much of the plain list code. 17953@i{Nicolas Goaziou} rewrote much of the plain list code. He also wrote
17954@file{org-element.el} and @file{org-export.el}, which was a huge step forward
17955in implementing a clean framework for Org exporters.
16793@item 17956@item
16794@i{Kai Grossjohann} pointed out key-binding conflicts with other packages. 17957@i{Kai Grossjohann} pointed out key-binding conflicts with other packages.
16795@item 17958@item
@@ -16812,6 +17975,8 @@ folded entries, and column view for properties.
16812@item 17975@item
16813@i{Tokuya Kameshima} wrote @file{org-wl.el} and @file{org-mew.el}. 17976@i{Tokuya Kameshima} wrote @file{org-wl.el} and @file{org-mew.el}.
16814@item 17977@item
17978@i{Jonathan Leech-Pepin} wrote @file{ox-texinfo.el}.
17979@item
16815@i{Shidai Liu} ("Leo") asked for embedded @LaTeX{} and tested it. He also 17980@i{Shidai Liu} ("Leo") asked for embedded @LaTeX{} and tested it. He also
16816provided frequent feedback and some patches. 17981provided frequent feedback and some patches.
16817@item 17982@item
@@ -16824,7 +17989,7 @@ small fixes and patches.
16824@item 17989@item
16825@i{Jason F. McBrayer} suggested agenda export to CSV format. 17990@i{Jason F. McBrayer} suggested agenda export to CSV format.
16826@item 17991@item
16827@i{Max Mikhanosha} came up with the idea of refiling. 17992@i{Max Mikhanosha} came up with the idea of refiling and sticky agendas.
16828@item 17993@item
16829@i{Dmitri Minaev} sent a patch to set priority limits on a per-file 17994@i{Dmitri Minaev} sent a patch to set priority limits on a per-file
16830basis. 17995basis.
@@ -16858,9 +18023,14 @@ links, among other things.
16858@i{Pete Phillips} helped during the development of the TAGS feature, and 18023@i{Pete Phillips} helped during the development of the TAGS feature, and
16859provided frequent feedback. 18024provided frequent feedback.
16860@item 18025@item
18026@i{Francesco Pizzolante} provided patches that helped speeding up the agenda
18027generation.
18028@item
16861@i{Martin Pohlack} provided the code snippet to bundle character insertion 18029@i{Martin Pohlack} provided the code snippet to bundle character insertion
16862into bundles of 20 for undo. 18030into bundles of 20 for undo.
16863@item 18031@item
18032@i{Rackspace.com} is hosting our website for free. Thank you Rackspace!
18033@item
16864@i{T.V. Raman} reported bugs and suggested improvements. 18034@i{T.V. Raman} reported bugs and suggested improvements.
16865@item 18035@item
16866@i{Matthias Rempe} (Oelde) provided ideas, Windows support, and quality 18036@i{Matthias Rempe} (Oelde) provided ideas, Windows support, and quality
@@ -16883,6 +18053,9 @@ of feedback, developed and applied standards to the Org documentation.
16883@i{Christian Schlauer} proposed angular brackets around links, among 18053@i{Christian Schlauer} proposed angular brackets around links, among
16884other things. 18054other things.
16885@item 18055@item
18056@i{Christopher Schmidt} reworked @code{orgstruct-mode} so that users can
18057enjoy folding in non-org buffers by using Org headlines in comments.
18058@item
16886@i{Paul Sexton} wrote @file{org-ctags.el}. 18059@i{Paul Sexton} wrote @file{org-ctags.el}.
16887@item 18060@item
16888Linking to VM/BBDB/Gnus was first inspired by @i{Tom Shannon}'s 18061Linking to VM/BBDB/Gnus was first inspired by @i{Tom Shannon}'s
@@ -16914,7 +18087,7 @@ with links transformation to Org syntax.
16914@i{David O'Toole} wrote @file{org-publish.el} and drafted the manual 18087@i{David O'Toole} wrote @file{org-publish.el} and drafted the manual
16915chapter about publishing. 18088chapter about publishing.
16916@item 18089@item
16917@i{Jambunathan K} contributed the ODT exporter. 18090@i{Jambunathan K} contributed the ODT exporter and rewrote the HTML exporter.
16918@item 18091@item
16919@i{Sebastien Vauban} reported many issues with @LaTeX{} and BEAMER export and 18092@i{Sebastien Vauban} reported many issues with @LaTeX{} and BEAMER export and
16920enabled source code highlighting in Gnus. 18093enabled source code highlighting in Gnus.