diff options
| author | Carsten Dominik | 2007-02-25 06:40:58 +0000 |
|---|---|---|
| committer | Carsten Dominik | 2007-02-25 06:40:58 +0000 |
| commit | 06341a67988e740b4f0b69aae68a27f7a4697c29 (patch) | |
| tree | ba2e9d5be97b72af3d43d590e76c0719d27c3813 | |
| parent | d3f4dbe852fe27c5cab55ef90ae8bbbb834d98e7 (diff) | |
| download | emacs-06341a67988e740b4f0b69aae68a27f7a4697c29.tar.gz emacs-06341a67988e740b4f0b69aae68a27f7a4697c29.zip | |
(The spreadsheet): Renamed from "Table calculations".
Completely reorganized and rewritten.
(CamelCase links): Section removed.
(Repeating items): New section.
(Tracking TODO state changes): New section.
(Agenda views): Chapter reorganized and rewritten.
(HTML export): Section rewritten.
(Tables in arbitrary syntax): New section.
(Summary): Better feature summary.
(Activation): Document problem with cut-and-paste of Lisp code
from PDF files.
(Visibility cycling): Document indirect buffer use.
(Structure editing): Document sorting.
(Remember): Section rewritten.
(Time stamps): Better description of time stamp types.
(Tag searches): DOcument regular expression search for tags.
(Stuck projects): New section.
(In-buffer settings): New keywods.
(History and Acknowledgments): Updated description.
| -rw-r--r-- | man/org.texi | 1919 |
1 files changed, 1411 insertions, 508 deletions
diff --git a/man/org.texi b/man/org.texi index f47e559a372..4b484f25409 100644 --- a/man/org.texi +++ b/man/org.texi | |||
| @@ -3,12 +3,12 @@ | |||
| 3 | @setfilename ../info/org | 3 | @setfilename ../info/org |
| 4 | @settitle Org Mode Manual | 4 | @settitle Org Mode Manual |
| 5 | 5 | ||
| 6 | @set VERSION 4.56 | 6 | @set VERSION 4.67 |
| 7 | @set DATE November 2006 | 7 | @set DATE February 2007 |
| 8 | 8 | ||
| 9 | @dircategory Emacs | 9 | @dircategory Emacs |
| 10 | @direntry | 10 | @direntry |
| 11 | * Org Mode: (org). outline-based notes management and organizer | 11 | * Org Mode: (org). Outline-based notes management and organizer |
| 12 | @end direntry | 12 | @end direntry |
| 13 | 13 | ||
| 14 | @c Version and Contact Info | 14 | @c Version and Contact Info |
| @@ -35,7 +35,7 @@ | |||
| 35 | @copying | 35 | @copying |
| 36 | This manual is for Org-mode (version @value{VERSION}). | 36 | This manual is for Org-mode (version @value{VERSION}). |
| 37 | 37 | ||
| 38 | Copyright @copyright{} 2004, 2005, 2006, 2007 Free Software Foundation, Inc. | 38 | Copyright @copyright{} 2004, 2005, 2006, 2007 Free Software Foundation |
| 39 | 39 | ||
| 40 | @quotation | 40 | @quotation |
| 41 | Permission is granted to copy, distribute and/or modify this document | 41 | Permission is granted to copy, distribute and/or modify this document |
| @@ -122,19 +122,19 @@ Tables | |||
| 122 | 122 | ||
| 123 | * Built-in table editor:: Simple tables | 123 | * Built-in table editor:: Simple tables |
| 124 | * Narrow columns:: Stop wasting space in tables | 124 | * Narrow columns:: Stop wasting space in tables |
| 125 | * Table calculations:: Compute a field from other fields | ||
| 126 | * orgtbl-mode:: The table editor as minor mode | 125 | * orgtbl-mode:: The table editor as minor mode |
| 127 | * table.el:: Complex tables | 126 | * The spreadsheet:: The table editor has spreadsheet capabilities. |
| 128 | 127 | ||
| 129 | Calculations in tables | 128 | The spreadsheet |
| 130 | 129 | ||
| 131 | * Formula syntax:: How to write a formula | 130 | * References:: How to refer to another field or range |
| 132 | * Lisp formulas:: An alternative way to write formulas | 131 | * Formula syntax for Calc:: Using Calc to compute stuff |
| 133 | * Column formulas:: Formulas valid for all fields in a column | 132 | * Formula syntax for Lisp:: Writing formulas in Emacs Lisp |
| 133 | * Field formulas:: Formulas valid for a single field | ||
| 134 | * Column formulas:: Formulas valid for an entire column | ||
| 135 | * Editing and debugging formulas:: Fixing formulas | ||
| 136 | * Updating the table:: Recomputing all dependent fields | ||
| 134 | * Advanced features:: Field names, parameters and automatic recalc | 137 | * Advanced features:: Field names, parameters and automatic recalc |
| 135 | * Named-field formulas:: Formulas valid in single fields | ||
| 136 | * Editing/debugging formulas:: Changing a stored formula | ||
| 137 | * Appetizer:: Taste the power of calc | ||
| 138 | 138 | ||
| 139 | Hyperlinks | 139 | Hyperlinks |
| 140 | 140 | ||
| @@ -150,7 +150,12 @@ Hyperlinks | |||
| 150 | Internal links | 150 | Internal links |
| 151 | 151 | ||
| 152 | * Radio targets:: Make targets trigger links in plain text. | 152 | * Radio targets:: Make targets trigger links in plain text. |
| 153 | * CamelCase links:: Activating CamelCase words as links | 153 | |
| 154 | Remember | ||
| 155 | |||
| 156 | * Setting up remember:: Some code for .emacs to get things going | ||
| 157 | * Remember templates:: Define the outline of different note types | ||
| 158 | * Storing notes:: Directly get the note to where it belongs | ||
| 154 | 159 | ||
| 155 | TODO items | 160 | TODO items |
| 156 | 161 | ||
| @@ -171,6 +176,7 @@ Timestamps | |||
| 171 | * Time stamps:: Assigning a time to a tree entry | 176 | * Time stamps:: Assigning a time to a tree entry |
| 172 | * Creating timestamps:: Commands which insert timestamps | 177 | * Creating timestamps:: Commands which insert timestamps |
| 173 | * Custom time format:: If you cannot work with the ISO format | 178 | * Custom time format:: If you cannot work with the ISO format |
| 179 | * Repeating items:: Deadlines that come back again and again | ||
| 174 | * Progress logging:: Documenting when what work was done. | 180 | * Progress logging:: Documenting when what work was done. |
| 175 | 181 | ||
| 176 | Creating timestamps | 182 | Creating timestamps |
| @@ -180,6 +186,7 @@ Creating timestamps | |||
| 180 | Progress Logging | 186 | Progress Logging |
| 181 | 187 | ||
| 182 | * Closing items:: When was this entry marked DONE? | 188 | * Closing items:: When was this entry marked DONE? |
| 189 | * Tracking TODO state changes:: When did the status change? | ||
| 183 | * Clocking work time:: When exactly did you work on this item? | 190 | * Clocking work time:: When exactly did you work on this item? |
| 184 | 191 | ||
| 185 | Tags | 192 | Tags |
| @@ -192,17 +199,18 @@ Agenda Views | |||
| 192 | 199 | ||
| 193 | * Agenda files:: Files being searched for agenda information | 200 | * Agenda files:: Files being searched for agenda information |
| 194 | * Agenda dispatcher:: Keyboard access to agenda views | 201 | * Agenda dispatcher:: Keyboard access to agenda views |
| 195 | * Weekly/Daily agenda:: The calendar page with current tasks | 202 | * Built-in agenda views:: What is available out of the box? |
| 196 | * Global TODO list:: All unfinished action items | ||
| 197 | * Matching headline tags:: Structured information with fine-tuned search | ||
| 198 | * Timeline:: Time-sorted view for single file | ||
| 199 | * Presentation and sorting:: How agenda items are prepared for display | 203 | * Presentation and sorting:: How agenda items are prepared for display |
| 200 | * Agenda commands:: Remote editing of org trees | 204 | * Agenda commands:: Remote editing of org trees |
| 201 | * Custom agenda views:: Defining special searches and views | 205 | * Custom agenda views:: Defining special searches and views |
| 202 | 206 | ||
| 203 | The weekly/daily agenda | 207 | The built-in agenda views |
| 204 | 208 | ||
| 205 | * Calendar/Diary integration:: Integrating Anniversaries and more | 209 | * Weekly/Daily agenda:: The calendar page with current tasks |
| 210 | * Global TODO list:: All unfinished action items | ||
| 211 | * Matching headline tags:: Structured information with fine-tuned search | ||
| 212 | * Timeline:: Time-sorted view for single file | ||
| 213 | * Stuck projects:: Find projects you need to review | ||
| 206 | 214 | ||
| 207 | Presentation and sorting | 215 | Presentation and sorting |
| 208 | 216 | ||
| @@ -233,6 +241,14 @@ Exporting | |||
| 233 | * iCalendar export:: Exporting in iCalendar format | 241 | * iCalendar export:: Exporting in iCalendar format |
| 234 | * Text interpretation:: How the exporter looks at the file | 242 | * Text interpretation:: How the exporter looks at the file |
| 235 | 243 | ||
| 244 | HTML export | ||
| 245 | |||
| 246 | * Export commands:: How to invode HTML export | ||
| 247 | * Quoting HTML tags:: Using direct HTML in Org-mode | ||
| 248 | * Links:: How hyperlinks get transferred to HTML | ||
| 249 | * Images:: To inline or not to inline? | ||
| 250 | * CSS support:: Style specifications | ||
| 251 | |||
| 236 | Text interpretation by the exporter | 252 | Text interpretation by the exporter |
| 237 | 253 | ||
| 238 | * Comment lines:: Some lines will not be exported | 254 | * Comment lines:: Some lines will not be exported |
| @@ -279,7 +295,15 @@ Interaction with other packages | |||
| 279 | Extensions, Hooks and Hacking | 295 | Extensions, Hooks and Hacking |
| 280 | 296 | ||
| 281 | * Extensions:: Existing 3rd-part extensions | 297 | * Extensions:: Existing 3rd-part extensions |
| 298 | * Tables in arbitrary syntax:: Orgtbl for LaTeX and other programs | ||
| 282 | * Dynamic blocks:: Automatically filled blocks | 299 | * Dynamic blocks:: Automatically filled blocks |
| 300 | * Special agenda views:: Customized views | ||
| 301 | |||
| 302 | Tables in arbitrary syntax | ||
| 303 | |||
| 304 | * Radio tables:: Sending and receiving | ||
| 305 | * A LaTeX example:: Step by step, almost a tutorial | ||
| 306 | * Translator functions:: Copy and modify | ||
| 283 | 307 | ||
| 284 | @end detailmenu | 308 | @end detailmenu |
| 285 | @end menu | 309 | @end menu |
| @@ -318,7 +342,7 @@ iCalendar file. It can also serve as a publishing tool for a set of | |||
| 318 | linked webpages. | 342 | linked webpages. |
| 319 | 343 | ||
| 320 | An important design aspect that distinguishes Org-mode from for example | 344 | An important design aspect that distinguishes Org-mode from for example |
| 321 | Planner/Muse is that it encougages to store every piece of information | 345 | Planner/Muse is that it encourages to store every piece of information |
| 322 | only once. In Planner, you have project pages, day pages and possibly | 346 | only once. In Planner, you have project pages, day pages and possibly |
| 323 | other files, duplicating some information such as tasks. In Org-mode, | 347 | other files, duplicating some information such as tasks. In Org-mode, |
| 324 | you only have notes files. In your notes you mark entries as tasks, | 348 | you only have notes files. In your notes you mark entries as tasks, |
| @@ -330,21 +354,23 @@ Org-mode keeps simple things simple. When first fired up, it should | |||
| 330 | feel like a straightforward, easy to use outliner. Complexity is not | 354 | feel like a straightforward, easy to use outliner. Complexity is not |
| 331 | imposed, but a large amount of functionality is available when you need | 355 | imposed, but a large amount of functionality is available when you need |
| 332 | it. Org-mode can be used on different levels and in different ways, for | 356 | it. Org-mode can be used on different levels and in different ways, for |
| 333 | example: | 357 | example as: |
| 334 | 358 | ||
| 335 | @example | 359 | @example |
| 336 | @r{@bullet{} as an outline extension with visibility cycling and structure editing} | 360 | @r{@bullet{} outline extension with visibility cycling and structure editing} |
| 337 | @r{@bullet{} as an ASCII system and table editor for taking structured notes} | 361 | @r{@bullet{} ASCII system and table editor for taking structured notes} |
| 338 | @r{@bullet{} as an ASCII table editor with spreadsheet-like capabilities} | 362 | @r{@bullet{} ASCII table editor with spreadsheet-like capabilities} |
| 339 | @r{@bullet{} as a TODO list editor} | 363 | @r{@bullet{} TODO list editor} |
| 340 | @r{@bullet{} as a full agenda and planner with deadlines and work scheduling} | 364 | @r{@bullet{} full agenda and planner with deadlines and work scheduling} |
| 341 | @r{@bullet{} as an environment to implement David Allen's GTD system} | 365 | @r{@bullet{} environment to implement David Allen's GTD system} |
| 342 | @r{@bullet{} as a simple hypertext system, with HTML export} | 366 | @r{@bullet{} simple hypertext system, with HTML export} |
| 343 | @r{@bullet{} as a publishing tool to create a set of interlinked webpages} | 367 | @r{@bullet{} publishing tool to create a set of interlinked webpages} |
| 344 | @end example | 368 | @end example |
| 345 | 369 | ||
| 346 | Org-mode's automatic, context sensitive table editor can be integrated | 370 | Org-mode's automatic, context sensitive table editor with spreadsheet |
| 347 | into any major mode by activating the minor Orgtbl-mode. | 371 | capabilities can be integrated into any major mode by activating the |
| 372 | minor Orgtbl-mode. Using a translation step, it can be used to maintain | ||
| 373 | tables in arbitray file types, for example in LaTeX. | ||
| 348 | 374 | ||
| 349 | @cindex FAQ | 375 | @cindex FAQ |
| 350 | There is a website for Org-mode which provides links to the newest | 376 | There is a website for Org-mode which provides links to the newest |
| @@ -354,14 +380,15 @@ questions (FAQ), links to tutorials etc. This page is located at | |||
| 354 | 380 | ||
| 355 | @page | 381 | @page |
| 356 | 382 | ||
| 383 | |||
| 357 | @node Installation, Activation, Summary, Introduction | 384 | @node Installation, Activation, Summary, Introduction |
| 358 | @section Installation | 385 | @section Installation |
| 359 | @cindex installation | 386 | @cindex installation |
| 360 | @cindex XEmacs | 387 | @cindex XEmacs |
| 361 | 388 | ||
| 362 | @b{Important:} If Org-mode is part of the Emacs distribution or an | 389 | @b{Important:} @i{If Org-mode is part of the Emacs distribution or an |
| 363 | XEmacs package, please skip this section and go directly to | 390 | XEmacs package, please skip this section and go directly to |
| 364 | @ref{Activation}. | 391 | @ref{Activation}.} |
| 365 | 392 | ||
| 366 | If you have downloaded Org-mode from the Web, you must take the | 393 | If you have downloaded Org-mode from the Web, you must take the |
| 367 | following steps to install it: Go into the Org-mode distribution | 394 | following steps to install it: Go into the Org-mode distribution |
| @@ -413,6 +440,13 @@ make install-info | |||
| 413 | @cindex global keybindings | 440 | @cindex global keybindings |
| 414 | @cindex keybindings, global | 441 | @cindex keybindings, global |
| 415 | 442 | ||
| 443 | @iftex | ||
| 444 | @b{Important:} @i{If you use copy-and-paste to copy lisp code from the | ||
| 445 | PDF documentation to your .emacs file, the single quote character comes | ||
| 446 | out incorrectly and the code will not work. You need to fix the single | ||
| 447 | quotes by hand, or copy from Info documentation.} | ||
| 448 | @end iftex | ||
| 449 | |||
| 416 | Add the following lines to your @file{.emacs} file. The last two lines | 450 | Add the following lines to your @file{.emacs} file. The last two lines |
| 417 | define @emph{global} keys for the commands @command{org-store-link} and | 451 | define @emph{global} keys for the commands @command{org-store-link} and |
| 418 | @command{org-agenda} - please choose suitable keys yourself. | 452 | @command{org-agenda} - please choose suitable keys yourself. |
| @@ -609,6 +643,8 @@ argument (@kbd{C-u @key{TAB}}), global cycling is invoked. | |||
| 609 | '--------------------------------------' | 643 | '--------------------------------------' |
| 610 | @end example | 644 | @end example |
| 611 | 645 | ||
| 646 | When @kbd{S-@key{TAB}} is called with a numerical prefix N, the CONTENTS | ||
| 647 | view up to headlines of level N will be shown. | ||
| 612 | Note that inside tables, @kbd{S-@key{TAB}} jumps to the previous field. | 648 | Note that inside tables, @kbd{S-@key{TAB}} jumps to the previous field. |
| 613 | 649 | ||
| 614 | @cindex show all, command | 650 | @cindex show all, command |
| @@ -620,7 +656,18 @@ Show all. | |||
| 620 | Reveal context around point, showing the current entry, the following | 656 | Reveal context around point, showing the current entry, the following |
| 621 | heading and the hierarchy above. Useful for working near a location | 657 | heading and the hierarchy above. Useful for working near a location |
| 622 | exposed by a sparse tree command (@pxref{Sparse trees}) or an agenda | 658 | exposed by a sparse tree command (@pxref{Sparse trees}) or an agenda |
| 623 | command (@pxref{Agenda commands}). | 659 | command (@pxref{Agenda commands}). With prefix arg show, on each |
| 660 | level, all sibling headings. | ||
| 661 | @kindex C-c C-x b | ||
| 662 | @item C-c C-x b | ||
| 663 | Show the current subtree in an indirect buffer@footnote{The indirect | ||
| 664 | buffer (@pxref{Indirect Buffers,Indirect Buffers,Indirect | ||
| 665 | Buffers,emacs,GNU Emacs Manual}) will contain the entire buffer, but | ||
| 666 | will be narrowed to the current tree. Editing the indirect buffer will | ||
| 667 | also change the original buffer, but without affecting visibility in | ||
| 668 | that buffer.}. With numerical prefix ARG, go up to this level and then | ||
| 669 | take that tree. If ARG is negative, go up that many levels. With | ||
| 670 | @kbd{C-u} prefix, do not remove the previously used indirect buffer. | ||
| 624 | @end table | 671 | @end table |
| 625 | 672 | ||
| 626 | When Emacs first visits an Org-mode file, the global state is set to | 673 | When Emacs first visits an Org-mode file, the global state is set to |
| @@ -730,6 +777,15 @@ Yank subtree from kill ring. This does modify the level of the subtree to | |||
| 730 | make sure the tree fits in nicely at the yank position. The yank | 777 | make sure the tree fits in nicely at the yank position. The yank |
| 731 | level can also be specified with a prefix arg, or by yanking after a | 778 | level can also be specified with a prefix arg, or by yanking after a |
| 732 | headline marker like @samp{****}. | 779 | headline marker like @samp{****}. |
| 780 | @kindex C-c ^ | ||
| 781 | @item C-c ^ | ||
| 782 | Sort same-level entries. When there is an active region, all entries in | ||
| 783 | the region will be sorted. Otherwise the children of the current | ||
| 784 | headline are sorted. The command prompts for the sorting method, which | ||
| 785 | can be alphabetically, numerically, by time (using the first time stamp | ||
| 786 | in each entry), and each of these in reverse order. With a @kbd{C-u} | ||
| 787 | prefix, sorting will be case-sensitive. With two @kbd{C-u C-u} | ||
| 788 | prefixes, duplicate entries will also be removed. | ||
| 733 | @end table | 789 | @end table |
| 734 | 790 | ||
| 735 | @cindex region, active | 791 | @cindex region, active |
| @@ -814,12 +870,12 @@ different location, either in the current file, or even in a different | |||
| 814 | file, the archive file. | 870 | file, the archive file. |
| 815 | 871 | ||
| 816 | @table @kbd | 872 | @table @kbd |
| 817 | @kindex C-c $ | 873 | @kindex C-c C-x C-s |
| 818 | @item C-c $ | 874 | @item C-c C-x C-s |
| 819 | Archive the subtree starting at the cursor position to the location | 875 | Archive the subtree starting at the cursor position to the location |
| 820 | given by @code{org-archive-location}. | 876 | given by @code{org-archive-location}. |
| 821 | @kindex C-u C-c $ | 877 | @kindex C-u C-c C-x C-s |
| 822 | @item C-u C-c $ | 878 | @item C-u C-c C-x C-s |
| 823 | Check if any direct children of the current headline could be moved to | 879 | Check if any direct children of the current headline could be moved to |
| 824 | the archive. To do this, each subtree is checked for open TODO entries. | 880 | the archive. To do this, each subtree is checked for open TODO entries. |
| 825 | If none are found, the command offers to move it to the archive | 881 | If none are found, the command offers to move it to the archive |
| @@ -832,7 +888,17 @@ The default archive location is a file in the same directory as the | |||
| 832 | current file, with the name derived by appending @file{_archive} to the | 888 | current file, with the name derived by appending @file{_archive} to the |
| 833 | current file name. For information and examples on how to change this, | 889 | current file name. For information and examples on how to change this, |
| 834 | see the documentation string of the variable | 890 | see the documentation string of the variable |
| 835 | @code{org-archive-location}. | 891 | @code{org-archive-location}. There is also an in-buffer option for |
| 892 | setting this variable, for example | ||
| 893 | |||
| 894 | @example | ||
| 895 | #+ARCHIVE: %s_done:: | ||
| 896 | @end example | ||
| 897 | |||
| 898 | @noindent | ||
| 899 | You may have several such lines in the buffer, they will then be valid | ||
| 900 | for the entries following the line (the first will also apply to any | ||
| 901 | text before it). | ||
| 836 | 902 | ||
| 837 | @node Sparse trees, Plain lists, Archiving, Document structure | 903 | @node Sparse trees, Plain lists, Archiving, Document structure |
| 838 | @section Sparse trees | 904 | @section Sparse trees |
| @@ -846,9 +912,10 @@ An important feature of Org-mode is the ability to construct | |||
| 846 | sparse tree means that the entire document is folded as much as | 912 | sparse tree means that the entire document is folded as much as |
| 847 | possible, but the selected information is made visible along with the | 913 | possible, but the selected information is made visible along with the |
| 848 | headline structure above it@footnote{See also the variables | 914 | headline structure above it@footnote{See also the variables |
| 849 | @code{org-show-hierarchy-above} and | 915 | @code{org-show-hierarchy-above}, @code{org-show-following-heading}, and |
| 850 | @code{org-show-following-heading}.}. Just try it out and you will see | 916 | @code{org-show-siblings} for detailed control on how much context is |
| 851 | immediately how it works. | 917 | shown around each match.}. Just try it out and you will see immediately |
| 918 | how it works. | ||
| 852 | 919 | ||
| 853 | Org-mode contains several commands creating such trees. The most | 920 | Org-mode contains several commands creating such trees. The most |
| 854 | basic one is @command{org-occur}: | 921 | basic one is @command{org-occur}: |
| @@ -862,7 +929,7 @@ match is in the body of an entry, headline and body are made visible. | |||
| 862 | In order to provide minimal context, also the full hierarchy of | 929 | In order to provide minimal context, also the full hierarchy of |
| 863 | headlines above the match is shown, as well as the headline following | 930 | headlines above the match is shown, as well as the headline following |
| 864 | the match. Each match is also highlighted; the highlights disappear | 931 | the match. Each match is also highlighted; the highlights disappear |
| 865 | when the bufer is changes an editing command, or by pressing @kbd{C-c | 932 | when the buffer is changes an editing command, or by pressing @kbd{C-c |
| 866 | C-c}. When called with a @kbd{C-u} prefix argument, previous highlights | 933 | C-c}. When called with a @kbd{C-u} prefix argument, previous highlights |
| 867 | are kept, so several calls to this command can be stacked. | 934 | are kept, so several calls to this command can be stacked. |
| 868 | @end table | 935 | @end table |
| @@ -1010,14 +1077,13 @@ Emacs @file{calc} package. | |||
| 1010 | @menu | 1077 | @menu |
| 1011 | * Built-in table editor:: Simple tables | 1078 | * Built-in table editor:: Simple tables |
| 1012 | * Narrow columns:: Stop wasting space in tables | 1079 | * Narrow columns:: Stop wasting space in tables |
| 1013 | * Table calculations:: Compute a field from other fields | ||
| 1014 | * orgtbl-mode:: The table editor as minor mode | 1080 | * orgtbl-mode:: The table editor as minor mode |
| 1015 | * table.el:: Complex tables | 1081 | * The spreadsheet:: The table editor has spreadsheet capabilities. |
| 1016 | @end menu | 1082 | @end menu |
| 1017 | 1083 | ||
| 1018 | @node Built-in table editor, Narrow columns, Tables, Tables | 1084 | @node Built-in table editor, Narrow columns, Tables, Tables |
| 1019 | @section The built-in table editor | 1085 | @section The built-in table editor |
| 1020 | @cindex table editor, builtin | 1086 | @cindex table editor, built-in |
| 1021 | 1087 | ||
| 1022 | Org-mode makes it easy to format tables in plain ASCII. Any line with | 1088 | Org-mode makes it easy to format tables in plain ASCII. Any line with |
| 1023 | @samp{|} as the first non-white character is considered part of a | 1089 | @samp{|} as the first non-white character is considered part of a |
| @@ -1126,10 +1192,15 @@ is created above the current line. | |||
| 1126 | 1192 | ||
| 1127 | @kindex C-c ^ | 1193 | @kindex C-c ^ |
| 1128 | @item C-c ^ | 1194 | @item C-c ^ |
| 1129 | Sort the table lines in the region. Point and mark must be in the first | 1195 | Sort the table lines in the region. The position of point indicates the |
| 1130 | and last line to be included, and must be in the column that should be | 1196 | column to be used for sorting, and the range of lines is the range |
| 1131 | used for sorting. The command prompts for numerical versus | 1197 | between the nearest horizontal separator lines, or the entire table. If |
| 1132 | alphanumerical sorting. | 1198 | point is before the first column, you will be prompted for the sorting |
| 1199 | column. If there is an active region, the mark specifies the first line | ||
| 1200 | and the sorting column, while point should be in the last line to be | ||
| 1201 | included into the sorting. The command prompts for the sorting type | ||
| 1202 | (alphabetically, numerically, or by time). When called with a prefix | ||
| 1203 | argument, alphabetic sorting will be case-sensitive. | ||
| 1133 | 1204 | ||
| 1134 | @tsubheading{Regions} | 1205 | @tsubheading{Regions} |
| 1135 | @kindex C-c C-x M-w | 1206 | @kindex C-c C-x M-w |
| @@ -1163,40 +1234,6 @@ above. | |||
| 1163 | @tsubheading{Calculations} | 1234 | @tsubheading{Calculations} |
| 1164 | @cindex formula, in tables | 1235 | @cindex formula, in tables |
| 1165 | @cindex calculations, in tables | 1236 | @cindex calculations, in tables |
| 1166 | @kindex C-c = | ||
| 1167 | @item C-c = | ||
| 1168 | Install a new formula for the current column and replace current field | ||
| 1169 | with the result of the formula. | ||
| 1170 | |||
| 1171 | @kindex C-u C-c = | ||
| 1172 | @item C-u C-c = | ||
| 1173 | Install a new formula for the current field, which must be a named | ||
| 1174 | field. Evaluate the formula and replace the field content with the | ||
| 1175 | result. | ||
| 1176 | |||
| 1177 | @kindex C-c ' | ||
| 1178 | @item C-c ' | ||
| 1179 | Edit all formulas associated with the current table in a separate | ||
| 1180 | buffer. | ||
| 1181 | |||
| 1182 | @kindex C-c * | ||
| 1183 | @item C-c * | ||
| 1184 | Recalculate the current row by applying the stored formulas from left | ||
| 1185 | to right. When called with a @kbd{C-u} prefix, recalculate the | ||
| 1186 | entire table, starting with the first non-header line (i.e. below the | ||
| 1187 | first horizontal separator line). For details, see @ref{Table calculations}. | ||
| 1188 | |||
| 1189 | @kindex C-# | ||
| 1190 | @item C-# | ||
| 1191 | Rotate the calculation mark in first column through the states | ||
| 1192 | @samp{}, @samp{#}, @samp{*}, @samp{!}, @samp{$}. For the meaning of | ||
| 1193 | these marks see @ref{Advanced features}. When there is an active | ||
| 1194 | region, change all marks in the region. | ||
| 1195 | |||
| 1196 | @kindex C-c ? | ||
| 1197 | @item C-c ? | ||
| 1198 | Which table column is the cursor in? Displays number >0 in echo | ||
| 1199 | area. | ||
| 1200 | 1237 | ||
| 1201 | @cindex region, active | 1238 | @cindex region, active |
| 1202 | @cindex active region | 1239 | @cindex active region |
| @@ -1254,7 +1291,7 @@ it off with | |||
| 1254 | @noindent Then the only table command that still works is | 1291 | @noindent Then the only table command that still works is |
| 1255 | @kbd{C-c C-c} to do a manual re-align. | 1292 | @kbd{C-c C-c} to do a manual re-align. |
| 1256 | 1293 | ||
| 1257 | @node Narrow columns, Table calculations, Built-in table editor, Tables | 1294 | @node Narrow columns, orgtbl-mode, Built-in table editor, Tables |
| 1258 | @section Narrow columns | 1295 | @section Narrow columns |
| 1259 | @cindex narrow columns in tables | 1296 | @cindex narrow columns in tables |
| 1260 | 1297 | ||
| @@ -1268,6 +1305,7 @@ re-align will then set the width of this column to no more than this | |||
| 1268 | value. | 1305 | value. |
| 1269 | 1306 | ||
| 1270 | @example | 1307 | @example |
| 1308 | @group | ||
| 1271 | |---+------------------------------| |---+--------| | 1309 | |---+------------------------------| |---+--------| |
| 1272 | | | | | | <6> | | 1310 | | | | | | <6> | |
| 1273 | | 1 | one | | 1 | one | | 1311 | | 1 | one | | 1 | one | |
| @@ -1275,6 +1313,7 @@ value. | |||
| 1275 | | 3 | This is a long chunk of text | ----/ | 3 | This=> | | 1313 | | 3 | This is a long chunk of text | ----/ | 3 | This=> | |
| 1276 | | 4 | four | | 4 | four | | 1314 | | 4 | four | | 4 | four | |
| 1277 | |---+------------------------------| |---+--------| | 1315 | |---+------------------------------| |---+--------| |
| 1316 | @end group | ||
| 1278 | @end example | 1317 | @end example |
| 1279 | 1318 | ||
| 1280 | @noindent | 1319 | @noindent |
| @@ -1298,64 +1337,132 @@ on a per-file basis with: | |||
| 1298 | #+STARTUP: noalign | 1337 | #+STARTUP: noalign |
| 1299 | @end example | 1338 | @end example |
| 1300 | 1339 | ||
| 1301 | @node Table calculations, orgtbl-mode, Narrow columns, Tables | 1340 | @node orgtbl-mode, The spreadsheet, Narrow columns, Tables |
| 1302 | @section Calculations in tables | 1341 | @section The Orgtbl minor mode |
| 1342 | @cindex orgtbl-mode | ||
| 1343 | @cindex minor mode for tables | ||
| 1344 | |||
| 1345 | If you like the intuitive way the Org-mode table editor works, you | ||
| 1346 | might also want to use it in other modes like text-mode or mail-mode. | ||
| 1347 | The minor mode Orgtbl-mode makes this possible. You can always toggle | ||
| 1348 | the mode with @kbd{M-x orgtbl-mode}. To turn it on by default, for | ||
| 1349 | example in mail mode, use | ||
| 1350 | |||
| 1351 | @lisp | ||
| 1352 | (add-hook 'mail-mode-hook 'turn-on-orgtbl) | ||
| 1353 | @end lisp | ||
| 1354 | |||
| 1355 | Furthermore, with some special setup, it is possible to maintain tables | ||
| 1356 | in arbitrary syntax with Orgtbl-mode. For example, it is possible to | ||
| 1357 | construct LaTeX tables with the underlying ease and power of | ||
| 1358 | Orgtbl-mode, including spreadsheet capabulities. For details, see | ||
| 1359 | @ref{Tables in arbitrary syntax}. | ||
| 1360 | |||
| 1361 | @node The spreadsheet, , orgtbl-mode, Tables | ||
| 1362 | @section The spreadsheet | ||
| 1303 | @cindex calculations, in tables | 1363 | @cindex calculations, in tables |
| 1304 | @cindex spreadsheet capabilities | 1364 | @cindex spreadsheet capabilities |
| 1305 | @cindex @file{calc} package | 1365 | @cindex @file{calc} package |
| 1306 | 1366 | ||
| 1307 | The table editor makes use of the Emacs @file{calc} package to implement | 1367 | The table editor makes use of the Emacs @file{calc} package to implement |
| 1308 | spreadsheet-like capabilities. It can also evaluate Emacs Lisp forms to | 1368 | spreadsheet-like capabilities. It can also evaluate Emacs Lisp forms to |
| 1309 | derive fields from other fields. Org-mode has two levels of complexity | 1369 | derive fields from other fields. |
| 1310 | for table calculations. On the basic level, tables do only horizontal | ||
| 1311 | computations, so a field can be computed from other fields @emph{in the | ||
| 1312 | same row}, and Org-mode assumes that there is only one formula for each | ||
| 1313 | column. This is very efficient to work with and enough for many tasks. | ||
| 1314 | On the complex level, columns and individual fields can be named for | ||
| 1315 | easier referencing in formulas, individual named fields can have their | ||
| 1316 | own formula associated with them, and recalculation can be automated. | ||
| 1317 | |||
| 1318 | @menu | 1370 | @menu |
| 1319 | * Formula syntax:: How to write a formula | 1371 | * References:: How to refer to another field or range |
| 1320 | * Lisp formulas:: An alternative way to write formulas | 1372 | * Formula syntax for Calc:: Using Calc to compute stuff |
| 1321 | * Column formulas:: Formulas valid for all fields in a column | 1373 | * Formula syntax for Lisp:: Writing formulas in Emacs Lisp |
| 1374 | * Field formulas:: Formulas valid for a single field | ||
| 1375 | * Column formulas:: Formulas valid for an entire column | ||
| 1376 | * Editing and debugging formulas:: Fixing formulas | ||
| 1377 | * Updating the table:: Recomputing all dependent fields | ||
| 1322 | * Advanced features:: Field names, parameters and automatic recalc | 1378 | * Advanced features:: Field names, parameters and automatic recalc |
| 1323 | * Named-field formulas:: Formulas valid in single fields | ||
| 1324 | * Editing/debugging formulas:: Changing a stored formula | ||
| 1325 | * Appetizer:: Taste the power of calc | ||
| 1326 | @end menu | 1379 | @end menu |
| 1327 | 1380 | ||
| 1328 | @node Formula syntax, Lisp formulas, Table calculations, Table calculations | 1381 | @node References, Formula syntax for Calc, The spreadsheet, The spreadsheet |
| 1329 | @subsection Formula syntax | 1382 | @subsection References |
| 1330 | @cindex formula syntax | 1383 | @cindex references |
| 1331 | @cindex syntax, of formulas | ||
| 1332 | 1384 | ||
| 1333 | A formula can be any algebraic expression understood by the Emacs | 1385 | To compute fields in the table from other fields, formulas must |
| 1334 | @file{calc} package. Note that @file{calc} has the slightly | 1386 | reference other fields or ranges. In Org-mode, fields can be referenced |
| 1335 | non-standard convention that @samp{/} has lower precedence than | 1387 | by name, by absolute coordinates, and by relative coordinates. To find |
| 1336 | @samp{*}, so that @samp{a/b*c} is interpreted as @samp{a/(b*c)}. Before | 1388 | out what the coordinates of a field are, press @kbd{C-c ?} in that |
| 1337 | evaluation by @code{calc-eval} (@pxref{Calling Calc from Your | 1389 | field. |
| 1338 | Programs,calc-eval,Calling calc from Your Lisp Programs,calc,GNU Emacs | ||
| 1339 | Calc Manual}), variable substitution takes place: | ||
| 1340 | 1390 | ||
| 1391 | @subsubheading Field references | ||
| 1392 | @cindex field references | ||
| 1393 | @cindex references, to fields | ||
| 1394 | |||
| 1395 | Formulas can reference the value of another field with the operator | ||
| 1341 | @example | 1396 | @example |
| 1342 | $ @r{refers to the current field} | 1397 | @@row$column |
| 1343 | $3 @r{refers to the field in column 3 of the current row} | ||
| 1344 | $3..$7 @r{a vector of the fields in columns 3-7 of current row} | ||
| 1345 | $P1..$P3 @r{vector of column range, using column names} | ||
| 1346 | &2 @r{second data field above the current, in same column} | ||
| 1347 | &5-2 @r{vector from fifth to second field above current} | ||
| 1348 | &III-II @r{vector of fields between 2nd and 3rd hline above} | ||
| 1349 | &III @r{vector of fields between third hline above and current field} | ||
| 1350 | $name @r{a named field, parameter or constant} | ||
| 1351 | @end example | 1398 | @end example |
| 1352 | 1399 | ||
| 1353 | @cindex vectors, in table calculations | 1400 | Column references can be absolute like @samp{1}, @samp{2},...@samp{N}, |
| 1354 | The range vectors can be directly fed into the calc vector functions | 1401 | or relative to the current column like @samp{+1} or @samp{-2}. |
| 1355 | like @samp{vmean} and @samp{vsum}. | 1402 | |
| 1403 | The row specification only counts data lines and ignores horizontal | ||
| 1404 | separator lines (hlines). You can use absolute row numbers | ||
| 1405 | @samp{1}...@samp{N}, and row numbers relative to the current row like | ||
| 1406 | @samp{+3} or @samp{-1}. Or specify the row relative to one of the | ||
| 1407 | hlines: @samp{I} refers to the first hline, @samp{II} to the second etc. | ||
| 1408 | @samp{-I} refers to the first such line above the current line, | ||
| 1409 | @samp{+I} to the first such line below the current line. You can also | ||
| 1410 | write @samp{III+2} which is the second data line after the third hline | ||
| 1411 | in the table. Relative row numbers like @samp{-3} will not cross hlines | ||
| 1412 | if the current line is too close to the hline. Instead, the value | ||
| 1413 | directly at the hline is used. | ||
| 1414 | |||
| 1415 | @samp{0} refers to the current row and column. Also, if you omit | ||
| 1416 | either the column or the row part of the reference, the current | ||
| 1417 | row/column is implied. | ||
| 1418 | |||
| 1419 | Org-mode's references with @emph{positive} numbers correspond to fixed | ||
| 1420 | references in other spreadsheet programs. For example, @code{@@3$28} | ||
| 1421 | corresponds to @code{$AB$3}. Org-mode's references with @emph{negative} | ||
| 1422 | numbers behave similar to non-fixed references in other spreadsheet | ||
| 1423 | programs, because when the same formula is used in several fields, | ||
| 1424 | different fields are referenced each time. | ||
| 1425 | |||
| 1426 | Here are a few examples: | ||
| 1427 | |||
| 1428 | @example | ||
| 1429 | @@2$3 @r{2nd row, 3rd column} | ||
| 1430 | $5 @r{column 5 in the current row} | ||
| 1431 | @@2 @r{current column, row 2} | ||
| 1432 | @@-1$-3 @r{the field one row up, three columns to the left} | ||
| 1433 | @@-I$2 @r{field just under hline above current row, column 2} | ||
| 1434 | @end example | ||
| 1435 | |||
| 1436 | @subsubheading Range references | ||
| 1437 | @cindex range references | ||
| 1438 | @cindex references, to ranges | ||
| 1439 | |||
| 1440 | You may reference a rectangular range of fields by specifying two field | ||
| 1441 | references connected by two dots @samp{..}. If both fields are in the | ||
| 1442 | current row, you may simply use @samp{$2..$7}, but if at least one field | ||
| 1443 | is in a different row, you need to use the general @code{@@row$column} | ||
| 1444 | format at least for the first field (i.e the reference must start with | ||
| 1445 | @samp{@@} in order to be interpreted correctly). Examples: | ||
| 1446 | |||
| 1447 | @example | ||
| 1448 | $1..$3 @r{First three fields in the current row.} | ||
| 1449 | $P..$Q @r{Range, using column names (see under Advanced)} | ||
| 1450 | @@2$1..@@4$3 @r{6 fields between these two fields.} | ||
| 1451 | @@-1$-2..@@-1 @r{3 numbers from the column to the left, 2 up to current row} | ||
| 1452 | @end example | ||
| 1356 | 1453 | ||
| 1454 | @noindent Range references return a vector of values that can be fed | ||
| 1455 | into Calc vector functions. Empty fields in ranges are normally | ||
| 1456 | suppressed, so that the vector contains only the non-empty fields (but | ||
| 1457 | see the @samp{E} mode switch below). If there are no non-empty fields, | ||
| 1458 | @samp{[0]} is returned to avoid syntax errors in formulas. | ||
| 1459 | |||
| 1460 | @subsubheading Named references | ||
| 1461 | @cindex named references | ||
| 1462 | @cindex references, named | ||
| 1357 | @cindex name, of column or field | 1463 | @cindex name, of column or field |
| 1358 | @cindex constants, in calculations | 1464 | @cindex constants, in calculations |
| 1465 | |||
| 1359 | @samp{$name} is interpreted as the name of a column, parameter or | 1466 | @samp{$name} is interpreted as the name of a column, parameter or |
| 1360 | constant. Constants are defined globally through the variable | 1467 | constant. Constants are defined globally through the variable |
| 1361 | @code{org-table-formula-constants}. If you have the | 1468 | @code{org-table-formula-constants}. If you have the |
| @@ -1365,21 +1472,46 @@ constant, and units like @samp{$km} for kilometers. Column names and | |||
| 1365 | parameters can be specified in special table lines. These are | 1472 | parameters can be specified in special table lines. These are |
| 1366 | described below, see @ref{Advanced features}. | 1473 | described below, see @ref{Advanced features}. |
| 1367 | 1474 | ||
| 1475 | @node Formula syntax for Calc, Formula syntax for Lisp, References, The spreadsheet | ||
| 1476 | @subsection Formula syntax for Calc | ||
| 1477 | @cindex formula syntax, Calc | ||
| 1478 | @cindex syntax, of formulas | ||
| 1479 | |||
| 1480 | A formula can be any algebraic expression understood by the Emacs | ||
| 1481 | @file{Calc} package. Note that @file{calc} has the slightly | ||
| 1482 | non-standard convention that @samp{/} has lower precedence than | ||
| 1483 | @samp{*}, so that @samp{a/b*c} is interpreted as @samp{a/(b*c)}. Before | ||
| 1484 | evaluation by @code{calc-eval} (@pxref{Calling Calc from | ||
| 1485 | Your Programs,calc-eval,Calling calc from Your Lisp Programs,calc,GNU | ||
| 1486 | Emacs Calc Manual}), | ||
| 1487 | variable substitution takes place according to the rules described above. | ||
| 1488 | @cindex vectors, in table calculations | ||
| 1489 | The range vectors can be directly fed into the calc vector functions | ||
| 1490 | like @samp{vmean} and @samp{vsum}. | ||
| 1491 | |||
| 1368 | @cindex format specifier | 1492 | @cindex format specifier |
| 1369 | @cindex mode, for @file{calc} | 1493 | @cindex mode, for @file{calc} |
| 1370 | A formula can contain an optional mode string after a semicolon. This | 1494 | A formula can contain an optional mode string after a semicolon. This |
| 1371 | string consists of flags to influence calc's modes@footnote{By | 1495 | string consists of flags to influence Calc and other modes during |
| 1372 | default, Org-mode uses the standard calc modes (precision 12, angular | 1496 | execution. By default, Org-mode uses the standard calc modes (precision |
| 1373 | units degrees, fraction and symbolic modes off). The display format, | 1497 | 12, angular units degrees, fraction and symbolic modes off. The display |
| 1374 | however, has been changed to @code{(float 5)} to keep tables compact. | 1498 | format, however, has been changed to @code{(float 5)} to keep tables |
| 1375 | The default settings can be configured using the variable | 1499 | compact. The default settings can be configured using the variable |
| 1376 | @code{org-calc-default-modes}.} during execution, e.g. @samp{p20} to | 1500 | @code{org-calc-default-modes}. |
| 1377 | switch the internal precision to 20 digits, @samp{n3}, @samp{s3}, | 1501 | |
| 1378 | @samp{e2} or @samp{f4} to switch to normal, scientific, engineering, | 1502 | @example |
| 1379 | or fixed display format, respectively, and @samp{D}, @samp{R}, @samp{F}, | 1503 | p20 @r{switch the internal precision to 20 digits} |
| 1380 | and @samp{S} to turn on degrees, radians, fraction and symbolic modes, | 1504 | n3 s3 e2 f4 @r{normal, scientific, engineering, or fixed display format} |
| 1381 | respectively. In addition, you may provide a @code{printf} format | 1505 | D R @r{angle modes: degrees, radians} |
| 1382 | specifier to reformat the final result. A few examples: | 1506 | F S @r{fraction and symbolic modes} |
| 1507 | N @r{interpret all fields as numbers, use 0 for non-numbers} | ||
| 1508 | T @r{force text interpretation} | ||
| 1509 | E @r{keep empty fields in ranges} | ||
| 1510 | @end example | ||
| 1511 | |||
| 1512 | @noindent | ||
| 1513 | In addition, you may provide a @code{printf} format specifier to | ||
| 1514 | reformat the final result. A few examples: | ||
| 1383 | 1515 | ||
| 1384 | @example | 1516 | @example |
| 1385 | $1+$2 @r{Sum of first and second field} | 1517 | $1+$2 @r{Sum of first and second field} |
| @@ -1391,74 +1523,243 @@ $c/$1/$cm @r{Hz -> cm conversion, using @file{constants.el}} | |||
| 1391 | tan($1);Dp3s1 @r{Compute in degrees, precision 3, display SCI 1} | 1523 | tan($1);Dp3s1 @r{Compute in degrees, precision 3, display SCI 1} |
| 1392 | sin($1);Dp3%.1e @r{Same, but use printf specifier for display} | 1524 | sin($1);Dp3%.1e @r{Same, but use printf specifier for display} |
| 1393 | vmean($2..$7) @r{Compute column range mean, using vector function} | 1525 | vmean($2..$7) @r{Compute column range mean, using vector function} |
| 1394 | vsum(&III) @r{Sum numbers from 3rd hline above, up to here} | 1526 | vmean($2..$7);EN @r{Same, but treat empty fields as 0} |
| 1395 | taylor($3,x=7,2) @r{taylor series of $3, at x=7, second degree} | 1527 | taylor($3,x=7,2) @r{taylor series of $3, at x=7, second degree} |
| 1396 | @end example | 1528 | @end example |
| 1397 | 1529 | ||
| 1398 | @node Lisp formulas, Column formulas, Formula syntax, Table calculations | 1530 | @node Formula syntax for Lisp, Field formulas, Formula syntax for Calc, The spreadsheet |
| 1399 | @subsection Emacs Lisp forms as formulas | 1531 | @subsection Emacs Lisp forms as formulas |
| 1400 | @cindex Lisp forms, as table formulas | 1532 | @cindex Lisp forms, as table formulas |
| 1401 | 1533 | ||
| 1402 | It is also possible to write a formula in Emacs lisp; this can be useful | 1534 | It is also possible to write a formula in Emacs Lisp; this can be useful |
| 1403 | for string manipulation and control structures. If a formula starts | 1535 | for string manipulation and control structures. If a formula starts |
| 1404 | with a single quote followed by an opening parenthesis, then it is | 1536 | with a single quote followed by an opening parenthesis, then it is |
| 1405 | evaluated as a lisp form. The evaluation should return either a string | 1537 | evaluated as a lisp form. The evaluation should return either a string |
| 1406 | or a number. Just as with @file{calc} formulas, you can provide a | 1538 | or a number. Just as with @file{calc} formulas, you can specify modes |
| 1407 | format specifier after a semicolon. A few examples: | 1539 | and a printf format after a semicolon. A reference will be replaced |
| 1540 | with a string (in double quotes) containing the field. If you provide | ||
| 1541 | the @samp{N} mode switch, all referenced elements will be numbers. | ||
| 1542 | Ranges are inserted as space-separated fields, so you can embed them in | ||
| 1543 | list or vector syntax. A few examples, note how the @samp{N} mode is | ||
| 1544 | used when we do computations in lisp. | ||
| 1408 | 1545 | ||
| 1409 | @example | 1546 | @example |
| 1410 | @r{swap the first two characters of the content of column 1} | 1547 | @r{Swap the first two characters of the content of column 1} |
| 1411 | '(concat (substring "$1" 1 2) (substring "$1" 0 1) (substring "$1" 2)) | 1548 | '(concat (substring $1 1 2) (substring $1 0 1) (substring $1 2)) |
| 1412 | @r{Add columns 1 and 2, equivalent to the calc's @code{$1+$2}} | 1549 | @r{Add columns 1 and 2, equivalent to the Calc's @code{$1+$2}} |
| 1413 | '(+ $1 $2) | 1550 | '(+ $1 $2);N |
| 1551 | @r{Compute the sum of columns 1-4, like Calc's @code{vsum($1..$4)}} | ||
| 1552 | '(apply '+ '($1..$4));N | ||
| 1414 | @end example | 1553 | @end example |
| 1415 | 1554 | ||
| 1416 | @node Column formulas, Advanced features, Lisp formulas, Table calculations | 1555 | @node Field formulas, Column formulas, Formula syntax for Lisp, The spreadsheet |
| 1556 | @subsection Field formulas | ||
| 1557 | @cindex field formula | ||
| 1558 | @cindex formula, for individual table field | ||
| 1559 | |||
| 1560 | To assign a formula to a particular field, type it directly into the | ||
| 1561 | field, preceded by @samp{:=}, for example @samp{:=$1+$2}. When you | ||
| 1562 | press @key{TAB} or @key{RET} or @kbd{C-c C-c} with the cursor still in | ||
| 1563 | the field, the formula will be stored as the formula for this field, | ||
| 1564 | evaluated, and the current field replaced with the result. | ||
| 1565 | |||
| 1566 | Formulas are stored in a special line starting with @samp{#+TBLFM:} | ||
| 1567 | directly below the table. If you typed the equation in the 4th field of | ||
| 1568 | the 3rd data line in the table, the formula will look like | ||
| 1569 | @samp{@@3$2=$1+$2}. When inserting/deleting/swapping column and rows | ||
| 1570 | with the appropriate commands, @i{absolute references} (but not relative | ||
| 1571 | ones) in stored formulas are modified in order to | ||
| 1572 | still reference the same field. Of cause this is not true if you edit | ||
| 1573 | the table structure with normal editing commands - then you must go and | ||
| 1574 | fix equations yourself. | ||
| 1575 | |||
| 1576 | Instead of typing an equation into the field, you may also use the | ||
| 1577 | following command | ||
| 1578 | |||
| 1579 | @table @kbd | ||
| 1580 | @kindex C-u C-c = | ||
| 1581 | @item C-u C-c = | ||
| 1582 | Install a new formula for the current field. The command prompts for a | ||
| 1583 | formula, with default taken from the @samp{#+TBLFM:} line, applies | ||
| 1584 | it to the current field and stores it. | ||
| 1585 | @end table | ||
| 1586 | |||
| 1587 | @node Column formulas, Editing and debugging formulas, Field formulas, The spreadsheet | ||
| 1417 | @subsection Column formulas | 1588 | @subsection Column formulas |
| 1418 | @cindex column formula | 1589 | @cindex column formula |
| 1419 | @cindex formula, for table column | 1590 | @cindex formula, for table column |
| 1420 | 1591 | ||
| 1421 | To apply a formula to a field, type it directly into the field, | 1592 | Often in a table, the same formula should be used for all fields in a |
| 1422 | preceded by an equal sign, like @samp{=$1+$2}. When you press | 1593 | particular column. Instead of having to copy the formula to all fields |
| 1594 | in that column, org-mode allows to assign a single formula to an entire | ||
| 1595 | column. | ||
| 1596 | |||
| 1597 | To assign a formula to a column, type it directly into any field in the | ||
| 1598 | column, preceded by an equal sign, like @samp{=$1+$2}. When you press | ||
| 1423 | @key{TAB} or @key{RET} or @kbd{C-c C-c} with the cursor still in the | 1599 | @key{TAB} or @key{RET} or @kbd{C-c C-c} with the cursor still in the |
| 1424 | field, the formula will be stored as the formula for the current | 1600 | field, the formula will be stored as the formula for the current column, |
| 1425 | column, evaluated and the current field replaced with the result. If | 1601 | evaluated and the current field replaced with the result. If the field |
| 1426 | the field contains only @samp{=}, the previously stored formula for | 1602 | contains only @samp{=}, the previously stored formula for this column is |
| 1427 | this column is used. | 1603 | used. For each column, Org-mode will only remember the most recently |
| 1428 | 1604 | used formula. In the @samp{TBLFM:} line, column formulas will look like | |
| 1429 | For each column, Org-mode will remember the most recently used | 1605 | @samp{$4=$1+$2}. |
| 1430 | formula. The information is stored in a special line starting with | ||
| 1431 | @samp{#+TBLFM} directly below the table. When adding/deleting/moving | ||
| 1432 | columns with the appropriate commands, the stored equations will be | ||
| 1433 | modified accordingly. When a column used in a calculation is removed, | ||
| 1434 | references to this column become invalid and will cause an error upon | ||
| 1435 | applying the equation. | ||
| 1436 | 1606 | ||
| 1437 | Instead of typing an equation into the field, you may also use the | 1607 | Instead of typing an equation into the field, you may also use the |
| 1438 | command @kbd{C-c =}. It prompts for a formula (with default taken | 1608 | following command: |
| 1439 | from the @samp{#+TBLFM:} line) and applies it to the current field. A | 1609 | |
| 1440 | numerical prefix (e.g. @kbd{C-5 C-c =}) will apply it to that many | 1610 | @table @kbd |
| 1441 | consecutive fields in the current column. | 1611 | @kindex C-c = |
| 1612 | @item C-c = | ||
| 1613 | Install a new formula for the current column and replace current field | ||
| 1614 | with the result of the formula. The command prompts for a formula, with | ||
| 1615 | default taken from the @samp{#+TBLFM} line, applies it to the current | ||
| 1616 | field and stores it. With a numerical prefix (e.g. @kbd{C-5 C-c =}) | ||
| 1617 | will apply it to that many consecutive fields in the current column. | ||
| 1618 | @end table | ||
| 1619 | |||
| 1620 | |||
| 1621 | @node Editing and debugging formulas, Updating the table, Column formulas, The spreadsheet | ||
| 1622 | @subsection Editing and Debugging formulas | ||
| 1623 | @cindex formula editing | ||
| 1624 | @cindex editing, of table formulas | ||
| 1442 | 1625 | ||
| 1626 | You can edit individual formulas in the minibuffer or directly in the | ||
| 1627 | field. Org-mode can also prepare a special buffer with all active | ||
| 1628 | formulas of a table. | ||
| 1629 | |||
| 1630 | @table @kbd | ||
| 1631 | @kindex C-c = | ||
| 1632 | @kindex C-u C-c = | ||
| 1633 | @item C-c = | ||
| 1634 | @itemx C-u C-c = | ||
| 1635 | Edit the formula associated with the current column/field in the | ||
| 1636 | minibuffer. See @ref{Column formulas} and @ref{Field formulas}. | ||
| 1637 | @kindex C-u C-u C-c = | ||
| 1638 | @item C-u C-u C-c = | ||
| 1639 | Re-insert the active formula (either a | ||
| 1640 | field formula, or a column formula) into the current field, so that you | ||
| 1641 | can edit it directly in the field. The advantage over editing in the | ||
| 1642 | minibuffer is that you can use the command @kbd{C-c ?}. | ||
| 1643 | @kindex C-c ? | ||
| 1644 | @item C-c ? | ||
| 1645 | While editing a formula in a table field, highlight the field(s) | ||
| 1646 | referenced by the reference at the cursor position in the formula. | ||
| 1647 | @kindex C-c ' | ||
| 1648 | @item C-c ' | ||
| 1649 | Edit all formulas for the current table in a special buffer, where the | ||
| 1650 | formulas will be displayed one per line. | ||
| 1651 | While inside the special buffer, Org-mode will automatically highlight | ||
| 1652 | any field or range reference at the cursor position. You may edit, | ||
| 1653 | remove and add formulas, and use the following commands: | ||
| 1654 | @table @kbd | ||
| 1655 | @kindex C-c C-c | ||
| 1656 | @item C-c C-c | ||
| 1657 | Exit the buffer and store the modified formulas. With @kbd{C-u} prefix, | ||
| 1658 | also apply the new formulas to the entire table. | ||
| 1659 | @kindex C-c C-q | ||
| 1660 | @item C-c C-q | ||
| 1661 | Exit the buffer without installing changes. | ||
| 1662 | @kindex @key{TAB} | ||
| 1663 | @item @key{TAB} | ||
| 1664 | Pretty-print or indent lisp formula at point. When in a line containing | ||
| 1665 | a lisp formula, format the formula according to Emacs Lisp rules. | ||
| 1666 | Another @key{TAB} collapses the formula back again. In the open | ||
| 1667 | formula, @key{TAB} re-indents just like in Emacs-lisp-mode. | ||
| 1668 | @kindex M-@key{TAB} | ||
| 1669 | @item M-@key{TAB} | ||
| 1670 | Complete Lisp symbols, just like in Emacs-lisp-mode. | ||
| 1671 | @kindex S-@key{up} | ||
| 1672 | @kindex S-@key{down} | ||
| 1673 | @item S-@key{up}/@key{down} | ||
| 1674 | Move the reference line in the Org-mode buffer up and down. This is | ||
| 1675 | important for highlighting the references of column formulas for | ||
| 1676 | different rows. | ||
| 1677 | @kindex M-@key{up} | ||
| 1678 | @kindex M-@key{down} | ||
| 1679 | @item M-@key{up}/@key{down} | ||
| 1680 | Scroll the window displaying the table. | ||
| 1681 | @end table | ||
| 1682 | @kindex C-c @} | ||
| 1683 | @item C-c @} | ||
| 1684 | Toggle the display of row and column numbers for a table, using | ||
| 1685 | overlays. These are uptated each time the table is aligned, you can | ||
| 1686 | force it with @kbd{C-c C-c}. | ||
| 1687 | @kindex C-c @{ | ||
| 1688 | @item C-c @{ | ||
| 1689 | Toggle the formula debugger on and off. See below. | ||
| 1690 | @end table | ||
| 1691 | |||
| 1692 | Making a table field blank does not remove the formula associated with | ||
| 1693 | the field, because that is stored in a different line (the @samp{TBLFM} | ||
| 1694 | line) - during the next recalculation the field will be filled again. | ||
| 1695 | To remove a formula from a field, you have to give an empty reply when | ||
| 1696 | prompted for the formula, or to edit the @samp{#+TBLFM} line. | ||
| 1697 | |||
| 1698 | @kindex C-c C-c | ||
| 1699 | You may edit the @samp{#+TBLFM} directly and re-apply the changed | ||
| 1700 | equations with @kbd{C-c C-c} in that line, or with the normal | ||
| 1701 | recalculation commands in the table. | ||
| 1702 | |||
| 1703 | @subsubheading Debugging formulas | ||
| 1704 | @cindex formula debugging | ||
| 1705 | @cindex debugging, of table formulas | ||
| 1706 | When the evaluation of a formula leads to an error, the field content | ||
| 1707 | becomes the string @samp{#ERROR}. If you would like see what is going | ||
| 1708 | on during variable substitution and calculation in order to find a bug, | ||
| 1709 | turn on formula debugging in the @code{Tbl} menu and repeat the | ||
| 1710 | calculation, for example by pressing @kbd{C-c = @key{RET}} in a field. | ||
| 1711 | Detailed information will be displayed. | ||
| 1712 | |||
| 1713 | @node Updating the table, Advanced features, Editing and debugging formulas, The spreadsheet | ||
| 1714 | @subsection Updating the Table | ||
| 1443 | @cindex recomputing table fields | 1715 | @cindex recomputing table fields |
| 1444 | To recompute all the fields in a line, use the command @kbd{C-c *}. | 1716 | @cindex updating, table |
| 1445 | It re-applies all stored equations to the current row, from left to | 1717 | |
| 1446 | right. With a @kbd{C-u} prefix, this will be done to every line in | 1718 | Recalculation of a table is normally not automatic, but needs to be |
| 1447 | the table, so use this command it you want to make sure the entire | 1719 | triggered by a command. See @ref{Advanced features} for a way to make |
| 1448 | table is up-to-date. @kbd{C-u C-c C-c} is another way to update the | 1720 | recalculation at least semi-automatically. |
| 1449 | entire table. Global updating does not touch the line(s) above the | 1721 | |
| 1450 | first horizontal separator line, assuming that this is the table | 1722 | In order to recalculate a line of a table or the entire table, use the |
| 1451 | header. | 1723 | following commands: |
| 1452 | 1724 | ||
| 1453 | @node Advanced features, Named-field formulas, Column formulas, Table calculations | 1725 | @table @kbd |
| 1726 | @kindex C-c * | ||
| 1727 | @item C-c * | ||
| 1728 | Recalculate the current row by first applying the stored column formulas | ||
| 1729 | from left to right, and all field formulas in the current row. | ||
| 1730 | |||
| 1731 | @kindex C-u C-c * | ||
| 1732 | @item C-u C-c * | ||
| 1733 | @kindex C-u C-c C-c | ||
| 1734 | @itemx C-u C-c C-c | ||
| 1735 | Recompute the entire table, line by line. Any lines before the first | ||
| 1736 | hline are left alone, assuming that these are part of the table header. | ||
| 1737 | |||
| 1738 | @kindex C-u C-u C-c * | ||
| 1739 | @item C-u C-u C-c * | ||
| 1740 | Iterate the table by recomputing it until no further changes occur. | ||
| 1741 | This may be necessary if some computed fields use the value of other | ||
| 1742 | fields that are computed @i{later} in the calculation sequence. | ||
| 1743 | @end table | ||
| 1744 | |||
| 1745 | |||
| 1746 | @node Advanced features, , Updating the table, The spreadsheet | ||
| 1454 | @subsection Advanced features | 1747 | @subsection Advanced features |
| 1455 | 1748 | ||
| 1456 | If you want the recalculation of fields to happen automatically, | 1749 | If you want the recalculation of fields to happen automatically, or if |
| 1457 | or if you want to be able to assign a formula to an individual field | 1750 | you want to be able to assign @i{names} to fields and columns, you need |
| 1458 | (instead of an entire column) you need to reserve the first column of | 1751 | to reserve the first column of the table for special marking characters. |
| 1459 | the table for special marking characters. Here is an example of a | 1752 | @table @kbd |
| 1460 | table that collects exam results of students and makes use of these | 1753 | @kindex C-# |
| 1461 | features: | 1754 | @item C-# |
| 1755 | Rotate the calculation mark in first column through the states @samp{}, | ||
| 1756 | @samp{#}, @samp{*}, @samp{!}, @samp{$}. The meaning of these characters | ||
| 1757 | is discussed below. When there is an active region, change all marks in | ||
| 1758 | the region. | ||
| 1759 | @end table | ||
| 1760 | |||
| 1761 | Here is an example of a table that collects exam results of students and | ||
| 1762 | makes use of these features: | ||
| 1462 | 1763 | ||
| 1463 | @example | 1764 | @example |
| 1464 | @group | 1765 | @group |
| @@ -1477,14 +1778,15 @@ features: | |||
| 1477 | | ^ | | | | | at | | | 1778 | | ^ | | | | | at | | |
| 1478 | | $ | max=50 | | | | | | | 1779 | | $ | max=50 | | | | | | |
| 1479 | |---+---------+--------+--------+--------+-------+------| | 1780 | |---+---------+--------+--------+--------+-------+------| |
| 1480 | #+TBLFM: $6=vsum($P1..$P3)::$7=10*$Tot/$max;%.1f::$at=vmean(&II);%.1f | 1781 | #+TBLFM: $6=vsum($P1..$P3)::$7=10*$Tot/$max;%.1f::$at=vmean(@@-II..@@-I);%.1f |
| 1481 | @end group | 1782 | @end group |
| 1482 | @end example | 1783 | @end example |
| 1483 | 1784 | ||
| 1484 | @noindent @b{Important}: Please note that for these special tables, | 1785 | @noindent @b{Important}: Please note that for these special tables, |
| 1485 | recalculating the table with @kbd{C-u C-c *} will only affect rows | 1786 | recalculating the table with @kbd{C-u C-c *} will only affect rows that |
| 1486 | that are marked @samp{#} or @samp{*}, and named fields. The column | 1787 | are marked @samp{#} or @samp{*}, and fields that have a formula assigned |
| 1487 | formulas are not applied in rows with empty first field. | 1788 | to the field itself. The column formulas are not applied in rows with |
| 1789 | empty first field. | ||
| 1488 | 1790 | ||
| 1489 | @cindex marking characters, tables | 1791 | @cindex marking characters, tables |
| 1490 | The marking characters have the following meaning: | 1792 | The marking characters have the following meaning: |
| @@ -1495,8 +1797,8 @@ refer to a column as @samp{$Tot} instead of @samp{$6}. | |||
| 1495 | @item ^ | 1797 | @item ^ |
| 1496 | This row defines names for the fields @emph{above} the row. With such | 1798 | This row defines names for the fields @emph{above} the row. With such |
| 1497 | a definition, any formula in the table may use @samp{$m1} to refer to | 1799 | a definition, any formula in the table may use @samp{$m1} to refer to |
| 1498 | the value @samp{10}. Also, named fields can have their own formula | 1800 | the value @samp{10}. Also, if you assign a formula to a names field, it |
| 1499 | associated with them. | 1801 | will be stored as @samp{$name=...}. |
| 1500 | @item _ | 1802 | @item _ |
| 1501 | Similar to @samp{^}, but defines names for the fields in the row | 1803 | Similar to @samp{^}, but defines names for the fields in the row |
| 1502 | @emph{below}. | 1804 | @emph{below}. |
| @@ -1505,8 +1807,7 @@ Fields in this row can define @emph{parameters} for formulas. For | |||
| 1505 | example, if a field in a @samp{$} row contains @samp{max=50}, then | 1807 | example, if a field in a @samp{$} row contains @samp{max=50}, then |
| 1506 | formulas in this table can refer to the value 50 using @samp{$max}. | 1808 | formulas in this table can refer to the value 50 using @samp{$max}. |
| 1507 | Parameters work exactly like constants, only that they can be defined on | 1809 | Parameters work exactly like constants, only that they can be defined on |
| 1508 | a per-table basis. Changing a parameter and then recalculating the | 1810 | a per-table basis. |
| 1509 | table can be useful. | ||
| 1510 | @item # | 1811 | @item # |
| 1511 | Fields in this row are automatically recalculated when pressing | 1812 | Fields in this row are automatically recalculated when pressing |
| 1512 | @key{TAB} or @key{RET} or @kbd{S-@key{TAB}} in this row. Also, this row | 1813 | @key{TAB} or @key{RET} or @kbd{S-@key{TAB}} in this row. Also, this row |
| @@ -1520,69 +1821,15 @@ recalculation slows down editing too much. | |||
| 1520 | Unmarked lines are exempt from recalculation with @kbd{C-u C-c *}. | 1821 | Unmarked lines are exempt from recalculation with @kbd{C-u C-c *}. |
| 1521 | All lines that should be recalculated should be marked with @samp{#} | 1822 | All lines that should be recalculated should be marked with @samp{#} |
| 1522 | or @samp{*}. | 1823 | or @samp{*}. |
| 1824 | @item / | ||
| 1825 | Do not export this line. Useful for lines that contain the narrowing | ||
| 1826 | @samp{<N>} markers. | ||
| 1523 | @end table | 1827 | @end table |
| 1524 | 1828 | ||
| 1525 | @node Named-field formulas, Editing/debugging formulas, Advanced features, Table calculations | 1829 | Finally, just to whet your appetite on what can be done with the |
| 1526 | @subsection Named-field formulas | 1830 | fantastic @file{calc} package, here is a table that computes the Taylor |
| 1527 | @cindex named field formula | 1831 | series of degree @code{n} at location @code{x} for a couple of functions |
| 1528 | @cindex formula, for named table field | 1832 | (homework: try that with Excel :-) |
| 1529 | |||
| 1530 | A named field can have its own formula associated with it. In the | ||
| 1531 | example above, this is used for the @samp{at} field that contains | ||
| 1532 | the average result of the students. To enter a formula for a named | ||
| 1533 | field, just type it into the buffer, preceded by @samp{:=}. Or use | ||
| 1534 | @kbd{C-u C-c =}. This equation will be stored below the table like | ||
| 1535 | @samp{$name=...}. Any recalculation in the table (even if only | ||
| 1536 | requested for the current line) will also update all named field | ||
| 1537 | formulas. | ||
| 1538 | |||
| 1539 | @node Editing/debugging formulas, Appetizer, Named-field formulas, Table calculations | ||
| 1540 | @subsection Editing and debugging formulas | ||
| 1541 | @cindex formula editing | ||
| 1542 | @cindex editing, of table formulas | ||
| 1543 | |||
| 1544 | To edit a column or field formula, use the commands @kbd{C-c | ||
| 1545 | =} and @kbd{C-u C-c =}, respectively. The currently active expression | ||
| 1546 | is then presented as default in the minibuffer, where it may be edited. | ||
| 1547 | |||
| 1548 | Note that making a table field blank does not remove the formula | ||
| 1549 | associated with the field - during the next recalculation the field | ||
| 1550 | will be filled again. To remove a formula from a field, you have to | ||
| 1551 | give an empty reply when prompted for the formula, or to edit the | ||
| 1552 | @samp{#+TBLFM} line. | ||
| 1553 | |||
| 1554 | @kindex C-c C-c | ||
| 1555 | You may edit the @samp{#+TBLFM} directly and re-apply | ||
| 1556 | the changed equations with @kbd{C-c C-c} in that line, or with the | ||
| 1557 | normal recalculation commands in the table. | ||
| 1558 | |||
| 1559 | @kindex C-c ' | ||
| 1560 | @kindex C-c C-c | ||
| 1561 | @kindex C-c C-q | ||
| 1562 | @kindex C-c ? | ||
| 1563 | In particular for large tables with many formulas, it is convenient to | ||
| 1564 | use the command @kbd{C-c '} to edit the formulas of the current table | ||
| 1565 | in a separate buffer. That buffer will show the formulas one per | ||
| 1566 | line, and you are free to edit, add and remove formulas. Press | ||
| 1567 | @kbd{C-c ?} on a @samp{$...} expression to get information about its | ||
| 1568 | interpretation. Exiting the buffer with @kbd{C-c C-c} only stores the | ||
| 1569 | modified formulas below the table. Exiting with @kbd{C-u C-c C-c} | ||
| 1570 | also applies them to the entire table. @kbd{C-c C-q} exits without | ||
| 1571 | installing the changes. | ||
| 1572 | |||
| 1573 | When the evaluation of a formula leads to an error, the field content | ||
| 1574 | becomes the string @samp{#ERROR}. If you would like see what is going | ||
| 1575 | on during variable substitution and calculation in order to find a | ||
| 1576 | bug, turn on formula debugging in the menu and repeat the calculation, | ||
| 1577 | for example by pressing @kbd{C-c = @key{RET}} in a field. | ||
| 1578 | Detailed information will be displayed. | ||
| 1579 | |||
| 1580 | @node Appetizer, , Editing/debugging formulas, Table calculations | ||
| 1581 | @subsection Appetizer | ||
| 1582 | |||
| 1583 | Finally, just to whet your appetite on what can be done with the fantastic | ||
| 1584 | @file{calc} package, here is a table that computes the Taylor series | ||
| 1585 | for a couple of functions (homework: try that with Excel :-) | ||
| 1586 | 1833 | ||
| 1587 | @example | 1834 | @example |
| 1588 | @group | 1835 | @group |
| @@ -1600,51 +1847,6 @@ for a couple of functions (homework: try that with Excel :-) | |||
| 1600 | @end group | 1847 | @end group |
| 1601 | @end example | 1848 | @end example |
| 1602 | 1849 | ||
| 1603 | @node orgtbl-mode, table.el, Table calculations, Tables | ||
| 1604 | @section The Orgtbl minor mode | ||
| 1605 | @cindex orgtbl-mode | ||
| 1606 | @cindex minor mode for tables | ||
| 1607 | |||
| 1608 | If you like the intuitive way the Org-mode table editor works, you | ||
| 1609 | might also want to use it in other modes like text-mode or mail-mode. | ||
| 1610 | The minor mode Orgtbl-mode makes this possible. You can always toggle | ||
| 1611 | the mode with @kbd{M-x orgtbl-mode}. To turn it on by default, for | ||
| 1612 | example in mail mode, use | ||
| 1613 | |||
| 1614 | @lisp | ||
| 1615 | (add-hook 'mail-mode-hook 'turn-on-orgtbl) | ||
| 1616 | @end lisp | ||
| 1617 | |||
| 1618 | @node table.el, , orgtbl-mode, Tables | ||
| 1619 | @section The @file{table.el} package | ||
| 1620 | @kindex C-c C-c | ||
| 1621 | @cindex table editor, @file{table.el} | ||
| 1622 | @cindex @file{table.el} | ||
| 1623 | |||
| 1624 | Complex ASCII tables with automatic line wrapping, column- and | ||
| 1625 | row-spanning, and alignment can be created using the Emacs table | ||
| 1626 | package by Takaaki Ota (@uref{http://sourceforge.net/projects/table}, | ||
| 1627 | and also part of Emacs 22). | ||
| 1628 | When @key{TAB} or @kbd{C-c C-c} is pressed in such a table, Org-mode | ||
| 1629 | will call @command{table-recognize-table} and move the cursor into the | ||
| 1630 | table. Inside a table, the keymap of Org-mode is inactive. In order | ||
| 1631 | to execute Org-mode-related commands, leave the table. | ||
| 1632 | |||
| 1633 | @table @kbd | ||
| 1634 | @kindex C-c C-c | ||
| 1635 | @item C-c C-c | ||
| 1636 | Recognize @file{table.el} table. Works when the cursor is in a | ||
| 1637 | table.el table. | ||
| 1638 | |||
| 1639 | @kindex C-c ~ | ||
| 1640 | @item C-c ~ | ||
| 1641 | Insert a table.el table. If there is already a table at point, this | ||
| 1642 | command converts it between the table.el format and the Org-mode | ||
| 1643 | format. See the documentation string of the command | ||
| 1644 | @code{org-convert-table} for the restrictions under which this is | ||
| 1645 | possible. | ||
| 1646 | @end table | ||
| 1647 | |||
| 1648 | @node Hyperlinks, TODO items, Tables, Top | 1850 | @node Hyperlinks, TODO items, Tables, Top |
| 1649 | @chapter Hyperlinks | 1851 | @chapter Hyperlinks |
| 1650 | @cindex hyperlinks | 1852 | @cindex hyperlinks |
| @@ -1697,7 +1899,6 @@ internal structure of all links, use the menu entry | |||
| 1697 | @section Internal links | 1899 | @section Internal links |
| 1698 | @cindex internal links | 1900 | @cindex internal links |
| 1699 | @cindex links, internal | 1901 | @cindex links, internal |
| 1700 | @cindex CamelCase links | ||
| 1701 | @cindex targets, for links | 1902 | @cindex targets, for links |
| 1702 | 1903 | ||
| 1703 | If the link does not look like a URL, it is considered to be internal in | 1904 | If the link does not look like a URL, it is considered to be internal in |
| @@ -1706,7 +1907,7 @@ Target][Find my target]]} lead to a text search in the current file. | |||
| 1706 | The link can be followed with @kbd{C-c C-o} when the cursor is on the | 1907 | The link can be followed with @kbd{C-c C-o} when the cursor is on the |
| 1707 | link, or with a mouse click (@pxref{Handling links}). The preferred | 1908 | link, or with a mouse click (@pxref{Handling links}). The preferred |
| 1708 | match for such a link is a dedicated target: the same string in double | 1909 | match for such a link is a dedicated target: the same string in double |
| 1709 | angular brackets. Targets may be located anywhere; often it is | 1910 | angular brackets. Targets may be located anywhere; sometimes it is |
| 1710 | convenient to put them into a comment line. For example | 1911 | convenient to put them into a comment line. For example |
| 1711 | 1912 | ||
| 1712 | @example | 1913 | @example |
| @@ -1744,10 +1945,9 @@ earlier. | |||
| 1744 | 1945 | ||
| 1745 | @menu | 1946 | @menu |
| 1746 | * Radio targets:: Make targets trigger links in plain text. | 1947 | * Radio targets:: Make targets trigger links in plain text. |
| 1747 | * CamelCase links:: Activating CamelCase words as links | ||
| 1748 | @end menu | 1948 | @end menu |
| 1749 | 1949 | ||
| 1750 | @node Radio targets, CamelCase links, Internal links, Internal links | 1950 | @node Radio targets, , Internal links, Internal links |
| 1751 | @subsection Radio targets | 1951 | @subsection Radio targets |
| 1752 | @cindex radio targets | 1952 | @cindex radio targets |
| 1753 | @cindex targets, radio | 1953 | @cindex targets, radio |
| @@ -1763,19 +1963,6 @@ scanned automatically for radio targets only when the file is first | |||
| 1763 | loaded into Emacs. To update the target list during editing, press | 1963 | loaded into Emacs. To update the target list during editing, press |
| 1764 | @kbd{C-c C-c} with the cursor on or at a target. | 1964 | @kbd{C-c C-c} with the cursor on or at a target. |
| 1765 | 1965 | ||
| 1766 | @node CamelCase links, , Radio targets, Internal links | ||
| 1767 | @subsection CamelCase words as links | ||
| 1768 | @cindex completion, of CamelCase links | ||
| 1769 | @cindex CamelCase links, completion of | ||
| 1770 | |||
| 1771 | Org-mode also supports CamelCase words as links. This feature is not | ||
| 1772 | turned on by default because of the inconsistencies this system suffers | ||
| 1773 | from. It is also possible that this feature will disappear entirely in | ||
| 1774 | a future version of Org-mode. To activate CamelCase words as links, you | ||
| 1775 | need to customize the option @code{org-activate-links}. A CamelCase | ||
| 1776 | word then leads to a text search such that @samp{CamelCaseLink} is | ||
| 1777 | equivalent to @samp{[[camel case link]]}. | ||
| 1778 | |||
| 1779 | @node External links, Handling links, Internal links, Hyperlinks | 1966 | @node External links, Handling links, Internal links, Hyperlinks |
| 1780 | @section External links | 1967 | @section External links |
| 1781 | @cindex links, external | 1968 | @cindex links, external |
| @@ -1830,12 +2017,19 @@ format}), for example: | |||
| 1830 | [[http://www.gnu.org/software/emacs/][GNU Emacs]] | 2017 | [[http://www.gnu.org/software/emacs/][GNU Emacs]] |
| 1831 | @end example | 2018 | @end example |
| 1832 | 2019 | ||
| 2020 | @noindent | ||
| 2021 | If the description is a file name or URL that points to an image, HTML | ||
| 2022 | export (@pxref{HTML export}) will inline the image as a clickable | ||
| 2023 | button. If there is no description at all and the link points to an | ||
| 2024 | image, | ||
| 2025 | that image will be inlined into the exported HTML file. | ||
| 2026 | |||
| 1833 | @cindex angular brackets, around links | 2027 | @cindex angular brackets, around links |
| 1834 | @cindex plain text external links | 2028 | @cindex plain text external links |
| 1835 | Org-mode also finds external links in the normal text and activates them | 2029 | Org-mode also finds external links in the normal text and activates them |
| 1836 | as links. If spaces must be part of the link (for example in | 2030 | as links. If spaces must be part of the link (for example in |
| 1837 | @samp{bbdb:Richard Stallman}), or you need to remove ambiguities about the end of | 2031 | @samp{bbdb:Richard Stallman}), or if you need to remove ambiguities |
| 1838 | the link, enclose them in angular brackets. | 2032 | about the end of the link, enclose them in angular brackets. |
| 1839 | 2033 | ||
| 1840 | @node Handling links, Link abbreviations, External links, Hyperlinks | 2034 | @node Handling links, Link abbreviations, External links, Hyperlinks |
| 1841 | @section Handling links | 2035 | @section Handling links |
| @@ -1871,20 +2065,25 @@ The key binding @kbd{C-c l} is only a suggestion - see @ref{Installation}. | |||
| 1871 | @item C-c C-l | 2065 | @item C-c C-l |
| 1872 | Insert a link. This prompts for a link to be inserted into the buffer. | 2066 | Insert a link. This prompts for a link to be inserted into the buffer. |
| 1873 | You can just type a link, using text for an internal link, or one of the | 2067 | You can just type a link, using text for an internal link, or one of the |
| 1874 | link type prefixes mentioned in the examples above. Through completion, | 2068 | link type prefixes mentioned in the examples above. All links stored |
| 1875 | all links stored during the current session can be | 2069 | during the current session are part of the history for this prompt, so |
| 1876 | accessed@footnote{After insertion of a stored link, the link will be | 2070 | you can access them with @key{up} and @key{down}, or with |
| 2071 | completion@footnote{After insertion of a stored link, the link will be | ||
| 1877 | removed from the list of stored links. To keep it in the list later | 2072 | removed from the list of stored links. To keep it in the list later |
| 1878 | use, use a triple @kbd{C-u} prefix to @kbd{C-c C-l}, or configure the | 2073 | use, use a triple @kbd{C-u} prefix to @kbd{C-c C-l}, or configure the |
| 1879 | option @code{org-keep-stored-link-after-insertion}.}. The link | 2074 | option @code{org-keep-stored-link-after-insertion}.}. The link will be |
| 1880 | will be inserted into the buffer, along with a descriptive text. Note | 2075 | inserted into the buffer, along with a descriptive text. If some text |
| 1881 | that you don't have to use this command to insert a link. Links in | 2076 | was selected when this command is called, the selected text becomes the |
| 1882 | Org-mode are plain text, and you can type or paste them straight into | 2077 | default description.@* Note that you don't have to use this command to |
| 1883 | the buffer. By using this command, the links are automatically enclosed | 2078 | insert a link. Links in Org-mode are plain text, and you can type or |
| 1884 | in double brackets, and you will be asked for the optional descriptive | 2079 | paste them straight into the buffer. By using this command, the links |
| 1885 | text. If the link is a @samp{file:} link and the linked file is located | 2080 | are automatically enclosed in double brackets, and you will be asked for |
| 1886 | in the same directory as the current file or a subdirectory of it, the | 2081 | the optional descriptive text. |
| 1887 | path of the file will be inserted relative to the current directory. | 2082 | |
| 2083 | @c If the link is a @samp{file:} link and | ||
| 2084 | @c the linked file is located in the same directory as the current file or | ||
| 2085 | @c a subdirectory of it, the path of the file will be inserted relative to | ||
| 2086 | @c the current directory. | ||
| 1888 | 2087 | ||
| 1889 | @kindex C-u C-c C-l | 2088 | @kindex C-u C-c C-l |
| 1890 | @cindex file name completion | 2089 | @cindex file name completion |
| @@ -1945,10 +2144,26 @@ Jump back to a recorded position. A position is recorded by the | |||
| 1945 | commands following internal links, and by @kbd{C-c %}. Using this | 2144 | commands following internal links, and by @kbd{C-c %}. Using this |
| 1946 | command several times in direct succession moves through a ring of | 2145 | command several times in direct succession moves through a ring of |
| 1947 | previously recorded positions. | 2146 | previously recorded positions. |
| 2147 | |||
| 2148 | @kindex C-c C-x C-n | ||
| 2149 | @kindex C-c C-x C-p | ||
| 2150 | @cindex links, finding next/previous | ||
| 2151 | @item C-c C-x C-n | ||
| 2152 | @itemx C-c C-x C-p | ||
| 2153 | Move forward/backward to the next link in the buffer. At the limit of | ||
| 2154 | the buffer, the search fails once, and then wraps around. The key | ||
| 2155 | bindings for this are really too long, you might want to bind this also | ||
| 2156 | to @kbd{C-n} and @kbd{C-p} | ||
| 2157 | @lisp | ||
| 2158 | (add-hook 'org-load-hook | ||
| 2159 | (lambda () | ||
| 2160 | (define-key 'org-mode-map "\C-n" 'org-next-link) | ||
| 2161 | (define-key 'org-mode-map "\C-p" 'org-previous-link))) | ||
| 2162 | @end lisp | ||
| 1948 | @end table | 2163 | @end table |
| 1949 | 2164 | ||
| 1950 | @node Link abbreviations, Search options, Handling links, Hyperlinks | 2165 | @node Link abbreviations, Search options, Handling links, Hyperlinks |
| 1951 | @section Link abbreviatons | 2166 | @section Link abbreviations |
| 1952 | @cindex link abbreviations | 2167 | @cindex link abbreviations |
| 1953 | @cindex abbreviation, links | 2168 | @cindex abbreviation, links |
| 1954 | 2169 | ||
| @@ -1957,7 +2172,7 @@ needed in a document. For this you can use link abbreviations. An | |||
| 1957 | abbreviated link looks like this | 2172 | abbreviated link looks like this |
| 1958 | 2173 | ||
| 1959 | @example | 2174 | @example |
| 1960 | [[linkword::tag][description]] | 2175 | [[linkword:tag][description]] |
| 1961 | @end example | 2176 | @end example |
| 1962 | 2177 | ||
| 1963 | @noindent | 2178 | @noindent |
| @@ -1981,9 +2196,9 @@ in order to create the link. You may also specify a function that will | |||
| 1981 | be called with the tag as the only argument to create the link. | 2196 | be called with the tag as the only argument to create the link. |
| 1982 | 2197 | ||
| 1983 | With the above setting, you could link to a specific bug with | 2198 | With the above setting, you could link to a specific bug with |
| 1984 | @code{[[bugzilla::129]]}, search the web for OrgMode with | 2199 | @code{[[bugzilla:129]]}, search the web for @samp{OrgMode} with |
| 1985 | @code{[[google::OrgMode]]} and find out what the Org-mode author is | 2200 | @code{[[google:OrgMode]]} and find out what the Org-mode author is |
| 1986 | doing besides Emacs hacking with @code{[[ads::Dominik,C]]}. | 2201 | doing besides Emacs hacking with @code{[[ads:Dominik,C]]}. |
| 1987 | 2202 | ||
| 1988 | If you need special abbreviations just for a single Org-mode buffer, you | 2203 | If you need special abbreviations just for a single Org-mode buffer, you |
| 1989 | can define them in the file with | 2204 | can define them in the file with |
| @@ -2042,7 +2257,7 @@ sparse tree with the matches. | |||
| 2042 | @end table | 2257 | @end table |
| 2043 | 2258 | ||
| 2044 | As a degenerate case, a file link with an empty file name can be used | 2259 | As a degenerate case, a file link with an empty file name can be used |
| 2045 | to search the current file. For example, @code{<file:::find me>} does | 2260 | to search the current file. For example, @code{[[file:::find me]]} does |
| 2046 | a search for @samp{find me} in the current file, just as | 2261 | a search for @samp{find me} in the current file, just as |
| 2047 | @samp{[[find me]]} would. | 2262 | @samp{[[find me]]} would. |
| 2048 | 2263 | ||
| @@ -2075,15 +2290,27 @@ file. | |||
| 2075 | @cindex @file{remember.el} | 2290 | @cindex @file{remember.el} |
| 2076 | 2291 | ||
| 2077 | Another way to create org entries with links to other files is through | 2292 | Another way to create org entries with links to other files is through |
| 2078 | the @emph{Remember} package by John Wiegley. @emph{Remember} lets you | 2293 | the @i{remember} package by John Wiegley. @i{Remember} lets you store |
| 2079 | store quick notes with little interruption of your work flow. See | 2294 | quick notes with little interruption of your work flow. See |
| 2080 | @uref{http://www.emacswiki.org/cgi-bin/wiki/RememberMode} for more | 2295 | @uref{http://www.emacswiki.org/cgi-bin/wiki/RememberMode} for more |
| 2081 | information. The notes produced by @emph{Remember} can be stored in | 2296 | information. The notes produced by @i{Remember} can be stored in |
| 2082 | different ways, and Org-mode files are a good target. Org-mode allows | 2297 | different ways, and Org-mode files are a good target. Org-mode |
| 2083 | you to file away notes either to a default file, or directly to the correct | 2298 | significantly expands the possibilities of @i{remember}: You may define |
| 2084 | location in your Org-mode outline tree. The following customization | 2299 | templates for different note types, and to associate target files and |
| 2085 | will tell @emph{Remember} to use org files as target, and to create | 2300 | headlines with specific templates. It also allows you to select the |
| 2086 | annotations compatible with Org-mode links. | 2301 | location where a note should be stored interactively, on the fly. |
| 2302 | |||
| 2303 | @menu | ||
| 2304 | * Setting up remember:: Some code for .emacs to get things going | ||
| 2305 | * Remember templates:: Define the outline of different note types | ||
| 2306 | * Storing notes:: Directly get the note to where it belongs | ||
| 2307 | @end menu | ||
| 2308 | |||
| 2309 | @node Setting up remember, Remember templates, Remember, Remember | ||
| 2310 | @subsection Setting up remember | ||
| 2311 | |||
| 2312 | The following customization will tell @i{remember} to use org files as | ||
| 2313 | target, and to create annotations compatible with Org-mode links. | ||
| 2087 | 2314 | ||
| 2088 | @example | 2315 | @example |
| 2089 | (setq org-directory "~/path/to/my/orgfiles/") | 2316 | (setq org-directory "~/path/to/my/orgfiles/") |
| @@ -2093,28 +2320,38 @@ annotations compatible with Org-mode links. | |||
| 2093 | (add-hook 'remember-mode-hook 'org-remember-apply-template) | 2320 | (add-hook 'remember-mode-hook 'org-remember-apply-template) |
| 2094 | @end example | 2321 | @end example |
| 2095 | 2322 | ||
| 2323 | @node Remember templates, Storing notes, Setting up remember, Remember | ||
| 2324 | @subsection Remember templates | ||
| 2096 | @cindex templates, for remember | 2325 | @cindex templates, for remember |
| 2326 | |||
| 2097 | In combination with Org-mode, you can use templates to generate | 2327 | In combination with Org-mode, you can use templates to generate |
| 2098 | different types of remember notes. For example, if you would like to | 2328 | different types of @i{remember} notes. For example, if you would like |
| 2099 | use one template to create general TODO entries, and another one for | 2329 | to use one template to create general TODO entries, another one for |
| 2100 | journal entries, you could use: | 2330 | journal entries, and a third one for collecting random ideas, you could |
| 2331 | use: | ||
| 2101 | 2332 | ||
| 2102 | @example | 2333 | @example |
| 2103 | (setq org-remember-templates | 2334 | (setq org-remember-templates |
| 2104 | '((?t "* TODO %?\n %i\n %a" "~/org/TODO.org") | 2335 | '((?t "* TODO %?\n %i\n %a" "~/org/TODO.org") |
| 2105 | (?j "* %U %?\n\n %i\n %a" "~/org/JOURNAL.org"))) | 2336 | (?j "* %U %?\n\n %i\n %a" "~/org/JOURNAL.org") |
| 2337 | (?i "* %^@{Title@}\n %i\n %a" "~/org/JOURNAL.org" "New Ideas"))) | ||
| 2106 | @end example | 2338 | @end example |
| 2107 | 2339 | ||
| 2108 | @noindent In these entries, the character specifies how to select the | 2340 | @noindent In these entries, the character specifies how to select the |
| 2109 | template, the first string specifies the template, and the (optional) | 2341 | template. The first string specifies the template. Two more (optional) |
| 2110 | second string specifies a default file (overruling | 2342 | strings give the file in which, and the headline under which the new |
| 2111 | @code{org-default-notes-file}) as a target for this note. | 2343 | note should be stored. The file defaults to |
| 2112 | 2344 | @code{org-default-notes-file}, the heading to | |
| 2113 | When you call @kbd{M-x remember} to remember something, org will prompt | 2345 | @code{org-remember-default-headline}. Both defaults help to get to the |
| 2114 | for a key to select the template and then prepare the buffer like | 2346 | storing location quickly, but you can change the location interactively |
| 2347 | while storing the note. | ||
| 2348 | |||
| 2349 | When you call @kbd{M-x remember} (or @kbd{M-x org-remember}) to remember | ||
| 2350 | something, org will prompt for a key to select the template (if you have | ||
| 2351 | more than one template) and then prepare the buffer like | ||
| 2115 | @example | 2352 | @example |
| 2116 | * TODO | 2353 | * TODO |
| 2117 | <file:link to where you called remember> | 2354 | [[file:link to where you called remember]] |
| 2118 | @end example | 2355 | @end example |
| 2119 | 2356 | ||
| 2120 | @noindent or | 2357 | @noindent or |
| @@ -2122,20 +2359,69 @@ for a key to select the template and then prepare the buffer like | |||
| 2122 | @example | 2359 | @example |
| 2123 | * [2006-03-21 Tue 15:37] | 2360 | * [2006-03-21 Tue 15:37] |
| 2124 | 2361 | ||
| 2125 | <file:link to where you called remember> | 2362 | [[file:link to where you called remember]] |
| 2363 | @end example | ||
| 2364 | |||
| 2365 | @noindent | ||
| 2366 | During expansion of the template, special @kbd{%}-escapes allow dynamic | ||
| 2367 | insertion of content: | ||
| 2368 | @example | ||
| 2369 | %^@{prompt@} @r{prompt the user for a string and replace this sequence with it.} | ||
| 2370 | %t @r{time stamp, date only} | ||
| 2371 | %T @r{time stamp with date and time} | ||
| 2372 | %u, %U @r{like the above, but inactive time stamps} | ||
| 2373 | %^t @r{like @code{%t}, but prompt for date. Similarly @code{%^T}, @code{%^u}, @code{%^U}} | ||
| 2374 | @r{You may define a prompt like @code{%^@{Birthday@}t}} | ||
| 2375 | %n @r{user name (taken from @code{user-full-name})} | ||
| 2376 | %a @r{annotation, normally the link created with @code{org-store-link}} | ||
| 2377 | %i @r{initial content, the region when remember is called with C-u.} | ||
| 2378 | @r{The entire text will be indented like @code{%i} itself.} | ||
| 2379 | %:keyword @r{specific information for certain link types, see below} | ||
| 2380 | @end example | ||
| 2381 | |||
| 2382 | @noindent | ||
| 2383 | For specific link types, the following keywords will be defined: | ||
| 2384 | |||
| 2385 | @example | ||
| 2386 | Link type | Available keywords | ||
| 2387 | -------------------+---------------------------------------------- | ||
| 2388 | bbdb | %:name %:company | ||
| 2389 | vm, wl, mh, rmail | %:type %:subject %:message-id | ||
| 2390 | | %:from %:fromname %:fromaddress | ||
| 2391 | | %:to %:toname %:toaddress | ||
| 2392 | | %:fromto @r{(either "to NAME" or "from NAME")@footnote{This will always be the other, not the user. See the variable @code{org-from-is-user-regexp}.}} | ||
| 2393 | gnus | %:group, @r{for messages also all email fields} | ||
| 2394 | w3, w3m | %:url | ||
| 2395 | info | %:file %:node | ||
| 2396 | calendar | %:date" | ||
| 2397 | @end example | ||
| 2398 | |||
| 2399 | @noindent | ||
| 2400 | If you would like to have the cursor in a specific position after the | ||
| 2401 | template has been expanded: | ||
| 2402 | |||
| 2403 | @example | ||
| 2404 | %? @r{After completing the template, position cursor here.} | ||
| 2126 | @end example | 2405 | @end example |
| 2127 | 2406 | ||
| 2128 | @noindent See the variable @code{org-remember-templates} for more details. | 2407 | @noindent |
| 2408 | If you change you mind about which template to use, call | ||
| 2409 | @code{org-remember} in the remember buffer. You may then select a new | ||
| 2410 | template that will be filled with the previoous context information. | ||
| 2411 | |||
| 2412 | @node Storing notes, , Remember templates, Remember | ||
| 2413 | @subsection Storing notes | ||
| 2129 | 2414 | ||
| 2130 | When you are finished composing a note with remember, you have to press | 2415 | When you are finished preparing a note with @i{remember}, you have to press |
| 2131 | @kbd{C-c C-c} to file the note away. The handler first prompts for a | 2416 | @kbd{C-c C-c} to file the note away. The handler first prompts for a |
| 2132 | target file - if you press @key{RET}, the value of | 2417 | target file - if you press @key{RET}, the value specified for the |
| 2133 | @code{org-default-notes-file} is used. Then the command offers the | 2418 | template is used. Then the command offers the headings tree of the |
| 2134 | headings tree of the selected file. You can either immediately press | 2419 | selected file, with the cursor position at the default headline (if you |
| 2135 | @key{RET} to get the note appended to the file. Or you can use vertical | 2420 | had specified one in the template). You can either immediately press |
| 2136 | cursor motion (@key{up} and @key{down}) and visibility cycling | 2421 | @key{RET} to get the note placed there. Or you can use vertical cursor |
| 2137 | (@key{TAB}) to find a better place. Pressing @key{RET} or @key{left} or | 2422 | motion (@key{up} and @key{down}) and visibility cycling (@key{TAB}) to |
| 2138 | @key{right} leads to the following result. | 2423 | find a better place. Pressing @key{RET} or @key{left} or @key{right} |
| 2424 | then leads to the following result. | ||
| 2139 | 2425 | ||
| 2140 | @multitable @columnfractions 0.2 0.1 0.7 | 2426 | @multitable @columnfractions 0.2 0.1 0.7 |
| 2141 | @item @b{Cursor position} @tab @b{Key} @tab @b{Note gets inserted} | 2427 | @item @b{Cursor position} @tab @b{Key} @tab @b{Note gets inserted} |
| @@ -2148,11 +2434,10 @@ cursor motion (@key{up} and @key{down}) and visibility cycling | |||
| 2148 | Or use prefix arg to specify level manually. | 2434 | Or use prefix arg to specify level manually. |
| 2149 | @end multitable | 2435 | @end multitable |
| 2150 | 2436 | ||
| 2151 | So a fast way to store the note is to press @kbd{C-c C-c @key{RET} | 2437 | So a fast way to store the note to its default location is to press |
| 2152 | @key{RET}} to append it to the default file. Even shorter would be | 2438 | @kbd{C-c C-c @key{RET} @key{RET}}. Even shorter would be @kbd{C-u C-c |
| 2153 | @kbd{C-u C-c C-c}, which does the same without even showing the tree. | 2439 | C-c}, which does the same without even asking for a file or showing the |
| 2154 | But with little extra effort, you can push it directly to the correct | 2440 | tree. |
| 2155 | location. | ||
| 2156 | 2441 | ||
| 2157 | Before inserting the text into a tree, the function ensures that the | 2442 | Before inserting the text into a tree, the function ensures that the |
| 2158 | text has a headline, i.e. a first line that starts with a @samp{*}. | 2443 | text has a headline, i.e. a first line that starts with a @samp{*}. |
| @@ -2277,7 +2562,9 @@ TODO to FEEDBACK, then to VERIFY, and finally to DONE. You may also | |||
| 2277 | use a prefix argument to quickly select a specific state. For example | 2562 | use a prefix argument to quickly select a specific state. For example |
| 2278 | @kbd{C-3 C-c C-t} will change the state immediately to VERIFY. | 2563 | @kbd{C-3 C-c C-t} will change the state immediately to VERIFY. |
| 2279 | If you define many keywords, you can use in-buffer completion (see | 2564 | If you define many keywords, you can use in-buffer completion (see |
| 2280 | @ref{Completion}) to insert these words into the buffer. | 2565 | @ref{Completion}) to insert these words into the buffer. Changing a todo |
| 2566 | state can be logged with a timestamp, see @ref{Tracking TODO state | ||
| 2567 | changes} for more information. | ||
| 2281 | 2568 | ||
| 2282 | @node TODO types, Per file keywords, Workflow states, TODO extensions | 2569 | @node TODO types, Per file keywords, Workflow states, TODO extensions |
| 2283 | @subsection TODO keywords as types | 2570 | @subsection TODO keywords as types |
| @@ -2333,7 +2620,7 @@ anywhere in the file: | |||
| 2333 | #+TYP_TODO: Fred Sara Lucy Mike DONE | 2620 | #+TYP_TODO: Fred Sara Lucy Mike DONE |
| 2334 | @end example | 2621 | @end example |
| 2335 | 2622 | ||
| 2336 | @cindex Completion, of option keywords | 2623 | @cindex completion, of option keywords |
| 2337 | @kindex M-@key{TAB} | 2624 | @kindex M-@key{TAB} |
| 2338 | @noindent To make sure you are using the correct keyword, type | 2625 | @noindent To make sure you are using the correct keyword, type |
| 2339 | @samp{#+} into the buffer and then use @kbd{M-@key{TAB}} completion. | 2626 | @samp{#+} into the buffer and then use @kbd{M-@key{TAB}} completion. |
| @@ -2493,6 +2780,7 @@ planning. | |||
| 2493 | * Time stamps:: Assigning a time to a tree entry | 2780 | * Time stamps:: Assigning a time to a tree entry |
| 2494 | * Creating timestamps:: Commands which insert timestamps | 2781 | * Creating timestamps:: Commands which insert timestamps |
| 2495 | * Custom time format:: If you cannot work with the ISO format | 2782 | * Custom time format:: If you cannot work with the ISO format |
| 2783 | * Repeating items:: Deadlines that come back again and again | ||
| 2496 | * Progress logging:: Documenting when what work was done. | 2784 | * Progress logging:: Documenting when what work was done. |
| 2497 | @end menu | 2785 | @end menu |
| 2498 | 2786 | ||
| @@ -2554,10 +2842,12 @@ example: | |||
| 2554 | If a time stamp is preceded by the word @samp{SCHEDULED:}, it means you | 2842 | If a time stamp is preceded by the word @samp{SCHEDULED:}, it means you |
| 2555 | are planning to start working on that task on the given date. So this is | 2843 | are planning to start working on that task on the given date. So this is |
| 2556 | not about recording an event, but about planning your work. The | 2844 | not about recording an event, but about planning your work. The |
| 2557 | headline will be listed under the given date. In addition, a reminder | 2845 | headline will be listed under the given date@footnote{It will still be |
| 2558 | that the scheduled date has passed will be present in the compilation | 2846 | listed on that date after it has been marked DONE. If you don't like |
| 2559 | for @emph{today}, until the entry is marked DONE. I.e., the task will | 2847 | this, set the variable @code{org-agenda-skip-scheduled-if-done}.}. In |
| 2560 | automatically be forwarded until completed. | 2848 | addition, a reminder that the scheduled date has passed will be present |
| 2849 | in the compilation for @emph{today}, until the entry is marked DONE. | ||
| 2850 | I.e., the task will automatically be forwarded until completed. | ||
| 2561 | 2851 | ||
| 2562 | @example | 2852 | @example |
| 2563 | *** TODO Call Trillian for a date on New Years Eve. | 2853 | *** TODO Call Trillian for a date on New Years Eve. |
| @@ -2575,7 +2865,7 @@ continuing until the entry is marked DONE. An example: | |||
| 2575 | 2865 | ||
| 2576 | @example | 2866 | @example |
| 2577 | *** TODO write article about the Earth for the Guide | 2867 | *** TODO write article about the Earth for the Guide |
| 2578 | The editor in charge is <bbdb:Ford Prefect> | 2868 | The editor in charge is [[bbdb:Ford Prefect]] |
| 2579 | DEADLINE: <2004-02-29 Sun> | 2869 | DEADLINE: <2004-02-29 Sun> |
| 2580 | @end example | 2870 | @end example |
| 2581 | @item Time stamp with CLOSED keyword | 2871 | @item Time stamp with CLOSED keyword |
| @@ -2707,6 +2997,7 @@ specified with the current date and time. For example: | |||
| 2707 | 22 sept 0:34 --> currentyear-09-22 0:34 | 2997 | 22 sept 0:34 --> currentyear-09-22 0:34 |
| 2708 | 12 --> currentyear-currentmonth-12 | 2998 | 12 --> currentyear-currentmonth-12 |
| 2709 | Fri --> nearest Friday (today or later) | 2999 | Fri --> nearest Friday (today or later) |
| 3000 | +4 --> 4 days from now (if +N is the only thing given) | ||
| 2710 | @end example | 3001 | @end example |
| 2711 | 3002 | ||
| 2712 | The function understands English month and weekday abbreviations. If | 3003 | The function understands English month and weekday abbreviations. If |
| @@ -2716,8 +3007,11 @@ the variables @code{parse-time-months} and @code{parse-time-weekdays}. | |||
| 2716 | @cindex calendar, for selecting date | 3007 | @cindex calendar, for selecting date |
| 2717 | Parallel to the minibuffer prompt, a calendar is popped up@footnote{If | 3008 | Parallel to the minibuffer prompt, a calendar is popped up@footnote{If |
| 2718 | you don't need/want the calendar, configure the variable | 3009 | you don't need/want the calendar, configure the variable |
| 2719 | @code{org-popup-calendar-for-date-prompt}.}. You can control the | 3010 | @code{org-popup-calendar-for-date-prompt}.}. When you exit the date |
| 2720 | calendar fully from the minibuffer: | 3011 | prompt, either by clicking on a date in the calendar, or by pressing |
| 3012 | @key{RET}, the date selected in the calendar will be combined with the | ||
| 3013 | information entered at the prompt. You can control the calendar fully | ||
| 3014 | from the minibuffer: | ||
| 2721 | 3015 | ||
| 2722 | @table @kbd | 3016 | @table @kbd |
| 2723 | @kindex < | 3017 | @kindex < |
| @@ -2752,7 +3046,7 @@ One month back. | |||
| 2752 | Choose date in calendar (only if nothing was typed into minibuffer). | 3046 | Choose date in calendar (only if nothing was typed into minibuffer). |
| 2753 | @end table | 3047 | @end table |
| 2754 | 3048 | ||
| 2755 | @node Custom time format, Progress logging, Creating timestamps, Timestamps | 3049 | @node Custom time format, Repeating items, Creating timestamps, Timestamps |
| 2756 | @section Custom time format | 3050 | @section Custom time format |
| 2757 | @cindex custom date/time format | 3051 | @cindex custom date/time format |
| 2758 | @cindex time format, custom | 3052 | @cindex time format, custom |
| @@ -2795,26 +3089,70 @@ using dates in tables, table alignment will be messed up. If the custom | |||
| 2795 | format is shorter, things do work as expected. | 3089 | format is shorter, things do work as expected. |
| 2796 | @end itemize | 3090 | @end itemize |
| 2797 | 3091 | ||
| 2798 | @node Progress logging, , Custom time format, Timestamps | 3092 | @node Repeating items, Progress logging, Custom time format, Timestamps |
| 3093 | @section Repeating items | ||
| 3094 | @cindex TODO items, repeating | ||
| 3095 | @cindex deadlines, repeating | ||
| 3096 | @cindex scheduling, repeating | ||
| 3097 | |||
| 3098 | Org-mode integrates with the Emacs calendar and diary to display cyclic | ||
| 3099 | appointments, anniversaries and other special entries in the agenda | ||
| 3100 | (@pxref{Weekly/Daily agenda}). However, it can be useful to have | ||
| 3101 | certain deadlines and scheduling items to auto-repeat. The advantage of | ||
| 3102 | a deadline or scheduled item is that the they produce warnings ahead of | ||
| 3103 | time and automatically forward themselves in the agenda until they are | ||
| 3104 | done. The abstract difference is therefore between cyclic | ||
| 3105 | @i{appointments} and cyclic @i{action items}. For appointments you | ||
| 3106 | should use the diary, for actions you can uses an org-mode deadline or | ||
| 3107 | scheduling time stamp together with a REPEAT cookie. For example: | ||
| 3108 | |||
| 3109 | @example | ||
| 3110 | * TODO Replace batteries in smoke detector REPEAT(+18m) | ||
| 3111 | SCHEDULED: <2007-01-01 Mon> | ||
| 3112 | |||
| 3113 | * TODO Get dentist appointment REPEAT(+6m) | ||
| 3114 | SCHEDULED: <2006-12-19 Tue> | ||
| 3115 | |||
| 3116 | * TODO Tax report to IRS REPEAT(+1y) | ||
| 3117 | DEADLINE: <2007-04-01 Sun> | ||
| 3118 | @end example | ||
| 3119 | |||
| 3120 | Each time you try to mark one of these entries DONE using @kbd{C-c C-t}, | ||
| 3121 | they will automatically switch back to the state TODO, and the | ||
| 3122 | deadline/scheduling will be shifted accordingly. The time units | ||
| 3123 | recognized by org-mode are year (y), month (m), week (w), and day (d). | ||
| 3124 | Org-mode will also prompt you for a note and record the fact that you | ||
| 3125 | have closed this item in a note under the headline. | ||
| 3126 | |||
| 3127 | One unusual property of these repeating items is that only one instance | ||
| 3128 | of each exist at any given time. So if you look back or ahead in the | ||
| 3129 | agenda, you will not find past and future instances, only the current | ||
| 3130 | one will show up. Use a cyclic diary entry if you need all past and | ||
| 3131 | future instances to be visible in the agenda. | ||
| 3132 | |||
| 3133 | @node Progress logging, , Repeating items, Timestamps | ||
| 2799 | @section Progress Logging | 3134 | @section Progress Logging |
| 2800 | @cindex progress logging | 3135 | @cindex progress logging |
| 2801 | @cindex logging, of progress | 3136 | @cindex logging, of progress |
| 2802 | 3137 | ||
| 2803 | Org-mode can automatically record a time stamp when you mark a TODO item | 3138 | Org-mode can automatically record a time stamp when you mark a TODO item |
| 2804 | as DONE. You can also measure precisely the time you spent on specific | 3139 | as DONE, or even each time when you change the state of a TODO item. |
| 2805 | items in a project by starting and stopping a clock when you start and | 3140 | You can also measure precisely the time you spent on specific items in a |
| 2806 | stop working on an aspect of a project. | 3141 | project by starting and stopping a clock when you start and stop working |
| 3142 | on an aspect of a project. | ||
| 2807 | 3143 | ||
| 2808 | @menu | 3144 | @menu |
| 2809 | * Closing items:: When was this entry marked DONE? | 3145 | * Closing items:: When was this entry marked DONE? |
| 3146 | * Tracking TODO state changes:: When did the status change? | ||
| 2810 | * Clocking work time:: When exactly did you work on this item? | 3147 | * Clocking work time:: When exactly did you work on this item? |
| 2811 | @end menu | 3148 | @end menu |
| 2812 | 3149 | ||
| 2813 | @node Closing items, Clocking work time, Progress logging, Progress logging | 3150 | @node Closing items, Tracking TODO state changes, Progress logging, Progress logging |
| 2814 | @subsection Closing items | 3151 | @subsection Closing items |
| 2815 | 3152 | ||
| 2816 | If you want to keep track of @emph{when} a certain TODO item was | 3153 | If you want to keep track of @emph{when} a certain TODO item was |
| 2817 | finished, turn on logging with | 3154 | finished, turn on logging with@footnote{The corresponding in-buffer |
| 3155 | setting is: @code{#+STARTUP: logdone}} | ||
| 2818 | 3156 | ||
| 2819 | @lisp | 3157 | @lisp |
| 2820 | (setq org-log-done t) | 3158 | (setq org-log-done t) |
| @@ -2823,16 +3161,44 @@ finished, turn on logging with | |||
| 2823 | @noindent | 3161 | @noindent |
| 2824 | Then each time you turn a TODO entry into DONE using either @kbd{C-c | 3162 | Then each time you turn a TODO entry into DONE using either @kbd{C-c |
| 2825 | C-t} in the Org-mode buffer or @kbd{t} in the agenda buffer, a line | 3163 | C-t} in the Org-mode buffer or @kbd{t} in the agenda buffer, a line |
| 2826 | @samp{CLOSED: [timestamp]} will be inserted just after the headline. | 3164 | @samp{CLOSED: [timestamp]} will be inserted just after the headline. If |
| 2827 | If you turn the entry back into a TODO item again through further | 3165 | you turn the entry back into a TODO item through further state cycling, |
| 2828 | state cycling, that line will be removed again. In the timeline | 3166 | that line will be removed again. In the timeline (@pxref{Timeline}) and |
| 2829 | (@pxref{Timeline}) and in the agenda (@pxref{Weekly/Daily agenda}), | 3167 | in the agenda (@pxref{Weekly/Daily agenda}), you can then use the |
| 2830 | you can then use the @kbd{l} key to display the TODO items closed on | 3168 | @kbd{l} key to display the TODO items closed on each day, giving you an |
| 2831 | each day, giving you an overview of what has been done on a day. | 3169 | overview of what has been done on a day. If you want to record a note |
| 2832 | See the variable @code{org-log-done} for the possibility to record an | 3170 | along with the timestamp, use@footnote{The corresponding in-buffer |
| 2833 | additional note together with a timestamp. | 3171 | setting is: @code{#+STARTUP: lognotedone}} |
| 2834 | 3172 | ||
| 2835 | @node Clocking work time, , Closing items, Progress logging | 3173 | @lisp |
| 3174 | (setq org-log-done '(done)) | ||
| 3175 | @end lisp | ||
| 3176 | |||
| 3177 | @node Tracking TODO state changes, Clocking work time, Closing items, Progress logging | ||
| 3178 | @subsection Tracking TODO state changes | ||
| 3179 | |||
| 3180 | When TODO keywords are used as workflow states (@pxref{Workflow | ||
| 3181 | states}), you might want to keep track of when a state change occurred, | ||
| 3182 | and you may even want to attach notes to that state change. With the | ||
| 3183 | setting | ||
| 3184 | |||
| 3185 | @lisp | ||
| 3186 | (setq org-log-done '(state)) | ||
| 3187 | @end lisp | ||
| 3188 | |||
| 3189 | @noindent | ||
| 3190 | each state change will prompt you for a note that will be attached to | ||
| 3191 | the current headline. Very likely you do not want this verbose tracking | ||
| 3192 | all the time, so it is probably better to configure this behavior with | ||
| 3193 | in-buffer options. For example, if you are tracking purchases, put | ||
| 3194 | these into a separate file that starts with: | ||
| 3195 | |||
| 3196 | @example | ||
| 3197 | #+SEQ_TODO: TODO ORDERED INVOICE PAYED RECEIVED SENT | ||
| 3198 | #+STARTUP: lognotestate | ||
| 3199 | @end example | ||
| 3200 | |||
| 3201 | @node Clocking work time, , Tracking TODO state changes, Progress logging | ||
| 2836 | @subsection Clocking work time | 3202 | @subsection Clocking work time |
| 2837 | 3203 | ||
| 2838 | Org-mode allows you to clock the time you spent on specific tasks in a | 3204 | Org-mode allows you to clock the time you spent on specific tasks in a |
| @@ -2852,7 +3218,9 @@ Stop the clock (clock-out). The inserts another timestamp at the same | |||
| 2852 | location where the clock was last started. It also directly computes | 3218 | location where the clock was last started. It also directly computes |
| 2853 | the resulting time in inserts it after the time range as @samp{=> | 3219 | the resulting time in inserts it after the time range as @samp{=> |
| 2854 | HH:MM}. See the variable @code{org-log-done} for the possibility to | 3220 | HH:MM}. See the variable @code{org-log-done} for the possibility to |
| 2855 | record an additional note together with the clock-out time stamp. | 3221 | record an additional note together with the clock-out time |
| 3222 | stamp@footnote{The corresponding in-buffer setting is: @code{#+STARTUP: | ||
| 3223 | lognoteclock-out}}. | ||
| 2856 | @kindex C-c C-y | 3224 | @kindex C-c C-y |
| 2857 | @item C-c C-y | 3225 | @item C-c C-y |
| 2858 | Recompute the time interval after changing one of the time stamps. This | 3226 | Recompute the time interval after changing one of the time stamps. This |
| @@ -3073,6 +3441,8 @@ Turn off groups of mutually exclusive tags. Use this to (as an | |||
| 3073 | exception) assign several tags from such a group. | 3441 | exception) assign several tags from such a group. |
| 3074 | @item C-c | 3442 | @item C-c |
| 3075 | Toggle auto-exit after the next change (see below). | 3443 | Toggle auto-exit after the next change (see below). |
| 3444 | If you are using expert mode, the first @kbd{C-c} will display the | ||
| 3445 | selection window. | ||
| 3076 | @end table | 3446 | @end table |
| 3077 | 3447 | ||
| 3078 | @noindent | 3448 | @noindent |
| @@ -3090,7 +3460,11 @@ modify your list of tags, set the variable | |||
| 3090 | @code{org-fast-tag-selection-single-key}. Then you no longer have to | 3460 | @code{org-fast-tag-selection-single-key}. Then you no longer have to |
| 3091 | press @key{RET} to exit fast tag selection - it will immediately exit | 3461 | press @key{RET} to exit fast tag selection - it will immediately exit |
| 3092 | after the first change. If you then occasionally need more keys, press | 3462 | after the first change. If you then occasionally need more keys, press |
| 3093 | @kbd{C-c} to turn off auto-exit for the current tag selection process. | 3463 | @kbd{C-c} to turn off auto-exit for the current tag selection process |
| 3464 | (in effect: start selection with @kbd{C-c C-c C-c} instead of @kbd{C-c | ||
| 3465 | C-c}). If you set the variable to the value @code{expert}, the special | ||
| 3466 | window is not even shown for single-key tag selection, it comes up only | ||
| 3467 | when you press an extra @kbd{C-c}. | ||
| 3094 | 3468 | ||
| 3095 | @node Tag searches, , Setting tags, Tags | 3469 | @node Tag searches, , Setting tags, Tags |
| 3096 | @section Tag searches | 3470 | @section Tag searches |
| @@ -3103,7 +3477,8 @@ information into special lists. | |||
| 3103 | @table @kbd | 3477 | @table @kbd |
| 3104 | @kindex C-c \ | 3478 | @kindex C-c \ |
| 3105 | @item C-c \ | 3479 | @item C-c \ |
| 3106 | Create a sparse tree with all headlines matching a tags search. | 3480 | Create a sparse tree with all headlines matching a tags search. With a |
| 3481 | @kbd{C-u} prefix argument, ignore headlines that are not a TODO line. | ||
| 3107 | @kindex C-c a m | 3482 | @kindex C-c a m |
| 3108 | @item C-c a m | 3483 | @item C-c a m |
| 3109 | Create a global list of tag matches from all agenda files. | 3484 | Create a global list of tag matches from all agenda files. |
| @@ -3125,13 +3500,13 @@ or @samp{-} is present. Examples: | |||
| 3125 | 3500 | ||
| 3126 | @table @samp | 3501 | @table @samp |
| 3127 | @item +WORK-BOSS | 3502 | @item +WORK-BOSS |
| 3128 | Select all headlines that are tagged @samp{:WORK:}, but discard those also tagged | 3503 | Select headlines tagged @samp{:WORK:}, but discard those also tagged |
| 3129 | @samp{:BOSS:}. | 3504 | @samp{:BOSS:}. |
| 3130 | @item WORK|LAPTOP | 3505 | @item WORK|LAPTOP |
| 3131 | Selects lines tagged @samp{:WORK:} or @samp{:LAPTOP:}. | 3506 | Selects lines tagged @samp{:WORK:} or @samp{:LAPTOP:}. |
| 3132 | @item WORK|LAPTOP&NIGHT | 3507 | @item WORK|LAPTOP&NIGHT |
| 3133 | Like the previous example, but require the @samp{:LAPTOP:} lines to be | 3508 | Like before, but require the @samp{:LAPTOP:} lines to be tagged also |
| 3134 | tagged also @samp{NIGHT}. | 3509 | @samp{NIGHT}. |
| 3135 | @end table | 3510 | @end table |
| 3136 | 3511 | ||
| 3137 | @cindex TODO keyword matching, with tags search | 3512 | @cindex TODO keyword matching, with tags search |
| @@ -3141,13 +3516,16 @@ adding a condition after a slash to a tags match. The syntax is similar | |||
| 3141 | to the tag matches, but should be applied with consideration: For | 3516 | to the tag matches, but should be applied with consideration: For |
| 3142 | example, a positive selection on several TODO keywords can not | 3517 | example, a positive selection on several TODO keywords can not |
| 3143 | meaningfully be combined with boolean AND. However, @emph{negative | 3518 | meaningfully be combined with boolean AND. However, @emph{negative |
| 3144 | selection} combined with AND can be meaningful. Examples: | 3519 | selection} combined with AND can be meaningful. To make sure that only |
| 3520 | lines are checked that actually have any TODO keyword, use @kbd{C-c a | ||
| 3521 | M}, or equivalently start the todo part after the slash with @samp{!}. | ||
| 3522 | Examples: | ||
| 3145 | 3523 | ||
| 3146 | @table @samp | 3524 | @table @samp |
| 3147 | @item WORK/WAITING | 3525 | @item WORK/WAITING |
| 3148 | Select @samp{:WORK:}-tagged TODO lines with the specific TODO | 3526 | Select @samp{:WORK:}-tagged TODO lines with the specific TODO |
| 3149 | keyword @samp{WAITING}. | 3527 | keyword @samp{WAITING}. |
| 3150 | @item WORK/-WAITING-NEXT | 3528 | @item WORK/!-WAITING-NEXT |
| 3151 | Select @samp{:WORK:}-tagged TODO lines that are neither @samp{WAITING} | 3529 | Select @samp{:WORK:}-tagged TODO lines that are neither @samp{WAITING} |
| 3152 | nor @samp{NEXT} | 3530 | nor @samp{NEXT} |
| 3153 | @item WORK/+WAITING|+NEXT | 3531 | @item WORK/+WAITING|+NEXT |
| @@ -3155,6 +3533,18 @@ Select @samp{:WORK:}-tagged TODO lines that are either @samp{WAITING} or | |||
| 3155 | @samp{NEXT}. | 3533 | @samp{NEXT}. |
| 3156 | @end table | 3534 | @end table |
| 3157 | 3535 | ||
| 3536 | @cindex regular expressions, with tags search | ||
| 3537 | Any element of the tag/todo match can be a regular expression - in this | ||
| 3538 | case it must be enclosed in curly braces. For example, | ||
| 3539 | @samp{WORK+@{^BOSS.*@}} matches headlines that contain the tag | ||
| 3540 | @samp{WORK} and any tag @i{starting} with @samp{BOSS}. | ||
| 3541 | |||
| 3542 | @cindex level, require for tags match | ||
| 3543 | You can also require a headline to be of a certain level, by writing | ||
| 3544 | instead of any TAG an expression like @samp{LEVEL=3}. For example, a | ||
| 3545 | search @samp{+LEVEL=3+BOSS/-DONE} lists all level three headlines that | ||
| 3546 | have the tag BOSS and are @emph{not} marked with the todo keyword DONE. | ||
| 3547 | |||
| 3158 | @node Agenda views, Embedded LaTeX, Tags, Top | 3548 | @node Agenda views, Embedded LaTeX, Tags, Top |
| 3159 | @chapter Agenda Views | 3549 | @chapter Agenda Views |
| 3160 | @cindex agenda views | 3550 | @cindex agenda views |
| @@ -3166,23 +3556,26 @@ are important for a particular date, this information must be collected, | |||
| 3166 | sorted and displayed in an organized way. | 3556 | sorted and displayed in an organized way. |
| 3167 | 3557 | ||
| 3168 | Org-mode can select items based on various criteria, and display them | 3558 | Org-mode can select items based on various criteria, and display them |
| 3169 | in a separate buffer. Five different view types are provided: | 3559 | in a separate buffer. Six different view types are provided: |
| 3170 | 3560 | ||
| 3171 | @itemize @bullet | 3561 | @itemize @bullet |
| 3172 | @item | 3562 | @item |
| 3173 | an @emph{agenda} that is like a calendar and shows information | 3563 | an @emph{agenda} that is like a calendar and shows information |
| 3174 | for specific dates | 3564 | for specific dates, |
| 3175 | @item | 3565 | @item |
| 3176 | a @emph{TODO list} that covers all unfinished | 3566 | a @emph{TODO list} that covers all unfinished |
| 3177 | action items, | 3567 | action items, |
| 3178 | @item | 3568 | @item |
| 3179 | a @emph{tags view} that shows information based on | 3569 | a @emph{tags view}, showings headlines based on |
| 3180 | the tags associated with headlines in the outline tree, | 3570 | the tags associated with them, |
| 3181 | @item | 3571 | @item |
| 3182 | a @emph{timeline view} that shows all events in a single Org-mode file, | 3572 | a @emph{timeline view} that shows all events in a single Org-mode file, |
| 3183 | in time-sorted view | 3573 | in time-sorted view, |
| 3184 | @item | 3574 | @item |
| 3185 | @emph{custom views} that are special tag and keyword searches and | 3575 | a @emph{stuck projects view} showing projects that currently don't move |
| 3576 | along, and | ||
| 3577 | @item | ||
| 3578 | @emph{custom views} that are special tag/keyword searches and | ||
| 3186 | combinations of different views. | 3579 | combinations of different views. |
| 3187 | @end itemize | 3580 | @end itemize |
| 3188 | 3581 | ||
| @@ -3200,10 +3593,7 @@ window configuration is restored when the agenda exits: | |||
| 3200 | @menu | 3593 | @menu |
| 3201 | * Agenda files:: Files being searched for agenda information | 3594 | * Agenda files:: Files being searched for agenda information |
| 3202 | * Agenda dispatcher:: Keyboard access to agenda views | 3595 | * Agenda dispatcher:: Keyboard access to agenda views |
| 3203 | * Weekly/Daily agenda:: The calendar page with current tasks | 3596 | * Built-in agenda views:: What is available out of the box? |
| 3204 | * Global TODO list:: All unfinished action items | ||
| 3205 | * Matching headline tags:: Structured information with fine-tuned search | ||
| 3206 | * Timeline:: Time-sorted view for single file | ||
| 3207 | * Presentation and sorting:: How agenda items are prepared for display | 3597 | * Presentation and sorting:: How agenda items are prepared for display |
| 3208 | * Agenda commands:: Remote editing of org trees | 3598 | * Agenda commands:: Remote editing of org trees |
| 3209 | * Custom agenda views:: Defining special searches and views | 3599 | * Custom agenda views:: Defining special searches and views |
| @@ -3236,7 +3626,9 @@ the front. With prefix arg, file is added/moved to the end. | |||
| 3236 | @item C-c ] | 3626 | @item C-c ] |
| 3237 | Remove current file from the list of agenda files. | 3627 | Remove current file from the list of agenda files. |
| 3238 | @kindex C-, | 3628 | @kindex C-, |
| 3629 | @kindex C-' | ||
| 3239 | @item C-, | 3630 | @item C-, |
| 3631 | @itemx C-' | ||
| 3240 | Cycle through agenda file list, visiting one file after the other. | 3632 | Cycle through agenda file list, visiting one file after the other. |
| 3241 | @end table | 3633 | @end table |
| 3242 | 3634 | ||
| @@ -3244,7 +3636,7 @@ Cycle through agenda file list, visiting one file after the other. | |||
| 3244 | The Org menu contains the current list of files and can be used | 3636 | The Org menu contains the current list of files and can be used |
| 3245 | to visit any of them. | 3637 | to visit any of them. |
| 3246 | 3638 | ||
| 3247 | @node Agenda dispatcher, Weekly/Daily agenda, Agenda files, Agenda views | 3639 | @node Agenda dispatcher, Built-in agenda views, Agenda files, Agenda views |
| 3248 | @section The agenda dispatcher | 3640 | @section The agenda dispatcher |
| 3249 | @cindex agenda dispatcher | 3641 | @cindex agenda dispatcher |
| 3250 | @cindex dispatching agenda commands | 3642 | @cindex dispatching agenda commands |
| @@ -3257,13 +3649,15 @@ command. The dispatcher offers the following default commands: | |||
| 3257 | @table @kbd | 3649 | @table @kbd |
| 3258 | @item a | 3650 | @item a |
| 3259 | Create the calendar-like agenda (@pxref{Weekly/Daily agenda}). | 3651 | Create the calendar-like agenda (@pxref{Weekly/Daily agenda}). |
| 3260 | @item t / T | 3652 | @item t @r{/} T |
| 3261 | Create a list of all TODO items (@pxref{Global TODO list}). | 3653 | Create a list of all TODO items (@pxref{Global TODO list}). |
| 3262 | @item m / M | 3654 | @item m @r{/} M |
| 3263 | Create a list of headlines matching a TAGS expression (@pxref{Matching | 3655 | Create a list of headlines matching a TAGS expression (@pxref{Matching |
| 3264 | headline tags}). | 3656 | headline tags}). |
| 3265 | @item L | 3657 | @item L |
| 3266 | Create the timeline view for the current buffer (@pxref{Timeline}). | 3658 | Create the timeline view for the current buffer (@pxref{Timeline}). |
| 3659 | @item # @r{/} ! | ||
| 3660 | Create a list of stuck projects (@pxref{Stuck projects}). | ||
| 3267 | @item 1 | 3661 | @item 1 |
| 3268 | Restrict an agenda command to the current buffer. After pressing | 3662 | Restrict an agenda command to the current buffer. After pressing |
| 3269 | @kbd{1}, you still need to press the character selecting the command. | 3663 | @kbd{1}, you still need to press the character selecting the command. |
| @@ -3280,8 +3674,21 @@ possibility to create extended agenda buffers that contain several | |||
| 3280 | blocks together, for example the weekly agenda, the global TODO list and | 3674 | blocks together, for example the weekly agenda, the global TODO list and |
| 3281 | a number of special tags matches. @xref{Custom agenda views}. | 3675 | a number of special tags matches. @xref{Custom agenda views}. |
| 3282 | 3676 | ||
| 3283 | @node Weekly/Daily agenda, Global TODO list, Agenda dispatcher, Agenda views | 3677 | @node Built-in agenda views, Presentation and sorting, Agenda dispatcher, Agenda views |
| 3284 | @section The weekly/daily agenda | 3678 | @section The built-in agenda views |
| 3679 | |||
| 3680 | In this section we describe the built-in views. | ||
| 3681 | |||
| 3682 | @menu | ||
| 3683 | * Weekly/Daily agenda:: The calendar page with current tasks | ||
| 3684 | * Global TODO list:: All unfinished action items | ||
| 3685 | * Matching headline tags:: Structured information with fine-tuned search | ||
| 3686 | * Timeline:: Time-sorted view for single file | ||
| 3687 | * Stuck projects:: Find projects you need to review | ||
| 3688 | @end menu | ||
| 3689 | |||
| 3690 | @node Weekly/Daily agenda, Global TODO list, Built-in agenda views, Built-in agenda views | ||
| 3691 | @subsection The weekly/daily agenda | ||
| 3285 | @cindex agenda | 3692 | @cindex agenda |
| 3286 | @cindex weekly agenda | 3693 | @cindex weekly agenda |
| 3287 | @cindex daily agenda | 3694 | @cindex daily agenda |
| @@ -3305,13 +3712,7 @@ change the dates of deadlines and appointments from the agenda buffer. | |||
| 3305 | The commands available in the Agenda buffer are listed in @ref{Agenda | 3712 | The commands available in the Agenda buffer are listed in @ref{Agenda |
| 3306 | commands}. | 3713 | commands}. |
| 3307 | 3714 | ||
| 3308 | @menu | 3715 | @subsubheading Calendar/Diary integration |
| 3309 | * Calendar/Diary integration:: Integrating Anniversaries and more | ||
| 3310 | @end menu | ||
| 3311 | |||
| 3312 | |||
| 3313 | @node Calendar/Diary integration, , Weekly/Daily agenda, Weekly/Daily agenda | ||
| 3314 | @subsection Calendar/Diary integration | ||
| 3315 | @cindex calendar integration | 3716 | @cindex calendar integration |
| 3316 | @cindex diary integration | 3717 | @cindex diary integration |
| 3317 | 3718 | ||
| @@ -3342,8 +3743,8 @@ calendars, respectively. @kbd{c} can be used to switch back and forth | |||
| 3342 | between calendar and agenda. | 3743 | between calendar and agenda. |
| 3343 | 3744 | ||
| 3344 | 3745 | ||
| 3345 | @node Global TODO list, Matching headline tags, Weekly/Daily agenda, Agenda views | 3746 | @node Global TODO list, Matching headline tags, Weekly/Daily agenda, Built-in agenda views |
| 3346 | @section The global TODO list | 3747 | @subsection The global TODO list |
| 3347 | @cindex global TODO list | 3748 | @cindex global TODO list |
| 3348 | @cindex TODO list, global | 3749 | @cindex TODO list, global |
| 3349 | 3750 | ||
| @@ -3394,8 +3795,8 @@ and omit the sublevels from the global list. Configure the variable | |||
| 3394 | @code{org-agenda-todo-list-sublevels} to get this behavior. | 3795 | @code{org-agenda-todo-list-sublevels} to get this behavior. |
| 3395 | @end itemize | 3796 | @end itemize |
| 3396 | 3797 | ||
| 3397 | @node Matching headline tags, Timeline, Global TODO list, Agenda views | 3798 | @node Matching headline tags, Timeline, Global TODO list, Built-in agenda views |
| 3398 | @section Matching headline tags | 3799 | @subsection Matching headline tags |
| 3399 | @cindex matching, of tags | 3800 | @cindex matching, of tags |
| 3400 | @cindex tags view | 3801 | @cindex tags view |
| 3401 | 3802 | ||
| @@ -3422,8 +3823,8 @@ together with a tags match is also possible, see @ref{Tag searches}. | |||
| 3422 | The commands available in the tags list are described in @ref{Agenda | 3823 | The commands available in the tags list are described in @ref{Agenda |
| 3423 | commands}. | 3824 | commands}. |
| 3424 | 3825 | ||
| 3425 | @node Timeline, Presentation and sorting, Matching headline tags, Agenda views | 3826 | @node Timeline, Stuck projects, Matching headline tags, Built-in agenda views |
| 3426 | @section Timeline for a single file | 3827 | @subsection Timeline for a single file |
| 3427 | @cindex timeline, single file | 3828 | @cindex timeline, single file |
| 3428 | @cindex time-sorted view | 3829 | @cindex time-sorted view |
| 3429 | 3830 | ||
| @@ -3444,7 +3845,49 @@ The commands available in the timeline buffer are listed in | |||
| 3444 | @ref{Agenda commands}. | 3845 | @ref{Agenda commands}. |
| 3445 | 3846 | ||
| 3446 | 3847 | ||
| 3447 | @node Presentation and sorting, Agenda commands, Timeline, Agenda views | 3848 | @node Stuck projects, , Timeline, Built-in agenda views |
| 3849 | @subsection Stuck projects | ||
| 3850 | |||
| 3851 | If you are following a system like David Allen's GTD to organize your | ||
| 3852 | work, one of the ``duties'' you have is a regular review to make sure | ||
| 3853 | that all projects move along. A @emph{stuck} project is a project that | ||
| 3854 | has no defined next actions, so it will never show up in the TODO lists | ||
| 3855 | Org-mode produces. During the review, you need to identify such | ||
| 3856 | projects and define next actions for them. | ||
| 3857 | |||
| 3858 | @table @kbd | ||
| 3859 | @kindex C-c a # | ||
| 3860 | @item C-c a # | ||
| 3861 | List projects that are stuck. | ||
| 3862 | @kindex C-c a ! | ||
| 3863 | @item C-c a ! | ||
| 3864 | Customize the variable @code{org-stuck-projects} to define what a stuck | ||
| 3865 | project is and how to find it. | ||
| 3866 | @end table | ||
| 3867 | |||
| 3868 | You almost certainly will have to configure this view before it will | ||
| 3869 | work for you. The built-in default assumes that all your projects are | ||
| 3870 | level-2 headlines, and that a project is not stuck if it has at least | ||
| 3871 | one entry marked with a todo keyword TODO or NEXT or NEXTACTION. | ||
| 3872 | |||
| 3873 | Lets assume that you, in your own way of using Org-mode, identify | ||
| 3874 | projects with a tag PROJECT, and that you use a todo keyword MAYBE to | ||
| 3875 | indicate a project that should not be considered yet. Lets further | ||
| 3876 | assume that the todo keyword DONE marks finished projects, and that NEXT | ||
| 3877 | and TODO indicate next actions. Finally, the tag @@SHOP indicates | ||
| 3878 | shopping and is a next action even without the NEXT tag. In this case | ||
| 3879 | you would start by identifying eligible projects with a tags/todo match | ||
| 3880 | @samp{+PROJECT/-MAYBE-DONE}, and then check for TODO, NEXT and @@SHOP in | ||
| 3881 | the subtree to identify projects that are not stuck. The correct | ||
| 3882 | customization for this is | ||
| 3883 | |||
| 3884 | @lisp | ||
| 3885 | (setq org-stuck-projects | ||
| 3886 | ("+PROJECT/-MAYBE-DONE" ("NEXT" "TODO") ("@@SHOP"))) | ||
| 3887 | @end lisp | ||
| 3888 | |||
| 3889 | |||
| 3890 | @node Presentation and sorting, Agenda commands, Built-in agenda views, Agenda views | ||
| 3448 | @section Presentation and sorting | 3891 | @section Presentation and sorting |
| 3449 | @cindex presentation, of agenda items | 3892 | @cindex presentation, of agenda items |
| 3450 | 3893 | ||
| @@ -3492,7 +3935,7 @@ ranges can be specified with two time stamps, like | |||
| 3492 | 3935 | ||
| 3493 | In the headline of the entry itself, a time(range) may also appear as | 3936 | In the headline of the entry itself, a time(range) may also appear as |
| 3494 | plain text (like @samp{12:45} or a @samp{8:30-1pm}. If the agenda | 3937 | plain text (like @samp{12:45} or a @samp{8:30-1pm}. If the agenda |
| 3495 | integrates the Emacs diary (@pxref{Calendar/Diary integration}), time | 3938 | integrates the Emacs diary (@pxref{Weekly/Daily agenda}), time |
| 3496 | specifications in diary entries are recognized as well. | 3939 | specifications in diary entries are recognized as well. |
| 3497 | 3940 | ||
| 3498 | For agenda display, Org-mode extracts the time and displays it in a | 3941 | For agenda display, Org-mode extracts the time and displays it in a |
| @@ -3613,6 +4056,13 @@ location in the org file. The initial setting for this mode in new | |||
| 3613 | agenda buffers can be set with the variable | 4056 | agenda buffers can be set with the variable |
| 3614 | @code{org-agenda-start-with-follow-mode}. | 4057 | @code{org-agenda-start-with-follow-mode}. |
| 3615 | 4058 | ||
| 4059 | @kindex b | ||
| 4060 | @item b | ||
| 4061 | Display the entire subtree of the current item in an indirect buffer. | ||
| 4062 | With numerical prefix ARG, go up to this level and then take that tree. | ||
| 4063 | If ARG is negative, go up that many levels. With @kbd{C-u} prefix, do | ||
| 4064 | not remove the previously used indirect buffer. | ||
| 4065 | |||
| 3616 | @kindex l | 4066 | @kindex l |
| 3617 | @item l | 4067 | @item l |
| 3618 | Toggle Logbook mode. In Logbook mode, entries that where marked DONE while | 4068 | Toggle Logbook mode. In Logbook mode, entries that where marked DONE while |
| @@ -3635,7 +4085,7 @@ Switch to daily view (just one day displayed). | |||
| 3635 | 4085 | ||
| 3636 | @kindex D | 4086 | @kindex D |
| 3637 | @item D | 4087 | @item D |
| 3638 | Toggle the inclusion of diary entries. See @ref{Calendar/Diary integration}. | 4088 | Toggle the inclusion of diary entries. See @ref{Weekly/Daily agenda}. |
| 3639 | 4089 | ||
| 3640 | @kindex g | 4090 | @kindex g |
| 3641 | @item g | 4091 | @item g |
| @@ -3674,6 +4124,13 @@ Goto today. | |||
| 3674 | @item 0-9 | 4124 | @item 0-9 |
| 3675 | Digit argument. | 4125 | Digit argument. |
| 3676 | 4126 | ||
| 4127 | @cindex undoing remote-editing events | ||
| 4128 | @cindex remote editing, undo | ||
| 4129 | @kindex C-_ | ||
| 4130 | @item C-_ | ||
| 4131 | Undo a change due to a remote editing command. The change is undone | ||
| 4132 | both in the agenda buffer and in the remote buffer. | ||
| 4133 | |||
| 3677 | @kindex t | 4134 | @kindex t |
| 3678 | @item t | 4135 | @item t |
| 3679 | Change the TODO state of the item, both in the agenda and in the | 4136 | Change the TODO state of the item, both in the agenda and in the |
| @@ -3686,6 +4143,10 @@ to it in the original Org-mode file. If the text to be deleted remotely | |||
| 3686 | is longer than one line, the kill needs to be confirmed by the user. See | 4143 | is longer than one line, the kill needs to be confirmed by the user. See |
| 3687 | variable @code{org-agenda-confirm-kill}. | 4144 | variable @code{org-agenda-confirm-kill}. |
| 3688 | 4145 | ||
| 4146 | @kindex $ | ||
| 4147 | @item $ | ||
| 4148 | Archive the subtree corresponding to the current headline. | ||
| 4149 | |||
| 3689 | @kindex T | 4150 | @kindex T |
| 3690 | @item T | 4151 | @item T |
| 3691 | Show all tags associated with the current item. Because of | 4152 | Show all tags associated with the current item. Because of |
| @@ -3706,7 +4167,7 @@ priority character. If you reply with @key{SPC}, the priority cookie | |||
| 3706 | is removed from the entry. | 4167 | is removed from the entry. |
| 3707 | 4168 | ||
| 3708 | @kindex P | 4169 | @kindex P |
| 3709 | @item p | 4170 | @item P |
| 3710 | Display weighted priority of current item. | 4171 | Display weighted priority of current item. |
| 3711 | 4172 | ||
| 3712 | @kindex + | 4173 | @kindex + |
| @@ -4310,6 +4771,17 @@ Org-mode contains an HTML (XHTML 1.0 strict) exporter with extensive | |||
| 4310 | HTML formatting, in ways similar to John Grubers @emph{markdown} | 4771 | HTML formatting, in ways similar to John Grubers @emph{markdown} |
| 4311 | language, but with additional support for tables. | 4772 | language, but with additional support for tables. |
| 4312 | 4773 | ||
| 4774 | @menu | ||
| 4775 | * Export commands:: How to invode HTML export | ||
| 4776 | * Quoting HTML tags:: Using direct HTML in Org-mode | ||
| 4777 | * Links:: How hyperlinks get transferred to HTML | ||
| 4778 | * Images:: To inline or not to inline? | ||
| 4779 | * CSS support:: Style specifications | ||
| 4780 | @end menu | ||
| 4781 | |||
| 4782 | @node Export commands, Quoting HTML tags, HTML export, HTML export | ||
| 4783 | @subsection HTML export commands | ||
| 4784 | |||
| 4313 | @cindex region, active | 4785 | @cindex region, active |
| 4314 | @cindex active region | 4786 | @cindex active region |
| 4315 | @cindex transient-mark-mode | 4787 | @cindex transient-mark-mode |
| @@ -4340,10 +4812,31 @@ at a different level, specify it with a prefix argument. For example, | |||
| 4340 | @noindent | 4812 | @noindent |
| 4341 | creates two levels of headings and does the rest as items. | 4813 | creates two levels of headings and does the rest as items. |
| 4342 | 4814 | ||
| 4343 | If you want to include HTML tags which should be interpreted as such, | 4815 | @node Quoting HTML tags, Links, Export commands, HTML export |
| 4344 | mark them with @samp{@@} as in @samp{@@<b>bold text@@</b>}. | 4816 | @subsection Quoting HTML tags |
| 4817 | |||
| 4345 | Plain @samp{<} and @samp{>} are always transformed to @samp{<} and | 4818 | Plain @samp{<} and @samp{>} are always transformed to @samp{<} and |
| 4346 | @samp{>} in HTML export. | 4819 | @samp{>} in HTML export. If you want to include simple HTML tags |
| 4820 | which should be interpreted as such, mark them with @samp{@@} as in | ||
| 4821 | @samp{@@<b>bold text@@</b>}. Note that this really works only for | ||
| 4822 | simple tags. For more extensive HTML that should be copied verbatim to | ||
| 4823 | the exported file use either | ||
| 4824 | |||
| 4825 | @example | ||
| 4826 | #+HTML: Literal HTML code for export | ||
| 4827 | @end example | ||
| 4828 | |||
| 4829 | @noindent or | ||
| 4830 | |||
| 4831 | @example | ||
| 4832 | #+BEGIN_HTML | ||
| 4833 | All lines between these markers are exported literally | ||
| 4834 | #+END_HTML | ||
| 4835 | @end example | ||
| 4836 | |||
| 4837 | |||
| 4838 | @node Links, Images, Quoting HTML tags, HTML export | ||
| 4839 | @subsection Links | ||
| 4347 | 4840 | ||
| 4348 | @cindex links, in HTML export | 4841 | @cindex links, in HTML export |
| 4349 | @cindex internal links, in HTML export | 4842 | @cindex internal links, in HTML export |
| @@ -4358,6 +4851,33 @@ HTML version also exists of the linked file. For information related to | |||
| 4358 | linking files while publishing them to a publishing directory see | 4851 | linking files while publishing them to a publishing directory see |
| 4359 | @ref{Publishing links}. | 4852 | @ref{Publishing links}. |
| 4360 | 4853 | ||
| 4854 | @node Images, CSS support, Links, HTML export | ||
| 4855 | @subsection Images | ||
| 4856 | |||
| 4857 | @cindex images, inline in HTML | ||
| 4858 | @cindex inlining images in HTML | ||
| 4859 | HTML export can inline images given as links in the Org-mode file, and | ||
| 4860 | it can make an image the clickable part of a link. By | ||
| 4861 | default@footnote{but see the variable | ||
| 4862 | @code{org-export-html-inline-images}}, images are inlined if a link does | ||
| 4863 | not have a description. So @samp{[[file:myimg.jpg]]} will be inlined, | ||
| 4864 | while @samp{[[file:myimg.jpg][the image]]} will just produce a link | ||
| 4865 | @samp{the image} that points to the image. If the description part | ||
| 4866 | itself is a @code{file:} link or a @code{http:} URL pointing to an | ||
| 4867 | image, this image will be inlined and activated so that clicking on the | ||
| 4868 | image will activate the link. For example, to include a thumbnail that | ||
| 4869 | will link to a high resolution version of the image, you could use: | ||
| 4870 | |||
| 4871 | @example | ||
| 4872 | [[file:highres.jpg][file:thumb.jpg]] | ||
| 4873 | @end example | ||
| 4874 | |||
| 4875 | @noindent | ||
| 4876 | and you could use @code{http} addresses just as well. | ||
| 4877 | |||
| 4878 | @node CSS support, , Images, HTML export | ||
| 4879 | @subsection CSS support | ||
| 4880 | |||
| 4361 | You can also give style information for the exported file. The HTML | 4881 | You can also give style information for the exported file. The HTML |
| 4362 | exporter assigns the following CSS classes to appropriate parts of the | 4882 | exporter assigns the following CSS classes to appropriate parts of the |
| 4363 | document - your style specifications may change these: | 4883 | document - your style specifications may change these: |
| @@ -4373,10 +4893,12 @@ document - your style specifications may change these: | |||
| 4373 | The default style specification can be configured through the option | 4893 | The default style specification can be configured through the option |
| 4374 | @code{org-export-html-style}. If you want to use a file-local style, | 4894 | @code{org-export-html-style}. If you want to use a file-local style, |
| 4375 | you may use file variables, best wrapped into a COMMENT section at the | 4895 | you may use file variables, best wrapped into a COMMENT section at the |
| 4376 | end of the outline tree. For example: | 4896 | end of the outline tree. For example@footnote{Under Emacs 21, the |
| 4897 | continuation lines for a variable value should have no @samp{#} at the | ||
| 4898 | start of the line.}: | ||
| 4377 | 4899 | ||
| 4378 | @example | 4900 | @example |
| 4379 | * COMMENT HTML style specifications | 4901 | * COMMENT html style specifications |
| 4380 | 4902 | ||
| 4381 | # Local Variables: | 4903 | # Local Variables: |
| 4382 | # org-export-html-style: " <style type=\"text/css\"> | 4904 | # org-export-html-style: " <style type=\"text/css\"> |
| @@ -4420,7 +4942,8 @@ still prefer a standard calendar application for anniversaries and | |||
| 4420 | appointments. In this case it can be useful to have deadlines and | 4942 | appointments. In this case it can be useful to have deadlines and |
| 4421 | other time-stamped items in Org-mode files show up in the calendar | 4943 | other time-stamped items in Org-mode files show up in the calendar |
| 4422 | application. Org-mode can export calendar information in the standard | 4944 | application. Org-mode can export calendar information in the standard |
| 4423 | iCalendar format. | 4945 | iCalendar format. If you also want to have TODO entries included in the |
| 4946 | export, configure the variable @code{org-icalendar-include-todo}. | ||
| 4424 | 4947 | ||
| 4425 | @table @kbd | 4948 | @table @kbd |
| 4426 | @kindex C-c C-e i | 4949 | @kindex C-c C-e i |
| @@ -4440,25 +4963,8 @@ Create a single large iCalendar file from all files in | |||
| 4440 | @end table | 4963 | @end table |
| 4441 | 4964 | ||
| 4442 | How this calendar is best read and updated, depends on the application | 4965 | How this calendar is best read and updated, depends on the application |
| 4443 | you are using. For example, when using iCal under Apple MacOS X, you | 4966 | you are using. The FAQ covers this issue. |
| 4444 | could create a new calendar @samp{OrgMode} (the default name for the | 4967 | |
| 4445 | calendar created by @kbd{C-c C-e c}, see the variables | ||
| 4446 | @code{org-icalendar-combined-name} and | ||
| 4447 | @code{org-combined-agenda-icalendar-file}). Then set Org-mode to | ||
| 4448 | overwrite the corresponding file | ||
| 4449 | @file{~/Library/Calendars/OrgMode.ics}. You may even use AppleScript | ||
| 4450 | to make iCal re-read the calendar files each time a new version of | ||
| 4451 | @file{OrgMode.ics} is produced. Here is the setup needed for this: | ||
| 4452 | |||
| 4453 | @cindex applescript, for calendar update | ||
| 4454 | @lisp | ||
| 4455 | (setq org-combined-agenda-icalendar-file | ||
| 4456 | "~/Library/Calendars/OrgMode.ics") | ||
| 4457 | (add-hook 'org-after-save-iCalendar-file-hook | ||
| 4458 | (lambda () | ||
| 4459 | (shell-command | ||
| 4460 | "osascript -e 'tell application \"iCal\" to reload calendars'"))) | ||
| 4461 | @end lisp | ||
| 4462 | 4968 | ||
| 4463 | @node Text interpretation, , iCalendar export, Exporting | 4969 | @node Text interpretation, , iCalendar export, Exporting |
| 4464 | @section Text interpretation by the exporter | 4970 | @section Text interpretation by the exporter |
| @@ -4514,6 +5020,11 @@ backend supports lists. See @xref{Plain lists}. | |||
| 4514 | You can make words @b{*bold*}, @i{/italic/}, _underlined_, | 5020 | You can make words @b{*bold*}, @i{/italic/}, _underlined_, |
| 4515 | @code{=code=}, and @samp{+strikethrough+}. | 5021 | @code{=code=}, and @samp{+strikethrough+}. |
| 4516 | 5022 | ||
| 5023 | @cindex horizontal rules, in exported files | ||
| 5024 | @item | ||
| 5025 | A line consisting of only dashes, and at least 5 of them, will be | ||
| 5026 | exported as a horizontal line (@samp{<hr/>} in HTML). | ||
| 5027 | |||
| 4517 | @cindex LaTeX fragments, export | 5028 | @cindex LaTeX fragments, export |
| 4518 | @cindex TeX macros, export | 5029 | @cindex TeX macros, export |
| 4519 | @item | 5030 | @item |
| @@ -4596,7 +5107,7 @@ you can: | |||
| 4596 | @example | 5107 | @example |
| 4597 | H: @r{set the number of headline levels for export} | 5108 | H: @r{set the number of headline levels for export} |
| 4598 | num: @r{turn on/off section-numbers} | 5109 | num: @r{turn on/off section-numbers} |
| 4599 | toc: @r{turn on/off table of contents} | 5110 | toc: @r{turn on/off table of contents, or set level limit (integer)} |
| 4600 | \n: @r{turn on/off linebreak-preservation} | 5111 | \n: @r{turn on/off linebreak-preservation} |
| 4601 | @@: @r{turn on/off quoted HTML tags} | 5112 | @@: @r{turn on/off quoted HTML tags} |
| 4602 | :: @r{turn on/off fixed-width sections} | 5113 | :: @r{turn on/off fixed-width sections} |
| @@ -4966,14 +5477,14 @@ force publishing of all files by giving a prefix argument. | |||
| 4966 | @cindex completion, of TODO keywords | 5477 | @cindex completion, of TODO keywords |
| 4967 | @cindex completion, of dictionary words | 5478 | @cindex completion, of dictionary words |
| 4968 | @cindex completion, of option keywords | 5479 | @cindex completion, of option keywords |
| 4969 | @cindex completion, of CamelCase links | ||
| 4970 | @cindex completion, of tags | 5480 | @cindex completion, of tags |
| 5481 | @cindex completion, of link abbreviations | ||
| 4971 | @cindex @TeX{} symbol completion | 5482 | @cindex @TeX{} symbol completion |
| 4972 | @cindex TODO keywords completion | 5483 | @cindex TODO keywords completion |
| 4973 | @cindex dictionary word completion | 5484 | @cindex dictionary word completion |
| 4974 | @cindex option keyword completion | 5485 | @cindex option keyword completion |
| 4975 | @cindex CamelCase link completion | ||
| 4976 | @cindex tag completion | 5486 | @cindex tag completion |
| 5487 | @cindex link abbreviations, completion of | ||
| 4977 | 5488 | ||
| 4978 | Org-mode supports in-buffer completion. This type of completion does | 5489 | Org-mode supports in-buffer completion. This type of completion does |
| 4979 | not make use of the minibuffer. You simply type a few letters into | 5490 | not make use of the minibuffer. You simply type a few letters into |
| @@ -5017,8 +5528,8 @@ Elsewhere, complete dictionary words using ispell. | |||
| 5017 | @cindex options, for customization | 5528 | @cindex options, for customization |
| 5018 | @cindex variables, for customization | 5529 | @cindex variables, for customization |
| 5019 | 5530 | ||
| 5020 | There are more than 100 variables that can be used to customize | 5531 | There are more than 180 variables that can be used to customize |
| 5021 | Org-mode. For the sake of compactness of the manual, we are not | 5532 | Org-mode. For the sake of compactness of the manual, I am not |
| 5022 | describing the variables here. A structured overview of customization | 5533 | describing the variables here. A structured overview of customization |
| 5023 | variables is available with @kbd{M-x org-customize}. Or select | 5534 | variables is available with @kbd{M-x org-customize}. Or select |
| 5024 | @code{Browse Org Group} from the @code{Org->Customization} menu. Many | 5535 | @code{Browse Org Group} from the @code{Org->Customization} menu. Many |
| @@ -5047,6 +5558,9 @@ Org-mode file is being visited. The first set of options deals with the | |||
| 5047 | initial visibility of the outline tree. The corresponding variable for | 5558 | initial visibility of the outline tree. The corresponding variable for |
| 5048 | global default settings is @code{org-startup-folded}, with a default | 5559 | global default settings is @code{org-startup-folded}, with a default |
| 5049 | value @code{t}, which means @code{overview}. | 5560 | value @code{t}, which means @code{overview}. |
| 5561 | @cindex @code{overview}, STARTUP keyword | ||
| 5562 | @cindex @code{content}, STARTUP keyword | ||
| 5563 | @cindex @code{showall}, STARTUP keyword | ||
| 5050 | @example | 5564 | @example |
| 5051 | overview @r{top-level headlines only} | 5565 | overview @r{top-level headlines only} |
| 5052 | content @r{all headlines} | 5566 | content @r{all headlines} |
| @@ -5056,20 +5570,34 @@ Then there are options for aligning tables upon visiting a file. This | |||
| 5056 | is useful in files containing narrowed table columns. The corresponding | 5570 | is useful in files containing narrowed table columns. The corresponding |
| 5057 | variable is @code{org-startup-align-all-tables}, with a default value | 5571 | variable is @code{org-startup-align-all-tables}, with a default value |
| 5058 | @code{nil}. | 5572 | @code{nil}. |
| 5573 | @cindex @code{align}, STARTUP keyword | ||
| 5574 | @cindex @code{noalign}, STARTUP keyword | ||
| 5059 | @example | 5575 | @example |
| 5060 | align @r{align all tables} | 5576 | align @r{align all tables} |
| 5061 | noalign @r{don't align tables on startup} | 5577 | noalign @r{don't align tables on startup} |
| 5062 | @end example | 5578 | @end example |
| 5063 | Logging when a TODO item is marked DONE (variable @code{org-log-done}) | 5579 | Logging TODO state changes and clock intervals (variable |
| 5064 | can be configured using these options. | 5580 | @code{org-log-done}) can be configured using these options. |
| 5581 | @cindex @code{logdone}, STARTUP keyword | ||
| 5582 | @cindex @code{nologging}, STARTUP keyword | ||
| 5583 | @cindex @code{lognotedone}, STARTUP keyword | ||
| 5584 | @cindex @code{lognoteclock-out}, STARTUP keyword | ||
| 5585 | @cindex @code{lognotestate}, STARTUP keyword | ||
| 5065 | @example | 5586 | @example |
| 5066 | logging @r{record a timestamp when an item is marked DONE} | 5587 | logging @r{record a timestamp when an item is marked DONE} |
| 5067 | nologging @r{don't record when items are marked DONE} | 5588 | nologging @r{don't record when items are marked DONE} |
| 5589 | lognotedone @r{record timestamp and a note when DONE} | ||
| 5590 | lognotestate @r{record timestamp, note when TODO state changes} | ||
| 5591 | lognoteclock-out @r{record timestamp and a note when clocking out} | ||
| 5068 | @end example | 5592 | @end example |
| 5069 | Here are the options for hiding leading stars in outline headings. The | 5593 | Here are the options for hiding leading stars in outline headings. The |
| 5070 | corresponding variables are @code{org-hide-leading-stars} and | 5594 | corresponding variables are @code{org-hide-leading-stars} and |
| 5071 | @code{org-odd-levels-only}, both with a default setting @code{nil} | 5595 | @code{org-odd-levels-only}, both with a default setting @code{nil} |
| 5072 | (meaning @code{showstars} and @code{oddeven}). | 5596 | (meaning @code{showstars} and @code{oddeven}). |
| 5597 | @cindex @code{hidestars}, STARTUP keyword | ||
| 5598 | @cindex @code{showstars}, STARTUP keyword | ||
| 5599 | @cindex @code{odd}, STARTUP keyword | ||
| 5600 | @cindex @code{even}, STARTUP keyword | ||
| 5073 | @example | 5601 | @example |
| 5074 | hidestars @r{make all but one of the stars starting a headline invisible.} | 5602 | hidestars @r{make all but one of the stars starting a headline invisible.} |
| 5075 | showstars @r{show all stars starting a headline} | 5603 | showstars @r{show all stars starting a headline} |
| @@ -5079,6 +5607,7 @@ oddeven @r{allow all outline levels} | |||
| 5079 | To turn on custom format overlays over time stamps (variables | 5607 | To turn on custom format overlays over time stamps (variables |
| 5080 | @code{org-put-time-stamp-overlays} and | 5608 | @code{org-put-time-stamp-overlays} and |
| 5081 | @code{org-time-stamp-overlay-formats}), use | 5609 | @code{org-time-stamp-overlay-formats}), use |
| 5610 | @cindex @code{customtime}, STARTUP keyword | ||
| 5082 | @example | 5611 | @example |
| 5083 | customtime @r{overlay custom time format} | 5612 | customtime @r{overlay custom time format} |
| 5084 | @end example | 5613 | @end example |
| @@ -5097,7 +5626,12 @@ These lines (several are allowed) specify link abbreviations. | |||
| 5097 | @item #+CATEGORY: | 5626 | @item #+CATEGORY: |
| 5098 | This line sets the category for the agenda file. The category applies | 5627 | This line sets the category for the agenda file. The category applies |
| 5099 | for all subsequent lines until the next @samp{#+CATEGORY} line, or the | 5628 | for all subsequent lines until the next @samp{#+CATEGORY} line, or the |
| 5100 | end of the file. | 5629 | end of the file. The first such line also applies to any entries before it. |
| 5630 | @item #+ARCHIVE: %s_done:: | ||
| 5631 | This line sets the archive location for the agenda file. It applies for | ||
| 5632 | all subsequent lines until the next @samp{#+CATEGORY} line, or the end | ||
| 5633 | of the file. The first such line also applies to any entries before it. | ||
| 5634 | The corresponding variable is @code{org-archive-location}. | ||
| 5101 | @item #+TBLFM: | 5635 | @item #+TBLFM: |
| 5102 | This line contains the formulas for the table directly above the line. | 5636 | This line contains the formulas for the table directly above the line. |
| 5103 | @item #+TITLE:, #+AUTHOR:, #+EMAIL:, #+LANGUAGE:, #+TEXT:, #+OPTIONS: | 5637 | @item #+TITLE:, #+AUTHOR:, #+EMAIL:, #+LANGUAGE:, #+TEXT:, #+OPTIONS: |
| @@ -5305,7 +5839,7 @@ with other code out there. | |||
| 5305 | @cindex @file{calc.el} | 5839 | @cindex @file{calc.el} |
| 5306 | @item @file{calc.el} by Dave Gillespie | 5840 | @item @file{calc.el} by Dave Gillespie |
| 5307 | Org-mode uses the calc package for implementing spreadsheet | 5841 | Org-mode uses the calc package for implementing spreadsheet |
| 5308 | functionality in its tables (@pxref{Table calculations}). Org-modes | 5842 | functionality in its tables (@pxref{The spreadsheet}). Org-mode |
| 5309 | checks for the availability of calc by looking for the function | 5843 | checks for the availability of calc by looking for the function |
| 5310 | @code{calc-eval} which should be autoloaded in your setup if calc has | 5844 | @code{calc-eval} which should be autoloaded in your setup if calc has |
| 5311 | been installed properly. As of Emacs 22, calc is part of the Emacs | 5845 | been installed properly. As of Emacs 22, calc is part of the Emacs |
| @@ -5314,7 +5848,7 @@ packages is using calc for embedded calculations. @xref{Embedded Mode, | |||
| 5314 | , Embedded Mode, calc, GNU Emacs Calc Manual}. | 5848 | , Embedded Mode, calc, GNU Emacs Calc Manual}. |
| 5315 | @cindex @file{constants.el} | 5849 | @cindex @file{constants.el} |
| 5316 | @item @file{constants.el} by Carsten Dominik | 5850 | @item @file{constants.el} by Carsten Dominik |
| 5317 | In a table formula (@pxref{Table calculations}), it is possible to use | 5851 | In a table formula (@pxref{The spreadsheet}), it is possible to use |
| 5318 | names for natural constants or units. Instead of defining your own | 5852 | names for natural constants or units. Instead of defining your own |
| 5319 | constants in the variable @code{org-table-formula-constants}, install | 5853 | constants in the variable @code{org-table-formula-constants}, install |
| 5320 | the @file{constants} package which defines a large number of constants | 5854 | the @file{constants} package which defines a large number of constants |
| @@ -5334,8 +5868,34 @@ Org mode cooperates with remember, see @ref{Remember}. | |||
| 5334 | @file{Remember.el} is not part of Emacs, find it on the web. | 5868 | @file{Remember.el} is not part of Emacs, find it on the web. |
| 5335 | @cindex @file{table.el} | 5869 | @cindex @file{table.el} |
| 5336 | @item @file{table.el} by Takaaki Ota | 5870 | @item @file{table.el} by Takaaki Ota |
| 5337 | Org mode cooperates with table.el, see @ref{table.el}. @file{table.el} | 5871 | @kindex C-c C-c |
| 5338 | is part of Emacs 22. | 5872 | @cindex table editor, @file{table.el} |
| 5873 | @cindex @file{table.el} | ||
| 5874 | |||
| 5875 | Complex ASCII tables with automatic line wrapping, column- and | ||
| 5876 | row-spanning, and alignment can be created using the Emacs table | ||
| 5877 | package by Takaaki Ota (@uref{http://sourceforge.net/projects/table}, | ||
| 5878 | and also part of Emacs 22). | ||
| 5879 | When @key{TAB} or @kbd{C-c C-c} is pressed in such a table, Org-mode | ||
| 5880 | will call @command{table-recognize-table} and move the cursor into the | ||
| 5881 | table. Inside a table, the keymap of Org-mode is inactive. In order | ||
| 5882 | to execute Org-mode-related commands, leave the table. | ||
| 5883 | |||
| 5884 | @table @kbd | ||
| 5885 | @kindex C-c C-c | ||
| 5886 | @item C-c C-c | ||
| 5887 | Recognize @file{table.el} table. Works when the cursor is in a | ||
| 5888 | table.el table. | ||
| 5889 | |||
| 5890 | @kindex C-c ~ | ||
| 5891 | @item C-c ~ | ||
| 5892 | Insert a table.el table. If there is already a table at point, this | ||
| 5893 | command converts it between the table.el format and the Org-mode | ||
| 5894 | format. See the documentation string of the command | ||
| 5895 | @code{org-convert-table} for the restrictions under which this is | ||
| 5896 | possible. | ||
| 5897 | @end table | ||
| 5898 | @file{table.el} is part of Emacs 22. | ||
| 5339 | @end table | 5899 | @end table |
| 5340 | 5900 | ||
| 5341 | @node Conflicts, , Cooperation, Interaction | 5901 | @node Conflicts, , Cooperation, Interaction |
| @@ -5405,14 +5965,11 @@ When the application called by @kbd{C-c C-o} to open a file link fails | |||
| 5405 | (for example because the application does not exist or refuses to open | 5965 | (for example because the application does not exist or refuses to open |
| 5406 | the file), it does so silently. No error message is displayed. | 5966 | the file), it does so silently. No error message is displayed. |
| 5407 | @item | 5967 | @item |
| 5408 | The remote-editing commands in the agenda buffer cannot be undone with | ||
| 5409 | @code{undo} called from within the agenda buffer. But you can go to | ||
| 5410 | the corresponding buffer (using @key{TAB} or @key{RET} and execute | ||
| 5411 | @code{undo} there. | ||
| 5412 | @item | ||
| 5413 | Recalculating a table line applies the formulas from left to right. | 5968 | Recalculating a table line applies the formulas from left to right. |
| 5414 | If a formula uses @emph{calculated} fields further down the row, | 5969 | If a formula uses @emph{calculated} fields further down the row, |
| 5415 | multiple recalculation may be needed to get all fields consistent. | 5970 | multiple recalculation may be needed to get all fields consistent. You |
| 5971 | may use the command @code{org-table-iterate} (@kbd{C-u C-c *}) to | ||
| 5972 | recalculate until convergence. | ||
| 5416 | @item | 5973 | @item |
| 5417 | A single letter cannot be made bold, for example @samp{*a*}. | 5974 | A single letter cannot be made bold, for example @samp{*a*}. |
| 5418 | @item | 5975 | @item |
| @@ -5424,16 +5981,19 @@ The exporters work well, but could be made more efficient. | |||
| 5424 | @appendix Extensions, Hooks and Hacking | 5981 | @appendix Extensions, Hooks and Hacking |
| 5425 | 5982 | ||
| 5426 | This appendix lists extensions for Org-mode written by other authors. | 5983 | This appendix lists extensions for Org-mode written by other authors. |
| 5427 | It also covers some aspects where users can easily extend the | 5984 | It also covers some aspects where users can extend the functionality of |
| 5428 | functionality of Org-mode. | 5985 | Org-mode. |
| 5429 | 5986 | ||
| 5430 | @menu | 5987 | @menu |
| 5431 | * Extensions:: Existing 3rd-part extensions | 5988 | * Extensions:: Existing 3rd-part extensions |
| 5989 | * Tables in arbitrary syntax:: Orgtbl for LaTeX and other programs | ||
| 5432 | * Dynamic blocks:: Automatically filled blocks | 5990 | * Dynamic blocks:: Automatically filled blocks |
| 5991 | * Special agenda views:: Customized views | ||
| 5433 | @end menu | 5992 | @end menu |
| 5434 | 5993 | ||
| 5435 | @node Extensions, Dynamic blocks, Extensions and Hacking, Extensions and Hacking | 5994 | @node Extensions, Tables in arbitrary syntax, Extensions and Hacking, Extensions and Hacking |
| 5436 | @section Third-party extensions for Org-mode | 5995 | @section Third-party extensions for Org-mode |
| 5996 | @cindex extension, third-party | ||
| 5437 | 5997 | ||
| 5438 | The following extensions for Org-mode have been written by other people: | 5998 | The following extensions for Org-mode have been written by other people: |
| 5439 | 5999 | ||
| @@ -5441,7 +6001,7 @@ The following extensions for Org-mode have been written by other people: | |||
| 5441 | @cindex @file{org-publish.el} | 6001 | @cindex @file{org-publish.el} |
| 5442 | @item @file{org-publish.el} by David O'Toole | 6002 | @item @file{org-publish.el} by David O'Toole |
| 5443 | This package provides facilities for publishing related sets of Org-mode | 6003 | This package provides facilities for publishing related sets of Org-mode |
| 5444 | files together with linked files like images as a webpages. It is | 6004 | files together with linked files like images as webpages. It is |
| 5445 | highly configurable and can be used for other publishing purposes as | 6005 | highly configurable and can be used for other publishing purposes as |
| 5446 | well. As of Org-mode version 4.30, @file{org-publish.el} is part of the | 6006 | well. As of Org-mode version 4.30, @file{org-publish.el} is part of the |
| 5447 | Org-mode distribution. It is not yet part of Emacs, however, a delay | 6007 | Org-mode distribution. It is not yet part of Emacs, however, a delay |
| @@ -5463,19 +6023,293 @@ caused by the preparations for the 22.1 release. In the mean time, | |||
| 5463 | @item @file{org-blog.el} by David O'Toole | 6023 | @item @file{org-blog.el} by David O'Toole |
| 5464 | A blogging plug-in for @file{org-publish.el}.@* | 6024 | A blogging plug-in for @file{org-publish.el}.@* |
| 5465 | @url{http://dto.freeshell.org/notebook/OrgMode.html}. | 6025 | @url{http://dto.freeshell.org/notebook/OrgMode.html}. |
| 5466 | @cindex @file{org-blogging.el} | 6026 | @cindex @file{blorg.el} |
| 5467 | @item @file{org-blogging.el} by Bastien Guerry | 6027 | @item @file{blorg.el} by Bastien Guerry |
| 5468 | Publish Org-mode files as | 6028 | Publish Org-mode files as |
| 5469 | blogs. @url{http://www.cognition.ens.fr/~guerry/org-blogging.html}. | 6029 | blogs. @url{http://www.cognition.ens.fr/~guerry/blorg.html}. |
| 6030 | @cindex @file{org2rem.el} | ||
| 6031 | @item @file{org2rem.el} by Bastien Guerry | ||
| 6032 | Translates Org-mode files into something readable by | ||
| 6033 | Remind. @url{http://www.cognition.ens.fr/~guerry/u/org2rem.el}. | ||
| 5470 | @end table | 6034 | @end table |
| 5471 | 6035 | ||
| 5472 | @node Dynamic blocks, , Extensions, Extensions and Hacking | 6036 | @page |
| 6037 | |||
| 6038 | @node Tables in arbitrary syntax, Dynamic blocks, Extensions, Extensions and Hacking | ||
| 6039 | @section Tables in arbitrary syntax | ||
| 6040 | @cindex tables, in other modes | ||
| 6041 | @cindex orgtbl-mode | ||
| 6042 | |||
| 6043 | Since Orgtbl-mode can be used as a minor mode in arbitrary buffers, a | ||
| 6044 | frequent feature request has been to make it work with native tables in | ||
| 6045 | specific languages, for example LaTeX. However, this is extremely hard | ||
| 6046 | to do in a general way, would lead to a customization nightmare, and | ||
| 6047 | would take away much of the simplicity of the Orgtbl-mode table editor. | ||
| 6048 | |||
| 6049 | This appendix describes a different approach. We keep the Orgtbl-mode | ||
| 6050 | table in its native format (the @i{source table}), and use a custom | ||
| 6051 | function to @i{translate} the table to the correct syntax, and to | ||
| 6052 | @i{install} it in the right location (the @i{target table}). This puts | ||
| 6053 | the burden of writing conversion functions on the user, but it allows | ||
| 6054 | for a very flexible system. | ||
| 6055 | |||
| 6056 | @menu | ||
| 6057 | * Radio tables:: Sending and receiving | ||
| 6058 | * A LaTeX example:: Step by step, almost a tutorial | ||
| 6059 | * Translator functions:: Copy and modify | ||
| 6060 | @end menu | ||
| 6061 | |||
| 6062 | @node Radio tables, A LaTeX example, Tables in arbitrary syntax, Tables in arbitrary syntax | ||
| 6063 | @subsection Radio tables | ||
| 6064 | @cindex radio tables | ||
| 6065 | |||
| 6066 | To define the location of the target table, you first need to create two | ||
| 6067 | lines that are comments in the current mode, but contain magic words for | ||
| 6068 | Orgtbl-mode to find. Orgtbl-mode will insert the translated table | ||
| 6069 | between these lines, replacing whatever was there before. For example: | ||
| 6070 | |||
| 6071 | @example | ||
| 6072 | /* BEGIN RECEIVE ORGTBL table_name */ | ||
| 6073 | /* END RECEIVE ORGTBL table_name */ | ||
| 6074 | @end example | ||
| 6075 | |||
| 6076 | @noindent | ||
| 6077 | Just above the source table, we put a special line that tells | ||
| 6078 | Orgtbl-mode how to translate this table and where to install it. For | ||
| 6079 | example: | ||
| 6080 | @example | ||
| 6081 | #+ORGTBL: SEND table_name translation_function arguments.... | ||
| 6082 | @end example | ||
| 6083 | |||
| 6084 | @noindent | ||
| 6085 | @code{table_name} is the reference name for the table that is also used | ||
| 6086 | in the receiver lines. @code{translation_function} is the Lisp function | ||
| 6087 | that does the translation. Furthermore, the line can contain a list of | ||
| 6088 | arguments (alternating key and value) at the end. The arguments will be | ||
| 6089 | passed as a property list to the translation function for | ||
| 6090 | interpretation. A few standard parameters are already recognized and | ||
| 6091 | acted upon before the translation function is called: | ||
| 6092 | |||
| 6093 | @table @code | ||
| 6094 | @item :skip N | ||
| 6095 | Skip the first N lines of the table. Hlines do count! | ||
| 6096 | @item :skipcols (n1 n2 ...) | ||
| 6097 | List of columns that should be skipped. If the table has a column with | ||
| 6098 | calculation marks, that column is automatically discarded as well. | ||
| 6099 | Please note that the translator function sees the table @emph{after} the | ||
| 6100 | removal of these columns, the function never knows that there have been | ||
| 6101 | additional columns. | ||
| 6102 | @end table | ||
| 6103 | |||
| 6104 | @noindent | ||
| 6105 | The one problem remaining is how to keep the source table in the buffer | ||
| 6106 | without disturbing the normal workings of the file, for example during | ||
| 6107 | compilation of a C file or processing of a LaTeX file. There are a | ||
| 6108 | number of different solutions: | ||
| 6109 | |||
| 6110 | @itemize @bullet | ||
| 6111 | @item | ||
| 6112 | The table could be placed in a block comment if that is supported by the | ||
| 6113 | language. For example, in C-mode you could wrap the table between | ||
| 6114 | @samp{/*} and @samp{*/} lines. | ||
| 6115 | @item | ||
| 6116 | Sometimes it is possible to put the table after some kind of @i{END} | ||
| 6117 | statement, for example @samp{\bye} in TeX and @samp{\end@{document@}} | ||
| 6118 | in LaTeX. | ||
| 6119 | @item | ||
| 6120 | You can just comment the table line by line whenever you want to process | ||
| 6121 | the file, and uncomment it whenever you need to edit the table. This | ||
| 6122 | only sounds tedious - the command @kbd{M-x orgtbl-toggle-comment} does | ||
| 6123 | make this comment-toggling very easy, in particular if you bind it to a | ||
| 6124 | key. | ||
| 6125 | @end itemize | ||
| 6126 | |||
| 6127 | @node A LaTeX example, Translator functions, Radio tables, Tables in arbitrary syntax | ||
| 6128 | @subsection A LaTeX example | ||
| 6129 | @cindex LaTeX, and orgtbl-mode | ||
| 6130 | |||
| 6131 | The best way to wrap the source table in LaTeX is to use the | ||
| 6132 | @code{comment} environment provided by @file{comment.sty}. It has to be | ||
| 6133 | activated by placing @code{\usepackage@{comment@}} into the document | ||
| 6134 | header. Orgtbl-mode can insert a radio table skeleton@footnote{By | ||
| 6135 | default this works only for LaTeX, HTML, and TeXInfo. Configure the | ||
| 6136 | variable @code{orgtbl-radio-tables} to install templates for other | ||
| 6137 | modes.} with the command @kbd{M-x orgtbl-insert-radio-table}. You will | ||
| 6138 | be prompted for a table name, lets say we use @samp{salesfigures}. You | ||
| 6139 | will then get the following template: | ||
| 6140 | |||
| 6141 | @example | ||
| 6142 | % BEGIN RECEIVE ORGTBL salesfigures | ||
| 6143 | % END RECEIVE ORGTBL salesfigures | ||
| 6144 | \begin@{comment@} | ||
| 6145 | #+ORGTBL: SEND salesfigures orgtbl-to-latex | ||
| 6146 | | | | | ||
| 6147 | \end@{comment@} | ||
| 6148 | @end example | ||
| 6149 | |||
| 6150 | @noindent | ||
| 6151 | The @code{#+ORGTBL: SEND} line tells orgtbl-mode to use the function | ||
| 6152 | @code{orgtbl-to-latex} to convert the table into LaTeX and to put it | ||
| 6153 | into the receiver location with name @code{salesfigures}. You may now | ||
| 6154 | fill in the table, feel free to use the spreadsheet features@footnote{If | ||
| 6155 | the @samp{#+TBLFM} line contains an odd number of dollar characters, | ||
| 6156 | this may cause problems with font-lock in latex-mode. As shown in the | ||
| 6157 | example you can fix this by adding an extra line inside the | ||
| 6158 | @code{comment} environment that is used to balance the dollar | ||
| 6159 | expressions. If you are using AUCTeX with the font-latex library, a | ||
| 6160 | much better solution is to add the @code{comment} environment to the | ||
| 6161 | variable @code{LaTeX-verbatim-environments}.}: | ||
| 6162 | |||
| 6163 | @example | ||
| 6164 | % BEGIN RECEIVE ORGTBL salesfigures | ||
| 6165 | % END RECEIVE ORGTBL salesfigures | ||
| 6166 | \begin@{comment@} | ||
| 6167 | #+ORGTBL: SEND salesfigures orgtbl-to-latex | ||
| 6168 | | Month | Days | Nr sold | per day | | ||
| 6169 | |-------+------+---------+---------| | ||
| 6170 | | Jan | 23 | 55 | 2.4 | | ||
| 6171 | | Feb | 21 | 16 | 0.8 | | ||
| 6172 | | March | 22 | 278 | 12.6 | | ||
| 6173 | #+TBLFM: $4=$3/$2;%.1f | ||
| 6174 | % $ (optional extra dollar to keep font-lock happy, see footnote) | ||
| 6175 | \end@{comment@} | ||
| 6176 | @end example | ||
| 6177 | |||
| 6178 | @noindent | ||
| 6179 | When you are done, press @kbd{C-c C-c} in the table to get the converted | ||
| 6180 | table inserted between the two marker lines. | ||
| 6181 | |||
| 6182 | Now lets assume you want to make the table header by hand, because you | ||
| 6183 | want to control how columns are aligned etc. In this case we make sure | ||
| 6184 | that the table translator does skip the first 2 lines of the source | ||
| 6185 | table, and tell the command to work as a @i{splice}, i.e. to not produce | ||
| 6186 | header and footer commands of the target table: | ||
| 6187 | |||
| 6188 | @example | ||
| 6189 | \begin@{tabular@}@{lrrr@} | ||
| 6190 | Month & \multicolumn@{1@}@{c@}@{Days@} & Nr.\ sold & per day\\ | ||
| 6191 | % BEGIN RECEIVE ORGTBL salesfigures | ||
| 6192 | % END RECEIVE ORGTBL salesfigures | ||
| 6193 | \end@{tabular@} | ||
| 6194 | % | ||
| 6195 | \begin@{comment@} | ||
| 6196 | #+ORGTBL: SEND salesfigures orgtbl-to-latex :splice t :skip 2 | ||
| 6197 | | Month | Days | Nr sold | per day | | ||
| 6198 | |-------+------+---------+---------| | ||
| 6199 | | Jan | 23 | 55 | 2.4 | | ||
| 6200 | | Feb | 21 | 16 | 0.8 | | ||
| 6201 | | March | 22 | 278 | 12.6 | | ||
| 6202 | #+TBLFM: $4=$3/$2;%.1f | ||
| 6203 | \end@{comment@} | ||
| 6204 | @end example | ||
| 6205 | |||
| 6206 | The LaTeX translator function @code{orgtbl-to-latex} is already part of | ||
| 6207 | Orgtbl-mode. It uses a @code{tabular} environment to typeset the table | ||
| 6208 | and marks horizontal lines with @code{\hline}. Furthermore, it | ||
| 6209 | interprets the following parameters: | ||
| 6210 | |||
| 6211 | @table @code | ||
| 6212 | @item :splice nil/t | ||
| 6213 | When set to t, return only table body lines, don't wrap them into a | ||
| 6214 | tabular environment. Default is nil. | ||
| 6215 | |||
| 6216 | @item :fmt fmt | ||
| 6217 | A format to be used to wrap each field, should contain @code{%s} for the | ||
| 6218 | original field value. For example, to wrap each field value in dollars, | ||
| 6219 | you could use @code{:fmt "$%s$"}. This may also be a property list with | ||
| 6220 | column numbers and formats. for example @code{:fmt (2 "$%s$" 4 "%s\\%%")}. | ||
| 6221 | |||
| 6222 | @item :efmt efmt | ||
| 6223 | Use this format to print numbers with exponentials. The format should | ||
| 6224 | have @code{%s} twice for inserting mantissa and exponent, for example | ||
| 6225 | @code{"%s\\times10^@{%s@}"}. The default is @code{"%s\\,(%s)"}. This | ||
| 6226 | may also be a property list with column numbers and formats, for example | ||
| 6227 | @code{:efmt (2 "$%s\\times10^@{%s@}$" 4 "$%s\\cdot10^@{%s@}$")}. After | ||
| 6228 | @code{efmt} has been applied to a value, @code{fmt} will also be | ||
| 6229 | applied. | ||
| 6230 | @end table | ||
| 6231 | |||
| 6232 | @node Translator functions, , A LaTeX example, Tables in arbitrary syntax | ||
| 6233 | @subsection Translator functions | ||
| 6234 | @cindex HTML, and orgtbl-mode | ||
| 6235 | @cindex translator function | ||
| 6236 | |||
| 6237 | Orgtbl-mode has several translator functions built-in: | ||
| 6238 | @code{orgtbl-to-latex}, @code{orgtbl-to-html}, and | ||
| 6239 | @code{orgtbl-to-texinfo}. Except for @code{orgtbl-to-html}@footnote{The | ||
| 6240 | HTML translator uses the same code that produces tables during HTML | ||
| 6241 | export.}, these all use a generic translator, @code{orgtbl-to-generic}. | ||
| 6242 | For example, @code{orgtbl-to-latex} itself is a very short function that | ||
| 6243 | computes the column definitions for the @code{tabular} environment, | ||
| 6244 | defines a few field and line separators and then hands over to the | ||
| 6245 | generic translator. Here is the entire code: | ||
| 6246 | |||
| 6247 | @lisp | ||
| 6248 | @group | ||
| 6249 | (defun orgtbl-to-latex (table params) | ||
| 6250 | "Convert the orgtbl-mode TABLE to LaTeX." | ||
| 6251 | (let* ((alignment (mapconcat (lambda (x) (if x "r" "l")) | ||
| 6252 | org-table-last-alignment "")) | ||
| 6253 | (params2 | ||
| 6254 | (list | ||
| 6255 | :tstart (concat "\\begin@{tabular@}@{" alignment "@}") | ||
| 6256 | :tend "\\end@{tabular@}" | ||
| 6257 | :lstart "" :lend " \\\\" :sep " & " | ||
| 6258 | :efmt "%s\\,(%s)" :hline "\\hline"))) | ||
| 6259 | (orgtbl-to-generic table (org-combine-plists params2 params)))) | ||
| 6260 | @end group | ||
| 6261 | @end lisp | ||
| 6262 | |||
| 6263 | As you can see, the properties passed into the function (variable | ||
| 6264 | @var{PARAMS}) are combined with the ones newly defined in the function | ||
| 6265 | (variable @var{PARAMS2}). The ones passed into the function (i.e. the | ||
| 6266 | ones set by the @samp{ORGTBL SEND} line) take precedence. So if you | ||
| 6267 | would like to use the LaTeX translator, but wanted the line endings to | ||
| 6268 | be @samp{\\[2mm]} instead of the default @samp{\\}, you could just | ||
| 6269 | overrule the default with | ||
| 6270 | |||
| 6271 | @example | ||
| 6272 | #+ORGTBL: SEND test orgtbl-to-latex :lend " \\\\[2mm]" | ||
| 6273 | @end example | ||
| 6274 | |||
| 6275 | For a new language, you can either write your own converter function in | ||
| 6276 | analogy with the LaTeX translator, or you can use the generic function | ||
| 6277 | directly. For example, if you have a language where a table is started | ||
| 6278 | with @samp{!BTBL!}, ended with @samp{!ETBL!}, and where table lines are | ||
| 6279 | started with @samp{!BL!}, ended with @samp{!EL!} and where the field | ||
| 6280 | separator is a TAB, you could call the generic translator like this (on | ||
| 6281 | a single line!): | ||
| 6282 | |||
| 6283 | @example | ||
| 6284 | #+ORGTBL: SEND test orgtbl-to-generic :tstart "!BTBL!" :tend "!ETBL!" | ||
| 6285 | :lstart "!BL! " :lend " !EL!" :sep "\t" | ||
| 6286 | @end example | ||
| 6287 | |||
| 6288 | @noindent | ||
| 6289 | Please check the documentation string of the function | ||
| 6290 | @code{orgtbl-to-generic} for a full list of parameters understood by | ||
| 6291 | that function and remember that you can pass each of them into | ||
| 6292 | @code{orgtbl-to-latex}, @code{orgtbl-to-texinfo}, and any other function | ||
| 6293 | using the generic function. | ||
| 6294 | |||
| 6295 | Of course you can also write a completely new function doing complicated | ||
| 6296 | things the generic translator cannot do. A translator function takes | ||
| 6297 | two arguments. The first argument is the table, a list of lines, each | ||
| 6298 | line either the symbol @code{hline} or a list of fields. The second | ||
| 6299 | argument is the property list containing all parameters specified in the | ||
| 6300 | @samp{#+ORGTBL: SEND} line. The function must return a single string | ||
| 6301 | containing the formatted table. If you write a generally useful | ||
| 6302 | translator, please post it on @code{emacs-orgmode@@gnu.org} so that | ||
| 6303 | others can benefit from your work. | ||
| 6304 | |||
| 6305 | @node Dynamic blocks, Special agenda views, Tables in arbitrary syntax, Extensions and Hacking | ||
| 5473 | @section Dynamic blocks | 6306 | @section Dynamic blocks |
| 6307 | @cindex dynamic blocks | ||
| 5474 | 6308 | ||
| 5475 | Org-mode documents can contain @emph{dynamic blocks}. These are | 6309 | Org-mode documents can contain @emph{dynamic blocks}. These are |
| 5476 | specially marked regions that are updated by some user-written | 6310 | specially marked regions that are updated by some user-written function. |
| 5477 | function. A good example for such a block is the clock table inserted | 6311 | A good example for such a block is the clock table inserted by the |
| 5478 | by the command @kbd{C-c C-x C-r} (@pxref{Clocking work time}). | 6312 | command @kbd{C-c C-x C-r} (@pxref{Clocking work time}). |
| 5479 | 6313 | ||
| 5480 | Dynamic block are enclosed by a BEGIN-END structure that assigns a name | 6314 | Dynamic block are enclosed by a BEGIN-END structure that assigns a name |
| 5481 | to the block and can also specify parameters for the function producing | 6315 | to the block and can also specify parameters for the function producing |
| @@ -5528,6 +6362,60 @@ you could add the function @code{org-update-all-dblocks} to a hook, for | |||
| 5528 | example @code{before-save-hook}. @code{org-update-all-dblocks} is | 6362 | example @code{before-save-hook}. @code{org-update-all-dblocks} is |
| 5529 | written in a way that is does nothing in buffers that are not in Org-mode. | 6363 | written in a way that is does nothing in buffers that are not in Org-mode. |
| 5530 | 6364 | ||
| 6365 | @node Special agenda views, , Dynamic blocks, Extensions and Hacking | ||
| 6366 | @section Special Agenda Views | ||
| 6367 | @cindex agenda views, user-defined | ||
| 6368 | |||
| 6369 | Org-mode provides a special hook that can be used to narrow down the | ||
| 6370 | selection made by any of the agenda views. You may specify a function | ||
| 6371 | that is used at each match to verify if the match should indeed be part | ||
| 6372 | of the agenda view, and if not, how much should be skipped. | ||
| 6373 | |||
| 6374 | Let's say you want to produce a list of projects that contain a WAITING | ||
| 6375 | tag anywhere in the project tree. Let's further assume that you have | ||
| 6376 | marked all tree headings that define a project with the todo keyword | ||
| 6377 | PROJECT. In this case you would run a todo search for the keyword | ||
| 6378 | PROJECT, but skip the match unless there is a WAITING tag anywhere in | ||
| 6379 | the subtree belonging to the project line. | ||
| 6380 | |||
| 6381 | To achieve this, you must write a function that searches the subtree for | ||
| 6382 | the tag. If the tag is found, the function must return @code{nil} to | ||
| 6383 | indicate that this match should not be skipped. If there is no such | ||
| 6384 | tag, return the location of the end of the subtree, to indicate that | ||
| 6385 | search should continue from there. | ||
| 6386 | |||
| 6387 | @lisp | ||
| 6388 | (defun my-skip-unless-waiting () | ||
| 6389 | "Skip trees that are not waiting" | ||
| 6390 | (let ((subtree-end (save-excursion (org-end-of-subtree t)))) | ||
| 6391 | (if (re-search-forward ":WAITING:" subtree-end t) | ||
| 6392 | nil ; tag found, do not skip | ||
| 6393 | subtree-end))) ; tag not found, continue after end of subtree | ||
| 6394 | @end lisp | ||
| 6395 | |||
| 6396 | Furthermore you must write a command that uses @code{let} to temporarily | ||
| 6397 | put this function into the variable @code{org-agenda-skip-function}, | ||
| 6398 | sets the header string for the agenda buffer, and calls the todo-list | ||
| 6399 | generator while asking for the specific TODO keyword PROJECT. The | ||
| 6400 | function must also accept one argument MATCH, but it can choose to | ||
| 6401 | ignore it@footnote{MATCH must be present in case you want to define a | ||
| 6402 | custom command for producing this special list. Custom commands always | ||
| 6403 | supply the MATCH argument, but it can be empty if you do not specify it | ||
| 6404 | while defining the command(@pxref{Custom agenda | ||
| 6405 | views}).} (as we do in the example below). Here is the example: | ||
| 6406 | |||
| 6407 | @lisp | ||
| 6408 | (defun my-org-waiting-projects (&optional match) | ||
| 6409 | "Produce a list of projects that contain a WAITING tag. | ||
| 6410 | MATCH is being ignored." | ||
| 6411 | (interactive) | ||
| 6412 | (let ((org-agenda-skip-function 'my-skip-unless-waiting) | ||
| 6413 | (org-agenda-overriding-header "Projects waiting for something: ")) | ||
| 6414 | ;; make the list | ||
| 6415 | (org-todo-list "PROJECT"))) | ||
| 6416 | @end lisp | ||
| 6417 | |||
| 6418 | |||
| 5531 | @node History and Acknowledgments, Index, Extensions and Hacking, Top | 6419 | @node History and Acknowledgments, Index, Extensions and Hacking, Top |
| 5532 | @appendix History and Acknowledgments | 6420 | @appendix History and Acknowledgments |
| 5533 | @cindex acknowledgments | 6421 | @cindex acknowledgments |
| @@ -5535,25 +6423,29 @@ written in a way that is does nothing in buffers that are not in Org-mode. | |||
| 5535 | @cindex thanks | 6423 | @cindex thanks |
| 5536 | 6424 | ||
| 5537 | Org-mode was borne in 2003, out of frustration over the user interface | 6425 | Org-mode was borne in 2003, out of frustration over the user interface |
| 5538 | of the Emacs outline-mode. All I wanted was to make working with an | 6426 | of the Emacs outline-mode. I was trying to organize my notes and |
| 5539 | outline tree possible without having to remember more than 10 commands | 6427 | projects, and using Emacs seemed to be the natural way to go. However, |
| 5540 | just for hiding and unhiding parts of the outline tree, and to allow to | 6428 | having to remember eleven different commands with two or three keys per |
| 5541 | restructure a tree easily. Visibility cycling and structure editing | 6429 | command, only to hide and unhide parts of the outline tree, that seemed |
| 5542 | were originally implemented in the package @file{outline-magic.el}, but | 6430 | entirely unacceptable to me. Also, when using outlines to take notes, I |
| 5543 | quickly moved to the more general @file{org.el}. TODO entries, basic | 6431 | constantly want to restructure the tree, organizing it parallel to my |
| 5544 | time stamps, and table support were added next, and highlight the two | 6432 | thoughts and plans. @emph{Visibility cycling} and @emph{structure |
| 5545 | main goals that Org-mode still has today: To create a new, | 6433 | editing} were originally implemented in the package |
| 5546 | outline-based, plain text mode with innovative and intuitive editing | 6434 | @file{outline-magic.el}, but quickly moved to the more general |
| 5547 | features, and to incorporate project planning functionality directly | 6435 | @file{org.el}. As this environment became comfortable for project |
| 5548 | into a notes file. | 6436 | planning, the next step was adding @emph{TODO entries}, basic @emph{time |
| 6437 | stamps}, and @emph{table support}. These areas highlight the two main | ||
| 6438 | goals that Org-mode still has today: To create a new, outline-based, | ||
| 6439 | plain text mode with innovative and intuitive editing features, and to | ||
| 6440 | incorporate project planning functionality directly into a notes file. | ||
| 5549 | 6441 | ||
| 5550 | Since the first release, hundreds of emails to me or on | 6442 | Since the first release, hundreds of emails to me or on |
| 5551 | @code{emacs-orgmode@@gnu.org} have provided a constant stream of bug | 6443 | @code{emacs-orgmode@@gnu.org} have provided a constant stream of bug |
| 5552 | reports, feedback, new ideas, and sometimes even patches and add-on | 6444 | reports, feedback, new ideas, and sometimes patches and add-on code. |
| 5553 | code. Many thanks to everyone who has helped to improve this package. | 6445 | Many thanks to everyone who has helped to improve this package. I am |
| 5554 | I am trying to keep here a list of the people who had significant | 6446 | trying to keep here a list of the people who had significant influence |
| 5555 | influence in shaping one or more aspects of Org-mode. The list may not | 6447 | in shaping one or more aspects of Org-mode. The list may not be |
| 5556 | be complete, if I have forgotten someone, please accept my apologies and | 6448 | complete, if I have forgotten someone, please accept my apologies and |
| 5557 | let me know. | 6449 | let me know. |
| 5558 | 6450 | ||
| 5559 | @itemize @bullet | 6451 | @itemize @bullet |
| @@ -5578,19 +6470,27 @@ calculations and improved XEmacs compatibility, in particular by porting | |||
| 5578 | @item | 6470 | @item |
| 5579 | @i{Eddward DeVilla} proposed and tested checkbox statistics. | 6471 | @i{Eddward DeVilla} proposed and tested checkbox statistics. |
| 5580 | @item | 6472 | @item |
| 5581 | @i{Kees Dullemond} inspired the use of narrowed tabled columns. | 6473 | @i{Kees Dullemond} used to edit projects lists directly in HTML and so |
| 6474 | inspired some of the early development, including HTML export. He also | ||
| 6475 | asked for a way to narrow wide table columns. | ||
| 5582 | @item | 6476 | @item |
| 5583 | @i{Christian Egli} converted the documentation into TeXInfo format, | 6477 | @i{Christian Egli} converted the documentation into TeXInfo format, |
| 5584 | patched CSS formatting into the HTML exporter, and inspired the agenda. | 6478 | patched CSS formatting into the HTML exporter, and inspired the agenda. |
| 5585 | @item | 6479 | @item |
| 5586 | @i{Nic Ferrier} contributed mailcap and XOXO support. | 6480 | @i{Nic Ferrier} contributed mailcap and XOXO support. |
| 5587 | @item | 6481 | @item |
| 6482 | @i{John Foerch} figured out how to make incremental search show context | ||
| 6483 | around a match in a hidden outline tree. | ||
| 6484 | @item | ||
| 5588 | @i{Niels Giessen} had the idea to automatically archive DONE trees. | 6485 | @i{Niels Giessen} had the idea to automatically archive DONE trees. |
| 5589 | @item | 6486 | @item |
| 5590 | @i{Bastien Guerry} provided extensive feedback. | 6487 | @i{Bastien Guerry} provided extensive feedback and some patches, and |
| 6488 | translated David O'Toole's tutorial into French. | ||
| 5591 | @item | 6489 | @item |
| 5592 | @i{Kai Grossjohann} pointed out key-binding conflicts with other packages. | 6490 | @i{Kai Grossjohann} pointed out key-binding conflicts with other packages. |
| 5593 | @item | 6491 | @item |
| 6492 | @i{Shidai Liu} (``Leo'') provided extensive feedback and some patches. | ||
| 6493 | @item | ||
| 5594 | @i{Leon Liu} asked for embedded LaTeX and tested it. | 6494 | @i{Leon Liu} asked for embedded LaTeX and tested it. |
| 5595 | @item | 6495 | @item |
| 5596 | @i{Stefan Monnier} provided a patch to keep the Emacs-Lisp compiler | 6496 | @i{Stefan Monnier} provided a patch to keep the Emacs-Lisp compiler |
| @@ -5601,6 +6501,9 @@ happy. | |||
| 5601 | @i{Tim O'Callaghan} suggested in-file links, search options for general | 6501 | @i{Tim O'Callaghan} suggested in-file links, search options for general |
| 5602 | file links, and TAGS. | 6502 | file links, and TAGS. |
| 5603 | @item | 6503 | @item |
| 6504 | @i{Takeshi Okano} translated the manual and David O'Toole's tutorial | ||
| 6505 | into Japanese. | ||
| 6506 | @item | ||
| 5604 | @i{Oliver Oppitz} suggested multi-state TODO items. | 6507 | @i{Oliver Oppitz} suggested multi-state TODO items. |
| 5605 | @item | 6508 | @item |
| 5606 | @i{Scott Otterson} sparked the introduction of descriptive text for | 6509 | @i{Scott Otterson} sparked the introduction of descriptive text for |