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