diff options
Diffstat (limited to 'doc/misc/org.texi')
| -rw-r--r-- | doc/misc/org.texi | 3955 |
1 files changed, 2843 insertions, 1112 deletions
diff --git a/doc/misc/org.texi b/doc/misc/org.texi index a0ec20c4034..2a41d6b9301 100644 --- a/doc/misc/org.texi +++ b/doc/misc/org.texi | |||
| @@ -4,8 +4,8 @@ | |||
| 4 | @setfilename ../../info/org | 4 | @setfilename ../../info/org |
| 5 | @settitle The Org Manual | 5 | @settitle The Org Manual |
| 6 | 6 | ||
| 7 | @set VERSION 7.4 | 7 | @set VERSION 7.8.03 |
| 8 | @set DATE December 2010 | 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 |
| @@ -34,9 +34,9 @@ | |||
| 34 | 34 | ||
| 35 | @c Below we define the following macros for Org key tables: | 35 | @c Below we define the following macros for Org key tables: |
| 36 | 36 | ||
| 37 | @c orgkey{key} A key item | 37 | @c orgkey{key} A key item |
| 38 | @c orgcmd{key,cmd} Key with command name | 38 | @c orgcmd{key,cmd} Key with command name |
| 39 | @c xorgcmd{key,cmmand} Key with command name as @itemx | 39 | @c xorgcmd{key,cmd} 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" |
| @@ -265,7 +265,7 @@ | |||
| 265 | @copying | 265 | @copying |
| 266 | This manual is for Org version @value{VERSION}. | 266 | This manual is for Org version @value{VERSION}. |
| 267 | 267 | ||
| 268 | Copyright @copyright{} 2004-2011 Free Software Foundation, Inc. | 268 | Copyright @copyright{} 2004-2012 Free Software Foundation, Inc. |
| 269 | 269 | ||
| 270 | @quotation | 270 | @quotation |
| 271 | Permission is granted to copy, distribute and/or modify this document | 271 | Permission is granted to copy, distribute and/or modify this document |
| @@ -286,7 +286,7 @@ license to the document, as described in section 6 of the license. | |||
| 286 | @end quotation | 286 | @end quotation |
| 287 | @end copying | 287 | @end copying |
| 288 | 288 | ||
| 289 | @dircategory Emacs editing modes | 289 | @dircategory Emacs |
| 290 | @direntry | 290 | @direntry |
| 291 | * Org Mode: (org). Outline-based notes management and organizer | 291 | * Org Mode: (org). Outline-based notes management and organizer |
| 292 | @end direntry | 292 | @end direntry |
| @@ -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 |
| @@ -377,11 +377,12 @@ The spreadsheet | |||
| 377 | * References:: How to refer to another field or range | 377 | * References:: How to refer to another field or range |
| 378 | * Formula syntax for Calc:: Using Calc to compute stuff | 378 | * Formula syntax for Calc:: Using Calc to compute stuff |
| 379 | * Formula syntax for Lisp:: Writing formulas in Emacs Lisp | 379 | * Formula syntax for Lisp:: Writing formulas in Emacs Lisp |
| 380 | * Field formulas:: Formulas valid for a single field | 380 | * Durations and time values:: How to compute durations and time values |
| 381 | * Field and range formulas:: Formula for specific (ranges of) fields | ||
| 381 | * Column formulas:: Formulas valid for an entire column | 382 | * Column formulas:: Formulas valid for an entire column |
| 382 | * Editing and debugging formulas:: Fixing formulas | 383 | * Editing and debugging formulas:: Fixing formulas |
| 383 | * Updating the table:: Recomputing all dependent fields | 384 | * Updating the table:: Recomputing all dependent fields |
| 384 | * Advanced features:: Field names, parameters and automatic recalc | 385 | * Advanced features:: Field and column names, parameters and automatic recalc |
| 385 | 386 | ||
| 386 | Hyperlinks | 387 | Hyperlinks |
| 387 | 388 | ||
| @@ -432,7 +433,7 @@ Tags | |||
| 432 | Properties and columns | 433 | Properties and columns |
| 433 | 434 | ||
| 434 | * Property syntax:: How properties are spelled out | 435 | * Property syntax:: How properties are spelled out |
| 435 | * Special properties:: Access to other Org-mode features | 436 | * Special properties:: Access to other Org mode features |
| 436 | * Property searches:: Matching property values | 437 | * Property searches:: Matching property values |
| 437 | * Property inheritance:: Passing values down the tree | 438 | * Property inheritance:: Passing values down the tree |
| 438 | * Column view:: Tabular viewing and editing | 439 | * Column view:: Tabular viewing and editing |
| @@ -461,7 +462,7 @@ Dates and times | |||
| 461 | 462 | ||
| 462 | Creating timestamps | 463 | Creating timestamps |
| 463 | 464 | ||
| 464 | * 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 |
| 465 | * Custom time format:: Making dates look different | 466 | * Custom time format:: Making dates look different |
| 466 | 467 | ||
| 467 | Deadlines and scheduling | 468 | Deadlines and scheduling |
| @@ -480,7 +481,7 @@ Capture - Refile - Archive | |||
| 480 | * Capture:: Capturing new stuff | 481 | * Capture:: Capturing new stuff |
| 481 | * Attachments:: Add files to tasks | 482 | * Attachments:: Add files to tasks |
| 482 | * RSS Feeds:: Getting input from RSS feeds | 483 | * RSS Feeds:: Getting input from RSS feeds |
| 483 | * Protocols:: External (e.g. Browser) access to Emacs and Org | 484 | * Protocols:: External (e.g.@: Browser) access to Emacs and Org |
| 484 | * Refiling notes:: Moving a tree from one place to another | 485 | * Refiling notes:: Moving a tree from one place to another |
| 485 | * Archiving:: What to do with finished projects | 486 | * Archiving:: What to do with finished projects |
| 486 | 487 | ||
| @@ -540,7 +541,7 @@ Markup for rich export | |||
| 540 | * Include files:: Include additional files into a document | 541 | * Include files:: Include additional files into a document |
| 541 | * Index entries:: Making an index | 542 | * Index entries:: Making an index |
| 542 | * Macro replacement:: Use macros to create complex output | 543 | * Macro replacement:: Use macros to create complex output |
| 543 | * Embedded LaTeX:: LaTeX can be freely used inside Org documents | 544 | * Embedded @LaTeX{}:: LaTeX can be freely used inside Org documents |
| 544 | 545 | ||
| 545 | Structural markup elements | 546 | Structural markup elements |
| 546 | 547 | ||
| @@ -559,8 +560,8 @@ Embedded @LaTeX{} | |||
| 559 | 560 | ||
| 560 | * Special symbols:: Greek letters and other symbols | 561 | * Special symbols:: Greek letters and other symbols |
| 561 | * Subscripts and superscripts:: Simple syntax for raising/lowering text | 562 | * Subscripts and superscripts:: Simple syntax for raising/lowering text |
| 562 | * LaTeX fragments:: Complex formulas made easy | 563 | * @LaTeX{} fragments:: Complex formulas made easy |
| 563 | * Previewing LaTeX fragments:: What will this snippet look like? | 564 | * Previewing @LaTeX{} fragments:: What will this snippet look like? |
| 564 | * CDLaTeX mode:: Speed up entering of formulas | 565 | * CDLaTeX mode:: Speed up entering of formulas |
| 565 | 566 | ||
| 566 | Exporting | 567 | Exporting |
| @@ -570,8 +571,9 @@ Exporting | |||
| 570 | * The export dispatcher:: How to access exporter commands | 571 | * The export dispatcher:: How to access exporter commands |
| 571 | * 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 |
| 572 | * HTML export:: Exporting to HTML | 573 | * HTML export:: Exporting to HTML |
| 573 | * LaTeX and PDF export:: Exporting to @LaTeX{}, and processing to PDF | 574 | * @LaTeX{} and PDF export:: Exporting to @LaTeX{}, and processing to PDF |
| 574 | * DocBook export:: Exporting to DocBook | 575 | * DocBook export:: Exporting to DocBook |
| 576 | * OpenDocument Text export:: Exporting to OpenDocument Text | ||
| 575 | * TaskJuggler export:: Exporting to TaskJuggler | 577 | * TaskJuggler export:: Exporting to TaskJuggler |
| 576 | * Freemind export:: Exporting to Freemind mind maps | 578 | * Freemind export:: Exporting to Freemind mind maps |
| 577 | * XOXO export:: Exporting to XOXO | 579 | * XOXO export:: Exporting to XOXO |
| @@ -580,7 +582,8 @@ Exporting | |||
| 580 | HTML export | 582 | HTML export |
| 581 | 583 | ||
| 582 | * HTML Export commands:: How to invoke HTML export | 584 | * HTML Export commands:: How to invoke HTML export |
| 583 | * Quoting HTML tags:: Using direct HTML in Org-mode | 585 | * HTML preamble and postamble:: How to insert a preamble and a postamble |
| 586 | * Quoting HTML tags:: Using direct HTML in Org mode | ||
| 584 | * Links in HTML export:: How links will be interpreted and formatted | 587 | * Links in HTML export:: How links will be interpreted and formatted |
| 585 | * Tables in HTML export:: How to modify the formatting of tables | 588 | * Tables in HTML export:: How to modify the formatting of tables |
| 586 | * Images in HTML export:: How to insert figures into HTML output | 589 | * Images in HTML export:: How to insert figures into HTML output |
| @@ -591,11 +594,11 @@ HTML export | |||
| 591 | 594 | ||
| 592 | @LaTeX{} and PDF export | 595 | @LaTeX{} and PDF export |
| 593 | 596 | ||
| 594 | * LaTeX/PDF export commands:: Which key invokes which commands | 597 | * @LaTeX{}/PDF export commands:: |
| 595 | * Header and sectioning:: Setting up the export file structure | 598 | * Header and sectioning:: Setting up the export file structure |
| 596 | * Quoting LaTeX code:: Incorporating literal @LaTeX{} code | 599 | * Quoting @LaTeX{} code:: Incorporating literal @LaTeX{} code |
| 597 | * Tables in LaTeX export:: Options for exporting tables to @LaTeX{} | 600 | * Tables in @LaTeX{} export:: Options for exporting tables to @LaTeX{} |
| 598 | * Images in LaTeX export:: How to insert figures into @LaTeX{} output | 601 | * Images in @LaTeX{} export:: How to insert figures into @LaTeX{} output |
| 599 | * Beamer class export:: Turning the file into a presentation | 602 | * Beamer class export:: Turning the file into a presentation |
| 600 | 603 | ||
| 601 | DocBook export | 604 | DocBook export |
| @@ -607,6 +610,31 @@ DocBook export | |||
| 607 | * Images in DocBook export:: How to insert figures into DocBook output | 610 | * Images in DocBook export:: How to insert figures into DocBook output |
| 608 | * Special characters:: How to handle special characters | 611 | * Special characters:: How to handle special characters |
| 609 | 612 | ||
| 613 | OpenDocument Text export | ||
| 614 | |||
| 615 | * Pre-requisites for @acronym{ODT} export:: What packages @acronym{ODT} exporter relies on | ||
| 616 | * @acronym{ODT} export commands:: How to invoke @acronym{ODT} export | ||
| 617 | * Applying custom styles:: How to apply custom styles to the output | ||
| 618 | * Links in @acronym{ODT} export:: How links will be interpreted and formatted | ||
| 619 | * Tables in @acronym{ODT} export:: How Tables are exported | ||
| 620 | * Images in @acronym{ODT} export:: How to insert images | ||
| 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 | ||
| 637 | |||
| 610 | Publishing | 638 | Publishing |
| 611 | 639 | ||
| 612 | * Configuration:: Defining projects | 640 | * Configuration:: Defining projects |
| @@ -620,7 +648,7 @@ Configuration | |||
| 620 | * Sources and destinations:: From here to there | 648 | * Sources and destinations:: From here to there |
| 621 | * Selecting files:: What files are part of the project? | 649 | * Selecting files:: What files are part of the project? |
| 622 | * Publishing action:: Setting the function doing the publishing | 650 | * Publishing action:: Setting the function doing the publishing |
| 623 | * Publishing options:: Tweaking HTML export | 651 | * Publishing options:: Tweaking HTML/@LaTeX{} export |
| 624 | * Publishing links:: Which links keep working after publishing? | 652 | * Publishing links:: Which links keep working after publishing? |
| 625 | * Sitemap:: Generating a list of all pages | 653 | * Sitemap:: Generating a list of all pages |
| 626 | * Generating an index:: An index that reaches across pages | 654 | * Generating an index:: An index that reaches across pages |
| @@ -636,12 +664,12 @@ Working with source code | |||
| 636 | * Editing source code:: Language major-mode editing | 664 | * Editing source code:: Language major-mode editing |
| 637 | * Exporting code blocks:: Export contents and/or results | 665 | * Exporting code blocks:: Export contents and/or results |
| 638 | * Extracting source code:: Create pure source code files | 666 | * Extracting source code:: Create pure source code files |
| 639 | * 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 |
| 640 | * 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 |
| 641 | * Languages:: List of supported code block languages | 669 | * Languages:: List of supported code block languages |
| 642 | * Header arguments:: Configure code block functionality | 670 | * Header arguments:: Configure code block functionality |
| 643 | * Results of evaluation:: How evaluation results are handled | 671 | * Results of evaluation:: How evaluation results are handled |
| 644 | * Noweb reference syntax:: Literate programming in Org-mode | 672 | * Noweb reference syntax:: Literate programming in Org mode |
| 645 | * Key bindings and useful functions:: Work quickly with code blocks | 673 | * Key bindings and useful functions:: Work quickly with code blocks |
| 646 | * Batch execution:: Call functions from the command line | 674 | * Batch execution:: Call functions from the command line |
| 647 | 675 | ||
| @@ -655,7 +683,7 @@ Using header arguments | |||
| 655 | * System-wide header arguments:: Set global default values | 683 | * System-wide header arguments:: Set global default values |
| 656 | * Language-specific header arguments:: Set default values by language | 684 | * Language-specific header arguments:: Set default values by language |
| 657 | * Buffer-wide header arguments:: Set default values for a specific buffer | 685 | * Buffer-wide header arguments:: Set default values for a specific buffer |
| 658 | * 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 |
| 659 | * 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 |
| 660 | * Header arguments in function calls:: The most specific level | 688 | * Header arguments in function calls:: The most specific level |
| 661 | 689 | ||
| @@ -669,13 +697,19 @@ Specific header arguments | |||
| 669 | directory for code block execution | 697 | directory for code block execution |
| 670 | * exports:: Export code and/or results | 698 | * exports:: Export code and/or results |
| 671 | * tangle:: Toggle tangling and specify file name | 699 | * tangle:: Toggle tangling and specify file name |
| 700 | * mkdirp:: Toggle creation of parent directories of target | ||
| 701 | files during tangling | ||
| 672 | * comments:: Toggle insertion of comments in tangled | 702 | * comments:: Toggle insertion of comments in tangled |
| 673 | code files | 703 | code files |
| 704 | * padline:: Control insertion of padding lines in tangled | ||
| 705 | code files | ||
| 674 | * no-expand:: Turn off variable assignment and noweb | 706 | * no-expand:: Turn off variable assignment and noweb |
| 675 | expansion during tangling | 707 | expansion during tangling |
| 676 | * session:: Preserve the state of code evaluation | 708 | * session:: Preserve the state of code evaluation |
| 677 | * noweb:: Toggle expansion of noweb references | 709 | * noweb:: Toggle expansion of noweb references |
| 710 | * noweb-ref:: Specify block's noweb reference resolution target | ||
| 678 | * cache:: Avoid re-evaluating unchanged code blocks | 711 | * cache:: Avoid re-evaluating unchanged code blocks |
| 712 | * sep:: Delimiter for writing tabular results outside Org | ||
| 679 | * hlines:: Handle horizontal lines in tables | 713 | * hlines:: Handle horizontal lines in tables |
| 680 | * colnames:: Handle column names in tables | 714 | * colnames:: Handle column names in tables |
| 681 | * rownames:: Handle row names in tables | 715 | * rownames:: Handle row names in tables |
| @@ -694,6 +728,7 @@ Miscellaneous | |||
| 694 | * Clean view:: Getting rid of leading stars in the outline | 728 | * Clean view:: Getting rid of leading stars in the outline |
| 695 | * TTY keys:: Using Org on a tty | 729 | * TTY keys:: Using Org on a tty |
| 696 | * Interaction:: Other Emacs packages | 730 | * Interaction:: Other Emacs packages |
| 731 | * org-crypt.el:: Encrypting Org files | ||
| 697 | 732 | ||
| 698 | Interaction with other packages | 733 | Interaction with other packages |
| 699 | 734 | ||
| @@ -716,7 +751,7 @@ Hacking | |||
| 716 | Tables and lists in arbitrary syntax | 751 | Tables and lists in arbitrary syntax |
| 717 | 752 | ||
| 718 | * Radio tables:: Sending and receiving radio tables | 753 | * Radio tables:: Sending and receiving radio tables |
| 719 | * A LaTeX example:: Step by step, almost a tutorial | 754 | * A @LaTeX{} example:: Step by step, almost a tutorial |
| 720 | * Translator functions:: Copy and modify | 755 | * Translator functions:: Copy and modify |
| 721 | * Radio lists:: Doing the same for lists | 756 | * Radio lists:: Doing the same for lists |
| 722 | 757 | ||
| @@ -769,7 +804,7 @@ create dynamic @i{agenda views}. | |||
| 769 | 804 | ||
| 770 | Org mode contains the Org Babel environment which allows you to work with | 805 | Org mode contains the Org Babel environment which allows you to work with |
| 771 | embedded source code blocks in a file, to facilitate code evaluation, | 806 | embedded source code blocks in a file, to facilitate code evaluation, |
| 772 | documentation, and tangling. | 807 | documentation, and literate programming techniques. |
| 773 | 808 | ||
| 774 | Org's automatic, context-sensitive table editor with spreadsheet | 809 | Org's automatic, context-sensitive table editor with spreadsheet |
| 775 | capabilities can be integrated into any major mode by activating the | 810 | capabilities can be integrated into any major mode by activating the |
| @@ -803,6 +838,11 @@ version of Org, as well as additional information, frequently asked | |||
| 803 | questions (FAQ), links to tutorials, etc@. This page is located at | 838 | questions (FAQ), links to tutorials, etc@. This page is located at |
| 804 | @uref{http://orgmode.org}. | 839 | @uref{http://orgmode.org}. |
| 805 | 840 | ||
| 841 | @cindex print edition | ||
| 842 | The version 7.3 of this manual is available as a | ||
| 843 | @uref{http://www.network-theory.co.uk/org/manual/, paperback book from Network | ||
| 844 | Theory Ltd.} | ||
| 845 | |||
| 806 | @page | 846 | @page |
| 807 | 847 | ||
| 808 | 848 | ||
| @@ -813,7 +853,9 @@ questions (FAQ), links to tutorials, etc@. This page is located at | |||
| 813 | 853 | ||
| 814 | @b{Important:} @i{If you are using a version of Org that is part of the Emacs | 854 | @b{Important:} @i{If you are using a version of Org that is part of the Emacs |
| 815 | distribution or an XEmacs package, please skip this section and go directly | 855 | distribution or an XEmacs package, please skip this section and go directly |
| 816 | to @ref{Activation}.} | 856 | to @ref{Activation}. To see what version of Org (if any) is part of your |
| 857 | Emacs distribution, type @kbd{M-x load-library RET org} and then @kbd{M-x | ||
| 858 | org-version}.} | ||
| 817 | 859 | ||
| 818 | If you have downloaded Org from the Web, either as a distribution @file{.zip} | 860 | If you have downloaded Org from the Web, either as a distribution @file{.zip} |
| 819 | or @file{.tar} file, or as a Git archive, you must take the following steps | 861 | or @file{.tar} file, or as a Git archive, you must take the following steps |
| @@ -852,20 +894,26 @@ make install | |||
| 852 | @end example | 894 | @end example |
| 853 | 895 | ||
| 854 | Installing Info files is system dependent, because of differences in the | 896 | Installing Info files is system dependent, because of differences in the |
| 855 | @file{install-info} program. In Debian it copies the info files into the | 897 | @file{install-info} program. The following should correctly install the Info |
| 856 | correct directory and modifies the info directory file. In many other | 898 | files on most systems, please send a bug report if not@footnote{The output |
| 857 | systems, the files need to be copied to the correct directory separately, and | 899 | from install-info (if any) is also system dependent. In particular Debian |
| 858 | @file{install-info} then only modifies the directory file. Check your system | 900 | and its derivatives use two different versions of install-info and you may |
| 859 | documentation to find out which of the following commands you need: | 901 | see the message: |
| 902 | |||
| 903 | @example | ||
| 904 | This is not dpkg install-info anymore, but GNU install-info | ||
| 905 | See the man page for ginstall-info for command line arguments | ||
| 906 | @end example | ||
| 907 | |||
| 908 | @noindent which can be safely ignored.}. | ||
| 860 | 909 | ||
| 861 | @example | 910 | @example |
| 862 | make install-info | 911 | make install-info |
| 863 | make install-info-debian | ||
| 864 | @end example | 912 | @end example |
| 865 | 913 | ||
| 866 | 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 |
| 867 | 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 |
| 868 | when Org-mode starts. | 916 | when Org mode starts. |
| 869 | @lisp | 917 | @lisp |
| 870 | (require 'org-install) | 918 | (require 'org-install) |
| 871 | @end lisp | 919 | @end lisp |
| @@ -880,31 +928,30 @@ Do not forget to activate Org as described in the following section. | |||
| 880 | @cindex global key bindings | 928 | @cindex global key bindings |
| 881 | @cindex key bindings, global | 929 | @cindex key bindings, global |
| 882 | 930 | ||
| 883 | Add the following lines to your @file{.emacs} file. The last three lines | 931 | To make sure files with extension @file{.org} use Org mode, add the following |
| 884 | define @emph{global} keys for the commands @command{org-store-link}, | 932 | line to your @file{.emacs} file. |
| 885 | @command{org-agenda}, and @command{org-iswitchb}---please choose suitable | ||
| 886 | keys yourself. | ||
| 887 | |||
| 888 | @lisp | 933 | @lisp |
| 889 | ;; The following lines are always needed. Choose your own keys. | ||
| 890 | (add-to-list 'auto-mode-alist '("\\.org\\'" . org-mode)) | 934 | (add-to-list 'auto-mode-alist '("\\.org\\'" . org-mode)) |
| 935 | @end lisp | ||
| 936 | @noindent Org mode buffers need font-lock to be turned on - this is the | ||
| 937 | default in Emacs@footnote{If you don't use font-lock globally, turn it on in | ||
| 938 | Org buffer with @code{(add-hook 'org-mode-hook 'turn-on-font-lock)}}. | ||
| 939 | |||
| 940 | The four Org commands @command{org-store-link}, @command{org-capture}, | ||
| 941 | @command{org-agenda}, and @command{org-iswitchb} should be accessible through | ||
| 942 | global keys (i.e.@: anywhere in Emacs, not just in Org buffers). Here are | ||
| 943 | suggested bindings for these keys, please modify the keys to your own | ||
| 944 | liking. | ||
| 945 | @lisp | ||
| 891 | (global-set-key "\C-cl" 'org-store-link) | 946 | (global-set-key "\C-cl" 'org-store-link) |
| 947 | (global-set-key "\C-cc" 'org-capture) | ||
| 892 | (global-set-key "\C-ca" 'org-agenda) | 948 | (global-set-key "\C-ca" 'org-agenda) |
| 893 | (global-set-key "\C-cb" 'org-iswitchb) | 949 | (global-set-key "\C-cb" 'org-iswitchb) |
| 894 | @end lisp | 950 | @end lisp |
| 895 | 951 | ||
| 896 | Furthermore, you must activate @code{font-lock-mode} in Org | 952 | @cindex Org mode, turning on |
| 897 | buffers, because significant functionality depends on font-locking being | ||
| 898 | active. You can do this with either one of the following two lines | ||
| 899 | (XEmacs users must use the second option): | ||
| 900 | @lisp | ||
| 901 | (global-font-lock-mode 1) ; for all buffers | ||
| 902 | (add-hook 'org-mode-hook 'turn-on-font-lock) ; Org buffers only | ||
| 903 | @end lisp | ||
| 904 | |||
| 905 | @cindex Org-mode, turning on | ||
| 906 | 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 |
| 907 | 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 |
| 908 | like this: | 955 | like this: |
| 909 | 956 | ||
| 910 | @example | 957 | @example |
| @@ -912,7 +959,7 @@ MY PROJECTS -*- mode: org; -*- | |||
| 912 | @end example | 959 | @end example |
| 913 | 960 | ||
| 914 | @vindex org-insert-mode-line-in-empty-file | 961 | @vindex org-insert-mode-line-in-empty-file |
| 915 | @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 |
| 916 | the file's name is. See also the variable | 963 | the file's name is. See also the variable |
| 917 | @code{org-insert-mode-line-in-empty-file}. | 964 | @code{org-insert-mode-line-in-empty-file}. |
| 918 | 965 | ||
| @@ -955,6 +1002,36 @@ version information of Emacs (@kbd{M-x emacs-version @key{RET}}) and Org | |||
| 955 | 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 |
| 956 | 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. |
| 957 | 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 | customizations and reproduce the problem. Doing so often helps you determine | ||
| 1008 | if the problem is with your customization 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 | |||
| 958 | 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 |
| 959 | 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 |
| 960 | about: | 1037 | about: |
| @@ -977,7 +1054,7 @@ error occurred. Here is how to produce a useful backtrace: | |||
| 977 | 1054 | ||
| 978 | @enumerate | 1055 | @enumerate |
| 979 | @item | 1056 | @item |
| 980 | Reload uncompiled versions of all Org-mode Lisp files. The backtrace | 1057 | Reload uncompiled versions of all Org mode Lisp files. The backtrace |
| 981 | contains much more information if it is produced with uncompiled code. | 1058 | contains much more information if it is produced with uncompiled code. |
| 982 | To do this, use | 1059 | To do this, use |
| 983 | @example | 1060 | @example |
| @@ -1164,8 +1241,8 @@ Reveal context around point, showing the current entry, the following heading | |||
| 1164 | 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 |
| 1165 | 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 |
| 1166 | (@pxref{Agenda commands}). With a prefix argument show, on each | 1243 | (@pxref{Agenda commands}). With a prefix argument show, on each |
| 1167 | 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 |
| 1168 | subtree of the parent. | 1245 | entire subtree of the parent. |
| 1169 | @orgcmd{C-c C-k,show-branches} | 1246 | @orgcmd{C-c C-k,show-branches} |
| 1170 | 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. |
| 1171 | @orgcmd{C-c C-x b,org-tree-to-indirect-buffer} | 1248 | @orgcmd{C-c C-x b,org-tree-to-indirect-buffer} |
| @@ -1183,6 +1260,8 @@ but without affecting visibility in that buffer.}. With a numeric | |||
| 1183 | prefix argument N, go up to level N and then take that tree. If N is | 1260 | prefix argument N, go up to level N and then take that tree. If N is |
| 1184 | negative then go up that many levels. With a @kbd{C-u} prefix, do not remove | 1261 | negative then go up that many levels. With a @kbd{C-u} prefix, do not remove |
| 1185 | the previously used indirect buffer. | 1262 | the previously used indirect buffer. |
| 1263 | @orgcmd{C-c C-x v,org-copy-visible} | ||
| 1264 | Copy the @i{visible} text in the region into the kill ring. | ||
| 1186 | @end table | 1265 | @end table |
| 1187 | 1266 | ||
| 1188 | @vindex org-startup-folded | 1267 | @vindex org-startup-folded |
| @@ -1192,7 +1271,7 @@ the previously used indirect buffer. | |||
| 1192 | @cindex @code{showeverything}, STARTUP keyword | 1271 | @cindex @code{showeverything}, STARTUP keyword |
| 1193 | 1272 | ||
| 1194 | When Emacs first visits an Org file, the global state is set to | 1273 | When Emacs first visits an Org file, the global state is set to |
| 1195 | OVERVIEW, i.e. only the top level headlines are visible. This can be | 1274 | OVERVIEW, i.e.@: only the top level headlines are visible. This can be |
| 1196 | configured through the variable @code{org-startup-folded}, or on a | 1275 | configured through the variable @code{org-startup-folded}, or on a |
| 1197 | per-file basis by adding one of the following lines anywhere in the | 1276 | per-file basis by adding one of the following lines anywhere in the |
| 1198 | buffer: | 1277 | buffer: |
| @@ -1212,7 +1291,7 @@ for this property are @code{folded}, @code{children}, @code{content}, and | |||
| 1212 | @code{all}. | 1291 | @code{all}. |
| 1213 | @table @asis | 1292 | @table @asis |
| 1214 | @orgcmd{C-u C-u @key{TAB},org-set-startup-visibility} | 1293 | @orgcmd{C-u C-u @key{TAB},org-set-startup-visibility} |
| 1215 | Switch back to the startup visibility of the buffer, i.e. whatever is | 1294 | Switch back to the startup visibility of the buffer, i.e.@: whatever is |
| 1216 | requested by startup options and @samp{VISIBILITY} properties in individual | 1295 | requested by startup options and @samp{VISIBILITY} properties in individual |
| 1217 | entries. | 1296 | entries. |
| 1218 | @end table | 1297 | @end table |
| @@ -1273,19 +1352,17 @@ See also the variable @code{org-goto-interface}. | |||
| 1273 | @table @asis | 1352 | @table @asis |
| 1274 | @orgcmd{M-@key{RET},org-insert-heading} | 1353 | @orgcmd{M-@key{RET},org-insert-heading} |
| 1275 | @vindex org-M-RET-may-split-line | 1354 | @vindex org-M-RET-may-split-line |
| 1276 | Insert new heading with same level as current. If the cursor is in a | 1355 | Insert new heading with same level as current. If the cursor is in a plain |
| 1277 | plain list item, a new item is created (@pxref{Plain lists}). To force | 1356 | list item, a new item is created (@pxref{Plain lists}). To force creation of |
| 1278 | creation of a new headline, use a prefix argument, or first press @key{RET} | 1357 | a new headline, use a prefix argument. When this command is used in the |
| 1279 | to get to the beginning of the next line. When this command is used in | 1358 | middle of a line, the line is split and the rest of the line becomes the new |
| 1280 | the middle of a line, the line is split and the rest of the line becomes | 1359 | headline@footnote{If you do not want the line to be split, customize the |
| 1281 | the new headline@footnote{If you do not want the line to be split, | 1360 | variable @code{org-M-RET-may-split-line}.}. If the command is used at the |
| 1282 | customize the variable @code{org-M-RET-may-split-line}.}. If the | 1361 | beginning of a headline, the new headline is created before the current line. |
| 1283 | command is used at the beginning of a headline, the new headline is | 1362 | If at the beginning of any other line, the content of that line is made the |
| 1284 | created before the current line. If at the beginning of any other line, | 1363 | new heading. If the command is used at the end of a folded subtree (i.e.@: |
| 1285 | the content of that line is made the new heading. If the command is | 1364 | behind the ellipses at the end of a headline), then a headline like the |
| 1286 | used at the end of a folded subtree (i.e. behind the ellipses at the end | 1365 | current one will be inserted after the end of the subtree. |
| 1287 | of a headline), then a headline like the current one will be inserted | ||
| 1288 | after the end of the subtree. | ||
| 1289 | @orgcmd{C-@key{RET},org-insert-heading-respect-content} | 1366 | @orgcmd{C-@key{RET},org-insert-heading-respect-content} |
| 1290 | Just like @kbd{M-@key{RET}}, except when adding a new heading below the | 1367 | Just like @kbd{M-@key{RET}}, except when adding a new heading below the |
| 1291 | current heading, the new heading is placed after the body instead of before | 1368 | current heading, the new heading is placed after the body instead of before |
| @@ -1317,7 +1394,7 @@ level). | |||
| 1317 | @orgcmd{M-S-@key{down},org-move-subtree-down} | 1394 | @orgcmd{M-S-@key{down},org-move-subtree-down} |
| 1318 | Move subtree down (swap with next subtree of same level). | 1395 | Move subtree down (swap with next subtree of same level). |
| 1319 | @orgcmd{C-c C-x C-w,org-cut-subtree} | 1396 | @orgcmd{C-c C-x C-w,org-cut-subtree} |
| 1320 | Kill subtree, i.e. remove it from buffer but save in kill ring. | 1397 | Kill subtree, i.e.@: remove it from buffer but save in kill ring. |
| 1321 | With a numeric prefix argument N, kill N sequential subtrees. | 1398 | With a numeric prefix argument N, kill N sequential subtrees. |
| 1322 | @orgcmd{C-c C-x M-w,org-copy-subtree} | 1399 | @orgcmd{C-c C-x M-w,org-copy-subtree} |
| 1323 | Copy subtree to kill ring. With a numeric prefix argument N, copy the N | 1400 | Copy subtree to kill ring. With a numeric prefix argument N, copy the N |
| @@ -1362,6 +1439,8 @@ sorting will be case-sensitive. With two @kbd{C-u C-u} prefixes, duplicate | |||
| 1362 | entries will also be removed. | 1439 | entries will also be removed. |
| 1363 | @orgcmd{C-x n s,org-narrow-to-subtree} | 1440 | @orgcmd{C-x n s,org-narrow-to-subtree} |
| 1364 | Narrow buffer to current subtree. | 1441 | Narrow buffer to current subtree. |
| 1442 | @orgcmd{C-x n b,org-narrow-to-block} | ||
| 1443 | Narrow buffer to current block. | ||
| 1365 | @orgcmd{C-x n w,widen} | 1444 | @orgcmd{C-x n w,widen} |
| 1366 | Widen buffer to remove narrowing. | 1445 | Widen buffer to remove narrowing. |
| 1367 | @orgcmd{C-c *,org-toggle-heading} | 1446 | @orgcmd{C-c *,org-toggle-heading} |
| @@ -1396,7 +1475,7 @@ functionality. | |||
| 1396 | @vindex org-show-following-heading | 1475 | @vindex org-show-following-heading |
| 1397 | @vindex org-show-siblings | 1476 | @vindex org-show-siblings |
| 1398 | @vindex org-show-entry-below | 1477 | @vindex org-show-entry-below |
| 1399 | 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 |
| 1400 | 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 |
| 1401 | 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 |
| 1402 | 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 |
| @@ -1405,7 +1484,7 @@ variables @code{org-show-hierarchy-above}, @code{org-show-following-heading}, | |||
| 1405 | 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 |
| 1406 | and you will see immediately how it works. | 1485 | and you will see immediately how it works. |
| 1407 | 1486 | ||
| 1408 | Org-mode contains several commands creating such trees, all these | 1487 | Org mode contains several commands creating such trees, all these |
| 1409 | commands can be accessed through a dispatcher: | 1488 | commands can be accessed through a dispatcher: |
| 1410 | 1489 | ||
| 1411 | @table @asis | 1490 | @table @asis |
| @@ -1413,7 +1492,7 @@ commands can be accessed through a dispatcher: | |||
| 1413 | This prompts for an extra key to select a sparse-tree creating command. | 1492 | This prompts for an extra key to select a sparse-tree creating command. |
| 1414 | @orgcmd{C-c / r,org-occur} | 1493 | @orgcmd{C-c / r,org-occur} |
| 1415 | @vindex org-remove-highlights-with-change | 1494 | @vindex org-remove-highlights-with-change |
| 1416 | Occur. Prompts for a regexp and shows a sparse tree with all matches. If | 1495 | Prompts for a regexp and shows a sparse tree with all matches. If |
| 1417 | the match is in a headline, the headline is made visible. If the match is in | 1496 | the match is in a headline, the headline is made visible. If the match is in |
| 1418 | the body of an entry, headline and body are made visible. In order to | 1497 | the body of an entry, headline and body are made visible. In order to |
| 1419 | provide minimal context, also the full hierarchy of headlines above the match | 1498 | provide minimal context, also the full hierarchy of headlines above the match |
| @@ -1423,8 +1502,13 @@ editing command@footnote{This depends on the option | |||
| 1423 | @code{org-remove-highlights-with-change}}, or by pressing @kbd{C-c C-c}. | 1502 | @code{org-remove-highlights-with-change}}, or by pressing @kbd{C-c C-c}. |
| 1424 | When called with a @kbd{C-u} prefix argument, previous highlights are kept, | 1503 | When called with a @kbd{C-u} prefix argument, previous highlights are kept, |
| 1425 | so several calls to this command can be stacked. | 1504 | so several calls to this command can be stacked. |
| 1505 | @orgcmdkkc{M-g n,M-g M-n,next-error} | ||
| 1506 | Jump to the next sparse tree match in this buffer. | ||
| 1507 | @orgcmdkkc{M-g p,M-g M-p,previous-error} | ||
| 1508 | Jump to the previous sparse tree match in this buffer. | ||
| 1426 | @end table | 1509 | @end table |
| 1427 | 1510 | ||
| 1511 | |||
| 1428 | @noindent | 1512 | @noindent |
| 1429 | @vindex org-agenda-custom-commands | 1513 | @vindex org-agenda-custom-commands |
| 1430 | For frequently used sparse trees of specific search strings, you can | 1514 | For frequently used sparse trees of specific search strings, you can |
| @@ -1472,44 +1556,47 @@ Org knows ordered lists, unordered lists, and description lists. | |||
| 1472 | @emph{Unordered} list items start with @samp{-}, @samp{+}, or | 1556 | @emph{Unordered} list items start with @samp{-}, @samp{+}, or |
| 1473 | @samp{*}@footnote{When using @samp{*} as a bullet, lines must be indented or | 1557 | @samp{*}@footnote{When using @samp{*} as a bullet, lines must be indented or |
| 1474 | they will be seen as top-level headlines. Also, when you are hiding leading | 1558 | they will be seen as top-level headlines. Also, when you are hiding leading |
| 1475 | stars to get a clean outline view, plain list items starting with a star are | 1559 | stars to get a clean outline view, plain list items starting with a star may |
| 1476 | visually indistinguishable from true headlines. In short: even though | 1560 | be hard to distinguish from true headlines. In short: even though @samp{*} |
| 1477 | @samp{*} is supported, it may be better to not use it for plain list items.} | 1561 | is supported, it may be better to not use it for plain list items.} as |
| 1478 | as bullets. | 1562 | bullets. |
| 1479 | @item | 1563 | @item |
| 1480 | @vindex org-plain-list-ordered-item-terminator | 1564 | @vindex org-plain-list-ordered-item-terminator |
| 1565 | @vindex org-alphabetical-lists | ||
| 1481 | @emph{Ordered} list items start with a numeral followed by either a period or | 1566 | @emph{Ordered} list items start with a numeral followed by either a period or |
| 1482 | a right parenthesis@footnote{You can filter out any of them by configuring | 1567 | a right parenthesis@footnote{You can filter out any of them by configuring |
| 1483 | @code{org-plain-list-ordered-item-terminator}.}, such as @samp{1.} or | 1568 | @code{org-plain-list-ordered-item-terminator}.}, such as @samp{1.} or |
| 1484 | @samp{1)}. If you want a list to start with a different value (e.g. 20), start | 1569 | @samp{1)}@footnote{You can also get @samp{a.}, @samp{A.}, @samp{a)} and |
| 1485 | the text of the item with @code{[@@20]}@footnote{If there's a checkbox in the | 1570 | @samp{A)} by configuring @code{org-alphabetical-lists}. To minimize |
| 1486 | item, the cookie must be put @emph{before} the checkbox.}. Those constructs | 1571 | confusion with normal text, those are limited to one character only. Beyond |
| 1487 | can be used in any item of the list in order to enforce a particular | 1572 | that limit, bullets will automatically fallback to numbers.}. If you want a |
| 1488 | numbering. | 1573 | list to start with a different value (e.g.@: 20), start the text of the item |
| 1574 | with @code{[@@20]}@footnote{If there's a checkbox in the item, the cookie | ||
| 1575 | must be put @emph{before} the checkbox. If you have activated alphabetical | ||
| 1576 | lists, you can also use counters like @code{[@@b]}.}. Those constructs can | ||
| 1577 | be used in any item of the list in order to enforce a particular numbering. | ||
| 1489 | @item | 1578 | @item |
| 1490 | @emph{Description} list items are unordered list items, and contain the | 1579 | @emph{Description} list items are unordered list items, and contain the |
| 1491 | separator @samp{ :: } to separate the description @emph{term} from the | 1580 | separator @samp{ :: } to distinguish the description @emph{term} from the |
| 1492 | description. | 1581 | description. |
| 1493 | @end itemize | 1582 | @end itemize |
| 1494 | 1583 | ||
| 1495 | Items belonging to the same list must have the same indentation on the first | 1584 | Items belonging to the same list must have the same indentation on the first |
| 1496 | line. In particular, if an ordered list reaches number @samp{10.}, then the | 1585 | line. In particular, if an ordered list reaches number @samp{10.}, then the |
| 1497 | 2--digit numbers must be written left-aligned with the other numbers in the | 1586 | 2--digit numbers must be written left-aligned with the other numbers in the |
| 1498 | list. | 1587 | list. An item ends before the next line that is less or equally indented |
| 1588 | than its bullet/number. | ||
| 1499 | 1589 | ||
| 1500 | @vindex org-list-ending-method | 1590 | @vindex org-list-ending-method |
| 1501 | @vindex org-list-end-regexp | 1591 | @vindex org-list-end-regexp |
| 1502 | @vindex org-empty-line-terminates-plain-lists | 1592 | @vindex org-empty-line-terminates-plain-lists |
| 1503 | Two methods@footnote{To disable either of them, configure | 1593 | Two methods@footnote{To disable either of them, configure |
| 1504 | @code{org-list-ending-method}.} are provided to terminate lists. A list ends | 1594 | @code{org-list-ending-method}.} are provided to terminate lists. A list ends |
| 1505 | before the next line that is indented like the bullet/number or less, or it | 1595 | whenever every item has ended, which means before any line less or equally |
| 1506 | ends before two blank lines@footnote{See also | 1596 | indented than items at top level. It also ends before two blank |
| 1507 | @code{org-empty-line-terminates-plain-lists}.}. In both cases, all levels of | 1597 | lines@footnote{See also @code{org-empty-line-terminates-plain-lists}.}. In |
| 1508 | the list are closed@footnote{So you cannot have a sublist, some text and then | 1598 | that case, all items are closed. For finer control, you can end lists with |
| 1509 | another sublist while still in the same top-level list item. This used to be | 1599 | any pattern set in @code{org-list-end-regexp}. Here is an example: |
| 1510 | possible, but it was only supported in the HTML exporter and difficult to | ||
| 1511 | manage with automatic indentation.}. For finer control, you can end lists | ||
| 1512 | with any pattern set in @code{org-list-end-regexp}. Here is an example: | ||
| 1513 | 1600 | ||
| 1514 | @example | 1601 | @example |
| 1515 | @group | 1602 | @group |
| @@ -1520,8 +1607,8 @@ with any pattern set in @code{org-list-end-regexp}. Here is an example: | |||
| 1520 | + this was already my favorite scene in the book | 1607 | + this was already my favorite scene in the book |
| 1521 | + I really like Miranda Otto. | 1608 | + I really like Miranda Otto. |
| 1522 | 3. Peter Jackson being shot by Legolas | 1609 | 3. Peter Jackson being shot by Legolas |
| 1523 | He makes a really funny face when it happens. | ||
| 1524 | - on DVD only | 1610 | - on DVD only |
| 1611 | He makes a really funny face when it happens. | ||
| 1525 | But in the end, no individual scenes matter but the film as a whole. | 1612 | But in the end, no individual scenes matter but the film as a whole. |
| 1526 | Important actors in this film are: | 1613 | Important actors in this film are: |
| 1527 | - @b{Elijah Wood} :: He plays Frodo | 1614 | - @b{Elijah Wood} :: He plays Frodo |
| @@ -1536,13 +1623,15 @@ XEmacs, you should use Kyle E. Jones' @file{filladapt.el}. To turn this on, | |||
| 1536 | put into @file{.emacs}: @code{(require 'filladapt)}}, and by exporting them | 1623 | put into @file{.emacs}: @code{(require 'filladapt)}}, and by exporting them |
| 1537 | properly (@pxref{Exporting}). Since indentation is what governs the | 1624 | properly (@pxref{Exporting}). Since indentation is what governs the |
| 1538 | structure of these lists, many structural constructs like @code{#+BEGIN_...} | 1625 | structure of these lists, many structural constructs like @code{#+BEGIN_...} |
| 1539 | blocks can be indented to signal that they should be considered as a list | 1626 | blocks can be indented to signal that they belong to a particular item. |
| 1540 | item. | ||
| 1541 | 1627 | ||
| 1542 | @vindex org-list-demote-modify-bullet | 1628 | @vindex org-list-demote-modify-bullet |
| 1629 | @vindex org-list-indent-offset | ||
| 1543 | If you find that using a different bullet for a sub-list (than that used for | 1630 | If you find that using a different bullet for a sub-list (than that used for |
| 1544 | the current list-level) improves readability, customize the variable | 1631 | the current list-level) improves readability, customize the variable |
| 1545 | @code{org-list-demote-modify-bullet}. | 1632 | @code{org-list-demote-modify-bullet}. To get a greater difference of |
| 1633 | indentation between items and theirs sub-items, customize | ||
| 1634 | @code{org-list-indent-offset}. | ||
| 1546 | 1635 | ||
| 1547 | @vindex org-list-automatic-rules | 1636 | @vindex org-list-automatic-rules |
| 1548 | The following commands act on items when the cursor is in the first line of | 1637 | The following commands act on items when the cursor is in the first line of |
| @@ -1553,62 +1642,63 @@ to disable them individually. | |||
| 1553 | 1642 | ||
| 1554 | @table @asis | 1643 | @table @asis |
| 1555 | @orgcmd{@key{TAB},org-cycle} | 1644 | @orgcmd{@key{TAB},org-cycle} |
| 1645 | @cindex cycling, in plain lists | ||
| 1556 | @vindex org-cycle-include-plain-lists | 1646 | @vindex org-cycle-include-plain-lists |
| 1557 | 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 |
| 1558 | 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 |
| 1559 | @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 |
| 1560 | @code{integrate}, plain list items will be treated like low-level | 1650 | @code{integrate}, plain list items will be treated like low-level |
| 1561 | 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 |
| 1562 | indentation of the bullet/number. Items are always subordinate to real | 1652 | bullet/number. Items are always subordinate to real headlines, however; the |
| 1563 | 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. | ||
| 1564 | @orgcmd{M-@key{RET},org-insert-heading} | 1657 | @orgcmd{M-@key{RET},org-insert-heading} |
| 1565 | @vindex org-M-RET-may-split-line | 1658 | @vindex org-M-RET-may-split-line |
| 1566 | @vindex org-list-automatic-rules | 1659 | @vindex org-list-automatic-rules |
| 1567 | Insert new item at current level. With a prefix argument, force a new | 1660 | Insert new item at current level. With a prefix argument, force a new |
| 1568 | heading (@pxref{Structure editing}). If this command is used in the middle | 1661 | heading (@pxref{Structure editing}). If this command is used in the middle |
| 1569 | of a line, the line is @emph{split} and the rest of the line becomes the new | 1662 | of an item, that item is @emph{split} in two, and the second part becomes the |
| 1570 | item@footnote{If you do not want the line to be split, customize the variable | 1663 | new item@footnote{If you do not want the item to be split, customize the |
| 1571 | @code{org-M-RET-may-split-line}.}. If this command is executed @emph{before | 1664 | variable @code{org-M-RET-may-split-line}.}. If this command is executed |
| 1572 | an item's body}, the new item is created @emph{before} the current item. If the | 1665 | @emph{before item's body}, the new item is created @emph{before} the current |
| 1573 | command is executed in the white space before the text that is part of an | 1666 | one. |
| 1574 | item but does not contain the bullet, a bullet is added to the current line. | 1667 | @end table |
| 1575 | 1668 | ||
| 1576 | As a new item cannot be inserted in a structural construct (like an example | 1669 | @table @kbd |
| 1577 | or source code block) within a list, Org will instead insert it right before | ||
| 1578 | the structure, or return an error. | ||
| 1579 | @kindex M-S-@key{RET} | 1670 | @kindex M-S-@key{RET} |
| 1580 | @item M-S-@key{RET} | 1671 | @item M-S-RET |
| 1581 | Insert a new item with a checkbox (@pxref{Checkboxes}). | 1672 | Insert a new item with a checkbox (@pxref{Checkboxes}). |
| 1582 | @orgcmd{@key{TAB},org-cycle} | ||
| 1583 | In a new item with no text yet, the first @key{TAB} demotes the item to | ||
| 1584 | become a child of the previous one. Subsequent @key{TAB}s move the item to | ||
| 1585 | meaningful levels in the list and eventually get it back to its initial | ||
| 1586 | position. | ||
| 1587 | @kindex S-@key{down} | 1673 | @kindex S-@key{down} |
| 1588 | @item S-@key{up} | 1674 | @item S-up |
| 1589 | @itemx S-@key{down} | 1675 | @itemx S-down |
| 1590 | @cindex shift-selection-mode | 1676 | @cindex shift-selection-mode |
| 1591 | @vindex org-support-shift-select | 1677 | @vindex org-support-shift-select |
| 1592 | Jump to the previous/next item in the current list, but only if | 1678 | @vindex org-list-use-circular-motion |
| 1679 | Jump to the previous/next item in the current list@footnote{If you want to | ||
| 1680 | cycle around items that way, you may customize | ||
| 1681 | @code{org-list-use-circular-motion}.}, but only if | ||
| 1593 | @code{org-support-shift-select} is off. If not, you can still use paragraph | 1682 | @code{org-support-shift-select} is off. If not, you can still use paragraph |
| 1594 | jumping commands like @kbd{C-@key{up}} and @kbd{C-@key{down}} to quite | 1683 | jumping commands like @kbd{C-@key{up}} and @kbd{C-@key{down}} to quite |
| 1595 | similar effect. | 1684 | similar effect. |
| 1596 | @kindex M-S-@key{up} | 1685 | @kindex M-@key{up} |
| 1597 | @kindex M-S-@key{down} | 1686 | @kindex M-@key{down} |
| 1598 | @item M-S-@key{up} | 1687 | @item M-up |
| 1599 | @itemx M-S-@key{down} | 1688 | @itemx M-down |
| 1600 | Move the item including subitems up/down (swap with previous/next item | 1689 | Move the item including subitems up/down@footnote{See |
| 1601 | of same indentation). If the list is ordered, renumbering is | 1690 | @code{org-liste-use-circular-motion} for a cyclic behavior.} (swap with |
| 1602 | automatic. | 1691 | previous/next item of same indentation). If the list is ordered, renumbering |
| 1692 | is automatic. | ||
| 1603 | @kindex M-@key{left} | 1693 | @kindex M-@key{left} |
| 1604 | @kindex M-@key{right} | 1694 | @kindex M-@key{right} |
| 1605 | @item M-@key{left} | 1695 | @item M-left |
| 1606 | @itemx M-@key{right} | 1696 | @itemx M-right |
| 1607 | Decrease/increase the indentation of an item, leaving children alone. | 1697 | Decrease/increase the indentation of an item, leaving children alone. |
| 1608 | @kindex M-S-@key{left} | 1698 | @kindex M-S-@key{left} |
| 1609 | @kindex M-S-@key{right} | 1699 | @kindex M-S-@key{right} |
| 1610 | @item M-S-@key{left} | 1700 | @item M-S-left |
| 1611 | @itemx M-S-@key{right} | 1701 | @itemx M-S-right |
| 1612 | Decrease/increase the indentation of the item, including subitems. | 1702 | Decrease/increase the indentation of the item, including subitems. |
| 1613 | Initially, the item tree is selected based on current indentation. When | 1703 | Initially, the item tree is selected based on current indentation. When |
| 1614 | these commands are executed several times in direct succession, the initially | 1704 | these commands are executed several times in direct succession, the initially |
| @@ -1623,9 +1713,8 @@ influence on the text @emph{after} the list. | |||
| 1623 | @kindex C-c C-c | 1713 | @kindex C-c C-c |
| 1624 | @item C-c C-c | 1714 | @item C-c C-c |
| 1625 | If there is a checkbox (@pxref{Checkboxes}) in the item line, toggle the | 1715 | If there is a checkbox (@pxref{Checkboxes}) in the item line, toggle the |
| 1626 | state of the checkbox. Also, makes sure that all the | 1716 | state of the checkbox. In any case, verify bullets and indentation |
| 1627 | items on this list level use the same bullet and that the numbering of list | 1717 | consistency in the whole list. |
| 1628 | items (if applicable) is correct. | ||
| 1629 | @kindex C-c - | 1718 | @kindex C-c - |
| 1630 | @vindex org-plain-list-ordered-item-terminator | 1719 | @vindex org-plain-list-ordered-item-terminator |
| 1631 | @vindex org-list-automatic-rules | 1720 | @vindex org-list-automatic-rules |
| @@ -1636,17 +1725,23 @@ depending on @code{org-plain-list-ordered-item-terminator}, the type of list, | |||
| 1636 | and its position@footnote{See @code{bullet} rule in | 1725 | and its position@footnote{See @code{bullet} rule in |
| 1637 | @code{org-list-automatic-rules} for more information.}. With a numeric | 1726 | @code{org-list-automatic-rules} for more information.}. With a numeric |
| 1638 | prefix argument N, select the Nth bullet from this list. If there is an | 1727 | prefix argument N, select the Nth bullet from this list. If there is an |
| 1639 | active region when calling this, all lines will be converted to list items. | 1728 | active region when calling this, selected text will be changed into an item. |
| 1640 | If the first line already was a list item, any item markers will be removed | 1729 | With a prefix argument, all lines will be converted to list items. If the |
| 1641 | from the list. Finally, even without an active region, a normal line will be | 1730 | first line already was a list item, any item marker will be removed from the |
| 1731 | list. Finally, even without an active region, a normal line will be | ||
| 1642 | converted into a list item. | 1732 | converted into a list item. |
| 1643 | @kindex C-c * | 1733 | @kindex C-c * |
| 1644 | @item C-c * | 1734 | @item C-c * |
| 1645 | Turn a plain list item into a headline (so that it becomes a subheading at | 1735 | Turn a plain list item into a headline (so that it becomes a subheading at |
| 1646 | its location). @xref{Structure editing}, for a detailed explanation. | 1736 | its location). @xref{Structure editing}, for a detailed explanation. |
| 1737 | @kindex C-c C-* | ||
| 1738 | @item C-c C-* | ||
| 1739 | Turn the whole plain list into a subtree of the current heading. Checkboxes | ||
| 1740 | (@pxref{Checkboxes}) will become TODO (resp. DONE) keywords when unchecked | ||
| 1741 | (resp. checked). | ||
| 1647 | @kindex S-@key{left} | 1742 | @kindex S-@key{left} |
| 1648 | @kindex S-@key{right} | 1743 | @kindex S-@key{right} |
| 1649 | @item S-@key{left}/@key{right} | 1744 | @item S-left/right |
| 1650 | @vindex org-support-shift-select | 1745 | @vindex org-support-shift-select |
| 1651 | 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 |
| 1652 | anywhere in an item line, details depending on | 1747 | anywhere in an item line, details depending on |
| @@ -1665,7 +1760,7 @@ numerically, alphabetically, by time, or by custom function. | |||
| 1665 | 1760 | ||
| 1666 | @vindex org-drawers | 1761 | @vindex org-drawers |
| 1667 | 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 |
| 1668 | 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}. |
| 1669 | Drawers need to be configured with the variable | 1764 | Drawers need to be configured with the variable |
| 1670 | @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 |
| 1671 | with a line like @code{#+DRAWERS: HIDDEN PROPERTIES STATE}}. Drawers | 1766 | with a line like @code{#+DRAWERS: HIDDEN PROPERTIES STATE}}. Drawers |
| @@ -1675,7 +1770,7 @@ look like this: | |||
| 1675 | ** This is a headline | 1770 | ** This is a headline |
| 1676 | Still outside the drawer | 1771 | Still outside the drawer |
| 1677 | :DRAWERNAME: | 1772 | :DRAWERNAME: |
| 1678 | This is inside the drawer. | 1773 | This is inside the drawer. |
| 1679 | :END: | 1774 | :END: |
| 1680 | After the drawer. | 1775 | After the drawer. |
| 1681 | @end example | 1776 | @end example |
| @@ -1683,7 +1778,7 @@ look like this: | |||
| 1683 | Visibility cycling (@pxref{Visibility cycling}) on the headline will hide and | 1778 | Visibility cycling (@pxref{Visibility cycling}) on the headline will hide and |
| 1684 | 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 |
| 1685 | 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 |
| 1686 | 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 |
| 1687 | storing properties (@pxref{Properties and Columns}), and you can also arrange | 1782 | storing properties (@pxref{Properties and Columns}), and you can also arrange |
| 1688 | 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 |
| 1689 | (@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 |
| @@ -1700,7 +1795,7 @@ Add a time-stamped note to the LOGBOOK drawer. | |||
| 1700 | 1795 | ||
| 1701 | @vindex org-hide-block-startup | 1796 | @vindex org-hide-block-startup |
| 1702 | @cindex blocks, folding | 1797 | @cindex blocks, folding |
| 1703 | 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 |
| 1704 | code examples (@pxref{Literal examples}) to capturing time logging | 1799 | code examples (@pxref{Literal examples}) to capturing time logging |
| 1705 | information (@pxref{Clocking work time}). These blocks can be folded and | 1800 | information (@pxref{Clocking work time}). These blocks can be folded and |
| 1706 | 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 |
| @@ -1718,10 +1813,10 @@ or on a per-file basis by using | |||
| 1718 | @section Footnotes | 1813 | @section Footnotes |
| 1719 | @cindex footnotes | 1814 | @cindex footnotes |
| 1720 | 1815 | ||
| 1721 | Org-mode supports the creation of footnotes. In contrast to the | 1816 | Org mode supports the creation of footnotes. In contrast to the |
| 1722 | @file{footnote.el} package, Org-mode's footnotes are designed for work on a | 1817 | @file{footnote.el} package, Org mode's footnotes are designed for work on a |
| 1723 | 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 |
| 1724 | 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 |
| 1725 | 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 |
| 1726 | brackets in column 0, no indentation allowed. If you need a paragraph break | 1821 | brackets in column 0, no indentation allowed. If you need a paragraph break |
| 1727 | inside a footnote, use the @LaTeX{} idiom @samp{\par}. The footnote reference | 1822 | inside a footnote, use the @LaTeX{} idiom @samp{\par}. The footnote reference |
| @@ -1733,11 +1828,11 @@ The Org homepage[fn:1] now looks a lot better than it used to. | |||
| 1733 | [fn:1] The link is: http://orgmode.org | 1828 | [fn:1] The link is: http://orgmode.org |
| 1734 | @end example | 1829 | @end example |
| 1735 | 1830 | ||
| 1736 | 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 |
| 1737 | optional inline definition. Using plain numbers as markers (as | 1832 | optional inline definition. Using plain numbers as markers (as |
| 1738 | @file{footnote.el} does) is supported for backward compatibility, but not | 1833 | @file{footnote.el} does) is supported for backward compatibility, but not |
| 1739 | encouraged because of possible conflicts with @LaTeX{} snippets (@pxref{Embedded | 1834 | encouraged because of possible conflicts with @LaTeX{} snippets (@pxref{Embedded |
| 1740 | LaTeX}). Here are the valid references: | 1835 | @LaTeX{}}). Here are the valid references: |
| 1741 | 1836 | ||
| 1742 | @table @code | 1837 | @table @code |
| 1743 | @item [1] | 1838 | @item [1] |
| @@ -1798,7 +1893,7 @@ S @r{Short for first @code{r}, then @code{s} action.} | |||
| 1798 | n @r{Normalize the footnotes by collecting all definitions (including} | 1893 | n @r{Normalize the footnotes by collecting all definitions (including} |
| 1799 | @r{inline definitions) into a special section, and then numbering them} | 1894 | @r{inline definitions) into a special section, and then numbering them} |
| 1800 | @r{in sequence. The references will then also be numbers. This is} | 1895 | @r{in sequence. The references will then also be numbers. This is} |
| 1801 | @r{meant to be the final step before finishing a document (e.g. sending} | 1896 | @r{meant to be the final step before finishing a document (e.g.@: sending} |
| 1802 | @r{off an email). The exporters do this automatically, and so could} | 1897 | @r{off an email). The exporters do this automatically, and so could} |
| 1803 | @r{something like @code{message-send-hook}.} | 1898 | @r{something like @code{message-send-hook}.} |
| 1804 | d @r{Delete the footnote at point, and all definitions of and references} | 1899 | d @r{Delete the footnote at point, and all definitions of and references} |
| @@ -1827,15 +1922,15 @@ you can use the usual commands to follow these links. | |||
| 1827 | @cindex Orgstruct mode | 1922 | @cindex Orgstruct mode |
| 1828 | @cindex minor mode for structure editing | 1923 | @cindex minor mode for structure editing |
| 1829 | 1924 | ||
| 1830 | 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 |
| 1831 | 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 |
| 1832 | 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 |
| 1833 | 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 |
| 1834 | turn it on by default, for example in Mail mode, with one of: | 1929 | turn it on by default, for example in Message mode, with one of: |
| 1835 | 1930 | ||
| 1836 | @lisp | 1931 | @lisp |
| 1837 | (add-hook 'mail-mode-hook 'turn-on-orgstruct) | 1932 | (add-hook 'message-mode-hook 'turn-on-orgstruct) |
| 1838 | (add-hook 'mail-mode-hook 'turn-on-orgstruct++) | 1933 | (add-hook 'message-mode-hook 'turn-on-orgstruct++) |
| 1839 | @end lisp | 1934 | @end lisp |
| 1840 | 1935 | ||
| 1841 | When this mode is active and the cursor is on a line that looks to Org like a | 1936 | When this mode is active and the cursor is on a line that looks to Org like a |
| @@ -1875,10 +1970,11 @@ calculator). | |||
| 1875 | @section The built-in table editor | 1970 | @section The built-in table editor |
| 1876 | @cindex table editor, built-in | 1971 | @cindex table editor, built-in |
| 1877 | 1972 | ||
| 1878 | Org makes it easy to format tables in plain ASCII. Any line with | 1973 | Org makes it easy to format tables in plain ASCII. Any line with @samp{|} as |
| 1879 | @samp{|} as the first non-whitespace character is considered part of a | 1974 | the first non-whitespace character is considered part of a table. @samp{|} |
| 1880 | table. @samp{|} is also the column separator. A table might look like | 1975 | is also the column separator@footnote{To insert a vertical bar into a table |
| 1881 | this: | 1976 | field, use @code{\vert} or, inside a word @code{abc\vert@{@}def}.}. A table |
| 1977 | might look like this: | ||
| 1882 | 1978 | ||
| 1883 | @example | 1979 | @example |
| 1884 | | Name | Phone | Age | | 1980 | | Name | Phone | Age | |
| @@ -1919,7 +2015,7 @@ unpredictable for you, configure the variables | |||
| 1919 | @table @kbd | 2015 | @table @kbd |
| 1920 | @tsubheading{Creation and conversion} | 2016 | @tsubheading{Creation and conversion} |
| 1921 | @orgcmd{C-c |,org-table-create-or-convert-from-region} | 2017 | @orgcmd{C-c |,org-table-create-or-convert-from-region} |
| 1922 | Convert the active region to table. If every line contains at least one | 2018 | Convert the active region to table. If every line contains at least one |
| 1923 | TAB character, the function assumes that the material is tab separated. | 2019 | TAB character, the function assumes that the material is tab separated. |
| 1924 | If every line contains a comma, comma-separated values (CSV) are assumed. | 2020 | If every line contains a comma, comma-separated values (CSV) are assumed. |
| 1925 | If not, lines are split at whitespace into fields. You can use a prefix | 2021 | If not, lines are split at whitespace into fields. You can use a prefix |
| @@ -1928,7 +2024,7 @@ C-u} forces TAB, and a numeric argument N indicates that at least N | |||
| 1928 | consecutive spaces, or alternatively a TAB will be the separator. | 2024 | consecutive spaces, or alternatively a TAB will be the separator. |
| 1929 | @* | 2025 | @* |
| 1930 | If there is no active region, this command creates an empty Org | 2026 | If there is no active region, this command creates an empty Org |
| 1931 | table. But it's easier just to start typing, like | 2027 | table. But it is easier just to start typing, like |
| 1932 | @kbd{|Name|Phone|Age @key{RET} |- @key{TAB}}. | 2028 | @kbd{|Name|Phone|Age @key{RET} |- @key{TAB}}. |
| 1933 | 2029 | ||
| 1934 | @tsubheading{Re-aligning and field motion} | 2030 | @tsubheading{Re-aligning and field motion} |
| @@ -2043,7 +2139,10 @@ increment. This key is also used by shift-selection and related modes | |||
| 2043 | Edit the current field in a separate window. This is useful for fields that | 2139 | Edit the current field in a separate window. This is useful for fields that |
| 2044 | are not fully visible (@pxref{Column width and alignment}). When called with | 2140 | are not fully visible (@pxref{Column width and alignment}). When called with |
| 2045 | a @kbd{C-u} prefix, just make the full field visible, so that it can be | 2141 | a @kbd{C-u} prefix, just make the full field visible, so that it can be |
| 2046 | edited in place. | 2142 | edited in place. When called with two @kbd{C-u} prefixes, make the editor |
| 2143 | window follow the cursor through the table and always show the current | ||
| 2144 | field. The follow mode exits automatically when the cursor leaves the table, | ||
| 2145 | or when you repeat this command with @kbd{C-u C-u C-c `}. | ||
| 2047 | @c | 2146 | @c |
| 2048 | @item M-x org-table-import | 2147 | @item M-x org-table-import |
| 2049 | Import a file as a table. The table should be TAB or whitespace | 2148 | Import a file as a table. The table should be TAB or whitespace |
| @@ -2187,10 +2286,10 @@ If you like the intuitive way the Org table editor works, you | |||
| 2187 | might also want to use it in other modes like Text mode or Mail mode. | 2286 | might also want to use it in other modes like Text mode or Mail mode. |
| 2188 | The minor mode Orgtbl mode makes this possible. You can always toggle | 2287 | The minor mode Orgtbl mode makes this possible. You can always toggle |
| 2189 | the mode with @kbd{M-x orgtbl-mode}. To turn it on by default, for | 2288 | the mode with @kbd{M-x orgtbl-mode}. To turn it on by default, for |
| 2190 | example in mail mode, use | 2289 | example in Message mode, use |
| 2191 | 2290 | ||
| 2192 | @lisp | 2291 | @lisp |
| 2193 | (add-hook 'mail-mode-hook 'turn-on-orgtbl) | 2292 | (add-hook 'message-mode-hook 'turn-on-orgtbl) |
| 2194 | @end lisp | 2293 | @end lisp |
| 2195 | 2294 | ||
| 2196 | Furthermore, with some special setup, it is possible to maintain tables | 2295 | Furthermore, with some special setup, it is possible to maintain tables |
| @@ -2219,11 +2318,12 @@ formula, moving these references by arrow keys | |||
| 2219 | * References:: How to refer to another field or range | 2318 | * References:: How to refer to another field or range |
| 2220 | * Formula syntax for Calc:: Using Calc to compute stuff | 2319 | * Formula syntax for Calc:: Using Calc to compute stuff |
| 2221 | * Formula syntax for Lisp:: Writing formulas in Emacs Lisp | 2320 | * Formula syntax for Lisp:: Writing formulas in Emacs Lisp |
| 2222 | * Field formulas:: Formulas valid for a single field | 2321 | * Durations and time values:: How to compute durations and time values |
| 2322 | * Field and range formulas:: Formula for specific (ranges of) fields | ||
| 2223 | * Column formulas:: Formulas valid for an entire column | 2323 | * Column formulas:: Formulas valid for an entire column |
| 2224 | * Editing and debugging formulas:: Fixing formulas | 2324 | * Editing and debugging formulas:: Fixing formulas |
| 2225 | * Updating the table:: Recomputing all dependent fields | 2325 | * Updating the table:: Recomputing all dependent fields |
| 2226 | * Advanced features:: Field names, parameters and automatic recalc | 2326 | * Advanced features:: Field and column names, parameters and automatic recalc |
| 2227 | @end menu | 2327 | @end menu |
| 2228 | 2328 | ||
| 2229 | @node References, Formula syntax for Calc, The spreadsheet, The spreadsheet | 2329 | @node References, Formula syntax for Calc, The spreadsheet, The spreadsheet |
| @@ -2243,35 +2343,42 @@ field, or press @kbd{C-c @}} to toggle the display of a grid. | |||
| 2243 | Formulas can reference the value of another field in two ways. Like in | 2343 | Formulas can reference the value of another field in two ways. Like in |
| 2244 | any other spreadsheet, you may reference fields with a letter/number | 2344 | any other spreadsheet, you may reference fields with a letter/number |
| 2245 | combination like @code{B3}, meaning the 2nd field in the 3rd row. | 2345 | combination like @code{B3}, meaning the 2nd field in the 3rd row. |
| 2246 | @c Such references are always fixed to that field, they don't change | 2346 | @vindex org-table-use-standard-references |
| 2247 | @c when you copy and paste a formula to a different field. So | 2347 | However, Org prefers@footnote{Org will understand references typed by the |
| 2248 | @c Org's @code{B3} behaves like @code{$B$3} in other spreadsheets. | 2348 | user as @samp{B4}, but it will not use this syntax when offering a formula |
| 2249 | 2349 | for editing. You can customize this behavior using the variable | |
| 2250 | @noindent | 2350 | @code{org-table-use-standard-references}.} to use another, more general |
| 2251 | Org also uses another, more general operator that looks like this: | 2351 | representation that looks like this: |
| 2252 | @example | 2352 | @example |
| 2253 | @@@var{row}$@var{column} | 2353 | @@@var{row}$@var{column} |
| 2254 | @end example | 2354 | @end example |
| 2255 | 2355 | ||
| 2256 | @noindent | 2356 | Column specifications can be absolute like @code{$1}, |
| 2257 | Column references can be absolute like @samp{1}, @samp{2},...@samp{@var{N}}, | 2357 | @code{$2},...@code{$@var{N}}, or relative to the current column (i.e.@: the |
| 2258 | or relative to the current column like @samp{+1} or @samp{-2}. | 2358 | column of the field which is being computed) like @code{$+1} or @code{$-2}. |
| 2259 | 2359 | @code{$<} and @code{$>} are immutable references to the first and last | |
| 2260 | The row specification only counts data lines and ignores horizontal | 2360 | column, respectively, and you can use @code{$>>>} to indicate the third |
| 2261 | separator lines (hlines). You can use absolute row numbers | 2361 | column from the right. |
| 2262 | @samp{1}...@samp{@var{N}}, and row numbers relative to the current row like | 2362 | |
| 2263 | @samp{+3} or @samp{-1}. Or specify the row relative to one of the | 2363 | The row specification only counts data lines and ignores horizontal separator |
| 2264 | hlines: @samp{I} refers to the first hline@footnote{Note that only | 2364 | lines (hlines). Like with columns, you can use absolute row numbers |
| 2265 | hlines are counted that @emph{separate} table lines. If the table | 2365 | @code{@@1}, @code{@@2},...@code{@@@var{N}}, and row numbers relative to the |
| 2266 | starts with a hline above the header, it does not count.}, @samp{II} to | 2366 | current row like @code{@@+3} or @code{@@-1}. @code{@@<} and @code{@@>} are |
| 2267 | the second, etc@. @samp{-I} refers to the first such line above the | 2367 | immutable references the first and last@footnote{For backward compatibility |
| 2268 | current line, @samp{+I} to the first such line below the current line. | 2368 | you can also use special names like @code{$LR5} and @code{$LR12} to refer in |
| 2269 | You can also write @samp{III+2} which is the second data line after the | 2369 | a stable way to the 5th and 12th field in the last row of the table. |
| 2270 | third hline in the table. | 2370 | However, this syntax is deprecated, it should not be used for new documents. |
| 2271 | 2371 | Use @code{@@>$} instead.} row in the table, respectively. You may also | |
| 2272 | @samp{0} refers to the current row and column. Also, if you omit | 2372 | specify the row relative to one of the hlines: @code{@@I} refers to the first |
| 2273 | either the column or the row part of the reference, the current | 2373 | hline, @code{@@II} to the second, etc@. @code{@@-I} refers to the first such |
| 2274 | row/column is implied. | 2374 | line above the current line, @code{@@+I} to the first such line below the |
| 2375 | current line. You can also write @code{@@III+2} which is the second data line | ||
| 2376 | after the third hline in the table. | ||
| 2377 | |||
| 2378 | @code{@@0} and @code{$0} refer to the current row and column, respectively, | ||
| 2379 | i.e. to the row/column for the field being computed. Also, if you omit | ||
| 2380 | either the column or the row part of the reference, the current row/column is | ||
| 2381 | implied. | ||
| 2275 | 2382 | ||
| 2276 | Org's references with @emph{unsigned} numbers are fixed references | 2383 | Org's references with @emph{unsigned} numbers are fixed references |
| 2277 | in the sense that if you use the same reference in the formula for two | 2384 | in the sense that if you use the same reference in the formula for two |
| @@ -2280,20 +2387,15 @@ Org's references with @emph{signed} numbers are floating | |||
| 2280 | references because the same reference operator can reference different | 2387 | references because the same reference operator can reference different |
| 2281 | fields depending on the field being calculated by the formula. | 2388 | fields depending on the field being calculated by the formula. |
| 2282 | 2389 | ||
| 2283 | As a special case, references like @samp{$LR5} and @samp{$LR12} can be used | ||
| 2284 | to refer in a stable way to the 5th and 12th field in the last row of the | ||
| 2285 | table. | ||
| 2286 | |||
| 2287 | Here are a few examples: | 2390 | Here are a few examples: |
| 2288 | 2391 | ||
| 2289 | @example | 2392 | @example |
| 2290 | @@2$3 @r{2nd row, 3rd column} | 2393 | @@2$3 @r{2nd row, 3rd column (same as @code{C2})} |
| 2291 | C2 @r{same as previous} | 2394 | $5 @r{column 5 in the current row (same as @code{E&})} |
| 2292 | $5 @r{column 5 in the current row} | ||
| 2293 | E& @r{same as previous} | ||
| 2294 | @@2 @r{current column, row 2} | 2395 | @@2 @r{current column, row 2} |
| 2295 | @@-1$-3 @r{the field one row up, three columns to the left} | 2396 | @@-1$-3 @r{the field one row up, three columns to the left} |
| 2296 | @@-I$2 @r{field just under hline above current row, column 2} | 2397 | @@-I$2 @r{field just under hline above current row, column 2} |
| 2398 | @@>$5 @r{field in the last row, in column 5} | ||
| 2297 | @end example | 2399 | @end example |
| 2298 | 2400 | ||
| 2299 | @subsubheading Range references | 2401 | @subsubheading Range references |
| @@ -2308,11 +2410,12 @@ format at least for the first field (i.e the reference must start with | |||
| 2308 | @samp{@@} in order to be interpreted correctly). Examples: | 2410 | @samp{@@} in order to be interpreted correctly). Examples: |
| 2309 | 2411 | ||
| 2310 | @example | 2412 | @example |
| 2311 | $1..$3 @r{First three fields in the current row.} | 2413 | $1..$3 @r{first three fields in the current row} |
| 2312 | $P..$Q @r{Range, using column names (see under Advanced)} | 2414 | $P..$Q @r{range, using column names (see under Advanced)} |
| 2313 | @@2$1..@@4$3 @r{6 fields between these two fields.} | 2415 | $<<<..$>> @r{start in third column, continue to the one but last} |
| 2314 | A2..C4 @r{Same as above.} | 2416 | @@2$1..@@4$3 @r{6 fields between these two fields (same as @code{A2..C4})} |
| 2315 | @@-1$-2..@@-1 @r{3 numbers from the column to the left, 2 up to current row} | 2417 | @@-1$-2..@@-1 @r{3 numbers from the column to the left, 2 up to current row} |
| 2418 | @@I..II @r{between first and second hline, short for @code{@@I..@@II}} | ||
| 2316 | @end example | 2419 | @end example |
| 2317 | 2420 | ||
| 2318 | @noindent Range references return a vector of values that can be fed | 2421 | @noindent Range references return a vector of values that can be fed |
| @@ -2339,7 +2442,7 @@ $3 = remote(FOO, @@@@#$2) @r{copy column 2 from table FOO into} | |||
| 2339 | @end example | 2442 | @end example |
| 2340 | 2443 | ||
| 2341 | @noindent For the second example, table FOO must have at least as many rows | 2444 | @noindent For the second example, table FOO must have at least as many rows |
| 2342 | as the current table. Inefficient@footnote{The computation time scales as | 2445 | as the current table. Note that this is inefficient@footnote{The computation time scales as |
| 2343 | O(N^2) because table FOO is parsed for each field to be copied.} for large | 2446 | O(N^2) because table FOO is parsed for each field to be copied.} for large |
| 2344 | number of rows. | 2447 | number of rows. |
| 2345 | 2448 | ||
| @@ -2440,7 +2543,6 @@ n3 s3 e2 f4 @r{Normal, scientific, engineering, or fixed} | |||
| 2440 | D R @r{angle modes: degrees, radians} | 2543 | D R @r{angle modes: degrees, radians} |
| 2441 | F S @r{fraction and symbolic modes} | 2544 | F S @r{fraction and symbolic modes} |
| 2442 | N @r{interpret all fields as numbers, use 0 for non-numbers} | 2545 | N @r{interpret all fields as numbers, use 0 for non-numbers} |
| 2443 | T @r{force text interpretation} | ||
| 2444 | E @r{keep empty fields in ranges} | 2546 | E @r{keep empty fields in ranges} |
| 2445 | L @r{literal} | 2547 | L @r{literal} |
| 2446 | @end example | 2548 | @end example |
| @@ -2474,10 +2576,13 @@ taylor($3,x=7,2) @r{Taylor series of $3, at x=7, second degree} | |||
| 2474 | Calc also contains a complete set of logical operations. For example | 2576 | Calc also contains a complete set of logical operations. For example |
| 2475 | 2577 | ||
| 2476 | @example | 2578 | @example |
| 2477 | if($1<20,teen,string("")) @r{``teen'' if age $1 less than 20, else empty} | 2579 | if($1<20,teen,string("")) @r{"teen" if age $1 less than 20, else empty} |
| 2478 | @end example | 2580 | @end example |
| 2479 | 2581 | ||
| 2480 | @node Formula syntax for Lisp, Field formulas, Formula syntax for Calc, The spreadsheet | 2582 | Note that you can also use two org-specific flags @code{T} and @code{t} for |
| 2583 | durations computations @ref{Durations and time values}. | ||
| 2584 | |||
| 2585 | @node Formula syntax for Lisp, Durations and time values, Formula syntax for Calc, The spreadsheet | ||
| 2481 | @subsection Emacs Lisp forms as formulas | 2586 | @subsection Emacs Lisp forms as formulas |
| 2482 | @cindex Lisp forms, as table formulas | 2587 | @cindex Lisp forms, as table formulas |
| 2483 | 2588 | ||
| @@ -2496,7 +2601,7 @@ you provide the @samp{L} flag, all fields will be interpolated literally, | |||
| 2496 | without quotes. I.e., if you want a reference to be interpreted as a string | 2601 | without quotes. I.e., if you want a reference to be interpreted as a string |
| 2497 | by the Lisp form, enclose the reference operator itself in double-quotes, | 2602 | by the Lisp form, enclose the reference operator itself in double-quotes, |
| 2498 | like @code{"$3"}. Ranges are inserted as space-separated fields, so you can | 2603 | like @code{"$3"}. Ranges are inserted as space-separated fields, so you can |
| 2499 | +embed them in list or vector syntax. Here are a few examples---note how the | 2604 | embed them in list or vector syntax. Here are a few examples---note how the |
| 2500 | @samp{N} mode is used when we do computations in Lisp: | 2605 | @samp{N} mode is used when we do computations in Lisp: |
| 2501 | 2606 | ||
| 2502 | @example | 2607 | @example |
| @@ -2508,31 +2613,64 @@ like @code{"$3"}. Ranges are inserted as space-separated fields, so you can | |||
| 2508 | '(apply '+ '($1..$4));N | 2613 | '(apply '+ '($1..$4));N |
| 2509 | @end example | 2614 | @end example |
| 2510 | 2615 | ||
| 2511 | @node Field formulas, Column formulas, Formula syntax for Lisp, The spreadsheet | 2616 | @node Durations and time values, Field and range formulas, Formula syntax for Lisp, The spreadsheet |
| 2512 | @subsection Field formulas | 2617 | @subsection Durations and time values |
| 2618 | @cindex Duration, computing | ||
| 2619 | @cindex Time, computing | ||
| 2620 | @vindex org-table-duration-custom-format | ||
| 2621 | |||
| 2622 | If you want to compute time values use the @code{T} flag, either in Calc | ||
| 2623 | formulas or Elisp formulas: | ||
| 2624 | |||
| 2625 | @example | ||
| 2626 | @group | ||
| 2627 | | Task 1 | Task 2 | Total | | ||
| 2628 | |---------+----------+----------| | ||
| 2629 | | 2:12 | 1:47 | 03:59:00 | | ||
| 2630 | | 3:02:20 | -2:07:00 | 0.92 | | ||
| 2631 | #+TBLFM: @@2$3=$1+$2;T::@@3$3=$1+$2;t | ||
| 2632 | @end group | ||
| 2633 | @end example | ||
| 2634 | |||
| 2635 | Input duration values must be of the form @code{[HH:MM[:SS]}, where seconds | ||
| 2636 | are optional. With the @code{T} flag, computed durations will be displayed | ||
| 2637 | as @code{[HH:MM:SS} (see the first formula above). With the @code{t} flag, | ||
| 2638 | computed durations will be displayed according to the value of the variable | ||
| 2639 | @code{org-table-duration-custom-format}, which defaults to @code{'hours} and | ||
| 2640 | will display the result as a fraction of hours (see the second formula in the | ||
| 2641 | example above). | ||
| 2642 | |||
| 2643 | Negative duration values can be manipulated as well, and integers will be | ||
| 2644 | considered as seconds in addition and subtraction. | ||
| 2645 | |||
| 2646 | @node Field and range formulas, Column formulas, Durations and time values, The spreadsheet | ||
| 2647 | @subsection Field and range formulas | ||
| 2513 | @cindex field formula | 2648 | @cindex field formula |
| 2649 | @cindex range formula | ||
| 2514 | @cindex formula, for individual table field | 2650 | @cindex formula, for individual table field |
| 2651 | @cindex formula, for range of fields | ||
| 2515 | 2652 | ||
| 2516 | To assign a formula to a particular field, type it directly into the | 2653 | To assign a formula to a particular field, type it directly into the field, |
| 2517 | field, preceded by @samp{:=}, for example @samp{:=$1+$2}. When you | 2654 | preceded by @samp{:=}, for example @samp{:=vsum(@@II..III)}. When you press |
| 2518 | press @key{TAB} or @key{RET} or @kbd{C-c C-c} with the cursor still in | 2655 | @key{TAB} or @key{RET} or @kbd{C-c C-c} with the cursor still in the field, |
| 2519 | the field, the formula will be stored as the formula for this field, | 2656 | the formula will be stored as the formula for this field, evaluated, and the |
| 2520 | evaluated, and the current field replaced with the result. | 2657 | current field will be replaced with the result. |
| 2521 | 2658 | ||
| 2522 | @cindex #+TBLFM | 2659 | @cindex #+TBLFM |
| 2523 | Formulas are stored in a special line starting with @samp{#+TBLFM:} | 2660 | Formulas are stored in a special line starting with @samp{#+TBLFM:} directly |
| 2524 | directly below the table. If you type the equation in the 4th field of | 2661 | below the table. If you type the equation in the 4th field of the 3rd data |
| 2525 | the 3rd data line in the table, the formula will look like | 2662 | line in the table, the formula will look like @samp{@@3$4=$1+$2}. When |
| 2526 | @samp{@@3$4=$1+$2}. When inserting/deleting/swapping column and rows | 2663 | inserting/deleting/swapping column and rows with the appropriate commands, |
| 2527 | with the appropriate commands, @i{absolute references} (but not relative | 2664 | @i{absolute references} (but not relative ones) in stored formulas are |
| 2528 | ones) in stored formulas are modified in order to still reference the | 2665 | modified in order to still reference the same field. To avoid this from |
| 2529 | same field. Of course this is not true if you edit the table structure | 2666 | happening, in particular in range references, anchor ranges at the table |
| 2530 | with normal editing commands---then you must fix the equations yourself. | 2667 | borders (using @code{@@<}, @code{@@>}, @code{$<}, @code{$>}), or at hlines |
| 2531 | The left-hand side of a formula may also be a named field (@pxref{Advanced | 2668 | using the @code{@@I} notation. Automatic adaptation of field references does |
| 2532 | features}), or a last-row reference like @samp{$LR3}. | 2669 | of cause not happen if you edit the table structure with normal editing |
| 2533 | 2670 | commands---then you must fix the equations yourself. | |
| 2534 | Instead of typing an equation into the field, you may also use the | 2671 | |
| 2535 | following command | 2672 | Instead of typing an equation into the field, you may also use the following |
| 2673 | command | ||
| 2536 | 2674 | ||
| 2537 | @table @kbd | 2675 | @table @kbd |
| 2538 | @orgcmd{C-u C-c =,org-table-eval-formula} | 2676 | @orgcmd{C-u C-c =,org-table-eval-formula} |
| @@ -2541,17 +2679,38 @@ formula with default taken from the @samp{#+TBLFM:} line, applies | |||
| 2541 | it to the current field, and stores it. | 2679 | it to the current field, and stores it. |
| 2542 | @end table | 2680 | @end table |
| 2543 | 2681 | ||
| 2544 | @node Column formulas, Editing and debugging formulas, Field formulas, The spreadsheet | 2682 | The left-hand side of a formula can also be a special expression in order to |
| 2683 | assign the formula to a number of different fields. There is no keyboard | ||
| 2684 | shortcut to enter such range formulas. To add them, use the formula editor | ||
| 2685 | (@pxref{Editing and debugging formulas}) or edit the @code{#+TBLFM:} line | ||
| 2686 | directly. | ||
| 2687 | |||
| 2688 | @table @code | ||
| 2689 | @item $2= | ||
| 2690 | Column formula, valid for the entire column. This is so common that Org | ||
| 2691 | treats these formulas in a special way, see @ref{Column formulas}. | ||
| 2692 | @item @@3= | ||
| 2693 | Row formula, applies to all fields in the specified row. @code{@@>=} means | ||
| 2694 | the last row. | ||
| 2695 | @item @@1$2..@@4$3= | ||
| 2696 | Range formula, applies to all fields in the given rectangular range. This | ||
| 2697 | can also be used to assign a formula to some but not all fields in a row. | ||
| 2698 | @item $name= | ||
| 2699 | Named field, see @ref{Advanced features}. | ||
| 2700 | @end table | ||
| 2701 | |||
| 2702 | @node Column formulas, Editing and debugging formulas, Field and range formulas, The spreadsheet | ||
| 2545 | @subsection Column formulas | 2703 | @subsection Column formulas |
| 2546 | @cindex column formula | 2704 | @cindex column formula |
| 2547 | @cindex formula, for table column | 2705 | @cindex formula, for table column |
| 2548 | 2706 | ||
| 2549 | Often in a table, the same formula should be used for all fields in a | 2707 | When you assign a formula to a simple column reference like @code{$3=}, the |
| 2550 | particular column. Instead of having to copy the formula to all fields | 2708 | same formula will be used in all fields of that column, with the following |
| 2551 | in that column, Org allows you to assign a single formula to an entire | 2709 | very convenient exceptions: (i) If the table contains horizontal separator |
| 2552 | column. If the table contains horizontal separator hlines, everything | 2710 | hlines, everything before the first such line is considered part of the table |
| 2553 | before the first such line is considered part of the table @emph{header} | 2711 | @emph{header} and will not be modified by column formulas. (ii) Fields that |
| 2554 | and will not be modified by column formulas. | 2712 | already get a value from a field/range formula will be left alone by column |
| 2713 | formulas. These conditions make column formulas very easy to use. | ||
| 2555 | 2714 | ||
| 2556 | To assign a formula to a column, type it directly into any field in the | 2715 | To assign a formula to a column, type it directly into any field in the |
| 2557 | column, preceded by an equal sign, like @samp{=$1+$2}. When you press | 2716 | column, preceded by an equal sign, like @samp{=$1+$2}. When you press |
| @@ -2560,9 +2719,9 @@ the formula will be stored as the formula for the current column, evaluated | |||
| 2560 | and the current field replaced with the result. If the field contains only | 2719 | and the current field replaced with the result. If the field contains only |
| 2561 | @samp{=}, the previously stored formula for this column is used. For each | 2720 | @samp{=}, the previously stored formula for this column is used. For each |
| 2562 | column, Org will only remember the most recently used formula. In the | 2721 | column, Org will only remember the most recently used formula. In the |
| 2563 | @samp{#+TBLFM:} line, column formulas will look like @samp{$4=$1+$2}. The left-hand | 2722 | @samp{#+TBLFM:} line, column formulas will look like @samp{$4=$1+$2}. The |
| 2564 | side of a column formula cannot currently be the name of column, it | 2723 | left-hand side of a column formula can not be the name of column, it must be |
| 2565 | must be the numeric column reference. | 2724 | the numeric column reference or @code{$>}. |
| 2566 | 2725 | ||
| 2567 | Instead of typing an equation into the field, you may also use the | 2726 | Instead of typing an equation into the field, you may also use the |
| 2568 | following command: | 2727 | following command: |
| @@ -2572,7 +2731,7 @@ following command: | |||
| 2572 | Install a new formula for the current column and replace current field with | 2731 | Install a new formula for the current column and replace current field with |
| 2573 | the result of the formula. The command prompts for a formula, with default | 2732 | the result of the formula. The command prompts for a formula, with default |
| 2574 | taken from the @samp{#+TBLFM} line, applies it to the current field and | 2733 | taken from the @samp{#+TBLFM} line, applies it to the current field and |
| 2575 | stores it. With a numeric prefix argument(e.g. @kbd{C-5 C-c =}) the command | 2734 | stores it. With a numeric prefix argument(e.g.@: @kbd{C-5 C-c =}) the command |
| 2576 | will apply it to that many consecutive fields in the current column. | 2735 | will apply it to that many consecutive fields in the current column. |
| 2577 | @end table | 2736 | @end table |
| 2578 | 2737 | ||
| @@ -2593,7 +2752,7 @@ if possible. If you prefer to only work with the internal format (like | |||
| 2593 | @table @kbd | 2752 | @table @kbd |
| 2594 | @orgcmdkkc{C-c =,C-u C-c =,org-table-eval-formula} | 2753 | @orgcmdkkc{C-c =,C-u C-c =,org-table-eval-formula} |
| 2595 | Edit the formula associated with the current column/field in the | 2754 | Edit the formula associated with the current column/field in the |
| 2596 | minibuffer. See @ref{Column formulas}, and @ref{Field formulas}. | 2755 | minibuffer. See @ref{Column formulas}, and @ref{Field and range formulas}. |
| 2597 | @orgcmd{C-u C-u C-c =,org-table-eval-formula} | 2756 | @orgcmd{C-u C-u C-c =,org-table-eval-formula} |
| 2598 | Re-insert the active formula (either a | 2757 | Re-insert the active formula (either a |
| 2599 | field formula, or a column formula) into the current field, so that you | 2758 | field formula, or a column formula) into the current field, so that you |
| @@ -2696,7 +2855,7 @@ following commands: | |||
| 2696 | @table @kbd | 2855 | @table @kbd |
| 2697 | @orgcmd{C-c *,org-table-recalculate} | 2856 | @orgcmd{C-c *,org-table-recalculate} |
| 2698 | Recalculate the current row by first applying the stored column formulas | 2857 | Recalculate the current row by first applying the stored column formulas |
| 2699 | from left to right, and all field formulas in the current row. | 2858 | from left to right, and all field/range formulas in the current row. |
| 2700 | @c | 2859 | @c |
| 2701 | @kindex C-u C-c * | 2860 | @kindex C-u C-c * |
| 2702 | @item C-u C-c * | 2861 | @item C-u C-c * |
| @@ -2721,9 +2880,12 @@ dependencies. | |||
| 2721 | @node Advanced features, , Updating the table, The spreadsheet | 2880 | @node Advanced features, , Updating the table, The spreadsheet |
| 2722 | @subsection Advanced features | 2881 | @subsection Advanced features |
| 2723 | 2882 | ||
| 2724 | 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 |
| 2725 | 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 |
| 2726 | 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. | ||
| 2888 | |||
| 2727 | @table @kbd | 2889 | @table @kbd |
| 2728 | @orgcmd{C-#,org-table-rotate-recalc-marks} | 2890 | @orgcmd{C-#,org-table-rotate-recalc-marks} |
| 2729 | Rotate the calculation mark in first column through the states @samp{ }, | 2891 | Rotate the calculation mark in first column through the states @samp{ }, |
| @@ -2849,7 +3011,7 @@ Further control over the labels, type, content, and appearance of plots can | |||
| 2849 | be exercised through the @code{#+PLOT:} lines preceding a table. See below | 3011 | be exercised through the @code{#+PLOT:} lines preceding a table. See below |
| 2850 | for a complete list of Org-plot options. For more information and examples | 3012 | for a complete list of Org-plot options. For more information and examples |
| 2851 | see the Org-plot tutorial at | 3013 | see the Org-plot tutorial at |
| 2852 | @uref{http://orgmode.org/worg/org-tutorials/org-plot.php}. | 3014 | @uref{http://orgmode.org/worg/org-tutorials/org-plot.html}. |
| 2853 | 3015 | ||
| 2854 | @subsubheading Plot Options | 3016 | @subsubheading Plot Options |
| 2855 | 3017 | ||
| @@ -2874,7 +3036,7 @@ Specify whether the plot will be @code{2d}, @code{3d}, or @code{grid}. | |||
| 2874 | 3036 | ||
| 2875 | @item with | 3037 | @item with |
| 2876 | Specify a @code{with} option to be inserted for every col being plotted | 3038 | Specify a @code{with} option to be inserted for every col being plotted |
| 2877 | (e.g. @code{lines}, @code{points}, @code{boxes}, @code{impulses}, etc...). | 3039 | (e.g.@: @code{lines}, @code{points}, @code{boxes}, @code{impulses}, etc...). |
| 2878 | Defaults to @code{lines}. | 3040 | Defaults to @code{lines}. |
| 2879 | 3041 | ||
| 2880 | @item file | 3042 | @item file |
| @@ -2892,7 +3054,7 @@ When plotting @code{3d} or @code{grid} types, set this to @code{t} to graph a | |||
| 2892 | flat mapping rather than a @code{3d} slope. | 3054 | flat mapping rather than a @code{3d} slope. |
| 2893 | 3055 | ||
| 2894 | @item timefmt | 3056 | @item timefmt |
| 2895 | 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. |
| 2896 | Defaults to @samp{%Y-%m-%d-%H:%M:%S}. | 3058 | Defaults to @samp{%Y-%m-%d-%H:%M:%S}. |
| 2897 | 3059 | ||
| 2898 | @item script | 3060 | @item script |
| @@ -2976,7 +3138,7 @@ or with a mouse click (@pxref{Handling links}). Links to custom IDs will | |||
| 2976 | point to the corresponding headline. The preferred match for a text link is | 3138 | point to the corresponding headline. The preferred match for a text link is |
| 2977 | a @i{dedicated target}: the same string in double angular brackets. Targets | 3139 | a @i{dedicated target}: the same string in double angular brackets. Targets |
| 2978 | may be located anywhere; sometimes it is convenient to put them into a | 3140 | may be located anywhere; sometimes it is convenient to put them into a |
| 2979 | comment line. For example | 3141 | comment line. For example |
| 2980 | 3142 | ||
| 2981 | @example | 3143 | @example |
| 2982 | # <<My Target>> | 3144 | # <<My Target>> |
| @@ -3055,11 +3217,19 @@ file:papers/last.pdf @r{file, relative path} | |||
| 3055 | ./papers/last.pdf @r{same as above} | 3217 | ./papers/last.pdf @r{same as above} |
| 3056 | 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} |
| 3057 | /myself@@some.where:papers/last.pdf @r{same as above} | 3219 | /myself@@some.where:papers/last.pdf @r{same as above} |
| 3058 | file:sometextfile::NNN @r{file with line number to jump to} | 3220 | file:sometextfile::NNN @r{file, jump to line number} |
| 3059 | file:projects.org @r{another Org file} | 3221 | file:projects.org @r{another Org file} |
| 3060 | 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.} | ||
| 3061 | file:projects.org::*task title @r{heading search in Org file} | 3229 | file:projects.org::*task title @r{heading search in Org file} |
| 3062 | 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} | ||
| 3063 | 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} |
| 3064 | news:comp.emacs @r{Usenet link} | 3234 | news:comp.emacs @r{Usenet link} |
| 3065 | mailto:adent@@galaxy.net @r{Mail link} | 3235 | mailto:adent@@galaxy.net @r{Mail link} |
| @@ -3076,12 +3246,14 @@ gnus:group @r{Gnus group link} | |||
| 3076 | gnus:group#id @r{Gnus article link} | 3246 | gnus:group#id @r{Gnus article link} |
| 3077 | bbdb:R.*Stallman @r{BBDB link (with regexp)} | 3247 | bbdb:R.*Stallman @r{BBDB link (with regexp)} |
| 3078 | irc:/irc.com/#emacs/bob @r{IRC link} | 3248 | irc:/irc.com/#emacs/bob @r{IRC link} |
| 3079 | info:org:External%20links @r{Info node link (with encoded space)} | 3249 | info:org#External links @r{Info node link} |
| 3080 | shell:ls *.org @r{A shell command} | 3250 | shell:ls *.org @r{A shell command} |
| 3081 | elisp:org-agenda @r{Interactive Elisp command} | 3251 | elisp:org-agenda @r{Interactive Elisp command} |
| 3082 | 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} |
| 3083 | @end example | 3253 | @end example |
| 3084 | 3254 | ||
| 3255 | For customizing Org to add new link types @ref{Adding hyperlink types}. | ||
| 3256 | |||
| 3085 | A link should be enclosed in double brackets and may contain a | 3257 | A link should be enclosed in double brackets and may contain a |
| 3086 | descriptive text to be displayed instead of the URL (@pxref{Link | 3258 | descriptive text to be displayed instead of the URL (@pxref{Link |
| 3087 | format}), for example: | 3259 | format}), for example: |
| @@ -3120,10 +3292,12 @@ create a link. The link will be stored for later insertion into an Org | |||
| 3120 | 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 |
| 3121 | buffer: | 3293 | buffer: |
| 3122 | 3294 | ||
| 3123 | @b{Org-mode buffers}@* | 3295 | @b{Org mode buffers}@* |
| 3124 | 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 |
| 3125 | 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 |
| 3126 | be the description. | 3298 | be the description@footnote{If the headline contains a timestamp, it will be |
| 3299 | removed from the link and result in a wrong link -- you should avoid putting | ||
| 3300 | timestamp in the headline.}. | ||
| 3127 | 3301 | ||
| 3128 | @vindex org-link-to-org-use-id | 3302 | @vindex org-link-to-org-use-id |
| 3129 | @cindex property, CUSTOM_ID | 3303 | @cindex property, CUSTOM_ID |
| @@ -3221,6 +3395,7 @@ link and description parts of the link. | |||
| 3221 | @cindex following links | 3395 | @cindex following links |
| 3222 | @orgcmd{C-c C-o,org-open-at-point} | 3396 | @orgcmd{C-c C-o,org-open-at-point} |
| 3223 | @vindex org-file-apps | 3397 | @vindex org-file-apps |
| 3398 | @vindex org-link-frame-setup | ||
| 3224 | 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 |
| 3225 | @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 |
| 3226 | 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 |
| @@ -3234,7 +3409,9 @@ Classification of files is based on file extension only. See option | |||
| 3234 | 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 |
| 3235 | opening in Emacs, use a @kbd{C-u C-u} prefix.@* | 3410 | opening in Emacs, use a @kbd{C-u C-u} prefix.@* |
| 3236 | 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 |
| 3237 | 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 | |||
| 3238 | @orgkey @key{RET} | 3415 | @orgkey @key{RET} |
| 3239 | @vindex org-return-follows-link | 3416 | @vindex org-return-follows-link |
| 3240 | 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 |
| @@ -3261,7 +3438,7 @@ variable @code{org-display-internal-link-with-indirect-buffer}}. | |||
| 3261 | @cindex @code{inlineimages}, STARTUP keyword | 3438 | @cindex @code{inlineimages}, STARTUP keyword |
| 3262 | @cindex @code{noinlineimages}, STARTUP keyword | 3439 | @cindex @code{noinlineimages}, STARTUP keyword |
| 3263 | Toggle the inline display of linked images. Normally this will only inline | 3440 | Toggle the inline display of linked images. Normally this will only inline |
| 3264 | images that have no description part in the link, i.e. images that will also | 3441 | images that have no description part in the link, i.e.@: images that will also |
| 3265 | be inlined during export. When called with a prefix argument, also display | 3442 | be inlined during export. When called with a prefix argument, also display |
| 3266 | images that do have a link description. You can ask for inline images to be | 3443 | images that do have a link description. You can ask for inline images to be |
| 3267 | displayed at startup by configuring the variable | 3444 | displayed at startup by configuring the variable |
| @@ -3270,7 +3447,7 @@ displayed at startup by configuring the variable | |||
| 3270 | @orgcmd{C-c %,org-mark-ring-push} | 3447 | @orgcmd{C-c %,org-mark-ring-push} |
| 3271 | @cindex mark ring | 3448 | @cindex mark ring |
| 3272 | Push the current position onto the mark ring, to be able to return | 3449 | Push the current position onto the mark ring, to be able to return |
| 3273 | easily. Commands following an internal link do this automatically. | 3450 | easily. Commands following an internal link do this automatically. |
| 3274 | @c | 3451 | @c |
| 3275 | @orgcmd{C-c &,org-mark-ring-goto} | 3452 | @orgcmd{C-c &,org-mark-ring-goto} |
| 3276 | @cindex links, returning to | 3453 | @cindex links, returning to |
| @@ -3288,8 +3465,8 @@ to @kbd{C-n} and @kbd{C-p} | |||
| 3288 | @lisp | 3465 | @lisp |
| 3289 | (add-hook 'org-load-hook | 3466 | (add-hook 'org-load-hook |
| 3290 | (lambda () | 3467 | (lambda () |
| 3291 | (define-key 'org-mode-map "\C-n" 'org-next-link) | 3468 | (define-key org-mode-map "\C-n" 'org-next-link) |
| 3292 | (define-key 'org-mode-map "\C-p" 'org-previous-link))) | 3469 | (define-key org-mode-map "\C-p" 'org-previous-link))) |
| 3293 | @end lisp | 3470 | @end lisp |
| 3294 | @end table | 3471 | @end table |
| 3295 | 3472 | ||
| @@ -3363,7 +3540,7 @@ can define them in the file with | |||
| 3363 | @noindent | 3540 | @noindent |
| 3364 | In-buffer completion (@pxref{Completion}) can be used after @samp{[} to | 3541 | In-buffer completion (@pxref{Completion}) can be used after @samp{[} to |
| 3365 | complete link abbreviations. You may also define a function | 3542 | complete link abbreviations. You may also define a function |
| 3366 | @code{org-PREFIX-complete-link} that implements special (e.g. completion) | 3543 | @code{org-PREFIX-complete-link} that implements special (e.g.@: completion) |
| 3367 | support for inserting such a link with @kbd{C-c C-l}. Such a function should | 3544 | support for inserting such a link with @kbd{C-c C-l}. Such a function should |
| 3368 | not accept any arguments, and return the full link with prefix. | 3545 | not accept any arguments, and return the full link with prefix. |
| 3369 | 3546 | ||
| @@ -3375,7 +3552,7 @@ not accept any arguments, and return the full link with prefix. | |||
| 3375 | File links can contain additional information to make Emacs jump to a | 3552 | File links can contain additional information to make Emacs jump to a |
| 3376 | particular location in the file when following a link. This can be a | 3553 | particular location in the file when following a link. This can be a |
| 3377 | line number or a search option after a double@footnote{For backward | 3554 | line number or a search option after a double@footnote{For backward |
| 3378 | compatibility, line numbers can also follow a single colon.} colon. For | 3555 | compatibility, line numbers can also follow a single colon.} colon. For |
| 3379 | example, when the command @kbd{C-c l} creates a link (@pxref{Handling | 3556 | example, when the command @kbd{C-c l} creates a link (@pxref{Handling |
| 3380 | links}) to a file, it encodes the words in the current line as a search | 3557 | links}) to a file, it encodes the words in the current line as a search |
| 3381 | string that can be used to find this line back later when following the | 3558 | string that can be used to find this line back later when following the |
| @@ -3408,7 +3585,7 @@ Link to a heading with a @code{CUSTOM_ID} property | |||
| 3408 | @item /regexp/ | 3585 | @item /regexp/ |
| 3409 | 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 |
| 3410 | 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 |
| 3411 | 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 |
| 3412 | sparse tree with the matches. | 3589 | sparse tree with the matches. |
| 3413 | @c If the target file is a directory, | 3590 | @c If the target file is a directory, |
| 3414 | @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. |
| @@ -3447,7 +3624,7 @@ an implementation example. See the file @file{org-bibtex.el}. | |||
| 3447 | @chapter TODO items | 3624 | @chapter TODO items |
| 3448 | @cindex TODO items | 3625 | @cindex TODO items |
| 3449 | 3626 | ||
| 3450 | 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 |
| 3451 | 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, |
| 3452 | 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 |
| 3453 | 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 |
| @@ -3456,7 +3633,7 @@ information is not duplicated, and the entire context from which the TODO | |||
| 3456 | item emerged is always present. | 3633 | item emerged is always present. |
| 3457 | 3634 | ||
| 3458 | Of course, this technique for managing TODO items scatters them | 3635 | Of course, this technique for managing TODO items scatters them |
| 3459 | throughout your notes file. Org-mode compensates for this by providing | 3636 | throughout your notes file. Org mode compensates for this by providing |
| 3460 | 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. |
| 3461 | 3638 | ||
| 3462 | @menu | 3639 | @menu |
| @@ -3517,7 +3694,7 @@ entire buffer, but shows all TODO items (with not-DONE state) and the | |||
| 3517 | headings hierarchy above them. With a prefix argument (or by using @kbd{C-c | 3694 | headings hierarchy above them. With a prefix argument (or by using @kbd{C-c |
| 3518 | / T}), search for a specific TODO. You will be prompted for the keyword, and | 3695 | / T}), search for a specific TODO. You will be prompted for the keyword, and |
| 3519 | you can also give a list of keywords like @code{KWD1|KWD2|...} to list | 3696 | you can also give a list of keywords like @code{KWD1|KWD2|...} to list |
| 3520 | entries that match any one of these keywords. With numeric prefix argument | 3697 | entries that match any one of these keywords. With a numeric prefix argument |
| 3521 | N, show the tree for the Nth keyword in the variable | 3698 | N, show the tree for the Nth keyword in the variable |
| 3522 | @code{org-todo-keywords}. With two prefix arguments, find all TODO states, | 3699 | @code{org-todo-keywords}. With two prefix arguments, find all TODO states, |
| 3523 | both un-done and done. | 3700 | both un-done and done. |
| @@ -3542,7 +3719,7 @@ option @code{org-todo-state-tags-triggers} for details. | |||
| 3542 | 3719 | ||
| 3543 | @vindex org-todo-keywords | 3720 | @vindex org-todo-keywords |
| 3544 | 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 |
| 3545 | 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 |
| 3546 | with @emph{TODO keywords} (stored in @code{org-todo-keywords}). With | 3723 | with @emph{TODO keywords} (stored in @code{org-todo-keywords}). With |
| 3547 | special setup, the TODO keyword system can work differently in different | 3724 | special setup, the TODO keyword system can work differently in different |
| 3548 | files. | 3725 | files. |
| @@ -3567,7 +3744,7 @@ TODO items in particular (@pxref{Tags}). | |||
| 3567 | 3744 | ||
| 3568 | You can use TODO keywords to indicate different @emph{sequential} states | 3745 | You can use TODO keywords to indicate different @emph{sequential} states |
| 3569 | 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 |
| 3570 | this variable only becomes effective after restarting Org-mode in a | 3747 | this variable only becomes effective after restarting Org mode in a |
| 3571 | buffer.}: | 3748 | buffer.}: |
| 3572 | 3749 | ||
| 3573 | @lisp | 3750 | @lisp |
| @@ -3610,7 +3787,7 @@ be set up like this: | |||
| 3610 | 3787 | ||
| 3611 | 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 |
| 3612 | 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 |
| 3613 | 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 |
| 3614 | 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 |
| 3615 | @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 |
| 3616 | 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 |
| @@ -3641,7 +3818,7 @@ like this: | |||
| 3641 | (sequence "|" "CANCELED"))) | 3818 | (sequence "|" "CANCELED"))) |
| 3642 | @end lisp | 3819 | @end lisp |
| 3643 | 3820 | ||
| 3644 | 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 |
| 3645 | 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, |
| 3646 | @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 |
| 3647 | @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 |
| @@ -3688,8 +3865,8 @@ key after each keyword, in parentheses. For example: | |||
| 3688 | @end lisp | 3865 | @end lisp |
| 3689 | 3866 | ||
| 3690 | @vindex org-fast-tag-selection-include-todo | 3867 | @vindex org-fast-tag-selection-include-todo |
| 3691 | If you then press @code{C-c C-t} followed by the selection key, the entry | 3868 | If you then press @kbd{C-c C-t} followed by the selection key, the entry |
| 3692 | will be switched to this state. @key{SPC} can be used to remove any TODO | 3869 | will be switched to this state. @kbd{SPC} can be used to remove any TODO |
| 3693 | keyword from an entry.@footnote{Check also the variable | 3870 | keyword from an entry.@footnote{Check also the variable |
| 3694 | @code{org-fast-tag-selection-include-todo}, it allows you to change the TODO | 3871 | @code{org-fast-tag-selection-include-todo}, it allows you to change the TODO |
| 3695 | state through the tags interface (@pxref{Setting tags}), in case you like to | 3872 | state through the tags interface (@pxref{Setting tags}), in case you like to |
| @@ -3738,9 +3915,9 @@ Remember that the keywords after the vertical bar (or the last keyword | |||
| 3738 | 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 |
| 3739 | 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 |
| 3740 | @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 |
| 3741 | 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 |
| 3742 | 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 |
| 3743 | 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 |
| 3744 | for the current buffer.}. | 3921 | for the current buffer.}. |
| 3745 | 3922 | ||
| 3746 | @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 |
| @@ -3750,7 +3927,7 @@ for the current buffer.}. | |||
| 3750 | @vindex org-todo @r{(face)} | 3927 | @vindex org-todo @r{(face)} |
| 3751 | @vindex org-done @r{(face)} | 3928 | @vindex org-done @r{(face)} |
| 3752 | @vindex org-todo-keyword-faces | 3929 | @vindex org-todo-keyword-faces |
| 3753 | Org-mode highlights TODO keywords with special faces: @code{org-todo} | 3930 | Org mode highlights TODO keywords with special faces: @code{org-todo} |
| 3754 | 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 |
| 3755 | @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 |
| 3756 | 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 |
| @@ -3766,7 +3943,7 @@ special faces for some of them. This can be done using the variable | |||
| 3766 | @end lisp | 3943 | @end lisp |
| 3767 | 3944 | ||
| 3768 | 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} |
| 3769 | work, this does not aways seem to be the case. If necessary, define a | 3946 | work, this does not always seem to be the case. If necessary, define a |
| 3770 | 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 |
| 3771 | @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 |
| 3772 | foreground or a background color. | 3949 | foreground or a background color. |
| @@ -3796,7 +3973,7 @@ example: | |||
| 3796 | 3973 | ||
| 3797 | * Parent | 3974 | * Parent |
| 3798 | :PROPERTIES: | 3975 | :PROPERTIES: |
| 3799 | :ORDERED: t | 3976 | :ORDERED: t |
| 3800 | :END: | 3977 | :END: |
| 3801 | ** TODO a | 3978 | ** TODO a |
| 3802 | ** TODO b, needs to wait for (a) | 3979 | ** TODO b, needs to wait for (a) |
| @@ -3838,7 +4015,7 @@ module @file{org-depend.el}. | |||
| 3838 | @cindex progress logging | 4015 | @cindex progress logging |
| 3839 | @cindex logging, of progress | 4016 | @cindex logging, of progress |
| 3840 | 4017 | ||
| 3841 | 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 |
| 3842 | 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 |
| 3843 | 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 |
| 3844 | 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 |
| @@ -3902,21 +4079,25 @@ behavior---the recommended drawer for this is called @code{LOGBOOK}. You can | |||
| 3902 | 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 |
| 3903 | @code{LOG_INTO_DRAWER} property. | 4080 | @code{LOG_INTO_DRAWER} property. |
| 3904 | 4081 | ||
| 3905 | 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 |
| 3906 | 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 |
| 3907 | 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 |
| 3908 | in parentheses after each keyword. For example, with the setting | 4085 | with timestamp) in parentheses after each keyword. For example, with the |
| 4086 | setting | ||
| 3909 | 4087 | ||
| 3910 | @lisp | 4088 | @lisp |
| 3911 | (setq org-todo-keywords | 4089 | (setq org-todo-keywords |
| 3912 | '((sequence "TODO(t)" "WAIT(w@@/!)" "|" "DONE(d!)" "CANCELED(c@@)"))) | 4090 | '((sequence "TODO(t)" "WAIT(w@@/!)" "|" "DONE(d!)" "CANCELED(c@@)"))) |
| 3913 | @end lisp | 4091 | @end lisp |
| 3914 | 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 | |||
| 3915 | @noindent | 4096 | @noindent |
| 3916 | @vindex org-log-done | 4097 | @vindex org-log-done |
| 3917 | 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 |
| 3918 | 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 |
| 3919 | 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 |
| 3920 | 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. |
| 3921 | 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 |
| 3922 | both, the state change recording note will take precedence and cancel | 4103 | both, the state change recording note will take precedence and cancel |
| @@ -3972,7 +4153,7 @@ called ``habits''. A habit has the following properties: | |||
| 3972 | You have enabled the @code{habits} module by customizing the variable | 4153 | You have enabled the @code{habits} module by customizing the variable |
| 3973 | @code{org-modules}. | 4154 | @code{org-modules}. |
| 3974 | @item | 4155 | @item |
| 3975 | The habit is a TODO, with a TODO keyword representing an open state. | 4156 | The habit is a TODO item, with a TODO keyword representing an open state. |
| 3976 | @item | 4157 | @item |
| 3977 | The property @code{STYLE} is set to the value @code{habit}. | 4158 | The property @code{STYLE} is set to the value @code{habit}. |
| 3978 | @item | 4159 | @item |
| @@ -3986,8 +4167,8 @@ syntax @samp{.+2d/3d}, which says that you want to do the task at least every | |||
| 3986 | three days, but at most every two days. | 4167 | three days, but at most every two days. |
| 3987 | @item | 4168 | @item |
| 3988 | You must also have state logging for the @code{DONE} state enabled, in order | 4169 | You must also have state logging for the @code{DONE} state enabled, in order |
| 3989 | for historical data to be represented in the consistency graph. If it's not | 4170 | for historical data to be represented in the consistency graph. If it is not |
| 3990 | enabled it's not an error, but the consistency graphs will be largely | 4171 | enabled it is not an error, but the consistency graphs will be largely |
| 3991 | meaningless. | 4172 | meaningless. |
| 3992 | @end enumerate | 4173 | @end enumerate |
| 3993 | 4174 | ||
| @@ -4045,7 +4226,7 @@ habits are displayed in the agenda. | |||
| 4045 | @table @code | 4226 | @table @code |
| 4046 | @item org-habit-graph-column | 4227 | @item org-habit-graph-column |
| 4047 | The buffer column at which the consistency graph should be drawn. This will | 4228 | The buffer column at which the consistency graph should be drawn. This will |
| 4048 | overwrite any text in that column, so it's a good idea to keep your habits' | 4229 | overwrite any text in that column, so it is a good idea to keep your habits' |
| 4049 | titles brief and to the point. | 4230 | titles brief and to the point. |
| 4050 | @item org-habit-preceding-days | 4231 | @item org-habit-preceding-days |
| 4051 | The amount of history, in days before today, to appear in consistency graphs. | 4232 | The amount of history, in days before today, to appear in consistency graphs. |
| @@ -4065,7 +4246,7 @@ which should only be done in certain contexts, for example. | |||
| 4065 | @section Priorities | 4246 | @section Priorities |
| 4066 | @cindex priorities | 4247 | @cindex priorities |
| 4067 | 4248 | ||
| 4068 | 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 |
| 4069 | 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 |
| 4070 | 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 |
| 4071 | 4252 | ||
| @@ -4075,11 +4256,11 @@ placing a @emph{priority cookie} into the headline of a TODO item, like this | |||
| 4075 | 4256 | ||
| 4076 | @noindent | 4257 | @noindent |
| 4077 | @vindex org-priority-faces | 4258 | @vindex org-priority-faces |
| 4078 | 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 |
| 4079 | @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 |
| 4080 | 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 |
| 4081 | 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 |
| 4082 | 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 |
| 4083 | special faces by customizing the variable @code{org-priority-faces}. | 4264 | special faces by customizing the variable @code{org-priority-faces}. |
| 4084 | 4265 | ||
| 4085 | 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 |
| @@ -4186,7 +4367,7 @@ large number of subtasks (@pxref{Checkboxes}). | |||
| 4186 | 4367 | ||
| 4187 | @vindex org-list-automatic-rules | 4368 | @vindex org-list-automatic-rules |
| 4188 | Every item in a plain list@footnote{With the exception of description | 4369 | Every item in a plain list@footnote{With the exception of description |
| 4189 | lists. But you can allow it by modifying @code{org-list-automatic-rules} | 4370 | lists. But you can allow it by modifying @code{org-list-automatic-rules} |
| 4190 | accordingly.} (@pxref{Plain lists}) can be made into a checkbox by starting | 4371 | accordingly.} (@pxref{Plain lists}) can be made into a checkbox by starting |
| 4191 | it with the string @samp{[ ]}. This feature is similar to TODO items | 4372 | it with the string @samp{[ ]}. This feature is similar to TODO items |
| 4192 | (@pxref{TODO Items}), but is more lightweight. Checkboxes are not included | 4373 | (@pxref{TODO Items}), but is more lightweight. Checkboxes are not included |
| @@ -4225,7 +4406,7 @@ be placed into a headline or into (the first line of) a plain list item. | |||
| 4225 | Each cookie covers checkboxes of direct children structurally below the | 4406 | Each cookie covers checkboxes of direct children structurally below the |
| 4226 | headline/item on which the cookie appears@footnote{Set the variable | 4407 | headline/item on which the cookie appears@footnote{Set the variable |
| 4227 | @code{org-hierarchical-checkbox-statistics} if you want such cookies to | 4408 | @code{org-hierarchical-checkbox-statistics} if you want such cookies to |
| 4228 | represent the all checkboxes below the cookie, not just the direct | 4409 | count all checkboxes below the cookie, not just those belonging to direct |
| 4229 | children.}. You have to insert the cookie yourself by typing either | 4410 | children.}. You have to insert the cookie yourself by typing either |
| 4230 | @samp{[/]} or @samp{[%]}. With @samp{[/]} you get an @samp{n out of m} | 4411 | @samp{[/]} or @samp{[%]}. With @samp{[/]} you get an @samp{n out of m} |
| 4231 | result, as in the examples above. With @samp{[%]} you get information about | 4412 | result, as in the examples above. With @samp{[%]} you get information about |
| @@ -4246,9 +4427,11 @@ off a box while there are unchecked boxes above it. | |||
| 4246 | 4427 | ||
| 4247 | @table @kbd | 4428 | @table @kbd |
| 4248 | @orgcmd{C-c C-c,org-toggle-checkbox} | 4429 | @orgcmd{C-c C-c,org-toggle-checkbox} |
| 4249 | Toggle checkbox status or (with prefix arg) checkbox presence at point. With | 4430 | Toggle checkbox status or (with prefix arg) checkbox presence at point. |
| 4250 | 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 |
| 4251 | 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. | ||
| 4252 | @orgcmd{C-c C-x C-b,org-toggle-checkbox} | 4435 | @orgcmd{C-c C-x C-b,org-toggle-checkbox} |
| 4253 | 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 |
| 4254 | 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 |
| @@ -4265,9 +4448,8 @@ this headline and the next (so @emph{not} the entire subtree). | |||
| 4265 | If there is no active region, just toggle the checkbox at point. | 4448 | If there is no active region, just toggle the checkbox at point. |
| 4266 | @end itemize | 4449 | @end itemize |
| 4267 | @orgcmd{M-S-@key{RET},org-insert-todo-heading} | 4450 | @orgcmd{M-S-@key{RET},org-insert-todo-heading} |
| 4268 | Insert a new item with a checkbox. | 4451 | Insert a new item with a checkbox. This works only if the cursor is already |
| 4269 | This works only if the cursor is already in a plain list item | 4452 | in a plain list item (@pxref{Plain lists}). |
| 4270 | (@pxref{Plain lists}). | ||
| 4271 | @orgcmd{C-c C-x o,org-toggle-ordered-property} | 4453 | @orgcmd{C-c C-x o,org-toggle-ordered-property} |
| 4272 | @vindex org-track-ordered-property-with-tag | 4454 | @vindex org-track-ordered-property-with-tag |
| 4273 | @cindex property, ORDERED | 4455 | @cindex property, ORDERED |
| @@ -4283,8 +4465,7 @@ a @kbd{C-u} prefix, update the entire file. Checkbox statistic cookies are | |||
| 4283 | updated automatically if you toggle checkboxes with @kbd{C-c C-c} and make | 4465 | updated automatically if you toggle checkboxes with @kbd{C-c C-c} and make |
| 4284 | new ones with @kbd{M-S-@key{RET}}. TODO statistics cookies update when | 4466 | new ones with @kbd{M-S-@key{RET}}. TODO statistics cookies update when |
| 4285 | changing TODO states. If you delete boxes/entries or add/change them by | 4467 | changing TODO states. If you delete boxes/entries or add/change them by |
| 4286 | hand, use this command to get things back into sync. Or simply toggle any | 4468 | hand, use this command to get things back into sync. |
| 4287 | entry twice (checkboxes with @kbd{C-c C-c}). | ||
| 4288 | @end table | 4469 | @end table |
| 4289 | 4470 | ||
| 4290 | @node Tags, Properties and Columns, TODO Items, Top | 4471 | @node Tags, Properties and Columns, TODO Items, Top |
| @@ -4295,7 +4476,7 @@ entry twice (checkboxes with @kbd{C-c C-c}). | |||
| 4295 | @cindex sparse tree, tag based | 4476 | @cindex sparse tree, tag based |
| 4296 | 4477 | ||
| 4297 | An excellent way to implement labels and contexts for cross-correlating | 4478 | An excellent way to implement labels and contexts for cross-correlating |
| 4298 | 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 |
| 4299 | support for tags. | 4480 | support for tags. |
| 4300 | 4481 | ||
| 4301 | @vindex org-tag-faces | 4482 | @vindex org-tag-faces |
| @@ -4374,7 +4555,7 @@ also a special command for inserting tags: | |||
| 4374 | @orgcmd{C-c C-q,org-set-tags-command} | 4555 | @orgcmd{C-c C-q,org-set-tags-command} |
| 4375 | @cindex completion, of tags | 4556 | @cindex completion, of tags |
| 4376 | @vindex org-tags-column | 4557 | @vindex org-tags-column |
| 4377 | 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 |
| 4378 | completion or a special single-key interface for setting tags, see | 4559 | completion or a special single-key interface for setting tags, see |
| 4379 | 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 |
| 4380 | 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 |
| @@ -4386,7 +4567,7 @@ When the cursor is in a headline, this does the same as @kbd{C-c C-q}. | |||
| 4386 | @end table | 4567 | @end table |
| 4387 | 4568 | ||
| 4388 | @vindex org-tag-alist | 4569 | @vindex org-tag-alist |
| 4389 | Org will support tag insertion based on a @emph{list of tags}. By | 4570 | Org supports tag insertion based on a @emph{list of tags}. By |
| 4390 | default this list is constructed dynamically, containing all tags | 4571 | default this list is constructed dynamically, containing all tags |
| 4391 | currently used in the buffer. You may also globally specify a hard list | 4572 | currently used in the buffer. You may also globally specify a hard list |
| 4392 | of tags with the variable @code{org-tag-alist}. Finally you can set | 4573 | of tags with the variable @code{org-tag-alist}. Finally you can set |
| @@ -4417,7 +4598,7 @@ by adding a STARTUP option line to that file: | |||
| 4417 | #+STARTUP: noptag | 4598 | #+STARTUP: noptag |
| 4418 | @end example | 4599 | @end example |
| 4419 | 4600 | ||
| 4420 | By default Org-mode uses the standard minibuffer completion facilities for | 4601 | By default Org mode uses the standard minibuffer completion facilities for |
| 4421 | entering tags. However, it also implements another, quicker, tag selection | 4602 | entering tags. However, it also implements another, quicker, tag selection |
| 4422 | 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 |
| 4423 | 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 |
| @@ -4498,6 +4679,8 @@ exclusive tags will turn off any other tags from that group. | |||
| 4498 | @item @key{TAB} | 4679 | @item @key{TAB} |
| 4499 | Enter a tag in the minibuffer, even if the tag is not in the predefined | 4680 | Enter a tag in the minibuffer, even if the tag is not in the predefined |
| 4500 | list. You will be able to complete on all tags present in the buffer. | 4681 | list. You will be able to complete on all tags present in the buffer. |
| 4682 | You can also add several tags: just separate them with a comma. | ||
| 4683 | |||
| 4501 | @kindex @key{SPC} | 4684 | @kindex @key{SPC} |
| 4502 | @item @key{SPC} | 4685 | @item @key{SPC} |
| 4503 | Clear all tags for this line. | 4686 | Clear all tags for this line. |
| @@ -4548,7 +4731,7 @@ Once a system of tags has been set up, it can be used to collect related | |||
| 4548 | information into special lists. | 4731 | information into special lists. |
| 4549 | 4732 | ||
| 4550 | @table @kbd | 4733 | @table @kbd |
| 4551 | @orgcmdkkc{C-c / m,C-c \,org-match-sparse-tree} | 4734 | @orgcmdkkc{C-c / m,C-c \\,org-match-sparse-tree} |
| 4552 | Create a sparse tree with all headlines matching a tags search. With a | 4735 | Create a sparse tree with all headlines matching a tags search. With a |
| 4553 | @kbd{C-u} prefix argument, ignore headlines that are not a TODO line. | 4736 | @kbd{C-u} prefix argument, ignore headlines that are not a TODO line. |
| 4554 | @orgcmd{C-c a m,org-tags-view} | 4737 | @orgcmd{C-c a m,org-tags-view} |
| @@ -4574,25 +4757,26 @@ and properties. For a complete description with many examples, see | |||
| 4574 | @chapter Properties and columns | 4757 | @chapter Properties and columns |
| 4575 | @cindex properties | 4758 | @cindex properties |
| 4576 | 4759 | ||
| 4577 | 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 |
| 4578 | 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, |
| 4579 | are like tags, but with a value. Second, you can use properties to | 4762 | or with every entry in an Org mode file. |
| 4580 | implement (very basic) database capabilities in an Org buffer. For | 4763 | |
| 4581 | 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 | ||
| 4582 | 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 |
| 4583 | 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 |
| 4584 | property, say @code{:Release:}, that in different subtrees has different | 4768 | property, say @code{:Release:}, that in different subtrees has different |
| 4585 | 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 |
| 4586 | application of properties, imagine keeping track of your music CDs, | 4770 | implement (very basic) database capabilities in an Org buffer. Imagine |
| 4587 | 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 |
| 4588 | release, number of tracks, and so on. | 4772 | album, artist, date of release, number of tracks, and so on. |
| 4589 | 4773 | ||
| 4590 | Properties can be conveniently edited and viewed in column view | 4774 | Properties can be conveniently edited and viewed in column view |
| 4591 | (@pxref{Column view}). | 4775 | (@pxref{Column view}). |
| 4592 | 4776 | ||
| 4593 | @menu | 4777 | @menu |
| 4594 | * Property syntax:: How properties are spelled out | 4778 | * Property syntax:: How properties are spelled out |
| 4595 | * Special properties:: Access to other Org-mode features | 4779 | * Special properties:: Access to other Org mode features |
| 4596 | * Property searches:: Matching property values | 4780 | * Property searches:: Matching property values |
| 4597 | * Property inheritance:: Passing values down the tree | 4781 | * Property inheritance:: Passing values down the tree |
| 4598 | * Column view:: Tabular viewing and editing | 4782 | * Column view:: Tabular viewing and editing |
| @@ -4604,7 +4788,8 @@ Properties can be conveniently edited and viewed in column view | |||
| 4604 | @cindex property syntax | 4788 | @cindex property syntax |
| 4605 | @cindex drawer, for properties | 4789 | @cindex drawer, for properties |
| 4606 | 4790 | ||
| 4607 | 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 | ||
| 4608 | drawer (@pxref{Drawers}) with the name @code{PROPERTIES}. Each property | 4793 | drawer (@pxref{Drawers}) with the name @code{PROPERTIES}. Each property |
| 4609 | 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) |
| 4610 | first, and the value after it. Here is an example: | 4795 | first, and the value after it. Here is an example: |
| @@ -4622,6 +4807,10 @@ first, and the value after it. Here is an example: | |||
| 4622 | :END: | 4807 | :END: |
| 4623 | @end example | 4808 | @end example |
| 4624 | 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 | |||
| 4625 | 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:} |
| 4626 | by setting a property @samp{:Xyz_ALL:}. This special property is | 4815 | by setting a property @samp{:Xyz_ALL:}. This special property is |
| 4627 | @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 |
| @@ -4646,6 +4835,37 @@ file, use a line like | |||
| 4646 | #+PROPERTY: NDisks_ALL 1 2 3 4 | 4835 | #+PROPERTY: NDisks_ALL 1 2 3 4 |
| 4647 | @end example | 4836 | @end example |
| 4648 | 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 | |||
| 4649 | @vindex org-global-properties | 4869 | @vindex org-global-properties |
| 4650 | Property values set with the global variable | 4870 | Property values set with the global variable |
| 4651 | @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 |
| @@ -4655,7 +4875,7 @@ Org files. | |||
| 4655 | The following commands help to work with properties: | 4875 | The following commands help to work with properties: |
| 4656 | 4876 | ||
| 4657 | @table @kbd | 4877 | @table @kbd |
| 4658 | @orgcmd{M-@key{TAB},org-complete} | 4878 | @orgcmd{M-@key{TAB},pcomplete} |
| 4659 | After an initial colon in a line, complete property keys. All keys used | 4879 | After an initial colon in a line, complete property keys. All keys used |
| 4660 | in the current file will be offered as possible completions. | 4880 | in the current file will be offered as possible completions. |
| 4661 | @orgcmd{C-c C-x p,org-set-property} | 4881 | @orgcmd{C-c C-x p,org-set-property} |
| @@ -4686,11 +4906,11 @@ nearest column format definition. | |||
| 4686 | @section Special properties | 4906 | @section Special properties |
| 4687 | @cindex properties, special | 4907 | @cindex properties, special |
| 4688 | 4908 | ||
| 4689 | Special properties provide an alternative access method to Org-mode | 4909 | Special properties provide an alternative access method to Org mode features, |
| 4690 | features, like the TODO state or the priority of an entry, discussed in the | 4910 | like the TODO state or the priority of an entry, discussed in the previous |
| 4691 | previous chapters. This interface exists so that you can include | 4911 | chapters. This interface exists so that you can include these states in a |
| 4692 | these states in a column view (@pxref{Column view}), or to use them in | 4912 | column view (@pxref{Column view}), or to use them in queries. The following |
| 4693 | queries. The following property names are special and should not be | 4913 | property names are special and (except for @code{:CATEGORY:}) should not be |
| 4694 | used as keys in the properties drawer: | 4914 | used as keys in the properties drawer: |
| 4695 | 4915 | ||
| 4696 | @cindex property, special, TODO | 4916 | @cindex property, special, TODO |
| @@ -4707,6 +4927,7 @@ used as keys in the properties drawer: | |||
| 4707 | @cindex property, special, BLOCKED | 4927 | @cindex property, special, BLOCKED |
| 4708 | @c guessing that ITEM is needed in this area; also, should this list be sorted? | 4928 | @c guessing that ITEM is needed in this area; also, should this list be sorted? |
| 4709 | @cindex property, special, ITEM | 4929 | @cindex property, special, ITEM |
| 4930 | @cindex property, special, FILE | ||
| 4710 | @example | 4931 | @example |
| 4711 | TODO @r{The TODO keyword of the entry.} | 4932 | TODO @r{The TODO keyword of the entry.} |
| 4712 | TAGS @r{The tags defined directly in the headline.} | 4933 | TAGS @r{The tags defined directly in the headline.} |
| @@ -4719,9 +4940,10 @@ CLOSED @r{When was this entry closed?} | |||
| 4719 | TIMESTAMP @r{The first keyword-less timestamp in the entry.} | 4940 | TIMESTAMP @r{The first keyword-less timestamp in the entry.} |
| 4720 | TIMESTAMP_IA @r{The first inactive timestamp in the entry.} | 4941 | TIMESTAMP_IA @r{The first inactive timestamp in the entry.} |
| 4721 | CLOCKSUM @r{The sum of CLOCK intervals in the subtree. @code{org-clock-sum}} | 4942 | CLOCKSUM @r{The sum of CLOCK intervals in the subtree. @code{org-clock-sum}} |
| 4722 | @r{must be run first to compute the values.} | 4943 | @r{must be run first to compute the values in the current buffer.} |
| 4723 | BLOCKED @r{"t" if task is currently blocked by children or siblings} | 4944 | BLOCKED @r{"t" if task is currently blocked by children or siblings} |
| 4724 | ITEM @r{The content of the entry.} | 4945 | ITEM @r{The content of the entry.} |
| 4946 | FILE @r{The filename the entry is located in.} | ||
| 4725 | @end example | 4947 | @end example |
| 4726 | 4948 | ||
| 4727 | @node Property searches, Property inheritance, Special properties, Properties and Columns | 4949 | @node Property searches, Property inheritance, Special properties, Properties and Columns |
| @@ -4766,9 +4988,9 @@ a regular expression and matched against the property values. | |||
| 4766 | @cindex inheritance, of properties | 4988 | @cindex inheritance, of properties |
| 4767 | 4989 | ||
| 4768 | @vindex org-use-property-inheritance | 4990 | @vindex org-use-property-inheritance |
| 4769 | The outline structure of Org-mode documents lends itself to an | 4991 | The outline structure of Org mode documents lends itself to an |
| 4770 | 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 |
| 4771 | property, the children can inherit this property. Org-mode does not | 4993 | property, the children can inherit this property. Org mode does not |
| 4772 | 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 |
| 4773 | significantly and is often not needed. However, if you find inheritance | 4995 | significantly and is often not needed. However, if you find inheritance |
| 4774 | useful, you can turn it on by setting the variable | 4996 | useful, you can turn it on by setting the variable |
| @@ -4779,7 +5001,7 @@ inherited properties. If a property has the value @samp{nil}, this is | |||
| 4779 | interpreted as an explicit undefine of the property, so that inheritance | 5001 | interpreted as an explicit undefine of the property, so that inheritance |
| 4780 | search will stop at this value and return @code{nil}. | 5002 | search will stop at this value and return @code{nil}. |
| 4781 | 5003 | ||
| 4782 | 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 |
| 4783 | least for the special applications for which they are used: | 5005 | least for the special applications for which they are used: |
| 4784 | 5006 | ||
| 4785 | @cindex property, COLUMNS | 5007 | @cindex property, COLUMNS |
| @@ -4810,7 +5032,7 @@ subtree (@pxref{Tracking TODO state changes}). | |||
| 4810 | 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 |
| 4811 | @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 |
| 4812 | 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 |
| 4813 | entries. Org-mode implements columns by overlaying a tabular structure | 5035 | entries. Org mode implements columns by overlaying a tabular structure |
| 4814 | 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 |
| 4815 | 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 |
| 4816 | 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 |
| @@ -4886,7 +5108,7 @@ optional. The individual parts have the following meaning: | |||
| 4886 | @var{property} @r{The property that should be edited in this column.} | 5108 | @var{property} @r{The property that should be edited in this column.} |
| 4887 | @r{Special properties representing meta data are allowed here} | 5109 | @r{Special properties representing meta data are allowed here} |
| 4888 | @r{as well (@pxref{Special properties})} | 5110 | @r{as well (@pxref{Special properties})} |
| 4889 | @var{title} @r{The header text for the column. If omitted, the property} | 5111 | @var{title} @r{The header text for the column. If omitted, the property} |
| 4890 | @r{name is used.} | 5112 | @r{name is used.} |
| 4891 | @{@var{summary-type}@} @r{The summary type. If specified, the column values for} | 5113 | @{@var{summary-type}@} @r{The summary type. If specified, the column values for} |
| 4892 | @r{parent nodes are computed from the children.} | 5114 | @r{parent nodes are computed from the children.} |
| @@ -4912,7 +5134,7 @@ optional. The individual parts have the following meaning: | |||
| 4912 | 5134 | ||
| 4913 | @noindent | 5135 | @noindent |
| 4914 | Be aware that you can only have one summary type for any property you | 5136 | Be aware that you can only have one summary type for any property you |
| 4915 | include. Subsequent columns referencing the same property will all display the | 5137 | include. Subsequent columns referencing the same property will all display the |
| 4916 | same summary information. | 5138 | same summary information. |
| 4917 | 5139 | ||
| 4918 | The @code{est+} summary type requires further explanation. It is used for | 5140 | The @code{est+} summary type requires further explanation. It is used for |
| @@ -4923,12 +5145,12 @@ of estimating a particular task will take 5 days, you might estimate it as | |||
| 4923 | average at 5.5 days, but the first represents a more predictable delivery. | 5145 | average at 5.5 days, but the first represents a more predictable delivery. |
| 4924 | 5146 | ||
| 4925 | When combining a set of such estimates, simply adding the lows and highs | 5147 | When combining a set of such estimates, simply adding the lows and highs |
| 4926 | produces an unrealistically wide result. Instead, @code{est+} adds the | 5148 | produces an unrealistically wide result. Instead, @code{est+} adds the |
| 4927 | statistical mean and variance of the sub-tasks, generating a final estimate | 5149 | statistical mean and variance of the sub-tasks, generating a final estimate |
| 4928 | from the sum. For example, suppose you had ten tasks, each of which was | 5150 | from the sum. For example, suppose you had ten tasks, each of which was |
| 4929 | estimated at 0.5 to 2 days of work. Straight addition produces an estimate | 5151 | estimated at 0.5 to 2 days of work. Straight addition produces an estimate |
| 4930 | of 5 to 20 days, representing what to expect if everything goes either | 5152 | of 5 to 20 days, representing what to expect if everything goes either |
| 4931 | extremely well or extremely poorly. In contrast, @code{est+} estimates the | 5153 | extremely well or extremely poorly. In contrast, @code{est+} estimates the |
| 4932 | full job more realistically, at 10-15 days. | 5154 | full job more realistically, at 10-15 days. |
| 4933 | 5155 | ||
| 4934 | Here is an example for a complete columns definition, along with allowed | 5156 | Here is an example for a complete columns definition, along with allowed |
| @@ -4944,7 +5166,7 @@ values. | |||
| 4944 | 5166 | ||
| 4945 | @noindent | 5167 | @noindent |
| 4946 | The first column, @samp{%25ITEM}, means the first 25 characters of the | 5168 | The first column, @samp{%25ITEM}, means the first 25 characters of the |
| 4947 | item itself, i.e. of the headline. You probably always should start the | 5169 | item itself, i.e.@: of the headline. You probably always should start the |
| 4948 | column definition with the @samp{ITEM} specifier. The other specifiers | 5170 | column definition with the @samp{ITEM} specifier. The other specifiers |
| 4949 | create columns @samp{Owner} with a list of names as allowed values, for | 5171 | create columns @samp{Owner} with a list of names as allowed values, for |
| 4950 | @samp{Status} with four different possible values, and for a checkbox | 5172 | @samp{Status} with four different possible values, and for a checkbox |
| @@ -5112,9 +5334,9 @@ property API}. | |||
| 5112 | 5334 | ||
| 5113 | 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 |
| 5114 | a time. The specially formatted string carrying the date and time | 5336 | a time. The specially formatted string carrying the date and time |
| 5115 | 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 |
| 5116 | little confusing because timestamp is often used as indicating when | 5338 | little confusing because timestamp is often used as indicating when |
| 5117 | 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 |
| 5118 | is used in a much wider sense. | 5340 | is used in a much wider sense. |
| 5119 | 5341 | ||
| 5120 | @menu | 5342 | @menu |
| @@ -5137,17 +5359,20 @@ is used in a much wider sense. | |||
| 5137 | @cindex scheduling | 5359 | @cindex scheduling |
| 5138 | 5360 | ||
| 5139 | 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 |
| 5140 | 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 |
| 5141 | @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. |
| 5142 | 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 |
| 5143 | 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 |
| 5144 | 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 |
| 5145 | 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 |
| 5146 | (@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: | ||
| 5147 | 5371 | ||
| 5148 | @table @var | 5372 | @table @var |
| 5149 | @item Plain timestamp; Event; Appointment | 5373 | @item Plain timestamp; Event; Appointment |
| 5150 | @cindex timestamp | 5374 | @cindex timestamp |
| 5375 | @cindex appointment | ||
| 5151 | 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 |
| 5152 | 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 |
| 5153 | 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 |
| @@ -5170,13 +5395,23 @@ following will show up in the agenda every Wednesday: | |||
| 5170 | @end example | 5395 | @end example |
| 5171 | 5396 | ||
| 5172 | @item Diary-style sexp entries | 5397 | @item Diary-style sexp entries |
| 5173 | For more complex date specifications, Org-mode supports using the | 5398 | For more complex date specifications, Org mode supports using the special |
| 5174 | special sexp diary entries implemented in the Emacs calendar/diary | 5399 | sexp diary entries implemented in the Emacs calendar/diary |
| 5175 | package. For example | 5400 | package@footnote{When working with the standard diary sexp functions, you |
| 5401 | need to be very careful with the order of the arguments. That order depend | ||
| 5402 | evilly on the variable @code{calendar-date-style} (or, for older Emacs | ||
| 5403 | versions, @code{european-calendar-style}). For example, to specify a date | ||
| 5404 | December 12, 2005, the call might look like @code{(diary-date 12 1 2005)} or | ||
| 5405 | @code{(diary-date 1 12 2005)} or @code{(diary-date 2005 12 1)}, depending on | ||
| 5406 | the settings. This has been the source of much confusion. Org mode users | ||
| 5407 | can resort to special versions of these functions like @code{org-date} or | ||
| 5408 | @code{org-anniversary}. These work just like the corresponding @code{diary-} | ||
| 5409 | functions, but with stable ISO order of arguments (year, month, day) wherever | ||
| 5410 | applicable, independent of the value of @code{calendar-date-style}.}. For example | ||
| 5176 | 5411 | ||
| 5177 | @example | 5412 | @example |
| 5178 | * The nerd meeting on every 2nd Thursday of the month | 5413 | * The nerd meeting on every 2nd Thursday of the month |
| 5179 | <%%(diary-float t 4 2)> | 5414 | <%%(org-float t 4 2)> |
| 5180 | @end example | 5415 | @end example |
| 5181 | 5416 | ||
| 5182 | @item Time/Date range | 5417 | @item Time/Date range |
| @@ -5209,7 +5444,7 @@ angular ones. These timestamps are inactive in the sense that they do | |||
| 5209 | @cindex creating timestamps | 5444 | @cindex creating timestamps |
| 5210 | @cindex timestamps, creating | 5445 | @cindex timestamps, creating |
| 5211 | 5446 | ||
| 5212 | 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 |
| 5213 | format. All commands listed below produce timestamps in the correct | 5448 | format. All commands listed below produce timestamps in the correct |
| 5214 | format. | 5449 | format. |
| 5215 | 5450 | ||
| @@ -5233,6 +5468,9 @@ Like @kbd{C-c .} and @kbd{C-c !}, but use the alternative format which | |||
| 5233 | 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 |
| 5234 | minutes, see the option @code{org-time-stamp-rounding-minutes}. | 5469 | minutes, see the option @code{org-time-stamp-rounding-minutes}. |
| 5235 | @c | 5470 | @c |
| 5471 | @orgkey{C-c C-c} | ||
| 5472 | Normalize timestamp, insert/fix day name if missing or wrong. | ||
| 5473 | @c | ||
| 5236 | @orgcmd{C-c <,org-date-from-calendar} | 5474 | @orgcmd{C-c <,org-date-from-calendar} |
| 5237 | Insert a timestamp corresponding to the cursor date in the Calendar. | 5475 | Insert a timestamp corresponding to the cursor date in the Calendar. |
| 5238 | @c | 5476 | @c |
| @@ -5256,7 +5494,7 @@ like @samp{15:30-16:30}, modifying the first time will also shift the second, | |||
| 5256 | shifting the time block with constant length. To change the length, modify | 5494 | shifting the time block with constant length. To change the length, modify |
| 5257 | the second time. Note that if the cursor is in a headline and not at a | 5495 | the second time. Note that if the cursor is in a headline and not at a |
| 5258 | timestamp, these same keys modify the priority of an item. | 5496 | timestamp, these same keys modify the priority of an item. |
| 5259 | (@pxref{Priorities}). The key bindings also conflict with shift-selection and | 5497 | (@pxref{Priorities}). The key bindings also conflict with shift-selection and |
| 5260 | related modes (@pxref{Conflicts}). | 5498 | related modes (@pxref{Conflicts}). |
| 5261 | @c | 5499 | @c |
| 5262 | @orgcmd{C-c C-y,org-evaluate-time-range} | 5500 | @orgcmd{C-c C-y,org-evaluate-time-range} |
| @@ -5268,7 +5506,7 @@ the following column). | |||
| 5268 | 5506 | ||
| 5269 | 5507 | ||
| 5270 | @menu | 5508 | @menu |
| 5271 | * 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 |
| 5272 | * Custom time format:: Making dates look different | 5510 | * Custom time format:: Making dates look different |
| 5273 | @end menu | 5511 | @end menu |
| 5274 | 5512 | ||
| @@ -5278,17 +5516,17 @@ the following column). | |||
| 5278 | @cindex time, reading in minibuffer | 5516 | @cindex time, reading in minibuffer |
| 5279 | 5517 | ||
| 5280 | @vindex org-read-date-prefer-future | 5518 | @vindex org-read-date-prefer-future |
| 5281 | 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 |
| 5282 | 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 |
| 5283 | 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 |
| 5284 | 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 |
| 5285 | 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 |
| 5286 | 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 |
| 5287 | 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 |
| 5288 | 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 |
| 5289 | 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 |
| 5290 | 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 |
| 5291 | 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 |
| 5292 | 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 |
| 5293 | @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 |
| 5294 | 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 |
| @@ -5297,24 +5535,24 @@ tomorrow.}. If the date has been automatically shifted into the future, the | |||
| 5297 | time prompt will show this with @samp{(=>F).} | 5535 | time prompt will show this with @samp{(=>F).} |
| 5298 | 5536 | ||
| 5299 | 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 |
| 5300 | 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 |
| 5301 | in @b{bold}. | 5539 | in @b{bold}. |
| 5302 | 5540 | ||
| 5303 | @example | 5541 | @example |
| 5304 | 3-2-5 --> 2003-02-05 | 5542 | 3-2-5 @result{} 2003-02-05 |
| 5305 | 2/5/3 --> 2003-02-05 | 5543 | 2/5/3 @result{} 2003-02-05 |
| 5306 | 14 --> @b{2006}-@b{06}-14 | 5544 | 14 @result{} @b{2006}-@b{06}-14 |
| 5307 | 12 --> @b{2006}-@b{07}-12 | 5545 | 12 @result{} @b{2006}-@b{07}-12 |
| 5308 | 2/5 --> @b{2007}-02-05 | 5546 | 2/5 @result{} @b{2007}-02-05 |
| 5309 | Fri --> nearest Friday (default date or later) | 5547 | Fri @result{} nearest Friday (default date or later) |
| 5310 | sep 15 --> @b{2006}-09-15 | 5548 | sep 15 @result{} @b{2006}-09-15 |
| 5311 | feb 15 --> @b{2007}-02-15 | 5549 | feb 15 @result{} @b{2007}-02-15 |
| 5312 | sep 12 9 --> 2009-09-12 | 5550 | sep 12 9 @result{} 2009-09-12 |
| 5313 | 12:45 --> @b{2006}-@b{06}-@b{13} 12:45 | 5551 | 12:45 @result{} @b{2006}-@b{06}-@b{13} 12:45 |
| 5314 | 22 sept 0:34 --> @b{2006}-09-22 0:34 | 5552 | 22 sept 0:34 @result{} @b{2006}-09-22 0:34 |
| 5315 | w4 --> ISO week for of the current year @b{2006} | 5553 | w4 @result{} ISO week for of the current year @b{2006} |
| 5316 | 2012 w4 fri --> Friday of ISO week 4 in 2012 | 5554 | 2012 w4 fri @result{} Friday of ISO week 4 in 2012 |
| 5317 | 2012-w04-5 --> Same as above | 5555 | 2012-w04-5 @result{} Same as above |
| 5318 | @end example | 5556 | @end example |
| 5319 | 5557 | ||
| 5320 | Furthermore you can specify a relative date by giving, as the | 5558 | Furthermore you can specify a relative date by giving, as the |
| @@ -5323,16 +5561,16 @@ letter ([dwmy]) to indicate change in days, weeks, months, or years. With a | |||
| 5323 | single plus or minus, the date is always relative to today. With a | 5561 | single plus or minus, the date is always relative to today. With a |
| 5324 | double plus or minus, it is relative to the default date. If instead of | 5562 | double plus or minus, it is relative to the default date. If instead of |
| 5325 | a single letter, you use the abbreviation of day name, the date will be | 5563 | a single letter, you use the abbreviation of day name, the date will be |
| 5326 | the Nth such day. E.g. | 5564 | the Nth such day, e.g.@: |
| 5327 | 5565 | ||
| 5328 | @example | 5566 | @example |
| 5329 | +0 --> today | 5567 | +0 @result{} today |
| 5330 | . --> today | 5568 | . @result{} today |
| 5331 | +4d --> four days from today | 5569 | +4d @result{} four days from today |
| 5332 | +4 --> same as above | 5570 | +4 @result{} same as above |
| 5333 | +2w --> two weeks from today | 5571 | +2w @result{} two weeks from today |
| 5334 | ++5 --> five days from default date | 5572 | ++5 @result{} five days from default date |
| 5335 | +2tue --> second Tuesday from now. | 5573 | +2tue @result{} second Tuesday from now. |
| 5336 | @end example | 5574 | @end example |
| 5337 | 5575 | ||
| 5338 | @vindex parse-time-months | 5576 | @vindex parse-time-months |
| @@ -5341,14 +5579,22 @@ The function understands English month and weekday abbreviations. If | |||
| 5341 | you want to use unabbreviated names and/or other languages, configure | 5579 | you want to use unabbreviated names and/or other languages, configure |
| 5342 | the variables @code{parse-time-months} and @code{parse-time-weekdays}. | 5580 | the variables @code{parse-time-months} and @code{parse-time-weekdays}. |
| 5343 | 5581 | ||
| 5582 | @vindex org-read-date-force-compatible-dates | ||
| 5583 | Not all dates can be represented in a given Emacs implementation. By default | ||
| 5584 | Org mode forces dates into the compatibility range 1970--2037 which works on | ||
| 5585 | all Emacs implementations. If you want to use dates outside of this range, | ||
| 5586 | read the docstring of the variable | ||
| 5587 | @code{org-read-date-force-compatible-dates}. | ||
| 5588 | |||
| 5344 | You can specify a time range by giving start and end times or by giving a | 5589 | You can specify a time range by giving start and end times or by giving a |
| 5345 | start time and a duration (in HH:MM format). Use `-' or `-@{@}-' as the separator | 5590 | start time and a duration (in HH:MM format). Use one or two dash(es) as the |
| 5346 | in the former case and use '+' as the separator in the latter case. E.g. | 5591 | separator in the former case and use '+' as the separator in the latter |
| 5592 | case, e.g.@: | ||
| 5347 | 5593 | ||
| 5348 | @example | 5594 | @example |
| 5349 | 11am-1:15pm --> 11:00-13:15 | 5595 | 11am-1:15pm @result{} 11:00-13:15 |
| 5350 | 11am--1:15pm --> same as above | 5596 | 11am--1:15pm @result{} same as above |
| 5351 | 11am+2:15 --> same as above | 5597 | 11am+2:15 @result{} same as above |
| 5352 | @end example | 5598 | @end example |
| 5353 | 5599 | ||
| 5354 | @cindex calendar, for selecting date | 5600 | @cindex calendar, for selecting date |
| @@ -5399,7 +5645,7 @@ minibuffer@footnote{If you find this distracting, turn the display of with | |||
| 5399 | 5645 | ||
| 5400 | @vindex org-display-custom-times | 5646 | @vindex org-display-custom-times |
| 5401 | @vindex org-time-stamp-custom-formats | 5647 | @vindex org-time-stamp-custom-formats |
| 5402 | 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 |
| 5403 | 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 |
| 5404 | 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 |
| 5405 | customizing the variables @code{org-display-custom-times} and | 5651 | customizing the variables @code{org-display-custom-times} and |
| @@ -5411,7 +5657,7 @@ Toggle the display of custom formats for dates and times. | |||
| 5411 | @end table | 5657 | @end table |
| 5412 | 5658 | ||
| 5413 | @noindent | 5659 | @noindent |
| 5414 | 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 |
| 5415 | 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 |
| 5416 | @emph{over} the default format using text properties. This has the | 5662 | @emph{over} the default format using text properties. This has the |
| 5417 | following consequences: | 5663 | following consequences: |
| @@ -5479,7 +5725,7 @@ The headline will be listed under the given date@footnote{It will still | |||
| 5479 | be listed on that date after it has been marked DONE. If you don't like | 5725 | be listed on that date after it has been marked DONE. If you don't like |
| 5480 | this, set the variable @code{org-agenda-skip-scheduled-if-done}.}. In | 5726 | this, set the variable @code{org-agenda-skip-scheduled-if-done}.}. In |
| 5481 | addition, a reminder that the scheduled date has passed will be present | 5727 | addition, a reminder that the scheduled date has passed will be present |
| 5482 | in the compilation for @emph{today}, until the entry is marked DONE, i.e. | 5728 | in the compilation for @emph{today}, until the entry is marked DONE, i.e.@: |
| 5483 | the task will automatically be forwarded until completed. | 5729 | the task will automatically be forwarded until completed. |
| 5484 | 5730 | ||
| 5485 | @example | 5731 | @example |
| @@ -5488,23 +5734,23 @@ the task will automatically be forwarded until completed. | |||
| 5488 | @end example | 5734 | @end example |
| 5489 | 5735 | ||
| 5490 | @noindent | 5736 | @noindent |
| 5491 | @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 |
| 5492 | 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}. |
| 5493 | 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 |
| 5494 | 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 |
| 5495 | 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 |
| 5496 | 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 |
| 5497 | want to start working on an action item. | 5743 | want to start working on an action item. |
| 5498 | @end table | 5744 | @end table |
| 5499 | 5745 | ||
| 5500 | You may use timestamps with repeaters in scheduling and deadline | 5746 | You may use timestamps with repeaters in scheduling and deadline |
| 5501 | 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 |
| 5502 | assumption that the timestamp represents the @i{nearest instance} of | 5748 | assumption that the timestamp represents the @i{nearest instance} of |
| 5503 | the repeater. However, the use of diary sexp entries like | 5749 | the repeater. However, the use of diary sexp entries like |
| 5504 | @c | 5750 | @c |
| 5505 | @code{<%%(diary-float t 42)>} | 5751 | @code{<%%(org-float t 42)>} |
| 5506 | @c | 5752 | @c |
| 5507 | in scheduling and deadline timestamps is limited. Org-mode does not | 5753 | in scheduling and deadline timestamps is limited. Org mode does not |
| 5508 | 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 |
| 5509 | 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 |
| 5510 | sexp entry matches. | 5756 | sexp entry matches. |
| @@ -5517,29 +5763,30 @@ sexp entry matches. | |||
| 5517 | @node Inserting deadline/schedule, Repeated tasks, Deadlines and scheduling, Deadlines and scheduling | 5763 | @node Inserting deadline/schedule, Repeated tasks, Deadlines and scheduling, Deadlines and scheduling |
| 5518 | @subsection Inserting deadlines or schedules | 5764 | @subsection Inserting deadlines or schedules |
| 5519 | 5765 | ||
| 5520 | The following commands allow you to quickly insert a deadline or to schedule | 5766 | The following commands allow you to quickly insert@footnote{The @samp{SCHEDULED} and |
| 5767 | @samp{DEADLINE} dates are inserted on the line right below the headline. Don't put | ||
| 5768 | any text between this line and the headline.} a deadline or to schedule | ||
| 5521 | an item: | 5769 | an item: |
| 5522 | 5770 | ||
| 5523 | @table @kbd | 5771 | @table @kbd |
| 5524 | @c | 5772 | @c |
| 5525 | @orgcmd{C-c C-d,org-deadline} | 5773 | @orgcmd{C-c C-d,org-deadline} |
| 5526 | Insert @samp{DEADLINE} keyword along with a stamp. The insertion will happen | 5774 | Insert @samp{DEADLINE} keyword along with a stamp. The insertion will happen |
| 5527 | in the line directly following the headline. When called with a prefix arg, | 5775 | in the line directly following the headline. Any CLOSED timestamp will be |
| 5528 | an existing deadline will be removed from the entry. Depending on the | 5776 | removed. When called with a prefix arg, an existing deadline will be removed |
| 5529 | variable @code{org-log-redeadline}@footnote{with corresponding | 5777 | from the entry. Depending on the variable @code{org-log-redeadline}@footnote{with corresponding |
| 5530 | @code{#+STARTUP} keywords @code{logredeadline}, @code{lognoteredeadline}, | 5778 | @code{#+STARTUP} keywords @code{logredeadline}, @code{lognoteredeadline}, |
| 5531 | and @code{nologredeadline}}, a note will be taken when changing an existing | 5779 | and @code{nologredeadline}}, a note will be taken when changing an existing |
| 5532 | deadline. | 5780 | deadline. |
| 5533 | @c FIXME Any CLOSED timestamp will be removed.???????? | 5781 | |
| 5534 | @c | ||
| 5535 | @orgcmd{C-c C-s,org-schedule} | 5782 | @orgcmd{C-c C-s,org-schedule} |
| 5536 | Insert @samp{SCHEDULED} keyword along with a stamp. The insertion will | 5783 | Insert @samp{SCHEDULED} keyword along with a stamp. The insertion will |
| 5537 | happen in the line directly following the headline. Any CLOSED timestamp | 5784 | happen in the line directly following the headline. Any CLOSED timestamp |
| 5538 | will be removed. When called with a prefix argument, remove the scheduling | 5785 | will be removed. When called with a prefix argument, remove the scheduling |
| 5539 | date from the entry. Depending on the variable | 5786 | date from the entry. Depending on the variable |
| 5540 | @code{org-log-reschedule}@footnote{with corresponding @code{#+STARTUP} | 5787 | @code{org-log-reschedule}@footnote{with corresponding @code{#+STARTUP} |
| 5541 | keywords @code{logredeadline}, @code{lognoteredeadline}, and | 5788 | keywords @code{logreschedule}, @code{lognotereschedule}, and |
| 5542 | @code{nologredeadline}}, a note will be taken when changing an existing | 5789 | @code{nologreschedule}}, a note will be taken when changing an existing |
| 5543 | scheduling time. | 5790 | scheduling time. |
| 5544 | @c | 5791 | @c |
| 5545 | @orgcmd{C-c C-x C-k,org-mark-entry-for-agenda-action} | 5792 | @orgcmd{C-c C-x C-k,org-mark-entry-for-agenda-action} |
| @@ -5566,12 +5813,17 @@ Sparse tree for deadlines and scheduled items before a given date. | |||
| 5566 | Sparse tree for deadlines and scheduled items after a given date. | 5813 | Sparse tree for deadlines and scheduled items after a given date. |
| 5567 | @end table | 5814 | @end table |
| 5568 | 5815 | ||
| 5816 | Note that @code{org-schedule} and @code{org-deadline} supports | ||
| 5817 | setting the date by indicating a relative time: e.g. +1d will set | ||
| 5818 | the date to the next day after today, and --1w will set the date | ||
| 5819 | to the previous week before any current timestamp. | ||
| 5820 | |||
| 5569 | @node Repeated tasks, , Inserting deadline/schedule, Deadlines and scheduling | 5821 | @node Repeated tasks, , Inserting deadline/schedule, Deadlines and scheduling |
| 5570 | @subsection Repeated tasks | 5822 | @subsection Repeated tasks |
| 5571 | @cindex tasks, repeated | 5823 | @cindex tasks, repeated |
| 5572 | @cindex repeated tasks | 5824 | @cindex repeated tasks |
| 5573 | 5825 | ||
| 5574 | 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 |
| 5575 | 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, |
| 5576 | or plain timestamp. In the following example | 5828 | or plain timestamp. In the following example |
| 5577 | @example | 5829 | @example |
| @@ -5591,7 +5843,7 @@ over-due, so it is important to be able to mark such an entry as completed | |||
| 5591 | 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 |
| 5592 | 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 |
| 5593 | 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 |
| 5594 | 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 |
| 5595 | 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 |
| 5596 | 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 |
| 5597 | 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 |
| @@ -5624,7 +5876,7 @@ task, this may not be the best way to handle it. For example, if you | |||
| 5624 | 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 |
| 5625 | 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 |
| 5626 | like changing batteries which should always repeat a certain time | 5878 | like changing batteries which should always repeat a certain time |
| 5627 | @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 |
| 5628 | special repeaters @samp{++} and @samp{.+}. For example: | 5880 | special repeaters @samp{++} and @samp{.+}. For example: |
| 5629 | 5881 | ||
| 5630 | @example | 5882 | @example |
| @@ -5653,7 +5905,7 @@ created for this purpose, it is described in @ref{Structure editing}. | |||
| 5653 | @cindex clocking time | 5905 | @cindex clocking time |
| 5654 | @cindex time clocking | 5906 | @cindex time clocking |
| 5655 | 5907 | ||
| 5656 | 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 |
| 5657 | 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. |
| 5658 | 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 |
| 5659 | clock is stopped and the corresponding time interval is recorded. It | 5911 | clock is stopped and the corresponding time interval is recorded. It |
| @@ -5684,11 +5936,15 @@ what to do with it. | |||
| 5684 | @table @kbd | 5936 | @table @kbd |
| 5685 | @orgcmd{C-c C-x C-i,org-clock-in} | 5937 | @orgcmd{C-c C-x C-i,org-clock-in} |
| 5686 | @vindex org-clock-into-drawer | 5938 | @vindex org-clock-into-drawer |
| 5939 | @cindex property, LOG_INTO_DRAWER | ||
| 5687 | Start the clock on the current item (clock-in). This inserts the CLOCK | 5940 | Start the clock on the current item (clock-in). This inserts the CLOCK |
| 5688 | keyword together with a timestamp. If this is not the first clocking of | 5941 | keyword together with a timestamp. If this is not the first clocking of |
| 5689 | this item, the multiple CLOCK lines will be wrapped into a | 5942 | this item, the multiple CLOCK lines will be wrapped into a |
| 5690 | @code{:LOGBOOK:} drawer (see also the variable | 5943 | @code{:LOGBOOK:} drawer (see also the variable |
| 5691 | @code{org-clock-into-drawer}). When called with a @kbd{C-u} prefix argument, | 5944 | @code{org-clock-into-drawer}). You can also overrule |
| 5945 | the setting of this variable for a subtree by setting a | ||
| 5946 | @code{CLOCK_INTO_DRAWER} or @code{LOG_INTO_DRAWER} property. | ||
| 5947 | When called with a @kbd{C-u} prefix argument, | ||
| 5692 | select the task from a list of recently clocked tasks. With two @kbd{C-u | 5948 | select the task from a list of recently clocked tasks. With two @kbd{C-u |
| 5693 | C-u} prefixes, clock into the task at point and mark it as the default task. | 5949 | C-u} prefixes, clock into the task at point and mark it as the default task. |
| 5694 | The default task will always be available when selecting a clocking task, | 5950 | The default task will always be available when selecting a clocking task, |
| @@ -5730,6 +5986,9 @@ Update the effort estimate for the current clock task. | |||
| 5730 | Recompute the time interval after changing one of the timestamps. This | 5986 | Recompute the time interval after changing one of the timestamps. This |
| 5731 | is only necessary if you edit the timestamps directly. If you change | 5987 | is only necessary if you edit the timestamps directly. If you change |
| 5732 | them with @kbd{S-@key{cursor}} keys, the update is automatic. | 5988 | them with @kbd{S-@key{cursor}} keys, the update is automatic. |
| 5989 | @orgcmd{C-S-@key{up/down},org-clock-timestamps-up/down} | ||
| 5990 | On @code{CLOCK} log lines, increase/decrease both timestamps at the same | ||
| 5991 | time so that duration keeps the same. | ||
| 5733 | @orgcmd{C-c C-t,org-todo} | 5992 | @orgcmd{C-c C-t,org-todo} |
| 5734 | Changing the TODO state of an item to DONE automatically stops the clock | 5993 | Changing the TODO state of an item to DONE automatically stops the clock |
| 5735 | if it is running in this same item. | 5994 | if it is running in this same item. |
| @@ -5741,12 +6000,12 @@ Jump to the headline of the currently clocked in task. With a @kbd{C-u} | |||
| 5741 | prefix arg, select the target task from a list of recently clocked tasks. | 6000 | prefix arg, select the target task from a list of recently clocked tasks. |
| 5742 | @orgcmd{C-c C-x C-d,org-clock-display} | 6001 | @orgcmd{C-c C-x C-d,org-clock-display} |
| 5743 | @vindex org-remove-highlights-with-change | 6002 | @vindex org-remove-highlights-with-change |
| 5744 | Display time summaries for each subtree in the current buffer. This | 6003 | Display time summaries for each subtree in the current buffer. This puts |
| 5745 | puts overlays at the end of each headline, showing the total time | 6004 | overlays at the end of each headline, showing the total time recorded under |
| 5746 | recorded under that heading, including the time of any subheadings. You | 6005 | that heading, including the time of any subheadings. You can use visibility |
| 5747 | can use visibility cycling to study the tree, but the overlays disappear | 6006 | cycling to study the tree, but the overlays disappear when you change the |
| 5748 | when you change the buffer (see variable | 6007 | buffer (see variable @code{org-remove-highlights-with-change}) or press |
| 5749 | @code{org-remove-highlights-with-change}) or press @kbd{C-c C-c}. | 6008 | @kbd{C-c C-c}. |
| 5750 | @end table | 6009 | @end table |
| 5751 | 6010 | ||
| 5752 | The @kbd{l} key may be used in the timeline (@pxref{Timeline}) and in | 6011 | The @kbd{l} key may be used in the timeline (@pxref{Timeline}) and in |
| @@ -5765,10 +6024,11 @@ formatted as one or several Org tables. | |||
| 5765 | @table @kbd | 6024 | @table @kbd |
| 5766 | @orgcmd{C-c C-x C-r,org-clock-report} | 6025 | @orgcmd{C-c C-x C-r,org-clock-report} |
| 5767 | Insert a dynamic block (@pxref{Dynamic blocks}) containing a clock | 6026 | Insert a dynamic block (@pxref{Dynamic blocks}) containing a clock |
| 5768 | 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 |
| 5769 | 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 |
| 5770 | 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 |
| 5771 | update it. | 6030 | update it. The clock table always includes also trees with |
| 6031 | @code{:ARCHIVE:} tag. | ||
| 5772 | @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} |
| 5773 | 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 |
| 5774 | @code{#+BEGIN} line of the dynamic block. | 6034 | @code{#+BEGIN} line of the dynamic block. |
| @@ -5830,7 +6090,8 @@ be selected: | |||
| 5830 | @r{To use this, @code{:block} or @code{:tstart}, @code{:tend} are needed.} | 6090 | @r{To use this, @code{:block} or @code{:tstart}, @code{:tend} are needed.} |
| 5831 | :stepskip0 @r{Do not show steps that have zero time.} | 6091 | :stepskip0 @r{Do not show steps that have zero time.} |
| 5832 | :fileskip0 @r{Do not show table sections from files which did not contribute.} | 6092 | :fileskip0 @r{Do not show table sections from files which did not contribute.} |
| 5833 | :tags @r{A tags match to select entries that should contribute}. | 6093 | :tags @r{A tags match to select entries that should contribute. See} |
| 6094 | @r{@ref{Matching tags and properties} for the match syntax.} | ||
| 5834 | @end example | 6095 | @end example |
| 5835 | 6096 | ||
| 5836 | Then there are options which determine the formatting of the table. There | 6097 | Then there are options which determine the formatting of the table. There |
| @@ -5838,6 +6099,7 @@ options are interpreted by the function @code{org-clocktable-write-default}, | |||
| 5838 | but you can specify your own function using the @code{:formatter} parameter. | 6099 | but you can specify your own function using the @code{:formatter} parameter. |
| 5839 | @example | 6100 | @example |
| 5840 | :emphasize @r{When @code{t}, emphasize level one and level two items.} | 6101 | :emphasize @r{When @code{t}, emphasize level one and level two items.} |
| 6102 | :lang @r{Language@footnote{Language terms can be set through the variable @code{org-clock-clocktable-language-setup}.} to use for descriptive cells like "Task".} | ||
| 5841 | :link @r{Link the item headlines in the table to their origins.} | 6103 | :link @r{Link the item headlines in the table to their origins.} |
| 5842 | :narrow @r{An integer to limit the width of the headline column in} | 6104 | :narrow @r{An integer to limit the width of the headline column in} |
| 5843 | @r{the org table. If you write it like @samp{50!}, then the} | 6105 | @r{the org table. If you write it like @samp{50!}, then the} |
| @@ -5850,6 +6112,9 @@ but you can specify your own function using the @code{:formatter} parameter. | |||
| 5850 | @r{All are overwritten except if there is an explicit @code{:narrow}} | 6112 | @r{All are overwritten except if there is an explicit @code{:narrow}} |
| 5851 | :timestamp @r{A timestamp for the entry, when available. Look for SCHEDULED,} | 6113 | :timestamp @r{A timestamp for the entry, when available. Look for SCHEDULED,} |
| 5852 | @r{DEADLINE, TIMESTAMP and TIMESTAMP_IA, in this order.} | 6114 | @r{DEADLINE, TIMESTAMP and TIMESTAMP_IA, in this order.} |
| 6115 | :properties @r{List of properties that should be shown in the table. Each} | ||
| 6116 | @r{property will get its own column.} | ||
| 6117 | :inherit-props @r{When this flag is @code{t}, the values for @code{:properties} will be inherited.} | ||
| 5853 | :formula @r{Content of a @code{#+TBLFM} line to be added and evaluated.} | 6118 | :formula @r{Content of a @code{#+TBLFM} line to be added and evaluated.} |
| 5854 | @r{As a special case, @samp{:formula %} adds a column with % time.} | 6119 | @r{As a special case, @samp{:formula %} adds a column with % time.} |
| 5855 | @r{If you do not specify a formula here, any existing formula} | 6120 | @r{If you do not specify a formula here, any existing formula} |
| @@ -5897,7 +6162,7 @@ applying it to another one. | |||
| 5897 | By customizing the variable @code{org-clock-idle-time} to some integer, such | 6162 | By customizing the variable @code{org-clock-idle-time} to some integer, such |
| 5898 | as 10 or 15, Emacs can alert you when you get back to your computer after | 6163 | as 10 or 15, Emacs can alert you when you get back to your computer after |
| 5899 | being idle for that many minutes@footnote{On computers using Mac OS X, | 6164 | being idle for that many minutes@footnote{On computers using Mac OS X, |
| 5900 | idleness is based on actual user idleness, not just Emacs' idle time. For | 6165 | idleness is based on actual user idleness, not just Emacs's idle time. For |
| 5901 | X11, you can install a utility program @file{x11idle.c}, available in the | 6166 | X11, you can install a utility program @file{x11idle.c}, available in the |
| 5902 | UTILITIES directory of the Org git distribution, to get the same general | 6167 | UTILITIES directory of the Org git distribution, to get the same general |
| 5903 | treatment of idleness. On other systems, idle time refers to Emacs idle time | 6168 | treatment of idleness. On other systems, idle time refers to Emacs idle time |
| @@ -5945,7 +6210,7 @@ If you restart Emacs and clock into any task, Org will notice that you have a | |||
| 5945 | dangling clock which was never clocked out from your last session. Using | 6210 | dangling clock which was never clocked out from your last session. Using |
| 5946 | that clock's starting time as the beginning of the unaccounted-for period, | 6211 | that clock's starting time as the beginning of the unaccounted-for period, |
| 5947 | Org will ask how you want to resolve that time. The logic and behavior is | 6212 | Org will ask how you want to resolve that time. The logic and behavior is |
| 5948 | identical to dealing with away time due to idleness; it's just happening due | 6213 | identical to dealing with away time due to idleness; it is just happening due |
| 5949 | to a recovery event rather than a set amount of idle time. | 6214 | to a recovery event rather than a set amount of idle time. |
| 5950 | 6215 | ||
| 5951 | You can also check all the files visited by your Org agenda for dangling | 6216 | You can also check all the files visited by your Org agenda for dangling |
| @@ -5982,7 +6247,7 @@ together with clock sums (if you want to clock your time). For a specific | |||
| 5982 | buffer you can use | 6247 | buffer you can use |
| 5983 | 6248 | ||
| 5984 | @example | 6249 | @example |
| 5985 | #+PROPERTY: Effort_ALL 0 0:10 0:30 1:00 2:00 3:00 4:00 5:00 6:00 7:00 8:00 | 6250 | #+PROPERTY: Effort_ALL 0 0:10 0:30 1:00 2:00 3:00 4:00 5:00 6:00 7:00 |
| 5986 | #+COLUMNS: %40ITEM(Task) %17Effort(Estimated Effort)@{:@} %CLOCKSUM | 6251 | #+COLUMNS: %40ITEM(Task) %17Effort(Estimated Effort)@{:@} %CLOCKSUM |
| 5987 | @end example | 6252 | @end example |
| 5988 | 6253 | ||
| @@ -6060,8 +6325,8 @@ not started at exactly the right moment. | |||
| 6060 | @kindex C-c C-x ; | 6325 | @kindex C-c C-x ; |
| 6061 | @kindex ; | 6326 | @kindex ; |
| 6062 | 6327 | ||
| 6063 | 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 |
| 6064 | timer. Use @key{;} from agenda buffers, @key{C-c C-x ;} everwhere else. | 6329 | timer. Use @kbd{;} from agenda buffers, @key{C-c C-x ;} everywhere else. |
| 6065 | 6330 | ||
| 6066 | @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 |
| 6067 | 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 |
| @@ -6083,7 +6348,7 @@ trees to an archive file keeps the system compact and fast. | |||
| 6083 | * Capture:: Capturing new stuff | 6348 | * Capture:: Capturing new stuff |
| 6084 | * Attachments:: Add files to tasks | 6349 | * Attachments:: Add files to tasks |
| 6085 | * RSS Feeds:: Getting input from RSS feeds | 6350 | * RSS Feeds:: Getting input from RSS feeds |
| 6086 | * Protocols:: External (e.g. Browser) access to Emacs and Org | 6351 | * Protocols:: External (e.g.@: Browser) access to Emacs and Org |
| 6087 | * Refiling notes:: Moving a tree from one place to another | 6352 | * Refiling notes:: Moving a tree from one place to another |
| 6088 | * Archiving:: What to do with finished projects | 6353 | * Archiving:: What to do with finished projects |
| 6089 | @end menu | 6354 | @end menu |
| @@ -6094,7 +6359,7 @@ trees to an archive file keeps the system compact and fast. | |||
| 6094 | 6359 | ||
| 6095 | 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 |
| 6096 | 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 |
| 6097 | 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 |
| 6098 | backward compatibility with existing setups. You can find the documentation | 6363 | backward compatibility with existing setups. You can find the documentation |
| 6099 | for org-remember at @url{http://orgmode.org/org-remember.pdf}. | 6364 | for org-remember at @url{http://orgmode.org/org-remember.pdf}. |
| 6100 | 6365 | ||
| @@ -6138,6 +6403,7 @@ suggestion.} for capturing new material. | |||
| 6138 | @orgcmd{C-c c,org-capture} | 6403 | @orgcmd{C-c c,org-capture} |
| 6139 | Call the command @code{org-capture}. Note that this keybinding is global and | 6404 | Call the command @code{org-capture}. Note that this keybinding is global and |
| 6140 | not active by default - you need to install it. If you have templates | 6405 | not active by default - you need to install it. If you have templates |
| 6406 | @cindex date tree | ||
| 6141 | defined @pxref{Capture templates}, it will offer these templates for | 6407 | defined @pxref{Capture templates}, it will offer these templates for |
| 6142 | selection or use a new Org outline node as the default template. It will | 6408 | selection or use a new Org outline node as the default template. It will |
| 6143 | insert the template into the target file and switch to an indirect buffer | 6409 | insert the template into the target file and switch to an indirect buffer |
| @@ -6172,7 +6438,7 @@ prefix commands: | |||
| 6172 | 6438 | ||
| 6173 | @table @kbd | 6439 | @table @kbd |
| 6174 | @orgkey{C-u C-c c} | 6440 | @orgkey{C-u C-c c} |
| 6175 | Visit the target location of a cpature template. You get to select the | 6441 | Visit the target location of a capture template. You get to select the |
| 6176 | template in the usual way. | 6442 | template in the usual way. |
| 6177 | @orgkey{C-u C-u C-c c} | 6443 | @orgkey{C-u C-u C-c c} |
| 6178 | Visit the last stored capture item in its buffer. | 6444 | Visit the last stored capture item in its buffer. |
| @@ -6220,6 +6486,14 @@ extremely useful for deriving tasks from emails, for example. You fill in | |||
| 6220 | the task definition, press @code{C-c C-c} and Org returns you to the same | 6486 | the task definition, press @code{C-c C-c} and Org returns you to the same |
| 6221 | place where you started the capture process. | 6487 | place where you started the capture process. |
| 6222 | 6488 | ||
| 6489 | To define special keys to capture to a particular template without going | ||
| 6490 | through the interactive template selection, you can create your key binding | ||
| 6491 | like this: | ||
| 6492 | |||
| 6493 | @lisp | ||
| 6494 | (define-key global-map "\C-cx" | ||
| 6495 | (lambda () (interactive) (org-capture nil "x"))) | ||
| 6496 | @end lisp | ||
| 6223 | 6497 | ||
| 6224 | @menu | 6498 | @menu |
| 6225 | * Template elements:: What is needed for a complete template entry | 6499 | * Template elements:: What is needed for a complete template entry |
| @@ -6230,14 +6504,14 @@ place where you started the capture process. | |||
| 6230 | @subsubsection Template elements | 6504 | @subsubsection Template elements |
| 6231 | 6505 | ||
| 6232 | Now lets 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 |
| 6233 | @code{org-capture-templates} is a list with the following items: | 6507 | @code{org-capture-templates} is a list with the following items: |
| 6234 | 6508 | ||
| 6235 | @table @var | 6509 | @table @var |
| 6236 | @item keys | 6510 | @item keys |
| 6237 | The keys that will select the template, as a string, characters | 6511 | The keys that will select the template, as a string, characters |
| 6238 | only, for example @code{"a"} for a template to be selected with a | 6512 | only, for example @code{"a"} for a template to be selected with a |
| 6239 | single key, or @code{"bt"} for selection with two keys. When using | 6513 | single key, or @code{"bt"} for selection with two keys. When using |
| 6240 | several keys, keys using the same prefix key must be sequential | 6514 | several keys, keys using the same prefix key must be sequential |
| 6241 | in the list and preceded by a 2-element entry explaining the | 6515 | in the list and preceded by a 2-element entry explaining the |
| 6242 | prefix key, for example | 6516 | prefix key, for example |
| 6243 | @example | 6517 | @example |
| @@ -6254,9 +6528,8 @@ selection. | |||
| 6254 | The type of entry, a symbol. Valid values are: | 6528 | The type of entry, a symbol. Valid values are: |
| 6255 | @table @code | 6529 | @table @code |
| 6256 | @item entry | 6530 | @item entry |
| 6257 | An Org-mode node, with a headline. Will be filed as the child of the | 6531 | An Org mode node, with a headline. Will be filed as the child of the target |
| 6258 | target entry or as a top-level entry. The target file should be an Org-mode | 6532 | entry or as a top-level entry. The target file should be an Org mode file. |
| 6259 | file. | ||
| 6260 | @item item | 6533 | @item item |
| 6261 | 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 |
| 6262 | location. Again the target file should be an Org file. | 6535 | location. Again the target file should be an Org file. |
| @@ -6273,11 +6546,12 @@ Text to be inserted as it is. | |||
| 6273 | 6546 | ||
| 6274 | @item target | 6547 | @item target |
| 6275 | @vindex org-default-notes-file | 6548 | @vindex org-default-notes-file |
| 6276 | 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 |
| 6277 | 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 |
| 6278 | 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 |
| 6279 | 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 |
| 6280 | the empty string, it defaults to @code{org-default-notes-file}. | 6553 | the empty string, it defaults to @code{org-default-notes-file}. A file can |
| 6554 | also be given as a variable, function, or Emacs Lisp form. | ||
| 6281 | 6555 | ||
| 6282 | Valid values are: | 6556 | Valid values are: |
| 6283 | @table @code | 6557 | @table @code |
| @@ -6342,14 +6616,25 @@ before and after the new item. Default 0, only common other value is 1. | |||
| 6342 | @item :clock-in | 6616 | @item :clock-in |
| 6343 | Start the clock in this item. | 6617 | Start the clock in this item. |
| 6344 | 6618 | ||
| 6619 | @item :clock-keep | ||
| 6620 | Keep the clock running when filing the captured entry. | ||
| 6621 | |||
| 6345 | @item :clock-resume | 6622 | @item :clock-resume |
| 6346 | If starting the capture interrupted a clock, restart that clock when finished | 6623 | If starting the capture interrupted a clock, restart that clock when finished |
| 6347 | with the capture. | 6624 | with the capture. Note that @code{:clock-keep} has precedence over |
| 6625 | @code{:clock-resume}. When setting both to @code{t}, the current clock will | ||
| 6626 | run and the previous one will not be resumed. | ||
| 6348 | 6627 | ||
| 6349 | @item :unnarrowed | 6628 | @item :unnarrowed |
| 6350 | Do not narrow the target buffer, simply show the full buffer. Default is to | 6629 | Do not narrow the target buffer, simply show the full buffer. Default is to |
| 6351 | narrow it so that you only see the new material. | 6630 | narrow it so that you only see the new material. |
| 6352 | 6631 | ||
| 6632 | @item :table-line-pos | ||
| 6633 | Specification of the location in the table where the new line should be | ||
| 6634 | inserted. It should be a string like @code{"II-3"} meaning that the new | ||
| 6635 | line should become the third line before the second horizontal separator | ||
| 6636 | line. | ||
| 6637 | |||
| 6353 | @item :kill-buffer | 6638 | @item :kill-buffer |
| 6354 | If the target file was not yet visited when capture was invoked, kill the | 6639 | If the target file was not yet visited when capture was invoked, kill the |
| 6355 | buffer again after capture is completed. | 6640 | buffer again after capture is completed. |
| @@ -6361,37 +6646,39 @@ buffer again after capture is completed. | |||
| 6361 | 6646 | ||
| 6362 | 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 |
| 6363 | these sequences literally, escape the @kbd{%} with a backslash.} allow | 6648 | these sequences literally, escape the @kbd{%} with a backslash.} allow |
| 6364 | dynamic insertion of content: | 6649 | dynamic insertion of content. The templates are expanded in the order given here: |
| 6365 | 6650 | ||
| 6366 | @comment SJE: should these sentences terminate in period? | ||
| 6367 | @smallexample | 6651 | @smallexample |
| 6368 | %^@{@var{prompt}@} @r{prompt the user for a string and replace this sequence with it.} | 6652 | %[@var{file}] @r{insert the contents of the file given by @var{file}.} |
| 6369 | @r{You may specify a default value and a completion table with} | 6653 | %(@var{sexp}) @r{evaluate Elisp @var{sexp} and replace with the result.} |
| 6370 | @r{%^@{prompt|default|completion2|completion3...@}} | 6654 | %<...> @r{the result of format-time-string on the ... format specification.} |
| 6371 | @r{The arrow keys access a prompt-specific history.} | 6655 | %t @r{timestamp, date only.} |
| 6372 | %a @r{annotation, normally the link created with @code{org-store-link}} | 6656 | %T @r{timestamp with date and time.} |
| 6373 | %A @r{like @code{%a}, but prompt for the description part} | 6657 | %u, %U @r{like the above, but inactive timestamps.} |
| 6658 | %a @r{annotation, normally the link created with @code{org-store-link}.} | ||
| 6374 | %i @r{initial content, the region when capture is called while the} | 6659 | %i @r{initial content, the region when capture is called while the} |
| 6375 | @r{region is active.} | 6660 | @r{region is active.} |
| 6376 | @r{The entire text will be indented like @code{%i} itself.} | 6661 | @r{The entire text will be indented like @code{%i} itself.} |
| 6377 | %t @r{timestamp, date only} | 6662 | %A @r{like @code{%a}, but prompt for the description part.} |
| 6378 | %T @r{timestamp with date and time} | ||
| 6379 | %u, %U @r{like the above, but inactive timestamps} | ||
| 6380 | %^t @r{like @code{%t}, but prompt for date. Similarly @code{%^T}, @code{%^u}, @code{%^U}} | ||
| 6381 | @r{You may define a prompt like @code{%^@{Birthday@}t}} | ||
| 6382 | %n @r{user name (taken from @code{user-full-name})} | ||
| 6383 | %c @r{Current kill ring head.} | 6663 | %c @r{Current kill ring head.} |
| 6384 | %x @r{Content of the X clipboard.} | 6664 | %x @r{Content of the X clipboard.} |
| 6385 | %^C @r{Interactive selection of which kill or clip to use.} | 6665 | %k @r{title of the currently clocked task.} |
| 6386 | %^L @r{Like @code{%^C}, but insert as link.} | 6666 | %K @r{link to the currently clocked task.} |
| 6387 | %k @r{title of the currently clocked task} | 6667 | %n @r{user name (taken from @code{user-full-name}).} |
| 6388 | %K @r{link to the currently clocked task} | 6668 | %f @r{file visited by current buffer when org-capture was called.} |
| 6669 | %F @r{full path of the file or directory visited by current buffer.} | ||
| 6670 | %:keyword @r{specific information for certain link types, see below.} | ||
| 6389 | %^g @r{prompt for tags, with completion on tags in target file.} | 6671 | %^g @r{prompt for tags, with completion on tags in target file.} |
| 6390 | %^G @r{prompt for tags, with completion all tags in all agenda files.} | 6672 | %^G @r{prompt for tags, with completion all tags in all agenda files.} |
| 6391 | %^@{@var{prop}@}p @r{Prompt the user for a value for property @var{prop}} | 6673 | %^t @r{like @code{%t}, but prompt for date. Similarly @code{%^T}, @code{%^u}, @code{%^U}.} |
| 6392 | %:keyword @r{specific information for certain link types, see below} | 6674 | @r{You may define a prompt like @code{%^@{Birthday@}t}.} |
| 6393 | %[@var{file}] @r{insert the contents of the file given by @var{file}} | 6675 | %^C @r{Interactive selection of which kill or clip to use.} |
| 6394 | %(@var{sexp}) @r{evaluate Elisp @var{sexp} and replace with the result} | 6676 | %^L @r{Like @code{%^C}, but insert as link.} |
| 6677 | %^@{@var{prop}@}p @r{Prompt the user for a value for property @var{prop}.} | ||
| 6678 | %^@{@var{prompt}@} @r{prompt the user for a string and replace this sequence with it.} | ||
| 6679 | @r{You may specify a default value and a completion table with} | ||
| 6680 | @r{%^@{prompt|default|completion2|completion3...@}.} | ||
| 6681 | @r{The arrow keys access a prompt-specific history.} | ||
| 6395 | @end smallexample | 6682 | @end smallexample |
| 6396 | 6683 | ||
| 6397 | @noindent | 6684 | @noindent |
| @@ -6403,8 +6690,8 @@ similar way.}: | |||
| 6403 | 6690 | ||
| 6404 | @vindex org-from-is-user-regexp | 6691 | @vindex org-from-is-user-regexp |
| 6405 | @smallexample | 6692 | @smallexample |
| 6406 | Link type | Available keywords | 6693 | Link type | Available keywords |
| 6407 | -------------------+---------------------------------------------- | 6694 | ------------------------+---------------------------------------------- |
| 6408 | bbdb | %:name %:company | 6695 | bbdb | %:name %:company |
| 6409 | irc | %:server %:port %:nick | 6696 | irc | %:server %:port %:nick |
| 6410 | vm, wl, mh, mew, rmail | %:type %:subject %:message-id | 6697 | vm, wl, mh, mew, rmail | %:type %:subject %:message-id |
| @@ -6482,7 +6769,7 @@ Create a new attachment as an Emacs buffer. | |||
| 6482 | Synchronize the current task with its attachment directory, in case you added | 6769 | Synchronize the current task with its attachment directory, in case you added |
| 6483 | attachments yourself. | 6770 | attachments yourself. |
| 6484 | 6771 | ||
| 6485 | @orgcmdtkc{p,C-c C-a o,org-attach-open} | 6772 | @orgcmdtkc{o,C-c C-a o,org-attach-open} |
| 6486 | @vindex org-file-apps | 6773 | @vindex org-file-apps |
| 6487 | Open current task's attachment. If there is more than one, prompt for a | 6774 | Open current task's attachment. If there is more than one, prompt for a |
| 6488 | file name first. Opening will follow the rules set by @code{org-file-apps}. | 6775 | file name first. Opening will follow the rules set by @code{org-file-apps}. |
| @@ -6610,7 +6897,7 @@ create new nodes as new parents for refiling on the fly, check the | |||
| 6610 | variable @code{org-refile-allow-creating-parent-nodes}. | 6897 | variable @code{org-refile-allow-creating-parent-nodes}. |
| 6611 | When the variable @code{org-log-refile}@footnote{with corresponding | 6898 | When the variable @code{org-log-refile}@footnote{with corresponding |
| 6612 | @code{#+STARTUP} keywords @code{logrefile}, @code{lognoterefile}, | 6899 | @code{#+STARTUP} keywords @code{logrefile}, @code{lognoterefile}, |
| 6613 | and @code{nologrefile}} is set, a time stamp or a note will be | 6900 | and @code{nologrefile}} is set, a timestamp or a note will be |
| 6614 | recorded when an entry has been refiled. | 6901 | recorded when an entry has been refiled. |
| 6615 | @orgkey{C-u C-c C-w} | 6902 | @orgkey{C-u C-c C-w} |
| 6616 | Use the refile interface to jump to a heading. | 6903 | Use the refile interface to jump to a heading. |
| @@ -6835,7 +7122,7 @@ The information to be shown is normally collected from all @emph{agenda | |||
| 6835 | files}, the files listed in the variable | 7122 | files}, the files listed in the variable |
| 6836 | @code{org-agenda-files}@footnote{If the value of that variable is not a | 7123 | @code{org-agenda-files}@footnote{If the value of that variable is not a |
| 6837 | list, but a single file name, then the list of agenda files will be | 7124 | list, but a single file name, then the list of agenda files will be |
| 6838 | maintained in that external file.}. If a directory is part of this list, | 7125 | maintained in that external file.}. If a directory is part of this list, |
| 6839 | all files with the extension @file{.org} in this directory will be part | 7126 | all files with the extension @file{.org} in this directory will be part |
| 6840 | of the list. | 7127 | of the list. |
| 6841 | 7128 | ||
| @@ -6848,13 +7135,14 @@ the easiest way to maintain it is through the following commands | |||
| 6848 | 7135 | ||
| 6849 | @cindex files, adding to agenda list | 7136 | @cindex files, adding to agenda list |
| 6850 | @table @kbd | 7137 | @table @kbd |
| 6851 | @orgcmd{C-c [,org-agenda-to-front} | 7138 | @orgcmd{C-c [,org-agenda-file-to-front} |
| 6852 | Add current file to the list of agenda files. The file is added to | 7139 | Add current file to the list of agenda files. The file is added to |
| 6853 | the front of the list. If it was already in the list, it is moved to | 7140 | the front of the list. If it was already in the list, it is moved to |
| 6854 | the front. With a prefix argument, file is added/moved to the end. | 7141 | the front. With a prefix argument, file is added/moved to the end. |
| 6855 | @orgcmd{C-c ],org-remove-file} | 7142 | @orgcmd{C-c ],org-remove-file} |
| 6856 | Remove current file from the list of agenda files. | 7143 | Remove current file from the list of agenda files. |
| 6857 | @kindex C-, | 7144 | @kindex C-, |
| 7145 | @cindex cycling, of agenda files | ||
| 6858 | @orgcmd{C-',org-cycle-agenda-files} | 7146 | @orgcmd{C-',org-cycle-agenda-files} |
| 6859 | @itemx C-, | 7147 | @itemx C-, |
| 6860 | Cycle through agenda file list, visiting one file after the other. | 7148 | Cycle through agenda file list, visiting one file after the other. |
| @@ -6905,7 +7193,7 @@ Lift the restriction. | |||
| 6905 | @cindex agenda dispatcher | 7193 | @cindex agenda dispatcher |
| 6906 | @cindex dispatching agenda commands | 7194 | @cindex dispatching agenda commands |
| 6907 | The views are created through a dispatcher, which should be bound to a | 7195 | The views are created through a dispatcher, which should be bound to a |
| 6908 | global key---for example @kbd{C-c a} (@pxref{Installation}). In the | 7196 | global key---for example @kbd{C-c a} (@pxref{Activation}). In the |
| 6909 | following we will assume that @kbd{C-c a} is indeed how the dispatcher | 7197 | following we will assume that @kbd{C-c a} is indeed how the dispatcher |
| 6910 | is accessed and list keyboard access to commands accordingly. After | 7198 | is accessed and list keyboard access to commands accordingly. After |
| 6911 | pressing @kbd{C-c a}, an additional letter is required to execute a | 7199 | pressing @kbd{C-c a}, an additional letter is required to execute a |
| @@ -7010,7 +7298,7 @@ anniversaries, lunar phases, sunrise/set, recurrent appointments | |||
| 7010 | 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 |
| 7011 | the diary. | 7299 | the diary. |
| 7012 | 7300 | ||
| 7013 | 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 |
| 7014 | agenda, you only need to customize the variable | 7302 | agenda, you only need to customize the variable |
| 7015 | 7303 | ||
| 7016 | @lisp | 7304 | @lisp |
| @@ -7019,7 +7307,7 @@ agenda, you only need to customize the variable | |||
| 7019 | 7307 | ||
| 7020 | @noindent After that, everything will happen automatically. All diary | 7308 | @noindent After that, everything will happen automatically. All diary |
| 7021 | entries including holidays, anniversaries, etc., will be included in the | 7309 | entries including holidays, anniversaries, etc., will be included in the |
| 7022 | agenda buffer created by Org-mode. @key{SPC}, @key{TAB}, and | 7310 | agenda buffer created by Org mode. @key{SPC}, @key{TAB}, and |
| 7023 | @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 |
| 7024 | 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 |
| 7025 | 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 |
| @@ -7030,7 +7318,7 @@ between calendar and agenda. | |||
| 7030 | 7318 | ||
| 7031 | 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 |
| 7032 | 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 |
| 7033 | 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 |
| 7034 | 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 |
| 7035 | 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 |
| 7036 | the left margin, no whitespace is allowed before them. For example, | 7324 | the left margin, no whitespace is allowed before them. For example, |
| @@ -7042,8 +7330,8 @@ will be made in the agenda: | |||
| 7042 | #+CATEGORY: Holiday | 7330 | #+CATEGORY: Holiday |
| 7043 | %%(org-calendar-holiday) ; special function for holiday names | 7331 | %%(org-calendar-holiday) ; special function for holiday names |
| 7044 | #+CATEGORY: Ann | 7332 | #+CATEGORY: Ann |
| 7045 | %%(diary-anniversary 5 14 1956)@footnote{Note that the order of the arguments (month, day, year) depends on the setting of @code{calendar-date-style}.} Arthur Dent is %d years old | 7333 | %%(org-anniversary 1956 5 14)@footnote{@code{org-anniversary} is just like @code{diary-anniversary}, but the argument order is always according to ISO and therefore independent of the value of @code{calendar-date-style}.} Arthur Dent is %d years old |
| 7046 | %%(diary-anniversary 10 2 1869) Mahatma Gandhi would be %d years old | 7334 | %%(org-anniversary 1869 10 2) Mahatma Gandhi would be %d years old |
| 7047 | @end example | 7335 | @end example |
| 7048 | 7336 | ||
| 7049 | @subsubheading Anniversaries from BBDB | 7337 | @subsubheading Anniversaries from BBDB |
| @@ -7054,7 +7342,7 @@ If you are using the Big Brothers Database to store your contacts, you will | |||
| 7054 | very likely prefer to store anniversaries in BBDB rather than in a | 7342 | very likely prefer to store anniversaries in BBDB rather than in a |
| 7055 | separate Org or diary file. Org supports this and will show BBDB | 7343 | separate Org or diary file. Org supports this and will show BBDB |
| 7056 | anniversaries as part of the agenda. All you need to do is to add the | 7344 | anniversaries as part of the agenda. All you need to do is to add the |
| 7057 | following to one your your agenda files: | 7345 | following to one of your agenda files: |
| 7058 | 7346 | ||
| 7059 | @example | 7347 | @example |
| 7060 | * Anniversaries | 7348 | * Anniversaries |
| @@ -7066,16 +7354,17 @@ following to one your your agenda files: | |||
| 7066 | 7354 | ||
| 7067 | You can then go ahead and define anniversaries for a BBDB record. Basically, | 7355 | You can then go ahead and define anniversaries for a BBDB record. Basically, |
| 7068 | you need to press @kbd{C-o anniversary @key{RET}} with the cursor in a BBDB | 7356 | you need to press @kbd{C-o anniversary @key{RET}} with the cursor in a BBDB |
| 7069 | record and then add the date in the format @code{YYYY-MM-DD}, followed by a | 7357 | record and then add the date in the format @code{YYYY-MM-DD} or @code{MM-DD}, |
| 7070 | space and the class of the anniversary (@samp{birthday} or @samp{wedding}, or | 7358 | followed by a space and the class of the anniversary (@samp{birthday} or |
| 7071 | a format string). If you omit the class, it will default to @samp{birthday}. | 7359 | @samp{wedding}, or a format string). If you omit the class, it will default to |
| 7072 | Here are a few examples, the header for the file @file{org-bbdb.el} contains | 7360 | @samp{birthday}. Here are a few examples, the header for the file |
| 7073 | more detailed information. | 7361 | @file{org-bbdb.el} contains more detailed information. |
| 7074 | 7362 | ||
| 7075 | @example | 7363 | @example |
| 7076 | 1973-06-22 | 7364 | 1973-06-22 |
| 7365 | 06-22 | ||
| 7077 | 1955-08-02 wedding | 7366 | 1955-08-02 wedding |
| 7078 | 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 |
| 7079 | @end example | 7368 | @end example |
| 7080 | 7369 | ||
| 7081 | 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 |
| @@ -7087,12 +7376,14 @@ in an Org or Diary file. | |||
| 7087 | @subsubheading Appointment reminders | 7376 | @subsubheading Appointment reminders |
| 7088 | @cindex @file{appt.el} | 7377 | @cindex @file{appt.el} |
| 7089 | @cindex appointment reminders | 7378 | @cindex appointment reminders |
| 7379 | @cindex appointment | ||
| 7380 | @cindex reminders | ||
| 7090 | 7381 | ||
| 7091 | Org can interact with Emacs appointments notification facility. To add all | 7382 | Org can interact with Emacs appointments notification facility. To add all |
| 7092 | the appointments of your agenda files, use the command | 7383 | the appointments of your agenda files, use the command |
| 7093 | @code{org-agenda-to-appt}. This command also lets you filter through the | 7384 | @code{org-agenda-to-appt}. This command also lets you filter through the |
| 7094 | list of your appointments and add only those belonging to a specific category | 7385 | list of your appointments and add only those belonging to a specific category |
| 7095 | or matching a regular expression. See the docstring for details. | 7386 | or matching a regular expression. See the docstring for details. |
| 7096 | 7387 | ||
| 7097 | @node Global TODO list, Matching tags and properties, Weekly/daily agenda, Built-in agenda views | 7388 | @node Global TODO list, Matching tags and properties, Weekly/daily agenda, Built-in agenda views |
| 7098 | @subsection The global TODO list | 7389 | @subsection The global TODO list |
| @@ -7265,7 +7556,7 @@ brackets (like @samp{DEADLINE<="<2008-12-24 18:30>"}), both values are | |||
| 7265 | assumed to be date/time specifications in the standard Org way, and the | 7556 | assumed to be date/time specifications in the standard Org way, and the |
| 7266 | comparison will be done accordingly. Special values that will be recognized | 7557 | comparison will be done accordingly. Special values that will be recognized |
| 7267 | are @code{"<now>"} for now (including time), and @code{"<today>"}, and | 7558 | are @code{"<now>"} for now (including time), and @code{"<today>"}, and |
| 7268 | @code{"<tomorrow>"} for these days at 0:00 hours, i.e. without a time | 7559 | @code{"<tomorrow>"} for these days at 0:00 hours, i.e.@: without a time |
| 7269 | specification. Also strings like @code{"<+5d>"} or @code{"<-2m>"} with units | 7560 | specification. Also strings like @code{"<+5d>"} or @code{"<-2m>"} with units |
| 7270 | @code{d}, @code{w}, @code{m}, and @code{y} for day, week, month, and year, | 7561 | @code{d}, @code{w}, @code{m}, and @code{y} for day, week, month, and year, |
| 7271 | respectively, can be used. | 7562 | respectively, can be used. |
| @@ -7288,7 +7579,7 @@ other properties will slow down the search. However, once you have paid the | |||
| 7288 | price by accessing one property, testing additional properties is cheap | 7579 | price by accessing one property, testing additional properties is cheap |
| 7289 | again. | 7580 | again. |
| 7290 | 7581 | ||
| 7291 | 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 |
| 7292 | beware that this can slow down searches considerably. See @ref{Property | 7583 | beware that this can slow down searches considerably. See @ref{Property |
| 7293 | inheritance}, for details. | 7584 | inheritance}, for details. |
| 7294 | 7585 | ||
| @@ -7321,7 +7612,7 @@ Select @samp{:work:}-tagged TODO lines that are either @samp{WAITING} or | |||
| 7321 | @cindex timeline, single file | 7612 | @cindex timeline, single file |
| 7322 | @cindex time-sorted view | 7613 | @cindex time-sorted view |
| 7323 | 7614 | ||
| 7324 | 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 |
| 7325 | 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 |
| 7326 | to give an overview over events in a project. | 7617 | to give an overview over events in a project. |
| 7327 | 7618 | ||
| @@ -7342,7 +7633,7 @@ The commands available in the timeline buffer are listed in | |||
| 7342 | @cindex text search | 7633 | @cindex text search |
| 7343 | @cindex searching, for text | 7634 | @cindex searching, for text |
| 7344 | 7635 | ||
| 7345 | 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. |
| 7346 | It is particularly useful to find notes. | 7637 | It is particularly useful to find notes. |
| 7347 | 7638 | ||
| 7348 | @table @kbd | 7639 | @table @kbd |
| @@ -7368,12 +7659,13 @@ the files listed in @code{org-agenda-text-search-extra-files}. | |||
| 7368 | 7659 | ||
| 7369 | @node Stuck projects, , Search view, Built-in agenda views | 7660 | @node Stuck projects, , Search view, Built-in agenda views |
| 7370 | @subsection Stuck projects | 7661 | @subsection Stuck projects |
| 7662 | @pindex GTD, Getting Things Done | ||
| 7371 | 7663 | ||
| 7372 | If you are following a system like David Allen's GTD to organize your | 7664 | If you are following a system like David Allen's GTD to organize your |
| 7373 | 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 |
| 7374 | 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 |
| 7375 | 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 |
| 7376 | Org-mode produces. During the review, you need to identify such | 7668 | Org mode produces. During the review, you need to identify such |
| 7377 | projects and define next actions for them. | 7669 | projects and define next actions for them. |
| 7378 | 7670 | ||
| 7379 | @table @kbd | 7671 | @table @kbd |
| @@ -7391,7 +7683,7 @@ work for you. The built-in default assumes that all your projects are | |||
| 7391 | 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 |
| 7392 | 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. |
| 7393 | 7685 | ||
| 7394 | 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 |
| 7395 | 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 |
| 7396 | 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 |
| 7397 | 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 |
| @@ -7418,12 +7710,14 @@ will still be searched for stuck projects. | |||
| 7418 | @cindex presentation, of agenda items | 7710 | @cindex presentation, of agenda items |
| 7419 | 7711 | ||
| 7420 | @vindex org-agenda-prefix-format | 7712 | @vindex org-agenda-prefix-format |
| 7421 | Before displaying items in an agenda view, Org-mode visually prepares | 7713 | @vindex org-agenda-tags-column |
| 7422 | the items and sorts them. Each item occupies a single line. The line | 7714 | Before displaying items in an agenda view, Org mode visually prepares the |
| 7423 | starts with a @emph{prefix} that contains the @emph{category} | 7715 | items and sorts them. Each item occupies a single line. The line starts |
| 7424 | (@pxref{Categories}) of the item and other important information. You can | 7716 | with a @emph{prefix} that contains the @emph{category} (@pxref{Categories}) |
| 7425 | customize the prefix using the option @code{org-agenda-prefix-format}. | 7717 | of the item and other important information. You can customize in which |
| 7426 | The prefix is followed by a cleaned-up version of the outline headline | 7718 | column tags will be displayed through @code{org-agenda-tags-column}. You can |
| 7719 | also customize the prefix using the option @code{org-agenda-prefix-format}. | ||
| 7720 | This prefix is followed by a cleaned-up version of the outline headline | ||
| 7427 | associated with the item. | 7721 | associated with the item. |
| 7428 | 7722 | ||
| 7429 | @menu | 7723 | @menu |
| @@ -7470,7 +7764,7 @@ You can set up icons for category by customizing the | |||
| 7470 | @subsection Time-of-day specifications | 7764 | @subsection Time-of-day specifications |
| 7471 | @cindex time-of-day specification | 7765 | @cindex time-of-day specification |
| 7472 | 7766 | ||
| 7473 | 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 |
| 7474 | 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 |
| 7475 | 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 |
| 7476 | ranges can be specified with two timestamps, like | 7770 | ranges can be specified with two timestamps, like |
| @@ -7482,7 +7776,7 @@ plain text (like @samp{12:45} or a @samp{8:30-1pm}). If the agenda | |||
| 7482 | integrates the Emacs diary (@pxref{Weekly/daily agenda}), time | 7776 | integrates the Emacs diary (@pxref{Weekly/daily agenda}), time |
| 7483 | specifications in diary entries are recognized as well. | 7777 | specifications in diary entries are recognized as well. |
| 7484 | 7778 | ||
| 7485 | 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 |
| 7486 | 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 |
| 7487 | the previous paragraphs would end up in the agenda like this: | 7781 | the previous paragraphs would end up in the agenda like this: |
| 7488 | 7782 | ||
| @@ -7608,34 +7902,31 @@ will be followed without a selection prompt. | |||
| 7608 | 7902 | ||
| 7609 | @tsubheading{Change display} | 7903 | @tsubheading{Change display} |
| 7610 | @cindex display changing, in agenda | 7904 | @cindex display changing, in agenda |
| 7905 | @kindex A | ||
| 7906 | @item A | ||
| 7907 | Interactively select another agenda view and append it to the current view. | ||
| 7908 | @c | ||
| 7611 | @kindex o | 7909 | @kindex o |
| 7612 | @item o | 7910 | @item o |
| 7613 | Delete other windows. | 7911 | Delete other windows. |
| 7614 | @c | 7912 | @c |
| 7615 | @c @kindex v d | 7913 | @orgcmdkskc{v d,d,org-agenda-day-view} |
| 7616 | @c @kindex d | 7914 | @xorgcmdkskc{v w,w,org-agenda-day-view} |
| 7617 | @c @kindex v w | ||
| 7618 | @c @kindex w | ||
| 7619 | @c @kindex v m | ||
| 7620 | @c @kindex v y | ||
| 7621 | @c @item v d @ @r{or short} @ d | ||
| 7622 | @c @itemx v w @ @r{or short} @ w | ||
| 7623 | @c @itemx v m | ||
| 7624 | @c @itemx v y | ||
| 7625 | @orgcmdkskc{v d,d,org-aganda-day-view} | ||
| 7626 | @xorgcmdkskc{v w,w,org-aganda-day-view} | ||
| 7627 | @xorgcmd{v m,org-agenda-month-view} | 7915 | @xorgcmd{v m,org-agenda-month-view} |
| 7628 | @xorgcmd{v y,org-agenda-month-year} | 7916 | @xorgcmd{v y,org-agenda-month-year} |
| 7629 | Switch to day/week/month/year view. When switching to day or week view, | 7917 | @xorgcmd{v SPC,org-agenda-reset-view} |
| 7630 | this setting becomes the default for subsequent agenda commands. Since | 7918 | @vindex org-agenda-span |
| 7631 | month and year views are slow to create, they do not become the default. | 7919 | Switch to day/week/month/year view. When switching to day or week view, this |
| 7632 | A numeric prefix argument may be used to jump directly to a specific day | 7920 | setting becomes the default for subsequent agenda refreshes. Since month and |
| 7633 | of the year, ISO week, month, or year, respectively. For example, | 7921 | year views are slow to create, they do not become the default. A numeric |
| 7634 | @kbd{32 d} jumps to February 1st, @kbd{9 w} to ISO week number 9. When | 7922 | prefix argument may be used to jump directly to a specific day of the year, |
| 7635 | setting day, week, or month view, a year may be encoded in the prefix | 7923 | ISO week, month, or year, respectively. For example, @kbd{32 d} jumps to |
| 7636 | argument as well. For example, @kbd{200712 w} will jump to week 12 in | 7924 | February 1st, @kbd{9 w} to ISO week number 9. When setting day, week, or |
| 7637 | 2007. If such a year specification has only one or two digits, it will | 7925 | month view, a year may be encoded in the prefix argument as well. For |
| 7638 | be mapped to the interval 1938-2037. | 7926 | example, @kbd{200712 w} will jump to week 12 in 2007. If such a year |
| 7927 | specification has only one or two digits, it will be mapped to the interval | ||
| 7928 | 1938-2037. @kbd{v @key{SPC}} will reset to what is set in | ||
| 7929 | @code{org-agenda-span}. | ||
| 7639 | @c | 7930 | @c |
| 7640 | @orgcmd{f,org-agenda-later} | 7931 | @orgcmd{f,org-agenda-later} |
| 7641 | Go forward in time to display the following @code{org-agenda-current-span} days. | 7932 | Go forward in time to display the following @code{org-agenda-current-span} days. |
| @@ -7683,14 +7974,25 @@ press @kbd{v a} again. | |||
| 7683 | @c | 7974 | @c |
| 7684 | @orgcmdkskc{v R,R,org-agenda-clockreport-mode} | 7975 | @orgcmdkskc{v R,R,org-agenda-clockreport-mode} |
| 7685 | @vindex org-agenda-start-with-clockreport-mode | 7976 | @vindex org-agenda-start-with-clockreport-mode |
| 7977 | @vindex org-clock-report-include-clocking-task | ||
| 7686 | Toggle Clockreport mode. In Clockreport mode, the daily/weekly agenda will | 7978 | Toggle Clockreport mode. In Clockreport mode, the daily/weekly agenda will |
| 7687 | 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 |
| 7688 | 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 |
| 7689 | agenda buffers can be set with the variable | 7981 | agenda buffers can be set with the variable |
| 7690 | @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 |
| 7691 | 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 |
| 7692 | contributions from entries that are hidden by agenda filtering@footnote{Only | 7984 | contributions from entries that are hidden by agenda filtering@footnote{Only |
| 7693 | 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}. | ||
| 7987 | @c | ||
| 7988 | @orgkey{v c} | ||
| 7989 | @vindex org-agenda-clock-consistency-checks | ||
| 7990 | Show overlapping clock entries, clocking gaps, and other clocking problems in | ||
| 7991 | the current agenda range. You can then visit clocking lines and fix them | ||
| 7992 | manually. See the variable @code{org-agenda-clock-consistency-checks} for | ||
| 7993 | information on how to customize the definition of what constituted a clocking | ||
| 7994 | problem. To return to normal agenda display, press @kbd{l} to exit Logbook | ||
| 7995 | mode. | ||
| 7694 | @c | 7996 | @c |
| 7695 | @orgcmdkskc{v E,E,org-agenda-entry-text-mode} | 7997 | @orgcmdkskc{v E,E,org-agenda-entry-text-mode} |
| 7696 | @vindex org-agenda-start-with-entry-text-mode | 7998 | @vindex org-agenda-start-with-entry-text-mode |
| @@ -7707,13 +8009,13 @@ prefix argument will temporarily modify that number to the prefix value. | |||
| 7707 | Toggle the time grid on and off. See also the variables | 8009 | Toggle the time grid on and off. See also the variables |
| 7708 | @code{org-agenda-use-time-grid} and @code{org-agenda-time-grid}. | 8010 | @code{org-agenda-use-time-grid} and @code{org-agenda-time-grid}. |
| 7709 | @c | 8011 | @c |
| 7710 | @orgcmd{r,org-agenda-rodo} | 8012 | @orgcmd{r,org-agenda-redo} |
| 7711 | Recreate the agenda buffer, for example to reflect the changes after | 8013 | Recreate the agenda buffer, for example to reflect the changes after |
| 7712 | modification of the timestamps of items with @kbd{S-@key{left}} and | 8014 | modification of the timestamps of items with @kbd{S-@key{left}} and |
| 7713 | @kbd{S-@key{right}}. When the buffer is the global TODO list, a prefix | 8015 | @kbd{S-@key{right}}. When the buffer is the global TODO list, a prefix |
| 7714 | argument is interpreted to create a selective list for a specific TODO | 8016 | argument is interpreted to create a selective list for a specific TODO |
| 7715 | keyword. | 8017 | keyword. |
| 7716 | @orgcmd{g,org-agenda-rodo} | 8018 | @orgcmd{g,org-agenda-redo} |
| 7717 | Same as @kbd{r}. | 8019 | Same as @kbd{r}. |
| 7718 | @c | 8020 | @c |
| 7719 | @orgcmdkskc{C-x C-s,s,org-save-all-org-buffers} | 8021 | @orgcmdkskc{C-x C-s,s,org-save-all-org-buffers} |
| @@ -7734,18 +8036,27 @@ Remove the restriction lock on the agenda, if it is currently restricted to a | |||
| 7734 | file or subtree (@pxref{Agenda files}). | 8036 | file or subtree (@pxref{Agenda files}). |
| 7735 | 8037 | ||
| 7736 | @tsubheading{Secondary filtering and query editing} | 8038 | @tsubheading{Secondary filtering and query editing} |
| 7737 | @cindex filtering, by tag and effort, in agenda | 8039 | @cindex filtering, by tag category and effort, in agenda |
| 7738 | @cindex tag filtering, in agenda | 8040 | @cindex tag filtering, in agenda |
| 8041 | @cindex category filtering, in agenda | ||
| 7739 | @cindex effort filtering, in agenda | 8042 | @cindex effort filtering, in agenda |
| 7740 | @cindex query editing, in agenda | 8043 | @cindex query editing, in agenda |
| 7741 | 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 | |||
| 7742 | @orgcmd{/,org-agenda-filter-by-tag} | 8053 | @orgcmd{/,org-agenda-filter-by-tag} |
| 7743 | @vindex org-agenda-filter-preset | 8054 | @vindex org-agenda-tag-filter-preset |
| 7744 | 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. |
| 7745 | 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 |
| 7746 | 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 |
| 7747 | 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 |
| 7748 | 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 |
| 7749 | 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 |
| 7750 | 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 |
| 7751 | 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 |
| @@ -7806,7 +8117,7 @@ Internet, and outside of business hours, with something like this: | |||
| 7806 | @end group | 8117 | @end group |
| 7807 | @end lisp | 8118 | @end lisp |
| 7808 | 8119 | ||
| 7809 | @orgcmd{\,org-agenda-filter-by-tag-refine} | 8120 | @orgcmd{\\,org-agenda-filter-by-tag-refine} |
| 7810 | Narrow the current agenda filter by an additional condition. When called with | 8121 | Narrow the current agenda filter by an additional condition. When called with |
| 7811 | prefix arg, remove the entries that @emph{do} have the tag, or that do match | 8122 | prefix arg, remove the entries that @emph{do} have the tag, or that do match |
| 7812 | the effort criterion. You can achieve the same effect by pressing @kbd{+} or | 8123 | the effort criterion. You can achieve the same effect by pressing @kbd{+} or |
| @@ -7889,8 +8200,8 @@ agenda, change a tag for all headings in the region. | |||
| 7889 | @kindex , | 8200 | @kindex , |
| 7890 | @item , | 8201 | @item , |
| 7891 | Set the priority for the current item (@command{org-agenda-priority}). | 8202 | Set the priority for the current item (@command{org-agenda-priority}). |
| 7892 | Org-mode prompts for the priority character. If you reply with @key{SPC}, the | 8203 | Org mode prompts for the priority character. If you reply with @key{SPC}, |
| 7893 | priority cookie is removed from the entry. | 8204 | the priority cookie is removed from the entry. |
| 7894 | @c | 8205 | @c |
| 7895 | @orgcmd{P,org-agenda-show-priority} | 8206 | @orgcmd{P,org-agenda-show-priority} |
| 7896 | Display weighted priority of current item. | 8207 | Display weighted priority of current item. |
| @@ -7935,13 +8246,15 @@ command. | |||
| 7935 | @c | 8246 | @c |
| 7936 | @orgcmd{S-@key{right},org-agenda-do-date-later} | 8247 | @orgcmd{S-@key{right},org-agenda-do-date-later} |
| 7937 | 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 |
| 7938 | 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 |
| 7939 | example, @kbd{3 6 5 S-@key{right}} will change it by a year. With a | 8250 | it to today.@* |
| 7940 | @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, |
| 7941 | 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, |
| 7942 | 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 |
| 7943 | 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 |
| 7944 | 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. | ||
| 7945 | @c | 8258 | @c |
| 7946 | @orgcmd{S-@key{left},org-agenda-do-date-earlier} | 8259 | @orgcmd{S-@key{left},org-agenda-do-date-earlier} |
| 7947 | Change the timestamp associated with the current line by one day | 8260 | Change the timestamp associated with the current line by one day |
| @@ -7971,6 +8284,9 @@ Jump to the running clock in another window. | |||
| 7971 | Mark the entry at point for bulk action. With prefix arg, mark that many | 8284 | Mark the entry at point for bulk action. With prefix arg, mark that many |
| 7972 | successive entries. | 8285 | successive entries. |
| 7973 | @c | 8286 | @c |
| 8287 | @orgcmd{%,org-agenda-bulk-mark-regexp} | ||
| 8288 | Mark entries matching a regular expression for bulk action. | ||
| 8289 | @c | ||
| 7974 | @orgcmd{u,org-agenda-bulk-unmark} | 8290 | @orgcmd{u,org-agenda-bulk-unmark} |
| 7975 | Unmark entry for bulk action. | 8291 | Unmark entry for bulk action. |
| 7976 | @c | 8292 | @c |
| @@ -7989,15 +8305,30 @@ $ @r{Archive all selected entries.} | |||
| 7989 | A @r{Archive entries by moving them to their respective archive siblings.} | 8305 | A @r{Archive entries by moving them to their respective archive siblings.} |
| 7990 | t @r{Change TODO state. This prompts for a single TODO keyword and} | 8306 | t @r{Change TODO state. This prompts for a single TODO keyword and} |
| 7991 | @r{changes the state of all selected entries, bypassing blocking and} | 8307 | @r{changes the state of all selected entries, bypassing blocking and} |
| 7992 | @r{suppressing logging notes (but not time stamps).} | 8308 | @r{suppressing logging notes (but not timestamps).} |
| 7993 | + @r{Add a tag to all selected entries.} | 8309 | + @r{Add a tag to all selected entries.} |
| 7994 | - @r{Remove a tag from all selected entries.} | 8310 | - @r{Remove a tag from all selected entries.} |
| 7995 | s @r{Schedule all items to a new date. To shift existing schedule dates} | 8311 | s @r{Schedule all items to a new date. To shift existing schedule dates} |
| 7996 | @r{by a fixed number of days, use something starting with double plus} | 8312 | @r{by a fixed number of days, use something starting with double plus} |
| 7997 | @r{at the prompt, for example @samp{++8d} or @samp{++2w}.} | 8313 | @r{at the prompt, for example @samp{++8d} or @samp{++2w}.} |
| 7998 | S @r{Reschedule randomly by N days. N will be prompted for. With prefix} | 8314 | S @r{Reschedule randomly into the coming N days. N will be prompted for.} |
| 7999 | @r{arg (@kbd{C-u B S}), scatter only accross weekdays.} | 8315 | @r{With prefix arg (@kbd{C-u B S}), scatter only across weekdays.} |
| 8000 | d @r{Set deadline to a specific date.} | 8316 | d @r{Set deadline to a specific date.} |
| 8317 | f @r{Apply a function to marked entries.} | ||
| 8318 | @r{For example, the function below sets the CATEGORY property of the} | ||
| 8319 | @r{entries to web.} | ||
| 8320 | @r{(defun set-category ()} | ||
| 8321 | @r{ (interactive "P")} | ||
| 8322 | @r{ (let* ((marker (or (org-get-at-bol 'org-hd-marker)} | ||
| 8323 | @r{ (org-agenda-error)))} | ||
| 8324 | @r{ (buffer (marker-buffer marker)))} | ||
| 8325 | @r{ (with-current-buffer buffer} | ||
| 8326 | @r{ (save-excursion} | ||
| 8327 | @r{ (save-restriction} | ||
| 8328 | @r{ (widen)} | ||
| 8329 | @r{ (goto-char marker)} | ||
| 8330 | @r{ (org-back-to-heading t)} | ||
| 8331 | @r{ (org-set-property "CATEGORY" "web"))))))} | ||
| 8001 | @end example | 8332 | @end example |
| 8002 | 8333 | ||
| 8003 | 8334 | ||
| @@ -8008,7 +8339,7 @@ d @r{Set deadline to a specific date.} | |||
| 8008 | 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. |
| 8009 | @c | 8340 | @c |
| 8010 | @orgcmd{c,org-calendar-goto-agenda} | 8341 | @orgcmd{c,org-calendar-goto-agenda} |
| 8011 | 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 |
| 8012 | date at the cursor. | 8343 | date at the cursor. |
| 8013 | @c | 8344 | @c |
| 8014 | @cindex diary entries, creating from agenda | 8345 | @cindex diary entries, creating from agenda |
| @@ -8021,8 +8352,8 @@ file@footnote{This file is parsed for the agenda when | |||
| 8021 | 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 |
| 8022 | you can add the entry. | 8353 | you can add the entry. |
| 8023 | 8354 | ||
| 8024 | 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, |
| 8025 | 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 |
| 8026 | 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 |
| 8027 | 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 |
| 8028 | 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 |
| @@ -8198,7 +8529,7 @@ command @kbd{C-c a o} provides a similar view for office tasks. | |||
| 8198 | @cindex options, for custom agenda views | 8529 | @cindex options, for custom agenda views |
| 8199 | 8530 | ||
| 8200 | @vindex org-agenda-custom-commands | 8531 | @vindex org-agenda-custom-commands |
| 8201 | Org-mode contains a number of variables regulating agenda construction | 8532 | Org mode contains a number of variables regulating agenda construction |
| 8202 | and display. The global variables define the behavior for all agenda | 8533 | and display. The global variables define the behavior for all agenda |
| 8203 | commands, including the custom commands. However, if you want to change | 8534 | commands, including the custom commands. However, if you want to change |
| 8204 | 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 |
| @@ -8270,11 +8601,11 @@ yourself. | |||
| 8270 | @cindex agenda views, exporting | 8601 | @cindex agenda views, exporting |
| 8271 | 8602 | ||
| 8272 | 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 |
| 8273 | 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 |
| 8274 | 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 |
| 8275 | @file{htmlize.el}.}, Postscript, PDF@footnote{To create PDF output, the | 8606 | @file{htmlize.el}.}, Postscript, PDF@footnote{To create PDF output, the |
| 8276 | ghostscript @file{ps2pdf} utility must be installed on the system. Selecting | 8607 | ghostscript @file{ps2pdf} utility must be installed on the system. Selecting |
| 8277 | a PDF file with also create the postscript file.}, and iCalendar files. If | 8608 | a PDF file will also create the postscript file.}, and iCalendar files. If |
| 8278 | you want to do this only occasionally, use the command | 8609 | you want to do this only occasionally, use the command |
| 8279 | 8610 | ||
| 8280 | @table @kbd | 8611 | @table @kbd |
| @@ -8334,7 +8665,7 @@ or absolute. | |||
| 8334 | @end lisp | 8665 | @end lisp |
| 8335 | 8666 | ||
| 8336 | 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 |
| 8337 | @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 |
| 8338 | 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 |
| 8339 | @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 |
| 8340 | Postscript output. If the extension is @file{.ics}, iCalendar export is | 8671 | Postscript output. If the extension is @file{.ics}, iCalendar export is |
| @@ -8381,14 +8712,14 @@ in @code{org-agenda-custom-commands} take precedence. | |||
| 8381 | @noindent | 8712 | @noindent |
| 8382 | From the command line you may also use | 8713 | From the command line you may also use |
| 8383 | @example | 8714 | @example |
| 8384 | emacs -f org-batch-store-agenda-views -kill | 8715 | emacs -eval (org-batch-store-agenda-views) -kill |
| 8385 | @end example | 8716 | @end example |
| 8386 | @noindent | 8717 | @noindent |
| 8387 | 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 |
| 8388 | system you use, please check the FAQ for examples.} | 8719 | system you use, please check the FAQ for examples.} |
| 8389 | @example | 8720 | @example |
| 8390 | emacs -eval '(org-batch-store-agenda-views \ | 8721 | emacs -eval '(org-batch-store-agenda-views \ |
| 8391 | org-agenda-span month \ | 8722 | org-agenda-span (quote month) \ |
| 8392 | org-agenda-start-day "2007-11-01" \ | 8723 | org-agenda-start-day "2007-11-01" \ |
| 8393 | org-agenda-include-diary nil \ | 8724 | org-agenda-include-diary nil \ |
| 8394 | org-agenda-files (quote ("~/org/project.org")))' \ | 8725 | org-agenda-files (quote ("~/org/project.org")))' \ |
| @@ -8430,7 +8761,7 @@ This causes the following issues: | |||
| 8430 | Org needs to make a decision which @code{COLUMNS} format to use. Since the | 8761 | Org needs to make a decision which @code{COLUMNS} format to use. Since the |
| 8431 | entries in the agenda are collected from different files, and different files | 8762 | entries in the agenda are collected from different files, and different files |
| 8432 | may have different @code{COLUMNS} formats, this is a non-trivial problem. | 8763 | may have different @code{COLUMNS} formats, this is a non-trivial problem. |
| 8433 | Org first checks if the variable @code{org-overriding-columns-format} is | 8764 | Org first checks if the variable @code{org-agenda-overriding-columns-format} is |
| 8434 | currently set, and if so, takes the format from there. Otherwise it takes | 8765 | currently set, and if so, takes the format from there. Otherwise it takes |
| 8435 | the format associated with the first item in the agenda, or, if that item | 8766 | the format associated with the first item in the agenda, or, if that item |
| 8436 | does not have a specific format (defined in a property, or in its file), it | 8767 | does not have a specific format (defined in a property, or in its file), it |
| @@ -8463,11 +8794,11 @@ the agenda). | |||
| 8463 | @node Markup, Exporting, Agenda Views, Top | 8794 | @node Markup, Exporting, Agenda Views, Top |
| 8464 | @chapter Markup for rich export | 8795 | @chapter Markup for rich export |
| 8465 | 8796 | ||
| 8466 | When exporting Org-mode documents, the exporter tries to reflect the | 8797 | When exporting Org mode documents, the exporter tries to reflect the |
| 8467 | 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 |
| 8468 | export targets like HTML, @LaTeX{}, or DocBook allow much richer formatting, | 8799 | export targets like HTML, @LaTeX{}, or DocBook allow much richer formatting, |
| 8469 | 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 |
| 8470 | summarizes the markup rules used in an Org-mode buffer. | 8801 | summarizes the markup rules used in an Org mode buffer. |
| 8471 | 8802 | ||
| 8472 | @menu | 8803 | @menu |
| 8473 | * Structural markup elements:: The basic structure as seen by the exporter | 8804 | * Structural markup elements:: The basic structure as seen by the exporter |
| @@ -8476,7 +8807,7 @@ summarizes the markup rules used in an Org-mode buffer. | |||
| 8476 | * Include files:: Include additional files into a document | 8807 | * Include files:: Include additional files into a document |
| 8477 | * Index entries:: Making an index | 8808 | * Index entries:: Making an index |
| 8478 | * Macro replacement:: Use macros to create complex output | 8809 | * Macro replacement:: Use macros to create complex output |
| 8479 | * Embedded LaTeX:: LaTeX can be freely used inside Org documents | 8810 | * Embedded @LaTeX{}:: LaTeX can be freely used inside Org documents |
| 8480 | @end menu | 8811 | @end menu |
| 8481 | 8812 | ||
| 8482 | @node Structural markup elements, Images and tables, Markup, Markup | 8813 | @node Structural markup elements, Images and tables, Markup, Markup |
| @@ -8559,7 +8890,7 @@ the table of contents entirely, by configuring the variable | |||
| 8559 | @cindex text before first headline, markup rules | 8890 | @cindex text before first headline, markup rules |
| 8560 | @cindex #+TEXT | 8891 | @cindex #+TEXT |
| 8561 | 8892 | ||
| 8562 | 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 |
| 8563 | 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 |
| 8564 | 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 |
| 8565 | constructs described below in the sections for the individual exporters. | 8896 | constructs described below in the sections for the individual exporters. |
| @@ -8579,7 +8910,7 @@ If you still want to have some text before the first headline, use the | |||
| 8579 | #+OPTIONS: skip:t | 8910 | #+OPTIONS: skip:t |
| 8580 | #+TEXT: This text will go before the *first* headline. | 8911 | #+TEXT: This text will go before the *first* headline. |
| 8581 | #+TEXT: [TABLE-OF-CONTENTS] | 8912 | #+TEXT: [TABLE-OF-CONTENTS] |
| 8582 | #+TEXT: This goes between the table of contents and the first headline | 8913 | #+TEXT: This goes between the table of contents and the *first* headline |
| 8583 | @end example | 8914 | @end example |
| 8584 | 8915 | ||
| 8585 | @node Lists, Paragraphs, Initial text, Structural markup elements | 8916 | @node Lists, Paragraphs, Initial text, Structural markup elements |
| @@ -8613,7 +8944,7 @@ can use this construct, which can also be used to format poetry. | |||
| 8613 | 8944 | ||
| 8614 | 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 |
| 8615 | 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 |
| 8616 | can include quotations in Org-mode documents like this: | 8947 | can include quotations in Org mode documents like this: |
| 8617 | 8948 | ||
| 8618 | @cindex #+BEGIN_QUOTE | 8949 | @cindex #+BEGIN_QUOTE |
| 8619 | @example | 8950 | @example |
| @@ -8638,9 +8969,9 @@ but not any simpler | |||
| 8638 | @cindex footnotes, markup rules | 8969 | @cindex footnotes, markup rules |
| 8639 | @cindex @file{footnote.el} | 8970 | @cindex @file{footnote.el} |
| 8640 | 8971 | ||
| 8641 | Footnotes defined in the way described in @ref{Footnotes}, will be exported by | 8972 | Footnotes defined in the way described in @ref{Footnotes}, will be exported |
| 8642 | all backends. Org allows multiple references to the same note, and | 8973 | by all backends. Org allows multiple references to the same note, and |
| 8643 | different backends support this to varying degrees. | 8974 | multiple footnotes side by side. |
| 8644 | 8975 | ||
| 8645 | @node Emphasis and monospace, Horizontal rules, Footnote markup, Structural markup elements | 8976 | @node Emphasis and monospace, Horizontal rules, Footnote markup, Structural markup elements |
| 8646 | @subheading Emphasis and monospace | 8977 | @subheading Emphasis and monospace |
| @@ -8653,14 +8984,14 @@ different backends support this to varying degrees. | |||
| 8653 | @cindex strike-through text, markup rules | 8984 | @cindex strike-through text, markup rules |
| 8654 | You can make words @b{*bold*}, @i{/italic/}, _underlined_, @code{=code=} | 8985 | You can make words @b{*bold*}, @i{/italic/}, _underlined_, @code{=code=} |
| 8655 | and @code{~verbatim~}, and, if you must, @samp{+strike-through+}. Text | 8986 | and @code{~verbatim~}, and, if you must, @samp{+strike-through+}. Text |
| 8656 | 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 |
| 8657 | syntax; it is exported verbatim. | 8988 | syntax; it is exported verbatim. |
| 8658 | 8989 | ||
| 8659 | @node Horizontal rules, Comment lines, Emphasis and monospace, Structural markup elements | 8990 | @node Horizontal rules, Comment lines, Emphasis and monospace, Structural markup elements |
| 8660 | @subheading Horizontal rules | 8991 | @subheading Horizontal rules |
| 8661 | @cindex horizontal rules, markup rules | 8992 | @cindex horizontal rules, markup rules |
| 8662 | A line consisting of only dashes, and at least 5 of them, will be | 8993 | A line consisting of only dashes, and at least 5 of them, will be exported as |
| 8663 | exported as a horizontal line (@samp{<hr/>} in HTML). | 8994 | a horizontal line (@samp{<hr/>} in HTML and @code{\hrule} in @LaTeX{}). |
| 8664 | 8995 | ||
| 8665 | @node Comment lines, , Horizontal rules, Structural markup elements | 8996 | @node Comment lines, , Horizontal rules, Structural markup elements |
| 8666 | @subheading Comment lines | 8997 | @subheading Comment lines |
| @@ -8669,7 +9000,7 @@ exported as a horizontal line (@samp{<hr/>} in HTML). | |||
| 8669 | @cindex #+BEGIN_COMMENT | 9000 | @cindex #+BEGIN_COMMENT |
| 8670 | 9001 | ||
| 8671 | Lines starting with @samp{#} in column zero are treated as comments and will | 9002 | Lines starting with @samp{#} in column zero are treated as comments and will |
| 8672 | never be exported. If you want an indented line to be treated as a comment, | 9003 | never be exported. If you want an indented line to be treated as a comment, |
| 8673 | start it with @samp{#+ }. Also entire subtrees starting with the word | 9004 | start it with @samp{#+ }. Also entire subtrees starting with the word |
| 8674 | @samp{COMMENT} will never be exported. Finally, regions surrounded by | 9005 | @samp{COMMENT} will never be exported. Finally, regions surrounded by |
| 8675 | @samp{#+BEGIN_COMMENT} ... @samp{#+END_COMMENT} will not be exported. | 9006 | @samp{#+BEGIN_COMMENT} ... @samp{#+END_COMMENT} will not be exported. |
| @@ -8687,8 +9018,8 @@ Toggle the COMMENT keyword at the beginning of an entry. | |||
| 8687 | @cindex tables, markup rules | 9018 | @cindex tables, markup rules |
| 8688 | @cindex #+CAPTION | 9019 | @cindex #+CAPTION |
| 8689 | @cindex #+LABEL | 9020 | @cindex #+LABEL |
| 8690 | 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 |
| 8691 | 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, |
| 8692 | 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 |
| 8693 | 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 |
| 8694 | 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 |
| @@ -8701,6 +9032,11 @@ the object with @code{\ref@{tab:basic-data@}}: | |||
| 8701 | |-----|----| | 9032 | |-----|----| |
| 8702 | @end example | 9033 | @end example |
| 8703 | 9034 | ||
| 9035 | Optionally, the caption can take the form: | ||
| 9036 | @example | ||
| 9037 | #+CAPTION: [Caption for list of figures]@{Caption for table (or link).@} | ||
| 9038 | @end example | ||
| 9039 | |||
| 8704 | @cindex inlined images, markup rules | 9040 | @cindex inlined images, markup rules |
| 8705 | Some backends (HTML, @LaTeX{}, and DocBook) allow you to directly include | 9041 | Some backends (HTML, @LaTeX{}, and DocBook) allow you to directly include |
| 8706 | images into the exported document. Org does this, if a link to an image | 9042 | images into the exported document. Org does this, if a link to an image |
| @@ -8753,22 +9089,25 @@ If the example is source code from a programming language, or any other text | |||
| 8753 | 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 |
| 8754 | look like the fontified Emacs buffer@footnote{This works automatically for | 9090 | look like the fontified Emacs buffer@footnote{This works automatically for |
| 8755 | 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, |
| 8756 | 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 |
| 8757 | achieved using either the listings or the | 9093 | achieved using either the listings or the |
| 8758 | @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 |
| 8759 | 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 |
| 8760 | package is included by the LaTeX header (e.g. by configuring | 9096 | package is included by the @LaTeX{} header (e.g.@: by configuring |
| 8761 | @code{org-export-latex-packages-alist}). See the listings documentation for | 9097 | @code{org-export-latex-packages-alist}). See the listings documentation for |
| 8762 | configuration options, including obtaining colored output. For minted it is | 9098 | configuration options, including obtaining colored output. For minted it is |
| 8763 | necessary to install the program @url{http://pygments.org, pygments}, in | 9099 | necessary to install the program @url{http://pygments.org, pygments}, in |
| 8764 | 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 |
| 8765 | package is included by the LaTeX header, and ensuring that the | 9101 | package is included by the @LaTeX{} header, and ensuring that the |
| 8766 | @code{-shell-escape} option is passed to @file{pdflatex} (see | 9102 | @code{-shell-escape} option is passed to @file{pdflatex} (see |
| 8767 | @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 |
| 8768 | @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 |
| 8769 | further details.}. This is done with the @samp{src} block, where you also | 9105 | further details.}. This is done with the @samp{src} block, where you also |
| 8770 | 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 |
| 8771 | example: | 9107 | example@footnote{Code in @samp{src} blocks may also be evaluated either |
| 9108 | interactively or on export. See @pxref{Working With Source Code} for more | ||
| 9109 | information on evaluating code blocks.}, see @ref{Easy Templates} for | ||
| 9110 | shortcuts to easily insert code blocks. | ||
| 8772 | @cindex #+BEGIN_SRC | 9111 | @cindex #+BEGIN_SRC |
| 8773 | 9112 | ||
| 8774 | @example | 9113 | @example |
| @@ -8784,7 +9123,7 @@ switch to the end of the @code{BEGIN} line, to get the lines of the example | |||
| 8784 | numbered. If you use a @code{+n} switch, the numbering from the previous | 9123 | numbered. If you use a @code{+n} switch, the numbering from the previous |
| 8785 | numbered snippet will be continued in the current one. In literal examples, | 9124 | numbered snippet will be continued in the current one. In literal examples, |
| 8786 | Org will interpret strings like @samp{(ref:name)} as labels, and use them as | 9125 | Org will interpret strings like @samp{(ref:name)} as labels, and use them as |
| 8787 | targets for special hyperlinks like @code{[[(name)]]} (i.e. the reference name | 9126 | targets for special hyperlinks like @code{[[(name)]]} (i.e.@: the reference name |
| 8788 | enclosed in single parenthesis). In HTML, hovering the mouse over such a | 9127 | enclosed in single parenthesis). In HTML, hovering the mouse over such a |
| 8789 | link will remote-highlight the corresponding code line, which is kind of | 9128 | link will remote-highlight the corresponding code line, which is kind of |
| 8790 | cool. | 9129 | cool. |
| @@ -8792,7 +9131,7 @@ cool. | |||
| 8792 | 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 |
| 8793 | 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 |
| 8794 | 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 |
| 8795 | 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} |
| 8796 | 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 |
| 8797 | 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. |
| 8798 | Here is an example: | 9137 | Here is an example: |
| @@ -8811,8 +9150,12 @@ If the syntax for the label format conflicts with the language syntax, use a | |||
| 8811 | @code{-l} switch to change the format, for example @samp{#+BEGIN_SRC pascal | 9150 | @code{-l} switch to change the format, for example @samp{#+BEGIN_SRC pascal |
| 8812 | -n -r -l "((%s))"}. See also the variable @code{org-coderef-label-format}. | 9151 | -n -r -l "((%s))"}. See also the variable @code{org-coderef-label-format}. |
| 8813 | 9152 | ||
| 8814 | HTML export also allows examples to be published as text areas, @xref{Text | 9153 | HTML export also allows examples to be published as text areas (@pxref{Text |
| 8815 | areas in HTML export}. | 9154 | areas in HTML export}). |
| 9155 | |||
| 9156 | Because the @code{#+BEGIN_...} and @code{#+END_...} patterns need to be added | ||
| 9157 | so often, shortcuts are provided using the Easy Templates facility | ||
| 9158 | (@pxref{Easy Templates}). | ||
| 8816 | 9159 | ||
| 8817 | @table @kbd | 9160 | @table @kbd |
| 8818 | @kindex C-c ' | 9161 | @kindex C-c ' |
| @@ -8851,14 +9194,14 @@ include your @file{.emacs} file, you could use: | |||
| 8851 | #+INCLUDE: "~/.emacs" src emacs-lisp | 9194 | #+INCLUDE: "~/.emacs" src emacs-lisp |
| 8852 | @end example | 9195 | @end example |
| 8853 | @noindent | 9196 | @noindent |
| 8854 | 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}, |
| 8855 | @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 |
| 8856 | 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 |
| 8857 | 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 |
| 8858 | processed normally. The include line will also allow additional keyword | 9201 | processed normally. The include line will also allow additional keyword |
| 8859 | parameters @code{:prefix1} and @code{:prefix} to specify prefixes for the | 9202 | parameters @code{:prefix1} and @code{:prefix} to specify prefixes for the |
| 8860 | 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 |
| 8861 | 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 |
| 8862 | 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, |
| 8863 | use | 9206 | use |
| 8864 | 9207 | ||
| @@ -8866,6 +9209,17 @@ use | |||
| 8866 | #+INCLUDE: "~/snippets/xx" :prefix1 " + " :prefix " " | 9209 | #+INCLUDE: "~/snippets/xx" :prefix1 " + " :prefix " " |
| 8867 | @end example | 9210 | @end example |
| 8868 | 9211 | ||
| 9212 | You can also include a portion of a file by specifying a lines range using | ||
| 9213 | the @code{:lines} parameter. The line at the upper end of the range will not | ||
| 9214 | be included. The start and/or the end of the range may be omitted to use the | ||
| 9215 | obvious defaults. | ||
| 9216 | |||
| 9217 | @example | ||
| 9218 | #+INCLUDE: "~/.emacs" :lines "5-10" @r{Include lines 5 to 10, 10 excluded} | ||
| 9219 | #+INCLUDE: "~/.emacs" :lines "-10" @r{Include lines 1 to 10, 10 excluded} | ||
| 9220 | #+INCLUDE: "~/.emacs" :lines "10-" @r{Include lines from 10 to EOF} | ||
| 9221 | @end example | ||
| 9222 | |||
| 8869 | @table @kbd | 9223 | @table @kbd |
| 8870 | @kindex C-c ' | 9224 | @kindex C-c ' |
| 8871 | @item C-c ' | 9225 | @item C-c ' |
| @@ -8890,7 +9244,7 @@ an index} for more information. | |||
| 8890 | 9244 | ||
| 8891 | 9245 | ||
| 8892 | 9246 | ||
| 8893 | @node Macro replacement, Embedded LaTeX, Index entries, Markup | 9247 | @node Macro replacement, Embedded @LaTeX{}, Index entries, Markup |
| 8894 | @section Macro replacement | 9248 | @section Macro replacement |
| 8895 | @cindex macro replacement, during export | 9249 | @cindex macro replacement, during export |
| 8896 | @cindex #+MACRO | 9250 | @cindex #+MACRO |
| @@ -8915,7 +9269,7 @@ Macro expansion takes place during export, and some people use it to | |||
| 8915 | construct complex HTML code. | 9269 | construct complex HTML code. |
| 8916 | 9270 | ||
| 8917 | 9271 | ||
| 8918 | @node Embedded LaTeX, , Macro replacement, Markup | 9272 | @node Embedded @LaTeX{}, , Macro replacement, Markup |
| 8919 | @section Embedded @LaTeX{} | 9273 | @section Embedded @LaTeX{} |
| 8920 | @cindex @TeX{} interpretation | 9274 | @cindex @TeX{} interpretation |
| 8921 | @cindex @LaTeX{} interpretation | 9275 | @cindex @LaTeX{} interpretation |
| @@ -8925,7 +9279,7 @@ include scientific notes, which often require mathematical symbols and the | |||
| 8925 | occasional formula. @LaTeX{}@footnote{@LaTeX{} is a macro system based on | 9279 | occasional formula. @LaTeX{}@footnote{@LaTeX{} is a macro system based on |
| 8926 | 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 |
| 8927 | ``@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 |
| 8928 | distinction.} is widely used to typeset scientific documents. Org-mode | 9282 | distinction.} is widely used to typeset scientific documents. Org mode |
| 8929 | supports embedding @LaTeX{} code into its files, because many academics are | 9283 | supports embedding @LaTeX{} code into its files, because many academics are |
| 8930 | 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 |
| 8931 | 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. |
| @@ -8933,12 +9287,12 @@ readily processed to produce pretty output for a number of export backends. | |||
| 8933 | @menu | 9287 | @menu |
| 8934 | * Special symbols:: Greek letters and other symbols | 9288 | * Special symbols:: Greek letters and other symbols |
| 8935 | * Subscripts and superscripts:: Simple syntax for raising/lowering text | 9289 | * Subscripts and superscripts:: Simple syntax for raising/lowering text |
| 8936 | * LaTeX fragments:: Complex formulas made easy | 9290 | * @LaTeX{} fragments:: Complex formulas made easy |
| 8937 | * Previewing LaTeX fragments:: What will this snippet look like? | 9291 | * Previewing @LaTeX{} fragments:: What will this snippet look like? |
| 8938 | * CDLaTeX mode:: Speed up entering of formulas | 9292 | * CDLaTeX mode:: Speed up entering of formulas |
| 8939 | @end menu | 9293 | @end menu |
| 8940 | 9294 | ||
| 8941 | @node Special symbols, Subscripts and superscripts, Embedded LaTeX, Embedded LaTeX | 9295 | @node Special symbols, Subscripts and superscripts, Embedded @LaTeX{}, Embedded @LaTeX{} |
| 8942 | @subsection Special symbols | 9296 | @subsection Special symbols |
| 8943 | @cindex math symbols | 9297 | @cindex math symbols |
| 8944 | @cindex special symbols | 9298 | @cindex special symbols |
| @@ -8951,7 +9305,7 @@ You can use @LaTeX{} macros to insert special symbols like @samp{\alpha} to | |||
| 8951 | 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 |
| 8952 | 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, |
| 8953 | 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{} |
| 8954 | 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 |
| 8955 | delimiters, for example: | 9309 | delimiters, for example: |
| 8956 | 9310 | ||
| 8957 | @example | 9311 | @example |
| @@ -8985,7 +9339,7 @@ buffer content which remains plain ASCII, but it overlays the UTF-8 character | |||
| 8985 | for display purposes only. | 9339 | for display purposes only. |
| 8986 | @end table | 9340 | @end table |
| 8987 | 9341 | ||
| 8988 | @node Subscripts and superscripts, LaTeX fragments, Special symbols, Embedded LaTeX | 9342 | @node Subscripts and superscripts, @LaTeX{} fragments, Special symbols, Embedded @LaTeX{} |
| 8989 | @subsection Subscripts and superscripts | 9343 | @subsection Subscripts and superscripts |
| 8990 | @cindex subscript | 9344 | @cindex subscript |
| 8991 | @cindex superscript | 9345 | @cindex superscript |
| @@ -9023,13 +9377,13 @@ In addition to showing entities as UTF-8 characters, this command will also | |||
| 9023 | format sub- and superscripts in a WYSIWYM way. | 9377 | format sub- and superscripts in a WYSIWYM way. |
| 9024 | @end table | 9378 | @end table |
| 9025 | 9379 | ||
| 9026 | @node LaTeX fragments, Previewing LaTeX fragments, Subscripts and superscripts, Embedded LaTeX | 9380 | @node @LaTeX{} fragments, Previewing @LaTeX{} fragments, Subscripts and superscripts, Embedded @LaTeX{} |
| 9027 | @subsection @LaTeX{} fragments | 9381 | @subsection @LaTeX{} fragments |
| 9028 | @cindex @LaTeX{} fragments | 9382 | @cindex @LaTeX{} fragments |
| 9029 | 9383 | ||
| 9030 | @vindex org-format-latex-header | 9384 | @vindex org-format-latex-header |
| 9031 | 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 |
| 9032 | 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 |
| 9033 | to process these for several export backends. When exporting to @LaTeX{}, | 9387 | to process these for several export backends. When exporting to @LaTeX{}, |
| 9034 | 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 |
| 9035 | @uref{http://www.mathjax.org, MathJax library} (@pxref{Math formatting in | 9389 | @uref{http://www.mathjax.org, MathJax library} (@pxref{Math formatting in |
| @@ -9038,7 +9392,7 @@ this regularly or on pages with significant page views, you should install | |||
| 9038 | @file{MathJax} on your own | 9392 | @file{MathJax} on your own |
| 9039 | server in order to limit the load of our server.}. Finally, it can also | 9393 | server in order to limit the load of our server.}. Finally, it can also |
| 9040 | process the mathematical expressions into images@footnote{For this to work | 9394 | process the mathematical expressions into images@footnote{For this to work |
| 9041 | you need to be on a system with a working @LaTeX{} installation. You also | 9395 | you need to be on a system with a working @LaTeX{} installation. You also |
| 9042 | need the @file{dvipng} program, available at | 9396 | need the @file{dvipng} program, available at |
| 9043 | @url{http://sourceforge.net/projects/dvipng/}. The @LaTeX{} header that will | 9397 | @url{http://sourceforge.net/projects/dvipng/}. The @LaTeX{} header that will |
| 9044 | be used when processing a fragment can be configured with the variable | 9398 | be used when processing a fragment can be configured with the variable |
| @@ -9082,10 +9436,10 @@ can configure the option @code{org-format-latex-options} to deselect the | |||
| 9082 | 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. |
| 9083 | 9437 | ||
| 9084 | @vindex org-export-with-LaTeX-fragments | 9438 | @vindex org-export-with-LaTeX-fragments |
| 9085 | LaTeX processing can be configured with the variable | 9439 | @LaTeX{} processing can be configured with the variable |
| 9086 | @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} |
| 9087 | 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 |
| 9088 | 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 |
| 9089 | of these lines: | 9443 | of these lines: |
| 9090 | 9444 | ||
| 9091 | @example | 9445 | @example |
| @@ -9095,9 +9449,9 @@ of these lines: | |||
| 9095 | #+OPTIONS: LaTeX:verbatim @r{Verbatim export, for jsMath or so} | 9449 | #+OPTIONS: LaTeX:verbatim @r{Verbatim export, for jsMath or so} |
| 9096 | @end example | 9450 | @end example |
| 9097 | 9451 | ||
| 9098 | @node Previewing LaTeX fragments, CDLaTeX mode, LaTeX fragments, Embedded LaTeX | 9452 | @node Previewing @LaTeX{} fragments, CDLaTeX mode, @LaTeX{} fragments, Embedded @LaTeX{} |
| 9099 | @subsection Previewing LaTeX fragments | 9453 | @subsection Previewing @LaTeX{} fragments |
| 9100 | @cindex LaTeX fragments, preview | 9454 | @cindex @LaTeX{} fragments, preview |
| 9101 | 9455 | ||
| 9102 | 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 |
| 9103 | produce preview images of the typeset expressions: | 9457 | produce preview images of the typeset expressions: |
| @@ -9118,22 +9472,22 @@ Remove the overlay preview images. | |||
| 9118 | 9472 | ||
| 9119 | @vindex org-format-latex-options | 9473 | @vindex org-format-latex-options |
| 9120 | You can customize the variable @code{org-format-latex-options} to influence | 9474 | You can customize the variable @code{org-format-latex-options} to influence |
| 9121 | some aspects of the preview. In particular, the @code{:scale} (and for HTML | 9475 | some aspects of the preview. In particular, the @code{:scale} (and for HTML |
| 9122 | 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 |
| 9123 | preview images. | 9477 | preview images. |
| 9124 | 9478 | ||
| 9125 | @node CDLaTeX mode, , Previewing LaTeX fragments, Embedded LaTeX | 9479 | @node CDLaTeX mode, , Previewing @LaTeX{} fragments, Embedded @LaTeX{} |
| 9126 | @subsection Using CDLa@TeX{} to enter math | 9480 | @subsection Using CD@LaTeX{} to enter math |
| 9127 | @cindex CDLa@TeX{} | 9481 | @cindex CD@LaTeX{} |
| 9128 | 9482 | ||
| 9129 | 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 |
| 9130 | 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 |
| 9131 | 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 |
| 9132 | 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 |
| 9133 | @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 |
| 9134 | 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}. |
| 9135 | 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 |
| 9136 | 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 |
| 9137 | 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 |
| 9138 | Org files with | 9492 | Org files with |
| 9139 | 9493 | ||
| @@ -9142,7 +9496,7 @@ Org files with | |||
| 9142 | @end lisp | 9496 | @end lisp |
| 9143 | 9497 | ||
| 9144 | 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 |
| 9145 | details see the documentation of CDLa@TeX{} mode): | 9499 | details see the documentation of CD@LaTeX{} mode): |
| 9146 | @itemize @bullet | 9500 | @itemize @bullet |
| 9147 | @kindex C-c @{ | 9501 | @kindex C-c @{ |
| 9148 | @item | 9502 | @item |
| @@ -9150,7 +9504,7 @@ Environment templates can be inserted with @kbd{C-c @{}. | |||
| 9150 | @item | 9504 | @item |
| 9151 | @kindex @key{TAB} | 9505 | @kindex @key{TAB} |
| 9152 | 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 |
| 9153 | @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 |
| 9154 | inside such a fragment, see the documentation of the function | 9508 | inside such a fragment, see the documentation of the function |
| 9155 | @code{org-inside-LaTeX-fragment-p}.}. For example, @key{TAB} will | 9509 | @code{org-inside-LaTeX-fragment-p}.}. For example, @key{TAB} will |
| 9156 | expand @code{fr} to @code{\frac@{@}@{@}} and position the cursor | 9510 | expand @code{fr} to @code{\frac@{@}@{@}} and position the cursor |
| @@ -9187,18 +9541,20 @@ is normal. | |||
| 9187 | @chapter Exporting | 9541 | @chapter Exporting |
| 9188 | @cindex exporting | 9542 | @cindex exporting |
| 9189 | 9543 | ||
| 9190 | 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 |
| 9191 | 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 |
| 9192 | 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 |
| 9193 | 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 |
| 9194 | 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 |
| 9195 | its structured editing functions to easily create @LaTeX{} files. DocBook | 9549 | its structured editing functions to easily create @LaTeX{} files. DocBook |
| 9196 | 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 |
| 9197 | DocBook tools. For project management you can create gantt and resource | 9551 | DocBook tools. OpenDocument Text(@acronym{ODT}) export allows seamless |
| 9198 | charts by using TaskJuggler export. To incorporate entries with associated | 9552 | collaboration across organizational boundaries. For project management you |
| 9199 | times like deadlines or appointments into a desktop calendar program like | 9553 | can create gantt and resource charts by using TaskJuggler export. To |
| 9200 | iCal, Org-mode can also produce extracts in the iCalendar format. Currently | 9554 | incorporate entries with associated times like deadlines or appointments into |
| 9201 | Org-mode only supports export, not import of these different formats. | 9555 | a desktop calendar program like iCal, Org mode can also produce extracts in |
| 9556 | the iCalendar format. Currently Org mode only supports export, not import of | ||
| 9557 | these different formats. | ||
| 9202 | 9558 | ||
| 9203 | 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 |
| 9204 | enabled (default in Emacs 23). | 9560 | enabled (default in Emacs 23). |
| @@ -9209,8 +9565,9 @@ enabled (default in Emacs 23). | |||
| 9209 | * The export dispatcher:: How to access exporter commands | 9565 | * The export dispatcher:: How to access exporter commands |
| 9210 | * 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 |
| 9211 | * HTML export:: Exporting to HTML | 9567 | * HTML export:: Exporting to HTML |
| 9212 | * LaTeX and PDF export:: Exporting to @LaTeX{}, and processing to PDF | 9568 | * @LaTeX{} and PDF export:: Exporting to @LaTeX{}, and processing to PDF |
| 9213 | * DocBook export:: Exporting to DocBook | 9569 | * DocBook export:: Exporting to DocBook |
| 9570 | * OpenDocument Text export:: Exporting to OpenDocument Text | ||
| 9214 | * TaskJuggler export:: Exporting to TaskJuggler | 9571 | * TaskJuggler export:: Exporting to TaskJuggler |
| 9215 | * Freemind export:: Exporting to Freemind mind maps | 9572 | * Freemind export:: Exporting to Freemind mind maps |
| 9216 | * XOXO export:: Exporting to XOXO | 9573 | * XOXO export:: Exporting to XOXO |
| @@ -9219,26 +9576,35 @@ enabled (default in Emacs 23). | |||
| 9219 | 9576 | ||
| 9220 | @node Selective export, Export options, Exporting, Exporting | 9577 | @node Selective export, Export options, Exporting, Exporting |
| 9221 | @section Selective export | 9578 | @section Selective export |
| 9222 | @cindex export, selective by tags | 9579 | @cindex export, selective by tags or TODO keyword |
| 9223 | 9580 | ||
| 9224 | @vindex org-export-select-tags | 9581 | @vindex org-export-select-tags |
| 9225 | @vindex org-export-exclude-tags | 9582 | @vindex org-export-exclude-tags |
| 9583 | @cindex org-export-with-tasks | ||
| 9226 | 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, |
| 9227 | 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: |
| 9228 | @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:)}. | ||
| 9229 | 9588 | ||
| 9230 | Org first checks if any of the @emph{select} tags is present in the buffer. | 9589 | @enumerate |
| 9231 | If yes, all trees that do not carry one of these tags will be excluded. If a | 9590 | @item |
| 9232 | selected tree is a subtree, the heading hierarchy above it will also be | 9591 | Org first checks if any of the @emph{select} tags is present in the |
| 9233 | selected for export, but not the text below those headings. | 9592 | buffer. If yes, all trees that do not carry one of these tags will be |
| 9593 | excluded. If a selected tree is a subtree, the heading hierarchy above it | ||
| 9594 | will also be selected for export, but not the text below those headings. | ||
| 9234 | 9595 | ||
| 9235 | @noindent | 9596 | @item |
| 9236 | If none of the select tags is found, the whole buffer will be selected for | 9597 | If none of the select tags is found, the whole buffer will be selected for |
| 9237 | export. | 9598 | export. |
| 9238 | 9599 | ||
| 9239 | @noindent | 9600 | @item |
| 9240 | Finally, all subtrees that are marked by any of the @emph{exclude} tags will | 9601 | Finally, all subtrees that are marked by any of the @emph{exclude} tags will |
| 9241 | be removed from the export buffer. | 9602 | be removed from the export buffer. |
| 9603 | @end enumerate | ||
| 9604 | |||
| 9605 | The variable @code{org-export-with-tasks} can be configured to select which | ||
| 9606 | kind of tasks should be included for export. See the docstring of the | ||
| 9607 | variable for more information. | ||
| 9242 | 9608 | ||
| 9243 | @node Export options, The export dispatcher, Selective export, Exporting | 9609 | @node Export options, The export dispatcher, Selective export, Exporting |
| 9244 | @section Export options | 9610 | @section Export options |
| @@ -9279,30 +9645,31 @@ Insert template with export options, see example below. | |||
| 9279 | @vindex user-full-name | 9645 | @vindex user-full-name |
| 9280 | @vindex user-mail-address | 9646 | @vindex user-mail-address |
| 9281 | @vindex org-export-default-language | 9647 | @vindex org-export-default-language |
| 9648 | @vindex org-export-date-timestamp-format | ||
| 9282 | @example | 9649 | @example |
| 9283 | #+TITLE: the title to be shown (default is the buffer name) | 9650 | #+TITLE: the title to be shown (default is the buffer name) |
| 9284 | #+AUTHOR: the author (default taken from @code{user-full-name}) | 9651 | #+AUTHOR: the author (default taken from @code{user-full-name}) |
| 9285 | #+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} |
| 9286 | #+EMAIL: his/her email address (default from @code{user-mail-address}) | 9653 | #+EMAIL: his/her email address (default from @code{user-mail-address}) |
| 9287 | #+DESCRIPTION: the page description, e.g. for the XHTML meta tag | 9654 | #+DESCRIPTION: the page description, e.g.@: for the XHTML meta tag |
| 9288 | #+KEYWORDS: the page keywords, e.g. for the XHTML meta tag | 9655 | #+KEYWORDS: the page keywords, e.g.@: for the XHTML meta tag |
| 9289 | #+LANGUAGE: language for HTML, e.g. @samp{en} (@code{org-export-default-language}) | 9656 | #+LANGUAGE: language for HTML, e.g.@: @samp{en} (@code{org-export-default-language}) |
| 9290 | #+TEXT: Some descriptive text to be inserted at the beginning. | 9657 | #+TEXT: Some descriptive text to be inserted at the beginning. |
| 9291 | #+TEXT: Several lines may be given. | 9658 | #+TEXT: Several lines may be given. |
| 9292 | #+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 ... |
| 9293 | #+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} |
| 9294 | @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}} |
| 9295 | #+LINK_UP: the ``up'' link of an exported page | 9662 | #+LINK_UP: the ``up'' link of an exported page |
| 9296 | #+LINK_HOME: the ``home'' link of an exported page | 9663 | #+LINK_HOME: the ``home'' link of an exported page |
| 9297 | #+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@} |
| 9298 | #+EXPORT_SELECT_TAGS: Tags that select a tree for export | 9665 | #+EXPORT_SELECT_TAGS: Tags that select a tree for export |
| 9299 | #+EXPORT_EXCLUDE_TAGS: Tags that exclude a tree from export | 9666 | #+EXPORT_EXCLUDE_TAGS: Tags that exclude a tree from export |
| 9300 | #+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 |
| 9301 | @end example | 9668 | @end example |
| 9302 | 9669 | ||
| 9303 | @noindent | 9670 | @noindent |
| 9304 | 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 |
| 9305 | 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 |
| 9306 | settings. Here you can: | 9673 | settings. Here you can: |
| 9307 | @cindex headline levels | 9674 | @cindex headline levels |
| 9308 | @cindex section-numbers | 9675 | @cindex section-numbers |
| @@ -9319,6 +9686,11 @@ settings. Here you can: | |||
| 9319 | @cindex @LaTeX{} fragments | 9686 | @cindex @LaTeX{} fragments |
| 9320 | @cindex author info, in export | 9687 | @cindex author info, in export |
| 9321 | @cindex time info, in export | 9688 | @cindex time info, in export |
| 9689 | @vindex org-export-plist-vars | ||
| 9690 | @vindex org-export-author-info | ||
| 9691 | @vindex org-export-creator-info | ||
| 9692 | @vindex org-export-email-info | ||
| 9693 | @vindex org-export-time-stamp-file | ||
| 9322 | @example | 9694 | @example |
| 9323 | H: @r{set the number of headline levels for export} | 9695 | H: @r{set the number of headline levels for export} |
| 9324 | num: @r{turn on/off section-numbers} | 9696 | num: @r{turn on/off section-numbers} |
| @@ -9333,6 +9705,8 @@ toc: @r{turn on/off table of contents, or set level limit (integer)} | |||
| 9333 | -: @r{turn on/off conversion of special strings.} | 9705 | -: @r{turn on/off conversion of special strings.} |
| 9334 | f: @r{turn on/off footnotes like this[1].} | 9706 | f: @r{turn on/off footnotes like this[1].} |
| 9335 | todo: @r{turn on/off inclusion of TODO keywords into exported text} | 9707 | todo: @r{turn on/off inclusion of TODO keywords into exported text} |
| 9708 | tasks: @r{turn on/off inclusion of tasks (TODO items), can be nil to remove} | ||
| 9709 | @r{all tasks, @code{todo} to remove DONE tasks, or list of kwds to keep} | ||
| 9336 | pri: @r{turn on/off priority cookies} | 9710 | pri: @r{turn on/off priority cookies} |
| 9337 | tags: @r{turn on/off inclusion of tags, may also be @code{not-in-toc}} | 9711 | tags: @r{turn on/off inclusion of tags, may also be @code{not-in-toc}} |
| 9338 | <: @r{turn on/off inclusion of any time/date stamps like DEADLINES} | 9712 | <: @r{turn on/off inclusion of any time/date stamps like DEADLINES} |
| @@ -9348,11 +9722,13 @@ d: @r{turn on/off inclusion of drawers} | |||
| 9348 | @end example | 9722 | @end example |
| 9349 | @noindent | 9723 | @noindent |
| 9350 | These options take effect in both the HTML and @LaTeX{} export, except for | 9724 | These options take effect in both the HTML and @LaTeX{} export, except for |
| 9351 | @code{TeX} and @code{LaTeX}, which are respectively @code{t} and @code{nil} | 9725 | @code{TeX} and @code{LaTeX} options, which are respectively @code{t} and |
| 9352 | for the @LaTeX{} export. The default values for these and many other options | 9726 | @code{nil} for the @LaTeX{} export. |
| 9353 | are given by a set of variables. For a list of such variables, the | 9727 | |
| 9354 | corresponding OPTIONS keys and also the publishing keys (@pxref{Project | 9728 | The default values for these and many other options are given by a set of |
| 9355 | alist}), see the constant @code{org-export-plist-vars}. | 9729 | variables. For a list of such variables, the corresponding OPTIONS keys and |
| 9730 | also the publishing keys (@pxref{Project alist}), see the constant | ||
| 9731 | @code{org-export-plist-vars}. | ||
| 9356 | 9732 | ||
| 9357 | When exporting only a single subtree by selecting it with @kbd{C-c @@} before | 9733 | When exporting only a single subtree by selecting it with @kbd{C-c @@} before |
| 9358 | calling an export command, the subtree can overrule some of the file's export | 9734 | calling an export command, the subtree can overrule some of the file's export |
| @@ -9381,11 +9757,11 @@ separate Emacs process@footnote{To make this behavior the default, customize | |||
| 9381 | the variable @code{org-export-run-in-background}.}. | 9757 | the variable @code{org-export-run-in-background}.}. |
| 9382 | @orgcmd{C-c C-e v,org-export-visible} | 9758 | @orgcmd{C-c C-e v,org-export-visible} |
| 9383 | Like @kbd{C-c C-e}, but only export the text that is currently visible | 9759 | Like @kbd{C-c C-e}, but only export the text that is currently visible |
| 9384 | (i.e. not hidden by outline visibility). | 9760 | (i.e.@: not hidden by outline visibility). |
| 9385 | @orgcmd{C-u C-u C-c C-e,org-export} | 9761 | @orgcmd{C-u C-u C-c C-e,org-export} |
| 9386 | @vindex org-export-run-in-background | 9762 | @vindex org-export-run-in-background |
| 9387 | Call the exporter, but reverse the setting of | 9763 | Call the exporter, but reverse the setting of |
| 9388 | @code{org-export-run-in-background}, i.e. request background processing if | 9764 | @code{org-export-run-in-background}, i.e.@: request background processing if |
| 9389 | not set, or force processing in the current Emacs process if set. | 9765 | not set, or force processing in the current Emacs process if set. |
| 9390 | @end table | 9766 | @end table |
| 9391 | 9767 | ||
| @@ -9395,7 +9771,7 @@ not set, or force processing in the current Emacs process if set. | |||
| 9395 | @cindex Latin-1 export | 9771 | @cindex Latin-1 export |
| 9396 | @cindex UTF-8 export | 9772 | @cindex UTF-8 export |
| 9397 | 9773 | ||
| 9398 | 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 |
| 9399 | 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 |
| 9400 | with special characters and symbols available in these encodings. | 9776 | with special characters and symbols available in these encodings. |
| 9401 | 9777 | ||
| @@ -9409,7 +9785,7 @@ Export as ASCII file. For an Org file, @file{myfile.org}, the ASCII file | |||
| 9409 | will be @file{myfile.txt}. The file will be overwritten without | 9785 | will be @file{myfile.txt}. The file will be overwritten without |
| 9410 | warning. If there is an active region@footnote{This requires | 9786 | warning. If there is an active region@footnote{This requires |
| 9411 | @code{transient-mark-mode} be turned on.}, only the region will be | 9787 | @code{transient-mark-mode} be turned on.}, only the region will be |
| 9412 | exported. If the selected region is a single tree@footnote{To select the | 9788 | exported. If the selected region is a single tree@footnote{To select the |
| 9413 | current subtree, use @kbd{C-c @@}.}, the tree head will | 9789 | current subtree, use @kbd{C-c @@}.}, the tree head will |
| 9414 | become the document title. If the tree head entry has or inherits an | 9790 | become the document title. If the tree head entry has or inherits an |
| 9415 | @code{EXPORT_FILE_NAME} property, that name will be used for the | 9791 | @code{EXPORT_FILE_NAME} property, that name will be used for the |
| @@ -9450,17 +9826,18 @@ Links will be exported in a footnote-like style, with the descriptive part in | |||
| 9450 | 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 |
| 9451 | @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. |
| 9452 | 9828 | ||
| 9453 | @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 |
| 9454 | @section HTML export | 9830 | @section HTML export |
| 9455 | @cindex HTML export | 9831 | @cindex HTML export |
| 9456 | 9832 | ||
| 9457 | 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 |
| 9458 | HTML formatting, in ways similar to John Gruber's @emph{markdown} | 9834 | HTML formatting, in ways similar to John Gruber's @emph{markdown} |
| 9459 | language, but with additional support for tables. | 9835 | language, but with additional support for tables. |
| 9460 | 9836 | ||
| 9461 | @menu | 9837 | @menu |
| 9462 | * HTML Export commands:: How to invoke HTML export | 9838 | * HTML Export commands:: How to invoke HTML export |
| 9463 | * Quoting HTML tags:: Using direct HTML in Org-mode | 9839 | * HTML preamble and postamble:: How to insert a preamble and a postamble |
| 9840 | * Quoting HTML tags:: Using direct HTML in Org mode | ||
| 9464 | * Links in HTML export:: How links will be interpreted and formatted | 9841 | * Links in HTML export:: How links will be interpreted and formatted |
| 9465 | * Tables in HTML export:: How to modify the formatting of tables | 9842 | * Tables in HTML export:: How to modify the formatting of tables |
| 9466 | * Images in HTML export:: How to insert figures into HTML output | 9843 | * Images in HTML export:: How to insert figures into HTML output |
| @@ -9470,7 +9847,7 @@ language, but with additional support for tables. | |||
| 9470 | * JavaScript support:: Info and Folding in a web browser | 9847 | * JavaScript support:: Info and Folding in a web browser |
| 9471 | @end menu | 9848 | @end menu |
| 9472 | 9849 | ||
| 9473 | @node HTML Export commands, Quoting HTML tags, HTML export, HTML export | 9850 | @node HTML Export commands, HTML preamble and postamble, HTML export, HTML export |
| 9474 | @subsection HTML export commands | 9851 | @subsection HTML export commands |
| 9475 | 9852 | ||
| 9476 | @cindex region, active | 9853 | @cindex region, active |
| @@ -9479,11 +9856,11 @@ language, but with additional support for tables. | |||
| 9479 | @table @kbd | 9856 | @table @kbd |
| 9480 | @orgcmd{C-c C-e h,org-export-as-html} | 9857 | @orgcmd{C-c C-e h,org-export-as-html} |
| 9481 | @cindex property, EXPORT_FILE_NAME | 9858 | @cindex property, EXPORT_FILE_NAME |
| 9482 | Export as HTML file @file{myfile.html}. For an Org file @file{myfile.org}, | 9859 | Export as HTML file. For an Org file @file{myfile.org}, |
| 9483 | the ASCII file will be @file{myfile.html}. The file will be overwritten | 9860 | the HTML file will be @file{myfile.html}. The file will be overwritten |
| 9484 | without warning. If there is an active region@footnote{This requires | 9861 | without warning. If there is an active region@footnote{This requires |
| 9485 | @code{transient-mark-mode} be turned on.}, only the region will be | 9862 | @code{transient-mark-mode} be turned on.}, only the region will be |
| 9486 | exported. If the selected region is a single tree@footnote{To select the | 9863 | exported. If the selected region is a single tree@footnote{To select the |
| 9487 | current subtree, use @kbd{C-c @@}.}, the tree head will become the document | 9864 | current subtree, use @kbd{C-c @@}.}, the tree head will become the document |
| 9488 | title. If the tree head entry has, or inherits, an @code{EXPORT_FILE_NAME} | 9865 | title. If the tree head entry has, or inherits, an @code{EXPORT_FILE_NAME} |
| 9489 | property, that name will be used for the export. | 9866 | property, that name will be used for the export. |
| @@ -9498,11 +9875,11 @@ the region. This is good for cut-and-paste operations. | |||
| 9498 | @item C-c C-e v h/b/H/R | 9875 | @item C-c C-e v h/b/H/R |
| 9499 | Export only the visible part of the document. | 9876 | Export only the visible part of the document. |
| 9500 | @item M-x org-export-region-as-html | 9877 | @item M-x org-export-region-as-html |
| 9501 | 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 |
| 9502 | 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 |
| 9503 | buffer. | 9880 | buffer. |
| 9504 | @item M-x org-replace-region-by-HTML | 9881 | @item M-x org-replace-region-by-HTML |
| 9505 | 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 |
| 9506 | code. | 9883 | code. |
| 9507 | @end table | 9884 | @end table |
| 9508 | 9885 | ||
| @@ -9519,7 +9896,43 @@ specify it with a numeric prefix argument. For example, | |||
| 9519 | @noindent | 9896 | @noindent |
| 9520 | creates two levels of headings and does the rest as items. | 9897 | creates two levels of headings and does the rest as items. |
| 9521 | 9898 | ||
| 9522 | @node Quoting HTML tags, Links in HTML export, HTML Export commands, HTML export | 9899 | |
| 9900 | @node HTML preamble and postamble, Quoting HTML tags, HTML Export commands, HTML export | ||
| 9901 | @subsection HTML preamble and postamble | ||
| 9902 | @vindex org-export-html-preamble | ||
| 9903 | @vindex org-export-html-postamble | ||
| 9904 | @vindex org-export-html-preamble-format | ||
| 9905 | @vindex org-export-html-postamble-format | ||
| 9906 | @vindex org-export-html-validation-link | ||
| 9907 | @vindex org-export-author-info | ||
| 9908 | @vindex org-export-email-info | ||
| 9909 | @vindex org-export-creator-info | ||
| 9910 | @vindex org-export-time-stamp-file | ||
| 9911 | |||
| 9912 | The HTML exporter lets you define a preamble and a postamble. | ||
| 9913 | |||
| 9914 | The default value for @code{org-export-html-preamble} is @code{t}, which | ||
| 9915 | means that the preamble is inserted depending on the relevant formatting | ||
| 9916 | string in @code{org-export-html-preamble-format}. | ||
| 9917 | |||
| 9918 | Setting @code{org-export-html-preamble} to a string will override the default | ||
| 9919 | formatting string. Setting it to a function, will insert the output of the | ||
| 9920 | function, which must be a string; such a function takes no argument but you | ||
| 9921 | can check against the value of @code{opt-plist}, which contains the list of | ||
| 9922 | publishing properties for the current file. Setting to @code{nil} will not | ||
| 9923 | insert any preamble. | ||
| 9924 | |||
| 9925 | The default value for @code{org-export-html-postamble} is @code{'auto}, which | ||
| 9926 | means that the HTML exporter will look for the value of | ||
| 9927 | @code{org-export-author-info}, @code{org-export-email-info}, | ||
| 9928 | @code{org-export-creator-info} and @code{org-export-time-stamp-file}, | ||
| 9929 | @code{org-export-html-validation-link} and build the postamble from these | ||
| 9930 | values. Setting @code{org-export-html-postamble} to @code{t} will insert the | ||
| 9931 | postamble from the relevant formatting string found in | ||
| 9932 | @code{org-export-html-postamble-format}. Setting it to @code{nil} will not | ||
| 9933 | insert any postamble. | ||
| 9934 | |||
| 9935 | @node Quoting HTML tags, Links in HTML export, HTML preamble and postamble, HTML export | ||
| 9523 | @subsection Quoting HTML tags | 9936 | @subsection Quoting HTML tags |
| 9524 | 9937 | ||
| 9525 | Plain @samp{<} and @samp{>} are always transformed to @samp{<} and | 9938 | Plain @samp{<} and @samp{>} are always transformed to @samp{<} and |
| @@ -9568,7 +9981,7 @@ and @code{style} attributes for a link: | |||
| 9568 | 9981 | ||
| 9569 | @cindex #+ATTR_HTML | 9982 | @cindex #+ATTR_HTML |
| 9570 | @example | 9983 | @example |
| 9571 | #+ATTR_HTML: title="The Org-mode homepage" style="color:red;" | 9984 | #+ATTR_HTML: title="The Org mode homepage" style="color:red;" |
| 9572 | [[http://orgmode.org]] | 9985 | [[http://orgmode.org]] |
| 9573 | @end example | 9986 | @end example |
| 9574 | 9987 | ||
| @@ -9577,7 +9990,7 @@ and @code{style} attributes for a link: | |||
| 9577 | @cindex tables, in HTML | 9990 | @cindex tables, in HTML |
| 9578 | @vindex org-export-html-table-tag | 9991 | @vindex org-export-html-table-tag |
| 9579 | 9992 | ||
| 9580 | 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 |
| 9581 | @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 |
| 9582 | 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 |
| 9583 | tables, place something like the following before the table: | 9996 | tables, place something like the following before the table: |
| @@ -9586,7 +9999,7 @@ tables, place something like the following before the table: | |||
| 9586 | @cindex #+ATTR_HTML | 9999 | @cindex #+ATTR_HTML |
| 9587 | @example | 10000 | @example |
| 9588 | #+CAPTION: This is a table with lines around and between cells | 10001 | #+CAPTION: This is a table with lines around and between cells |
| 9589 | #+ATTR_HTML: border="2" rules="all" frame="all" | 10002 | #+ATTR_HTML: border="2" rules="all" frame="border" |
| 9590 | @end example | 10003 | @end example |
| 9591 | 10004 | ||
| 9592 | @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 |
| @@ -9624,18 +10037,18 @@ support text viewers and accessibility, and align it to the right. | |||
| 9624 | @end example | 10037 | @end example |
| 9625 | 10038 | ||
| 9626 | @noindent | 10039 | @noindent |
| 9627 | and you could use @code{http} addresses just as well. | 10040 | You could use @code{http} addresses just as well. |
| 9628 | 10041 | ||
| 9629 | @node Math formatting in HTML export, Text areas in HTML export, Images in HTML export, HTML export | 10042 | @node Math formatting in HTML export, Text areas in HTML export, Images in HTML export, HTML export |
| 9630 | @subsection Math formatting in HTML export | 10043 | @subsection Math formatting in HTML export |
| 9631 | @cindex MathJax | 10044 | @cindex MathJax |
| 9632 | @cindex dvipng | 10045 | @cindex dvipng |
| 9633 | 10046 | ||
| 9634 | @LaTeX{} math snippets (@pxref{LaTeX fragments}) can be displayed in two | 10047 | @LaTeX{} math snippets (@pxref{@LaTeX{} fragments}) can be displayed in two |
| 9635 | different ways on HTML pages. The default is to use the | 10048 | different ways on HTML pages. The default is to use the |
| 9636 | @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 |
| 9637 | box with Org mode installation because @code{http://orgmode.org} serves | 10050 | box with Org mode installation because @code{http://orgmode.org} serves |
| 9638 | @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 |
| 9639 | 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 |
| 9640 | page views, you should install@footnote{Installation instructions can be | 10053 | page views, you should install@footnote{Installation instructions can be |
| 9641 | found on the MathJax website, see | 10054 | found on the MathJax website, see |
| @@ -9701,10 +10114,10 @@ addition to any of the standard classes like for headlines, tables, etc. | |||
| 9701 | @example | 10114 | @example |
| 9702 | p.author @r{author information, including email} | 10115 | p.author @r{author information, including email} |
| 9703 | p.date @r{publishing date} | 10116 | p.date @r{publishing date} |
| 9704 | p.creator @r{creator info, about org-mode version} | 10117 | p.creator @r{creator info, about org mode version} |
| 9705 | .title @r{document title} | 10118 | .title @r{document title} |
| 9706 | .todo @r{TODO keywords, all not-done states} | 10119 | .todo @r{TODO keywords, all not-done states} |
| 9707 | .done @r{the DONE keywords, all stated the count as done} | 10120 | .done @r{the DONE keywords, all states that count as done} |
| 9708 | .WAITING @r{each TODO keyword also uses a class named after itself} | 10121 | .WAITING @r{each TODO keyword also uses a class named after itself} |
| 9709 | .timestamp @r{timestamp} | 10122 | .timestamp @r{timestamp} |
| 9710 | .timestamp-kwd @r{keyword associated with a timestamp, like SCHEDULED} | 10123 | .timestamp-kwd @r{keyword associated with a timestamp, like SCHEDULED} |
| @@ -9827,32 +10240,34 @@ You can choose default values for these options by customizing the variable | |||
| 9827 | @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 |
| 9828 | pages, configure the variable @code{org-export-html-use-infojs}. | 10241 | pages, configure the variable @code{org-export-html-use-infojs}. |
| 9829 | 10242 | ||
| 9830 | @node LaTeX and PDF export, DocBook export, HTML export, Exporting | 10243 | @node @LaTeX{} and PDF export, DocBook export, HTML export, Exporting |
| 9831 | @section @LaTeX{} and PDF export | 10244 | @section @LaTeX{} and PDF export |
| 9832 | @cindex @LaTeX{} export | 10245 | @cindex @LaTeX{} export |
| 9833 | @cindex PDF export | 10246 | @cindex PDF export |
| 9834 | @cindex Guerry, Bastien | 10247 | @cindex Guerry, Bastien |
| 9835 | 10248 | ||
| 9836 | Org-mode contains a @LaTeX{} exporter written by Bastien Guerry. With | 10249 | Org mode contains a @LaTeX{} exporter written by Bastien Guerry. With |
| 9837 | further processing@footnote{The default LaTeX output is designed for | 10250 | further processing@footnote{The default @LaTeX{} output is designed for |
| 9838 | processing with pdftex or latex. It includes packages that are not | 10251 | processing with @code{pdftex} or @LaTeX{}. It includes packages that are not |
| 9839 | compatible with xetex and possibly luatex. See the variables | 10252 | compatible with @code{xetex} and possibly @code{luatex}. See the variables |
| 9840 | @code{org-export-latex-default-packages-alist} and | 10253 | @code{org-export-latex-default-packages-alist} and |
| 9841 | @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 |
| 9842 | produce PDF output. Since the @LaTeX{} output uses @file{hyperref} to | 10255 | produce PDF output. Since the @LaTeX{} output uses @file{hyperref} to |
| 9843 | implement links and cross references, the PDF output file will be fully | 10256 | implement links and cross references, the PDF output file will be fully |
| 9844 | linked. | 10257 | linked. Beware of the fact that your @code{org} file has to be properly |
| 10258 | structured in order to be correctly exported: respect the hierarchy of | ||
| 10259 | sections. | ||
| 9845 | 10260 | ||
| 9846 | @menu | 10261 | @menu |
| 9847 | * LaTeX/PDF export commands:: Which key invokes which commands | 10262 | * @LaTeX{}/PDF export commands:: |
| 9848 | * Header and sectioning:: Setting up the export file structure | 10263 | * Header and sectioning:: Setting up the export file structure |
| 9849 | * Quoting LaTeX code:: Incorporating literal @LaTeX{} code | 10264 | * Quoting @LaTeX{} code:: Incorporating literal @LaTeX{} code |
| 9850 | * Tables in LaTeX export:: Options for exporting tables to @LaTeX{} | 10265 | * Tables in @LaTeX{} export:: Options for exporting tables to @LaTeX{} |
| 9851 | * Images in LaTeX export:: How to insert figures into @LaTeX{} output | 10266 | * Images in @LaTeX{} export:: How to insert figures into @LaTeX{} output |
| 9852 | * Beamer class export:: Turning the file into a presentation | 10267 | * Beamer class export:: Turning the file into a presentation |
| 9853 | @end menu | 10268 | @end menu |
| 9854 | 10269 | ||
| 9855 | @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 |
| 9856 | @subsection @LaTeX{} export commands | 10271 | @subsection @LaTeX{} export commands |
| 9857 | 10272 | ||
| 9858 | @cindex region, active | 10273 | @cindex region, active |
| @@ -9861,24 +10276,24 @@ linked. | |||
| 9861 | @table @kbd | 10276 | @table @kbd |
| 9862 | @orgcmd{C-c C-e l,org-export-as-latex} | 10277 | @orgcmd{C-c C-e l,org-export-as-latex} |
| 9863 | @cindex property EXPORT_FILE_NAME | 10278 | @cindex property EXPORT_FILE_NAME |
| 9864 | Export as @LaTeX{} file @file{myfile.tex}. For an Org file | 10279 | Export as @LaTeX{} file. For an Org file |
| 9865 | @file{myfile.org}, the ASCII file will be @file{myfile.tex}. The file will | 10280 | @file{myfile.org}, the @LaTeX{} file will be @file{myfile.tex}. The file will |
| 9866 | be overwritten without warning. If there is an active region@footnote{This | 10281 | be overwritten without warning. If there is an active region@footnote{This |
| 9867 | requires @code{transient-mark-mode} be turned on.}, only the region will be | 10282 | requires @code{transient-mark-mode} be turned on.}, only the region will be |
| 9868 | exported. If the selected region is a single tree@footnote{To select the | 10283 | exported. If the selected region is a single tree@footnote{To select the |
| 9869 | current subtree, use @kbd{C-c @@}.}, the tree head will become the document | 10284 | current subtree, use @kbd{C-c @@}.}, the tree head will become the document |
| 9870 | title. If the tree head entry has or inherits an @code{EXPORT_FILE_NAME} | 10285 | title. If the tree head entry has or inherits an @code{EXPORT_FILE_NAME} |
| 9871 | property, that name will be used for the export. | 10286 | property, that name will be used for the export. |
| 9872 | @orgcmd{C-c C-e L,org-export-as-latex-to-buffer} | 10287 | @orgcmd{C-c C-e L,org-export-as-latex-to-buffer} |
| 9873 | Export to a temporary buffer. Do not create a file. | 10288 | Export to a temporary buffer. Do not create a file. |
| 9874 | @item C-c C-e v l/L | 10289 | @item C-c C-e v l/L |
| 9875 | Export only the visible part of the document. | 10290 | Export only the visible part of the document. |
| 9876 | @item M-x org-export-region-as-latex | 10291 | @item M-x org-export-region-as-latex |
| 9877 | 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 |
| 9878 | 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 |
| 9879 | buffer. | 10294 | buffer. |
| 9880 | @item M-x org-replace-region-by-latex | 10295 | @item M-x org-replace-region-by-latex |
| 9881 | 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{} |
| 9882 | code. | 10297 | code. |
| 9883 | @orgcmd{C-c C-e p,org-export-as-pdf} | 10298 | @orgcmd{C-c C-e p,org-export-as-pdf} |
| 9884 | Export as @LaTeX{} and then process to PDF. | 10299 | Export as @LaTeX{} and then process to PDF. |
| @@ -9895,7 +10310,7 @@ convert them to a custom string depending on | |||
| 9895 | @code{org-latex-low-levels}. | 10310 | @code{org-latex-low-levels}. |
| 9896 | 10311 | ||
| 9897 | If you want that transition to occur at a different level, specify it | 10312 | If you want that transition to occur at a different level, specify it |
| 9898 | with a numeric prefix argument. For example, | 10313 | with a numeric prefix argument. For example, |
| 9899 | 10314 | ||
| 9900 | @example | 10315 | @example |
| 9901 | @kbd{C-2 C-c C-e l} | 10316 | @kbd{C-2 C-c C-e l} |
| @@ -9904,13 +10319,13 @@ with a numeric prefix argument. For example, | |||
| 9904 | @noindent | 10319 | @noindent |
| 9905 | creates two levels of headings and does the rest as items. | 10320 | creates two levels of headings and does the rest as items. |
| 9906 | 10321 | ||
| 9907 | @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 |
| 9908 | @subsection Header and sectioning structure | 10323 | @subsection Header and sectioning structure |
| 9909 | @cindex @LaTeX{} class | 10324 | @cindex @LaTeX{} class |
| 9910 | @cindex @LaTeX{} sectioning structure | 10325 | @cindex @LaTeX{} sectioning structure |
| 9911 | @cindex @LaTeX{} header | 10326 | @cindex @LaTeX{} header |
| 9912 | @cindex header, for LaTeX files | 10327 | @cindex header, for @LaTeX{} files |
| 9913 | @cindex sectioning structure, for LaTeX export | 10328 | @cindex sectioning structure, for @LaTeX{} export |
| 9914 | 10329 | ||
| 9915 | By default, the @LaTeX{} output uses the class @code{article}. | 10330 | By default, the @LaTeX{} output uses the class @code{article}. |
| 9916 | 10331 | ||
| @@ -9938,10 +10353,10 @@ can also use @code{#+LATEX_HEADER: \usepackage@{xyz@}} to add lines to the | |||
| 9938 | 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 |
| 9939 | information. | 10354 | information. |
| 9940 | 10355 | ||
| 9941 | @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 |
| 9942 | @subsection Quoting @LaTeX{} code | 10357 | @subsection Quoting @LaTeX{} code |
| 9943 | 10358 | ||
| 9944 | Embedded @LaTeX{} as described in @ref{Embedded LaTeX}, will be correctly | 10359 | Embedded @LaTeX{} as described in @ref{Embedded @LaTeX{}}, will be correctly |
| 9945 | inserted into the @LaTeX{} file. This includes simple macros like | 10360 | inserted into the @LaTeX{} file. This includes simple macros like |
| 9946 | @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, |
| 9947 | 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 |
| @@ -9950,7 +10365,7 @@ the following constructs: | |||
| 9950 | @cindex #+LaTeX | 10365 | @cindex #+LaTeX |
| 9951 | @cindex #+BEGIN_LaTeX | 10366 | @cindex #+BEGIN_LaTeX |
| 9952 | @example | 10367 | @example |
| 9953 | #+LaTeX: Literal LaTeX code for export | 10368 | #+LaTeX: Literal @LaTeX{} code for export |
| 9954 | @end example | 10369 | @end example |
| 9955 | 10370 | ||
| 9956 | @noindent or | 10371 | @noindent or |
| @@ -9963,16 +10378,18 @@ All lines between these markers are exported literally | |||
| 9963 | @end example | 10378 | @end example |
| 9964 | 10379 | ||
| 9965 | 10380 | ||
| 9966 | @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 |
| 9967 | @subsection Tables in @LaTeX{} export | 10382 | @subsection Tables in @LaTeX{} export |
| 9968 | @cindex tables, in @LaTeX{} export | 10383 | @cindex tables, in @LaTeX{} export |
| 9969 | 10384 | ||
| 9970 | For @LaTeX{} export of a table, you can specify a label and a caption | 10385 | For @LaTeX{} export of a table, you can specify a label, a caption and |
| 9971 | (@pxref{Images and tables}). You can also use the @code{ATTR_LaTeX} line to | 10386 | placement options (@pxref{Images and tables}). You can also use the |
| 9972 | request a @code{longtable} environment for the table, so that it may span | 10387 | @code{ATTR_LaTeX} line to request a @code{longtable} environment for the |
| 9973 | several pages, or provide the @code{multicolumn} keyword that will make the | 10388 | table, so that it may span several pages, or to change the default table |
| 9974 | table span the page in a multicolumn environment (@code{table*} environment). | 10389 | environment from @code{table} to @code{table*} or to change the default inner |
| 9975 | Finally, you can set the alignment string: | 10390 | tabular environment to @code{tabularx} or @code{tabulary}. Finally, you can |
| 10391 | set the alignment string, and (with @code{tabularx} or @code{tabulary}) the | ||
| 10392 | width: | ||
| 9976 | 10393 | ||
| 9977 | @cindex #+CAPTION | 10394 | @cindex #+CAPTION |
| 9978 | @cindex #+LABEL | 10395 | @cindex #+LABEL |
| @@ -9985,8 +10402,20 @@ Finally, you can set the alignment string: | |||
| 9985 | | ..... | ..... | | 10402 | | ..... | ..... | |
| 9986 | @end example | 10403 | @end example |
| 9987 | 10404 | ||
| 10405 | or to specify a multicolumn table with @code{tabulary} | ||
| 10406 | |||
| 10407 | @cindex #+CAPTION | ||
| 10408 | @cindex #+LABEL | ||
| 10409 | @cindex #+ATTR_LaTeX | ||
| 10410 | @example | ||
| 10411 | #+CAPTION: A wide table with tabulary | ||
| 10412 | #+LABEL: tbl:wide | ||
| 10413 | #+ATTR_LaTeX: table* tabulary width=\textwidth | ||
| 10414 | | ..... | ..... | | ||
| 10415 | | ..... | ..... | | ||
| 10416 | @end example | ||
| 9988 | 10417 | ||
| 9989 | @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 |
| 9990 | @subsection Images in @LaTeX{} export | 10419 | @subsection Images in @LaTeX{} export |
| 9991 | @cindex images, inline in @LaTeX{} | 10420 | @cindex images, inline in @LaTeX{} |
| 9992 | @cindex inlining images in @LaTeX{} | 10421 | @cindex inlining images in @LaTeX{} |
| @@ -9997,11 +10426,18 @@ output file resulting from @LaTeX{} processing. Org will use an | |||
| 9997 | @code{\includegraphics} macro to insert the image. If you have specified a | 10426 | @code{\includegraphics} macro to insert the image. If you have specified a |
| 9998 | caption and/or a label as described in @ref{Images and tables}, the figure | 10427 | caption and/or a label as described in @ref{Images and tables}, the figure |
| 9999 | will be wrapped into a @code{figure} environment and thus become a floating | 10428 | will be wrapped into a @code{figure} environment and thus become a floating |
| 10000 | element. You can use an @code{#+ATTR_LaTeX:} line to specify the various | 10429 | element. You can use an @code{#+ATTR_LaTeX:} line to specify various other |
| 10001 | options that can be used in the optional argument of the | 10430 | options. You can ask org to export an image as a float without specifying |
| 10002 | @code{\includegraphics} macro. To modify the placement option of the | 10431 | a label or a caption by using the keyword @code{float} in this line. Various |
| 10003 | @code{figure} environment, add something like @samp{placement=[h!]} to the | 10432 | optional arguments to the @code{\includegraphics} macro can also be specified |
| 10004 | Attributes. | 10433 | in this fashion. To modify the placement option of the floating environment, |
| 10434 | add something like @samp{placement=[h!]} to the attributes. It is to be noted | ||
| 10435 | this option can be used with tables as well@footnote{One can also take | ||
| 10436 | advantage of this option to pass other, unrelated options into the figure or | ||
| 10437 | table environment. For an example see the section ``Exporting org files'' in | ||
| 10438 | @url{http://orgmode.org/worg/org-hacks.html}}. For example the | ||
| 10439 | @code{#+ATTR_LaTeX:} line below is exported as the @code{figure} environment | ||
| 10440 | below it. | ||
| 10005 | 10441 | ||
| 10006 | If you would like to let text flow around the image, add the word @samp{wrap} | 10442 | If you would like to let text flow around the image, add the word @samp{wrap} |
| 10007 | to the @code{#+ATTR_LaTeX:} line, which will make the figure occupy the left | 10443 | to the @code{#+ATTR_LaTeX:} line, which will make the figure occupy the left |
| @@ -10023,17 +10459,21 @@ for @code{\includegraphics} and @code{wrapfigure}. | |||
| 10023 | [[./img/hst.png]] | 10459 | [[./img/hst.png]] |
| 10024 | @end example | 10460 | @end example |
| 10025 | 10461 | ||
| 10462 | If you wish to include an image which spans multiple columns in a page, you | ||
| 10463 | can use the keyword @code{multicolumn} in the @code{#+ATTR_LaTeX} line. This | ||
| 10464 | will export the image wrapped in a @code{figure*} environment. | ||
| 10465 | |||
| 10026 | 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 |
| 10027 | @samp{\ref@{fig:SED-HR4049@}} just like in @LaTeX{}. | 10467 | @samp{\ref@{fig:SED-HR4049@}} just like in @LaTeX{}. |
| 10028 | 10468 | ||
| 10029 | @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 |
| 10030 | @subsection Beamer class export | 10470 | @subsection Beamer class export |
| 10031 | 10471 | ||
| 10032 | The LaTeX class @file{beamer} allows production of high quality presentations | 10472 | The @LaTeX{} class @file{beamer} allows production of high quality presentations |
| 10033 | 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 |
| 10034 | Org-mode file or tree into a @file{beamer} presentation. | 10474 | Org mode file or tree into a @file{beamer} presentation. |
| 10035 | 10475 | ||
| 10036 | 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: |
| 10037 | beamer}) or subtree (set with a @code{LaTeX_CLASS} property) is | 10477 | beamer}) or subtree (set with a @code{LaTeX_CLASS} property) is |
| 10038 | @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 |
| 10039 | 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 |
| @@ -10153,7 +10593,7 @@ Here is a simple example Org document that is intended for beamer export. | |||
| 10153 | 10593 | ||
| 10154 | For more information, see the documentation on Worg. | 10594 | For more information, see the documentation on Worg. |
| 10155 | 10595 | ||
| 10156 | @node DocBook export, TaskJuggler export, LaTeX and PDF export, Exporting | 10596 | @node DocBook export, OpenDocument Text export, @LaTeX{} and PDF export, Exporting |
| 10157 | @section DocBook export | 10597 | @section DocBook export |
| 10158 | @cindex DocBook export | 10598 | @cindex DocBook export |
| 10159 | @cindex PDF export | 10599 | @cindex PDF export |
| @@ -10255,7 +10695,7 @@ exported DocBook XML files invalid by not quoting DocBook code correctly. | |||
| 10255 | @cindex DocBook recursive sections | 10695 | @cindex DocBook recursive sections |
| 10256 | 10696 | ||
| 10257 | DocBook exporter exports Org files as articles using the @code{article} | 10697 | DocBook exporter exports Org files as articles using the @code{article} |
| 10258 | element in DocBook. Recursive sections, i.e. @code{section} elements, are | 10698 | element in DocBook. Recursive sections, i.e.@: @code{section} elements, are |
| 10259 | used in exported articles. Top level headlines in Org files are exported as | 10699 | used in exported articles. Top level headlines in Org files are exported as |
| 10260 | top level sections, and lower level headlines are exported as nested | 10700 | top level sections, and lower level headlines are exported as nested |
| 10261 | sections. The entire structure of Org files will be exported completely, no | 10701 | sections. The entire structure of Org files will be exported completely, no |
| @@ -10309,7 +10749,7 @@ set: | |||
| 10309 | @cindex #+LABEL | 10749 | @cindex #+LABEL |
| 10310 | @cindex #+ATTR_DOCBOOK | 10750 | @cindex #+ATTR_DOCBOOK |
| 10311 | @example | 10751 | @example |
| 10312 | #+CAPTION: The logo of Org-mode | 10752 | #+CAPTION: The logo of Org mode |
| 10313 | #+LABEL: unicorn-svg | 10753 | #+LABEL: unicorn-svg |
| 10314 | #+ATTR_DOCBOOK: scalefit="1" width="100%" depth="100%" | 10754 | #+ATTR_DOCBOOK: scalefit="1" width="100%" depth="100%" |
| 10315 | [[./img/org-mode-unicorn.svg]] | 10755 | [[./img/org-mode-unicorn.svg]] |
| @@ -10350,7 +10790,840 @@ special characters included in XHTML entities: | |||
| 10350 | " | 10790 | " |
| 10351 | @end example | 10791 | @end example |
| 10352 | 10792 | ||
| 10353 | @node TaskJuggler export, Freemind export, DocBook export, Exporting | 10793 | @c begin opendocument |
| 10794 | |||
| 10795 | @node OpenDocument Text export, TaskJuggler export, DocBook export, Exporting | ||
| 10796 | @section OpenDocument Text export | ||
| 10797 | @cindex K, Jambunathan | ||
| 10798 | @cindex ODT | ||
| 10799 | @cindex OpenDocument | ||
| 10800 | @cindex export, OpenDocument | ||
| 10801 | @cindex LibreOffice | ||
| 10802 | @cindex org-odt.el | ||
| 10803 | @cindex org-modules | ||
| 10804 | |||
| 10805 | Orgmode@footnote{Versions 7.8 or later} supports export to OpenDocument Text | ||
| 10806 | (@acronym{ODT}) format using the @file{org-odt.el} module. Documents created | ||
| 10807 | by this exporter use the @cite{OpenDocument-v1.2 | ||
| 10808 | specification}@footnote{@url{http://docs.oasis-open.org/office/v1.2/OpenDocument-v1.2.html, | ||
| 10809 | Open Document Format for Office Applications (OpenDocument) Version 1.2}} and | ||
| 10810 | are compatible with LibreOffice 3.4. | ||
| 10811 | |||
| 10812 | @menu | ||
| 10813 | * Pre-requisites for @acronym{ODT} export:: What packages @acronym{ODT} exporter relies on | ||
| 10814 | * @acronym{ODT} export commands:: How to invoke @acronym{ODT} export | ||
| 10815 | * Applying custom styles:: How to apply custom styles to the output | ||
| 10816 | * Links in @acronym{ODT} export:: How links will be interpreted and formatted | ||
| 10817 | * Tables in @acronym{ODT} export:: How Tables are exported | ||
| 10818 | * Images in @acronym{ODT} export:: How to insert images | ||
| 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 | ||
| 10822 | @end menu | ||
| 10823 | |||
| 10824 | @node Pre-requisites for @acronym{ODT} export, @acronym{ODT} export commands, OpenDocument Text export, OpenDocument Text export | ||
| 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} | ||
| 10835 | |||
| 10836 | @cindex region, active | ||
| 10837 | @cindex active region | ||
| 10838 | @cindex transient-mark-mode | ||
| 10839 | @table @kbd | ||
| 10840 | @orgcmd{C-c C-e o,org-export-as-odt} | ||
| 10841 | @cindex property EXPORT_FILE_NAME | ||
| 10842 | |||
| 10843 | Export as OpenDocument Text file. | ||
| 10844 | @vindex org-export-odt-preferred-output-format | ||
| 10845 | If @code{org-export-odt-preferred-output-format} is specified, automatically | ||
| 10846 | convert the exported file to that format. | ||
| 10847 | @xref{x-export-to-other-formats,,Automatically exporting to other formats}. | ||
| 10848 | |||
| 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 | |||
| 10858 | @orgcmd{C-c C-e O,org-export-as-odt-and-open} | ||
| 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}. | ||
| 10864 | @end table | ||
| 10865 | |||
| 10866 | @subsubheading Automatically exporting to other formats | ||
| 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 | ||
| 10880 | @cindex styles, custom | ||
| 10881 | @cindex template, custom | ||
| 10882 | |||
| 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. | ||
| 10890 | |||
| 10891 | @subsubsection Applying custom styles - the easy way | ||
| 10892 | |||
| 10893 | @enumerate | ||
| 10894 | @item | ||
| 10895 | Create a sample @file{example.org} file with the below settings and export it | ||
| 10896 | to @acronym{ODT} format. | ||
| 10897 | |||
| 10898 | @example | ||
| 10899 | #+OPTIONS: H:10 num:t | ||
| 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 | |||
| 10908 | @item | ||
| 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 | |||
| 10928 | @end enumerate | ||
| 10929 | |||
| 10930 | @subsubsection Using third-party styles and templates | ||
| 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 | ||
| 10949 | |||
| 10950 | Export of native Org mode tables (@pxref{Tables}) and simple @file{table.el} | ||
| 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. | ||
| 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 centimeters. 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 centimeters 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 | ||
| 11187 | @cindex convert | ||
| 11188 | @cindex doc, docx | ||
| 11189 | |||
| 11190 | The @acronym{ODT} exporter adds support for exporting Org outlines to formats | ||
| 11191 | that are not supported natively by Org. It also adds support to convert | ||
| 11192 | document from one format to another. To use these features, you need to | ||
| 11193 | configure a command-line converter. Once a command-line converter is | ||
| 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. | ||
| 11198 | |||
| 11199 | @vindex org-export-odt-convert | ||
| 11200 | @table @kbd | ||
| 11201 | |||
| 11202 | @item M-x org-export-odt-convert | ||
| 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. | ||
| 11209 | @end table | ||
| 11210 | |||
| 11211 | @subsubheading Pre-configured converters | ||
| 11212 | |||
| 11213 | @cindex converter | ||
| 11214 | The @acronym{ODT} exporter supports two converters out of the box: | ||
| 11215 | |||
| 11216 | @enumerate | ||
| 11217 | |||
| 11218 | @cindex @file{unoconv} | ||
| 11219 | @item @file{unoconv} | ||
| 11220 | |||
| 11221 | This converter is available as an installable package in your favorite | ||
| 11222 | distribution. | ||
| 11223 | |||
| 11224 | @cindex @file{BasicODConverter} | ||
| 11225 | @item @file{BasicODConverter} | ||
| 11226 | |||
| 11227 | @vindex org-odt-data-dir | ||
| 11228 | This converter is distributed as a LibreOffice extension and can be found in | ||
| 11229 | your Org distribution. See the subdirectory pointed to by the variable | ||
| 11230 | @code{org-odt-data-dir}. | ||
| 11231 | |||
| 11232 | @end enumerate | ||
| 11233 | |||
| 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 | ||
| 11248 | |||
| 11249 | @anchor{x-odt-converter-capabilities} | ||
| 11250 | |||
| 11251 | Specify the set of formats the converter can handle by customizing the | ||
| 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 | ||
| 11269 | |||
| 11270 | This section explores the internals of the @acronym{ODT} exporter and the | ||
| 11271 | means by which it produces styled documents. Read this section if you are | ||
| 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. | ||
| 11623 | |||
| 11624 | @c end opendocument | ||
| 11625 | |||
| 11626 | @node TaskJuggler export, Freemind export, OpenDocument Text export, Exporting | ||
| 10354 | @section TaskJuggler export | 11627 | @section TaskJuggler export |
| 10355 | @cindex TaskJuggler export | 11628 | @cindex TaskJuggler export |
| 10356 | @cindex Project management | 11629 | @cindex Project management |
| @@ -10361,12 +11634,12 @@ resource assignments based on the project outline and the constraints that | |||
| 10361 | you have provided. | 11634 | you have provided. |
| 10362 | 11635 | ||
| 10363 | 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 |
| 10364 | 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 |
| 10365 | 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 |
| 10366 | document. | 11639 | document. |
| 10367 | 11640 | ||
| 10368 | Instead the TaskJuggler exporter looks for a tree that defines the tasks and | 11641 | Instead the TaskJuggler exporter looks for a tree that defines the tasks and |
| 10369 | a optionally tree that defines the resources for this project. It then | 11642 | a optionally tree that defines the resources for this project. It then |
| 10370 | creates a TaskJuggler file based on these trees and the attributes defined in | 11643 | creates a TaskJuggler file based on these trees and the attributes defined in |
| 10371 | all the nodes. | 11644 | all the nodes. |
| 10372 | 11645 | ||
| @@ -10383,30 +11656,30 @@ Export as TaskJuggler file and then open the file with TaskJugglerUI. | |||
| 10383 | @subsection Tasks | 11656 | @subsection Tasks |
| 10384 | 11657 | ||
| 10385 | @vindex org-export-taskjuggler-project-tag | 11658 | @vindex org-export-taskjuggler-project-tag |
| 10386 | 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 |
| 10387 | task using properties (it's easiest to do this in the column view). You | 11660 | task using properties (it is easiest to do this in the column view). You |
| 10388 | 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 |
| 10389 | @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}. |
| 10390 | Now mark the top node of your tasks with a tag named | 11663 | Now mark the top node of your tasks with a tag named |
| 10391 | @code{:taskjuggler_project:} (or whatever you customized | 11664 | @code{:taskjuggler_project:} (or whatever you customized |
| 10392 | @code{org-export-taskjuggler-project-tag} to). You are now ready to export | 11665 | @code{org-export-taskjuggler-project-tag} to). You are now ready to export |
| 10393 | the project plan with @kbd{C-c C-e J} which will export the project plan and | 11666 | the project plan with @kbd{C-c C-e J} which will export the project plan and |
| 10394 | open a gantt chart in TaskJugglerUI. | 11667 | open a gantt chart in TaskJugglerUI. |
| 10395 | 11668 | ||
| 10396 | @subsection Resources | 11669 | @subsection Resources |
| 10397 | 11670 | ||
| 10398 | @vindex org-export-taskjuggler-resource-tag | 11671 | @vindex org-export-taskjuggler-resource-tag |
| 10399 | Next you can define resources and assign those to work on specific tasks. You | 11672 | Next you can define resources and assign those to work on specific tasks. You |
| 10400 | can group your resources hierarchically. Tag the top node of the resources | 11673 | can group your resources hierarchically. Tag the top node of the resources |
| 10401 | with @code{:taskjuggler_resource:} (or whatever you customized | 11674 | with @code{:taskjuggler_resource:} (or whatever you customized |
| 10402 | @code{org-export-taskjuggler-resource-tag} to). You can optionally assign an | 11675 | @code{org-export-taskjuggler-resource-tag} to). You can optionally assign an |
| 10403 | identifier (named @samp{resource_id}) to the resources (using the standard | 11676 | identifier (named @samp{resource_id}) to the resources (using the standard |
| 10404 | Org properties commands, @pxref{Property syntax}) or you can let the exporter | 11677 | Org properties commands, @pxref{Property syntax}) or you can let the exporter |
| 10405 | generate identifiers automatically (the exporter picks the first word of the | 11678 | generate identifiers automatically (the exporter picks the first word of the |
| 10406 | headline as the identifier as long as it is unique---see the documentation of | 11679 | headline as the identifier as long as it is unique---see the documentation of |
| 10407 | @code{org-taskjuggler-get-unique-id}). Using that identifier you can then | 11680 | @code{org-taskjuggler-get-unique-id}). Using that identifier you can then |
| 10408 | allocate resources to tasks. This is again done with the @samp{allocate} | 11681 | allocate resources to tasks. This is again done with the @samp{allocate} |
| 10409 | property on the tasks. Do this in column view or when on the task type | 11682 | property on the tasks. Do this in column view or when on the task type |
| 10410 | @kbd{C-c C-x p allocate @key{RET} <resource_id> @key{RET}}. | 11683 | @kbd{C-c C-x p allocate @key{RET} <resource_id> @key{RET}}. |
| 10411 | 11684 | ||
| 10412 | Once the allocations are done you can again export to TaskJuggler and check | 11685 | Once the allocations are done you can again export to TaskJuggler and check |
| @@ -10415,9 +11688,9 @@ time. | |||
| 10415 | 11688 | ||
| 10416 | @subsection Export of properties | 11689 | @subsection Export of properties |
| 10417 | 11690 | ||
| 10418 | The exporter also takes TODO state information into consideration, i.e. if a | 11691 | The exporter also takes TODO state information into consideration, i.e.@: if a |
| 10419 | task is marked as done it will have the corresponding attribute in | 11692 | task is marked as done it will have the corresponding attribute in |
| 10420 | TaskJuggler (@samp{complete 100}). Also it will export any property on a task | 11693 | TaskJuggler (@samp{complete 100}). Also it will export any property on a task |
| 10421 | resource or resource node which is known to TaskJuggler, such as | 11694 | resource or resource node which is known to TaskJuggler, such as |
| 10422 | @samp{limits}, @samp{vacation}, @samp{shift}, @samp{booking}, | 11695 | @samp{limits}, @samp{vacation}, @samp{shift}, @samp{booking}, |
| 10423 | @samp{efficiency}, @samp{journalentry}, @samp{rate} for resources or | 11696 | @samp{efficiency}, @samp{journalentry}, @samp{rate} for resources or |
| @@ -10430,12 +11703,12 @@ resource or resource node which is known to TaskJuggler, such as | |||
| 10430 | The exporter will handle dependencies that are defined in the tasks either | 11703 | The exporter will handle dependencies that are defined in the tasks either |
| 10431 | with the @samp{ORDERED} attribute (@pxref{TODO dependencies}), with the | 11704 | with the @samp{ORDERED} attribute (@pxref{TODO dependencies}), with the |
| 10432 | @samp{BLOCKER} attribute (see @file{org-depend.el}) or alternatively with a | 11705 | @samp{BLOCKER} attribute (see @file{org-depend.el}) or alternatively with a |
| 10433 | @samp{depends} attribute. Both the @samp{BLOCKER} and the @samp{depends} | 11706 | @samp{depends} attribute. Both the @samp{BLOCKER} and the @samp{depends} |
| 10434 | attribute can be either @samp{previous-sibling} or a reference to an | 11707 | attribute can be either @samp{previous-sibling} or a reference to an |
| 10435 | identifier (named @samp{task_id}) which is defined for another task in the | 11708 | identifier (named @samp{task_id}) which is defined for another task in the |
| 10436 | project. @samp{BLOCKER} and the @samp{depends} attribute can define multiple | 11709 | project. @samp{BLOCKER} and the @samp{depends} attribute can define multiple |
| 10437 | dependencies separated by either space or comma. You can also specify | 11710 | dependencies separated by either space or comma. You can also specify |
| 10438 | optional attributes on the dependency by simply appending it. The following | 11711 | optional attributes on the dependency by simply appending it. The following |
| 10439 | examples should illustrate this: | 11712 | examples should illustrate this: |
| 10440 | 11713 | ||
| 10441 | @example | 11714 | @example |
| @@ -10451,15 +11724,15 @@ examples should illustrate this: | |||
| 10451 | :END: | 11724 | :END: |
| 10452 | ** Markup Guidelines | 11725 | ** Markup Guidelines |
| 10453 | :PROPERTIES: | 11726 | :PROPERTIES: |
| 10454 | :Effort: 2.0 | 11727 | :Effort: 2d |
| 10455 | :END: | 11728 | :END: |
| 10456 | ** Workflow Guidelines | 11729 | ** Workflow Guidelines |
| 10457 | :PROPERTIES: | 11730 | :PROPERTIES: |
| 10458 | :Effort: 2.0 | 11731 | :Effort: 2d |
| 10459 | :END: | 11732 | :END: |
| 10460 | * Presentation | 11733 | * Presentation |
| 10461 | :PROPERTIES: | 11734 | :PROPERTIES: |
| 10462 | :Effort: 2.0 | 11735 | :Effort: 2d |
| 10463 | :BLOCKER: training_material @{ gapduration 1d @} preparation | 11736 | :BLOCKER: training_material @{ gapduration 1d @} preparation |
| 10464 | :END: | 11737 | :END: |
| 10465 | @end example | 11738 | @end example |
| @@ -10467,16 +11740,16 @@ examples should illustrate this: | |||
| 10467 | @subsection Reports | 11740 | @subsection Reports |
| 10468 | 11741 | ||
| 10469 | @vindex org-export-taskjuggler-default-reports | 11742 | @vindex org-export-taskjuggler-default-reports |
| 10470 | TaskJuggler can produce many kinds of reports (e.g. gantt chart, resource | 11743 | TaskJuggler can produce many kinds of reports (e.g.@: gantt chart, resource |
| 10471 | allocation, etc). The user defines what kind of reports should be generated | 11744 | allocation, etc). The user defines what kind of reports should be generated |
| 10472 | for a project in the TaskJuggler file. The exporter will automatically insert | 11745 | for a project in the TaskJuggler file. The exporter will automatically insert |
| 10473 | some default reports in the file. These defaults are defined in | 11746 | some default reports in the file. These defaults are defined in |
| 10474 | @code{org-export-taskjuggler-default-reports}. They can be modified using | 11747 | @code{org-export-taskjuggler-default-reports}. They can be modified using |
| 10475 | customize along with a number of other options. For a more complete list, see | 11748 | customize along with a number of other options. For a more complete list, see |
| 10476 | @kbd{M-x customize-group @key{RET} org-export-taskjuggler @key{RET}}. | 11749 | @kbd{M-x customize-group @key{RET} org-export-taskjuggler @key{RET}}. |
| 10477 | 11750 | ||
| 10478 | For more information and examples see the Org-taskjuggler tutorial at | 11751 | For more information and examples see the Org-taskjuggler tutorial at |
| 10479 | @uref{http://orgmode.org/worg/org-tutorials/org-taskjuggler.php}. | 11752 | @uref{http://orgmode.org/worg/org-tutorials/org-taskjuggler.html}. |
| 10480 | 11753 | ||
| 10481 | @node Freemind export, XOXO export, TaskJuggler export, Exporting | 11754 | @node Freemind export, XOXO export, TaskJuggler export, Exporting |
| 10482 | @section Freemind export | 11755 | @section Freemind export |
| @@ -10487,20 +11760,22 @@ The Freemind exporter was written by Lennart Borgman. | |||
| 10487 | 11760 | ||
| 10488 | @table @kbd | 11761 | @table @kbd |
| 10489 | @orgcmd{C-c C-e m,org-export-as-freemind} | 11762 | @orgcmd{C-c C-e m,org-export-as-freemind} |
| 10490 | Export as Freemind mind map @file{myfile.mm}. | 11763 | Export as Freemind mind map. For an Org file @file{myfile.org}, the Freemind |
| 11764 | file will be @file{myfile.mm}. | ||
| 10491 | @end table | 11765 | @end table |
| 10492 | 11766 | ||
| 10493 | @node XOXO export, iCalendar export, Freemind export, Exporting | 11767 | @node XOXO export, iCalendar export, Freemind export, Exporting |
| 10494 | @section XOXO export | 11768 | @section XOXO export |
| 10495 | @cindex XOXO export | 11769 | @cindex XOXO export |
| 10496 | 11770 | ||
| 10497 | Org-mode contains an exporter that produces XOXO-style output. | 11771 | Org mode contains an exporter that produces XOXO-style output. |
| 10498 | Currently, this exporter only handles the general outline structure and | 11772 | Currently, this exporter only handles the general outline structure and |
| 10499 | does not interpret any additional Org-mode features. | 11773 | does not interpret any additional Org mode features. |
| 10500 | 11774 | ||
| 10501 | @table @kbd | 11775 | @table @kbd |
| 10502 | @orgcmd{C-c C-e x,org-export-as-xoxo} | 11776 | @orgcmd{C-c C-e x,org-export-as-xoxo} |
| 10503 | Export as XOXO file @file{myfile.html}. | 11777 | Export as XOXO file. For an Org file @file{myfile.org}, the XOXO file will be |
| 11778 | @file{myfile.html}. | ||
| 10504 | @orgkey{C-c C-e v x} | 11779 | @orgkey{C-c C-e v x} |
| 10505 | Export only the visible part of the document. | 11780 | Export only the visible part of the document. |
| 10506 | @end table | 11781 | @end table |
| @@ -10514,10 +11789,10 @@ Export only the visible part of the document. | |||
| 10514 | @vindex org-icalendar-use-scheduled | 11789 | @vindex org-icalendar-use-scheduled |
| 10515 | @vindex org-icalendar-categories | 11790 | @vindex org-icalendar-categories |
| 10516 | @vindex org-icalendar-alarm-time | 11791 | @vindex org-icalendar-alarm-time |
| 10517 | 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 |
| 10518 | standard calendar application for anniversaries and appointments. In this | 11793 | standard calendar application for anniversaries and appointments. In this |
| 10519 | 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 |
| 10520 | files in the calendar application. Org-mode can export calendar information | 11795 | files in the calendar application. Org mode can export calendar information |
| 10521 | 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 |
| 10522 | included in the export, configure the variable | 11797 | included in the export, configure the variable |
| 10523 | @code{org-icalendar-include-todo}. Plain timestamps are exported as VEVENT, | 11798 | @code{org-icalendar-include-todo}. Plain timestamps are exported as VEVENT, |
| @@ -10607,7 +11882,7 @@ and many other properties of a project. | |||
| 10607 | * Sources and destinations:: From here to there | 11882 | * Sources and destinations:: From here to there |
| 10608 | * Selecting files:: What files are part of the project? | 11883 | * Selecting files:: What files are part of the project? |
| 10609 | * Publishing action:: Setting the function doing the publishing | 11884 | * Publishing action:: Setting the function doing the publishing |
| 10610 | * Publishing options:: Tweaking HTML export | 11885 | * Publishing options:: Tweaking HTML/@LaTeX{} export |
| 10611 | * Publishing links:: Which links keep working after publishing? | 11886 | * Publishing links:: Which links keep working after publishing? |
| 10612 | * Sitemap:: Generating a list of all pages | 11887 | * Sitemap:: Generating a list of all pages |
| 10613 | * Generating an index:: An index that reaches across pages | 11888 | * Generating an index:: An index that reaches across pages |
| @@ -10624,8 +11899,8 @@ variable, called @code{org-publish-project-alist}. Each element of the list | |||
| 10624 | configures one project, and may be in one of the two following forms: | 11899 | configures one project, and may be in one of the two following forms: |
| 10625 | 11900 | ||
| 10626 | @lisp | 11901 | @lisp |
| 10627 | ("project-name" :property value :property value ...) | 11902 | ("project-name" :property value :property value ...) |
| 10628 | @r{i.e. a well-formed property list with alternating keys and values} | 11903 | @r{i.e.@: a well-formed property list with alternating keys and values} |
| 10629 | @r{or} | 11904 | @r{or} |
| 10630 | ("project-name" :components ("project-name" "project-name" ...)) | 11905 | ("project-name" :components ("project-name" "project-name" ...)) |
| 10631 | 11906 | ||
| @@ -10762,6 +12037,8 @@ respective variable for details. | |||
| 10762 | @vindex org-export-with-drawers | 12037 | @vindex org-export-with-drawers |
| 10763 | @vindex org-export-with-tags | 12038 | @vindex org-export-with-tags |
| 10764 | @vindex org-export-with-todo-keywords | 12039 | @vindex org-export-with-todo-keywords |
| 12040 | @vindex org-export-with-tasks | ||
| 12041 | @vindex org-export-with-done-tasks | ||
| 10765 | @vindex org-export-with-priority | 12042 | @vindex org-export-with-priority |
| 10766 | @vindex org-export-with-TeX-macros | 12043 | @vindex org-export-with-TeX-macros |
| 10767 | @vindex org-export-with-LaTeX-fragments | 12044 | @vindex org-export-with-LaTeX-fragments |
| @@ -10769,11 +12046,13 @@ respective variable for details. | |||
| 10769 | @vindex org-export-with-fixed-width | 12046 | @vindex org-export-with-fixed-width |
| 10770 | @vindex org-export-with-timestamps | 12047 | @vindex org-export-with-timestamps |
| 10771 | @vindex org-export-author-info | 12048 | @vindex org-export-author-info |
| 10772 | @vindex org-export-email | 12049 | @vindex org-export-email-info |
| 10773 | @vindex org-export-creator-info | 12050 | @vindex org-export-creator-info |
| 12051 | @vindex org-export-time-stamp-file | ||
| 10774 | @vindex org-export-with-tables | 12052 | @vindex org-export-with-tables |
| 10775 | @vindex org-export-highlight-first-table-line | 12053 | @vindex org-export-highlight-first-table-line |
| 10776 | @vindex org-export-html-style-include-default | 12054 | @vindex org-export-html-style-include-default |
| 12055 | @vindex org-export-html-style-include-scripts | ||
| 10777 | @vindex org-export-html-style | 12056 | @vindex org-export-html-style |
| 10778 | @vindex org-export-html-style-extra | 12057 | @vindex org-export-html-style-extra |
| 10779 | @vindex org-export-html-link-org-files-as-html | 12058 | @vindex org-export-html-link-org-files-as-html |
| @@ -10785,8 +12064,6 @@ respective variable for details. | |||
| 10785 | @vindex org-export-publishing-directory | 12064 | @vindex org-export-publishing-directory |
| 10786 | @vindex org-export-html-preamble | 12065 | @vindex org-export-html-preamble |
| 10787 | @vindex org-export-html-postamble | 12066 | @vindex org-export-html-postamble |
| 10788 | @vindex org-export-html-auto-preamble | ||
| 10789 | @vindex org-export-html-auto-postamble | ||
| 10790 | @vindex user-full-name | 12067 | @vindex user-full-name |
| 10791 | @vindex user-mail-address | 12068 | @vindex user-mail-address |
| 10792 | @vindex org-export-select-tags | 12069 | @vindex org-export-select-tags |
| @@ -10810,6 +12087,7 @@ respective variable for details. | |||
| 10810 | @item @code{:drawers} @tab @code{org-export-with-drawers} | 12087 | @item @code{:drawers} @tab @code{org-export-with-drawers} |
| 10811 | @item @code{:tags} @tab @code{org-export-with-tags} | 12088 | @item @code{:tags} @tab @code{org-export-with-tags} |
| 10812 | @item @code{:todo-keywords} @tab @code{org-export-with-todo-keywords} | 12089 | @item @code{:todo-keywords} @tab @code{org-export-with-todo-keywords} |
| 12090 | @item @code{:tasks} @tab @code{org-export-with-tasks} | ||
| 10813 | @item @code{:priority} @tab @code{org-export-with-priority} | 12091 | @item @code{:priority} @tab @code{org-export-with-priority} |
| 10814 | @item @code{:TeX-macros} @tab @code{org-export-with-TeX-macros} | 12092 | @item @code{:TeX-macros} @tab @code{org-export-with-TeX-macros} |
| 10815 | @item @code{:LaTeX-fragments} @tab @code{org-export-with-LaTeX-fragments} | 12093 | @item @code{:LaTeX-fragments} @tab @code{org-export-with-LaTeX-fragments} |
| @@ -10817,28 +12095,27 @@ respective variable for details. | |||
| 10817 | @item @code{:skip-before-1st-heading} @tab @code{org-export-skip-text-before-1st-heading} | 12095 | @item @code{:skip-before-1st-heading} @tab @code{org-export-skip-text-before-1st-heading} |
| 10818 | @item @code{:fixed-width} @tab @code{org-export-with-fixed-width} | 12096 | @item @code{:fixed-width} @tab @code{org-export-with-fixed-width} |
| 10819 | @item @code{:timestamps} @tab @code{org-export-with-timestamps} | 12097 | @item @code{:timestamps} @tab @code{org-export-with-timestamps} |
| 12098 | @item @code{:author} @tab @code{user-full-name} | ||
| 12099 | @item @code{:email} @tab @code{user-mail-address} : @code{addr;addr;..} | ||
| 10820 | @item @code{:author-info} @tab @code{org-export-author-info} | 12100 | @item @code{:author-info} @tab @code{org-export-author-info} |
| 10821 | @item @code{:email-info} @tab @code{org-export-email-info} | 12101 | @item @code{:email-info} @tab @code{org-export-email-info} |
| 10822 | @item @code{:creator-info} @tab @code{org-export-creator-info} | 12102 | @item @code{:creator-info} @tab @code{org-export-creator-info} |
| 10823 | @item @code{:tables} @tab @code{org-export-with-tables} | 12103 | @item @code{:tables} @tab @code{org-export-with-tables} |
| 10824 | @item @code{:table-auto-headline} @tab @code{org-export-highlight-first-table-line} | 12104 | @item @code{:table-auto-headline} @tab @code{org-export-highlight-first-table-line} |
| 10825 | @item @code{:style-include-default} @tab @code{org-export-html-style-include-default} | 12105 | @item @code{:style-include-default} @tab @code{org-export-html-style-include-default} |
| 12106 | @item @code{:style-include-scripts} @tab @code{org-export-html-style-include-scripts} | ||
| 10826 | @item @code{:style} @tab @code{org-export-html-style} | 12107 | @item @code{:style} @tab @code{org-export-html-style} |
| 10827 | @item @code{:style-extra} @tab @code{org-export-html-style-extra} | 12108 | @item @code{:style-extra} @tab @code{org-export-html-style-extra} |
| 10828 | @item @code{:convert-org-links} @tab @code{org-export-html-link-org-files-as-html} | 12109 | @item @code{:convert-org-links} @tab @code{org-export-html-link-org-files-as-html} |
| 10829 | @item @code{:inline-images} @tab @code{org-export-html-inline-images} | 12110 | @item @code{:inline-images} @tab @code{org-export-html-inline-images} |
| 10830 | @item @code{:html-extension} @tab @code{org-export-html-extension} | 12111 | @item @code{:html-extension} @tab @code{org-export-html-extension} |
| 12112 | @item @code{:html-preamble} @tab @code{org-export-html-preamble} | ||
| 12113 | @item @code{:html-postamble} @tab @code{org-export-html-postamble} | ||
| 10831 | @item @code{:xml-declaration} @tab @code{org-export-html-xml-declaration} | 12114 | @item @code{:xml-declaration} @tab @code{org-export-html-xml-declaration} |
| 10832 | @item @code{:html-table-tag} @tab @code{org-export-html-table-tag} | 12115 | @item @code{:html-table-tag} @tab @code{org-export-html-table-tag} |
| 10833 | @item @code{:expand-quoted-html} @tab @code{org-export-html-expand} | 12116 | @item @code{:expand-quoted-html} @tab @code{org-export-html-expand} |
| 10834 | @item @code{:timestamp} @tab @code{org-export-html-with-timestamp} | 12117 | @item @code{:timestamp} @tab @code{org-export-html-with-timestamp} |
| 10835 | @item @code{:publishing-directory} @tab @code{org-export-publishing-directory} | 12118 | @item @code{:publishing-directory} @tab @code{org-export-publishing-directory} |
| 10836 | @item @code{:preamble} @tab @code{org-export-html-preamble} | ||
| 10837 | @item @code{:postamble} @tab @code{org-export-html-postamble} | ||
| 10838 | @item @code{:auto-preamble} @tab @code{org-export-html-auto-preamble} | ||
| 10839 | @item @code{:auto-postamble} @tab @code{org-export-html-auto-postamble} | ||
| 10840 | @item @code{:author} @tab @code{user-full-name} | ||
| 10841 | @item @code{:email} @tab @code{user-mail-address} : @code{addr;addr;..} | ||
| 10842 | @item @code{:select-tags} @tab @code{org-export-select-tags} | 12119 | @item @code{:select-tags} @tab @code{org-export-select-tags} |
| 10843 | @item @code{:exclude-tags} @tab @code{org-export-exclude-tags} | 12120 | @item @code{:exclude-tags} @tab @code{org-export-exclude-tags} |
| 10844 | @item @code{:latex-image-options} @tab @code{org-export-latex-image-default-option} | 12121 | @item @code{:latex-image-options} @tab @code{org-export-latex-image-default-option} |
| @@ -10846,8 +12123,11 @@ respective variable for details. | |||
| 10846 | 12123 | ||
| 10847 | Most of the @code{org-export-with-*} variables have the same effect in | 12124 | Most of the @code{org-export-with-*} variables have the same effect in |
| 10848 | both HTML and @LaTeX{} exporters, except for @code{:TeX-macros} and | 12125 | both HTML and @LaTeX{} exporters, except for @code{:TeX-macros} and |
| 10849 | @code{:LaTeX-fragments}, respectively @code{nil} and @code{t} in the | 12126 | @code{:LaTeX-fragments} options, respectively @code{nil} and @code{t} in the |
| 10850 | @LaTeX{} export. | 12127 | @LaTeX{} export. See @code{org-export-plist-vars} to check this list of |
| 12128 | options. | ||
| 12129 | |||
| 12130 | |||
| 10851 | 12131 | ||
| 10852 | @vindex org-publish-project-alist | 12132 | @vindex org-publish-project-alist |
| 10853 | When a property is given a value in @code{org-publish-project-alist}, | 12133 | When a property is given a value in @code{org-publish-project-alist}, |
| @@ -10869,9 +12149,9 @@ to link to that, use an @code{http:} link instead of a @code{file:} link, | |||
| 10869 | because @code{file:} links are converted to link to the corresponding | 12149 | because @code{file:} links are converted to link to the corresponding |
| 10870 | @file{html} file. | 12150 | @file{html} file. |
| 10871 | 12151 | ||
| 10872 | You may also link to related files, such as images. Provided you are careful | 12152 | You may also link to related files, such as images. Provided you are careful |
| 10873 | with relative file names, and provided you have also configured Org to upload | 12153 | with relative file names, and provided you have also configured Org to upload |
| 10874 | the related files, these links will work too. See @ref{Complex example}, for | 12154 | the related files, these links will work too. See @ref{Complex example}, for |
| 10875 | an example of this usage. | 12155 | an example of this usage. |
| 10876 | 12156 | ||
| 10877 | Sometimes an Org file to be published may contain links that are | 12157 | Sometimes an Org file to be published may contain links that are |
| @@ -10905,11 +12185,11 @@ a map of files for a given project. | |||
| 10905 | or @code{org-publish-all}. | 12185 | or @code{org-publish-all}. |
| 10906 | 12186 | ||
| 10907 | @item @code{:sitemap-filename} | 12187 | @item @code{:sitemap-filename} |
| 10908 | @tab Filename for output of sitemap. Defaults to @file{sitemap.org} (which | 12188 | @tab Filename for output of sitemap. Defaults to @file{sitemap.org} (which |
| 10909 | becomes @file{sitemap.html}). | 12189 | becomes @file{sitemap.html}). |
| 10910 | 12190 | ||
| 10911 | @item @code{:sitemap-title} | 12191 | @item @code{:sitemap-title} |
| 10912 | @tab Title of sitemap page. Defaults to name of file. | 12192 | @tab Title of sitemap page. Defaults to name of file. |
| 10913 | 12193 | ||
| 10914 | @item @code{:sitemap-function} | 12194 | @item @code{:sitemap-function} |
| 10915 | @tab Plug-in function to use for generation of the sitemap. | 12195 | @tab Plug-in function to use for generation of the sitemap. |
| @@ -10921,20 +12201,42 @@ of links to all files in the project. | |||
| 10921 | (default) or @code{last} to display folders first or last, | 12201 | (default) or @code{last} to display folders first or last, |
| 10922 | respectively. Any other value will mix files and folders. | 12202 | respectively. Any other value will mix files and folders. |
| 10923 | 12203 | ||
| 10924 | @item @code{:sitemap-alphabetically} | 12204 | @item @code{:sitemap-sort-files} |
| 10925 | @tab The site map is normally sorted alphabetically. Set this explicitly to | 12205 | @tab How the files are sorted in the site map. Set this to |
| 10926 | @code{nil} to turn off sorting. | 12206 | @code{alphabetically} (default), @code{chronologically} or |
| 12207 | @code{anti-chronologically}. @code{chronologically} sorts the files with | ||
| 12208 | older date first while @code{anti-chronologically} sorts the files with newer | ||
| 12209 | date first. @code{alphabetically} sorts the files alphabetically. The date of | ||
| 12210 | a file is retrieved with @code{org-publish-find-date}. | ||
| 10927 | 12211 | ||
| 10928 | @item @code{:sitemap-ignore-case} | 12212 | @item @code{:sitemap-ignore-case} |
| 10929 | @tab Should sorting be case-sensitive? Default @code{nil}. | 12213 | @tab Should sorting be case-sensitive? Default @code{nil}. |
| 10930 | 12214 | ||
| 12215 | @item @code{:sitemap-file-entry-format} | ||
| 12216 | @tab With this option one can tell how a sitemap's entry is formatted in the | ||
| 12217 | sitemap. This is a format string with some escape sequences: @code{%t} stands | ||
| 12218 | for the title of the file, @code{%a} stands for the author of the file and | ||
| 12219 | @code{%d} stands for the date of the file. The date is retrieved with the | ||
| 12220 | @code{org-publish-find-date} function and formatted with | ||
| 12221 | @code{org-publish-sitemap-date-format}. Default @code{%t}. | ||
| 12222 | |||
| 12223 | @item @code{:sitemap-date-format} | ||
| 12224 | @tab Format string for the @code{format-time-string} function that tells how | ||
| 12225 | a sitemap entry's date is to be formatted. This property bypasses | ||
| 12226 | @code{org-publish-sitemap-date-format} which defaults to @code{%Y-%m-%d}. | ||
| 12227 | |||
| 12228 | @item @code{:sitemap-sans-extension} | ||
| 12229 | @tab When non-nil, remove filenames' extensions from the generated sitemap. | ||
| 12230 | Useful to have cool URIs (see @uref{http://www.w3.org/Provider/Style/URI}). | ||
| 12231 | Defaults to @code{nil}. | ||
| 12232 | |||
| 10931 | @end multitable | 12233 | @end multitable |
| 10932 | 12234 | ||
| 10933 | @node Generating an index, , Sitemap, Configuration | 12235 | @node Generating an index, , Sitemap, Configuration |
| 10934 | @subsection Generating an index | 12236 | @subsection Generating an index |
| 10935 | @cindex index, in a publishing project | 12237 | @cindex index, in a publishing project |
| 10936 | 12238 | ||
| 10937 | 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. |
| 10938 | 12240 | ||
| 10939 | @multitable @columnfractions 0.25 0.75 | 12241 | @multitable @columnfractions 0.25 0.75 |
| 10940 | @item @code{:makeindex} | 12242 | @item @code{:makeindex} |
| @@ -10942,10 +12244,10 @@ Org-mode can generate an index across the files of a publishing project. | |||
| 10942 | publish it as @file{theindex.html}. | 12244 | publish it as @file{theindex.html}. |
| 10943 | @end multitable | 12245 | @end multitable |
| 10944 | 12246 | ||
| 10945 | The file will be create when first publishing a project with the | 12247 | The file will be created when first publishing a project with the |
| 10946 | @code{:makeindex} set. The file only contains a statement @code{#+include: | 12248 | @code{:makeindex} set. The file only contains a statement @code{#+include: |
| 10947 | "theindex.inc"}. You can then built around this include statement by adding | 12249 | "theindex.inc"}. You can then build around this include statement by adding |
| 10948 | a title, style information etc. | 12250 | a title, style information, etc. |
| 10949 | 12251 | ||
| 10950 | @node Uploading files, Sample configuration, Configuration, Publishing | 12252 | @node Uploading files, Sample configuration, Configuration, Publishing |
| 10951 | @section Uploading files | 12253 | @section Uploading files |
| @@ -10954,7 +12256,7 @@ a title, style information etc. | |||
| 10954 | 12256 | ||
| 10955 | For those people already utilizing third party sync tools such as | 12257 | For those people already utilizing third party sync tools such as |
| 10956 | @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 |
| 10957 | @i{remote} publishing facilities of Org-mode which rely heavily on | 12259 | @i{remote} publishing facilities of Org mode which rely heavily on |
| 10958 | Tramp. Tramp, while very useful and powerful, tends not to be | 12260 | Tramp. Tramp, while very useful and powerful, tends not to be |
| 10959 | 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 |
| 10960 | under heavy usage. | 12262 | under heavy usage. |
| @@ -11015,12 +12317,12 @@ directory on the local machine. | |||
| 11015 | 12317 | ||
| 11016 | This more complicated example publishes an entire website, including | 12318 | This more complicated example publishes an entire website, including |
| 11017 | Org files converted to HTML, image files, Emacs Lisp source code, and | 12319 | Org files converted to HTML, image files, Emacs Lisp source code, and |
| 11018 | style sheets. The publishing directory is remote and private files are | 12320 | style sheets. The publishing directory is remote and private files are |
| 11019 | excluded. | 12321 | excluded. |
| 11020 | 12322 | ||
| 11021 | To ensure that links are preserved, care should be taken to replicate | 12323 | To ensure that links are preserved, care should be taken to replicate |
| 11022 | your directory structure on the web server, and to use relative file | 12324 | your directory structure on the web server, and to use relative file |
| 11023 | paths. For example, if your Org files are kept in @file{~/org} and your | 12325 | paths. For example, if your Org files are kept in @file{~/org} and your |
| 11024 | publishable images in @file{~/images}, you would link to an image with | 12326 | publishable images in @file{~/images}, you would link to an image with |
| 11025 | @c | 12327 | @c |
| 11026 | @example | 12328 | @example |
| @@ -11028,7 +12330,7 @@ file:../images/myimage.png | |||
| 11028 | @end example | 12330 | @end example |
| 11029 | @c | 12331 | @c |
| 11030 | On the web server, the relative path to the image should be the | 12332 | On the web server, the relative path to the image should be the |
| 11031 | same. You can accomplish this by setting up an "images" folder in the | 12333 | same. You can accomplish this by setting up an "images" folder in the |
| 11032 | right place on the web server, and publishing images to it. | 12334 | right place on the web server, and publishing images to it. |
| 11033 | 12335 | ||
| 11034 | @lisp | 12336 | @lisp |
| @@ -11044,8 +12346,7 @@ right place on the web server, and publishing images to it. | |||
| 11044 | :table-of-contents nil | 12346 | :table-of-contents nil |
| 11045 | :style "<link rel=\"stylesheet\" | 12347 | :style "<link rel=\"stylesheet\" |
| 11046 | href=\"../other/mystyle.css\" type=\"text/css\"/>" | 12348 | href=\"../other/mystyle.css\" type=\"text/css\"/>" |
| 11047 | :auto-preamble t | 12349 | :html-preamble t) |
| 11048 | :auto-postamble nil) | ||
| 11049 | 12350 | ||
| 11050 | ("images" | 12351 | ("images" |
| 11051 | :base-directory "~/images/" | 12352 | :base-directory "~/images/" |
| @@ -11078,8 +12379,8 @@ Publish every project. | |||
| 11078 | @end table | 12379 | @end table |
| 11079 | 12380 | ||
| 11080 | @vindex org-publish-use-timestamps-flag | 12381 | @vindex org-publish-use-timestamps-flag |
| 11081 | Org uses timestamps to track when a file has changed. The above functions | 12382 | Org uses timestamps to track when a file has changed. The above functions |
| 11082 | normally only publish changed files. You can override this and force | 12383 | normally only publish changed files. You can override this and force |
| 11083 | publishing of all files by giving a prefix argument to any of the commands | 12384 | publishing of all files by giving a prefix argument to any of the commands |
| 11084 | above, or by customizing the variable @code{org-publish-use-timestamps-flag}. | 12385 | above, or by customizing the variable @code{org-publish-use-timestamps-flag}. |
| 11085 | This may be necessary in particular if files include other files via | 12386 | This may be necessary in particular if files include other files via |
| @@ -11094,8 +12395,8 @@ This may be necessary in particular if files include other files via | |||
| 11094 | @cindex Davison, Dan | 12395 | @cindex Davison, Dan |
| 11095 | @cindex source code, working with | 12396 | @cindex source code, working with |
| 11096 | 12397 | ||
| 11097 | 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, |
| 11098 | e.g. | 12399 | e.g.@: |
| 11099 | 12400 | ||
| 11100 | @example | 12401 | @example |
| 11101 | #+BEGIN_SRC emacs-lisp | 12402 | #+BEGIN_SRC emacs-lisp |
| @@ -11105,25 +12406,26 @@ e.g. | |||
| 11105 | #+END_SRC | 12406 | #+END_SRC |
| 11106 | @end example | 12407 | @end example |
| 11107 | 12408 | ||
| 11108 | 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, |
| 11109 | 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 |
| 11110 | code blocks, tangling of code blocks, and exporting code blocks and their | 12411 | code blocks, converting code blocks into source files (known as @dfn{tangling} |
| 12412 | in literate programming), and exporting code blocks and their | ||
| 11111 | results in several formats. This functionality was contributed by Eric | 12413 | results in several formats. This functionality was contributed by Eric |
| 11112 | Schulte and Dan Davison, and was originally named Org-babel. | 12414 | Schulte and Dan Davison, and was originally named Org-babel. |
| 11113 | 12415 | ||
| 11114 | The following sections describe Org-mode's code block handling facilities. | 12416 | The following sections describe Org mode's code block handling facilities. |
| 11115 | 12417 | ||
| 11116 | @menu | 12418 | @menu |
| 11117 | * Structure of code blocks:: Code block syntax described | 12419 | * Structure of code blocks:: Code block syntax described |
| 11118 | * Editing source code:: Language major-mode editing | 12420 | * Editing source code:: Language major-mode editing |
| 11119 | * Exporting code blocks:: Export contents and/or results | 12421 | * Exporting code blocks:: Export contents and/or results |
| 11120 | * Extracting source code:: Create pure source code files | 12422 | * Extracting source code:: Create pure source code files |
| 11121 | * 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 |
| 11122 | * 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 |
| 11123 | * Languages:: List of supported code block languages | 12425 | * Languages:: List of supported code block languages |
| 11124 | * Header arguments:: Configure code block functionality | 12426 | * Header arguments:: Configure code block functionality |
| 11125 | * Results of evaluation:: How evaluation results are handled | 12427 | * Results of evaluation:: How evaluation results are handled |
| 11126 | * Noweb reference syntax:: Literate programming in Org-mode | 12428 | * Noweb reference syntax:: Literate programming in Org mode |
| 11127 | * Key bindings and useful functions:: Work quickly with code blocks | 12429 | * Key bindings and useful functions:: Work quickly with code blocks |
| 11128 | * Batch execution:: Call functions from the command line | 12430 | * Batch execution:: Call functions from the command line |
| 11129 | @end menu | 12431 | @end menu |
| @@ -11135,17 +12437,26 @@ The following sections describe Org-mode's code block handling facilities. | |||
| 11135 | @section Structure of code blocks | 12437 | @section Structure of code blocks |
| 11136 | @cindex code block, structure | 12438 | @cindex code block, structure |
| 11137 | @cindex source code, block structure | 12439 | @cindex source code, block structure |
| 12440 | @cindex #+NAME | ||
| 12441 | @cindex #+BEGIN_SRC | ||
| 11138 | 12442 | ||
| 11139 | 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 | ||
| 11140 | 12446 | ||
| 11141 | @example | 12447 | @example |
| 11142 | #+srcname: <name> | 12448 | #+NAME: <name> |
| 11143 | #+begin_src <language> <switches> <header arguments> | 12449 | #+BEGIN_SRC <language> <switches> <header arguments> |
| 11144 | <body> | 12450 | <body> |
| 11145 | #+end_src | 12451 | #+END_SRC |
| 11146 | @end example | 12452 | @end example |
| 11147 | 12453 | ||
| 11148 | code blocks can also be embedded in text as so called inline code blocks as | 12454 | The @code{#+NAME:} line is optional, and can be used to name the code |
| 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 | ||
| 11149 | 12460 | ||
| 11150 | @example | 12461 | @example |
| 11151 | src_<language>@{<body>@} | 12462 | src_<language>@{<body>@} |
| @@ -11158,24 +12469,30 @@ src_<language>[<header arguments>]@{<body>@} | |||
| 11158 | @end example | 12469 | @end example |
| 11159 | 12470 | ||
| 11160 | @table @code | 12471 | @table @code |
| 11161 | @item <name> | 12472 | @item <#+NAME: name> |
| 11162 | 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 |
| 11163 | @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 |
| 11164 | 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 |
| 11165 | 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 |
| 11166 | formulas (see @ref{The spreadsheet}). | 12477 | table formulas (see @ref{The spreadsheet}). Names are assumed to be unique |
| 12478 | and the behavior of Org mode when two or more blocks share the same name is | ||
| 12479 | undefined. | ||
| 12480 | @cindex #+NAME | ||
| 11167 | @item <language> | 12481 | @item <language> |
| 11168 | 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 | ||
| 11169 | @item <switches> | 12484 | @item <switches> |
| 11170 | Switches controlling exportation of the code block (see switches discussion in | 12485 | Optional switches control code block export (see the discussion of switches in |
| 11171 | @ref{Literal examples}) | 12486 | @ref{Literal examples}) |
| 12487 | @cindex source code, switches | ||
| 11172 | @item <header arguments> | 12488 | @item <header arguments> |
| 11173 | Optional header arguments control many aspects of evaluation, export and | 12489 | Optional header arguments control many aspects of evaluation, export and |
| 11174 | tangling of code blocks. See the @ref{Header arguments} | 12490 | tangling of code blocks (see @ref{Header arguments}). |
| 11175 | section. 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 |
| 11176 | basis using properties. | 12492 | basis using properties. |
| 12493 | @item source code, header arguments | ||
| 11177 | @item <body> | 12494 | @item <body> |
| 11178 | The source code. | 12495 | Source code in the specified language. |
| 11179 | @end table | 12496 | @end table |
| 11180 | 12497 | ||
| 11181 | @comment node-name, next, previous, up | 12498 | @comment node-name, next, previous, up |
| @@ -11187,21 +12504,21 @@ The source code. | |||
| 11187 | @cindex source code, editing | 12504 | @cindex source code, editing |
| 11188 | 12505 | ||
| 11189 | @kindex C-c ' | 12506 | @kindex C-c ' |
| 11190 | Use @kbd{C-c '} to edit the current code block. This brings up | 12507 | Use @kbd{C-c '} to edit the current code block. This brings up |
| 11191 | a language major-mode edit buffer containing the body of the code | 12508 | a language major-mode edit buffer containing the body of the code |
| 11192 | block. Saving this buffer will write the new contents back to the Org | 12509 | block. Saving this buffer will write the new contents back to the Org |
| 11193 | buffer. Use @kbd{C-c '} again to exit. | 12510 | buffer. Use @kbd{C-c '} again to exit. |
| 11194 | 12511 | ||
| 11195 | The @code{org-src-mode} minor mode will be active in the edit buffer. The | 12512 | The @code{org-src-mode} minor mode will be active in the edit buffer. The |
| 11196 | following variables can be used to configure the behavior of the edit | 12513 | following variables can be used to configure the behavior of the edit |
| 11197 | buffer. See also the customization group @code{org-edit-structure} for | 12514 | buffer. See also the customization group @code{org-edit-structure} for |
| 11198 | further configuration options. | 12515 | further configuration options. |
| 11199 | 12516 | ||
| 11200 | @table @code | 12517 | @table @code |
| 11201 | @item org-src-lang-modes | 12518 | @item org-src-lang-modes |
| 11202 | If an Emacs major-mode named @code{<lang>-mode} exists, where | 12519 | If an Emacs major-mode named @code{<lang>-mode} exists, where |
| 11203 | @code{<lang>} is the language named in the header line of the code block, | 12520 | @code{<lang>} is the language named in the header line of the code block, |
| 11204 | then the edit buffer will be placed in that major-mode. This variable | 12521 | then the edit buffer will be placed in that major-mode. This variable |
| 11205 | can be used to map arbitrary language names to existing major modes. | 12522 | can be used to map arbitrary language names to existing major modes. |
| 11206 | @item org-src-window-setup | 12523 | @item org-src-window-setup |
| 11207 | Controls the way Emacs windows are rearranged when the edit buffer is created. | 12524 | Controls the way Emacs windows are rearranged when the edit buffer is created. |
| @@ -11209,10 +12526,13 @@ Controls the way Emacs windows are rearranged when the edit buffer is created. | |||
| 11209 | This variable is especially useful for tangling languages such as | 12526 | This variable is especially useful for tangling languages such as |
| 11210 | Python, in which whitespace indentation in the output is critical. | 12527 | Python, in which whitespace indentation in the output is critical. |
| 11211 | @item org-src-ask-before-returning-to-edit-buffer | 12528 | @item org-src-ask-before-returning-to-edit-buffer |
| 11212 | By default, Org will ask before returning to an open edit buffer. Set | 12529 | By default, Org will ask before returning to an open edit buffer. Set this |
| 11213 | this variable to nil to switch without asking. | 12530 | variable to nil to switch without asking. |
| 11214 | @end table | 12531 | @end table |
| 11215 | 12532 | ||
| 12533 | To turn on native code fontification in the @emph{Org} buffer, configure the | ||
| 12534 | variable @code{org-src-fontify-natively}. | ||
| 12535 | |||
| 11216 | @comment node-name, next, previous, up | 12536 | @comment node-name, next, previous, up |
| 11217 | @comment Exporting code blocks, Extracting source code, Editing source code, Working With Source Code | 12537 | @comment Exporting code blocks, Extracting source code, Editing source code, Working With Source Code |
| 11218 | 12538 | ||
| @@ -11221,12 +12541,12 @@ this variable to nil to switch without asking. | |||
| 11221 | @cindex code block, exporting | 12541 | @cindex code block, exporting |
| 11222 | @cindex source code, exporting | 12542 | @cindex source code, exporting |
| 11223 | 12543 | ||
| 11224 | 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} |
| 11225 | @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 |
| 11226 | most languages, the default exports the contents of code blocks. However, for | 12546 | evaluation, or @emph{none}. For most languages, the default exports code. |
| 11227 | 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 |
| 11228 | block evaluation. For information on exporting code block bodies, see | 12548 | results of code block evaluation. For information on exporting code block |
| 11229 | @ref{Literal examples}. | 12549 | bodies, see @ref{Literal examples}. |
| 11230 | 12550 | ||
| 11231 | The @code{:exports} header argument can be used to specify export | 12551 | The @code{:exports} header argument can be used to specify export |
| 11232 | behavior: | 12552 | behavior: |
| @@ -11234,11 +12554,11 @@ behavior: | |||
| 11234 | @subsubheading Header arguments: | 12554 | @subsubheading Header arguments: |
| 11235 | @table @code | 12555 | @table @code |
| 11236 | @item :exports code | 12556 | @item :exports code |
| 11237 | The default in most languages. The body of the code block is exported, as | 12557 | The default in most languages. The body of the code block is exported, as |
| 11238 | described in @ref{Literal examples}. | 12558 | described in @ref{Literal examples}. |
| 11239 | @item :exports results | 12559 | @item :exports results |
| 11240 | 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 |
| 11241 | 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 |
| 11242 | 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, |
| 11243 | 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 |
| 11244 | block will not be exported. | 12564 | block will not be exported. |
| @@ -11251,14 +12571,15 @@ Neither the code block nor its results will be exported. | |||
| 11251 | 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. |
| 11252 | 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 |
| 11253 | 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 |
| 11254 | 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 |
| 11255 | 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 |
| 11256 | markup language for a wiki. | 12576 | markup language for a wiki. |
| 11257 | 12577 | ||
| 11258 | @comment node-name, next, previous, up | 12578 | @comment node-name, next, previous, up |
| 11259 | @comment Extracting source code, Evaluating code blocks, Exporting code blocks, Working With Source Code | 12579 | @comment Extracting source code, Evaluating code blocks, Exporting code blocks, Working With Source Code |
| 11260 | @node Extracting source code, Evaluating code blocks, Exporting code blocks, Working With Source Code | 12580 | @node Extracting source code, Evaluating code blocks, Exporting code blocks, Working With Source Code |
| 11261 | @section Extracting source code | 12581 | @section Extracting source code |
| 12582 | @cindex tangling | ||
| 11262 | @cindex source code, extracting | 12583 | @cindex source code, extracting |
| 11263 | @cindex code block, extracting source code | 12584 | @cindex code block, extracting source code |
| 11264 | 12585 | ||
| @@ -11273,7 +12594,7 @@ using @code{org-babel-expand-src-block} which can expand both variable and | |||
| 11273 | @item :tangle no | 12594 | @item :tangle no |
| 11274 | The default. The code block is not included in the tangled output. | 12595 | The default. The code block is not included in the tangled output. |
| 11275 | @item :tangle yes | 12596 | @item :tangle yes |
| 11276 | Include the code block in the tangled output. The output file name is the | 12597 | Include the code block in the tangled output. The output file name is the |
| 11277 | name of the org file with the extension @samp{.org} replaced by the extension | 12598 | name of the org file with the extension @samp{.org} replaced by the extension |
| 11278 | for the block language. | 12599 | for the block language. |
| 11279 | @item :tangle filename | 12600 | @item :tangle filename |
| @@ -11283,10 +12604,10 @@ Include the code block in the tangled output to file @samp{filename}. | |||
| 11283 | @kindex C-c C-v t | 12604 | @kindex C-c C-v t |
| 11284 | @subsubheading Functions | 12605 | @subsubheading Functions |
| 11285 | @table @code | 12606 | @table @code |
| 11286 | @item org-babel-tangle | 12607 | @item org-babel-tangle |
| 11287 | Tangle the current file. Bound to @kbd{C-c C-v t}. | 12608 | Tangle the current file. Bound to @kbd{C-c C-v t}. |
| 11288 | @item org-babel-tangle-file | 12609 | @item org-babel-tangle-file |
| 11289 | Choose a file to tangle. Bound to @kbd{C-c C-v f}. | 12610 | Choose a file to tangle. Bound to @kbd{C-c C-v f}. |
| 11290 | @end table | 12611 | @end table |
| 11291 | 12612 | ||
| 11292 | @subsubheading Hooks | 12613 | @subsubheading Hooks |
| @@ -11303,14 +12624,15 @@ of tangled code files. | |||
| 11303 | @cindex source code, evaluating | 12624 | @cindex source code, evaluating |
| 11304 | 12625 | ||
| 11305 | 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 |
| 11306 | 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 |
| 11307 | 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 |
| 11308 | 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 |
| 11309 | @ref{Code evaluation security}.} and the results placed in the Org-mode | 12630 | evaluation security}.} and the results of evaluation optionally placed in the |
| 11310 | 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 |
| 11311 | blocks, however support exists for evaluating blocks in many languages. See | 12632 | Lisp code blocks specified as @code{emacs-lisp}. However, source code blocks |
| 11312 | @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 |
| 11313 | 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). | ||
| 11314 | 12636 | ||
| 11315 | @kindex C-c C-c | 12637 | @kindex C-c C-c |
| 11316 | 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 |
| @@ -11318,49 +12640,77 @@ There are a number of ways to evaluate code blocks. The simplest is to press | |||
| 11318 | @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 |
| 11319 | 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 |
| 11320 | @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 |
| 11321 | its results into the Org-mode buffer. | 12643 | its results into the Org mode buffer. |
| 12644 | @cindex #+CALL | ||
| 11322 | 12645 | ||
| 11323 | 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 |
| 11324 | 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 |
| 11325 | @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}) |
| 11326 | 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 |
| 11327 | (see @ref{Library of Babel}). These lines use the following syntax. | 12650 | @code{#+CALL:} line or inline within a block of text. |
| 12651 | |||
| 12652 | The syntax of the @code{#+CALL:} line is | ||
| 11328 | 12653 | ||
| 11329 | @example | 12654 | @example |
| 11330 | #+call: <name>(<arguments>) <header arguments> | 12655 | #+CALL: <name>(<arguments>) |
| 11331 | #+function: <name>(<arguments>) <header arguments> | 12656 | #+CALL: <name>[<inside header arguments>](<arguments>) <end header arguments> |
| 11332 | #+lob: <name>(<arguments>) <header arguments> | 12657 | @end example |
| 12658 | |||
| 12659 | The syntax for inline evaluation of named code blocks is | ||
| 12660 | |||
| 12661 | @example | ||
| 12662 | ... call_<name>(<arguments>) ... | ||
| 12663 | ... call_<name>[<inside header arguments>](<arguments>)[<end header arguments>] ... | ||
| 11333 | @end example | 12664 | @end example |
| 11334 | 12665 | ||
| 11335 | @table @code | 12666 | @table @code |
| 11336 | @item <name> | 12667 | @item <name> |
| 11337 | 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}). |
| 11338 | @item <arguments> | 12669 | @item <arguments> |
| 11339 | Arguments specified in this section will be passed to the code block. | 12670 | Arguments specified in this section will be passed to the code block. These |
| 11340 | @item <header arguments> | 12671 | arguments use standard function call syntax, rather than |
| 11341 | Header arguments can be placed after the function invocation. See | 12672 | header argument syntax. For example, a @code{#+CALL:} line that passes the |
| 11342 | @ref{Header arguments} for more information on header arguments. | 12673 | number four to a code block named @code{double}, which declares the header |
| 12674 | argument @code{:var n=2}, would be written as @code{#+CALL: double(n=4)}. | ||
| 12675 | @item <inside header arguments> | ||
| 12676 | Inside header arguments are passed through and applied to the named code | ||
| 12677 | block. These arguments use header argument syntax rather than standard | ||
| 12678 | function call syntax. Inside header arguments affect how the code block is | ||
| 12679 | evaluated. For example, @code{[:results output]} will collect the results of | ||
| 12680 | everything printed to @code{STDOUT} during execution of the code block. | ||
| 12681 | @item <end header arguments> | ||
| 12682 | End header arguments are applied to the calling instance and do not affect | ||
| 12683 | evaluation of the named code block. They affect how the results are | ||
| 12684 | incorporated into the Org mode buffer and how the call line is exported. For | ||
| 12685 | example, @code{:results html} will insert the results of the call line | ||
| 12686 | evaluation in the Org buffer, wrapped in a @code{BEGIN_HTML:} block. | ||
| 12687 | |||
| 12688 | For more examples of passing header arguments to @code{#+CALL:} lines see | ||
| 12689 | @ref{Header arguments in function calls}. | ||
| 11343 | @end table | 12690 | @end table |
| 11344 | 12691 | ||
| 11345 | |||
| 11346 | @node Library of Babel, Languages, Evaluating code blocks, Working With Source Code | 12692 | @node Library of Babel, Languages, Evaluating code blocks, Working With Source Code |
| 11347 | @section Library of Babel | 12693 | @section Library of Babel |
| 11348 | @cindex babel, library of | 12694 | @cindex babel, library of |
| 11349 | @cindex source code, library | 12695 | @cindex source code, library |
| 11350 | @cindex code block, library | 12696 | @cindex code block, library |
| 11351 | 12697 | ||
| 11352 | 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 |
| 11353 | 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 |
| 11354 | 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 |
| 11355 | Org-mode users can deposit functions they believe to be generally | 12701 | code blocks} for information on the syntax of remote code block evaluation). |
| 11356 | 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}. | ||
| 11357 | 12710 | ||
| 11358 | Code blocks defined in the ``Library of Babel'' can be called remotely as if | ||
| 11359 | they were in the current Org-mode buffer (see @ref{Evaluating code blocks} | ||
| 11360 | for information on the syntax of remote code block evaluation). | ||
| 11361 | 12711 | ||
| 11362 | @kindex C-c C-v i | 12712 | @kindex C-c C-v i |
| 11363 | 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 |
| 11364 | 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 |
| 11365 | i}. | 12715 | i}. |
| 11366 | 12716 | ||
| @@ -11374,19 +12724,24 @@ Code blocks in the following languages are supported. | |||
| 11374 | 12724 | ||
| 11375 | @multitable @columnfractions 0.28 0.3 0.22 0.2 | 12725 | @multitable @columnfractions 0.28 0.3 0.22 0.2 |
| 11376 | @item @b{Language} @tab @b{Identifier} @tab @b{Language} @tab @b{Identifier} | 12726 | @item @b{Language} @tab @b{Identifier} @tab @b{Language} @tab @b{Identifier} |
| 11377 | @item Asymptote @tab asymptote @tab C @tab C | 12727 | @item Asymptote @tab asymptote @tab Awk @tab awk |
| 12728 | @item Emacs Calc @tab calc @tab C @tab C | ||
| 11378 | @item C++ @tab C++ @tab Clojure @tab clojure | 12729 | @item C++ @tab C++ @tab Clojure @tab clojure |
| 11379 | @item CSS @tab css @tab ditaa @tab ditaa | 12730 | @item CSS @tab css @tab ditaa @tab ditaa |
| 11380 | @item Graphviz @tab dot @tab Emacs Lisp @tab emacs-lisp | 12731 | @item Graphviz @tab dot @tab Emacs Lisp @tab emacs-lisp |
| 11381 | @item gnuplot @tab gnuplot @tab Haskell @tab haskell | 12732 | @item gnuplot @tab gnuplot @tab Haskell @tab haskell |
| 11382 | @item LaTeX @tab latex @tab MATLAB @tab matlab | 12733 | @item Java @tab java @tab @tab |
| 12734 | @item Javascript @tab js @tab LaTeX @tab latex | ||
| 12735 | @item Ledger @tab ledger @tab Lisp @tab lisp | ||
| 12736 | @item Lilypond @tab lilypond @tab MATLAB @tab matlab | ||
| 11383 | @item Mscgen @tab mscgen @tab Objective Caml @tab ocaml | 12737 | @item Mscgen @tab mscgen @tab Objective Caml @tab ocaml |
| 11384 | @item Octave @tab octave @tab Oz @tab oz | 12738 | @item Octave @tab octave @tab Org mode @tab org |
| 11385 | @item Perl @tab perl @tab Python @tab python | 12739 | @item Oz @tab oz @tab Perl @tab perl |
| 12740 | @item Plantuml @tab plantuml @tab Python @tab python | ||
| 11386 | @item R @tab R @tab Ruby @tab ruby | 12741 | @item R @tab R @tab Ruby @tab ruby |
| 11387 | @item Sass @tab sass @tab GNU Screen @tab screen | 12742 | @item Sass @tab sass @tab Scheme @tab scheme |
| 11388 | @item shell @tab sh @tab SQL @tab sql | 12743 | @item GNU Screen @tab screen @tab shell @tab sh |
| 11389 | @item SQLite @tab sqlite | 12744 | @item SQL @tab sql @tab SQLite @tab sqlite |
| 11390 | @end multitable | 12745 | @end multitable |
| 11391 | 12746 | ||
| 11392 | Language-specific documentation is available for some languages. If | 12747 | Language-specific documentation is available for some languages. If |
| @@ -11444,7 +12799,7 @@ specific (and having higher priority) than the last. | |||
| 11444 | * System-wide header arguments:: Set global default values | 12799 | * System-wide header arguments:: Set global default values |
| 11445 | * Language-specific header arguments:: Set default values by language | 12800 | * Language-specific header arguments:: Set default values by language |
| 11446 | * Buffer-wide header arguments:: Set default values for a specific buffer | 12801 | * Buffer-wide header arguments:: Set default values for a specific buffer |
| 11447 | * 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 |
| 11448 | * 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 |
| 11449 | * Header arguments in function calls:: The most specific level | 12804 | * Header arguments in function calls:: The most specific level |
| 11450 | @end menu | 12805 | @end menu |
| @@ -11495,12 +12850,11 @@ Each language can define its own set of default header arguments. See the | |||
| 11495 | language-specific documentation available online at | 12850 | language-specific documentation available online at |
| 11496 | @uref{http://orgmode.org/worg/org-contrib/babel}. | 12851 | @uref{http://orgmode.org/worg/org-contrib/babel}. |
| 11497 | 12852 | ||
| 11498 | @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 |
| 11499 | @subsubheading Buffer-wide header arguments | 12854 | @subsubheading Buffer-wide header arguments |
| 11500 | 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 |
| 11501 | 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 |
| 11502 | @code{#+BABEL:} keyword followed by a series of header arguments which may be | 12857 | @ref{Property syntax}). |
| 11503 | specified using the standard header argument syntax. | ||
| 11504 | 12858 | ||
| 11505 | 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 |
| 11506 | @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 |
| @@ -11508,24 +12862,27 @@ that all execution took place in the same session, and no results would be | |||
| 11508 | inserted into the buffer. | 12862 | inserted into the buffer. |
| 11509 | 12863 | ||
| 11510 | @example | 12864 | @example |
| 11511 | #+BABEL: :session *R* :results silent | 12865 | #+PROPERTY: session *R* |
| 12866 | #+PROPERTY: results silent | ||
| 11512 | @end example | 12867 | @end example |
| 11513 | 12868 | ||
| 11514 | @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 |
| 11515 | @subsubheading Header arguments in Org-mode properties | 12870 | @subsubheading Header arguments in Org mode properties |
| 11516 | 12871 | ||
| 11517 | 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 |
| 11518 | 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 |
| 11519 | 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 |
| 11520 | 12875 | ||
| 11521 | @example | 12876 | @example |
| 11522 | #+property: tangle yes | 12877 | #+PROPERTY: tangle yes |
| 11523 | @end example | 12878 | @end example |
| 11524 | 12879 | ||
| 12880 | @vindex org-use-property-inheritance | ||
| 11525 | 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 |
| 11526 | with inheritance, so the value of the @code{:cache} header argument will default | 12882 | with inheritance, regardless of the value of |
| 11527 | 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 |
| 11528 | 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: | ||
| 11529 | 12886 | ||
| 11530 | @example | 12887 | @example |
| 11531 | * outline header | 12888 | * outline header |
| @@ -11539,49 +12896,89 @@ heading: | |||
| 11539 | Properties defined in this way override the properties set in | 12896 | Properties defined in this way override the properties set in |
| 11540 | @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 |
| 11541 | @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 |
| 11542 | in Org-mode documents. | 12899 | in Org mode documents. |
| 11543 | 12900 | ||
| 11544 | @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 |
| 11545 | @subsubheading Code block specific header arguments | 12902 | @subsubheading Code block specific header arguments |
| 11546 | 12903 | ||
| 11547 | 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 |
| 11548 | 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 |
| 11549 | 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. |
| 11550 | Properties set in this way override both the values of | 12907 | Properties set in this way override both the values of |
| 11551 | @code{org-babel-default-header-args} and header arguments specified as | 12908 | @code{org-babel-default-header-args} and header arguments specified as |
| 11552 | properties. In the following example, the @code{:results} header argument | 12909 | properties. In the following example, the @code{:results} header argument |
| 11553 | 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 |
| 11554 | 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 |
| 11555 | @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 |
| 11556 | preserved on export to HTML or LaTeX. | 12913 | preserved on export to HTML or @LaTeX{}. |
| 11557 | 12914 | ||
| 11558 | @example | 12915 | @example |
| 11559 | #+source: factorial | 12916 | #+NAME: factorial |
| 11560 | #+begin_src haskell :results silent :exports code :var n=0 | 12917 | #+BEGIN_SRC haskell :results silent :exports code :var n=0 |
| 11561 | fac 0 = 1 | 12918 | fac 0 = 1 |
| 11562 | fac n = n * fac (n-1) | 12919 | fac n = n * fac (n-1) |
| 11563 | #+end_src | 12920 | #+END_SRC |
| 11564 | @end example | 12921 | @end example |
| 11565 | 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 |
| 11566 | 12923 | ||
| 11567 | @example | 12924 | @example |
| 11568 | src_haskell[:exports both]@{fac 5@} | 12925 | src_haskell[:exports both]@{fac 5@} |
| 11569 | @end example | 12926 | @end example |
| 11570 | 12927 | ||
| 12928 | Code block header arguments can span multiple lines using @code{#+HEADER:} or | ||
| 12929 | @code{#+HEADERS:} lines preceding a code block or nested between the | ||
| 12930 | @code{#+NAME:} line and the @code{#+BEGIN_SRC} line of a named code block. | ||
| 12931 | @cindex #+HEADER: | ||
| 12932 | @cindex #+HEADERS: | ||
| 12933 | |||
| 12934 | Multi-line header arguments on an un-named code block: | ||
| 12935 | @example | ||
| 12936 | #+HEADERS: :var data1=1 | ||
| 12937 | #+BEGIN_SRC emacs-lisp :var data2=2 | ||
| 12938 | (message "data1:%S, data2:%S" data1 data2) | ||
| 12939 | #+END_SRC | ||
| 12940 | |||
| 12941 | #+results: | ||
| 12942 | : data1:1, data2:2 | ||
| 12943 | @end example | ||
| 12944 | |||
| 12945 | Multi-line header arguments on a named code block: | ||
| 12946 | @example | ||
| 12947 | #+NAME: named-block | ||
| 12948 | #+HEADER: :var data=2 | ||
| 12949 | #+BEGIN_SRC emacs-lisp | ||
| 12950 | (message "data:%S" data) | ||
| 12951 | #+END_SRC | ||
| 12952 | |||
| 12953 | #+results: named-block | ||
| 12954 | : data:2 | ||
| 12955 | @end example | ||
| 12956 | |||
| 11571 | @node Header arguments in function calls, , Code block specific header arguments, Using header arguments | 12957 | @node Header arguments in function calls, , Code block specific header arguments, Using header arguments |
| 11572 | @comment node-name, next, previous, up | 12958 | @comment node-name, next, previous, up |
| 11573 | @subsubheading Header arguments in function calls | 12959 | @subsubheading Header arguments in function calls |
| 11574 | 12960 | ||
| 11575 | 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 |
| 11576 | function call lines can be set as shown below: | 12962 | @code{#+CALL:} lines can be set as shown in the two examples below. For more |
| 12963 | information on the structure of @code{#+CALL:} lines see @ref{Evaluating code | ||
| 12964 | blocks}. | ||
| 12965 | |||
| 12966 | The following will apply the @code{:exports results} header argument to the | ||
| 12967 | evaluation of the @code{#+CALL:} line. | ||
| 12968 | @example | ||
| 12969 | #+CALL: factorial(n=5) :exports results | ||
| 12970 | @end example | ||
| 11577 | 12971 | ||
| 12972 | The following will apply the @code{:session special} header argument to the | ||
| 12973 | evaluation of the @code{factorial} code block. | ||
| 11578 | @example | 12974 | @example |
| 11579 | #+call: factorial(n=5) :exports results | 12975 | #+CALL: factorial[:session special](n=5) |
| 11580 | @end example | 12976 | @end example |
| 11581 | 12977 | ||
| 11582 | @node Specific header arguments, , Using header arguments, Header arguments | 12978 | @node Specific header arguments, , Using header arguments, Header arguments |
| 11583 | @subsection Specific header arguments | 12979 | @subsection Specific header arguments |
| 11584 | 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: | ||
| 11585 | 12982 | ||
| 11586 | @menu | 12983 | @menu |
| 11587 | * var:: Pass arguments to code blocks | 12984 | * var:: Pass arguments to code blocks |
| @@ -11592,13 +12989,19 @@ The following header arguments are defined: | |||
| 11592 | directory for code block execution | 12989 | directory for code block execution |
| 11593 | * exports:: Export code and/or results | 12990 | * exports:: Export code and/or results |
| 11594 | * tangle:: Toggle tangling and specify file name | 12991 | * tangle:: Toggle tangling and specify file name |
| 12992 | * mkdirp:: Toggle creation of parent directories of target | ||
| 12993 | files during tangling | ||
| 11595 | * comments:: Toggle insertion of comments in tangled | 12994 | * comments:: Toggle insertion of comments in tangled |
| 11596 | code files | 12995 | code files |
| 12996 | * padline:: Control insertion of padding lines in tangled | ||
| 12997 | code files | ||
| 11597 | * no-expand:: Turn off variable assignment and noweb | 12998 | * no-expand:: Turn off variable assignment and noweb |
| 11598 | expansion during tangling | 12999 | expansion during tangling |
| 11599 | * session:: Preserve the state of code evaluation | 13000 | * session:: Preserve the state of code evaluation |
| 11600 | * noweb:: Toggle expansion of noweb references | 13001 | * noweb:: Toggle expansion of noweb references |
| 13002 | * noweb-ref:: Specify block's noweb reference resolution target | ||
| 11601 | * cache:: Avoid re-evaluating unchanged code blocks | 13003 | * cache:: Avoid re-evaluating unchanged code blocks |
| 13004 | * sep:: Delimiter for writing tabular results outside Org | ||
| 11602 | * hlines:: Handle horizontal lines in tables | 13005 | * hlines:: Handle horizontal lines in tables |
| 11603 | * colnames:: Handle column names in tables | 13006 | * colnames:: Handle column names in tables |
| 11604 | * rownames:: Handle row names in tables | 13007 | * rownames:: Handle row names in tables |
| @@ -11606,17 +13009,26 @@ The following header arguments are defined: | |||
| 11606 | * eval:: Limit evaluation of specific code blocks | 13009 | * eval:: Limit evaluation of specific code blocks |
| 11607 | @end menu | 13010 | @end menu |
| 11608 | 13011 | ||
| 13012 | Additional header arguments are defined on a language-specific basis, see | ||
| 13013 | @ref{Languages}. | ||
| 13014 | |||
| 11609 | @node var, results, Specific header arguments, Specific header arguments | 13015 | @node var, results, Specific header arguments, Specific header arguments |
| 11610 | @subsubsection @code{:var} | 13016 | @subsubsection @code{:var} |
| 11611 | 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. |
| 11612 | 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; |
| 11613 | these are addressed in the language-specific documentation. However, the | 13019 | these are addressed in the language-specific documentation. However, the |
| 11614 | 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 |
| 11615 | values passed to arguments can be literal values, values from org-mode tables | 13021 | case, variables require a default value when they are declared. |
| 11616 | and literal example blocks, or the results of other code blocks. | 13022 | |
| 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. | ||
| 11617 | 13029 | ||
| 11618 | 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, |
| 11619 | ``indexable variable values'' heading below. | 13031 | Indexable variable values}). |
| 11620 | 13032 | ||
| 11621 | 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 |
| 11622 | @code{:var} header argument. | 13034 | @code{:var} header argument. |
| @@ -11625,96 +13037,144 @@ The following syntax is used to pass arguments to code blocks using the | |||
| 11625 | :var name=assign | 13037 | :var name=assign |
| 11626 | @end example | 13038 | @end example |
| 11627 | 13039 | ||
| 11628 | 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. | ||
| 11629 | 13044 | ||
| 11630 | @itemize @bullet | 13045 | Here are examples of passing values by reference: |
| 11631 | @item literal value | 13046 | |
| 11632 | either a string @code{"string"} or a number @code{9}. | 13047 | @table @dfn |
| 11633 | @item reference | ||
| 11634 | a table name: | ||
| 11635 | 13048 | ||
| 13049 | @item table | ||
| 13050 | an Org mode table named with either a @code{#+NAME:} or @code{#+TBLNAME:} line | ||
| 11636 | @example | 13051 | @example |
| 11637 | #+tblname: example-table | 13052 | #+TBLNAME: example-table |
| 11638 | | 1 | | 13053 | | 1 | |
| 11639 | | 2 | | 13054 | | 2 | |
| 11640 | | 3 | | 13055 | | 3 | |
| 11641 | | 4 | | 13056 | | 4 | |
| 11642 | 13057 | ||
| 11643 | #+source: table-length | 13058 | #+NAME: table-length |
| 11644 | #+begin_src emacs-lisp :var table=example-table | 13059 | #+BEGIN_SRC emacs-lisp :var table=example-table |
| 11645 | (length table) | 13060 | (length table) |
| 11646 | #+end_src | 13061 | #+END_SRC |
| 11647 | 13062 | ||
| 11648 | #+results: table-length | 13063 | #+results: table-length |
| 11649 | : 4 | 13064 | : 4 |
| 11650 | @end example | 13065 | @end example |
| 11651 | 13066 | ||
| 11652 | a code block name, as assigned by @code{#+srcname:}, followed by | 13067 | @item list |
| 11653 | parentheses: | 13068 | a simple list named with a @code{#+NAME:} line (note that nesting is not |
| 13069 | carried through to the source code block) | ||
| 13070 | |||
| 13071 | @example | ||
| 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 | ||
| 11654 | 13089 | ||
| 11655 | @example | 13090 | @example |
| 11656 | #+begin_src emacs-lisp :var length=table-length() | 13091 | #+BEGIN_SRC emacs-lisp :var length=table-length() |
| 11657 | (* 2 length) | 13092 | (* 2 length) |
| 11658 | #+end_src | 13093 | #+END_SRC |
| 11659 | 13094 | ||
| 11660 | #+results: | 13095 | #+results: |
| 11661 | : 8 | 13096 | : 8 |
| 11662 | @end example | 13097 | @end example |
| 11663 | 13098 | ||
| 11664 | In addition, an argument can be passed to the code block referenced | 13099 | @item code block with arguments |
| 11665 | 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 |
| 11666 | code block name: | 13101 | optional arguments passed within the parentheses following the |
| 13102 | code block name using standard function call syntax | ||
| 11667 | 13103 | ||
| 11668 | @example | 13104 | @example |
| 11669 | #+source: double | 13105 | #+NAME: double |
| 11670 | #+begin_src emacs-lisp :var input=8 | 13106 | #+BEGIN_SRC emacs-lisp :var input=8 |
| 11671 | (* 2 input) | 13107 | (* 2 input) |
| 11672 | #+end_src | 13108 | #+END_SRC |
| 11673 | 13109 | ||
| 11674 | #+results: double | 13110 | #+results: double |
| 11675 | : 16 | 13111 | : 16 |
| 11676 | 13112 | ||
| 11677 | #+source: squared | 13113 | #+NAME: squared |
| 11678 | #+begin_src emacs-lisp :var input=double(input=1) | 13114 | #+BEGIN_SRC emacs-lisp :var input=double(input=1) |
| 11679 | (* input input) | 13115 | (* input input) |
| 11680 | #+end_src | 13116 | #+END_SRC |
| 11681 | 13117 | ||
| 11682 | #+results: squared | 13118 | #+results: squared |
| 11683 | : 4 | 13119 | : 4 |
| 11684 | @end example | 13120 | @end example |
| 11685 | @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 | ||
| 11686 | 13144 | ||
| 11687 | @subsubheading Alternate argument syntax | 13145 | @subsubheading Alternate argument syntax |
| 11688 | 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 |
| 11689 | 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 |
| 11690 | example arguments can be packed inside of parenthesis, separated by commas, | 13148 | example, arguments can be packed inside of parentheses, separated by commas, |
| 11691 | following the source name. | 13149 | following the source name. |
| 11692 | 13150 | ||
| 11693 | @example | 13151 | @example |
| 11694 | #+source: double(input=0, x=2) | 13152 | #+NAME: double(input=0, x=2) |
| 11695 | #+begin_src emacs-lisp | 13153 | #+BEGIN_SRC emacs-lisp |
| 11696 | (* 2 (+ input x)) | 13154 | (* 2 (+ input x)) |
| 11697 | #+end_src | 13155 | #+END_SRC |
| 11698 | @end example | 13156 | @end example |
| 11699 | 13157 | ||
| 11700 | @subsubheading Indexable variable values | 13158 | @subsubheading Indexable variable values |
| 11701 | It is possible to reference portions of variable values by ``indexing'' into | 13159 | It is possible to reference portions of variable values by ``indexing'' into |
| 11702 | the variables. Indexes are 0 based with negative values counting back from | 13160 | the variables. Indexes are 0 based with negative values counting back from |
| 11703 | the end. If an index is separated by @code{,}s then each subsequent section | 13161 | the end. If an index is separated by @code{,}s then each subsequent section |
| 11704 | will index into the next deepest nesting or dimension of the value. The | 13162 | will index into the next deepest nesting or dimension of the value. Note |
| 13163 | that this indexing occurs @emph{before} other table related header arguments | ||
| 13164 | like @code{:hlines}, @code{:colnames} and @code{:rownames} are applied. The | ||
| 11705 | following example assigns the last cell of the first row the table | 13165 | following example assigns the last cell of the first row the table |
| 11706 | @code{example-table} to the variable @code{data}: | 13166 | @code{example-table} to the variable @code{data}: |
| 11707 | 13167 | ||
| 11708 | @example | 13168 | @example |
| 11709 | #+results: example-table | 13169 | #+NAME: example-table |
| 11710 | | 1 | a | | 13170 | | 1 | a | |
| 11711 | | 2 | b | | 13171 | | 2 | b | |
| 11712 | | 3 | c | | 13172 | | 3 | c | |
| 11713 | | 4 | d | | 13173 | | 4 | d | |
| 11714 | 13174 | ||
| 11715 | #+begin_src emacs-lisp :var data=example-table[0,-1] | 13175 | #+BEGIN_SRC emacs-lisp :var data=example-table[0,-1] |
| 11716 | data | 13176 | data |
| 11717 | #+end_src | 13177 | #+END_SRC |
| 11718 | 13178 | ||
| 11719 | #+results: | 13179 | #+results: |
| 11720 | : a | 13180 | : a |
| @@ -11726,16 +13186,16 @@ example the following assigns the middle three rows of @code{example-table} | |||
| 11726 | to @code{data}. | 13186 | to @code{data}. |
| 11727 | 13187 | ||
| 11728 | @example | 13188 | @example |
| 11729 | #+results: example-table | 13189 | #+NAME: example-table |
| 11730 | | 1 | a | | 13190 | | 1 | a | |
| 11731 | | 2 | b | | 13191 | | 2 | b | |
| 11732 | | 3 | c | | 13192 | | 3 | c | |
| 11733 | | 4 | d | | 13193 | | 4 | d | |
| 11734 | | 5 | 3 | | 13194 | | 5 | 3 | |
| 11735 | 13195 | ||
| 11736 | #+begin_src emacs-lisp :var data=example-table[1:3] | 13196 | #+BEGIN_SRC emacs-lisp :var data=example-table[1:3] |
| 11737 | data | 13197 | data |
| 11738 | #+end_src | 13198 | #+END_SRC |
| 11739 | 13199 | ||
| 11740 | #+results: | 13200 | #+results: |
| 11741 | | 2 | b | | 13201 | | 2 | b | |
| @@ -11749,15 +13209,15 @@ interpreted to mean the entire range and as such are equivalent to | |||
| 11749 | column is referenced. | 13209 | column is referenced. |
| 11750 | 13210 | ||
| 11751 | @example | 13211 | @example |
| 11752 | #+results: example-table | 13212 | #+NAME: example-table |
| 11753 | | 1 | a | | 13213 | | 1 | a | |
| 11754 | | 2 | b | | 13214 | | 2 | b | |
| 11755 | | 3 | c | | 13215 | | 3 | c | |
| 11756 | | 4 | d | | 13216 | | 4 | d | |
| 11757 | 13217 | ||
| 11758 | #+begin_src emacs-lisp :var data=example-table[,0] | 13218 | #+BEGIN_SRC emacs-lisp :var data=example-table[,0] |
| 11759 | data | 13219 | data |
| 11760 | #+end_src | 13220 | #+END_SRC |
| 11761 | 13221 | ||
| 11762 | #+results: | 13222 | #+results: |
| 11763 | | 1 | 2 | 3 | 4 | | 13223 | | 1 | 2 | 3 | 4 | |
| @@ -11768,21 +13228,54 @@ Any number of dimensions can be indexed. Dimensions are separated from one | |||
| 11768 | another by commas, as shown in the following example. | 13228 | another by commas, as shown in the following example. |
| 11769 | 13229 | ||
| 11770 | @example | 13230 | @example |
| 11771 | #+source: 3D | 13231 | #+NAME: 3D |
| 11772 | #+begin_src emacs-lisp | 13232 | #+BEGIN_SRC emacs-lisp |
| 11773 | '(((1 2 3) (4 5 6) (7 8 9)) | 13233 | '(((1 2 3) (4 5 6) (7 8 9)) |
| 11774 | ((10 11 12) (13 14 15) (16 17 18)) | 13234 | ((10 11 12) (13 14 15) (16 17 18)) |
| 11775 | ((19 20 21) (22 23 24) (25 26 27))) | 13235 | ((19 20 21) (22 23 24) (25 26 27))) |
| 11776 | #+end_src | 13236 | #+END_SRC |
| 11777 | 13237 | ||
| 11778 | #+begin_src emacs-lisp :var data=3D[1,,1] | 13238 | #+BEGIN_SRC emacs-lisp :var data=3D[1,,1] |
| 11779 | data | 13239 | data |
| 11780 | #+end_src | 13240 | #+END_SRC |
| 11781 | 13241 | ||
| 11782 | #+results: | 13242 | #+results: |
| 11783 | | 11 | 14 | 17 | | 13243 | | 11 | 14 | 17 | |
| 11784 | @end example | 13244 | @end example |
| 11785 | 13245 | ||
| 13246 | @subsubheading Emacs Lisp evaluation of variables | ||
| 13247 | |||
| 13248 | Emacs lisp code can be used to initialize variable values. When a variable | ||
| 13249 | value starts with @code{(}, @code{[}, @code{'} or @code{`} it will be | ||
| 13250 | evaluated as Emacs Lisp and the result of the evaluation will be assigned as | ||
| 13251 | the variable value. The following example demonstrates use of this | ||
| 13252 | evaluation to reliably pass the file-name of the Org mode buffer to a code | ||
| 13253 | block---note that evaluation of header arguments is guaranteed to take place | ||
| 13254 | in the original Org mode file, while there is no such guarantee for | ||
| 13255 | evaluation of the code block body. | ||
| 13256 | |||
| 13257 | @example | ||
| 13258 | #+BEGIN_SRC sh :var filename=(buffer-file-name) :exports both | ||
| 13259 | wc -w $filename | ||
| 13260 | #+END_SRC | ||
| 13261 | @end example | ||
| 13262 | |||
| 13263 | Note that values read from tables and lists will not be evaluated as | ||
| 13264 | Emacs Lisp, as shown in the following example. | ||
| 13265 | |||
| 13266 | @example | ||
| 13267 | #+NAME: table | ||
| 13268 | | (a b c) | | ||
| 13269 | |||
| 13270 | #+HEADERS: :var data=table[0,0] | ||
| 13271 | #+BEGIN_SRC perl | ||
| 13272 | $data | ||
| 13273 | #+END_SRC | ||
| 13274 | |||
| 13275 | #+results: | ||
| 13276 | : (a b c) | ||
| 13277 | @end example | ||
| 13278 | |||
| 11786 | @node results, file, var, Specific header arguments | 13279 | @node results, file, var, Specific header arguments |
| 11787 | @subsubsection @code{:results} | 13280 | @subsubsection @code{:results} |
| 11788 | 13281 | ||
| @@ -11796,7 +13289,7 @@ from the code block | |||
| 11796 | @item | 13289 | @item |
| 11797 | @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 |
| 11798 | 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 |
| 11799 | Org-mode buffer | 13292 | Org mode buffer |
| 11800 | @item | 13293 | @item |
| 11801 | @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 |
| 11802 | block should be handled. | 13295 | block should be handled. |
| @@ -11812,7 +13305,7 @@ This is the default. The result is the value of the last statement in the | |||
| 11812 | code block. This header argument places the evaluation in functional | 13305 | code block. This header argument places the evaluation in functional |
| 11813 | mode. Note that in some languages, e.g., Python, use of this result type | 13306 | mode. Note that in some languages, e.g., Python, use of this result type |
| 11814 | requires that a @code{return} statement be included in the body of the source | 13307 | requires that a @code{return} statement be included in the body of the source |
| 11815 | code block. E.g., @code{:results value}. | 13308 | code block. E.g., @code{:results value}. |
| 11816 | @item @code{output} | 13309 | @item @code{output} |
| 11817 | The result is the collection of everything printed to STDOUT during the | 13310 | The result is the collection of everything printed to STDOUT during the |
| 11818 | execution of the code block. This header argument places the | 13311 | execution of the code block. This header argument places the |
| @@ -11827,36 +13320,40 @@ table or scalar depending on their value. | |||
| 11827 | 13320 | ||
| 11828 | @itemize @bullet | 13321 | @itemize @bullet |
| 11829 | @item @code{table}, @code{vector} | 13322 | @item @code{table}, @code{vector} |
| 11830 | 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 |
| 11831 | 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. |
| 11832 | E.g., @code{:results value table}. | 13325 | E.g., @code{:results value table}. |
| 11833 | @item @code{list} | 13326 | @item @code{list} |
| 11834 | 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 |
| 11835 | 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. |
| 11836 | @item @code{scalar}, @code{verbatim} | 13329 | @item @code{scalar}, @code{verbatim} |
| 11837 | The results should be interpreted literally---they will not be | 13330 | The results should be interpreted literally---they will not be |
| 11838 | 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 |
| 11839 | buffer as quoted text. E.g., @code{:results value verbatim}. | 13332 | buffer as quoted text. E.g., @code{:results value verbatim}. |
| 11840 | @item @code{file} | 13333 | @item @code{file} |
| 11841 | 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 |
| 11842 | 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}. |
| 11843 | @item @code{raw}, @code{org} | 13336 | @item @code{raw}, @code{org} |
| 11844 | 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 |
| 11845 | 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 |
| 11846 | such by Org-mode. E.g., @code{:results value raw}. | 13339 | such by Org mode. E.g., @code{:results value raw}. |
| 11847 | @item @code{html} | 13340 | @item @code{html} |
| 11848 | 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} |
| 11849 | block. E.g., @code{:results value html}. | 13342 | block. E.g., @code{:results value html}. |
| 11850 | @item @code{latex} | 13343 | @item @code{latex} |
| 11851 | 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. |
| 11852 | E.g., @code{:results value latex}. | 13345 | E.g., @code{:results value latex}. |
| 11853 | @item @code{code} | 13346 | @item @code{code} |
| 11854 | Result are assumed to be parseable code and are enclosed in a code block. | 13347 | Result are assumed to be parsable code and are enclosed in a code block. |
| 11855 | E.g., @code{:results value code}. | 13348 | E.g., @code{:results value code}. |
| 11856 | @item @code{pp} | 13349 | @item @code{pp} |
| 11857 | The result is converted to pretty-printed code and is enclosed in a code | 13350 | The result is converted to pretty-printed code and is enclosed in a code |
| 11858 | block. This option currently supports Emacs Lisp, Python, and Ruby. E.g., | 13351 | block. This option currently supports Emacs Lisp, Python, and Ruby. E.g., |
| 11859 | @code{:results value pp}. | 13352 | @code{:results value pp}. |
| 13353 | @item @code{wrap} | ||
| 13354 | The result is wrapped in a @code{begin_result} block. This can be useful for | ||
| 13355 | inserting @code{raw} or @code{org} syntax results in such a way that their | ||
| 13356 | extend is known and they can be automatically removed or replaced. | ||
| 11860 | @end itemize | 13357 | @end itemize |
| 11861 | 13358 | ||
| 11862 | @subsubheading Handling | 13359 | @subsubheading Handling |
| @@ -11866,10 +13363,10 @@ results once they are collected. | |||
| 11866 | @itemize @bullet | 13363 | @itemize @bullet |
| 11867 | @item @code{silent} | 13364 | @item @code{silent} |
| 11868 | 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 |
| 11869 | the Org-mode buffer. E.g., @code{:results output silent}. | 13366 | the Org mode buffer. E.g., @code{:results output silent}. |
| 11870 | @item @code{replace} | 13367 | @item @code{replace} |
| 11871 | 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 |
| 11872 | 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., |
| 11873 | @code{:results output replace}. | 13370 | @code{:results output replace}. |
| 11874 | @item @code{append} | 13371 | @item @code{append} |
| 11875 | 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 |
| @@ -11884,56 +13381,56 @@ inserted as with @code{replace}. | |||
| 11884 | @node file, dir, results, Specific header arguments | 13381 | @node file, dir, results, Specific header arguments |
| 11885 | @subsubsection @code{:file} | 13382 | @subsubsection @code{:file} |
| 11886 | 13383 | ||
| 11887 | The header argument @code{:file} is used to specify a path for file output. | 13384 | The header argument @code{:file} is used to specify an external file in which |
| 11888 | An Org-mode style @code{file:} link is inserted into the buffer as the result | 13385 | to save code block results. After code block evaluation an Org mode style |
| 11889 | (see @ref{Link format}). Common examples are graphical output from R, | 13386 | @code{[[file:]]} link (see @ref{Link format}) to the file will be inserted |
| 11890 | gnuplot, ditaa and LaTeX code blocks. | 13387 | into the Org mode buffer. Some languages including R, gnuplot, dot, and |
| 11891 | 13388 | ditaa provide special handling of the @code{:file} header argument | |
| 11892 | Note that for some languages, including R, gnuplot, LaTeX and ditaa, | 13389 | automatically wrapping the code block body in the boilerplate code required |
| 11893 | graphical output is sent to the specified file without the file being | 13390 | to save output to the specified file. This is often useful for saving |
| 11894 | referenced explicitly in the code block. See the documentation for the | 13391 | graphical output of a code block to the specified file. |
| 11895 | individual languages for details. In contrast, general purpose languages such | ||
| 11896 | as Python and Ruby require that the code explicitly create output | ||
| 11897 | corresponding to the path indicated by @code{:file}. | ||
| 11898 | 13392 | ||
| 13393 | The argument to @code{:file} should be either a string specifying the path to | ||
| 13394 | a file, or a list of two strings in which case the first element of the list | ||
| 13395 | should be the path to a file and the second a description for the link. | ||
| 11899 | 13396 | ||
| 11900 | @node dir, exports, file, Specific header arguments | 13397 | @node dir, exports, file, Specific header arguments |
| 11901 | @subsubsection @code{:dir} and remote execution | 13398 | @subsubsection @code{:dir} and remote execution |
| 11902 | 13399 | ||
| 11903 | While the @code{:file} header argument can be used to specify the path to the | 13400 | While the @code{:file} header argument can be used to specify the path to the |
| 11904 | output file, @code{:dir} specifies the default directory during code block | 13401 | output file, @code{:dir} specifies the default directory during code block |
| 11905 | execution. If it is absent, then the directory associated with the current | 13402 | execution. If it is absent, then the directory associated with the current |
| 11906 | buffer is used. In other words, supplying @code{:dir path} temporarily has | 13403 | buffer is used. In other words, supplying @code{:dir path} temporarily has |
| 11907 | the same effect as changing the current directory with @kbd{M-x cd path}, and | 13404 | the same effect as changing the current directory with @kbd{M-x cd path}, and |
| 11908 | then not supplying @code{:dir}. Under the surface, @code{:dir} simply sets | 13405 | then not supplying @code{:dir}. Under the surface, @code{:dir} simply sets |
| 11909 | the value of the Emacs variable @code{default-directory}. | 13406 | the value of the Emacs variable @code{default-directory}. |
| 11910 | 13407 | ||
| 11911 | When using @code{:dir}, you should supply a relative path for file output | 13408 | When using @code{:dir}, you should supply a relative path for file output |
| 11912 | (e.g. @code{:file myfile.jpg} or @code{:file results/myfile.jpg}) in which | 13409 | (e.g.@: @code{:file myfile.jpg} or @code{:file results/myfile.jpg}) in which |
| 11913 | case that path will be interpreted relative to the default directory. | 13410 | case that path will be interpreted relative to the default directory. |
| 11914 | 13411 | ||
| 11915 | In other words, if you want your plot to go into a folder called @file{Work} | 13412 | In other words, if you want your plot to go into a folder called @file{Work} |
| 11916 | in your home directory, you could use | 13413 | in your home directory, you could use |
| 11917 | 13414 | ||
| 11918 | @example | 13415 | @example |
| 11919 | #+begin_src R :file myplot.png :dir ~/Work | 13416 | #+BEGIN_SRC R :file myplot.png :dir ~/Work |
| 11920 | matplot(matrix(rnorm(100), 10), type="l") | 13417 | matplot(matrix(rnorm(100), 10), type="l") |
| 11921 | #+end_src | 13418 | #+END_SRC |
| 11922 | @end example | 13419 | @end example |
| 11923 | 13420 | ||
| 11924 | @subsubheading Remote execution | 13421 | @subsubheading Remote execution |
| 11925 | A directory on a remote machine can be specified using tramp file syntax, in | 13422 | A directory on a remote machine can be specified using tramp file syntax, in |
| 11926 | 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 |
| 11927 | 13424 | ||
| 11928 | @example | 13425 | @example |
| 11929 | #+begin_src R :file plot.png :dir /dand@@yakuba.princeton.edu: | 13426 | #+BEGIN_SRC R :file plot.png :dir /dand@@yakuba.princeton.edu: |
| 11930 | plot(1:10, main=system("hostname", intern=TRUE)) | 13427 | plot(1:10, main=system("hostname", intern=TRUE)) |
| 11931 | #+end_src | 13428 | #+END_SRC |
| 11932 | @end example | 13429 | @end example |
| 11933 | 13430 | ||
| 11934 | 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 |
| 11935 | 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 |
| 11936 | 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 |
| 11937 | created. | 13434 | created. |
| 11938 | 13435 | ||
| 11939 | 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, |
| @@ -11945,7 +13442,7 @@ and a link of the following form will be inserted in the org buffer: | |||
| 11945 | 13442 | ||
| 11946 | Most of this functionality follows immediately from the fact that @code{:dir} | 13443 | Most of this functionality follows immediately from the fact that @code{:dir} |
| 11947 | sets the value of the Emacs variable @code{default-directory}, thanks to | 13444 | sets the value of the Emacs variable @code{default-directory}, thanks to |
| 11948 | tramp. Those using XEmacs, or GNU Emacs prior to version 23 may need to | 13445 | tramp. Those using XEmacs, or GNU Emacs prior to version 23 may need to |
| 11949 | install tramp separately in order for these features to work correctly. | 13446 | install tramp separately in order for these features to work correctly. |
| 11950 | 13447 | ||
| 11951 | @subsubheading Further points | 13448 | @subsubheading Further points |
| @@ -11957,10 +13454,10 @@ determine the starting directory for a new session as expected, no attempt is | |||
| 11957 | currently made to alter the directory associated with an existing session. | 13454 | currently made to alter the directory associated with an existing session. |
| 11958 | @item | 13455 | @item |
| 11959 | @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 |
| 11960 | @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 |
| 11961 | to retain portability of exported material between machines, during export | 13458 | to retain portability of exported material between machines, during export |
| 11962 | 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 |
| 11963 | directory}. Therefore, if @code{default-directory} is altered using | 13460 | directory}. Therefore, if @code{default-directory} is altered using |
| 11964 | @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 |
| 11965 | which the link does not point. | 13462 | which the link does not point. |
| 11966 | @end itemize | 13463 | @end itemize |
| @@ -11969,23 +13466,23 @@ which the link does not point. | |||
| 11969 | @subsubsection @code{:exports} | 13466 | @subsubsection @code{:exports} |
| 11970 | 13467 | ||
| 11971 | 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 |
| 11972 | or LaTeX exports of the Org-mode file. | 13469 | or @LaTeX{} exports of the Org mode file. |
| 11973 | 13470 | ||
| 11974 | @itemize @bullet | 13471 | @itemize @bullet |
| 11975 | @item @code{code} | 13472 | @item @code{code} |
| 11976 | The default. The body of code is included into the exported file. E.g., | 13473 | The default. The body of code is included into the exported file. E.g., |
| 11977 | @code{:exports code}. | 13474 | @code{:exports code}. |
| 11978 | @item @code{results} | 13475 | @item @code{results} |
| 11979 | The result of evaluating the code is included in the exported file. E.g., | 13476 | The result of evaluating the code is included in the exported file. E.g., |
| 11980 | @code{:exports results}. | 13477 | @code{:exports results}. |
| 11981 | @item @code{both} | 13478 | @item @code{both} |
| 11982 | Both the code and results are included in the exported file. E.g., | 13479 | Both the code and results are included in the exported file. E.g., |
| 11983 | @code{:exports both}. | 13480 | @code{:exports both}. |
| 11984 | @item @code{none} | 13481 | @item @code{none} |
| 11985 | Nothing is included in the exported file. E.g., @code{:exports none}. | 13482 | Nothing is included in the exported file. E.g., @code{:exports none}. |
| 11986 | @end itemize | 13483 | @end itemize |
| 11987 | 13484 | ||
| 11988 | @node tangle, comments, exports, Specific header arguments | 13485 | @node tangle, mkdirp, exports, Specific header arguments |
| 11989 | @subsubsection @code{:tangle} | 13486 | @subsubsection @code{:tangle} |
| 11990 | 13487 | ||
| 11991 | The @code{:tangle} header argument specifies whether or not the code | 13488 | The @code{:tangle} header argument specifies whether or not the code |
| @@ -11993,19 +13490,26 @@ block should be included in tangled extraction of source code files. | |||
| 11993 | 13490 | ||
| 11994 | @itemize @bullet | 13491 | @itemize @bullet |
| 11995 | @item @code{tangle} | 13492 | @item @code{tangle} |
| 11996 | The code block is exported to a source code file named after the | 13493 | The code block is exported to a source code file named after the full path |
| 11997 | basename (name w/o extension) of the Org-mode file. E.g., @code{:tangle | 13494 | (including the directory) and file name (w/o extension) of the Org mode file. |
| 11998 | yes}. | 13495 | E.g., @code{:tangle yes}. |
| 11999 | @item @code{no} | 13496 | @item @code{no} |
| 12000 | 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. |
| 12001 | E.g., @code{:tangle no}. | 13498 | E.g., @code{:tangle no}. |
| 12002 | @item other | 13499 | @item other |
| 12003 | 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 |
| 12004 | as a file basename to which the block will be exported. E.g., @code{:tangle | 13501 | as a path (directory and file name relative to the directory of the Org mode |
| 12005 | basename}. | 13502 | file) to which the block will be exported. E.g., @code{:tangle path}. |
| 12006 | @end itemize | 13503 | @end itemize |
| 12007 | 13504 | ||
| 12008 | @node comments, no-expand, tangle, Specific header arguments | 13505 | @node mkdirp, comments, tangle, Specific header arguments |
| 13506 | @subsubsection @code{:mkdirp} | ||
| 13507 | |||
| 13508 | The @code{:mkdirp} header argument can be used to create parent directories | ||
| 13509 | of tangled files when missing. This can be set to @code{yes} to enable | ||
| 13510 | directory creation or to @code{no} to inhibit directory creation. | ||
| 13511 | |||
| 13512 | @node comments, padline, mkdirp, Specific header arguments | ||
| 12009 | @subsubsection @code{:comments} | 13513 | @subsubsection @code{:comments} |
| 12010 | By default code blocks are tangled to source-code files without any insertion | 13514 | By default code blocks are tangled to source-code files without any insertion |
| 12011 | of comments beyond those which may already exist in the body of the code | 13515 | of comments beyond those which may already exist in the body of the code |
| @@ -12021,15 +13525,32 @@ original Org file from which the code was tangled. | |||
| 12021 | @item @code{yes} | 13525 | @item @code{yes} |
| 12022 | A synonym for ``link'' to maintain backwards compatibility. | 13526 | A synonym for ``link'' to maintain backwards compatibility. |
| 12023 | @item @code{org} | 13527 | @item @code{org} |
| 12024 | Include text from the org-mode file as a comment. | 13528 | Include text from the Org mode file as a comment. |
| 12025 | 13529 | ||
| 12026 | 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 |
| 12027 | 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. |
| 12028 | @item @code{both} | 13532 | @item @code{both} |
| 12029 | Turns on both the ``link'' and ``org'' comment options. | 13533 | Turns on both the ``link'' and ``org'' comment options. |
| 13534 | @item @code{noweb} | ||
| 13535 | Turns on the ``link'' comment option, and additionally wraps expanded noweb | ||
| 13536 | references in the code block body in link comments. | ||
| 12030 | @end itemize | 13537 | @end itemize |
| 12031 | 13538 | ||
| 12032 | @node no-expand, session, comments, Specific header arguments | 13539 | @node padline, no-expand, comments, Specific header arguments |
| 13540 | @subsubsection @code{:padline} | ||
| 13541 | Control in insertion of padding lines around code block bodies in tangled | ||
| 13542 | code files. The default value is @code{yes} which results in insertion of | ||
| 13543 | newlines before and after each tangled code block. The following arguments | ||
| 13544 | are accepted. | ||
| 13545 | |||
| 13546 | @itemize @bullet | ||
| 13547 | @item @code{yes} | ||
| 13548 | Insert newlines before and after each code block body in tangled code files. | ||
| 13549 | @item @code{no} | ||
| 13550 | Do not insert any newline padding in tangled output. | ||
| 13551 | @end itemize | ||
| 13552 | |||
| 13553 | @node no-expand, session, padline, Specific header arguments | ||
| 12033 | @subsubsection @code{:no-expand} | 13554 | @subsubsection @code{:no-expand} |
| 12034 | 13555 | ||
| 12035 | By default, code blocks are expanded with @code{org-babel-expand-src-block} | 13556 | By default, code blocks are expanded with @code{org-babel-expand-src-block} |
| @@ -12050,12 +13571,12 @@ A string passed to the @code{:session} header argument will give the session | |||
| 12050 | a name. This makes it possible to run concurrent sessions for each | 13571 | a name. This makes it possible to run concurrent sessions for each |
| 12051 | interpreted language. | 13572 | interpreted language. |
| 12052 | 13573 | ||
| 12053 | @node noweb, cache, session, Specific header arguments | 13574 | @node noweb, noweb-ref, session, Specific header arguments |
| 12054 | @subsubsection @code{:noweb} | 13575 | @subsubsection @code{:noweb} |
| 12055 | 13576 | ||
| 12056 | The @code{:noweb} header argument controls expansion of ``noweb'' style (see | 13577 | The @code{:noweb} header argument controls expansion of ``noweb'' style (see |
| 12057 | @ref{Noweb reference syntax}) references in a code block. This header | 13578 | @ref{Noweb reference syntax}) references in a code block. This header |
| 12058 | argument can have one of three values: @code{yes} @code{no} or @code{tangle}. | 13579 | argument can have one of three values: @code{yes}, @code{no}, or @code{tangle}. |
| 12059 | 13580 | ||
| 12060 | @itemize @bullet | 13581 | @itemize @bullet |
| 12061 | @item @code{yes} | 13582 | @item @code{yes} |
| @@ -12096,7 +13617,51 @@ Note that noweb replacement text that does not contain any newlines will not | |||
| 12096 | be affected by this change, so it is still possible to use inline noweb | 13617 | be affected by this change, so it is still possible to use inline noweb |
| 12097 | references. | 13618 | references. |
| 12098 | 13619 | ||
| 12099 | @node cache, hlines, noweb, Specific header arguments | 13620 | @node noweb-ref, cache, noweb, Specific header arguments |
| 13621 | @subsubsection @code{:noweb-ref} | ||
| 13622 | When expanding ``noweb'' style references the bodies of all code block with | ||
| 13623 | @emph{either} a block name matching the reference name @emph{or} a | ||
| 13624 | @code{:noweb-ref} header argument matching the reference name will be | ||
| 13625 | concatenated together to form the replacement text. | ||
| 13626 | |||
| 13627 | By setting this header argument at the sub-tree or file level, simple code | ||
| 13628 | block concatenation may be achieved. For example, when tangling the | ||
| 13629 | following Org mode file, the bodies of code blocks will be concatenated into | ||
| 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}).}. | ||
| 13633 | |||
| 13634 | @example | ||
| 13635 | #+BEGIN_SRC sh :tangle yes :noweb yes :shebang #!/bin/sh | ||
| 13636 | <<fullest-disk>> | ||
| 13637 | #+END_SRC | ||
| 13638 | * the mount point of the fullest disk | ||
| 13639 | :PROPERTIES: | ||
| 13640 | :noweb-ref: fullest-disk | ||
| 13641 | :END: | ||
| 13642 | |||
| 13643 | ** query all mounted disks | ||
| 13644 | #+BEGIN_SRC sh | ||
| 13645 | df \ | ||
| 13646 | #+END_SRC | ||
| 13647 | |||
| 13648 | ** strip the header row | ||
| 13649 | #+BEGIN_SRC sh | ||
| 13650 | |sed '1d' \ | ||
| 13651 | #+END_SRC | ||
| 13652 | |||
| 13653 | ** sort by the percent full | ||
| 13654 | #+BEGIN_SRC sh | ||
| 13655 | |awk '@{print $5 " " $6@}'|sort -n |tail -1 \ | ||
| 13656 | #+END_SRC | ||
| 13657 | |||
| 13658 | ** extract the mount point | ||
| 13659 | #+BEGIN_SRC sh | ||
| 13660 | |awk '@{print $2@}' | ||
| 13661 | #+END_SRC | ||
| 13662 | @end example | ||
| 13663 | |||
| 13664 | @node cache, sep, noweb-ref, Specific header arguments | ||
| 12100 | @subsubsection @code{:cache} | 13665 | @subsubsection @code{:cache} |
| 12101 | 13666 | ||
| 12102 | The @code{:cache} header argument controls the use of in-buffer caching of | 13667 | The @code{:cache} header argument controls the use of in-buffer caching of |
| @@ -12116,7 +13681,44 @@ executions of the code block. If the code block has not | |||
| 12116 | changed since the last time it was evaluated, it will not be re-evaluated. | 13681 | changed since the last time it was evaluated, it will not be re-evaluated. |
| 12117 | @end itemize | 13682 | @end itemize |
| 12118 | 13683 | ||
| 12119 | @node hlines, colnames, cache, Specific header arguments | 13684 | Code block caches notice if the value of a variable argument |
| 13685 | to the code block has changed. If this is the case, the cache is | ||
| 13686 | invalidated and the code block is re-run. In the following example, | ||
| 13687 | @code{caller} will not be re-run unless the results of @code{random} have | ||
| 13688 | changed since it was last run. | ||
| 13689 | |||
| 13690 | @example | ||
| 13691 | #+NAME: random | ||
| 13692 | #+BEGIN_SRC R :cache yes | ||
| 13693 | runif(1) | ||
| 13694 | #+END_SRC | ||
| 13695 | |||
| 13696 | #+results[a2a72cd647ad44515fab62e144796432793d68e1]: random | ||
| 13697 | 0.4659510825295 | ||
| 13698 | |||
| 13699 | #+NAME: caller | ||
| 13700 | #+BEGIN_SRC emacs-lisp :var x=random :cache yes | ||
| 13701 | x | ||
| 13702 | #+END_SRC | ||
| 13703 | |||
| 13704 | #+results[bec9c8724e397d5df3b696502df3ed7892fc4f5f]: caller | ||
| 13705 | 0.254227238707244 | ||
| 13706 | @end example | ||
| 13707 | |||
| 13708 | @node sep, hlines, cache, Specific header arguments | ||
| 13709 | @subsubsection @code{:sep} | ||
| 13710 | |||
| 13711 | The @code{:sep} header argument can be used to control the delimiter used | ||
| 13712 | when writing tabular results out to files external to Org mode. This is used | ||
| 13713 | either when opening tabular results of a code block by calling the | ||
| 13714 | @code{org-open-at-point} function bound to @kbd{C-c C-o} on the code block, | ||
| 13715 | or when writing code block results to an external file (see @ref{file}) | ||
| 13716 | header argument. | ||
| 13717 | |||
| 13718 | By default, when @code{:sep} is not specified output tables are tab | ||
| 13719 | delimited. | ||
| 13720 | |||
| 13721 | @node hlines, colnames, sep, Specific header arguments | ||
| 12120 | @subsubsection @code{:hlines} | 13722 | @subsubsection @code{:hlines} |
| 12121 | 13723 | ||
| 12122 | Tables are frequently represented with one or more horizontal lines, or | 13724 | Tables are frequently represented with one or more horizontal lines, or |
| @@ -12131,17 +13733,17 @@ variable and raises an error. Setting @code{:hlines no} or relying on the | |||
| 12131 | default value yields the following results. | 13733 | default value yields the following results. |
| 12132 | 13734 | ||
| 12133 | @example | 13735 | @example |
| 12134 | #+tblname: many-cols | 13736 | #+TBLNAME: many-cols |
| 12135 | | a | b | c | | 13737 | | a | b | c | |
| 12136 | |---+---+---| | 13738 | |---+---+---| |
| 12137 | | d | e | f | | 13739 | | d | e | f | |
| 12138 | |---+---+---| | 13740 | |---+---+---| |
| 12139 | | g | h | i | | 13741 | | g | h | i | |
| 12140 | 13742 | ||
| 12141 | #+source: echo-table | 13743 | #+NAME: echo-table |
| 12142 | #+begin_src python :var tab=many-cols | 13744 | #+BEGIN_SRC python :var tab=many-cols |
| 12143 | return tab | 13745 | return tab |
| 12144 | #+end_src | 13746 | #+END_SRC |
| 12145 | 13747 | ||
| 12146 | #+results: echo-table | 13748 | #+results: echo-table |
| 12147 | | a | b | c | | 13749 | | a | b | c | |
| @@ -12150,20 +13752,20 @@ default value yields the following results. | |||
| 12150 | @end example | 13752 | @end example |
| 12151 | 13753 | ||
| 12152 | @item @code{yes} | 13754 | @item @code{yes} |
| 12153 | 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. |
| 12154 | 13756 | ||
| 12155 | @example | 13757 | @example |
| 12156 | #+tblname: many-cols | 13758 | #+TBLNAME: many-cols |
| 12157 | | a | b | c | | 13759 | | a | b | c | |
| 12158 | |---+---+---| | 13760 | |---+---+---| |
| 12159 | | d | e | f | | 13761 | | d | e | f | |
| 12160 | |---+---+---| | 13762 | |---+---+---| |
| 12161 | | g | h | i | | 13763 | | g | h | i | |
| 12162 | 13764 | ||
| 12163 | #+source: echo-table | 13765 | #+NAME: echo-table |
| 12164 | #+begin_src python :var tab=many-cols :hlines yes | 13766 | #+BEGIN_SRC python :var tab=many-cols :hlines yes |
| 12165 | return tab | 13767 | return tab |
| 12166 | #+end_src | 13768 | #+END_SRC |
| 12167 | 13769 | ||
| 12168 | #+results: echo-table | 13770 | #+results: echo-table |
| 12169 | | a | b | c | | 13771 | | a | b | c | |
| @@ -12179,6 +13781,10 @@ Leaves hlines in the table. Setting @code{:hlines yes} has this effect. | |||
| 12179 | 13781 | ||
| 12180 | The @code{:colnames} header argument accepts the values @code{yes}, | 13782 | The @code{:colnames} header argument accepts the values @code{yes}, |
| 12181 | @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. | ||
| 12182 | 13788 | ||
| 12183 | @itemize @bullet | 13789 | @itemize @bullet |
| 12184 | @item @code{nil} | 13790 | @item @code{nil} |
| @@ -12188,16 +13794,16 @@ names will be removed from the table before | |||
| 12188 | processing, then reapplied to the results. | 13794 | processing, then reapplied to the results. |
| 12189 | 13795 | ||
| 12190 | @example | 13796 | @example |
| 12191 | #+tblname: less-cols | 13797 | #+TBLNAME: less-cols |
| 12192 | | a | | 13798 | | a | |
| 12193 | |---| | 13799 | |---| |
| 12194 | | b | | 13800 | | b | |
| 12195 | | c | | 13801 | | c | |
| 12196 | 13802 | ||
| 12197 | #+srcname: echo-table-again | 13803 | #+NAME: echo-table-again |
| 12198 | #+begin_src python :var tab=less-cols | 13804 | #+BEGIN_SRC python :var tab=less-cols |
| 12199 | return [[val + '*' for val in row] for row in tab] | 13805 | return [[val + '*' for val in row] for row in tab] |
| 12200 | #+end_src | 13806 | #+END_SRC |
| 12201 | 13807 | ||
| 12202 | #+results: echo-table-again | 13808 | #+results: echo-table-again |
| 12203 | | a | | 13809 | | a | |
| @@ -12206,12 +13812,15 @@ processing, then reapplied to the results. | |||
| 12206 | | c* | | 13812 | | c* | |
| 12207 | @end example | 13813 | @end example |
| 12208 | 13814 | ||
| 13815 | Please note that column names are not removed before the table is indexed | ||
| 13816 | using variable indexing @xref{var, Indexable variable values}. | ||
| 13817 | |||
| 12209 | @item @code{no} | 13818 | @item @code{no} |
| 12210 | No column name pre-processing takes place | 13819 | No column name pre-processing takes place |
| 12211 | 13820 | ||
| 12212 | @item @code{yes} | 13821 | @item @code{yes} |
| 12213 | Column names are removed and reapplied as with @code{nil} even if the table | 13822 | Column names are removed and reapplied as with @code{nil} even if the table |
| 12214 | does not ``look like'' it has column names (i.e. the second row is not an | 13823 | does not ``look like'' it has column names (i.e.@: the second row is not an |
| 12215 | hline) | 13824 | hline) |
| 12216 | @end itemize | 13825 | @end itemize |
| 12217 | 13826 | ||
| @@ -12230,38 +13839,57 @@ The first column of the table is removed from the table before processing, | |||
| 12230 | and is then reapplied to the results. | 13839 | and is then reapplied to the results. |
| 12231 | 13840 | ||
| 12232 | @example | 13841 | @example |
| 12233 | #+tblname: with-rownames | 13842 | #+TBLNAME: with-rownames |
| 12234 | | one | 1 | 2 | 3 | 4 | 5 | | 13843 | | one | 1 | 2 | 3 | 4 | 5 | |
| 12235 | | two | 6 | 7 | 8 | 9 | 10 | | 13844 | | two | 6 | 7 | 8 | 9 | 10 | |
| 12236 | 13845 | ||
| 12237 | #+srcname: echo-table-once-again | 13846 | #+NAME: echo-table-once-again |
| 12238 | #+begin_src python :var tab=with-rownames :rownames yes | 13847 | #+BEGIN_SRC python :var tab=with-rownames :rownames yes |
| 12239 | return [[val + 10 for val in row] for row in tab] | 13848 | return [[val + 10 for val in row] for row in tab] |
| 12240 | #+end_src | 13849 | #+END_SRC |
| 12241 | 13850 | ||
| 12242 | #+results: echo-table-once-again | 13851 | #+results: echo-table-once-again |
| 12243 | | one | 11 | 12 | 13 | 14 | 15 | | 13852 | | one | 11 | 12 | 13 | 14 | 15 | |
| 12244 | | two | 16 | 17 | 18 | 19 | 20 | | 13853 | | two | 16 | 17 | 18 | 19 | 20 | |
| 12245 | @end example | 13854 | @end example |
| 13855 | |||
| 13856 | Please note that row names are not removed before the table is indexed using | ||
| 13857 | variable indexing @xref{var, Indexable variable values}. | ||
| 13858 | |||
| 12246 | @end itemize | 13859 | @end itemize |
| 12247 | 13860 | ||
| 12248 | @node shebang, eval, rownames, Specific header arguments | 13861 | @node shebang, eval, rownames, Specific header arguments |
| 12249 | @subsubsection @code{:shebang} | 13862 | @subsubsection @code{:shebang} |
| 12250 | 13863 | ||
| 12251 | Setting the @code{:shebang} header argument to a string value | 13864 | Setting the @code{:shebang} header argument to a string value |
| 12252 | (e.g. @code{:shebang "#!/bin/bash"}) causes the string to be inserted as the | 13865 | (e.g.@: @code{:shebang "#!/bin/bash"}) causes the string to be inserted as the |
| 12253 | first line of any tangled file holding the code block, and the file | 13866 | first line of any tangled file holding the code block, and the file |
| 12254 | permissions of the tangled file are set to make it executable. | 13867 | permissions of the tangled file are set to make it executable. |
| 12255 | 13868 | ||
| 12256 | @node eval, , shebang, Specific header arguments | 13869 | @node eval, , shebang, Specific header arguments |
| 12257 | @subsubsection @code{:eval} | 13870 | @subsubsection @code{:eval} |
| 12258 | 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 |
| 12259 | specific code blocks. @code{:eval} accepts two arguments ``never'' and | 13872 | specific code blocks. The @code{:eval} header argument can be useful for |
| 12260 | ``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 |
| 12261 | evaluated, this can be useful for protecting against the evaluation of | 13874 | evaluation will require a query regardless of the value of the |
| 12262 | dangerous code blocks. @code{:eval query} will require a query for every | 13875 | @code{org-confirm-babel-evaluate} variable. The possible values of |
| 12263 | execution of a code block regardless of the value of the | 13876 | @code{:eval} and their effects are shown below. |
| 12264 | @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 | ||
| 13889 | |||
| 13890 | If this header argument is not set then evaluation is determined by the value | ||
| 13891 | of the @code{org-confirm-babel-evaluate} variable see @ref{Code evaluation | ||
| 13892 | security}. | ||
| 12265 | 13893 | ||
| 12266 | @node Results of evaluation, Noweb reference syntax, Header arguments, Working With Source Code | 13894 | @node Results of evaluation, Noweb reference syntax, Header arguments, Working With Source Code |
| 12267 | @section Results of evaluation | 13895 | @section Results of evaluation |
| @@ -12270,7 +13898,8 @@ execution of a code block regardless of the value of the | |||
| 12270 | 13898 | ||
| 12271 | The way in which results are handled depends on whether a session is invoked, | 13899 | The way in which results are handled depends on whether a session is invoked, |
| 12272 | as well as on whether @code{:results value} or @code{:results output} is | 13900 | as well as on whether @code{:results value} or @code{:results output} is |
| 12273 | used. The following table shows the possibilities: | 13901 | used. The following table shows the table possibilities. For a full listing |
| 13902 | of the possible results header arguments see @ref{results}. | ||
| 12274 | 13903 | ||
| 12275 | @multitable @columnfractions 0.26 0.33 0.41 | 13904 | @multitable @columnfractions 0.26 0.33 0.41 |
| 12276 | @item @tab @b{Non-session} @tab @b{Session} | 13905 | @item @tab @b{Non-session} @tab @b{Session} |
| @@ -12279,15 +13908,15 @@ used. The following table shows the possibilities: | |||
| 12279 | @end multitable | 13908 | @end multitable |
| 12280 | 13909 | ||
| 12281 | 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 |
| 12282 | 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 |
| 12283 | vector of strings or numbers) when appropriate. | 13912 | vector of strings or numbers) when appropriate. |
| 12284 | 13913 | ||
| 12285 | @subsection Non-session | 13914 | @subsection Non-session |
| 12286 | @subsubsection @code{:results value} | 13915 | @subsubsection @code{:results value} |
| 12287 | This is the default. Internally, the value is obtained by wrapping the code | 13916 | This is the default. Internally, the value is obtained by wrapping the code |
| 12288 | in a function definition in the external language, and evaluating that | 13917 | in a function definition in the external language, and evaluating that |
| 12289 | function. Therefore, code should be written as if it were the body of such a | 13918 | function. Therefore, code should be written as if it were the body of such a |
| 12290 | function. In particular, note that Python does not automatically return a | 13919 | function. In particular, note that Python does not automatically return a |
| 12291 | value from a function unless a @code{return} statement is present, and so a | 13920 | value from a function unless a @code{return} statement is present, and so a |
| 12292 | @samp{return} statement will usually be required in Python. | 13921 | @samp{return} statement will usually be required in Python. |
| 12293 | 13922 | ||
| @@ -12296,54 +13925,62 @@ automatically wrapped in a function definition. | |||
| 12296 | 13925 | ||
| 12297 | @subsubsection @code{:results output} | 13926 | @subsubsection @code{:results output} |
| 12298 | The code is passed to the interpreter as an external process, and the | 13927 | The code is passed to the interpreter as an external process, and the |
| 12299 | contents of the standard output stream are returned as text. (In certain | 13928 | contents of the standard output stream are returned as text. (In certain |
| 12300 | languages this also contains the error output stream; this is an area for | 13929 | languages this also contains the error output stream; this is an area for |
| 12301 | future work.) | 13930 | future work.) |
| 12302 | 13931 | ||
| 12303 | @subsection Session | 13932 | @subsection Session |
| 12304 | @subsubsection @code{:results value} | 13933 | @subsubsection @code{:results value} |
| 12305 | The code is passed to the interpreter running as an interactive Emacs | 13934 | The code is passed to an interpreter running as an interactive Emacs inferior |
| 12306 | inferior process. The result returned is the result of the last evaluation | 13935 | process. Only languages which provide tools for interactive evaluation of |
| 12307 | performed by the interpreter. (This is obtained in a language-specific | 13936 | code have session support, so some language (e.g., C and ditaa) do not |
| 12308 | manner: the value of the variable @code{_} in Python and Ruby, and the value | 13937 | support the @code{:session} header argument, and in other languages (e.g., |
| 12309 | of @code{.Last.value} in R). | 13938 | Python and Haskell) which have limitations on the code which may be entered |
| 13939 | into interactive sessions, those limitations apply to the code in code blocks | ||
| 13940 | using the @code{:session} header argument as well. | ||
| 13941 | |||
| 13942 | Unless the @code{:results output} option is supplied (see below) the result | ||
| 13943 | returned is the result of the last evaluation performed by the | ||
| 13944 | interpreter. (This is obtained in a language-specific manner: the value of | ||
| 13945 | the variable @code{_} in Python and Ruby, and the value of @code{.Last.value} | ||
| 13946 | in R). | ||
| 12310 | 13947 | ||
| 12311 | @subsubsection @code{:results output} | 13948 | @subsubsection @code{:results output} |
| 12312 | The code is passed to the interpreter running as an interactive Emacs | 13949 | The code is passed to the interpreter running as an interactive Emacs |
| 12313 | inferior process. The result returned is the concatenation of the sequence of | 13950 | inferior process. The result returned is the concatenation of the sequence of |
| 12314 | (text) output from the interactive interpreter. Notice that this is not | 13951 | (text) output from the interactive interpreter. Notice that this is not |
| 12315 | necessarily the same as what would be sent to @code{STDOUT} if the same code | 13952 | necessarily the same as what would be sent to @code{STDOUT} if the same code |
| 12316 | were passed to a non-interactive interpreter running as an external | 13953 | were passed to a non-interactive interpreter running as an external |
| 12317 | process. For example, compare the following two blocks: | 13954 | process. For example, compare the following two blocks: |
| 12318 | 13955 | ||
| 12319 | @example | 13956 | @example |
| 12320 | #+begin_src python :results output | 13957 | #+BEGIN_SRC python :results output |
| 12321 | print "hello" | 13958 | print "hello" |
| 12322 | 2 | 13959 | 2 |
| 12323 | print "bye" | 13960 | print "bye" |
| 12324 | #+end_src | 13961 | #+END_SRC |
| 12325 | 13962 | ||
| 12326 | #+resname: | 13963 | #+results: |
| 12327 | : hello | 13964 | : hello |
| 12328 | : bye | 13965 | : bye |
| 12329 | @end example | 13966 | @end example |
| 12330 | 13967 | ||
| 12331 | 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. |
| 12332 | @example | 13969 | @example |
| 12333 | #+begin_src python :results output :session | 13970 | #+BEGIN_SRC python :results output :session |
| 12334 | print "hello" | 13971 | print "hello" |
| 12335 | 2 | 13972 | 2 |
| 12336 | print "bye" | 13973 | print "bye" |
| 12337 | #+end_src | 13974 | #+END_SRC |
| 12338 | 13975 | ||
| 12339 | #+resname: | 13976 | #+results: |
| 12340 | : hello | 13977 | : hello |
| 12341 | : 2 | 13978 | : 2 |
| 12342 | : bye | 13979 | : bye |
| 12343 | @end example | 13980 | @end example |
| 12344 | 13981 | ||
| 12345 | But in @code{:session} mode, the interactive interpreter receives input `2' | 13982 | But in @code{:session} mode, the interactive interpreter receives input `2' |
| 12346 | and prints out its value, `2'. (Indeed, the other print statements are | 13983 | and prints out its value, `2'. (Indeed, the other print statements are |
| 12347 | unnecessary here). | 13984 | unnecessary here). |
| 12348 | 13985 | ||
| 12349 | @node Noweb reference syntax, Key bindings and useful functions, Results of evaluation, Working With Source Code | 13986 | @node Noweb reference syntax, Key bindings and useful functions, Results of evaluation, Working With Source Code |
| @@ -12364,7 +14001,8 @@ When a code block is tangled or evaluated, whether or not ``noweb'' | |||
| 12364 | 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 |
| 12365 | 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 |
| 12366 | 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 |
| 12367 | expanded before evaluation. | 14004 | expanded before evaluation. See the @ref{noweb-ref} header argument for |
| 14005 | a more flexible way to resolve noweb references. | ||
| 12368 | 14006 | ||
| 12369 | 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 |
| 12370 | 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 |
| @@ -12372,11 +14010,17 @@ correct code is not broken in a language, such as Ruby, where | |||
| 12372 | syntactically valid in languages that you use, then please consider setting | 14010 | syntactically valid in languages that you use, then please consider setting |
| 12373 | the default value. | 14011 | the default value. |
| 12374 | 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 | |||
| 12375 | @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 |
| 12376 | @section Key bindings and useful functions | 14020 | @section Key bindings and useful functions |
| 12377 | @cindex code block, key bindings | 14021 | @cindex code block, key bindings |
| 12378 | 14022 | ||
| 12379 | Many common Org-mode key sequences are re-bound depending on | 14023 | Many common Org mode key sequences are re-bound depending on |
| 12380 | the context. | 14024 | the context. |
| 12381 | 14025 | ||
| 12382 | Within a code block, the following key bindings | 14026 | Within a code block, the following key bindings |
| @@ -12384,60 +14028,60 @@ are active: | |||
| 12384 | 14028 | ||
| 12385 | @multitable @columnfractions 0.25 0.75 | 14029 | @multitable @columnfractions 0.25 0.75 |
| 12386 | @kindex C-c C-c | 14030 | @kindex C-c C-c |
| 12387 | @item @kbd{C-c C-c} @tab org-babel-execute-src-block | 14031 | @item @kbd{C-c C-c} @tab @code{org-babel-execute-src-block} |
| 12388 | @kindex C-c C-o | 14032 | @kindex C-c C-o |
| 12389 | @item @kbd{C-c C-o} @tab org-babel-open-src-block-result | 14033 | @item @kbd{C-c C-o} @tab @code{org-babel-open-src-block-result} |
| 12390 | @kindex C-up | 14034 | @kindex C-up |
| 12391 | @item @kbd{C-@key{up}} @tab org-babel-load-in-session | 14035 | @item @kbd{C-@key{up}} @tab @code{org-babel-load-in-session} |
| 12392 | @kindex M-down | 14036 | @kindex M-down |
| 12393 | @item @kbd{M-@key{down}} @tab org-babel-pop-to-session | 14037 | @item @kbd{M-@key{down}} @tab @code{org-babel-pop-to-session} |
| 12394 | @end multitable | 14038 | @end multitable |
| 12395 | 14039 | ||
| 12396 | In an Org-mode buffer, the following key bindings are active: | 14040 | In an Org mode buffer, the following key bindings are active: |
| 12397 | 14041 | ||
| 12398 | @multitable @columnfractions 0.45 0.55 | 14042 | @multitable @columnfractions 0.45 0.55 |
| 12399 | @kindex C-c C-v a | 14043 | @kindex C-c C-v a |
| 12400 | @kindex C-c C-v C-a | 14044 | @kindex C-c C-v C-a |
| 12401 | @item @kbd{C-c C-v a} @ @ @r{or} @ @ @kbd{C-c C-v C-a} @tab org-babel-sha1-hash | 14045 | @item @kbd{C-c C-v a} @ @ @r{or} @ @ @kbd{C-c C-v C-a} @tab @code{org-babel-sha1-hash} |
| 12402 | @kindex C-c C-v b | 14046 | @kindex C-c C-v b |
| 12403 | @kindex C-c C-v C-b | 14047 | @kindex C-c C-v C-b |
| 12404 | @item @kbd{C-c C-v b} @ @ @r{or} @ @ @kbd{C-c C-v C-b} @tab org-babel-execute-buffer | 14048 | @item @kbd{C-c C-v b} @ @ @r{or} @ @ @kbd{C-c C-v C-b} @tab @code{org-babel-execute-buffer} |
| 12405 | @kindex C-c C-v f | 14049 | @kindex C-c C-v f |
| 12406 | @kindex C-c C-v C-f | 14050 | @kindex C-c C-v C-f |
| 12407 | @item @kbd{C-c C-v f} @ @ @r{or} @ @ @kbd{C-c C-v C-f} @tab org-babel-tangle-file | 14051 | @item @kbd{C-c C-v f} @ @ @r{or} @ @ @kbd{C-c C-v C-f} @tab @code{org-babel-tangle-file} |
| 12408 | @kindex C-c C-v g | 14052 | @kindex C-c C-v g |
| 12409 | @item @kbd{C-c C-v g} @tab org-babel-goto-named-source-block | 14053 | @item @kbd{C-c C-v g} @tab @code{org-babel-goto-named-source-block} |
| 12410 | @kindex C-c C-v h | 14054 | @kindex C-c C-v h |
| 12411 | @item @kbd{C-c C-v h} @tab org-babel-describe-bindings | 14055 | @item @kbd{C-c C-v h} @tab @code{org-babel-describe-bindings} |
| 12412 | @kindex C-c C-v l | 14056 | @kindex C-c C-v l |
| 12413 | @kindex C-c C-v C-l | 14057 | @kindex C-c C-v C-l |
| 12414 | @item @kbd{C-c C-v l} @ @ @r{or} @ @ @kbd{C-c C-v C-l} @tab org-babel-lob-ingest | 14058 | @item @kbd{C-c C-v l} @ @ @r{or} @ @ @kbd{C-c C-v C-l} @tab @code{org-babel-lob-ingest} |
| 12415 | @kindex C-c C-v p | 14059 | @kindex C-c C-v p |
| 12416 | @kindex C-c C-v C-p | 14060 | @kindex C-c C-v C-p |
| 12417 | @item @kbd{C-c C-v p} @ @ @r{or} @ @ @kbd{C-c C-v C-p} @tab org-babel-expand-src-block | 14061 | @item @kbd{C-c C-v p} @ @ @r{or} @ @ @kbd{C-c C-v C-p} @tab @code{org-babel-expand-src-block} |
| 12418 | @kindex C-c C-v s | 14062 | @kindex C-c C-v s |
| 12419 | @kindex C-c C-v C-s | 14063 | @kindex C-c C-v C-s |
| 12420 | @item @kbd{C-c C-v s} @ @ @r{or} @ @ @kbd{C-c C-v C-s} @tab org-babel-execute-subtree | 14064 | @item @kbd{C-c C-v s} @ @ @r{or} @ @ @kbd{C-c C-v C-s} @tab @code{org-babel-execute-subtree} |
| 12421 | @kindex C-c C-v t | 14065 | @kindex C-c C-v t |
| 12422 | @kindex C-c C-v C-t | 14066 | @kindex C-c C-v C-t |
| 12423 | @item @kbd{C-c C-v t} @ @ @r{or} @ @ @kbd{C-c C-v C-t} @tab org-babel-tangle | 14067 | @item @kbd{C-c C-v t} @ @ @r{or} @ @ @kbd{C-c C-v C-t} @tab @code{org-babel-tangle} |
| 12424 | @kindex C-c C-v z | 14068 | @kindex C-c C-v z |
| 12425 | @kindex C-c C-v C-z | 14069 | @kindex C-c C-v C-z |
| 12426 | @item @kbd{C-c C-v z} @ @ @r{or} @ @ @kbd{C-c C-v C-z} @tab org-babel-switch-to-session | 14070 | @item @kbd{C-c C-v z} @ @ @r{or} @ @ @kbd{C-c C-v C-z} @tab @code{org-babel-switch-to-session} |
| 12427 | @end multitable | 14071 | @end multitable |
| 12428 | 14072 | ||
| 12429 | @c When possible these keybindings were extended to work when the control key is | 14073 | @c When possible these keybindings were extended to work when the control key is |
| 12430 | @c kept pressed, resulting in the following additional keybindings. | 14074 | @c kept pressed, resulting in the following additional keybindings. |
| 12431 | 14075 | ||
| 12432 | @c @multitable @columnfractions 0.25 0.75 | 14076 | @c @multitable @columnfractions 0.25 0.75 |
| 12433 | @c @item @kbd{C-c C-v C-a} @tab org-babel-sha1-hash | 14077 | @c @item @kbd{C-c C-v C-a} @tab @code{org-babel-sha1-hash} |
| 12434 | @c @item @kbd{C-c C-v C-b} @tab org-babel-execute-buffer | 14078 | @c @item @kbd{C-c C-v C-b} @tab @code{org-babel-execute-buffer} |
| 12435 | @c @item @kbd{C-c C-v C-f} @tab org-babel-tangle-file | 14079 | @c @item @kbd{C-c C-v C-f} @tab @code{org-babel-tangle-file} |
| 12436 | @c @item @kbd{C-c C-v C-l} @tab org-babel-lob-ingest | 14080 | @c @item @kbd{C-c C-v C-l} @tab @code{org-babel-lob-ingest} |
| 12437 | @c @item @kbd{C-c C-v C-p} @tab org-babel-expand-src-block | 14081 | @c @item @kbd{C-c C-v C-p} @tab @code{org-babel-expand-src-block} |
| 12438 | @c @item @kbd{C-c C-v C-s} @tab org-babel-execute-subtree | 14082 | @c @item @kbd{C-c C-v C-s} @tab @code{org-babel-execute-subtree} |
| 12439 | @c @item @kbd{C-c C-v C-t} @tab org-babel-tangle | 14083 | @c @item @kbd{C-c C-v C-t} @tab @code{org-babel-tangle} |
| 12440 | @c @item @kbd{C-c C-v C-z} @tab org-babel-switch-to-session | 14084 | @c @item @kbd{C-c C-v C-z} @tab @code{org-babel-switch-to-session} |
| 12441 | @c @end multitable | 14085 | @c @end multitable |
| 12442 | 14086 | ||
| 12443 | @node Batch execution, , Key bindings and useful functions, Working With Source Code | 14087 | @node Batch execution, , Key bindings and useful functions, Working With Source Code |
| @@ -12490,6 +14134,7 @@ emacs -Q --batch -l $ORGINSTALL \ | |||
| 12490 | * Clean view:: Getting rid of leading stars in the outline | 14134 | * Clean view:: Getting rid of leading stars in the outline |
| 12491 | * TTY keys:: Using Org on a tty | 14135 | * TTY keys:: Using Org on a tty |
| 12492 | * Interaction:: Other Emacs packages | 14136 | * Interaction:: Other Emacs packages |
| 14137 | * org-crypt.el:: Encrypting Org files | ||
| 12493 | @end menu | 14138 | @end menu |
| 12494 | 14139 | ||
| 12495 | 14140 | ||
| @@ -12509,7 +14154,7 @@ emacs -Q --batch -l $ORGINSTALL \ | |||
| 12509 | @cindex tag completion | 14154 | @cindex tag completion |
| 12510 | @cindex link abbreviations, completion of | 14155 | @cindex link abbreviations, completion of |
| 12511 | 14156 | ||
| 12512 | 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 |
| 12513 | 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 |
| 12514 | 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 |
| 12515 | most one of the variables @code{org-completion-use-iswitchb} | 14160 | most one of the variables @code{org-completion-use-iswitchb} |
| @@ -12544,12 +14189,12 @@ buffer. | |||
| 12544 | After @samp{[}, complete link abbreviations (@pxref{Link abbreviations}). | 14189 | After @samp{[}, complete link abbreviations (@pxref{Link abbreviations}). |
| 12545 | @item | 14190 | @item |
| 12546 | After @samp{#+}, complete the special keywords like @samp{TYP_TODO} or | 14191 | After @samp{#+}, complete the special keywords like @samp{TYP_TODO} or |
| 12547 | @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 |
| 12548 | option keyword is already complete, pressing @kbd{M-@key{TAB}} again | 14193 | option keyword is already complete, pressing @kbd{M-@key{TAB}} again |
| 12549 | will insert example settings for this keyword. | 14194 | will insert example settings for this keyword. |
| 12550 | @item | 14195 | @item |
| 12551 | In the line after @samp{#+STARTUP: }, complete startup keywords, | 14196 | In the line after @samp{#+STARTUP: }, complete startup keywords, |
| 12552 | i.e. valid keys for this line. | 14197 | i.e.@: valid keys for this line. |
| 12553 | @item | 14198 | @item |
| 12554 | Elsewhere, complete dictionary words using Ispell. | 14199 | Elsewhere, complete dictionary words using Ispell. |
| 12555 | @end itemize | 14200 | @end itemize |
| @@ -12560,7 +14205,7 @@ Elsewhere, complete dictionary words using Ispell. | |||
| 12560 | @cindex template insertion | 14205 | @cindex template insertion |
| 12561 | @cindex insertion, of templates | 14206 | @cindex insertion, of templates |
| 12562 | 14207 | ||
| 12563 | Org-mode supports insertion of empty structural elements (like | 14208 | Org mode supports insertion of empty structural elements (like |
| 12564 | @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 |
| 12565 | strokes. This is achieved through a native template expansion mechanism. | 14210 | strokes. This is achieved through a native template expansion mechanism. |
| 12566 | 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 |
| @@ -12584,14 +14229,15 @@ The following template selectors are currently supported. | |||
| 12584 | @item @kbd{H} @tab @code{#+html:} | 14229 | @item @kbd{H} @tab @code{#+html:} |
| 12585 | @item @kbd{a} @tab @code{#+begin_ascii ... #+end_ascii} | 14230 | @item @kbd{a} @tab @code{#+begin_ascii ... #+end_ascii} |
| 12586 | @item @kbd{A} @tab @code{#+ascii:} | 14231 | @item @kbd{A} @tab @code{#+ascii:} |
| 12587 | @item @kbd{i} @tab @code{#+include:} line | 14232 | @item @kbd{i} @tab @code{#+index:} line |
| 14233 | @item @kbd{I} @tab @code{#+include:} line | ||
| 12588 | @end multitable | 14234 | @end multitable |
| 12589 | 14235 | ||
| 12590 | For example, on an empty line, typing "<e" and then pressing TAB, will expand | 14236 | For example, on an empty line, typing "<e" and then pressing TAB, will expand |
| 12591 | into a complete EXAMPLE template. | 14237 | into a complete EXAMPLE template. |
| 12592 | 14238 | ||
| 12593 | You can install additional templates by customizing the variable | 14239 | You can install additional templates by customizing the variable |
| 12594 | @code{org-structure-template-alist}. See the docstring of the variable for | 14240 | @code{org-structure-template-alist}. See the docstring of the variable for |
| 12595 | additional details. | 14241 | additional details. |
| 12596 | 14242 | ||
| 12597 | @node Speed keys, Code evaluation security, Easy Templates, Miscellaneous | 14243 | @node Speed keys, Code evaluation security, Easy Templates, Miscellaneous |
| @@ -12601,7 +14247,7 @@ additional details. | |||
| 12601 | @vindex org-speed-commands-user | 14247 | @vindex org-speed-commands-user |
| 12602 | 14248 | ||
| 12603 | Single keys can be made to execute commands when the cursor is at the | 14249 | Single keys can be made to execute commands when the cursor is at the |
| 12604 | beginning of a headline, i.e. before the first star. Configure the variable | 14250 | beginning of a headline, i.e.@: before the first star. Configure the variable |
| 12605 | @code{org-use-speed-commands} to activate this feature. There is a | 14251 | @code{org-use-speed-commands} to activate this feature. There is a |
| 12606 | pre-defined list of commands, and you can add more such commands using the | 14252 | pre-defined list of commands, and you can add more such commands using the |
| 12607 | variable @code{org-speed-commands-user}. Speed keys do not only speed up | 14253 | variable @code{org-speed-commands-user}. Speed keys do not only speed up |
| @@ -12641,9 +14287,20 @@ Make sure you know what you are doing before customizing the variables | |||
| 12641 | which take off the default security brakes. | 14287 | which take off the default security brakes. |
| 12642 | 14288 | ||
| 12643 | @defopt org-confirm-babel-evaluate | 14289 | @defopt org-confirm-babel-evaluate |
| 12644 | When set to t user is queried before code block evaluation | 14290 | When t (the default), the user is asked before every code block evaluation. |
| 14291 | When nil, the user is not asked. When set to a function, it is called with | ||
| 14292 | two arguments (language and body of the code block) and should return t to | ||
| 14293 | ask and nil not to ask. | ||
| 12645 | @end defopt | 14294 | @end defopt |
| 12646 | 14295 | ||
| 14296 | For example, here is how to execute "ditaa" code (which is considered safe) | ||
| 14297 | without asking: | ||
| 14298 | @example | ||
| 14299 | (defun my-org-confirm-babel-evaluate (lang body) | ||
| 14300 | (not (string= lang "ditaa"))) ; don't ask for ditaa | ||
| 14301 | (setq org-confirm-babel-evaluate 'my-org-confirm-babel-evaluate) | ||
| 14302 | @end example | ||
| 14303 | |||
| 12647 | @item Following @code{shell} and @code{elisp} links | 14304 | @item Following @code{shell} and @code{elisp} links |
| 12648 | Org has two link types that can directly evaluate code (@pxref{External | 14305 | Org has two link types that can directly evaluate code (@pxref{External |
| 12649 | links}). These links can be problematic because the code to be evaluated is | 14306 | links}). These links can be problematic because the code to be evaluated is |
| @@ -12680,7 +14337,7 @@ lines into the buffer (@pxref{In-buffer settings}). | |||
| 12680 | @cindex in-buffer settings | 14337 | @cindex in-buffer settings |
| 12681 | @cindex special keywords | 14338 | @cindex special keywords |
| 12682 | 14339 | ||
| 12683 | 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 |
| 12684 | 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 |
| 12685 | keyword, a colon, and then individual words defining a setting. Several | 14342 | keyword, a colon, and then individual words defining a setting. Several |
| 12686 | 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 |
| @@ -12739,14 +14396,14 @@ buffer, most useful for specifying the allowed values of a property. | |||
| 12739 | @item #+SETUPFILE: file | 14396 | @item #+SETUPFILE: file |
| 12740 | 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 |
| 12741 | 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 |
| 12742 | (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 |
| 12743 | 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 |
| 12744 | 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 |
| 12745 | 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 |
| 12746 | cursor is in the line with @kbd{C-c '}. | 14403 | cursor is in the line with @kbd{C-c '}. |
| 12747 | @item #+STARTUP: | 14404 | @item #+STARTUP: |
| 12748 | @cindex #+STARTUP: | 14405 | @cindex #+STARTUP: |
| 12749 | 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 |
| 12750 | Org file is being visited. | 14407 | Org file is being visited. |
| 12751 | 14408 | ||
| 12752 | 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 |
| @@ -12769,7 +14426,7 @@ showeverything @r{show even drawer contents} | |||
| 12769 | @cindex @code{indent}, STARTUP keyword | 14426 | @cindex @code{indent}, STARTUP keyword |
| 12770 | @cindex @code{noindent}, STARTUP keyword | 14427 | @cindex @code{noindent}, STARTUP keyword |
| 12771 | Dynamic virtual indentation is controlled by the variable | 14428 | Dynamic virtual indentation is controlled by the variable |
| 12772 | @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} |
| 12773 | @example | 14430 | @example |
| 12774 | indent @r{start with @code{org-indent-mode} turned on} | 14431 | indent @r{start with @code{org-indent-mode} turned on} |
| 12775 | noindent @r{start with @code{org-indent-mode} turned off} | 14432 | noindent @r{start with @code{org-indent-mode} turned off} |
| @@ -12896,14 +14553,14 @@ fninline @r{define footnotes inline} | |||
| 12896 | fnnoinline @r{define footnotes in separate section} | 14553 | fnnoinline @r{define footnotes in separate section} |
| 12897 | fnlocal @r{define footnotes near first reference, but not inline} | 14554 | fnlocal @r{define footnotes near first reference, but not inline} |
| 12898 | fnprompt @r{prompt for footnote labels} | 14555 | fnprompt @r{prompt for footnote labels} |
| 12899 | fnauto @r{create [fn:1]-like labels automatically (default)} | 14556 | fnauto @r{create @code{[fn:1]}-like labels automatically (default)} |
| 12900 | fnconfirm @r{offer automatic label for editing or confirmation} | 14557 | fnconfirm @r{offer automatic label for editing or confirmation} |
| 12901 | fnplain @r{create [1]-like labels automatically} | 14558 | fnplain @r{create @code{[1]}-like labels automatically} |
| 12902 | fnadjust @r{automatically renumber and sort footnotes} | 14559 | fnadjust @r{automatically renumber and sort footnotes} |
| 12903 | nofnadjust @r{do not renumber and sort automatically} | 14560 | nofnadjust @r{do not renumber and sort automatically} |
| 12904 | @end example | 14561 | @end example |
| 12905 | @cindex org-hide-block-startup | 14562 | @cindex org-hide-block-startup |
| 12906 | To hide blocks on startup, use these keywords. The corresponding variable is | 14563 | To hide blocks on startup, use these keywords. The corresponding variable is |
| 12907 | @code{org-hide-block-startup}. | 14564 | @code{org-hide-block-startup}. |
| 12908 | @cindex @code{hideblocks}, STARTUP keyword | 14565 | @cindex @code{hideblocks}, STARTUP keyword |
| 12909 | @cindex @code{nohideblocks}, STARTUP keyword | 14566 | @cindex @code{nohideblocks}, STARTUP keyword |
| @@ -12990,6 +14647,8 @@ ordered list. | |||
| 12990 | @item | 14647 | @item |
| 12991 | 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 |
| 12992 | block is updated. | 14649 | block is updated. |
| 14650 | @item | ||
| 14651 | If the cursor is at a timestamp, fix the day name in the timestamp. | ||
| 12993 | @end itemize | 14652 | @end itemize |
| 12994 | 14653 | ||
| 12995 | @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 |
| @@ -13155,7 +14814,7 @@ tty you would rather use @kbd{C-c .} to re-insert the timestamp. | |||
| 13155 | @end multitable | 14814 | @end multitable |
| 13156 | 14815 | ||
| 13157 | 14816 | ||
| 13158 | @node Interaction, , TTY keys, Miscellaneous | 14817 | @node Interaction, org-crypt.el, TTY keys, Miscellaneous |
| 13159 | @section Interaction with other packages | 14818 | @section Interaction with other packages |
| 13160 | @cindex packages, interaction with other | 14819 | @cindex packages, interaction with other |
| 13161 | Org lives in the world of GNU Emacs and interacts in various ways | 14820 | Org lives in the world of GNU Emacs and interacts in various ways |
| @@ -13179,7 +14838,7 @@ checks for the availability of Calc by looking for the function | |||
| 13179 | @code{calc-eval} which will have been autoloaded during setup if Calc has | 14838 | @code{calc-eval} which will have been autoloaded during setup if Calc has |
| 13180 | been installed properly. As of Emacs 22, Calc is part of the Emacs | 14839 | been installed properly. As of Emacs 22, Calc is part of the Emacs |
| 13181 | distribution. Another possibility for interaction between the two | 14840 | distribution. Another possibility for interaction between the two |
| 13182 | packages is using Calc for embedded calculations. @xref{Embedded Mode, | 14841 | packages is using Calc for embedded calculations. @xref{Embedded Mode, |
| 13183 | , Embedded Mode, Calc, GNU Emacs Calc Manual}. | 14842 | , Embedded Mode, Calc, GNU Emacs Calc Manual}. |
| 13184 | @item @file{constants.el} by Carsten Dominik | 14843 | @item @file{constants.el} by Carsten Dominik |
| 13185 | @cindex @file{constants.el} | 14844 | @cindex @file{constants.el} |
| @@ -13191,18 +14850,18 @@ constants in the variable @code{org-table-formula-constants}, install | |||
| 13191 | the @file{constants} package which defines a large number of constants | 14850 | the @file{constants} package which defines a large number of constants |
| 13192 | and units, and lets you use unit prefixes like @samp{M} for | 14851 | and units, and lets you use unit prefixes like @samp{M} for |
| 13193 | @samp{Mega}, etc@. You will need version 2.0 of this package, available | 14852 | @samp{Mega}, etc@. You will need version 2.0 of this package, available |
| 13194 | at @url{http://www.astro.uva.nl/~dominik/Tools}. Org checks for | 14853 | at @url{http://www.astro.uva.nl/~dominik/Tools}. Org checks for |
| 13195 | the function @code{constants-get}, which has to be autoloaded in your | 14854 | the function @code{constants-get}, which has to be autoloaded in your |
| 13196 | setup. See the installation instructions in the file | 14855 | setup. See the installation instructions in the file |
| 13197 | @file{constants.el}. | 14856 | @file{constants.el}. |
| 13198 | @item @file{cdlatex.el} by Carsten Dominik | 14857 | @item @file{cdlatex.el} by Carsten Dominik |
| 13199 | @cindex @file{cdlatex.el} | 14858 | @cindex @file{cdlatex.el} |
| 13200 | @cindex Dominik, Carsten | 14859 | @cindex Dominik, Carsten |
| 13201 | 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 |
| 13202 | @LaTeX{} fragments into Org files. See @ref{CDLaTeX mode}. | 14861 | @LaTeX{} fragments into Org files. See @ref{CDLaTeX mode}. |
| 13203 | @item @file{imenu.el} by Ake Stenhoff and Lars Lindberg | 14862 | @item @file{imenu.el} by Ake Stenhoff and Lars Lindberg |
| 13204 | @cindex @file{imenu.el} | 14863 | @cindex @file{imenu.el} |
| 13205 | 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 |
| 13206 | 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: |
| 13207 | @lisp | 14866 | @lisp |
| 13208 | (add-hook 'org-mode-hook | 14867 | (add-hook 'org-mode-hook |
| @@ -13219,7 +14878,7 @@ Org used to use this package for capture, but no longer does. | |||
| 13219 | @cindex @file{speedbar.el} | 14878 | @cindex @file{speedbar.el} |
| 13220 | @cindex Ludlam, Eric M. | 14879 | @cindex Ludlam, Eric M. |
| 13221 | 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 |
| 13222 | 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 |
| 13223 | 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 |
| 13224 | 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 |
| 13225 | the command @kbd{<} in the Speedbar frame. | 14884 | the command @kbd{<} in the Speedbar frame. |
| @@ -13233,8 +14892,8 @@ the command @kbd{<} in the Speedbar frame. | |||
| 13233 | Complex ASCII tables with automatic line wrapping, column- and row-spanning, | 14892 | Complex ASCII tables with automatic line wrapping, column- and row-spanning, |
| 13234 | 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 |
| 13235 | (@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). |
| 13236 | 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 |
| 13237 | interference with other Org-mode functionality, you unfortunately cannot edit | 14896 | interference with other Org mode functionality, you unfortunately cannot edit |
| 13238 | 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 |
| 13239 | @kbd{C-c '} to edit them, similar to source code snippets. | 14898 | @kbd{C-c '} to edit them, similar to source code snippets. |
| 13240 | 14899 | ||
| @@ -13244,7 +14903,7 @@ Edit a @file{table.el} table. Works when the cursor is in a table.el table. | |||
| 13244 | @c | 14903 | @c |
| 13245 | @orgcmd{C-c ~,org-table-create-with-table.el} | 14904 | @orgcmd{C-c ~,org-table-create-with-table.el} |
| 13246 | 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 |
| 13247 | 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 |
| 13248 | format. See the documentation string of the command | 14907 | format. See the documentation string of the command |
| 13249 | @code{org-convert-table} for the restrictions under which this is | 14908 | @code{org-convert-table} for the restrictions under which this is |
| 13250 | possible. | 14909 | possible. |
| @@ -13253,13 +14912,13 @@ possible. | |||
| 13253 | @item @file{footnote.el} by Steven L. Baur | 14912 | @item @file{footnote.el} by Steven L. Baur |
| 13254 | @cindex @file{footnote.el} | 14913 | @cindex @file{footnote.el} |
| 13255 | @cindex Baur, Steven L. | 14914 | @cindex Baur, Steven L. |
| 13256 | Org-mode recognizes numerical footnotes as provided by this package. | 14915 | Org mode recognizes numerical footnotes as provided by this package. |
| 13257 | However, Org-mode also has its own footnote support (@pxref{Footnotes}), | 14916 | However, Org mode also has its own footnote support (@pxref{Footnotes}), |
| 13258 | which makes using @file{footnote.el} unnecessary. | 14917 | which makes using @file{footnote.el} unnecessary. |
| 13259 | @end table | 14918 | @end table |
| 13260 | 14919 | ||
| 13261 | @node Conflicts, , Cooperation, Interaction | 14920 | @node Conflicts, , Cooperation, Interaction |
| 13262 | @subsection Packages that lead to conflicts with Org-mode | 14921 | @subsection Packages that lead to conflicts with Org mode |
| 13263 | 14922 | ||
| 13264 | @table @asis | 14923 | @table @asis |
| 13265 | 14924 | ||
| @@ -13271,7 +14930,7 @@ This conflicts with the use of @kbd{S-@key{cursor}} commands in Org to change | |||
| 13271 | 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 |
| 13272 | 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 |
| 13273 | 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 |
| 13274 | @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 |
| 13275 | 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 |
| 13276 | 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 |
| 13277 | cursor moves across a special context. | 14936 | cursor moves across a special context. |
| @@ -13286,14 +14945,14 @@ region. In fact, Emacs 23 has this built-in in the form of | |||
| 13286 | @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 |
| 13287 | 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, |
| 13288 | 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 |
| 13289 | 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, |
| 13290 | 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 |
| 13291 | buffer (but not during date selection). | 14950 | buffer (but not during date selection). |
| 13292 | 14951 | ||
| 13293 | @example | 14952 | @example |
| 13294 | S-UP -> M-p S-DOWN -> M-n | 14953 | S-UP @result{} M-p S-DOWN @result{} M-n |
| 13295 | S-LEFT -> M-- S-RIGHT -> M-+ | 14954 | S-LEFT @result{} M-- S-RIGHT @result{} M-+ |
| 13296 | C-S-LEFT -> M-S-- C-S-RIGHT -> M-S-+ | 14955 | C-S-LEFT @result{} M-S-- C-S-RIGHT @result{} M-S-+ |
| 13297 | @end example | 14956 | @end example |
| 13298 | 14957 | ||
| 13299 | @vindex org-disputed-keys | 14958 | @vindex org-disputed-keys |
| @@ -13303,7 +14962,7 @@ to have other replacement keys, look at the variable | |||
| 13303 | 14962 | ||
| 13304 | @item @file{yasnippet.el} | 14963 | @item @file{yasnippet.el} |
| 13305 | @cindex @file{yasnippet.el} | 14964 | @cindex @file{yasnippet.el} |
| 13306 | The way Org-mode binds the TAB key (binding to @code{[tab]} instead of | 14965 | The way Org mode binds the TAB key (binding to @code{[tab]} instead of |
| 13307 | @code{"\t"}) overrules YASnippet's access to this key. The following code | 14966 | @code{"\t"}) overrules YASnippet's access to this key. The following code |
| 13308 | fixed this problem: | 14967 | fixed this problem: |
| 13309 | 14968 | ||
| @@ -13311,14 +14970,34 @@ fixed this problem: | |||
| 13311 | (add-hook 'org-mode-hook | 14970 | (add-hook 'org-mode-hook |
| 13312 | (lambda () | 14971 | (lambda () |
| 13313 | (org-set-local 'yas/trigger-key [tab]) | 14972 | (org-set-local 'yas/trigger-key [tab]) |
| 13314 | (define-key yas/keymap [tab] 'yas/next-field-group))) | 14973 | (define-key yas/keymap [tab] 'yas/next-field-or-maybe-expand))) |
| 14974 | @end lisp | ||
| 14975 | |||
| 14976 | The latest version of yasnippet doesn't play well with Org mode. If the | ||
| 14977 | above code does not fix the conflict, start by defining the following | ||
| 14978 | function: | ||
| 14979 | |||
| 14980 | @lisp | ||
| 14981 | (defun yas/org-very-safe-expand () | ||
| 14982 | (let ((yas/fallback-behavior 'return-nil)) (yas/expand))) | ||
| 14983 | @end lisp | ||
| 14984 | |||
| 14985 | Then, tell Org mode what to do with the new function: | ||
| 14986 | |||
| 14987 | @lisp | ||
| 14988 | (add-hook 'org-mode-hook | ||
| 14989 | (lambda () | ||
| 14990 | (make-variable-buffer-local 'yas/trigger-key) | ||
| 14991 | (setq yas/trigger-key [tab]) | ||
| 14992 | (add-to-list 'org-tab-first-hook 'yas/org-very-safe-expand) | ||
| 14993 | (define-key yas/keymap [tab] 'yas/next-field))) | ||
| 13315 | @end lisp | 14994 | @end lisp |
| 13316 | 14995 | ||
| 13317 | @item @file{windmove.el} by Hovav Shacham | 14996 | @item @file{windmove.el} by Hovav Shacham |
| 13318 | @cindex @file{windmove.el} | 14997 | @cindex @file{windmove.el} |
| 13319 | 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 |
| 13320 | 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 |
| 13321 | 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 |
| 13322 | special functionality on @kbd{S-@key{cursor}}, add this to your | 15001 | special functionality on @kbd{S-@key{cursor}}, add this to your |
| 13323 | configuration: | 15002 | configuration: |
| 13324 | 15003 | ||
| @@ -13334,7 +15013,7 @@ configuration: | |||
| 13334 | @cindex @file{viper.el} | 15013 | @cindex @file{viper.el} |
| 13335 | @kindex C-c / | 15014 | @kindex C-c / |
| 13336 | 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 |
| 13337 | 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 |
| 13338 | another key for this command, or override the key in | 15017 | another key for this command, or override the key in |
| 13339 | @code{viper-vi-global-user-map} with | 15018 | @code{viper-vi-global-user-map} with |
| 13340 | 15019 | ||
| @@ -13344,6 +15023,44 @@ another key for this command, or override the key in | |||
| 13344 | 15023 | ||
| 13345 | @end table | 15024 | @end table |
| 13346 | 15025 | ||
| 15026 | @node org-crypt.el, , Interaction, Miscellaneous | ||
| 15027 | @section org-crypt.el | ||
| 15028 | @cindex @file{org-crypt.el} | ||
| 15029 | @cindex @code{org-decrypt-entry} | ||
| 15030 | |||
| 15031 | Org-crypt will encrypt the text of an entry, but not the headline, or | ||
| 15032 | properties. Org-crypt uses the Emacs EasyPG library to encrypt and decrypt | ||
| 15033 | files. | ||
| 15034 | |||
| 15035 | Any text below a headline that has a @samp{:crypt:} tag will be automatically | ||
| 15036 | be encrypted when the file is saved. If you want to use a different tag just | ||
| 15037 | customize the @code{org-crypt-tag-matcher} setting. | ||
| 15038 | |||
| 15039 | To use org-crypt it is suggested that you have the following in your | ||
| 15040 | @file{.emacs}: | ||
| 15041 | |||
| 15042 | @example | ||
| 15043 | (require 'org-crypt) | ||
| 15044 | (org-crypt-use-before-save-magic) | ||
| 15045 | (setq org-tags-exclude-from-inheritance (quote ("crypt"))) | ||
| 15046 | |||
| 15047 | (setq org-crypt-key nil) | ||
| 15048 | ;; GPG key to use for encryption | ||
| 15049 | ;; Either the Key ID or set to nil to use symmetric encryption. | ||
| 15050 | |||
| 15051 | (setq auto-save-default nil) | ||
| 15052 | ;; Auto-saving does not cooperate with org-crypt.el: so you need | ||
| 15053 | ;; to turn it off if you plan to use org-crypt.el quite often. | ||
| 15054 | ;; Otherwise, you'll get an (annoying) message each time you | ||
| 15055 | ;; start Org. | ||
| 15056 | |||
| 15057 | ;; To turn it off only locally, you can insert this: | ||
| 15058 | ;; | ||
| 15059 | ;; # -*- buffer-auto-save-file-name: nil; -*- | ||
| 15060 | @end example | ||
| 15061 | |||
| 15062 | Excluding the crypt tag from inheritance prevents already encrypted text | ||
| 15063 | being encrypted again. | ||
| 13347 | 15064 | ||
| 13348 | @node Hacking, MobileOrg, Miscellaneous, Top | 15065 | @node Hacking, MobileOrg, Miscellaneous, Top |
| 13349 | @appendix Hacking | 15066 | @appendix Hacking |
| @@ -13381,7 +15098,7 @@ maintained by the Worg project and can be found at | |||
| 13381 | 15098 | ||
| 13382 | 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. |
| 13383 | 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 |
| 13384 | 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 |
| 13385 | @uref{http://orgmode.org}. The list of contributed packages, along with | 15102 | @uref{http://orgmode.org}. The list of contributed packages, along with |
| 13386 | documentation about each package, is maintained by the Worg project at | 15103 | documentation about each package, is maintained by the Worg project at |
| 13387 | @uref{http://orgmode.org/worg/org-contrib/}. | 15104 | @uref{http://orgmode.org/worg/org-contrib/}. |
| @@ -13487,7 +15204,7 @@ the link description when the link is later inserted into an Org | |||
| 13487 | buffer with @kbd{C-c C-l}. | 15204 | buffer with @kbd{C-c C-l}. |
| 13488 | 15205 | ||
| 13489 | When it makes sense for your new link type, you may also define a function | 15206 | When it makes sense for your new link type, you may also define a function |
| 13490 | @code{org-PREFIX-complete-link} that implements special (e.g. completion) | 15207 | @code{org-PREFIX-complete-link} that implements special (e.g.@: completion) |
| 13491 | support for inserting such a link with @kbd{C-c C-l}. Such a function should | 15208 | support for inserting such a link with @kbd{C-c C-l}. Such a function should |
| 13492 | not accept any arguments, and return the full link with prefix. | 15209 | not accept any arguments, and return the full link with prefix. |
| 13493 | 15210 | ||
| @@ -13505,7 +15222,7 @@ Add-ons can tap into this functionality by providing a function that detects | |||
| 13505 | special context for that add-on and executes functionality appropriate for | 15222 | special context for that add-on and executes functionality appropriate for |
| 13506 | 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 |
| 13507 | 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 |
| 13508 | @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 |
| 13509 | 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 |
| 13510 | package, special contexts are lines that start with @code{#+R:} or | 15227 | package, special contexts are lines that start with @code{#+R:} or |
| 13511 | @code{#+RR:}. | 15228 | @code{#+RR:}. |
| @@ -13526,7 +15243,8 @@ package, special contexts are lines that start with @code{#+R:} or | |||
| 13526 | The function first checks if the cursor is in such a line. If that is the | 15243 | The function first checks if the cursor is in such a line. If that is the |
| 13527 | case, @code{org-R-apply} is called and the function returns @code{t} to | 15244 | case, @code{org-R-apply} is called and the function returns @code{t} to |
| 13528 | signal that action was taken, and @kbd{C-c C-c} will stop looking for other | 15245 | signal that action was taken, and @kbd{C-c C-c} will stop looking for other |
| 13529 | contexts. If the function finds it should do nothing locally, it returns @code{nil} so that other, similar functions can have a try. | 15246 | contexts. If the function finds it should do nothing locally, it returns |
| 15247 | @code{nil} so that other, similar functions can have a try. | ||
| 13530 | 15248 | ||
| 13531 | 15249 | ||
| 13532 | @node Tables in arbitrary syntax, Dynamic blocks, Context-sensitive commands, Hacking | 15250 | @node Tables in arbitrary syntax, Dynamic blocks, Context-sensitive commands, Hacking |
| @@ -13539,7 +15257,7 @@ Since Orgtbl mode can be used as a minor mode in arbitrary buffers, a | |||
| 13539 | frequent feature request has been to make it work with native tables in | 15257 | frequent feature request has been to make it work with native tables in |
| 13540 | specific languages, for example @LaTeX{}. However, this is extremely | 15258 | specific languages, for example @LaTeX{}. However, this is extremely |
| 13541 | hard to do in a general way, would lead to a customization nightmare, | 15259 | hard to do in a general way, would lead to a customization nightmare, |
| 13542 | and would take away much of the simplicity of the Orgtbl-mode table | 15260 | and would take away much of the simplicity of the Orgtbl mode table |
| 13543 | editor. | 15261 | editor. |
| 13544 | 15262 | ||
| 13545 | This appendix describes a different approach. We keep the Orgtbl mode | 15263 | This appendix describes a different approach. We keep the Orgtbl mode |
| @@ -13557,12 +15275,12 @@ can use Org's facilities to edit and structure lists by turning | |||
| 13557 | 15275 | ||
| 13558 | @menu | 15276 | @menu |
| 13559 | * Radio tables:: Sending and receiving radio tables | 15277 | * Radio tables:: Sending and receiving radio tables |
| 13560 | * A LaTeX example:: Step by step, almost a tutorial | 15278 | * A @LaTeX{} example:: Step by step, almost a tutorial |
| 13561 | * Translator functions:: Copy and modify | 15279 | * Translator functions:: Copy and modify |
| 13562 | * Radio lists:: Doing the same for lists | 15280 | * Radio lists:: Doing the same for lists |
| 13563 | @end menu | 15281 | @end menu |
| 13564 | 15282 | ||
| 13565 | @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 |
| 13566 | @subsection Radio tables | 15284 | @subsection Radio tables |
| 13567 | @cindex radio tables | 15285 | @cindex radio tables |
| 13568 | 15286 | ||
| @@ -13587,7 +15305,7 @@ example: | |||
| 13587 | 15305 | ||
| 13588 | @noindent | 15306 | @noindent |
| 13589 | @code{table_name} is the reference name for the table that is also used | 15307 | @code{table_name} is the reference name for the table that is also used |
| 13590 | in the receiver lines. @code{translation_function} is the Lisp function | 15308 | in the receiver lines. @code{translation_function} is the Lisp function |
| 13591 | that does the translation. Furthermore, the line can contain a list of | 15309 | that does the translation. Furthermore, the line can contain a list of |
| 13592 | arguments (alternating key and value) at the end. The arguments will be | 15310 | arguments (alternating key and value) at the end. The arguments will be |
| 13593 | passed as a property list to the translation function for | 15311 | passed as a property list to the translation function for |
| @@ -13630,7 +15348,7 @@ makes this comment-toggling very easy, in particular if you bind it to a | |||
| 13630 | key. | 15348 | key. |
| 13631 | @end itemize | 15349 | @end itemize |
| 13632 | 15350 | ||
| 13633 | @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 |
| 13634 | @subsection A @LaTeX{} example of radio tables | 15352 | @subsection A @LaTeX{} example of radio tables |
| 13635 | @cindex @LaTeX{}, and Orgtbl mode | 15353 | @cindex @LaTeX{}, and Orgtbl mode |
| 13636 | 15354 | ||
| @@ -13690,7 +15408,7 @@ table inserted between the two marker lines. | |||
| 13690 | Now let's assume you want to make the table header by hand, because you | 15408 | Now let's assume you want to make the table header by hand, because you |
| 13691 | want to control how columns are aligned, etc@. In this case we make sure | 15409 | want to control how columns are aligned, etc@. In this case we make sure |
| 13692 | that the table translator skips the first 2 lines of the source | 15410 | that the table translator skips the first 2 lines of the source |
| 13693 | table, and tell the command to work as a @i{splice}, i.e. to not produce | 15411 | table, and tell the command to work as a @i{splice}, i.e.@: to not produce |
| 13694 | header and footer commands of the target table: | 15412 | header and footer commands of the target table: |
| 13695 | 15413 | ||
| 13696 | @example | 15414 | @example |
| @@ -13725,7 +15443,7 @@ tabular environment. Default is nil. | |||
| 13725 | A format to be used to wrap each field, it should contain @code{%s} for the | 15443 | A format to be used to wrap each field, it should contain @code{%s} for the |
| 13726 | original field value. For example, to wrap each field value in dollars, | 15444 | original field value. For example, to wrap each field value in dollars, |
| 13727 | you could use @code{:fmt "$%s$"}. This may also be a property list with | 15445 | you could use @code{:fmt "$%s$"}. This may also be a property list with |
| 13728 | column numbers and formats. for example @code{:fmt (2 "$%s$" 4 "%s\\%%")}. | 15446 | column numbers and formats, for example @code{:fmt (2 "$%s$" 4 "%s\\%%")}. |
| 13729 | A function of one argument can be used in place of the strings; the | 15447 | A function of one argument can be used in place of the strings; the |
| 13730 | function must return a formatted string. | 15448 | function must return a formatted string. |
| 13731 | 15449 | ||
| @@ -13740,7 +15458,7 @@ applied. Similar to @code{fmt}, functions of two arguments can be | |||
| 13740 | supplied instead of strings. | 15458 | supplied instead of strings. |
| 13741 | @end table | 15459 | @end table |
| 13742 | 15460 | ||
| 13743 | @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 |
| 13744 | @subsection Translator functions | 15462 | @subsection Translator functions |
| 13745 | @cindex HTML, and Orgtbl mode | 15463 | @cindex HTML, and Orgtbl mode |
| 13746 | @cindex translator function | 15464 | @cindex translator function |
| @@ -13773,7 +15491,7 @@ hands processing over to the generic translator. Here is the entire code: | |||
| 13773 | 15491 | ||
| 13774 | As you can see, the properties passed into the function (variable | 15492 | As you can see, the properties passed into the function (variable |
| 13775 | @var{PARAMS}) are combined with the ones newly defined in the function | 15493 | @var{PARAMS}) are combined with the ones newly defined in the function |
| 13776 | (variable @var{PARAMS2}). The ones passed into the function (i.e. the | 15494 | (variable @var{PARAMS2}). The ones passed into the function (i.e.@: the |
| 13777 | ones set by the @samp{ORGTBL SEND} line) take precedence. So if you | 15495 | ones set by the @samp{ORGTBL SEND} line) take precedence. So if you |
| 13778 | would like to use the @LaTeX{} translator, but wanted the line endings to | 15496 | would like to use the @LaTeX{} translator, but wanted the line endings to |
| 13779 | be @samp{\\[2mm]} instead of the default @samp{\\}, you could just | 15497 | be @samp{\\[2mm]} instead of the default @samp{\\}, you could just |
| @@ -13920,15 +15638,24 @@ example @code{before-save-hook}. @code{org-update-all-dblocks} is | |||
| 13920 | written in a way such that it does nothing in buffers that are not in | 15638 | written in a way such that it does nothing in buffers that are not in |
| 13921 | @code{org-mode}. | 15639 | @code{org-mode}. |
| 13922 | 15640 | ||
| 15641 | You can narrow the current buffer to the current dynamic block (like any | ||
| 15642 | other block) with @code{org-narrow-to-block}. | ||
| 15643 | |||
| 13923 | @node Special agenda views, Extracting agenda information, Dynamic blocks, Hacking | 15644 | @node Special agenda views, Extracting agenda information, Dynamic blocks, Hacking |
| 13924 | @section Special agenda views | 15645 | @section Special agenda views |
| 13925 | @cindex agenda views, user-defined | 15646 | @cindex agenda views, user-defined |
| 13926 | 15647 | ||
| 15648 | @vindex org-agenda-skip-function | ||
| 15649 | @vindex org-agenda-skip-function-global | ||
| 13927 | Org provides a special hook that can be used to narrow down the selection | 15650 | Org provides a special hook that can be used to narrow down the selection |
| 13928 | made by these agenda views: @code{todo}, @code{alltodo}, @code{tags}, @code{tags-todo}, | 15651 | made by these agenda views: @code{agenda}, @code{todo}, @code{alltodo}, |
| 13929 | @code{tags-tree}. You may specify a function that is used at each match to verify | 15652 | @code{tags}, @code{tags-todo}, @code{tags-tree}. You may specify a function |
| 13930 | if the match should indeed be part of the agenda view, and if not, how | 15653 | that is used at each match to verify if the match should indeed be part of |
| 13931 | much should be skipped. | 15654 | the agenda view, and if not, how much should be skipped. You can specify a |
| 15655 | global condition that will be applied to all agenda views, this condition | ||
| 15656 | would be stored in the variable @code{org-agenda-skip-function-global}. More | ||
| 15657 | commonly, such a definition is applied only to specific custom searches, | ||
| 15658 | using @code{org-agenda-skip-function}. | ||
| 13932 | 15659 | ||
| 13933 | Let's say you want to produce a list of projects that contain a WAITING | 15660 | Let's say you want to produce a list of projects that contain a WAITING |
| 13934 | tag anywhere in the project tree. Let's further assume that you have | 15661 | tag anywhere in the project tree. Let's further assume that you have |
| @@ -13981,25 +15708,25 @@ particular, you may use the functions @code{org-agenda-skip-entry-if} | |||
| 13981 | and @code{org-agenda-skip-subtree-if} in this form, for example: | 15708 | and @code{org-agenda-skip-subtree-if} in this form, for example: |
| 13982 | 15709 | ||
| 13983 | @table @code | 15710 | @table @code |
| 13984 | @item '(org-agenda-skip-entry-if 'scheduled) | 15711 | @item (org-agenda-skip-entry-if 'scheduled) |
| 13985 | Skip current entry if it has been scheduled. | 15712 | Skip current entry if it has been scheduled. |
| 13986 | @item '(org-agenda-skip-entry-if 'notscheduled) | 15713 | @item (org-agenda-skip-entry-if 'notscheduled) |
| 13987 | Skip current entry if it has not been scheduled. | 15714 | Skip current entry if it has not been scheduled. |
| 13988 | @item '(org-agenda-skip-entry-if 'deadline) | 15715 | @item (org-agenda-skip-entry-if 'deadline) |
| 13989 | Skip current entry if it has a deadline. | 15716 | Skip current entry if it has a deadline. |
| 13990 | @item '(org-agenda-skip-entry-if 'scheduled 'deadline) | 15717 | @item (org-agenda-skip-entry-if 'scheduled 'deadline) |
| 13991 | Skip current entry if it has a deadline, or if it is scheduled. | 15718 | Skip current entry if it has a deadline, or if it is scheduled. |
| 13992 | @item '(org-agenda-skip-entry-if 'todo '("TODO" "WAITING")) | 15719 | @item (org-agenda-skip-entry-if 'todo '("TODO" "WAITING")) |
| 13993 | Skip current entry if the TODO keyword is TODO or WAITING. | 15720 | Skip current entry if the TODO keyword is TODO or WAITING. |
| 13994 | @item '(org-agenda-skip-entry-if 'todo 'done) | 15721 | @item (org-agenda-skip-entry-if 'todo 'done) |
| 13995 | Skip current entry if the TODO keyword marks a DONE state. | 15722 | Skip current entry if the TODO keyword marks a DONE state. |
| 13996 | @item '(org-agenda-skip-entry-if 'timestamp) | 15723 | @item (org-agenda-skip-entry-if 'timestamp) |
| 13997 | Skip current entry if it has any timestamp, may also be deadline or scheduled. | 15724 | Skip current entry if it has any timestamp, may also be deadline or scheduled. |
| 13998 | @item '(org-agenda-skip-entry 'regexp "regular expression") | 15725 | @item (org-agenda-skip-entry 'regexp "regular expression") |
| 13999 | Skip current entry if the regular expression matches in the entry. | 15726 | Skip current entry if the regular expression matches in the entry. |
| 14000 | @item '(org-agenda-skip-entry 'notregexp "regular expression") | 15727 | @item (org-agenda-skip-entry 'notregexp "regular expression") |
| 14001 | Skip current entry unless the regular expression matches. | 15728 | Skip current entry unless the regular expression matches. |
| 14002 | @item '(org-agenda-skip-subtree-if 'regexp "regular expression") | 15729 | @item (org-agenda-skip-subtree-if 'regexp "regular expression") |
| 14003 | Same as above, but check and skip the entire subtree. | 15730 | Same as above, but check and skip the entire subtree. |
| 14004 | @end table | 15731 | @end table |
| 14005 | 15732 | ||
| @@ -14051,7 +15778,7 @@ You may also modify parameters on the fly like this: | |||
| 14051 | @example | 15778 | @example |
| 14052 | emacs -batch -l ~/.emacs \ | 15779 | emacs -batch -l ~/.emacs \ |
| 14053 | -eval '(org-batch-agenda "a" \ | 15780 | -eval '(org-batch-agenda "a" \ |
| 14054 | org-agenda-span month \ | 15781 | org-agenda-span (quote month) \ |
| 14055 | org-agenda-include-diary nil \ | 15782 | org-agenda-include-diary nil \ |
| 14056 | org-agenda-files (quote ("~/org/project.org")))' \ | 15783 | org-agenda-files (quote ("~/org/project.org")))' \ |
| 14057 | | lpr | 15784 | | lpr |
| @@ -14219,7 +15946,7 @@ does not need to preserve point. After evaluation, the cursor will be | |||
| 14219 | moved to the end of the line (presumably of the headline of the | 15946 | moved to the end of the line (presumably of the headline of the |
| 14220 | processed entry) and search continues from there. Under some | 15947 | processed entry) and search continues from there. Under some |
| 14221 | circumstances, this may not produce the wanted results. For example, | 15948 | circumstances, this may not produce the wanted results. For example, |
| 14222 | if you have removed (e.g. archived) the current (sub)tree it could | 15949 | if you have removed (e.g.@: archived) the current (sub)tree it could |
| 14223 | mean that the next entry will be skipped entirely. In such cases, you | 15950 | mean that the next entry will be skipped entirely. In such cases, you |
| 14224 | can specify the position from where search should continue by making | 15951 | can specify the position from where search should continue by making |
| 14225 | FUNC set the variable `org-map-continue-from' to the desired buffer | 15952 | FUNC set the variable `org-map-continue-from' to the desired buffer |
| @@ -14235,6 +15962,7 @@ SCOPE determines the scope of this command. It can be any of: | |||
| 14235 | @example | 15962 | @example |
| 14236 | nil @r{the current buffer, respecting the restriction if any} | 15963 | nil @r{the current buffer, respecting the restriction if any} |
| 14237 | tree @r{the subtree started with the entry at point} | 15964 | tree @r{the subtree started with the entry at point} |
| 15965 | region @r{The entries within the active region, if any} | ||
| 14238 | file @r{the current buffer, without restriction} | 15966 | file @r{the current buffer, without restriction} |
| 14239 | file-with-archives | 15967 | file-with-archives |
| 14240 | @r{the current buffer, and any archives associated with it} | 15968 | @r{the current buffer, and any archives associated with it} |
| @@ -14312,7 +16040,7 @@ The following example counts the number of entries with TODO keyword | |||
| 14312 | 16040 | ||
| 14313 | @uref{http://mobileorg.ncogni.to/, MobileOrg} is an application for the | 16041 | @uref{http://mobileorg.ncogni.to/, MobileOrg} is an application for the |
| 14314 | @i{iPhone/iPod Touch} series of devices, developed by Richard Moreland. | 16042 | @i{iPhone/iPod Touch} series of devices, developed by Richard Moreland. |
| 14315 | @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 |
| 14316 | 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 |
| 14317 | changes to existing entries. Android users should check out | 16045 | changes to existing entries. Android users should check out |
| 14318 | @uref{http://wiki.github.com/matburt/mobileorg-android/, MobileOrg Android} | 16046 | @uref{http://wiki.github.com/matburt/mobileorg-android/, MobileOrg Android} |
| @@ -14341,7 +16069,7 @@ in-buffer settings, but it will understand the logistics of TODO state | |||
| 14341 | 16069 | ||
| 14342 | 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 |
| 14343 | 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 |
| 14344 | 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 |
| 14345 | @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} |
| 14346 | 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 |
| 14347 | @i{MobileOrg} and, on the Emacs side, configure the variable | 16075 | @i{MobileOrg} and, on the Emacs side, configure the variable |
| @@ -14355,7 +16083,7 @@ The easiest way to create that directory is to use a free | |||
| 14355 | @uref{http://dropbox.com,Dropbox.com} account@footnote{If you cannot use | 16083 | @uref{http://dropbox.com,Dropbox.com} account@footnote{If you cannot use |
| 14356 | Dropbox, or if your version of MobileOrg does not support it, you can use a | 16084 | Dropbox, or if your version of MobileOrg does not support it, you can use a |
| 14357 | webdav server. For more information, check out the documentation of MobileOrg and also this | 16085 | webdav server. For more information, check out the documentation of MobileOrg and also this |
| 14358 | @uref{http://orgmode.org/worg/org-faq.php#mobileorg_webdav, FAQ entry}.}. | 16086 | @uref{http://orgmode.org/worg/org-faq.html#mobileorg_webdav, FAQ entry}.}. |
| 14359 | When MobileOrg first connects to your Dropbox, it will create a directory | 16087 | When MobileOrg first connects to your Dropbox, it will create a directory |
| 14360 | @i{MobileOrg} inside the Dropbox. After the directory has been created, tell | 16088 | @i{MobileOrg} inside the Dropbox. After the directory has been created, tell |
| 14361 | Emacs about it: | 16089 | Emacs about it: |
| @@ -14364,7 +16092,7 @@ Emacs about it: | |||
| 14364 | (setq org-mobile-directory "~/Dropbox/MobileOrg") | 16092 | (setq org-mobile-directory "~/Dropbox/MobileOrg") |
| 14365 | @end lisp | 16093 | @end lisp |
| 14366 | 16094 | ||
| 14367 | 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, |
| 14368 | and to read captured notes from there. | 16096 | and to read captured notes from there. |
| 14369 | 16097 | ||
| 14370 | @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 |
| @@ -14373,11 +16101,11 @@ and to read captured notes from there. | |||
| 14373 | This operation copies all files currently listed in @code{org-mobile-files} | 16101 | This operation copies all files currently listed in @code{org-mobile-files} |
| 14374 | to the directory @code{org-mobile-directory}. By default this list contains | 16102 | to the directory @code{org-mobile-directory}. By default this list contains |
| 14375 | all agenda files (as listed in @code{org-agenda-files}), but additional files | 16103 | all agenda files (as listed in @code{org-agenda-files}), but additional files |
| 14376 | can be included by customizing @code{org-mobiles-files}. File names will be | 16104 | can be included by customizing @code{org-mobile-files}. File names will be |
| 14377 | 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 |
| 14378 | 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 |
| 14379 | @file{agendas.org} with all custom agenda view defined by the | 16107 | @file{agendas.org} with all custom agenda view defined by the |
| 14380 | 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 |
| 14381 | 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 |
| 14382 | 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 |
| 14383 | these properties in so many entries, you can set the variable | 16111 | these properties in so many entries, you can set the variable |
| @@ -14478,7 +16206,7 @@ Before I get to this list, a few special mentions are in order: | |||
| 14478 | @table @i | 16206 | @table @i |
| 14479 | @item Bastien Guerry | 16207 | @item Bastien Guerry |
| 14480 | 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 |
| 14481 | 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 |
| 14482 | 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 |
| 14483 | 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 |
| 14484 | invented Worg, helped establishing the Web presence of Org, and sponsors | 16212 | invented Worg, helped establishing the Web presence of Org, and sponsors |
| @@ -14513,13 +16241,13 @@ know what I am missing here! | |||
| 14513 | @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}. |
| 14514 | @item | 16242 | @item |
| 14515 | @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 |
| 14516 | Org-mode website. | 16244 | Org mode website. |
| 14517 | @item | 16245 | @item |
| 14518 | @i{Alex Bochannek} provided a patch for rounding timestamps. | 16246 | @i{Alex Bochannek} provided a patch for rounding timestamps. |
| 14519 | @item | 16247 | @item |
| 14520 | @i{Jan Böcker} wrote @file{org-docview.el}. | 16248 | @i{Jan Böcker} wrote @file{org-docview.el}. |
| 14521 | @item | 16249 | @item |
| 14522 | @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. |
| 14523 | @item | 16251 | @item |
| 14524 | @i{Tom Breton} wrote @file{org-choose.el}. | 16252 | @i{Tom Breton} wrote @file{org-choose.el}. |
| 14525 | @item | 16253 | @item |
| @@ -14695,7 +16423,7 @@ tweaks and features. | |||
| 14695 | extension system, added support for mairix, and proposed the mapping API. | 16423 | extension system, added support for mairix, and proposed the mapping API. |
| 14696 | @item | 16424 | @item |
| 14697 | @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, |
| 14698 | LaTeX, UTF-8, Latin-1 and ASCII. | 16426 | @LaTeX{}, UTF-8, Latin-1 and ASCII. |
| 14699 | @item | 16427 | @item |
| 14700 | @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 |
| 14701 | with links transformation to Org syntax. | 16429 | with links transformation to Org syntax. |
| @@ -14703,8 +16431,10 @@ with links transformation to Org syntax. | |||
| 14703 | @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 |
| 14704 | chapter about publishing. | 16432 | chapter about publishing. |
| 14705 | @item | 16433 | @item |
| 14706 | @i{Sebastien Vauban} reported many issues with LaTeX and BEAMER export and | 16434 | @i{Jambunathan K} contributed the @acronym{ODT} exporter. |
| 14707 | enabled source code highlighling in Gnus. | 16435 | @item |
| 16436 | @i{Sebastien Vauban} reported many issues with @LaTeX{} and BEAMER export and | ||
| 16437 | enabled source code highlighting in Gnus. | ||
| 14708 | @item | 16438 | @item |
| 14709 | @i{Stefan Vollmar} organized a video-recorded talk at the | 16439 | @i{Stefan Vollmar} organized a video-recorded talk at the |
| 14710 | 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 |
| @@ -14729,6 +16459,7 @@ work on a tty. | |||
| 14729 | @item | 16459 | @item |
| 14730 | @i{Piotr Zielinski} wrote @file{org-mouse.el}, proposed agenda blocks | 16460 | @i{Piotr Zielinski} wrote @file{org-mouse.el}, proposed agenda blocks |
| 14731 | and contributed various ideas and code snippets. | 16461 | and contributed various ideas and code snippets. |
| 16462 | @item | ||
| 14732 | @end itemize | 16463 | @end itemize |
| 14733 | 16464 | ||
| 14734 | 16465 | ||