Release 4.21
[org-mode.git] / org.texi
blob70ceebcea98bca61c56e9651923719fe8fc6c05e
1 \input texinfo
2 @c %**start of header
3 @setfilename org
4 @c @setfilename ../info/org
5 @settitle Org Mode Manual
7 @set VERSION 4.21
8 @set DATE April 2006
10 @dircategory Emacs
11 @direntry
12 * Org Mode: (org).      outline-based notes management and organizer
13 @end direntry
15 @c Version and Contact Info
16 @set MAINTAINERSITE @uref{http://www.astro.uva.nl/~dominik/Tools/org/,maintainers webpage}
17 @set MAINTAINER Carsten Dominik
18 @set MAINTAINEREMAIL @email{dominik@@science.uva.nl}
19 @set MAINTAINERCONTACT @uref{mailto:dominik@@science.uva.nl,contact the maintainer}
20 @c %**end of header
21 @finalout
23 @c Macro definitions
25 @c FIXME: does not look good in html
26 @c Subheadings inside a table.  Need a difference between info and the rest.
27 @macro tsubheading{text}
28 @ifinfo
29 @subsubheading \text\
30 @end ifinfo
31 @ifnotinfo
32 @item @b{\text\}
33 @end ifnotinfo
34 @end macro
36 @copying
37 This manual is for Org-mode (version @value{VERSION}).
39 Copyright @copyright{} 2004, 2005, 2006 Free Software Foundation
41 @quotation
42 Permission is granted to copy, distribute and/or modify this document
43 under the terms of the GNU Free Documentation License, Version 1.1 or
44 any later version published by the Free Software Foundation; with no
45 Invariant Sections, with the Front-Cover texts being ``A GNU Manual,''
46 and with the Back-Cover Texts as in (a) below.  A copy of the
47 license is included in the section entitled ``GNU Free Documentation
48 License.''
50 (a) The FSF's Back-Cover Text is: ``You have freedom to copy and modify
51 this GNU Manual, like GNU software.  Copies published by the Free
52 Software Foundation raise funds for GNU development.''
53 @end quotation
54 @end copying
56 @titlepage
57 @title Org Mode Manual
59 @subtitle Release @value{VERSION}
60 @author by Carsten Dominik
62 @c The following two commands start the copyright page.
63 @page
64 @vskip 0pt plus 1filll
65 @insertcopying
66 @end titlepage
68 @c Output the table of contents at the beginning.
69 @contents
71 @ifnottex
72 @node Top, Introduction, (dir), (dir)
73 @top Org Mode Manual
75 @insertcopying
76 @end ifnottex
78 @menu
79 * Introduction::                Getting started
80 * Document Structure::          A tree works like your brain
81 * Tables::                      Pure magic for quick formatting
82 * Hyperlinks::                  Notes in context
83 * TODO items::                  Every tree branch can be a TODO item
84 * Timestamps::                  Assign date and time to items
85 * Tags::                        Tagging headlines and matching sets of tags
86 * Agenda Views::                Collecting information into views
87 * Exporting::                   Sharing and publishing of notes
88 * Miscellaneous::               All the rest which did not fit elsewhere
89 * Index::                       The fast road to specific information
90 * Key Index::                   Key bindings and where they are described
92 @detailmenu
93  --- The Detailed Node Listing ---
95 Introduction
97 * Summary::                     Brief summary of what Org-mode does
98 * Installation and activation::  How to install Org-mode
99 * Feedback::                    Bug reports, ideas, patches etc.
101 Document Structure
103 * Outlines::                    Org-mode is based on outline-mode
104 * Headlines::                   How to typeset org-tree headlines
105 * Visibility cycling::          Show and hide, much simplified
106 * Motion::                      Jumping to other headlines
107 * Structure editing::           Changing sequence and level of headlines
108 * Archiving::                   Move done task trees to a different place
109 * Sparse trees::                Matches embedded in context
110 * Plain Lists::                 Editing hand-formatted lists
112 Tables
114 * Built-in table editor::       Simple tables
115 * Narrow columns::              Stop wasting space in tables   
116 * Table calculations::          Compute a field from other fields
117 * orgtbl-mode::                 The table editor as minor mode
118 * table.el::                    Complex tables
120 Calculations in tables
122 * Formula syntax::              How to write a formula
123 * Column formulas::             Formulas valid for all fields in a column
124 * Advanced features::           Field names, parameters and automatic recalc
125 * Named-field formulas::        Formulas valid in single fields
126 * Editing/debugging formulas::  Changing a stored formula
127 * Appetizer::                   Taste the power of calc
129 Hyperlinks
131 * Link format::                 How links in Org-mode are formatted
132 * Internal links::              Links to other places in the current file
133 * External links::              URL-like links to the world
134 * Managing links::              Creating, inserting and following
135 * Search Options::              Linking to a specific location
136 * Remember::                    Org-trees store quick notes
138 Internal links
140 * Radio targets::               Make targets trigger links in plain text.
141 * CamelCase links::             Activating CamelCase words as links
143 TODO items
145 * TODO basics::                 Marking and displaying TODO entries
146 * Progress logging::            Document your productivity
147 * TODO extensions::             Workflow and assignments
148 * Priorities::                  Some things are more important than others
150 Extended use of TODO keywords
152 * Workflow states::             From TODO to DONE in steps
153 * TODO types::                  I do this, Fred the rest
154 * Per file keywords::           Different files, different requirements
156 Timestamps
158 * Time stamps::                 Assigning a time to a tree entry
159 * Creating timestamps::         Commands which insert timestamps
161 Tags
163 * Tag inheritance::             Tags use the tree structure of the outline
164 * Setting tags::                How to assign tags to a headline
165 * Tag searches::                Searching for combinations of tags
167 Agenda Views
169 * Agenda files::                Files being searched for agenda information
170 * Agenda dispatcher::           Keyboard access to agenda views
171 * Weekly/Daily Agenda::         The calendar page with current tasks
172 * Global TODO list::            All unfinished action items
173 * Matching headline tags::      Structured information with fine-tuned search
174 * Timeline::                    Time-sorted view for single file
175 * Agenda commands::             Remote editing of org trees
177 The weekly/daily agenda
179 * Categories::                  Not all tasks are equal
180 * Time-of-day specifications::  How the agenda knows the time
181 * Calendar/Diary integration::  Integrating Anniversaries and more
182 * Sorting of agenda items::     The order of things
184 Exporting
186 * ASCII export::                Export as a structured ASCII file
187 * HTML export::                 Export as an HTML file
188 * iCalendar export::            Create calendar entries.
190 HTML export
192 * HTML formatting::             Interpretation of the buffer content
193 * Export options::              How to influence exports
194 * Comment lines::               Lines which will not be exported
196 Miscellaneous
198 * Completion::                  M-TAB knows what you need
199 * Customization::               Adapting Org-mode to your taste
200 * Updating settings::           How to tell Org-mode that settings have changed
201 * Clean view::                  Getting rid of leading stars in the outline
202 * TTY keys::                    Using Org-mode on a tty
203 * FAQ::                         Frequently asked questions
204 * Interaction::                 Other Emacs packages
205 * Bugs::                        Things which do not work perfectly
206 * Acknowledgments::             These people provided feedback and more
208 @end detailmenu
209 @end menu
211 @node Introduction, Document Structure, Top, Top
212 @chapter Introduction
213 @cindex introduction
215 @menu
216 * Summary::                     Brief summary of what Org-mode does
217 * Installation and activation::  How to install Org-mode
218 * Feedback::                    Bug reports, ideas, patches etc.
219 @end menu
221 @node Summary, Installation and activation, Introduction, Introduction
222 @section Summary
223 @cindex summary
225 Org-mode is a mode for keeping notes, maintaining ToDo lists, and doing
226 project planning with a fast and effective plain-text system.
228 Org-mode develops organizational tasks around NOTES files that contain
229 information about projects as plain text.  Org-mode is implemented on
230 top of outline-mode, which makes it possible to keep the content of
231 large files well structured.  Visibility cycling and structure editing
232 help to work with the tree.  Tables are easily created with a built-in
233 table editor.  Org-mode supports ToDo items, deadlines, time stamps,
234 and scheduling.  It dynamically compiles entries into an agenda that
235 utilizes and smoothly integrates much of the Emacs calendar and diary.
236 Plain text URL-like links connect to websites, emails, Usenet
237 messages, BBDB entries, and any files related to the projects.  For
238 printing and sharing of notes, an Org-mode file can be exported as a
239 structured ASCII file, as HTML, or (todo and agenda items only) as an
240 iCalendar file.
242 Org-mode keeps simple things simple.  When first fired up, it should
243 feel like a simple but easy to use outliner.  Complexity is not
244 imposed, but a large amount of functionality is available when you
245 need it.  Org-mode can be used on different levels and in different
246 ways, for example:
248 @example
249 @r{@bullet{} as an outline extension with visibility cycling and structure editing}
250 @r{@bullet{} as an ASCII system and table editor for taking structured notes}
251 @r{@bullet{} as an ASCII table editor with spreadsheet-like capabilities}
252 @r{@bullet{} as a simple hypertext system, with HTML export}
253 @r{@bullet{} as a TODO list editor}
254 @r{@bullet{} as a full agenda and planner with deadlines and work scheduling}
255 @end example
257 The Org-mode table editor can be integrated into any major mode by
258 activating the minor Orgtbl-mode.
260 There is a website for Org-mode which provides links to the newest
261 version of Org-mode, as well as additional information, screen shots
262 and example files.  This page is located at
263 @uref{http://www.astro.uva.nl/~dominik/Tools/org/}.
265 @page
267 @node Installation and activation, Feedback, Summary, Introduction
268 @section Installation and Activation
269 @cindex installation
270 @cindex autoload
271 @cindex global keybindings
272 @cindex keybindings, global
274 If Org-mode is part of the Emacs distribution or an XEmacs package,
275 you only need to copy the following lines to your @file{.emacs} file.
276 The last two lines define @emph{global} keys for the commands
277 @command{org-store-link} and @command{org-agenda} - please
278 choose suitable keys yourself.
280 @lisp
281 ;; The following lines are always needed.  Choose your own keys.
282 (add-to-list 'auto-mode-alist '("\\.org$" . org-mode))
283 (define-key global-map "\C-cl" 'org-store-link)
284 (define-key global-map "\C-ca" 'org-agenda)
285 @end lisp
287 If you have downloaded Org-mode from the Web, you must byte-compile
288 @file{org.el} and put it on your load path.  In addition to the Emacs
289 Lisp lines above, you also need to add the following lines to
290 @file{.emacs}:
292 @lisp
293 ;; These lines only if org-mode is not part of the X/Emacs distribution.
294 (autoload 'org-mode "org" "Org mode" t)
295 (autoload 'org-diary "org" "Diary entries from Org mode")
296 (autoload 'org-agenda "org" "Multi-file agenda from Org mode" t)
297 (autoload 'org-store-link "org" "Store a link to the current location" t)
298 (autoload 'orgtbl-mode "org" "Org tables as a minor mode" t)
299 (autoload 'turn-on-orgtbl "org" "Org tables as a minor mode")
300 @end lisp
302 @cindex org-mode, turning on
303 With this setup, all files with extension @samp{.org} will be put into
304 Org-mode.  As an alternative, make the first line of a file look like
305 this:
307 @example
308 MY PROJECTS    -*- mode: org; -*-
309 @end example
311 @noindent which will select Org-mode for this buffer no matter what
312 the file's name is.  See also the variable
313 @code{org-insert-mode-line-in-empty-file}.
315 @node Feedback,  , Installation and activation, Introduction
316 @section Feedback
317 @cindex feedback
318 @cindex bug reports
319 @cindex maintainer
320 @cindex author
322 If you find problems with Org-mode, or if you have questions, remarks,
323 or ideas about it, please contact the maintainer Carsten Dominik at
324 @value{MAINTAINEREMAIL}.
326 For bug reports, please provide as much information as possible,
327 including the version information of Emacs (@kbd{C-h v emacs-version
328 @key{RET}}) and Org-mode (@kbd{C-h v org-version @key{RET}}), as well as
329 the Org-mode related setup in @file{.emacs}.  If an error occurs, a
330 traceback can be very useful.  Often a small example file helps, along
331 with clear information about:
333 @enumerate
334 @item What exactly did you do?
335 @item What did you expect to happen?
336 @item What happened instead?
337 @end enumerate
338 @noindent Thank you for helping to improve this mode.
340 @node Document Structure, Tables, Introduction, Top
341 @chapter Document Structure
342 @cindex document structure
343 @cindex structure of document
345 Org-mode is based on outline mode and provides flexible commands to
346 edit the structure of the document.
348 @menu
349 * Outlines::                    Org-mode is based on outline-mode
350 * Headlines::                   How to typeset org-tree headlines
351 * Visibility cycling::          Show and hide, much simplified
352 * Motion::                      Jumping to other headlines
353 * Structure editing::           Changing sequence and level of headlines
354 * Archiving::                   Move done task trees to a different place
355 * Sparse trees::                Matches embedded in context
356 * Plain Lists::                 Editing hand-formatted lists
357 @end menu
359 @node Outlines, Headlines, Document Structure, Document Structure
360 @section Outlines
361 @cindex outlines
362 @cindex outline-mode
364 Org-mode is implemented on top of outline-mode.  Outlines allow to
365 organize a document in a hierarchical structure, which (at least for
366 me) is the best representation of notes and thoughts.  Overview over
367 this structure is achieved by folding (hiding) large parts of the
368 document to show only the general document structure and the parts
369 currently being worked on.  Org-mode greatly simplifies the use of
370 outlines by compressing the entire show/hide functionality into a
371 single command @command{org-cycle}, which is bound to the @key{TAB}
372 key.
374 @node Headlines, Visibility cycling, Outlines, Document Structure
375 @section Headlines
376 @cindex headlines
377 @cindex outline tree
379 Headlines define the structure of an outline tree.  The headlines in
380 Org-mode start with one or more stars, on the left margin.  For
381 example:
383 @example
384 * Top level headline
385 ** Second level
386 *** 3rd level
387     some text
388 *** 3rd level
389     more text
390 * Another top level headline
391 @end example
393 @noindent Some people find the many stars too noisy and would prefer an
394 outline that has whitespace followed by a single star as headline
395 starters.  @ref{Clean view} describes a setup to realize this.
397 @node Visibility cycling, Motion, Headlines, Document Structure
398 @section Visibility cycling
399 @cindex cycling, visibility
400 @cindex visibility cycling
401 @cindex trees, visibility
402 @cindex show hidden text
403 @cindex hide text
405 Outlines make it possible to hide parts of the text in the buffer.
406 Org-mode uses a single command bound to the @key{TAB} key to change
407 the visibility in the buffer.
409 @cindex subtree visibility states
410 @cindex folded, subtree visibility state
411 @cindex children, subtree visibility state
412 @cindex subtree, subtree visibility state
413 @table @kbd
414 @kindex @key{TAB}
415 @item @key{TAB}
416 Rotate current subtree between the states
418 @example
419 ,-> FOLDED -> CHILDREN -> SUBTREE --.
420 '-----------------------------------'
421 @end example
423 At the beginning of the buffer (or when called with @kbd{C-u}), this does
424 the same as the command @kbd{S-@key{TAB}} below.
426 @cindex global visibility states
427 @cindex overview, global visibility state
428 @cindex contents, global visibility state
429 @cindex show all, global visibility state
430 @kindex S-@key{TAB}
431 @item S-@key{TAB}
432 Rotate the entire buffer between the states
434 @example
435 ,-> OVERVIEW -> CONTENTS -> SHOW ALL --.
436 '--------------------------------------'
437 @end example
439 Note that inside tables, @kbd{S-@key{TAB}} jumps to the previous field.
441 @cindex show all, command
442 @kindex C-c C-a
443 @item C-c C-a
444 Show all.
445 @end table
447 When Emacs first visits an Org-mode file, the global state is set to
448 OVERVIEW, i.e. only the top level headlines are visible.  This can be
449 configured through the variable @code{org-startup-folded}, or on a
450 per-file basis by adding one of the following lines anywhere in the
451 buffer:
453 @example
454 #+STARTUP: fold
455 #+STARTUP: nofold
456 #+STARTUP: content
457 @end example
459 @node Motion, Structure editing, Visibility cycling, Document Structure
460 @section Motion
461 @cindex motion, between headlines
462 @cindex jumping, to headlines
463 @cindex headline navigation
464 The following commands jump to other headlines in the buffer.
466 @table @kbd
467 @kindex C-c C-n
468 @item C-c C-n
469 Next heading.
470 @kindex C-c C-p
471 @item C-c C-p
472 Previous heading.
473 @kindex C-c C-f
474 @item C-c C-f
475 Next heading same level.
476 @kindex C-c C-b
477 @item C-c C-b
478 Previous heading same level.
479 @kindex C-c C-u
480 @item C-c C-u
481 Backward to higher level heading.
482 @kindex C-c C-j
483 @item C-c C-j
484 Jump to a different place without changing the current outline
485 visibility.  Shows the document structure in a temporary buffer, where
486 you can use visibility cycling (@key{TAB}) to find your destination.
487 After pressing @key{RET}, the cursor moves to the selected location in
488 the original buffer, and the headings hierarchy above it is made
489 visible.
490 @end table
492 @node Structure editing, Archiving, Motion, Document Structure
493 @section Structure editing
494 @cindex structure editing
495 @cindex headline, promotion and demotion
496 @cindex promotion, of subtrees
497 @cindex demotion, of subtrees
498 @cindex subtree, cut and paste
499 @cindex pasting, of subtrees
500 @cindex cutting, of subtrees
501 @cindex copying, of subtrees
502 @cindex subtrees, cut and paste
504 @table @kbd
505 @kindex M-@key{RET}
506 @item M-@key{RET}
507 Insert new heading with same level as current.  If the cursor is in a
508 plain list item, a new item is created.  To force creation of a new
509 headline, use a prefix arg, or first press @key{RET} to get to the
510 beginning of the next line.
511 @kindex M-S-@key{RET}
512 @item M-S-@key{RET}
513 Insert new TODO entry with same level as current heading.
514 @kindex M-@key{left}
515 @item M-@key{left}
516 Promote current heading by one level.
517 @kindex M-@key{right}
518 @item M-@key{right}
519 Demote current heading by one level.
520 @kindex M-S-@key{left}
521 @item M-S-@key{left}
522 Promote the current subtree by one level.
523 @kindex M-S-@key{right}
524 @item M-S-@key{right}
525 Demote the current subtree by one level.
526 @kindex M-S-@key{up}
527 @item M-S-@key{up}
528 Move subtree up (swap with previous subtree of same
529 level).
530 @kindex M-S-@key{down}
531 @item M-S-@key{down}
532 Move subtree down (swap with next subtree of same level).
533 @kindex C-c C-x C-w
534 @kindex C-c C-x C-k
535 @item C-c C-x C-w
536 @itemx C-c C-x C-k
537 Kill subtree, i.e. remove it from buffer but save in kill ring.
538 @kindex C-c C-x M-w
539 @item C-c C-x M-w
540 Copy subtree to kill ring.
541 @kindex C-c C-x C-y
542 @item C-c C-x C-y
543 Yank subtree from kill ring.  This does modify the level of the subtree to
544 make sure the tree fits in nicely at the yank position.  The yank
545 level can also be specified with a prefix arg, or by yanking after a
546 headline marker like @samp{****}.
547 @end table
549 @cindex region, active
550 @cindex active region
551 @cindex transient-mark-mode
552 When there is an active region (transient-mark-mode), promotion and
553 demotion work on all headlines in the region.  To select a region of
554 headlines, it is best to place both point and mark at the beginning of a
555 line, mark at the beginning of the first headline, and point at the line
556 just after the last headline to change.  Note that when the cursor is
557 inside a table (@pxref{Tables}), the Meta-Cursor keys have different
558 functionality.
560 @node Archiving, Sparse trees, Structure editing, Document Structure
561 @section Archiving
562 @cindex archiving
563 @cindex filing subtrees
565 When a project represented by a (sub)tree is finished, you may want
566 to move the tree to an archive place, either in the same file under a
567 special top-level heading, or even to a different file.
568 @table @kbd
569 @kindex C-c $
570 @item @kbd{C-c $}
571 Archive the subtree starting at the cursor position to the location
572 given by @code{org-archive-location}.
573 @end table
575 @cindex archive locations
576 The default archive is a file in the same directory as the current
577 file, with the name derived by appending @file{_archive} to the
578 current file name.  For information and examples on how to change
579 this, see the documentation string of the variable
580 @code{org-archive-location}.  If you are also using the Org-mode
581 agenda, archiving to a different file is a good way to keep archived
582 trees from contributing agenda items.
584 @node Sparse trees, Plain Lists, Archiving, Document Structure
585 @section Sparse trees
586 @cindex sparse trees
587 @cindex trees, sparse
588 @cindex folding, sparse trees
589 @cindex occur, command
591 An important feature of Org-mode is the ability to construct
592 @emph{sparse trees} for selected information in an outline tree.  A
593 sparse tree means that the entire document is folded as much as
594 possible, but the selected information is made visible along with the
595 headline structure above it@footnote{See also the variables
596 @code{org-show-hierarchy-above} and
597 @code{org-show-following-heading}.}.  Just try it out and you will see
598 immediately how it works.
600 Org-mode contains several commands creating such trees.  The most
601 basic one is @command{org-occur}:
603 @table @kbd
604 @kindex C-c /
605 @item C-c /
606 Occur.  Prompts for a regexp and shows a sparse tree with all matches.
607 If the match is in a headline, the headline is made visible.  If the
608 match is in the body of an entry, headline and body are made visible.
609 In order to provide minimal context, also the full hierarchy of
610 headlines above the match is shown, as well as the headline following
611 the match.  Each match is also highlighted, the highlights disappear
612 when the buffer is changed with an editing command.
613 @end table
614 @noindent
615 For frequently used sparse trees of specific search strings, you can
616 use the variable @code{org-agenda-custom-commands} to define fast
617 keyboard access to specific sparse trees.  These commands will then be
618 accessible through the agenda dispatcher (@pxref{Agenda dispatcher}).
619 For example:
621 @lisp
622 (setq org-agenda-custom-commands
623       '(("f" occur-tree "FIXME")))
624 @end lisp
626 @noindent will define the key @kbd{C-c a f} as a shortcut for creating
627 a sparse tree matching the string @samp{FIXME}.
629 Other commands are using sparse trees as well.  For example @kbd{C-c
630 C-v} creates a sparse TODO tree (@pxref{TODO basics}).
632 @kindex C-c C-x v
633 @cindex printing sparse trees
634 @cindex visible text, printing
635 To print a sparse tree, you can use the Emacs command
636 @code{ps-print-buffer-with-faces} which does not print invisible parts
637 of the document @footnote{This does not work under XEmacs, because
638 XEmacs uses selective display for outlining, not text properties}.
639 Or you can use the command @kbd{C-c C-x v} to copy the visible part of
640 the document to another file (extension @file{.txt}) which can then be
641 printed in any desired way.
644 @node Plain Lists,  , Sparse trees, Document Structure
645 @section Plain Lists
646 @cindex plain lists
647 @cindex lists, plain
648 @cindex lists, ordered
649 @cindex ordered lists
651 Headlines define both the structure of the Org-mode file, and also lists
652 (for example, TODO items (@pxref{TODO items}) should be created using
653 headline levels).  However, when taking notes, the plain text is
654 sometimes easier to read with hand-formatted lists.  Org-mode supports
655 editing such lists, and the HTML exporter (@pxref{Exporting}) does
656 parse and format them.
658 Org-mode knows ordered and unordered lists.  Unordered list items start
659 with @samp{-}, @samp{+}, or @samp{*}@footnote{When using @samp{*} as a
660 bullet, lines must be indented or they will be seen as top-level
661 headlines.  Also, when you are hiding leading stars to get a clean
662 outline view, plain list items starting with a star are visually
663 indistinguishable from true headlines.  In short: even though @samp{*}
664 is supported, it may be better to not use it for plain list items} as
665 bullets.  Ordered list items start with @samp{1.} or @samp{1)}.  Items
666 belonging to the same list must have the same indentation on the first
667 line.  In particular, if an ordered list reaches number @samp{10.}, then
668 the 2--digit numbers must be written left-aligned with the other numbers
669 in the list.  Indentation also determines the end of a list item.  It
670 ends before the next line that is indented like the bullet/number, or
671 less.  For example:
673 @example
674 ** Lord of the Rings
675 My favorite scenes are (in this order)
676 1. Eowyns fight with the witch king
677    + this was already my favorite scene in the book
678    + I really like Miranda Otto.
679 2. The attack of the Rohirrim
680 3. Peter Jackson being shot by Legolas
681     - on DVD only
682    He makes a really funny face when it happens.
683 @end example
685 Org-mode supports these lists by tuning filling and wrapping commands
686 to correctly deal with them.  Furthermore, the following commands act
687 on items when the cursor is in the first line of an item (the line
688 with the bullet or number).
690 @table @kbd
691 @kindex @key{TAB}
692 @item @key{TAB}
693 Items can be folded just like headline levels if you set the variable
694 @code{org-cycle-include-plain-lists}.  The level of an item is then
695 given by the indentation of the bullet/number.  However, items are
696 always subordinate to real headlines, the hierarchies remain
697 completely separated.
698 @kindex M-@key{RET}
699 @item M-@key{RET}
700 Insert new item at current level.  With prefix arg, for a new heading.
701 @kindex M-S-@key{up}
702 @kindex M-S-@key{down}
703 @item M-S-@key{up}
704 @itemx M-S-@key{down}
705 Move the item including subitems up/down (swap with previous/next item
706 of same indentation).  If the list is ordered, renumbering is
707 automatic.
708 @kindex M-S-@key{left}
709 @kindex M-S-@key{right}
710 @item M-S-@key{left}
711 @itemx M-S-@key{right}
712 Decrease/increase the indentation of the item, including subitems.
713 Initially, the item tree is selected based on current indentation.
714 When these commands are executed several times in direct succession,
715 the initially selected region is used, even if the new indentation
716 would imply a different hierarchy.  To use the new hierarchy, break
717 the command chain with a cursor motion or so.
718 @kindex C-c C-c
719 @item C-c C-c
720 Renumber the ordered list at the cursor.
721 @end table
723 @node Tables, Hyperlinks, Document Structure, Top
724 @chapter Tables
725 @cindex tables
726 @cindex editing tables
728 Org-mode has a very fast and intuitive table editor built-in.
729 Spreadsheet-like calculations are supported in connection with the
730 Emacs @file{calc} package.
732 @menu
733 * Built-in table editor::       Simple tables
734 * Narrow columns::              Stop wasting space in tables   
735 * Table calculations::          Compute a field from other fields
736 * orgtbl-mode::                 The table editor as minor mode
737 * table.el::                    Complex tables
738 @end menu
740 @node Built-in table editor, Narrow columns, Tables, Tables
741 @section The built-in table editor
742 @cindex table editor, builtin
744 Org-mode makes it easy to format tables in plain ASCII.  Any line with
745 @samp{|} as the first non-white character is considered part of a
746 table.  @samp{|} is also the column separator.  A table might look
747 like this:
749 @example
750 | Name  | Phone | Age |
751 |-------+-------+-----|
752 | Peter |  1234 |  17 |
753 | Anna  |  4321 |  25 |
754 @end example
756 A table is re-aligned automatically each time you press @key{TAB} or
757 @key{RET} or @kbd{C-c C-c} inside the table.  @key{TAB} also moves to
758 the next field (@key{RET} to the next row) and creates new table rows
759 at the end of the table or before horizontal lines.  The indentation
760 of the table is set by the first line.  Any line starting with
761 @samp{|-} is considered as a horizontal separator line and will be
762 expanded on the next re-align to span the whole table width.  So, to
763 create the above table, you would only type
765 @example
766 |Name|Phone|Age
768 @end example
770 @noindent and then press @key{TAB} to align the table and start filling in
771 fields.
773 When typing text into a field, Org-mode treats @key{DEL},
774 @key{Backspace}, and all character keys in a special way, so that
775 inserting and deleting avoids shifting other fields.  Also, when
776 typing @emph{immediately after the cursor was moved into a new field
777 with @kbd{@key{TAB}}, @kbd{S-@key{TAB}} or @kbd{@key{RET}}}, the
778 field is automatically made blank.  If this behavior is too
779 unpredictable for you, configure the variables
780 @code{org-enable-table-editor} and @code{org-table-auto-blank-field}.
782 @table @kbd
783 @tsubheading{Creation and conversion}
784 @kindex C-c |
785 @item C-c |
786 Convert the active region to table. If every line contains at least one
787 TAB character, the function assumes that the material is tab separated.
788 If not, lines are split at whitespace into fields.  You can use a prefix
789 argument to indicate the minimum number of consequtive spaces required
790 to indentify a field separator (default: just one).@* 
791 If there is no active region, this command creates an empty Org-mode
792 table.  However, it's easier to just start typing, like
793 @kbd{|Name|Phone|Age @key{RET} |- @key{TAB}}.
795 @tsubheading{Re-aligning and field motion}
796 @kindex C-c C-c
797 @item C-c C-c
798 Re-align the table without moving the cursor.
800 @kindex @key{TAB}
801 @item @key{TAB}
802 Re-align the table, move to the next field.  Creates a new row if
803 necessary.
805 @kindex S-@key{TAB}
806 @item S-@key{TAB}
807 Re-align, move to previous field.
809 @kindex @key{RET}
810 @item @key{RET}
811 Re-align the table and move down to next row.  Creates a new row if
812 necessary.  At the beginning or end of a line, @key{RET} still does
813 NEWLINE, so it can be used to split a table.
815 @tsubheading{Column and row editing}
816 @kindex M-@key{left}
817 @kindex M-@key{right}
818 @item M-@key{left}
819 @itemx M-@key{right}
820 Move the current column left/right.
822 @kindex M-S-@key{left}
823 @item M-S-@key{left}
824 Kill the current column.
826 @kindex M-S-@key{right}
827 @item M-S-@key{right}
828 Insert a new column to the left of the cursor position.
830 @kindex M-@key{up}
831 @kindex M-@key{down}
832 @item M-@key{up}
833 @itemx M-@key{down}
834 Move the current row up/down.
836 @kindex M-S-@key{up}
837 @item M-S-@key{up}
838 Kill the current row or horizontal line.
840 @kindex M-S-@key{down}
841 @item M-S-@key{down}
842 Insert a new row above (with arg: below) the current row.
844 @kindex C-c -
845 @item C-c -
846 Insert a horizontal line below current row. With prefix arg, the line
847 is created above the current line.
849 @kindex C-c ^
850 @item C-c ^
851 Sort the table lines in the region.  Point and mark must be in the first
852 and last line to be included, and must be in the column that should be
853 used for sorting.  The command prompts for numerical versus
854 alphanumerical sorting.
856 @tsubheading{Regions}
857 @kindex C-c C-x M-w
858 @item C-c C-x M-w
859 Copy a rectangular region from a table to a special clipboard.  Point
860 and mark determine edge fields of the rectangle.  The process ignores
861 horizontal separator lines.
862 @kindex C-c C-x C-w
863 @item C-c C-x C-w
864 Copy a rectangular region from a table to a special clipboard, and
865 blank all fields in the rectangle.  So this is the ``cut'' operation.
866 @kindex C-c C-x C-y
867 @item C-c C-x C-y
868 Paste a rectangular region into a table.
869 The upper right corner ends up in the current field.  All involved fields
870 will be overwritten.  If the rectangle does not fit into the present table,
871 the table is enlarged as needed.  The process ignores horizontal separator
872 lines.
873 @kindex C-c C-q
874 @item C-c C-q
875 Wrap several fields in a column like a paragraph.  If there is an active
876 region, and both point and mark are in the same column, the text in the
877 column is wrapped to minimum width for the given number of lines.  A
878 prefix ARG may be used to change the number of desired lines.  If there
879 is no region, the current field is split at the cursor position and the
880 text fragment to the right of the cursor is prepended to the field one
881 line down. If there is no region, but you specify a prefix ARG, the
882 current field is made blank, and the content is appended to the field
883 above.
885 @tsubheading{Calculations}
886 @cindex formula, in tables
887 @cindex calculations, in tables
888 @kindex C-c =
889 @item C-c =
890 Install a new formula for the current column and replace current field
891 with the result of the formula.
893 @kindex C-u C-c =
894 @item C-u C-c =
895 Install a new formula for the current field, which must be a named
896 field.  Evaluate the formula and replace the field content with the
897 result.
899 @kindex C-c '
900 @item C-c '
901 Edit all formulas associated with the current table in a separate
902 buffer.
904 @kindex C-c *
905 @item C-c *
906 Recalculate the current row by applying the stored formulas from left
907 to right.  When called with a @kbd{C-u} prefix, recalculate the
908 entire table, starting with the first non-header line (i.e. below the
909 first horizontal separator line).  For details, see @ref{Table calculations}.
911 @kindex C-#
912 @item C-#
913 Rotate the calculation mark in first column through the states
914 @samp{}, @samp{#}, @samp{*}, @samp{!}, @samp{$}.  For the meaning of
915 these marks see @ref{Advanced features}.  When there is an active
916 region, change all marks in the region.
918 @kindex C-c ?
919 @item C-c ?
920 Which table column is the cursor in?  Displays number >0 in echo
921 area.
923 @cindex region, active
924 @cindex active region
925 @cindex transient-mark-mode
926 @kindex C-c +
927 @item C-c +
928 Sum the numbers in the current column, or in the rectangle defined by
929 the active region.  The result is shown in the echo area and can
930 be inserted with @kbd{C-y}.
932 @kindex S-@key{RET}
933 @item S-@key{RET}
934 When current field is empty, copy from first non-empty field above.
935 When not empty, copy current field down to next row and move cursor
936 along with it.  Depending on the variable
937 @code{org-table-copy-increment}, integer field values will be
938 incremented during copy.  This key is also used by CUA-mode
939 (@pxref{Interaction}).
941 @tsubheading{Miscellaneous}
942 @kindex C-c `
943 @item C-c `
944 Edit the current field in a separate window.  This is useful for fields
945 that are not fully visible (@pxref{Narrow columns}).  When called with a
946 @kbd{C-u} prefix, just make the full field visible, so that it can be
947 edited in place.
949 @kindex C-c @key{TAB}
950 @item C-c @key{TAB}
951 This is an alias for @kbd{C-u C-c `} to make the current field fully
952 visible.
954 @item M-x org-table-import
955 Import a file as a table.  The table should be TAB- or whitespace
956 separated.  Useful, for example, to import an Excel table or data from a
957 database, because these programs generally can write TAB-separated text
958 files.  This command works by inserting the file into the buffer and
959 then converting the region to a table.  Any prefix argument is passed on
960 to the converter, which uses it to determine the separator.
962 @item M-x org-table-export
963 Export the table as a TAB-separated file.  Useful for data exchange with,
964 for example, Excel or database programs.
966 @end table
968 If you don't like the automatic table editor because it gets in your
969 way on lines which you would like to start with @samp{|}, you can turn
970 it off with
972 @lisp
973 (setq org-enable-table-editor nil)
974 @end lisp
976 @noindent The only table command which then still works is
977 @kbd{C-c C-c} to do a manual re-align.
979 @node Narrow columns, Table calculations, Built-in table editor, Tables
980 @section Narrow columns
981 @cindex narrow columns in tables
983 The width of columns is automatically determined by the table editor.
984 Sometimes a single field or a few fields need to carry more text,
985 leading to unconveniently wide columns.  To limit@footnote{This feature
986 does not work on XEmacs.} the width of a column, one field anywhere in
987 the column must carry the string @samp{<N>} where @samp{N} is an integer
988 specifying the width of the column in characters.  The next re-align
989 will then set the width of this column to no more than this value.
991 @example
992 |---+------------------------------|               |---+--------|
993 |   |                              |               |   | <6>    |
994 | 1 | one                          |               | 1 | one    |
995 | 2 | two                          |     ----\     | 2 | two    |
996 | 3 | This is a long chunk of text |     ----/     | 3 | This=> |
997 | 4 | four                         |               | 4 | four   |
998 |---+------------------------------|               |---+--------|
999 @end example
1001 @noindent
1002 Fields that are wider become clipped and end in the string @samp{=>}.
1003 Note that the full text is still in the buffer, it is only invisible.
1004 To see the full text, hold the mouse over the field - a tooltip window
1005 will show the full content.  To edit such a field, use the command
1006 @kbd{C-c `} (that is @kbd{C-c} followed by the backquote).  This will
1007 open a new window with the full field.  Edit it and finish with @kbd{C-c
1008 C-c}.
1010 When visiting a file containing a table with narrowed columns, the
1011 necessary character hiding has not yet happened, and the table needs to
1012 be aligned before it looks nice.  Setting the option
1013 @code{org-startup-align-all-tables} will realign all tables in a file
1014 upon visiting, but also slow down startup.  You can also set this option
1015 on a per-file basis with:
1017 @example
1018 #+STARTUP: align
1019 #+STARTUP: noalign
1020 @end example
1022 @node Table calculations, orgtbl-mode, Narrow columns, Tables
1023 @section Calculations in tables
1024 @cindex calculations, in tables
1025 @cindex spreadsheet capabilities
1026 @cindex @file{calc} package
1028 The table editor makes use of the Emacs @file{calc} package to
1029 implement spreadsheet-like capabilities.  Org-mode has two levels of
1030 complexity for table calculations.  On the basic level, tables do only
1031 horizontal computations, so a field can be computed from other fields
1032 @emph{in the same row}, and Org-mode assumes that there is only one
1033 formula for each column.  This is very efficient to work with and
1034 enough for many tasks.  On the complex level, columns and individual
1035 fields can be named for easier referencing in formulas, individual
1036 named fields can have their own formula associated with them, and
1037 recalculation can be automated.
1039 @menu
1040 * Formula syntax::              How to write a formula
1041 * Column formulas::             Formulas valid for all fields in a column
1042 * Advanced features::           Field names, parameters and automatic recalc
1043 * Named-field formulas::        Formulas valid in single fields
1044 * Editing/debugging formulas::  Changing a stored formula
1045 * Appetizer::                   Taste the power of calc
1046 @end menu
1048 @node Formula syntax, Column formulas, Table calculations, Table calculations
1049 @subsection Formula syntax
1050 @cindex formula syntax
1051 @cindex syntax, of formulas
1053 A formula can be any algebraic expression understood by the Emacs
1054 @file{calc} package.  Note that @file{calc} has the slightly
1055 non-standard convention that @samp{/} has lower precedence than
1056 @samp{*}, so that @samp{a/b*c} is interpreted as @samp{a/(b*c)}.  Before
1057 evaluation by @code{calc-eval} (@pxref{Calling Calc from Your Lisp
1058 Programs,calc-eval,Calling calc from Your Lisp Programs,calc,GNU Emacs
1059 Calc Manual}), variable substitution takes place:
1061 @example
1062   $        @r{refers to the current field}
1063   $3       @r{refers to the field in column 3 of the current row}
1064   $3..$7   @r{a vector of the fields in columns 3-7 of current row}
1065   $P1..$P3 @r{vector of column range, using column names}
1066   &2       @r{second data field above the current, in same column}
1067   &5-2     @r{vector from fifth to second field above current}
1068   &III-II  @r{vector of fields between 2nd and 3rd hline above}
1069   &III     @r{vector of fields between third hline above and current field}
1070   $name    @r{a named field, parameter or constant}
1071 @end example
1073 @cindex vectors, in table calculations
1074 The range vectors can be directly fed into the calc vector functions
1075 like @samp{vmean} and @samp{vsum}.
1077 @cindex name, of column or field
1078 @cindex constants, in calculations
1079 @samp{$name} is interpreted as the name of a column, parameter or
1080 constant.  Constants are defined globally through the variable
1081 @code{org-table-formula-constants}.  If you have the
1082 @file{constants.el} package, it will also be used to resolve
1083 constants, including natural constants like @samp{$h} for Planck's
1084 constant, and units like @samp{$km} for kilometers.  Column names and
1085 parameters can be specified in special table lines.  These are
1086 described below, see @ref{Advanced features}.
1088 @cindex format specifier
1089 @cindex mode, for @file{calc}
1090 A formula can contain an optional mode string after a semicolon.  This
1091 string consists of flags to influence calc's modes@footnote{By
1092 default, Org-mode uses the standard calc modes (precision 12, angular
1093 units degrees, fraction and symbolic modes off).  However, the display
1094 format has been changed to @code{(float 5)} to keep tables compact.
1095 The default settings can be configured using the variable
1096 @code{org-calc-default-modes}.} during execution, e.g.  @samp{p20} to
1097 switch the internal precision to 20 digits, @samp{n3}, @samp{s3},
1098 @samp{e2} or @samp{f4} to switch to normal, scientific, engineering,
1099 or fixed display format, respectively, and @samp{D}, @samp{R}, @samp{F},
1100 and @samp{S} to turn on degrees, radians, fraction and symbolic modes,
1101 respectively.  In addition, you may provide a @code{printf} format
1102 specifier to reformat the final result.  A few examples:
1104 @example
1105   $1+$2                @r{Sum of first and second field}
1106   $1+$2;%.2f           @r{Same, format result to two decimals}
1107   exp($2)+exp($1)      @r{Math functions can be used}
1108   $;%.1f               @r{Reformat current cell to 1 decimal}
1109   ($3-32)*5/9          @r{Degrees F -> C conversion}
1110   $c/$1/$cm            @r{Hz -> cm conversion, using @file{constants.el}}
1111   tan($1);Dp3s1        @r{Compute in degrees, precision 3, display SCI 1}
1112   sin($1);Dp3%.1e      @r{Same, but use printf specifier for display}
1113   vmean($2..$7)        @r{Compute column range mean, using vector function}
1114   vsum(&III)           @r{Sum numbers from 3rd hline above, up to here}
1115   taylor($3,x=7,2)     @r{taylor series of $3, at x=7, second degree}
1116 @end example
1118 @node Column formulas, Advanced features, Formula syntax, Table calculations
1119 @subsection Column formulas
1120 @cindex column formula
1121 @cindex formula, for table column
1123 To apply a formula to a field, type it directly into the field,
1124 preceded by an equal sign, like @samp{=$1+$2}.  When you press
1125 @key{TAB} or @key{RET} or @kbd{C-c C-c} with the cursor still in the
1126 field, the formula will be stored as the formula for the current
1127 column, evaluated and the current field replaced with the result.  If
1128 the field contains only @samp{=}, the previously stored formula for
1129 this column is used.
1131 For each column, Org-mode will remember the most recently used
1132 formula.  The information is stored in a special line starting with
1133 @samp{#+TBLFM} directly below the table.  When adding/deleting/moving
1134 columns with the appropriate commands, the stored equations will be
1135 modified accordingly.  When a column used in a calculation is removed,
1136 references to this column become invalid and will cause an error upon
1137 applying the equation.
1139 Instead of typing an equation into the field, you may also use the
1140 command @kbd{C-c =}.  It prompts for a formula (with default taken
1141 from the @samp{#+TBLFM:} line) and applies it to the current field.  A
1142 numerical prefix (e.g. @kbd{C-5 C-c =}) will apply it to that many
1143 subsequent fields in the current column.
1145 @cindex recomputing table fields
1146 To recompute all the fields in a line, use the command @kbd{C-c *}.
1147 It re-applies all stored equations to the current row, from left to
1148 right.  With a @kbd{C-u} prefix, this will be done to every line in
1149 the table, so use this command it you want to make sure the entire
1150 table is up-to-date. @kbd{C-u C-c C-c} is another way to update the
1151 entire table.  Global updating does not touch the line(s) above the
1152 first horizontal separator line, assuming that this is the table
1153 header.
1155 @node Advanced features, Named-field formulas, Column formulas, Table calculations
1156 @subsection Advanced features
1158 If you want the recalculation of fields to happen automatically,
1159 or if you want to be able to assign a formula to an individual field
1160 (instead of an entire column) you need to reserve the first column of
1161 the table for special marking characters.  Here is an example of a
1162 table that collects exam results of students and makes use of these
1163 features:
1165 @example
1166 @group
1167 |---+---------+--------+--------+--------+-------+------|
1168 |   | Student | Prob 1 | Prob 2 | Prob 3 | Total | Note |
1169 |---+---------+--------+--------+--------+-------+------|
1170 | ! |         |     P1 |     P2 |     P3 |   Tot |      |
1171 | # | Maximum |     10 |     15 |     25 |    50 | 10.0 |
1172 | ^ |         |     m1 |     m2 |     m3 |    mt |      |
1173 |---+---------+--------+--------+--------+-------+------|
1174 | # | Peter   |     10 |      8 |     23 |    41 |  8.2 |
1175 | # | Sara    |      6 |     14 |     19 |    39 |  7.8 |
1176 | # | Sam     |      2 |      4 |      3 |     9 |  1.8 |
1177 |---+---------+--------+--------+--------+-------+------|
1178 |   | Average |        |        |        |  29.7 |      |
1179 | ^ |         |        |        |        |    at |      |
1180 | $ | max=50  |        |        |        |       |      |
1181 |---+---------+--------+--------+--------+-------+------|
1182 #+TBLFM: $6=vsum($P1..$P3)::$7=10*$Tot/$max;%.1f::$at=vmean(&II);%.1f
1183 @end group
1184 @end example
1186 @noindent @b{Important}: Please note that for these special tables,
1187 recalculating the table with @kbd{C-u C-c *} will only affect rows
1188 which are marked @samp{#} or @samp{*}, and named fields.  The column
1189 formulas are not applied in rows with empty first field.
1191 @cindex marking characters, tables
1192 The marking characters have the following meaning:
1193 @table @samp
1194 @item !
1195 The fields in this line define names for the columns, so that you may
1196 refer to a column as @samp{$Tot} instead of @samp{$6}.
1197 @item ^
1198 This row defines names for the fields @emph{above} the row.  With such
1199 a definition, any formula in the table may use @samp{$m1} to refer to
1200 the value @samp{10}.  Also, named fields can have their own formula
1201 associated with them.
1202 @item _
1203 Similar to @samp{^}, but defines names for the fields in the row
1204 @emph{below}.
1205 @item $
1206 Fields in this row can define @emph{parameters} for formulas.  For
1207 example, if a field in a @samp{$} row contains @samp{max=50}, then
1208 formulas in this table can refer to the value 50 using @samp{$max}.
1209 Parameters work exactly like constants, only that they can be defined on
1210 a per-table basis.  Changing a parameter and then recalculating the
1211 table can be useful.
1212 @item #
1213 Fields in this row are automatically recalculated when pressing
1214 @key{TAB} or @key{RET} or @kbd{S-@key{TAB}} in this row.  Also, this row
1215 is selected for a global recalculation with @kbd{C-u C-c *}.  Unmarked
1216 lines will be left alone by this command.
1217 @item *
1218 Selects this line for global recalculation with @kbd{C-u C-c *}, but
1219 not for automatic recalculation.  Use this when automatic
1220 recalculation slows down editing too much.
1221 @item
1222 Unmarked lines are exempt from recalculation with @kbd{C-u C-c *}.
1223 All lines that should be recalculated should be marked with @samp{#}
1224 or @samp{*}.
1225 @end table
1227 @node Named-field formulas, Editing/debugging formulas, Advanced features, Table calculations
1228 @subsection Named-field formulas
1229 @cindex named field formula
1230 @cindex formula, for named table field
1232 A named field can have its own formula associated with it.  In the
1233 example above, this is used for the @samp{at} field that contains
1234 the average result of the students.  To enter a formula for a named
1235 field, just type it into the buffer, preceded by @samp{:=}.  Or use
1236 @kbd{C-u C-c =}.  This equation will be stored below the table like
1237 @samp{$name=...}.  Any recalculation in the table (even if only
1238 requested for the current line) will also update all named field
1239 formulas.
1241 @node Editing/debugging formulas, Appetizer, Named-field formulas, Table calculations
1242 @subsection Editing and debugging formulas
1243 @cindex formula editing
1244 @cindex editing, of table formulas
1246 To edit a column or field formula, use the commands @kbd{C-c
1247 =} and @kbd{C-u C-c =}, respectively.  The currently active expression
1248 is then presented as default in the minibuffer, where it may be edited.
1250 Note that making a table field blank does not remove the formula
1251 associated with the field - during the next recalculation the field
1252 will be filled again.  To remove a formula from a field, you have to
1253 give an empty reply when prompted for the formula, or to edit the
1254 @samp{#+TBLFM} line.
1256 @kindex C-c C-c
1257 You may edit the @samp{#+TBLFM} directly and re-apply
1258 the changed equations with @kbd{C-c C-c} in that line, or with the
1259 normal recalculation commands in the table.
1261 @kindex C-c '
1262 @kindex C-c C-c
1263 @kindex C-c C-q
1264 @kindex C-c ?
1265 In particular for large tables with many formulas, it is convenient to
1266 use the command @kbd{C-c '} to edit the formulas of the current table
1267 in a separate buffer.  That buffer will show the formulas one per
1268 line, and you are free to edit, add and remove formulas.  Press
1269 @kbd{C-c ?} on a @samp{$...}  expression to get information about its
1270 interpretation.  Exiting the buffer with @kbd{C-c C-c} only stores the
1271 modified formulas below the table.  Exiting with @kbd{C-u C-c C-c}
1272 also applies them to the entire table.  @kbd{C-c C-q} exits without
1273 installing the changes.
1275 When the evaluation of a formula leads to an error, the field content
1276 becomes the string @samp{#ERROR}.  If you would like see what is going
1277 on during variable substitution and calculation in order to find a
1278 bug, turn on formula debugging in the menu and repeat the calculation,
1279 for example by pressing @kbd{C-c = @key{RET}} in a field.
1280 Detailed information will be displayed.
1282 @node Appetizer,  , Editing/debugging formulas, Table calculations
1283 @subsection Appetizer
1285 Finally, just to wet your appetite on what can be done with the fantastic
1286 @file{calc} package, here is a table that computes the Taylor series
1287 for a couple of functions (homework: try that with Excel :-)
1289 @example
1290 @group
1291 |---+-------------+---+-----+--------------------------------------|
1292 |   | Func        | n | x   | Result                               |
1293 |---+-------------+---+-----+--------------------------------------|
1294 | # | exp(x)      | 1 | x   | 1 + x                                |
1295 | # | exp(x)      | 2 | x   | 1 + x + x^2 / 2                      |
1296 | # | exp(x)      | 3 | x   | 1 + x + x^2 / 2 + x^3 / 6            |
1297 | # | x^2+sqrt(x) | 2 | x=0 | x*(0.5 / 0) + x^2 (2 - 0.25 / 0) / 2 |
1298 | # | x^2+sqrt(x) | 2 | x=1 | 2 + 2.5 x - 2.5 + 0.875 (x - 1)^2    |
1299 | * | tan(x)      | 3 | x   | 0.0175 x + 1.77e-6 x^3               |
1300 |---+-------------+---+-----+--------------------------------------|
1301 #+TBLFM: $5=taylor($2,$4,$3);n3
1302 @end group
1303 @end example
1305 @node orgtbl-mode, table.el, Table calculations, Tables
1306 @section The Orgtbl minor mode
1307 @cindex orgtbl-mode
1308 @cindex minor mode for tables
1310 If you like the intuitive way the Org-mode table editor works, you
1311 might want to use it also in other modes like text-mode or mail-mode.
1312 The minor mode Orgtbl-mode makes this possible.  You can always toggle
1313 the mode with @kbd{M-x orgtbl-mode}.  To turn it on by default, for
1314 example in mail mode, use
1316 @lisp
1317 (add-hook 'mail-mode-hook 'turn-on-orgtbl)
1318 @end lisp
1320 @node table.el,  , orgtbl-mode, Tables
1321 @section The @file{table.el} package
1322 @kindex C-c C-c
1323 @cindex table editor, @file{table.el}
1324 @cindex @file{table.el}
1326 Complex ASCII tables with automatic line wrapping, column- and
1327 row-spanning, and alignment can be created using the Emacs table
1328 package by Takaaki Ota (@uref{http://sourceforge.net/projects/table},
1329 and also part of Emacs 22).
1330 When @key{TAB} or @kbd{C-c C-c} is pressed in such a table, Org-mode
1331 will call @command{table-recognize-table} and move the cursor into the
1332 table.  Inside a table, the keymap of Org-mode is inactive.  In order
1333 to execute Org-mode-related commands, leave the table.
1335 @table @kbd
1336 @kindex C-c C-c
1337 @item C-c C-c
1338 Recognize @file{table.el} table.  Works when the cursor is in a
1339 table.el table.
1341 @kindex C-c ~
1342 @item C-c ~
1343 Insert a table.el table.  If there is already a table at point, this
1344 command converts it between the table.el format and the Org-mode
1345 format.  See the documentation string of the command
1346 @code{org-convert-table} for the restrictions under which this is
1347 possible.
1348 @end table
1350 @node Hyperlinks, TODO items, Tables, Top
1351 @chapter Hyperlinks
1352 @cindex hyperlinks
1354 Just like HMTL, Org-mode provides links inside a file, and external
1355 links to other files, Usenet articles, emails and much more.
1357 @menu
1358 * Link format::                 How links in Org-mode are formatted
1359 * Internal links::              Links to other places in the current file
1360 * External links::              URL-like links to the world
1361 * Managing links::              Creating, inserting and following
1362 * Search Options::              Linking to a specific location
1363 * Remember::                    Org-trees store quick notes
1364 @end menu
1366 @node Link format, Internal links, Hyperlinks, Hyperlinks
1367 @section Link format
1368 @cindex link format
1369 @cindex format, of links
1371 Org-mode will recognize plain URL-like links and activate them as
1372 clickable links.  However, the general link format looks like this:
1374 @example
1375 [[link][description]]       @r{or alternatively}           [[link]]  
1376 @end example
1378 Once a link in the buffer is complete (all brackets present), Org-mode
1379 will change the display so that @samp{description} is displayed instead
1380 of @samp{[[link][description]]} and @samp{link} is displayed instead of
1381 @samp{[[link]]}.  Links will be highlighted in the face @code{org-link},
1382 which by default is an underlined face.  You can directly edit the
1383 visible part of a link.  Note that this can be either the @samp{link}
1384 part (if there is not description) or the @samp{description} part.  To
1385 edit also the invisible @samp{link} part, use @kbd{C-c C-l} with the
1386 cursor on the link.
1388 If you place the cursor at the beginning or just behind the end of the
1389 displayed text and press @key{BACKSPACE}, you will remove the
1390 (invisible) bracket at that location.  This makes the link incomplete
1391 and the internals are again displayed as plain text.  Inserting the
1392 missing bracket does hide the link internals again.  To show the
1393 internal structure of all links, use the menu entry
1394 @code{Org->Hyperlinks->Literal links}.
1396 @node Internal links, External links, Link format, Hyperlinks
1397 @section Internal links
1398 @cindex internal links
1399 @cindex links, internal
1400 @cindex CamelCase links
1402 If the link text does not look like a URL, links are considered to be
1403 internal in the current file.  Links such as @samp{[[My Target]]} or
1404 @samp{[[My Target][Find my target]]} lead to a text search in the
1405 current file.  The link can be followed with @kbd{C-c C-o} when the
1406 cursor is on the link, or with a mouse click (@pxref{Managing links}).
1407 The preferred match for such a link is a dedicated target: The same
1408 string in double angular brackets.  Targets may be located anywhere,
1409 often it is convenient to put them into a comment line, for example
1411 @example
1412 # <<My Target>>
1413 @end example
1415 If no dedicated target exists, Org-mode will search for the words in the
1416 link, often removing the need for a dedicated target.  In the above
1417 example the search would be for @samp{my target}.  Links starting with a
1418 star like @samp{*My Target} restrict the search to headlines.  When
1419 searching, Org-mode will first try an exact match, but then move on to
1420 more and more lenient searches.  For example, the link @samp{[[*My
1421 Targets]]} will find any of the following:
1423 @example
1424 ** My targets
1425 ** TODO my targets are bright
1426 ** my 20 targets are
1427 @end example
1429 To insert a link targeting a headline, in-buffer completion can be used.
1430 Just type a star followed by a few optional letters into the buffer and
1431 press @kbd{M-@key{TAB}}.  All headlines in the current buffer will be
1432 offered as completions.  @xref{Managing links}, for more commands
1433 creating links.
1435 Following a link pushes a mark onto Org-mode's own mark ring.  You can
1436 return to the previous position with @kbd{C-c &}.  Using this command
1437 several times in direct succession goes back to positions recorded
1438 earlier.
1440 @menu
1441 * Radio targets::               Make targets trigger links in plain text.
1442 * CamelCase links::             Activating CamelCase words as links
1443 @end menu
1445 @node Radio targets, CamelCase links, Internal links, Internal links
1446 @subsection Radio targets
1448 You can configure Org-mode to link any occurrences of certain target
1449 names in normal text.  So without explicitly creating a link, the text
1450 connects to the target radioing its position.  Radio targets are
1451 enclosed by triple angular brackets.  For example, a target
1452 @samp{<<<My Target>>>} causes each occurrence of @samp{my target} in
1453 normal text to become activated as a link.  The Org-mode file is
1454 scanned automatically for radio targets only when the file is first
1455 loaded into Emacs.  To update the target list during editing, press
1456 @kbd{C-c C-c} with the cursor on or at a target.
1458 @node CamelCase links,  , Radio targets, Internal links
1459 @subsection CamelCase words as links
1460 @cindex completion, of CamelCase links
1461 @cindex CamelCase links, completion of
1463 Org-mode also supports CamelCase words as links.  This feature is not
1464 turned on by default because of the inconsistencies this system suffers
1465 from.  To activate CamelCase words as links, you need to customize
1466 the option @code{org-activate-links}.  A CamelCase word then leads to a
1467 text search such that @samp{CamelCaseLink} is equivalent to
1468 @samp{[[camel case link]]}.
1470 @node External links, Managing links, Internal links, Hyperlinks
1471 @section External links
1472 @cindex links, external
1473 @cindex external links
1474 @cindex links, external
1475 @cindex GNUS links
1476 @cindex BBDB links
1477 @cindex URL links
1478 @cindex file links
1479 @cindex VM links
1480 @cindex RMAIL links
1481 @cindex WANDERLUST links
1482 @cindex MH-E links
1483 @cindex USENET links
1484 @cindex SHELL links
1486 Org-mode supports links to files, websites, Usenet and email messages;
1487 and BBDB database entries.  External links are URL-like locators.  The
1488 following list shows examples for each link type.
1490 @example
1491 http://www.astro.uva.nl/~dominik         @r{on the web}
1492 file:/home/dominik/images/jupiter.jpg    @r{file, absolute path}
1493 file:papers/last.pdf                     @r{file, relative path}
1494 news:comp.emacs                          @r{Usenet link}
1495 mailto:adent@@galaxy.net                  @r{Mail link}
1496 vm:folder                                @r{VM folder link}
1497 vm:folder#id                             @r{VM message link}
1498 vm://myself@@some.where.org/folder#id     @r{VM on remote machine}
1499 wl:folder                                @r{WANDERLUST folder link}
1500 wl:folder#id                             @r{WANDERLUST message link}
1501 mhe:folder                               @r{MH-E folder link}
1502 mhe:folder#id                            @r{MH-E message link}
1503 rmail:folder                             @r{RMAIL folder link}
1504 rmail:folder#id                          @r{RMAIL message link}
1505 gnus:group                               @r{GNUS group link}
1506 gnus:group#id                            @r{GNUS article link}
1507 bbdb:Richard Stallman                    @r{BBDB link}
1508 shell:ls *.org                           @r{A shell command}
1509 @end example
1511 A link should be enclosed in double brackets and may contain a
1512 descriptive text to be displayed instead of the url (@pxref{Link
1513 format}), for example:
1515 @example
1516 [[http://www.gnu.org/software/emacs/][GNU Emacs]]
1517 @end example
1519 @cindex angular brackets, around links
1520 @cindex plain text external links
1521 Org-mode also finds external links in the normal text and activates them
1522 as links.  If spaces must be part of the link (for example in
1523 @samp{bbdb:Richard Stallman}) or to remove ambiguities about the end of
1524 the link, enclose them in angular brackets.
1526 @node Managing links, Search Options, External links, Hyperlinks
1527 @section Managing links
1529 Org-mode provides methods to create a link in the correct syntax, to
1530 insert it into an org-mode file, and to follow the link.
1532 @table @kbd
1533 @kindex C-c l
1534 @cindex storing links
1535 @item C-c l
1536 Store a link to the current location.  This is a @emph{global} command
1537 which can be used in any buffer to create a link.  The link will be
1538 stored for later insertion into an Org-mode buffer (see below).  For VM,
1539 RMAIL, WANDERLUST, MH-E, GNUS and BBDB buffers, the link will point to
1540 the current article/entry.  For W3 and W3M buffers, the link goes to the
1541 current URL.  For Org-mode files, the current headline is targeted.  For
1542 any other files, the link will point to the file, with a search string
1543 (@pxref{Search Options}) pointing to the contents of the current line.
1544 If there is an active region, the selected words will form the basis of
1545 the search string.  The key binding @kbd{C-c l} is only a suggestion -
1546 see @ref{Installation and activation}.
1548 @kindex C-c C-l
1549 @cindex link completion
1550 @cindex completion, of links
1551 @cindex inserting links
1552 @item C-c C-l
1553 Insert a link.  This prompts for a link to be inserted into the buffer.
1554 You can just type a link, using text for an internal link, or one of the
1555 link type prefixes mentioned in the examples above.  Through completion,
1556 all links stored during the current session can be accessed.  The link
1557 will be formatted as given in the variable @code{org-link-format} and
1558 inserted into the buffer, along with a descriptive text.  Note that you
1559 don't have to use this command to insert a link.  Links in Org-mode are
1560 plain text, and you can type or paste them straight into the buffer.
1561 By using this command, the links are automatically enclosed in double
1562 brackets, and you will be asked for the optional descriptive text.
1564 @kindex C-u C-c C-l
1565 @cindex file name completion
1566 @cindex completion, of file names
1567 @item C-u C-c C-l
1568 When @kbd{C-c C-l} is called with a @kbd{C-u} prefix argument, a link to
1569 a file will be inserted and you may use file name completion to select
1570 the name of the file.  The path to the file is inserted relative to the
1571 directory of the current org file, if the linked file is in the current
1572 directory or in a subdirectory of it.  Otherwise an absolute path, if
1573 possible with @samp{~/} for your home directory is used.  You can force
1574 an absolute path with two @kbd{C-u} prefixes.
1576 @item C-c C-l @r{with cursor on existing link}
1577 When the cursor is on an existing link, @kbd{C-c C-l} allows to edit the
1578 link and description parts of the link.
1580 @cindex following links
1581 @kindex C-c C-o
1582 @item C-c C-o
1583 Open link at point.  This will launch a web browser for URLs (using
1584 @command{browse-url-at-point}), run vm/mh-e/wanderlust/rmail/gnus/bbdb
1585 for the corresponding links, and execute the command in a shell link.
1586 When the cursor is on an internal link, this commands runs the
1587 corresponding search.  When the cursor is on a TAGS list in a headline,
1588 it creates the corresponding TAGS view.  If the cursor is on a time
1589 stamp, it compiles the agenda for that date.  Furthermore, it will visit
1590 text files in @samp{file:} links with Emacs and select a suitable
1591 application for non-text files.  Classification of files is based on
1592 file extension only.  See option @code{org-file-apps}.  If you want to
1593 override the default application and visit the file with Emacs, use a
1594 @kbd{C-u} prefix.
1596 @kindex mouse-2
1597 @kindex mouse-1
1598 @item mouse-2
1599 @itemx mouse-1
1600 On links, @kbd{mouse-2} will open the link just like @kbd{C-c C-o}
1601 would.  Under Emacs 22, also @kbd{mouse-1} will follow a link.
1603 @kindex mouse-3
1604 @item mouse-3
1605 Like @kbd{mouse-2}, but force file links to be opened with Emacs.
1607 @cindex mark ring
1608 @kindex C-c %
1609 @item C-c %
1610 Push the current position onto the mark ring, to be able to return
1611 easily. Commands following an internal link do this automatically.
1613 @cindex links, returning to
1614 @kindex C-c &
1615 @item C-c &
1616 Jump back to a recorded position.  A position is recorded by the
1617 commands following internal links, and by @kbd{C-c %}.  Using this
1618 command several times in direct succession moves through a ring of
1619 previously recorded positions.
1620 @end table
1623 @node Search Options, Remember, Managing links, Hyperlinks
1624 @section Search options in file links
1625 @cindex search option in file links
1626 @cindex file links, searching
1628 File links can contain additional information to make Emacs jump to a
1629 particular location in the file when following a link.  This can be a
1630 line number or a search option after a double@footnote{For backward
1631 compatibility, line numbers can also follow a single colon.} colon.
1632 For example:
1634 @example
1635 [[file:~/code/main.c::255]]
1636 [[file:~/xx.org::My Target]]
1637 [[file:~/xx.org::*My Target]]
1638 [[file:~/xx.org::/regexp/]]
1639 @end example
1641 @noindent Here is what these options do.
1643 @table @code
1644 @item 255
1645 Jump to line 255.
1646 @item My Target
1647 Search for a link target @samp{<<My Target>>}, or do a text search for
1648 @samp{my target}, similar to the search in internal links, see
1649 @ref{Internal links}.
1650 @item *My Target
1651 In an Org-mode file, restrict search to headlines.
1652 @item /regexp/
1653 Do a regular expression search for @code{regexp}.  This uses the Emacs
1654 command @code{occur} to list all matches in a separate window.  If the
1655 target file is in Org-mode, @code{org-occur} is used to create a
1656 sparse tree with the matches.
1657 @c If the target file is a directory,
1658 @c @code{grep} will be used to search all files in the directory.
1659 @end table
1661 As a degenerate case, a file link with an empty file name can be used
1662 to search the current file.  For example, @code{<file:::find me>} does
1663 a search for @samp{find me} in the current file, just like
1664 @samp{[[find me]]} would.
1666 @node Remember,  , Search Options, Hyperlinks
1667 @section Remember
1668 @cindex @file{remember.el}
1670 Another way to create org entries with links to other files is through
1671 the @emph{Remember} package by John Wiegley.  @emph{Remember} lets you
1672 store quick notes with little interruption of your work flow.  See
1673 @uref{http://www.emacswiki.org/cgi-bin/wiki/RememberMode} for more
1674 information.  The notes produced by @emph{Remember} can be stored in
1675 different ways, and Org-mode files are a good target.  Org-mode allows
1676 to file away notes either to a default file, or directly to the
1677 correct location in your Org-mode outline tree.  The following
1678 customization@footnote{The three autoload forms are only necessary if
1679 @file{org.el} is not part of the Emacs distribution or an XEmacs
1680 package.} will tell @emph{Remember} to use org files as target, and to
1681 create annotations compatible with Org-mode links.
1683 @example
1684 (setq org-directory "~/path/to/my/orgfiles/")
1685 (setq org-default-notes-file "~/.notes")
1686 (autoload 'org-remember-annotation "org")
1687 (autoload 'org-remember-apply-template "org")
1688 (autoload 'org-remember-handler "org")
1689 (setq remember-annotation-functions '(org-remember-annotation))
1690 (setq remember-handler-functions '(org-remember-handler))
1691 (add-hook 'remember-mode-hook 'org-remember-apply-template)
1692 @end example
1694 @cindex templates, for remember
1695 In combination with Org-mode, you can use templates to generate
1696 different types of remember notes.  For example, if you would like to
1697 use one template to create general TODO entries, and another one for
1698 journal entries, you could use:
1700 @example
1701 (setq org-remember-templates
1702       '((?t "* TODO %?\n  %i\n  %a" "~/org/TODO.org")
1703         (?j "* %U %?\n\n  %i\n  %a" "~/org/JOURNAL.org")))
1704 @end example
1706 @noindent In these entries, the character specifies how to select the
1707 template, the first string specifies the template, and the (optional)
1708 second string specifies a default file (overruling
1709 @code{org-default-notes-file}) as a target for this note.
1711 When you call @kbd{M-x remember} to remember something, org will prompt
1712 for a key to select the template and then prepare the buffer like
1713 @example
1714 * TODO
1715   <file:link to where you called remember>
1716 @end example
1718 @noindent or
1720 @example
1721 * [2006-03-21 Tue 15:37]
1723   <file:link to where you called remember>
1724 @end example
1726 @noindent See the variable @code{org-remember-templates} for more details.
1728 When you are finished composing a note with remember, you have to press
1729 @kbd{C-c C-c} to file the note away.  The handler first prompts for a
1730 target file - if you press @key{RET}, the value of
1731 @code{org-default-notes-file} is used.  Then the command offers the
1732 headings tree of the selected file.  You can either immediately press
1733 @key{RET} to get the note appended to the file.  Or you can use vertical
1734 cursor motion (@key{up} and @key{down}) and visibility cycling
1735 (@key{TAB}) to find a better place.  Pressing @key{RET} or @key{left} or
1736 @key{right} leads to the following result.
1738 @multitable @columnfractions 0.2 0.1 0.7
1739 @item @b{Cursor position} @tab @b{Key} @tab @b{Note gets inserted}
1740 @item buffer-start @tab @key{RET} @tab as level 2 heading at end of file
1741 @item on headline @tab @key{RET} @tab as sublevel of the heading at cursor
1742 @item             @tab @key{left}  @tab as same level, before current heading
1743 @item             @tab @key{right} @tab as same level, after current heading
1744 @item not on headline @tab @key{RET}
1745       @tab at cursor position, level taken from context.
1746            Or use prefix arg to specify level manually.
1747 @end multitable
1749 So a fast way to store the note is to press @kbd{C-c C-c @key{RET}
1750 @key{RET}} to append it to the default file.  Even shorter would be
1751 @kbd{C-u C-c C-c}, which does the same without even showing the tree.
1752 But with little extra effort, you can push it directly to the correct
1753 location.
1755 Before inserting the text into a tree, the function ensures that the
1756 text has a headline, i.e. a first line that starts with a @samp{*}.
1757 If not, a headline is constructed from the current date and some
1758 additional data.  If the variable @code{org-adapt-indentation} is
1759 non-nil, the entire text is also indented so that it starts in the
1760 same column as the headline (after the asterisks).
1763 @node TODO items, Timestamps, Hyperlinks, Top
1764 @chapter TODO items
1765 @cindex TODO items
1767 Org-mode does not maintain TODO lists as a separate document.  TODO
1768 items are an integral part of the notes file, because TODO items
1769 usually come up while taking notes!  With Org-mode, you simply mark
1770 any entry in a tree as being a TODO item.  In this way, the
1771 information is not duplicated, and the entire context from which the
1772 item emerged is always present when you check.
1774 Of course, this technique causes TODO items to be scattered throughout
1775 your file.  Org-mode provides methods to give you an overview over all
1776 things you have to do.
1778 @menu
1779 * TODO basics::                 Marking and displaying TODO entries
1780 * Progress logging::            Document your productivity
1781 * TODO extensions::             Workflow and assignments
1782 * Priorities::                  Some things are more important than others
1783 @end menu
1785 @node TODO basics, Progress logging, TODO items, TODO items
1786 @section Basic TODO functionality
1788 Any headline can become a TODO item by starting it with the word TODO,
1789 for example:
1791 @example
1792 *** TODO Write letter to Sam Fortune
1793 @end example
1795 @noindent
1796 The most important commands to work with TODO entries are:
1798 @table @kbd
1799 @kindex C-c C-t
1800 @cindex cycling, of TODO states
1801 @item C-c C-t
1802 Rotate the TODO state of the current item between
1804 @example
1805 ,-> (unmarked) -> TODO -> DONE --.
1806 '--------------------------------'
1807 @end example
1809 The same rotation can also be done ``remotely'' from the timeline and
1810 agenda buffers with the @kbd{t} command key (@pxref{Agenda commands}).
1811 @kindex C-c C-v
1812 @cindex sparse tree, for TODO
1813 @item C-c C-v
1814 View TODO items in a @emph{sparse tree} (@pxref{Sparse trees}).  Folds
1815 the entire buffer, but shows all TODO items and the headings hierarchy
1816 above them.  With prefix arg, show also the DONE entries.  With
1817 numerical prefix N, show the tree for the Nth keyword in the variable
1818 @code{org-todo-keywords}.
1819 @kindex C-c a t
1820 @item C-c a t
1821 Show the global TODO list.  This collects the TODO items from all
1822 agenda files (@pxref{Agenda Views}) into a single buffer.  The buffer is in
1823 @code{agenda-mode}, so there are commands to examine and manipulate
1824 the TODO entries directly from that buffer (@pxref{Agenda commands}).
1825 @xref{Global TODO list}, for more information.
1826 @item @code{org-agenda-include-all-todo}
1827 If you would like to have all your TODO items listed as part of your
1828 agenda, customize the variable @code{org-agenda-include-all-todo}.
1829 @end table
1831 @node Progress logging, TODO extensions, TODO basics, TODO items
1832 @section Progress Logging
1833 @cindex progress logging
1834 @cindex logging, of progress
1835 If you want to keep track of @emph{when} a certain TODO item was
1836 finished, turn on logging with
1838 @lisp
1839 (setq org-log-done t)
1840 @end lisp
1842 @noindent
1843 Then each time you turn a TODO entry into DONE using either @kbd{C-c
1844 C-t} in the Org-mode buffer or @kbd{t} in the agenda buffer, a line
1845 @samp{CLOSED: [timestamp]} will be inserted just after the headline.
1846 If you turn the entry back into a TODO item again through further
1847 state cycling, that line will be removed again.  In the timeline
1848 (@pxref{Timeline}) and in the agenda (@pxref{Weekly/Daily Agenda}),
1849 you can then use the @kbd{L} key to display the TODO items closed on
1850 each day, giving you an overview of what has been done on a day.
1852 @node TODO extensions, Priorities, Progress logging, TODO items
1853 @section Extended use of TODO keywords
1854 @cindex extended TODO keywords
1856 The default implementation of TODO entries is just two states: TODO and
1857 DONE.  You can, however, use the TODO feature for more complicated
1858 things by configuring the variables @code{org-todo-keywords} and
1859 @code{org-todo-interpretation}.  Using special setup, you can even use
1860 TODO keywords in different ways in different org files.
1862 Note that @i{tags} are another way to classify headlines in general and
1863 TODO items in particular (@pxref{Tags}).
1865 @menu
1866 * Workflow states::             From TODO to DONE in steps
1867 * TODO types::                  I do this, Fred the rest
1868 * Per file keywords::           Different files, different requirements
1869 @end menu
1871 @node Workflow states, TODO types, TODO extensions, TODO extensions
1872 @subsection TODO keywords as workflow states
1873 @cindex TODO workflow
1874 @cindex workflow states as TODO keywords
1876 You can use TODO keywords to indicate different states in the process
1877 of working on an item, for example:
1879 @lisp
1880 (setq org-todo-keywords '("TODO" "FEEDBACK" "VERIFY" "DONE")
1881       org-todo-interpretation 'sequence)
1882 @end lisp
1884 @cindex completion, of TODO keywords
1885 Changing these variables becomes only effective in a new Emacs session.
1886 With this setup, the command @kbd{C-c C-t} will cycle an entry from
1887 TODO to FEEDBACK, then to VERIFY, and finally to DONE.  You may also
1888 use a prefix argument to quickly select a specific state.  For example
1889 @kbd{C-3 C-c C-t} will change the state immediately to VERIFY.
1890 If you define many keywords, you can use in-buffer completion (see
1891 @ref{Completion}) to insert these words into the buffer.
1893 @node TODO types, Per file keywords, Workflow states, TODO extensions
1894 @subsection TODO keywords as types
1895 @cindex TODO types
1896 @cindex names as TODO keywords
1897 @cindex types as TODO keywords
1899 The second possibility is to use TODO keywords to indicate different
1900 types of action items.  For example, you might want to indicate that
1901 items are for ``work'' or ``home''.  If you are into David Allen's
1902 @emph{Getting Things DONE}, you might want to use todo types
1903 @samp{NEXTACTION}, @samp{WAITING}, @samp{MAYBE}.  Or, when you work
1904 with several people on a single project, you might want to assign
1905 action items directly to persons, by using their names as TODO
1906 keywords.  This would be set up like this:
1908 @lisp
1909 (setq org-todo-keywords '("Fred" "Sara" "Lucy" "Mike" "DONE")
1910       org-todo-interpretation 'type)
1911 @end lisp
1913 In this case, different keywords do not indicate a sequence, but
1914 rather different types.  So it is normally not useful to change from
1915 one type to another.  Therefore, in this case the behavior of the
1916 command @kbd{C-c C-t} is changed slightly@footnote{This is also true
1917 for the @kbd{t} command in the timeline and agenda buffers.}.  When
1918 used several times in succession, it will still cycle through all
1919 names.  But when you return to the item after some time and execute
1920 @kbd{C-c C-t} again, it will switch from each name directly to DONE.
1921 Use prefix arguments or completion to quickly select a specific name.
1922 You can also review the items of a specific TODO type in a sparse tree
1923 by using a numeric prefix to @kbd{C-c C-v}.  For example, to see all
1924 things Lucy has to do, you would use @kbd{C-3 C-c C-v}.  To collect
1925 Lucy's items from all agenda files into a single buffer, you
1926 would use the prefix arg as well when creating the global todo list:
1927 @kbd{C-3 C-c t}.
1929 @node Per file keywords,  , TODO types, TODO extensions
1930 @subsection Setting up TODO keywords for individual files
1931 @cindex keyword options
1932 @cindex per file keywords
1934 It can be very useful to use different aspects of the TODO mechanism
1935 in different files, which is not possible with the global settings
1936 described above.  For file-local settings, you need to add special
1937 lines to the file which set the keywords and interpretation for that
1938 file only.  For example, to set one of the two examples discussed
1939 above, you need one of the following lines, starting in column zero
1940 anywhere in the file:
1942 @example
1943 #+SEQ_TODO: TODO FEEDBACK VERIFY DONE
1944 #+TYP_TODO: Fred Sara Lucy Mike DONE
1945 @end example
1947 @cindex Completion, of option keywords
1948 @kindex M-@key{TAB}
1949 @noindent To make sure you are using the correct keyword, type
1950 @samp{#+} into the buffer and then use @kbd{M-@key{TAB}} completion.
1952 @cindex DONE, final TODO keyword
1953 Remember that the last keyword must always mean that the item is DONE
1954 (you may use a different word, though).  Also note that in each file,
1955 only one of the two aspects of TODO keywords can be used.  After
1956 changing one of these lines, use @kbd{C-c C-c} with the cursor still
1957 in the line to make the changes known to Org-mode@footnote{Org-mode
1958 parses these lines only when Org-mode is activated after visiting a
1959 file.  @kbd{C-c C-c} with the cursor in a line starting with @samp{#+}
1960 is simply restarting Org-mode, making sure that these changes will be
1961 respected.}.
1963 If you want to use very many keywords, for example when working with a
1964 large group of people, you may split the names over several lines:
1966 @example
1967 #+TYP_TODO: Fred Sara Lucy Mike
1968 #+TYP_TODO: Luis George Jules Jessica
1969 #+TYP_TODO: Kim Arnold Peter
1970 #+TYP_TODO: DONE
1971 @end example
1973 @node Priorities,  , TODO extensions, TODO items
1974 @section Priorities
1975 @cindex priorities
1977 If you use Org-mode extensively to organize your work, you may end up
1978 with a number of TODO entries so large that you'd like to prioritize
1979 them.  This can be done by placing a @emph{priority cookie} into the
1980 headline, like this
1982 @example
1983 *** TODO [#A] Write letter to Sam Fortune
1984 @end example
1986 @noindent
1987 With its standard setup, Org-mode supports priorities @samp{A},
1988 @samp{B}, and @samp{C}.  @samp{A} is the highest priority.  An entry
1989 without a cookie is treated as priority @samp{B}.  Priorities make a
1990 difference only in the agenda (@pxref{Weekly/Daily Agenda}).
1992 @table @kbd
1993 @kindex @kbd{C-c ,}
1994 @item @kbd{C-c ,}
1995 Set the priority of the current item.  The command prompts for a
1996 priority character @samp{A}, @samp{B} or @samp{C}.  When you press
1997 @key{SPC} instead, the priority cookie is removed from the headline.
1998 The priorities can also be changed ``remotely'' from the timeline and
1999 agenda buffer with the @kbd{,} command (@pxref{Agenda commands}).
2001 @kindex S-@key{up}
2002 @kindex S-@key{down}
2003 @item S-@key{up}
2004 @itemx S-@key{down}
2005 Increase/decrease priority of current item.  Note that these keys are
2006 also used to modify time stamps (@pxref{Creating timestamps}).
2007 Furthermore, these keys are also used by CUA-mode
2008 (@pxref{Interaction}).
2009 @end table
2011 @node Timestamps, Tags, TODO items, Top
2012 @chapter Timestamps
2014 Items can be labeled with timestamps to make them useful for project
2015 planning.
2017 @menu
2018 * Time stamps::                 Assigning a time to a tree entry
2019 * Creating timestamps::         Commands which insert timestamps
2020 @end menu
2023 @node Time stamps, Creating timestamps, Timestamps, Timestamps
2024 @section Time stamps, deadlines and scheduling
2025 @cindex time stamps
2026 @cindex ranges, time
2027 @cindex date stamps
2028 @cindex deadlines
2029 @cindex scheduling
2031 A time stamp is a specification of a date (possibly with time) in a
2032 special format, either @samp{<2003-09-16 Tue>} or @samp{<2003-09-16
2033 Tue 09:39>}.  A time stamp can appear anywhere in the headline or body
2034 of an org-tree entry.  Its presence allows entries to be shown on specific
2035 dates in the agenda (@pxref{Weekly/Daily Agenda}).  We distinguish:
2037 @table @var
2038 @cindex timestamp
2039 @item TIMESTAMP
2040 A simple time stamp just assigns a date/time to an item.  In the
2041 timeline and agenda displays, the headline of the entry will be shown
2042 exactly on that date.
2044 @item TIMERANGE
2045 @cindex timerange
2046 Two time stamps connected by @samp{--} denote a time range.  The
2047 headline will be shown on the first and last day of the range, and on
2048 any dates that are displayed and fall in the range.  Here is an
2049 example:
2051 @example
2052 ** Meeting in Amsterdam
2053    <2004-08-23 Mon>--<2004-08-26 Thu>
2054 @end example
2056 @item DEADLINE
2057 @cindex DEADLINE keyword
2058 If a time stamp is preceded by the word @samp{DEADLINE:}, the task
2059 (most likely a TODO item) is supposed to be finished on that date, and
2060 it will be listed then.  In addition, the compilation for @emph{today}
2061 will carry a warning about the approaching or missed deadline,
2062 starting @code{org-deadline-warning-days} before the due date, and
2063 continuing until the entry is marked DONE.  An example:
2065 @example
2066 *** TODO write article about the Earth for the Guide
2067     The editor in charge is <bbdb:Ford Prefect>
2068     DEADLINE: <2004-02-29 Sun>
2069 @end example
2071 @item SCHEDULED
2072 @cindex SCHEDULED keyword
2073 If a time stamp is preceded by the word @samp{SCHEDULED:}, it means
2074 you are planning to start working on that task on the given date.  The
2075 headline will be listed under the given date.  In addition, a reminder
2076 that the scheduled date has passed will be present in the compilation
2077 for @emph{today}, until the entry is marked DONE.  I.e., the
2078 task will automatically be forwarded.
2079 @end table
2081 @node Creating timestamps,  , Time stamps, Timestamps
2082 @section Creating timestamps
2083 @cindex creating timestamps
2084 @cindex timestamps, creating
2086 For Org-mode to recognize time stamps, they need to be in the specific
2087 format.  All commands listed below produce time stamps in the correct
2088 format.
2090 @table @kbd
2091 @kindex C-c .
2092 @item C-c .
2093 Prompt for a date and insert a corresponding time stamp.  When the
2094 cursor is at a previously used time stamp, it is updated to NOW.  When
2095 this command is used twice in succession, a time range is inserted.
2097 @kindex C-u C-c .
2098 @item C-u C-c .
2099 Like @kbd{C-c .}, but use the alternative format which contains date
2100 and time.  The default time can be rounded to multiples of 5 minutes,
2101 see the option @code{org-time-stamp-rounding-minutes}.
2103 @kindex C-c !
2104 @item C-c !
2105 Like @kbd{C-c .}, but insert an inactive time stamp not triggering the
2106 agenda.
2108 @kindex C-c <
2109 @item C-c <
2110 Insert a time stamp corresponding to the cursor date in the Calendar.
2112 @kindex C-c >
2113 @item C-c >
2114 Access the Emacs calendar for the current date.  If there is a
2115 timestamp in the current line, goto the corresponding date
2116 instead.
2118 @kindex C-c C-o
2119 @item C-c C-o
2120 Access the agenda for the date given by the time stamp at point
2121 (@pxref{Weekly/Daily Agenda}).
2123 @kindex C-c C-d
2124 @item C-c C-d
2125 Insert @samp{DEADLINE} keyword along with a stamp.
2126 @kindex C-c C-w
2127 @cindex sparse tree, for deadlines
2128 @item C-c C-w
2129 Create a sparse tree with all deadlines that are either past-due, or
2130 which will become due within @code{org-deadline-warning-days}.
2131 With @kbd{C-u} prefix, show all deadlines in the file.  With a numeric
2132 prefix, check that many days.  For example, @kbd{C-1 C-c C-w} shows
2133 all deadlines due tomorrow.
2135 @kindex C-c C-s
2136 @item C-c C-s
2137 Insert @samp{SCHEDULED} keyword along with a stamp.
2139 @kindex S-@key{left}
2140 @kindex S-@key{right}
2141 @item S-@key{left}
2142 @itemx S-@key{right}
2143 Change date at cursor by one day.  These key bindings conflict with
2144 CUA-mode (@pxref{Interaction}).
2146 @kindex S-@key{up}
2147 @kindex S-@key{down}
2148 @item S-@key{up}
2149 @itemx S-@key{down}
2150 Change the item under the cursor in a timestamp.  The cursor can be on
2151 a year, month, day, hour or minute.  Note that if the cursor is not at
2152 a time stamp, these same keys modify the priority of an item.
2153 (@pxref{Priorities}). The key bindings also conflict with CUA-mode
2154 (@pxref{Interaction}).
2157 @kindex C-c C-y
2158 @cindex evaluate time range
2159 @item C-c C-y
2160 Evaluate a time range by computing the difference between start and
2161 end.  With prefix arg, insert result after the time range (in a table:
2162 into the following column).
2163 @end table
2165 @cindex date, reading in minibuffer
2166 @cindex time, reading in minibuffer
2167 @cindex calendar, for selecting date
2168 When Org-mode prompts for a date/time, the function reading your input
2169 will replace anything you choose not to specify with the current date
2170 and time.  For details, see the documentation string of
2171 @command{org-read-date}.  Also, a calender will pop up to allow
2172 selecting a date.  The calendar can be fully controlled from the
2173 minibuffer, and a date can be selected with the following commands:
2175 @table @kbd
2176 @kindex <
2177 @item <
2178 Scroll calendar backwards by one month.
2179 @kindex >
2180 @item >
2181 Scroll calendar forwards by one month.
2182 @kindex mouse-1
2183 @item mouse-1
2184 Select date by clicking on it.
2185 @kindex S-@key{right}
2186 @item S-@key{right}
2187 One day forward.
2188 @kindex S-@key{left}
2189 @item S-@key{left}
2190 One day back.
2191 @kindex S-@key{down}
2192 @item S-@key{down}
2193 One week forward.
2194 @kindex S-@key{up}
2195 @item S-@key{up}
2196 One week back.
2197 @kindex M-S-@key{right}
2198 @item M-S-@key{right}
2199 One month forward.
2200 @kindex M-S-@key{left}
2201 @item M-S-@key{left}
2202 One month back.
2203 @kindex @key{RET}
2204 @item @key{RET}
2205 Choose date in calendar (only if nothing typed into minibuffer).
2206 @end table
2208 @node Tags, Agenda Views, Timestamps, Top
2209 @chapter Tags
2210 @cindex tags
2211 @cindex headline tagging
2212 @cindex matching, tags
2213 @cindex sparse tree, tag based
2215 If you wish to implement a system to cross-correlate information, an
2216 excellent way is to assign @i{tags} to headline.  Org-mode has
2217 extensive support for using tags.
2219 Every headline can contain a list of tags, at the end of the headline.
2220 Tags are normal words containing letters, numbers, @samp{_}, and
2221 @samp{@@}.  Tags must be preceded and followed by a single colon; like
2222 @samp{:WORK:}.  Several tags can be specified like @samp{:WORK:URGENT:}.
2224 @menu
2225 * Tag inheritance::             Tags use the tree structure of the outline
2226 * Setting tags::                How to assign tags to a headline
2227 * Tag searches::                Searching for combinations of tags
2228 @end menu
2230 @node Tag inheritance, Setting tags, Tags, Tags
2231 @section Tag inheritance
2232 @cindex inheritance, of tags
2234 @i{Tags} make use of the hierarchical structure of outline trees.  If a
2235 heading has a certain tag, all subheadings will inherit the tag as
2236 well.  For example, in the list
2238 @example
2239 * Meeting with the French group      :WORK:
2240 ** Summary by Frank                  :BOSS:NOTES:
2241 *** TODO Prepare slides for him      :ACTION:
2242 @end example
2244 @noindent
2245 the final heading will have the tags @samp{:WORK:}, @samp{:BOSS:},
2246 @samp{:NOTES:}, and @samp{:ACTION:}.  When executing tag searches and
2247 Org-mode finds that a certain headline matches the search criterion, it
2248 will not check any sublevel headline, assuming that these likely also
2249 match, and that the list of matches can become very long.  However, this
2250 may not be what you want, and you can influence inheritance and
2251 searching using the variables @code{org-use-tag-inheritance} and
2252 @code{org-tags-match-list-sublevels}.
2254 @node Setting tags, Tag searches, Tag inheritance, Tags
2255 @section Setting tags
2256 @cindex setting tags
2258 @kindex M-@key{TAB}
2259 As Org-mode deals with plain text files, tags can simply be typed into
2260 the buffer.  After a colon, @kbd{M-@key{TAB}} offers completion on all
2261 tags being used in the current buffer.  There is also a special command
2262 for inserting tags:
2264 @table @kbd
2265 @kindex C-c C-c
2266 @item C-c C-c
2267 @cindex completion, of tags
2268 Enter new tags for the current headline.  The minibuffer will prompt for
2269 a list of tags and offer completion with respect to all other tags used
2270 in the current buffer.  Several tags, separated by colons, may be
2271 specified at the prompt.  After pressing @key{RET}, the tags will be
2272 inserted and aligned to @code{org-tags-column}.  When called with a
2273 @kbd{C-u} prefix, all tags in the current buffer will be aligned to that
2274 column, just to make things look nice.  TAGS are automatically realigned
2275 after promotion, demotion, and TODO state changes (@pxref{TODO basics}).
2276 @end table
2278 @node Tag searches,  , Setting tags, Tags
2279 @section Tag searches
2280 @cindex tag searches
2282 Once a tags system has been set up, it can be used to collect related
2283 information into special lists.
2285 @table @kbd
2286 @kindex C-c \
2287 @item C-c \
2288 Create a sparse tree with all headlines matching a tags search.
2289 @kindex C-c a m
2290 @item C-c a m
2291 Create a global list of tag matches from all agenda files.
2292 @xref{Matching headline tags}.
2293 @kindex C-c a M
2294 @item C-c a M
2295 Create a global list of tag matches from all agenda files, but check
2296 only TODO items and force checking subitems (see variable
2297 @code{org-tags-match-list-sublevels}).
2298 @end table
2300 A @i{tags} search string can use Boolean operators @samp{&} for AND and
2301 @samp{|} for OR.  @samp{&} binds more strongly than @samp{|}.
2302 Parenthesis are currently not implemented.  A tag may also be preceded
2303 by @samp{-}, to select against it, and @samp{+} is syntactic sugar for
2304 positive selection.  The AND operator @samp{&} is optional when @samp{+}
2305 or @samp{-} is present.  For example, @samp{+WORK-BOSS} would select all
2306 headlines that are tagged @samp{:WORK:}, but discard those also tagged
2307 @samp{:BOSS:}.  The search string @samp{WORK|LAPTOP} selects all lines
2308 tagged @samp{:WORK:} or @samp{:LAPTOP:}.  The string
2309 @samp{WORK|LAPTOP&NIGHT} requires that the @samp{:LAPTOP:} lines are
2310 also tagged @samp{NIGHT}.
2312 @node Agenda Views, Exporting, Tags, Top
2313 @chapter Agenda Views
2314 @cindex agenda views
2316 Due to the way Org-mode works, TODO items, time-stamped items, and
2317 tagged headlines can be scattered throughout a file or even a number of
2318 files.  To get an overview over open action items, or over events that
2319 are important for a particular date, this information must be collected,
2320 sorted and displayed in an organized way.
2322 Org-mode can select items based on various criteria, and display them
2323 in a separate buffer.  Three different views are provided:
2325 @itemize @bullet
2326 @item
2327 an @emph{agenda} that is like a calendar and shows information
2328 for specific dates
2329 @item
2330 a @emph{TODO list} that covers all unfinished
2331 action items, and
2332 @item
2333 a @emph{tags view} that shows information based on
2334 the tags associated with headlines in the outline tree.
2335 @end itemize
2337 @noindent
2338 The extracted information is displayed in a special @emph{agenda
2339 buffer}.  This buffer is read-only, but provides commands to visit the
2340 corresponding locations in the original Org-mode files, and even to
2341 edit these files remotely.
2343 @menu
2344 * Agenda files::                Files being searched for agenda information
2345 * Agenda dispatcher::           Keyboard access to agenda views
2346 * Weekly/Daily Agenda::         The calendar page with current tasks
2347 * Global TODO list::            All unfinished action items
2348 * Matching headline tags::      Structured information with fine-tuned search
2349 * Timeline::                    Time-sorted view for single file
2350 * Agenda commands::             Remote editing of org trees
2351 @end menu
2353 @node Agenda files, Agenda dispatcher, Agenda Views, Agenda Views
2354 @section Agenda files
2356 The information to be shown is collected from all @emph{agenda files},
2357 the files listed in the variable @code{org-agenda-files}@footnote{If the
2358 value of that variable is not a list, but a single file name, then the
2359 list of agenda files will be maintained in that external file.}.  Thus even
2360 if you only work with a single Org-mode file, this file should be put
2361 into that list@footnote{When using the dispatcher pressing @kbd{1}
2362 before selecting a command will actually limit the command to the
2363 current file, and ignore @code{org-agenda-files} until the next
2364 dispatcher command.}.  You can customize @code{org-agenda-files}, but
2365 the easiest way to maintain it is through the following commands
2367 @cindex files, adding to agenda list
2368 @table @kbd
2369 @kindex C-c [
2370 @item C-c [
2371 Add current file to the list of agenda files.  The file is added to
2372 the front of the list.  If it was already in the list, it is moved to
2373 the front.  With prefix arg, file is added/moved to the end.
2374 @kindex C-c ]
2375 @item C-c ]
2376 Remove current file from the list of agenda files.
2377 @kindex C-,
2378 @item C-,
2379 Cycle through agenda file list, visiting one file after the other.
2380 @end table
2382 @noindent
2383 The Org menu contains the current list of files and can be used
2384 to visit any of them.
2386 @node Agenda dispatcher, Weekly/Daily Agenda, Agenda files, Agenda Views
2387 @section The agenda dispatcher
2388 @cindex agenda dispatcher
2389 @cindex dispatching agenda commands
2390 @cindex custom agenda commands
2391 @cindex agenda commands, custom
2392 The views are created through a dispatcher that should be bound to a
2393 global key, for example @kbd{C-c a} (@pxref{Installation and
2394 activation}).  In the following we will assume that @kbd{C-c a} is
2395 indeed how the dispatcher is accessed and list keyboard access to
2396 commands accordingly.  After pressing @kbd{C-c a}, an additional
2397 letter is required to execute a command.  The dispatcher offers the
2398 following default commands:
2399 @table @kbd
2400 @item a
2401 Create the calendar-like agenda (@pxref{Weekly/Daily Agenda}).
2402 @item t / T
2403 Create a list of all TODO items (@pxref{Global TODO list}).
2404 @item m / M
2405 Create a list of headlines matching a TAGS expression (@pxref{Matching
2406 headline tags}).
2407 @end table
2409 You can also define custom commands that will be accessible through
2410 the dispatcher, just like the default commands.  Custom commands are
2411 global searches for tags and specific TODO keywords, or a variety of
2412 sparse tree creating commands (@pxref{Sparse trees}).  As sparse trees
2413 are only defined for a single org-mode file, these latter commands act
2414 on the current buffer instead of the list of agenda files.
2416 @kindex C-c a C
2417 Custom commands are configured in the variable
2418 @code{org-agenda-custom-commands}.  You can customize this variable,
2419 for example by pressing @kbd{C-c a C}.  You can also directly set it
2420 with Emacs Lisp in @file{.emacs}.  For example:
2422 @lisp
2423 (setq org-agenda-custom-commands
2424       '(("w" todo "WAITING")
2425         ("u" tags "+BOSS-URGENT")
2426         ("U" tags-tree "+BOSS-URGENT")
2427         ("f" occur-tree "\\<FIXME\\>")))
2428 @end lisp
2430 @noindent will define @kbd{C-c a w} as a global search for
2431 TODO entries with @samp{WAITING} as the TODO keyword, @kbd{C-c a u} as a
2432 global tags search for headlines marked @samp{:BOSS:} but not
2433 @samp{:URGENT:}, @kbd{C-c a U} to do the same search but only in the
2434 current buffer and display the result as a sparse tree, and @kbd{C-c a
2435 f} to create a sparse tree with all entries containing the word
2436 @samp{FIXME}.  For more information, look at the documentation string
2437 of the variable @code{org-agenda-custom-commands}.
2439 @node Weekly/Daily Agenda, Global TODO list, Agenda dispatcher, Agenda Views
2440 @section The weekly/daily agenda
2441 @cindex agenda
2443 The purpose of the weekly/daily @emph{agenda} is to act like a page of
2444 a paper agenda, showing all the tasks for the current week or day.
2446 @table @kbd
2447 @cindex org-agenda, command
2448 @kindex C-c a a
2449 @item C-c a a
2450 Compile an agenda for the current week from a list of org files.  The
2451 agenda shows the entries for each day.  With a @kbd{C-u} prefix (or
2452 when the variable @code{org-agenda-include-all-todo} is @code{t}), all
2453 unfinished TODO items (including those without a date) are also listed at
2454 the beginning of the buffer, before the first date.@*
2455 @end table
2457 Remote editing from the agenda buffer means, for example, that you can
2458 change the dates of deadlines and appointments from the agenda buffer.
2459 The commands available in the Agenda buffer are listed in @ref{Agenda
2460 commands}.
2462 @menu
2463 * Categories::                  Not all tasks are equal
2464 * Time-of-day specifications::  How the agenda knows the time
2465 * Calendar/Diary integration::  Integrating Anniversaries and more
2466 * Sorting of agenda items::     The order of things
2467 @end menu
2469 @node Categories, Time-of-day specifications, Weekly/Daily Agenda, Weekly/Daily Agenda
2470 @subsection Categories
2472 @cindex category
2473 In the agenda buffer, each entry is preceded by a @emph{category},
2474 which is derived from the file name.  The category can also be set
2475 with a special line anywhere in the buffer, looking like this:
2477 @example
2478 #+CATEGORY: Thesis
2479 @end example
2481 If there are several such lines in a file, each specifies the category
2482 for the text below it (but the first category also applies to any text
2483 before the first CATEGORY line).  The display in the agenda buffer looks
2484 best if the category is not longer than 10 characters.
2486 @node Time-of-day specifications, Calendar/Diary integration, Categories, Weekly/Daily Agenda
2487 @subsection Time-of-Day Specifications
2489 Org-mode checks each agenda item for a time-of-day specification.  The
2490 time can be part of the time stamp that triggered inclusion into the
2491 agenda, for example as in @w{@samp{<2005-05-10 Tue 19:00>}}.  Time
2492 ranges can be specified with two time stamps, like
2494 @w{@samp{<2005-05-10 Tue 20:30>--<2005-05-10 Tue 22:15>}}.
2496 In the headline of the entry itself, a time(range) may also appear as
2497 plain text (like @samp{12:45} or a @samp{8:30-1pm}.  If the agenda
2498 integrates the Emacs diary (@pxref{Calendar/Diary integration}), time
2499 specifications in diary entries are recognized as well.
2501 For agenda display, Org-mode extracts the time and displays it in a
2502 standard 24 hour format as part of the prefix.  The example times in
2503 the previous paragraphs would end up in the agenda like this:
2505 @example
2506     8:30-13:00 Arthur Dent lies in front of the bulldozer
2507    12:45...... Ford Prefect arrives and takes Arthur to the pub
2508    19:00...... The Vogon reads his poem
2509    20:30-22:15 Marwin escorts the Hitchhikers to the bridge
2510 @end example
2512 If the agenda is in single-day mode, or for the display of today, the
2513 timed entries are embedded in a time grid, like
2515 @example
2516     8:00...... ------------------
2517     8:30-13:00 Arthur Dent lies in front of the bulldozer
2518    10:00...... ------------------
2519    12:00...... ------------------
2520    12:45...... Ford Prefect arrives and takes Arthur to the pub
2521    14:00...... ------------------
2522    16:00...... ------------------
2523    18:00...... ------------------
2524    19:00...... The Vogon reads his poem
2525    20:00...... ------------------
2526    20:30-22:15 Marwin escorts the Hitchhikers to the bridge
2527 @end example
2529 The time grid can be turned on and off with the variable
2530 @code{org-agenda-use-time-grid}, and can be configured with
2531 @code{org-agenda-time-grid}.
2534 @node Calendar/Diary integration, Sorting of agenda items, Time-of-day specifications, Weekly/Daily Agenda
2535 @subsection Calendar/Diary integration
2536 @cindex calendar integration
2537 @cindex diary integration
2539 Emacs contains the calendar and diary by Edward M. Reingold.  The
2540 calendar displays a three-month calendar with holidays from different
2541 countries and cultures.  The diary allows you to keep track of
2542 anniversaries, lunar phases, sunrise/set, recurrent appointments
2543 (weekly, monthly) and more.  In this way, it is quite complementary to
2544 Org-mode.  It can be very useful to combine output from Org-mode with
2545 the diary.
2547 In order to include entries from the Emacs diary into Org-mode's
2548 agenda, you only need to customize the variable
2550 @lisp
2551 (setq org-agenda-include-diary t)
2552 @end lisp
2554 @noindent After that, everything will happen automatically.  All diary
2555 entries including holidays, anniversaries etc will be included in the
2556 agenda buffer created by Org-mode.  @key{SPC}, @key{TAB}, and
2557 @key{RET} can be used from the agenda buffer to jump to the diary
2558 file in order to edit existing diary entries.  The @kbd{i} command to
2559 insert new entries for the current date works in the agenda buffer, as
2560 well as the commands @kbd{S}, @kbd{M}, and @kbd{C} to display
2561 Sunrise/Sunset times, show lunar phases and to convert to other
2562 calendars, respectively.  @kbd{c} can be used to switch back and forth
2563 between calendar and agenda.
2565 @node Sorting of agenda items,  , Calendar/Diary integration, Weekly/Daily Agenda
2566 @subsection Sorting of agenda items
2567 @cindex sorting, of agenda items
2568 @cindex priorities, of agenda items
2569 The entries for each day are sorted.  The default order is to first
2570 collect all items containing an explicit time-of-day specification.
2571 These entries will be shown at the beginning of the list, as a
2572 @emph{schedule} for the day.  After that, items remain grouped in
2573 categories, in the sequence given by @code{org-agenda-files}.  Within
2574 each category, items are sorted by priority (@pxref{Priorities}).
2576 The priority is a numerical quantity composed of the base priority
2577 (2000 for priority @samp{A}, 1000 for @samp{B}, and 0 for @samp{C}),
2578 plus additional increments for overdue scheduled or deadline items.
2580 Sorting can be customized using the variable
2581 @code{org-agenda-sorting-strategy}.
2584 @node Global TODO list, Matching headline tags, Weekly/Daily Agenda, Agenda Views
2585 @section The global TODO list
2586 @cindex global TODO list
2587 @cindex TODO list, global
2589 The global TODO list contains all unfinished TODO items, formatted and
2590 collected into a single place.
2592 @table @kbd
2593 @kindex C-c a t
2594 @item C-c a t
2595 Show the global TODO list.  This collects the TODO items from all
2596 agenda files (@pxref{Agenda Views}) into a single buffer.  The buffer is in
2597 @code{agenda-mode}, so there are commands to examine and manipulate
2598 the TODO entries directly from that buffer (@pxref{Agenda commands}).
2599 @xref{Global TODO list}, for more information.
2600 @kindex C-c a T
2601 @item C-c a T
2602 Like the above, but allows selection of a specific TODO keyword.  You can
2603 also do this by specifying a prefix argument to @kbd{C-c a t}.  With a
2604 @kbd{C-u} prefix you are prompted for a keyword.  With a numeric
2605 prefix, the Nth keyword in @code{org-todo-keywords} is selected.
2606 @kindex r
2607 The @kbd{r} key in the agenda buffer regenerates it, and you can give
2608 a prefix argument to this command to change the selected TODO keyword,
2609 for example @kbd{3 r}.  If you often need a search for a specific
2610 keyword, define a custom command for it (@pxref{Agenda dispatcher}).
2611 @end table
2613 Remote editing of TODO items means that you can change the state of a
2614 TODO entry with a single key press.  The commands available in the
2615 TODO list are described in @ref{Agenda commands}.
2617 @node Matching headline tags, Timeline, Global TODO list, Agenda Views
2618 @section Matching headline tags
2619 @cindex matching, of tags
2620 @cindex tags view
2622 If headlines in the agenda files are marked with @emph{tags}
2623 (@pxref{Tags}), you can select headlines based on the tags that apply
2624 to them and collect them into an agenda buffer.
2626 @table @kbd
2627 @kindex C-c a m
2628 @item C-c a m
2629 Produce a list of all headlines that match a given set of tags.  The
2630 command prompts for a selection criterion, which is a boolean logic
2631 expression with tags, like @samp{+WORK+URGENT-WITHBOSS} or
2632 @samp{WORK|HOME} (@pxref{Tags}).  If you often need a specific search,
2633 define a custom command for it (@pxref{Agenda dispatcher}).
2634 @kindex C-c a M
2635 @item C-c a M
2636 Like @kbd{C-c a m}, but only select headlines that are also TODO items
2637 and force checking subitems (see variable
2638 @code{org-tags-match-list-sublevels}.
2639 @end table
2641 The commands available in the tags list are described in @ref{Agenda
2642 commands}.
2644 @node Timeline, Agenda commands, Matching headline tags, Agenda Views
2645 @section Timeline for a single file
2646 @cindex single file summary
2647 @cindex agenda, for single file
2648 @cindex timeline, single file
2649 @cindex time-sorted view
2651 The timeline is not really an agenda view, because it only summarizes
2652 items from a single Org-mode file.  But it also uses the agenda buffer
2653 and provides similar commands, so we discuss it here.  The timeline
2654 shows all time-stamped items in a single Org-mode file (or the
2655 selected part of it), in a @emph{time-sorted view}.  The main purpose of
2656 this command is to give an overview over events in a project.
2658 @table @kbd
2659 @kindex C-c C-r
2660 @item C-c C-r
2661 Show a time-sorted view of the org file, with all time-stamped items.
2662 When called with a @kbd{C-u} prefix, all unfinished TODO entries
2663 (scheduled or not) are also listed under the current date.
2664 @end table
2666 @noindent
2667 The commands available in the timeline buffer are listed in
2668 @ref{Agenda commands}.
2670 @node Agenda commands,  , Timeline, Agenda Views
2671 @section Commands in the agenda buffer
2672 @cindex commands, in agenda buffer
2674 Entries in the agenda buffer are linked back to the org file or diary
2675 file where they originate.  You are not allowed to edit the agenda
2676 buffer itself, but commands are provided to show and jump to the
2677 original entry location, and to edit the org-files ``remotely'' from
2678 the agenda buffer.  In this way, all information is stored only once,
2679 removing the risk that your agenda and note files may diverge.
2681 Some commands can be executed with mouse clicks on agenda lines.  For
2682 the other commands, the cursor needs to be in the desired line.
2684 @table @kbd
2685 @tsubheading{Motion}
2686 @kindex n
2687 @item n
2688 Next line (same as @key{up}).
2689 @kindex p
2690 @item p
2691 Previous line (same as @key{down}).
2692 @tsubheading{View/GoTo org file}
2693 @kindex mouse-3
2694 @kindex @key{SPC}
2695 @item mouse-3
2696 @itemx @key{SPC}
2697 Display the original location of the item in another window.
2699 @kindex L
2700 @item L
2701 Display original location and recenter that window.
2703 @kindex mouse-2
2704 @kindex mouse-1
2705 @kindex @key{TAB}
2706 @item mouse-2
2707 @itemx mouse-1
2708 @itemx @key{TAB}
2709 Go to the original location of the item in another window.  Under Emacs
2710 22, @kbd{mouse-1} will also works for this.
2712 @kindex @key{RET}
2713 @itemx @key{RET}
2714 Go to the original location of the item and delete other windows.
2716 @kindex f
2717 @item f
2718 Toggle Follow mode.  In Follow mode, as you move the cursor through
2719 the agenda buffer, the other window always shows the corresponding
2720 location in the org file.
2722 @kindex l
2723 @item l
2724 Toggle Logbook mode.  In Logbook mode, entries that where marked DONE while
2725 logging was on (variable @code{org-log-done}) are shown in the agenda.
2727 @tsubheading{Change display}
2728 @kindex o
2729 @item o
2730 Delete other windows.
2732 @kindex w
2733 @item w
2734 Switch to weekly view (7 days displayed together).
2736 @kindex d
2737 @item d
2738 Switch to daily view (just one day displayed).
2740 @kindex D
2741 @item D
2742 Toggle the inclusion of diary entries.  See @ref{Calendar/Diary integration}.
2744 @kindex g
2745 @item g
2746 Toggle the time grid on and off.  See also the variables
2747 @code{org-agenda-use-time-grid} and @code{org-agenda-time-grid}.
2749 @kindex r
2750 @item r
2751 Recreate the agenda buffer, for example to reflect the changes
2752 after modification of the time stamps of items with S-@key{left} and
2753 S-@key{right}.  When the buffer is the global todo list, a prefix
2754 argument is interpreted to create a selective list for a specific TODO
2755 keyword.
2757 @kindex @key{right}
2758 @item @key{right}
2759 Display the following @code{org-agenda-ndays} days.  For example, if
2760 the display covers a week, switch to the following week.  With prefix
2761 arg, go forward that many times @code{org-agenda-ndays} days.
2763 @kindex @key{left}
2764 @item @key{left}
2765 Display the previous dates.
2767 @kindex .
2768 @item .
2769 Goto today.
2771 @tsubheading{Remote editing}
2773 @item 0-9
2774 Digit argument.
2776 @kindex t
2777 @item t
2778 Change the TODO state of the item, both in the agenda and in the
2779 original org file.
2781 @kindex T
2782 @item T
2783 Show all tags associated with the current item.  Because of
2784 inheritance, this may be more than the tags listed in the line itself.
2786 @kindex :
2787 @item :
2788 Set tags for the current headline.
2790 @kindex ,
2791 @item ,
2792 Set the priority for the current item.  Org-mode prompts for the
2793 priority character. If you reply with @key{SPC}, the priority cookie
2794 is removed from the entry.
2796 @kindex P
2797 @item p
2798 Display weighted priority of current item.
2800 @kindex +
2801 @kindex S-@key{up}
2802 @item +
2803 @itemx S-@key{up}
2804 Increase the priority of the current item.  The priority is changed in
2805 the original buffer, but the agenda is not resorted.  Use the @kbd{r}
2806 key for this.
2808 @kindex -
2809 @kindex S-@key{down}
2810 @item -
2811 @itemx S-@key{down}
2812 Decrease the priority of the current item.
2814 @kindex S-@key{right}
2815 @item S-@key{right}
2816 Change the time stamp associated with the current line by one day into
2817 the future.  With prefix argument, change it by that many days.  For
2818 example, @kbd{3 6 5 S-@key{right}} will change it by a year.  The
2819 stamp is changed in the original org file, but the change is not
2820 directly reflected in the agenda buffer.  Use the
2821 @kbd{r} key to update the buffer.
2823 @kindex S-@key{left}
2824 @item S-@key{left}
2825 Change the time stamp associated with the current line by one day
2826 into the past.
2828 @kindex >
2829 @item >
2830 Change the time stamp associated with the current line to today.
2831 The key @kbd{>} has been chosen, because it is the same as @kbd{S-.}
2832 on my keyboard.
2834 @cindex diary entries, creating from agenda
2835 @kindex i
2836 @item i
2837 Insert a new entry into the diary.  Prompts for the type of entry
2838 (day, weekly, monthly, yearly, anniversary, cyclic) and creates a new
2839 entry in the diary, just like @kbd{i d} etc. would do in the calendar.
2840 The date is taken from the cursor position.
2842 @tsubheading{Calendar commands}
2843 @kindex c
2844 @item c
2845 Open the Emacs calendar and move to the date at the agenda cursor.
2847 @item c
2848 When in the calendar, compute and show the Org-mode agenda for the
2849 date at the cursor.
2851 @kindex M
2852 @item M
2853 Show the phases of the moon for the three months around current date.
2855 @kindex S
2856 @item S
2857 Show sunrise and sunset times.  The geographical location must be set
2858 with calendar variables, see documentation of the Emacs calendar.
2860 @kindex C
2861 @item C
2862 Convert the date at cursor into many other cultural and historic
2863 calendars.
2865 @kindex H
2866 @item H
2867 Show holidays for three month around the cursor date.
2869 @kindex C-c C-x C-c
2870 @item C-c C-x C-c
2871 Export a single iCalendar file containing entries from all agenda files.
2873 @tsubheading{Quit and Exit}
2874 @kindex q
2875 @item q
2876 Quit agenda, remove the agenda buffer.
2878 @kindex x
2879 @cindex agenda files, removing buffers
2880 @item x
2881 Exit agenda, remove the agenda buffer and all buffers loaded by Emacs
2882 for the compilation of the agenda.  Buffers created by the user to
2883 visit org files will not be removed.
2885 @end table
2887 @node Exporting, Miscellaneous, Agenda Views, Top
2888 @chapter Exporting
2889 @cindex exporting
2891 For printing and sharing of notes, Org-mode documents can be exported
2892 as ASCII or HTML files.  To incorporate entries with associated times
2893 like deadlines or appointments into a desktop calendar program like
2894 iCal, Org-mode can also produce extracts in the iCalendar format.
2896 @menu
2897 * ASCII export::                Export as a structured ASCII file
2898 * HTML export::                 Export as an HTML file
2899 * iCalendar export::            Create calendar entries.
2900 @end menu
2902 @node ASCII export, HTML export, Exporting, Exporting
2903 @section ASCII export
2904 @cindex ASCII export
2906 @cindex region, active
2907 @cindex active region
2908 @cindex transient-mark-mode
2909 @table @kbd
2910 @kindex C-c C-x a
2911 @item C-c C-x a
2912 Export as ASCII file.  If there is an active region, only the region
2913 will be exported.  For an org file @file{myfile.org}, the ASCII file
2914 will be @file{myfile.txt}.  The file will be overwritten without
2915 warning.
2916 @end table
2918 @cindex headline levels, for exporting
2919 In the exported version, the first 3 outline levels will become
2920 headlines, defining a general document structure.  Additional levels
2921 will be exported as itemized lists.  If you want that transition to occur
2922 at a different level, specify it with a prefix argument.  For example,
2924 @example
2925 @kbd{C-1 C-c C-x a org-export-as-ascii}
2926 @end example
2928 @noindent
2929 creates only top level headlines and does the rest as items.  Lines
2930 starting with @samp{#} and subtrees starting with the word @samp{COMMENT}
2931 will not be exported.
2933 @node HTML export, iCalendar export, ASCII export, Exporting
2934 @section HTML export
2935 @cindex HTML export
2937 Org-mode contains an HTML exporter with extensive HTML formatting, in
2938 ways similar to John Grubers @emph{markdown} language, but with
2939 additional support for tables.
2941 @cindex region, active
2942 @cindex active region
2943 @cindex transient-mark-mode
2944 @table @kbd
2945 @kindex C-c C-x h
2946 @item C-c C-x h
2947 Export as HTML file @file{myfile.html}.
2948 @kindex C-c C-x b
2949 @item C-c C-x b
2950 Export as HTML file and open it with a browser.
2951 @kindex C-c C-x t
2952 @item C-c C-x t
2953 Insert template with export options, see below.
2954 @kindex C-c :
2955 @item C-c :
2956 Toggle fixed-width for entry (QUOTE) or region, see below.
2957 @end table
2959 @cindex headline levels, for exporting
2960 In the exported version, the first 3 outline levels will become
2961 headlines, defining a general document structure.  Additional levels
2962 will be exported as itemized lists.  If you want that transition to occur
2963 at a different level, specify it with a prefix argument.  For example,
2965 @example
2966 @kbd{C-2 C-c C-x b}
2967 @end example
2969 @noindent
2970 creates two levels of headings and does the rest as items.
2972 @menu
2973 * HTML formatting::             Interpretation of the buffer content
2974 * Export options::              How to influence exports
2975 * Comment lines::               Lines which will not be exported
2976 @end menu
2978 @node HTML formatting, Export options, HTML export, HTML export
2979 @subsection HTML formatting
2981 Not all text is transferred literally to the exported HTML file.  The
2982 exporter implements the following interpretation:
2984 @itemize @bullet
2986 @cindex hand-formatted lists
2987 @cindex lists, hand-formatted
2988 @item
2989 Hand-formatted lists with @samp{-}, @samp{*} or @samp{+} as
2990 bullet, or with @samp{1.} or @samp{2)} as enumerator will be recognized and
2991 transformed into HTML lists.  See @xref{Plain Lists}.
2993 @cindex underlined text
2994 @cindex bold text
2995 @cindex italic text
2996 @item
2997 You can make words @b{*bold*}, @i{/italic/}, and _underlined_
2999 @cindex @TeX{} interpretation
3000 @item
3001 Simple @TeX{}-like math constructs are interpreted:
3003 @cindex completion, of @TeX{} symbols
3004 @itemize @minus
3005 @item
3006 @samp{10^22} and @samp{J_n} are super- and subscripts.  You can quote
3007 @samp{^} and @samp{_} with a backslash: @samp{\_} and @samp{\^}
3008 @item
3009 @samp{\alpha} indicates a Greek letter, @samp{\to} an arrow.  You can
3010 use completion for these macros, just type @samp{\} and maybe a few
3011 letters, and press @kbd{M-@key{TAB}} to see possible completions.
3012 @end itemize
3014 @cindex tables, export to HTML
3015 @item
3016 Tables are transformed into HTML tables.  Data fields before the first
3017 horizontal separator line will be formatted as table header fields.
3019 @cindex fixed width
3020 @item
3021 If a headline starts with the word @samp{QUOTE}, the text below the
3022 headline will be typeset as fixed-width, to allow quoting of computer
3023 codes etc.  Lines starting with @samp{:} are also typeset in
3024 fixed-width font.
3026 @cindex HTML tags
3027 @item
3028 If you want to include HTML tags which should be interpreted as such,
3029 mark them with a @samp{@@} like in @samp{@@<b>bold text@@</b>}.
3030 Plain @samp{<} and @samp{>} are always transformed to @samp{&lt;} and
3031 @samp{&gt;} in HTML export.
3032 @end itemize
3034 If these conversions conflict with your habits of typing ASCII text,
3035 they can all be turned off with corresponding variables.
3037 @node Export options, Comment lines, HTML formatting, HTML export
3038 @subsection Export options
3039 @cindex options, for export
3041 @cindex completion, of option keywords
3042 The exporter recognizes special lines in the buffer which provide
3043 additional information.  These lines may be put anywhere in the file.
3044 The whole set of lines can be inserted into the buffer with @kbd{C-c
3045 C-x t}.  For individual lines, a good way to make sure the keyword is
3046 correct is to type @samp{#+} and then use @kbd{M-@key{TAB}} completion
3047 (@pxref{Completion}).
3049 @example
3050 #+TITLE:     the title to be shown (default is the buffer name)
3051 #+AUTHOR:    the author (default taken from @code{user-full-name})
3052 #+EMAIL:     his/her email address (default from @code{user-mail-address})
3053 #+LANGUAGE:  language for HTML, e.g. @samp{en} (@code{org-export-default-language})
3054 #+TEXT:      Some descriptive text to be inserted at the beginning.
3055 #+TEXT:      Several lines may be given.
3056 #+OPTIONS:   H:2  num:t  toc:t  \n:nil  @:t  ::t  |:t  ^:t  *:nil  TeX:t
3057 @end example
3059 @noindent
3060 The OPTIONS line is a compact form to specify export settings.  Here
3061 you can:
3062 @cindex headline levels
3063 @cindex section-numbers
3064 @cindex table of contents
3065 @cindex linebreak preservation
3066 @cindex quoted html tags
3067 @cindex fixed-width sections
3068 @cindex tables
3069 @cindex @TeX{}-like syntax for sub- and superscripts
3070 @cindex emphasized text
3071 @cindex @TeX{} macros
3072 @example
3073 H:      @r{set the number of headline levels for export}
3074 num:    @r{turn on/off section-numbers}
3075 toc:    @r{turn on/off table of contents}
3076 \n:     @r{turn on/off linebreak-preservation}
3077 @@:      @r{turn on/off quoted html tags}
3078 ::      @r{turn on/off fixed-width sections}
3079 |:      @r{turn on/off tables}
3080 ^:      @r{turn on/off @TeX{}-like syntax for sub- and superscripts.}
3081 *:      @r{turn on/off emphasized text (bold, italic, underlined)}
3082 TeX:    @r{turn on/off @TeX{} macros}
3083 @end example
3085 You can also give style information for the exported file.  The
3086 default specification can be configured through the option
3087 @code{org-export-html-style}.  If you want to use a file-local style,
3088 you may use file variables, best wrapped into a COMMENT section at the
3089 end of the outline tree.  For example:
3091 @example
3092 * COMMENT HTML style specifications
3094 # Local Variables:
3095 # org-export-html-style: "   <style type=\"text/css\">
3096        p @{font-weight: normal; color: gray; @}
3097        h1 @{color: black; @}
3098    </style>"
3099 # End: ***
3100 @end example
3102 Remember to execute @kbd{M-x normal-mode} after changing this to make
3103 the new style visible to Emacs.  This command reastarts org-mode for the
3104 current buffer and forces Emacs to re-evaluate the loval variables
3105 section in the buffer.
3107 @node Comment lines,  , Export options, HTML export
3108 @subsection Comment lines
3109 @cindex comment lines
3110 @cindex exporting, not
3112 Lines starting with @samp{#} in column zero are treated as comments
3113 and will never be exported.  Also entire subtrees starting with the
3114 word @samp{COMMENT} will never be exported.  Finally, any text before
3115 the first headline will not be exported either.  This applies also for
3116 ASCII export.
3118 @table @kbd
3119 @kindex C-c ;
3120 @item C-c ;
3121 Toggle the COMMENT keyword at the beginning of an entry.
3122 @end table
3124 @node iCalendar export,  , HTML export, Exporting
3125 @section iCalendar export
3126 @cindex iCalendar export
3128 Some people like to use Org-mode for keeping track of projects, but
3129 still prefer a standard calendar application for anniversaries and
3130 appointments.  In this case it can be useful to have deadlines and
3131 other time-stamped items in Org-mode files show up in the calendar
3132 application.  Org-mode can export calendar information in the standard
3133 iCalendar format.
3135 @table @kbd
3136 @kindex C-c C-x i
3137 @item C-c C-x i
3138 Create iCalendar entries for the current file and store them in the same
3139 directory, using a file extension @file{.ics}.
3140 @kindex C-c C-x C-i
3141 @item C-c C-x C-i
3142 Like @kbd{C-c C-x i}, but do this for all files in
3143 @code{org-agenda-files}.  For each of these files, a separate iCalendar
3144 file will be written.
3145 @kindex C-c C-x c
3146 @item C-c C-x c
3147 Create a single large iCalendar file from all files in
3148 @code{org-agenda-files} and write it to the file given by
3149 @code{org-combined-agenda-icalendar-file}.
3150 @end table
3152 How this calendar is best read and updated, depends on the application
3153 you are using.  For example, when using iCal under Apple MacOS X, you
3154 could create a new calendar @samp{OrgMode} (the default name for the
3155 calendar created by @kbd{C-c C-x c}, see the variables
3156 @code{org-icalendar-combined-name} and
3157 @code{org-combined-agenda-icalendar-file}).  Then set Org-mode to
3158 overwrite the corresponding file
3159 @file{~/Library/Calendars/OrgMode.ics}.  You may even use AppleScript
3160 to make iCal re-read the calendar files each time a new version of
3161 @file{OrgMode.ics} is produced.  Here is the setup needed for this:
3163 @cindex applescript, for calendar update
3164 @lisp
3165 (setq org-combined-agenda-icalendar-file
3166     "~/Library/Calendars/OrgMode.ics")
3167 (add-hook 'org-after-save-iCalendar-file-hook
3168  (lambda ()
3169   (shell-command
3170    "osascript -e 'tell application \"iCal\" to reload calendars'")))
3171 @end lisp
3173 @node Miscellaneous, Index, Exporting, Top
3174 @chapter Miscellaneous
3176 @menu
3177 * Completion::                  M-TAB knows what you need
3178 * Customization::               Adapting Org-mode to your taste
3179 * Updating settings::           How to tell Org-mode that settings have changed
3180 * Clean view::                  Getting rid of leading stars in the outline
3181 * TTY keys::                    Using Org-mode on a tty
3182 * FAQ::                         Frequently asked questions
3183 * Interaction::                 Other Emacs packages
3184 * Bugs::                        Things which do not work perfectly
3185 * Acknowledgments::             These people provided feedback and more
3186 @end menu
3188 @node Completion, Customization, Miscellaneous, Miscellaneous
3189 @section Completion
3190 @cindex completion, of @TeX{} symbols
3191 @cindex completion, of TODO keywords
3192 @cindex completion, of dictionary words
3193 @cindex completion, of option keywords
3194 @cindex completion, of CamelCase links
3195 @cindex completion, of tags
3196 @cindex @TeX{} symbol completion
3197 @cindex TODO keywords completion
3198 @cindex dictionary word completion
3199 @cindex option keyword completion
3200 @cindex CamelCase link completion
3201 @cindex tag completion
3203 Org-mode supports in-buffer completion.  This type of completion does
3204 not make use of the minibuffer.  You simply type a few letters into
3205 the buffer and use the key to complete text right there.
3207 @table @kbd
3208 @kindex M-@key{TAB}
3209 @item M-@key{TAB}
3210 Complete word at point
3211 @itemize @bullet
3212 @item
3213 At the beginning of a headline, complete TODO keywords.
3214 @item
3215 After @samp{\}, complete @TeX{} symbols supported by the exporter.
3216 @item
3217 After @samp{*}, complete CamelCase versions of all headlines in the
3218 buffer.
3219 @item
3220 After @samp{:}, complete tags used elsewhere in the buffer.
3221 @item
3222 After @samp{#+}, complete the special keywords like @samp{TYP_TODO} or
3223 @samp{OPTIONS} which set file-specific options for Org-mode.  When the
3224 option keyword is already complete, pressing @kbd{M-@key{TAB}} again
3225 will insert example settings for this keyword.
3226 @item
3227 Elsewhere, complete dictionary words using ispell.
3228 @end itemize
3229 @end table
3232 @node Customization, Updating settings, Completion, Miscellaneous
3233 @section Customization
3234 @cindex customization
3235 @cindex options, for customization
3236 @cindex variables, for customization
3238 There are more than 100 variables that can be used to customize
3239 Org-mode.  For the sake of compactness of the manual, we are not
3240 describing the variables here.  A structured overview of customization
3241 variables is available with @kbd{M-x org-customize}.  Or select
3242 @code{Browse Org Group} from the @code{Org->Customization} menu.
3244 @node Updating settings, Clean view, Customization, Miscellaneous
3245 @section Updating settings after changes
3246 @cindex updating, after setting changes
3247 @kindex C-c C-c
3249 Org-mode uses special lines in the buffer to set file-local values for a
3250 number of user options.  When such settings are changed, you need to
3251 inform Org-mode that something has be modified and that it should
3252 recheck the buffer for setting.  This is done with the command @kbd{C-c
3253 C-c} in the following situations:
3255 @itemize @bullet
3256 @item
3257 After changing any of the special buffer lines starting with @samp{#+},
3258 for example @samp{#+STARTUP}, @samp{#+CATEGORY}.  Org-mode will then
3259 read these settings and activate them (see @ref{Visibility cycling},
3260 @ref{Narrow columns}, @ref{Clean view}, @ref{Per file keywords},
3261 @ref{Categories})
3262 @item
3263 After editing by hand a @samp{#+TBLFM} line containing formulas for a
3264 table.  When pressing @kbd{C-c C-c} in that line, all formulas are
3265 re-applied to the entire table (@pxref{Editing/debugging formulas}).
3266 @item
3267 In a table, @kbd{C-c C-c} does force a re-align, even if the table
3268 editor is turned off (@pxref{Built-in table editor})
3269 @item
3270 In an ordered plain list, @kbd{C-c C-c} forces a renumbering of the list
3271 (@pxref{Plain Lists}).
3272 @item
3273 After adding a new radio target @samp{<<<New target>>>}, @kbd{C-c C-c}
3274 must be used with the cursor on that target to activate it throughout
3275 the buffer.
3276 @end itemize
3278 @node Clean view, TTY keys, Updating settings, Miscellaneous
3279 @section A cleaner outline view
3280 @cindex hiding leading stars
3281 @cindex clean outline view
3283 Some people find it noisy and distracting that the Org-mode headlines
3284 are starting with a potentially large number of stars.  For example
3285 the tree from @ref{Headlines}:
3287 @example
3288 * Top level headline
3289 ** Second level
3290 *** 3rd level
3291     some text
3292 *** 3rd level
3293     more text
3294 * Another top level headline
3295 @end example
3297 @noindent
3298 Unfortunately this is deeply ingrained into the code of Org-mode and
3299 cannot be easily changed.  You can, however, modify the display in such
3300 a way that all leading stars become invisible and the outline more easy
3301 to read.  To do this, customize the variable
3302 @code{org-hide-leading-stars} like this:
3304 @lisp
3305 (setq org-hide-leading-stars t)
3306 @end lisp
3308 @noindent
3309 or change this on a per-file basis with one of the lines (anywhere in
3310 the buffer)
3312 @example
3313 #+STARTUP: showstars
3314 #+STARTUP: hidestars
3315 @end example
3317 @noindent
3318 Press @kbd{C-c C-c} with the cursor in a @samp{STARTUP} line to activate
3319 the modifications.
3321 With stars hidden, the tree becomes:
3323 @example
3324 * Top level headline
3325  * Second level
3326   * 3rd level
3327     some text
3328   * 3rd level
3329     more text
3330 * Another top level headline
3331 @end example
3333 @noindent
3334 Note that the leading stars are not truly replaced by whitespace, they
3335 are only fontified with the face @code{org-hide} that uses the
3336 background color as font color.  If are are not using either white or
3337 black background, you may have to customize this face to get the wanted
3338 effect.  Another possibility is to set this font such that the extra
3339 stars are @i{almost} invisible, for example using the color
3340 @code{grey90} on a white background.
3342 Things become cleaner still if you skip all the even levels and use only
3343 odd levels 1, 3, 5..., effectively adding two stars to go from one
3344 outline level to the next:
3346 @example
3347 * Top level headline
3348   * Second level
3349     * 3rd level
3350       some text
3351     * 3rd level
3352       more text
3353 * Another top level headline
3354 @end example
3356 @noindent
3357 In order to make the structure editing and export commands handle this
3358 convention correctly, use
3360 @lisp
3361 (setq org-odd-levels-only t)
3362 @end lisp
3364 @noindent
3365 or set this on a per-file basis with one of the following lines (don't
3366 forget to press @kbd{C-c C-c} with the cursor in the startup line to
3367 activate changes immediately).
3369 @example
3370 #+STARTUP: odd
3371 #+STARTUP: oddeven
3372 @end example
3374 You can convert an Org-mode file from single-star-per-level to
3375 the double-star-per-level convention with @kbd{M-x org-convert-to-odd-levels
3376 RET} in that file.  There is no command for the back conversion because
3377 such a command might merge levels and in this way destroy the
3378 structure of the tree.
3379 @c FIXME: Maybe we should have such a command...
3381 @node TTY keys, FAQ, Clean view, Miscellaneous
3382 @section Using org-mode on a tty
3383 @cindex tty keybindings
3385 Org-mode uses a number of keys that are not accessible on a tty.  This
3386 applies to most special keys like cursor keys, @key{TAB} and
3387 @key{RET}, when these are combined with modifier keys like @key{Meta}
3388 and/or @key{Shift}.  Org-mode uses these bindings because it needs to
3389 provide keys for a large number of commands, and because these keys
3390 appeared particularly easy to remember.  In order to still be able to
3391 access the core functionality of Org-mode on a tty, alternative
3392 bindings are provided.  Here is a complete list of these bindings,
3393 which are obviously more cumbersome to use.  Note that sometimes a
3394 work-around can be better.  For example changing a time stamp is
3395 really only fun with @kbd{S-@key{cursor}} keys.  On a tty you would
3396 rather use @kbd{C-c .}  to re-insert the timestamp.
3398 @multitable @columnfractions 0.15 0.2 0.2
3399 @item @b{Default} @tab @b{Alternative 1} @tab @b{Alternative 2}
3400 @item @kbd{S-@key{TAB}}     @tab @kbd{C-u @key{TAB}}       @tab
3401 @item @kbd{M-@key{left}}    @tab @kbd{C-c C-x l}           @tab @kbd{@key{Esc} @key{left}}
3402 @item @kbd{M-S-@key{left}}  @tab @kbd{C-c C-x L}           @tab
3403 @item @kbd{M-@key{right}}   @tab @kbd{C-c C-x r}           @tab @kbd{@key{Esc} @key{right}}
3404 @item @kbd{M-S-@key{right}} @tab @kbd{C-c C-x R}           @tab
3405 @item @kbd{M-@key{up}}      @tab @kbd{C-c C-x u}           @tab @kbd{@key{Esc} @key{up}}
3406 @item @kbd{M-S-@key{up}}    @tab @kbd{C-c C-x U}           @tab
3407 @item @kbd{M-@key{down}}    @tab @kbd{C-c C-x d}           @tab @kbd{@key{Esc} @key{down}}
3408 @item @kbd{M-S-@key{down}}  @tab @kbd{C-c C-x D}           @tab
3409 @item @kbd{S-@key{RET}}     @tab @kbd{C-c C-x c}           @tab
3410 @item @kbd{M-@key{RET}}     @tab @kbd{C-c C-x m}           @tab @kbd{@key{Esc} @key{RET}}
3411 @item @kbd{M-S-@key{RET}}   @tab @kbd{C-c C-x M}           @tab
3412 @item @kbd{S-@key{left}}    @tab @kbd{C-c C-x @key{left}}  @tab
3413 @item @kbd{S-@key{right}}   @tab @kbd{C-c C-x @key{right}} @tab
3414 @item @kbd{S-@key{up}}      @tab @kbd{C-c C-x @key{up}}    @tab
3415 @item @kbd{S-@key{down}}    @tab @kbd{C-c C-x @key{down}}  @tab
3416 @end multitable
3418 @node FAQ, Interaction, TTY keys, Miscellaneous
3419 @section Frequently asked questions
3420 @cindex FAQ
3422 @enumerate
3423 @item @b{Org-mode seems to be a useful default mode for the various
3424 @file{README} files I have scattered through my directories.  How do I
3425 turn it on for all @file{README} files?}@*
3427 @example
3428 (add-to-list 'auto-mode-alist '("README$" . org-mode))
3429 @end example
3431 @item @b{Some of my links stopped working after I upgraded to a version
3432 4.20 or later.  Why is this, and how can I fix it?}@*
3434 These must be links in plain text, containing white space, such as
3435 @samp{bbdb:Richard Stallman}.  You need to protect these links by
3436 putting double brackets around them, like @samp{[[bbdb:Richard
3437 Stallman]]}.
3439 @item @b{I see that Org-mode now creates links using the double bracket
3440 convention that hides the link part and the brackets, only showing the
3441 description part.  How can I convert my old links to this new format?}@*
3443 Execute once in each Org-mode file: @kbd{M-x org-upgrade-old-links}.
3444 The replaces angular brackets with the link format.
3446 @item @b{I don't care if you find the new bracket links great, I am
3447 attached to the old style using angular brackets and no hiding of the
3448 link text.  Please give them back to me, don't tell me it is not
3449 possible!}@*
3451 Would I let you down like that?  If you must (even if I don't understand
3452 why), you can do this
3453 @lisp
3454 (setq org-link-style 'plain
3455       org-link-format "<%s>")
3456 @end lisp
3458 @item @b{When I am executing shell links I always get a 
3459 confirmation prompt and need to type @kbd{yes @key{RET}}, thats 4 key
3460 presses!  Can I get rid of this?}@*
3462 @cindex shell links, confirmation
3463 @cindex dangerous commands
3464 The confirmation is there to protect you from unwantingly execute
3465 potentially dangerous commands.  For example, imagine a link
3466 @samp{[[shell:rm -rf ~/*][Google Search]]}.  In an Org-mode buffer, this
3467 command would look like @samp{Google Search}, but really it would remove
3468 your home directory.  If you wish, you can make it easier to respond to
3469 the query by setting @code{org-confirm-shell-links} to @code{y-or-n-p}.
3470 Then a single @kbd{y} keypress will be enough to confirm shell links.
3471 It is also possible to turn off this check entirely, but I do not
3472 recommend to do this.  Be warned.
3474 @item @b{All these stars are driving me mad, I just find the Emacs
3475 outlines unreadable. Can't you just put white space and a single star as a
3476 starter for headlines?}@*
3478 See @ref{Clean view}.
3480 @item @b{I would like to have two windows on the same Org-mode
3481 file, but with different outline visibility.  Is that possible?}@*
3483 @cindex @code{make-indirect-buffer}
3484 @cindex indirect buffers
3485 In GNU Emacs, you may use @emph{indirect buffers} which do exactly this.
3486 See the documentation on the command @code{make-indirect-buffer}.  In
3487 XEmacs, this is currently not possible because of the different outline
3488 implementation.
3490 @item @b{When I export my TODO list, every TODO item becomes a
3491 separate section.  How do I enforce these items to be exported as an
3492 itemized list?}@*
3494 If you plan to use ASCII or HTML export, make sure things you want to
3495 be exported as item lists are level 4 at least, even if that does mean
3496 there is a level jump.  For example:
3498 @example
3499 * Todays top priorities
3500 **** TODO write a letter to xyz
3501 **** TODO Finish the paper
3502 **** Pick up kids at the school
3503 @end example
3505 Alternatively, if you need a specific value for the heading/item
3506 transition in a particular file, use the @samp{+OPTIONS} line to
3507 configure the @samp{H} switch.
3509 @example
3510 +OPTIONS:   H:2; ...
3511 @end example
3513 @item @b{I would like to export only a subtree of my file to HTML.
3514 How?}@*
3516 @cindex exporting a subtree
3517 If you want to export a subtree, mark the subtree as region and then
3518 export.  Marking can be done with @kbd{C-c @@ C-x C-x}, for example.
3520 @item @b{Org-mode takes over the S-cursor keys.  I also want to use
3521 CUA-mode, is there a way to fix this conflict?}@*
3522 Yes, see @ref{Interaction}.
3524 @item @b{One of my table columns has started to fill up with
3525 @samp{#ERROR}.  What is going on?}@*
3527 Org-mode tried to compute the column from other fields using a
3528 formula stored in the @samp{#+TBLFM:} line just below the table, and
3529 the evaluation of the formula fails.  Fix the fields used in the
3530 formula, or fix the formula, or remove it!
3532 @item @b{When I am in the last column of a table and just above a
3533 horizontal line in the table, pressing TAB creates a new table line
3534 @i{before} the horizontal line.  How can I quickly move to the line
3535 @i{below} the horizontal line instead?}@*
3537 Press @key{down} (to get on the separator line) and then @key{TAB}.
3538 Or configure the variable @code{org-table-tab-jumps-over-hlines}.
3540 @item @b{How can I change the indentation of an entire table without
3541 fixing every line by hand?}@*
3543 @cindex indentation, of tables
3544 The indentation of a table is set by the first line.  So just fix the
3545 indentation of the first line and realign with @key{TAB}.
3547 @item @b{Is it possible to include entries from org-mode files into my
3548 emacs diary?}@*
3550 Since the org-mode agenda is much more powerful and can contain the
3551 diary (@pxref{Calendar/Diary integration}), you should think twice
3552 before deciding to do this.  Integrating Org-mode information into the
3553 diary is, however, possible.  The following steps are necessary:
3554 Autoload the function @command{org-diary} as shown above under
3555 @ref{Installation and activation}.  You also need to use @emph{fancy
3556 diary display} by setting in @file{.emacs}:
3558 @lisp
3559 (add-hook 'diary-display-hook 'fancy-diary-display)
3560 @end lisp
3562 Then include the following line into your @file{~/diary} file, in
3563 order to get the entries from all files listed in the variable
3564 @code{org-agenda-files}:
3566 @example
3567 &%%(org-diary)
3568 @end example
3569 @noindent
3570 You may also select specific files with
3572 @example
3573 &%%(org-diary) ~/path/to/some/org-file.org
3574 &%%(org-diary) ~/path/to/another/org-file.org
3575 @end example
3577 If you now launch the calendar and press @kbd{d} to display a diary,
3578 the headlines of entries containing a timestamp, date range, schedule,
3579 or deadline referring to the selected date will be listed.  Just like
3580 in Org-mode's agenda view, the diary for @emph{today} contains
3581 additional entries for overdue deadlines and scheduled items.  See
3582 also the documentation of the @command{org-diary} function.
3584 @end enumerate
3587 @node Interaction, Bugs, FAQ, Miscellaneous
3588 @section Interaction with other packages
3589 @cindex packages, interaction with other
3590 Org-mode can cooperate with the following packages:
3592 @table @asis
3593 @cindex @file{org-mouse.el}
3594 @item @file{org-mouse.el} by Piotr Zielinski
3595 This package implements extended mouse functionality for Org-mode.  It
3596 allows you to cycle visibility and to edit the document structure with
3597 the mouse.  It also provides a context-sensitive menu that changes
3598 depending on the context of a mouse-click.  Use a search engine to find
3599 this package on the web.
3600 @cindex @file{table.el}
3601 @item @file{table.el} by Takaaki Ota
3602 Org mode cooperates with table.el, see @ref{table.el}.  @file{table.el}
3603 is part of Emacs 22.
3604 @cindex @file{calc.el}
3605 @item @file{calc.el} by Dave Gillespie
3606 Org-mode uses the calc package for implementing spreadsheet
3607 functionality in its tables (@pxref{Table calculations}).  Org-modes
3608 checks for the availability of calc by looking for the function
3609 @code{calc-eval} which should be autoloaded in your setup if calc has
3610 been installed properly.  As of Emacs 22, calc is part of the Emacs
3611 distribution.  Another possibility for interaction between the two
3612 packages is using calc for embedded calculations. @xref{Embedded Mode,
3613 , Embedded Mode, calc, GNU Emacs Calc Manual}.
3614 @cindex @file{constants.el}
3615 @item @file{constants.el} by Carsten Dominik
3616 In a table formula (@pxref{Table calculations}), it is possible to use
3617 names for natural constants or units.  Instead of defining your own
3618 constants in the variable @code{org-table-formula-constants}, install
3619 the @file{constants} package which defines a large number of constants
3620 and units, and lets you use unit prefixes like @samp{M} for
3621 @samp{Mega} etc.  You will need version 2.0 of this package, available
3622 at @url{http://www.astro.uva.nl/~dominik/Tools}. Org-mode checks for
3623 the function @code{constants-get}, which has to be autoloaded in your
3624 setup.  See the installation instructions in the file
3625 @file{constants.el}.
3626 @cindex @file{remember.el}
3627 @cindex @file{CUA.el}
3628 @item @file{CUA.el} by Kim. F. Storm
3629 Keybindings in Org-mode conflict with the @kbd{S-<cursor>} keys
3630 used by CUA-mode (as well as pc-select-mode and s-region-mode) to
3631 select and extend the region.  If you want to use one of these
3632 packages along with Org-mode, configure the variable
3633 @code{org-CUA-compatible}.  When set, Org-mode will move the following
3634 keybindings in org-mode files, and in the agenda buffer (but not
3635 during date selection).
3637 @example
3638 S-UP    -> M-p             S-DOWN  -> M-n
3639 S-LEFT  -> M--             S-RIGHT -> M-+
3640 S-RET   -> C-S-RET
3641 @end example
3643 Yes, these are unfortunately more difficult to remember.  If you want
3644 to have other replacement keys, look at the variable
3645 @code{org-disputed-keys}.
3646 @item @file{remember.el} by John Wiegley
3647 Org mode cooperates with remember, see @ref{Remember}.
3648 @file{Remember.el} is not part of Emacs, find it on the web.
3649 @end table
3651 @node Bugs, Acknowledgments, Interaction, Miscellaneous
3652 @section Bugs
3653 @cindex bugs
3655 Here is a list of things that should work differently, but which I
3656 have found too hard to fix.
3658 @itemize @bullet
3659 @item
3660 If a table field starts with a link, and if the corresponding table
3661 column is narrowed (@pxref{Narrow columns}) to a width too small to
3662 display the link, the field would look entirely empty even though it is
3663 not.  To prevent this, Org-mode throws an error.  The work-around is to
3664 make the column wide enough to fit the link, or to add some text (at
3665 least 2 characters) before the link in the same field.
3666 @item
3667 Narrowing table columns does not work on XEmacs, because the
3668 @code{format} function does not transport text properties.
3669 @item
3670 Text in an entry protected with the @samp{QUOTE} keyword should not
3671 autowrap.
3672 @item
3673 When the application called by @kbd{C-c C-o} to open a file link fails
3674 (for example because the application does not exits or refuses to open
3675 the file), it does so silently.  No error message is displayed.
3676 @item
3677 Plain list items should be able to hold a TODO item.  Unfortunately this
3678 has so many technical problems that I will only consider this change for
3679 the next major release (5.0).
3680 @item
3681 The remote-editing commands in the agenda buffer cannot be undone with
3682 @code{undo} called from within the agenda buffer.  But you can go to
3683 the corresponding buffer (using @key{TAB} or @key{RET} and execute
3684 @code{undo} there.
3685 @item
3686 Recalculating a table line applies the formulas from left to right.
3687 If a formula uses @emph{calculated} fields further down the row,
3688 multiple recalculation may be needed to get all fields consistent.
3689 @item
3690 Under XEmacs, if Org-mode entries are included into the diary, it is
3691 not possible to jump back from the diary to the org file.  Apparently,
3692 the text properties are lost when the fancy-diary-display is used.
3693 However, from Org-mode's timeline and agenda buffers (created with
3694 @kbd{C-c C-r} and @kbd{C-c a}), things do work correctly.
3695 @item
3696 You can only make a single word boldface or italic.  To emphasize
3697 several words in a row, each must have the emphasize markers, like in
3698 @samp{*three* *bold* *words*}.
3699 @item
3700 The exporters work well, but could be made more efficient.
3701 @end itemize
3703 @node Acknowledgments,  , Bugs, Miscellaneous
3704 @section Acknowledgments
3705 @cindex acknowledgments
3706 @cindex thanks
3708 Org-mode was written by Carsten Dominik, who still maintains it at the
3709 Org-mode homepage @uref{http://www.astro.uva.nl/~dominik/Tools/org/}.
3710 The following people (in alphabetic order) have helped the development
3711 along with ideas, suggestions and patches.  Many thanks to all of you,
3712 Org-mode would not be what it is without your input.
3714 @itemize @bullet
3715 @item
3716 Thomas Baumann contributed the code for links to the MH-E email system.
3717 @item
3718 Alex Bochannek provided a patch for rounding time stamps.
3719 @item
3720 Charles Caves' suggestion sparked the implementation of templates for
3721 Remember.
3722 @item
3723 Pavel Chalmoviansky influenced the agenda treatment of items with
3724 specified time.
3725 @item
3726 Sacha Chua suggested to copy some linking code from Planner.
3727 @item
3728 Christian Egli converted the documentation into TeXInfo format, patched
3729 CSS formatting into the HTML exporter, and inspired the agenda.
3730 @item
3731 Nic Ferrier contributed mailcap and XML support.
3732 @item
3733 Kai Grossjohann pointed out key-binding conflicts caused by Org-mode.
3734 @item
3735 Stefan Monnier provided a patch to keep the Emacs-Lisp compiler happy.
3736 @item
3737 Tim O'Callaghan suggested in-file links, search options for
3738 general file links, and TAGS.
3739 @item
3740 Oliver Oppitz suggested multi-state TODO items.
3741 @item
3742 Scott Otterson sparked the introduction of descriptive text for links,
3743 among other things.
3744 @item
3745 Pete Phillips helped the development of the TAGS feature.
3746 @item
3747 Matthias Rempe (Oelde) provided ideas, Windows support, and quality
3748 control.
3749 @item
3750 Kevin Rogers contributed code to access VM files on remote hosts.
3751 @item
3752 Philip Rooke created the Org-mode reference card and provided lots of feedback.
3753 @item
3754 Christian Schlauer proposed angular brackets around links, among other
3755 things.
3756 @item
3757 Linking to VM/BBDB/GNUS was inspired by Tom Shannon's
3758 @file{organizer-mode.el}.
3759 @item
3760 J@"urgen Vollmer contributed code generating the table of contents
3761 in HTML output.
3762 @item
3763 Chris Wallace provided a patch implementing the @samp{QUOTE} keyword.
3764 @item
3765 David Wainberg suggested archiving, and improvements to the linking
3766 system.
3767 @item
3768 John Wiegley wrote @file{emacs-wiki.el} and @file{planner.el}.  The
3769 development of Org-mode was fully independent, and both systems are
3770 really different beasts in their basic ideas and implementation details.
3771 However, I have later looked at John's code and learned from his
3772 implementation of (i) links where the link itself is hidden and only a
3773 description is shown, and (ii) popping up a calendar to select a date.
3774 @item
3775 Carsten Wimmer suggested some changes and helped fix a bug in linking
3776 to GNUS.
3777 @item
3778 Roland Winkler requested additional keybindings to make Org-mode
3779 work on a tty.
3780 @item
3781 Piotr Zielinski wrote @file{org-mouse.el} and showed how to follow links
3782 with mouse-1.
3783 @end itemize
3785 @node Index, Key Index, Miscellaneous, Top
3786 @chapter Index
3788 @printindex cp
3790 @node Key Index,  , Index, Top
3791 @chapter Key Index
3793 @printindex ky
3795 @bye
3797 @ignore
3798    arch-tag: 7893d1fe-cc57-4d13-b5e5-f494a1bcc7ac
3799 @end ignore