(flymake-base-dir, flymake-master-file-name, flymake-temp-master-file-name)
[emacs.git] / man / org.texi
blob6d7d831a98f2033eadd089b9778ed2025d70175d
1 \input texinfo
2 @c %**start of header
3 @c @setfilename org
4 @setfilename ../info/org
5 @settitle Org Mode Manual
7 @set VERSION 4.01
8 @set DATE December 2005
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 Subheadings inside a table.  Need a difference between info and the rest.
26 @macro tsubheading{text}
27 @ifinfo
28 @subsubheading \text\
29 @end ifinfo
30 @ifnotinfo
31 @item @b{\text\}
32 @end ifnotinfo
33 @end macro
35 @copying
36 This manual is for Org-mode (version @value{VERSION}).
38 Copyright @copyright{} 2004, 2005 Free Software Foundation
40 @quotation
41 Permission is granted to copy, distribute and/or modify this document
42 under the terms of the GNU Free Documentation License, Version 1.1 or
43 any later version published by the Free Software Foundation; with no
44 Invariant Sections, with the Front-Cover texts being ``A GNU Manual,''
45 and with the Back-Cover Texts as in (a) below.  A copy of the
46 license is included in the section entitled ``GNU Free Documentation
47 License.''
49 (a) The FSF's Back-Cover Text is: ``You have freedom to copy and modify
50 this GNU Manual, like GNU software.  Copies published by the Free
51 Software Foundation raise funds for GNU development.''
52 @end quotation
53 @end copying
55 @titlepage
56 @title Org Mode Manual
58 @subtitle Release @value{VERSION}
59 @author by Carsten Dominik
61 @c The following two commands start the copyright page.
62 @page
63 @vskip 0pt plus 1filll
64 @insertcopying
65 @end titlepage
67 @c Output the table of contents at the beginning.
68 @contents
70 @ifnottex
71 @node Top, Introduction, (dir), (dir)
72 @top Org Mode Manual
74 @insertcopying
75 @end ifnottex
77 @menu
78 * Introduction::                Getting started
79 * Document Structure::          A tree works like your brain
80 * Tables::                      Pure magic for quick formatting
81 * Hyperlinks::                  Notes in context
82 * TODO items::                  Every tree branch can be a TODO item
83 * Timestamps::                  Assign date and time to items
84 * Agenda Views::                Collecting information into views
85 * Exporting::                   Sharing and publishing of notes
86 * Miscellaneous::               All the rest which did not fit elsewhere
87 * Index::                       The fast road to specific information
88 * Key Index::                   Key bindings and where they are described
90 @detailmenu
91  --- The Detailed Node Listing ---
93 Introduction
95 * Summary::                     Brief summary of what Org-mode does
96 * Installation and Activation::  How to install Org-mode
97 * Feedback::                    Bug reports, ideas, patches etc.
99 Document Structure
101 * Outlines::                    Org-mode is based on outline-mode
102 * Headlines::                   How to typeset org-tree headlines
103 * Visibility cycling::          Show and hide, much simplified
104 * Motion::                      Jumping to other headlines
105 * Structure editing::           Changing sequence and level of headlines
106 * Archiving::                   Move done task trees to a different place
107 * Sparse trees::                Matches embedded in context
108 * Tags::                        
109 * Plain Lists::                 Editing hand-formatted lists
111 Tables
113 * Built-in table editor::       Simple tables
114 * Table calculations::          Compute a field from other fields
115 * orgtbl-mode::                 The table editor as minor mode
116 * table.el::                    Complex tables
118 Calculations in tables
120 * Formula syntax::              How to write a formula
121 * Column formulas::             Formulas valid for all fields in a column
122 * Advanced features::           Field names, parameters and automatic recalc
123 * Named-field formulas::        Formulas valid in single fields
124 * Editing/debugging formulas::  Changing a stored formula
125 * Appetizer::                   Taste the power of calc
127 Hyperlinks
129 * Internal Links::              CamelCaseWords as internal links
130 * External Links::              URL-like links to the world
131 * Managing links::              Creating, inserting and following
132 * Search Options::              Linking to a specific location
133 * Remember::                    Org-trees store quick notes
135 TODO items
137 * TODO basics::                 Marking and displaying TODO entries
138 * Progress Logging::            Document your productivity
139 * TODO extensions::             Workflow and assignments
140 * Priorities::                  Some things are more important than others
142 Extended use of TODO keywords
144 * Workflow states::             From TODO to DONE in steps
145 * TODO types::                  I do this, Fred the rest
146 * Per file keywords::           Different files, different requirements
148 Timestamps
150 * Time stamps::                 Assigning a time to a tree entry
151 * Creating timestamps::         Commands which insert timestamps
153 Agenda Views
155 * Agenda::                      Your weekly planner
156 * Global TODO list::            Overview over all things to do
157 * Matching headline tags::      Select information based on tags
158 * Timeline::                    Time-sorted view for single file
159 * Agenda commands::             Remote editing of org trees
160 * Calendar/Diary integration::  Integrating Anniversaries and more
162 Calendar/Diary integration
164 * Diary to agenda::             Agenda incorporates the diary
165 * Agenda to diary::             Diary incorporates the agenda
167 Exporting
169 * ASCII export::                Export as a structured ASCII file
170 * HTML export::                 Export as an HTML file
171 * iCalendar export::            Create calendar entries.
173 HTML export
175 * HTML formatting::             Interpretation of the buffer content
176 * Export options::              How to influence exports
177 * Comment lines::               Lines which will not be exported
179 Miscellaneous
181 * Completion::                  M-TAB knows what you need
182 * Customization::               Adapting Org-mode to your taste
183 * FAQ::                         Frequently asked questions
184 * Interaction::                 Other Emacs packages
185 * TTY keys::                    Using Org-mode on a tty
186 * Bugs::                        Things which do not work perfectly
187 * Acknowledgments::             These people provided feedback and more
189 @end detailmenu
190 @end menu
192 @node Introduction, Document Structure, Top, Top
193 @chapter Introduction
194 @cindex introduction
196 @menu
197 * Summary::                     Brief summary of what Org-mode does
198 * Installation and Activation::  How to install Org-mode
199 * Feedback::                    Bug reports, ideas, patches etc.
200 @end menu
202 @node Summary, Installation and Activation, Introduction, Introduction
203 @section Summary
204 @cindex summary
206 Org-mode is a mode for keeping notes, maintaining ToDo lists, and doing
207 project planning with a fast and effective plain-text system.
209 Org-mode develops organizational tasks around NOTES files that contain
210 information about projects as plain text.  Org-mode is implemented on
211 top of outline-mode, which makes it possible to keep the content of
212 large files well structured.  Visibility cycling and structure editing
213 help to work with the tree.  Tables are easily created with a built-in
214 table editor.  Org-mode supports ToDo items, deadlines, time stamps,
215 and scheduling.  It dynamically compiles entries into an agenda that
216 utilizes and smoothly integrates much of the Emacs calendar and diary.
217 Plain text URL-like links connect to websites, emails, Usenet
218 messages, BBDB entries, and any files related to the projects.  For
219 printing and sharing of notes, an Org-mode file can be exported as a
220 structured ASCII file, as HTML, or (todo and agenda items only) as an
221 iCalendar file.
223 Org-mode keeps simple things simple.  When first fired up, it should
224 feel like a simple but easy to use outliner.  Complexity is not
225 imposed, but a large amount of functionality is available when you
226 need it.  Org-mode can be used on different levels and in different
227 ways, for example
229 @example
230 @r{@bullet{} as an outline extension with visibility cycling and structure editing}
231 @r{@bullet{} as an ASCII system and table editor for taking structured notes}
232 @r{@bullet{} as an ASCII table editor with spreadsheet-like capabilities}
233 @r{@bullet{} as a simple hypertext system, with HTML export}
234 @r{@bullet{} as a TODO list editor}
235 @r{@bullet{} as a full agenda and planner with deadlines and work scheduling}
236 @end example
238 The Org-mode table editor can be integrated into any major mode by
239 activating the minor Orgtbl-mode.
241 There is a website for Org-mode which provides links to the newest
242 version of Org-mode, as well as additional information, screen shots
243 and example files.  This page is located at
244 @uref{http://www.astro.uva.nl/~dominik/Tools/org/}.
246 @page
248 @node Installation and Activation, Feedback, Summary, Introduction
249 @section Installation and Activation
250 @cindex installation
251 @cindex autoload
252 @cindex global keybindings
253 @cindex keybindings, global
255 If Org-mode is part of the Emacs distribution or an XEmacs package,
256 you only need to copy the following lines to your @file{.emacs} file.
257 The last two lines define @emph{global} keys for the commands
258 @command{org-store-link} and @command{org-agenda} - please
259 choose suitable keys yourself.
261 @lisp
262 ;; The following lines are always needed.  Choose your own keys.
263 (add-to-list 'auto-mode-alist '("\\.org$" . org-mode))
264 (define-key global-map "\C-cl" 'org-store-link)
265 (define-key global-map "\C-ca" 'org-agenda)
266 @end lisp
268 If you have downloaded Org-mode from the Web, you must byte-compile
269 @file{org.el} and put it on your load path.  In addition to the Emacs
270 Lisp lines above, you also need to add the following lines to
271 @file{.emacs}:
273 @lisp
274 ;; These lines only if org-mode is not part of the X/Emacs distribution.
275 (autoload 'org-mode "org" "Org mode" t)
276 (autoload 'org-diary "org" "Diary entries from Org mode")
277 (autoload 'org-agenda "org" "Multi-file agenda from Org mode" t)
278 (autoload 'org-store-link "org" "Store a link to the current location" t)
279 (autoload 'orgtbl-mode "org" "Org tables as a minor mode" t)
280 (autoload 'turn-on-orgtbl "org" "Org tables as a minor mode")
281 @end lisp
283 @cindex org-mode, turning on
284 With this setup, all files with extension @samp{.org} will be put into
285 Org-mode.  As an alternative, make the first line of a file look like
286 this:
288 @example
289 MY PROJECTS    -*- mode: org; -*-
290 @end example
292 @noindent which will select Org-mode for this buffer no matter what
293 the file's name is.  See also the variable
294 @code{org-insert-mode-line-in-empty-file'}.
296 @node Feedback,  , Installation and Activation, Introduction
297 @section Feedback
298 @cindex feedback
299 @cindex bug reports
300 @cindex maintainer
301 @cindex author
303 If you find problems with Org-mode, or if you have questions, remarks,
304 or ideas about it, please contact the maintainer Carsten Dominik at
305 @value{MAINTAINEREMAIL}.
307 For bug reports, please provide as much information as possible,
308 including the version information of Emacs (@kbd{C-h v emacs-version
309 @key{RET}}) and Org-mode (@kbd{M-x org-version}), as well as the
310 Org-mode related setup in @file{.emacs}.  If an error occurs, a
311 traceback can be very useful.  Often a small example file helps, along
312 with clear information about:
313 @enumerate
314 @item What exactly did you do?
315 @item What did you expect to happen?
316 @item What happened instead?
317 @end enumerate
318 @noindent Thanks for helping to improve this mode.
320 @node Document Structure, Tables, Introduction, Top
321 @chapter Document Structure
322 @cindex document structure
323 @cindex structure of document
325 Org-mode is based on outline mode and provides flexible commands to
326 edit the structure of the document.
328 @menu
329 * Outlines::                    Org-mode is based on outline-mode
330 * Headlines::                   How to typeset org-tree headlines
331 * Visibility cycling::          Show and hide, much simplified
332 * Motion::                      Jumping to other headlines
333 * Structure editing::           Changing sequence and level of headlines
334 * Archiving::                   Move done task trees to a different place
335 * Sparse trees::                Matches embedded in context
336 * Tags::                        
337 * Plain Lists::                 Editing hand-formatted lists
338 @end menu
340 @node Outlines, Headlines, Document Structure, Document Structure
341 @section Outlines
342 @cindex outlines
343 @cindex outline-mode
345 Org-mode is implemented on top of outline-mode.  Outlines allow to
346 organize a document in a hierarchical structure, which (at least for
347 me) is the best representation of notes and thoughts.  Overview over
348 this structure is achieved by folding (hiding) large parts of the
349 document to show only the general document structure and the parts
350 currently being worked on.  Org-mode greatly simplifies the use of
351 outlines by compressing the entire show/hide functionality into a
352 single command @command{org-cycle}, which is bound to the @key{TAB}
353 key.
355 @node Headlines, Visibility cycling, Outlines, Document Structure
356 @section Headlines
357 @cindex headlines
358 @cindex outline tree
360 Headlines define the structure of an outline tree.  The Headlines in
361 Org-mode start with one or more stars, on the left margin.  For
362 example
364 @example
365 * Top level headline
366 ** Second level
367 *** 3rd level
368     some text
369 *** 3rd level
370     more text
371 * Another top level headline
372 @end example
374 @node Visibility cycling, Motion, Headlines, Document Structure
375 @section Visibility cycling
376 @cindex cycling, visibility
377 @cindex visibility cycling
378 @cindex trees, visibility
379 @cindex show hidden text
380 @cindex hide text
382 Outlines make it possible to hide parts of the text in the buffer.
383 Org-mode uses a single command bound to the @key{TAB} key to change
384 the visibility in the buffer.
386 @cindex subtree visibility states
387 @cindex folded, subtree visibility state
388 @cindex children, subtree visibility state
389 @cindex subtree, subtree visibility state
390 @table @kbd
391 @kindex @key{TAB}
392 @item @key{TAB}
393 Rotate current subtree between the states
394 @example
395 ,-> FOLDED -> CHILDREN -> SUBTREE --.
396 '-----------------------------------'
397 @end example
398 At the beginning of the buffer (or when called with @kbd{C-u}), this does
399 the same as the command @kbd{S-@key{TAB}} below.
401 @cindex global visibility states
402 @cindex overview, global visibility state
403 @cindex contents, global visibility state
404 @cindex show all, global visibility state
405 @kindex S-@key{TAB}
406 @item S-@key{TAB}
407 Rotate the entire buffer between the states
408 @example
409 ,-> OVERVIEW -> CONTENTS -> SHOW ALL --.
410 '--------------------------------------'
411 @end example
412 Note that inside tables, @kbd{S-@key{TAB}} jumps to the previous field.
414 @cindex show all, command
415 @kindex C-c C-a
416 @item C-c C-a
417 Show all.
418 @end table
420 When Emacs first visits an Org-mode file, the global state is set to
421 OVERVIEW, i.e. only the top level headlines are visible.  This can be
422 configured through the variable @code{org-startup-folded}, or on a
423 per-file basis by adding one of the following lines anywhere in the
424 buffer:
426 @example
427 #+STARTUP: fold
428 #+STARTUP: nofold
429 #+STARTUP: content
430 @end example
432 @node Motion, Structure editing, Visibility cycling, Document Structure
433 @section Motion
434 @cindex motion, between headlines
435 @cindex jumping, to headlines
436 @cindex headline navigation
437 The following commands jump to other headlines in the buffer.
439 @table @kbd
440 @kindex C-c C-n
441 @item C-c C-n
442 Next heading.
443 @kindex C-c C-p
444 @item C-c C-p
445 Previous heading.
446 @kindex C-c C-f
447 @item C-c C-f
448 Next heading same level.
449 @kindex C-c C-b
450 @item C-c C-b
451 Previous heading same level.
452 @kindex C-c C-u
453 @item C-c C-u
454 Backward to higher level heading.
455 @kindex C-c C-j
456 @item C-c C-j
457 Jump to a different place without changing the current outline
458 visibility.  Shows the document structure in a temporary buffer, where
459 you can use visibility cycling (@key{TAB}) to find your destination.
460 After pressing @key{RET}, the cursor moves to the selected location in
461 the original buffer, and the headings hierarchy above it is made
462 visible.
463 @end table
465 @node Structure editing, Archiving, Motion, Document Structure
466 @section Structure editing
467 @cindex structure editing
468 @cindex headline, promotion and demotion
469 @cindex promotion, of subtrees
470 @cindex demotion, of subtrees
471 @cindex subtree, cut and paste
472 @cindex pasting, of subtrees
473 @cindex cutting, of subtrees
474 @cindex copying, of subtrees
475 @cindex subtrees, cut and paste
477 @table @kbd
478 @kindex M-@key{RET}
479 @item M-@key{RET}
480 Insert new heading with same level as current.  If the cursor is in a
481 plain list item, a new item is created.  To force creation of a new
482 headline, use a prefix arg, or first press @key{RET} to get to the
483 beginning of the next line.
484 @kindex M-S-@key{RET}
485 @item M-S-@key{RET}
486 Insert new TODO entry with same level as current heading.
487 @kindex M-@key{left}
488 @item M-@key{left}
489 Promote current heading by one level
490 @kindex M-@key{right}
491 @item M-@key{right}
492 Demote current heading by one level
493 @kindex M-S-@key{left}
494 @item M-S-@key{left}
495 Promote the current subtree by one level
496 @kindex M-S-@key{right}
497 @item M-S-@key{right}
498 Demote the current subtree by one level
499 @kindex M-S-@key{up}
500 @item M-S-@key{up}
501 Move subtree up (swap with previous subtree of same
502 level)
503 @kindex M-S-@key{down}
504 @item M-S-@key{down}
505 Move subtree down (swap with next subtree of same level)
506 @kindex C-c C-x C-w
507 @item C-c C-x C-w
508 Kill subtree, i.e. remove it from buffer but save in kill ring.
509 @kindex C-c C-x M-w
510 @item C-c C-x M-w
511 Copy subtree to kill ring.
512 @kindex C-c C-x C-y
513 @item C-c C-x C-y
514 Yank subtree from kill ring.  This does modify the level of the subtree to
515 make sure the tree fits in nicely at the yank position.  The yank
516 level can also be specified with a prefix arg, or by yanking after a
517 headline marker like @samp{****}.
518 @end table
520 @cindex region, active
521 @cindex active region
522 @cindex transient-mark-mode
523 When there is an active region (transient-mark-mode), promotion and
524 demotion work on all headlines in the region.  To select a region of
525 headlines, it is best to place both point and mark at the beginning of a
526 line, mark at the beginning of the first headline, and point at the line
527 just after the last headline to change.  Note that when the cursor is
528 inside a table (@pxref{Tables}), the Meta-Cursor keys have different
529 functionality.
531 @node Archiving, Sparse trees, Structure editing, Document Structure
532 @section Archiving
533 @cindex archiving
534 @cindex filing subtrees
536 When a project represented by a (sub)tree is finished, you may want
537 to move the tree to an archive place, either in the same file under a
538 special top-level heading, or even to a different file.
539 @table @kbd
540 @kindex C-c $
541 @item @kbd{C-c $}
542 Archive the subtree starting at the cursor position to the location
543 given by @code{org-archive-location}.
544 @end table
546 @cindex archive locations
547 The default archive is a file in the same directory as the current
548 file, with the name derived by appending @file{_archive} to the
549 current file name.  For information and examples on how to change
550 this, see the documentation string of the variable
551 @code{org-archive-location}.  If you are also using the Org-mode
552 agenda, archiving to a different file is a good way to keep archived
553 trees from contributing agenda items.
555 @node Sparse trees, Tags, Archiving, Document Structure
556 @section Sparse trees
557 @cindex sparse trees
558 @cindex trees, sparse
559 @cindex folding, sparse trees
560 @cindex occur, command
562 An important feature of Org-mode is the ability to construct
563 @emph{sparse trees} for selected information in an outline tree.  A
564 sparse tree means that the entire document is folded as much as
565 possible, but the selected information is made visible along with the
566 headline structure above it@footnote{See also the variable
567 @code{org-show-following-heading}.}.  Just try it out and you will see
568 immediately how it works.
570 Org-mode contains several commands creating such trees.  The most
571 basic one is @command{org-occur}:
573 @table @kbd
574 @kindex C-c /
575 @item C-c /
576 Occur.  Prompts for a regexp and shows a sparse tree with all matches.
577 If the match is in a headline, the headline is made visible.  If the
578 match is in the body of an entry, headline and body are made visible.
579 In order to provide minimal context, also the full hierarchy of
580 headlines above the match is shown, as well as the headline following
581 the match.  Each match is also highlighted, the highlights disappear
582 when the buffer is changed with an editing command.
583 @end table
585 Other commands are using this feature as well.  For example @kbd{C-c
586 C-v} creates a sparse TODO tree (@pxref{TODO basics}).
588 @kindex C-c C-x v
589 @cindex printing sparse trees
590 @cindex visible text, printing
591 To print a sparse tree, you can use the Emacs command
592 @code{ps-print-buffer-with-faces} which does not print invisible parts
593 of the document @footnote{This does not work under XEmacs, because
594 XEmacs uses selective display for outlining, not text properties}.
595 Or you can use the command @kbd{C-c C-x v} to copy the visible part of
596 the document to another file (extension @file{.txt}) which then can be
597 printed in any desired way.
599 @node Tags, Plain Lists, Sparse trees, Document Structure
600 @section Tags
601 @cindex tags
602 @cindex headline tagging
603 @cindex matching, tags
604 @cindex sparse tree, tag based
606 If you wish to implement a tag system to cross-correlate information,
607 this can be done as well in Org-mode.  Every headline can contain a
608 list of tags, at the end of the headline.  Tags are normal words
609 containing letters and @samp{_}, but no numbers.  Tags must be
610 preceded and followed by a single colon; like @samp{:WORK:}.  Several
611 tags can be specified like @samp{:WORK:URGENT:}.
613 @cindex inheritance, of tags
614 Tags make use of the hierarchical structure of outline trees.  If a
615 heading has a certain tag, all subheadings will inherit the tag as
616 well.  For example, in the list
618 @example
619 * Meeting with the French group      :WORK:
620 ** Summary by Frank                  :BOSS:NOTES:
621 *** TODO Prepare slides for him      :ACTION:
622 @end example
623 @noindent
624 the final heading will have the tags @samp{:WORK:}, @samp{:BOSS:},
625 @samp{:NOTES:}, and @samp{:ACTION:}.  When executing tag searches and
626 Org-mode finds that a certain headline matches the search criterion,
627 it will not check any sublevel headline, assuming that these likely
628 also match, and that the list of matches can become very long.  You
629 can influence inheritance and searching using the variables
630 @code{org-use-tag-inheritance} and
631 @code{org-tags-match-list-sublevels}.
633 @kindex M-@key{TAB}
634 Tags can simply be typed into the buffer.  After a colon,
635 @kbd{M-@key{TAB}} offers completion on all tags being used in the
636 current buffer.  There are also special commands for inserting tags,
637 and for executing searches based on tags.
639 @table @kbd
640 @kindex C-c C-c
641 @item C-c C-c
642 @cindex completion, of tags
643 Enter new tags for the current headline.  The minibuffer will prompt
644 for a list of tags and offer completion with respect to all other tags
645 used in the current buffer.  Several tags, separated by colons, may be
646 specified at the prompt.  After pressing @key{RET}, the tags will
647 be inserted and aligned to @code{org-tags-column}.  When called with a
648 @kbd{C-u} prefix, align all tags in the current buffer to that column,
649 just to make things look nice.  TAGS are automatically realigned after
650 promotion, demotion, and TODO state changes (@pxref{TODO basics}).
651 @kindex C-c \
652 @item C-c \
653 Create a sparse tree with all headlines matching a tags search.
654 @kindex C-c a m
655 @item C-c a m
656 Create a global list of tag matches from all agenda files.
657 @xref{Matching headline tags}.
658 @end table
660 A tags search string can use Boolean operators @samp{&} for AND and
661 @samp{|} for OR.  @samp{&} binds more strongly than
662 @samp{|}. Parenthesis are currently no implemented.  A tag may also be
663 preceded by @samp{-}, to select against it, and @samp{+} is syntactic
664 sugar for positive selection.  The AND operator @samp{&} is optional
665 when @samp{+} or @samp{-} is present.  For example, @samp{+WORK-BOSS}
666 would select all headlines that are tagged @samp{:WORK:}, but discard
667 those also tagged @samp{:BOSS:}.  The search string @samp{WORK|LAPTOP}
668 selects all lines tagged @samp{:WORK:} or @samp{:LAPTOP:}. The string
669 @samp{WORK|LAPTOP&NIGHT} requires that the @samp{:LAPTOP:} lines are
670 also tagged @samp{NIGHT}.
672 @node Plain Lists,  , Tags, Document Structure
673 @section Plain Lists
674 @cindex plain lists
675 @cindex lists, plain
676 @cindex lists, ordered
677 @cindex ordered lists
679 Headlines define the structure of the Org-mode file, and also lists
680 (for example TODO items (@pxref{TODO items}) should be created using
681 headline levels.  However, when taking notes, the plain text is
682 sometimes easier to read with hand-formatted lists.  Org-mode supports
683 editing such lists, and the HTML exporter (@pxref{Exporting}) does
684 parse and format them.
686 Org-mode knows ordered and unordered lists.  Unordered list items
687 start with @samp{-}, @samp{+}, or @samp{*}@footnote{When using
688 @samp{*} as a bullet, lines must be indented or they will be seen as
689 top-level headlines.} as bullets.  Ordered list items start with
690 @samp{1.} or @samp{1)}.  Items belonging to the same list must have
691 the same indentation on the first line.  In particular, if an ordered
692 list reaches number @samp{10.}, also the 2--digit numbers must be
693 written left-aligned with the other numbers in the list.  Indentation
694 also determines the end of a list item.  It ends before the next line
695 that is indented like the bullet/number, or less.  For example:
697 @example
698 ** Lord of the Rings
699 My favorite scenes are (in this order)
700 1. Eowyns fight with the witch king
701    + this was already my favorite scene in the book
702    + I really like Miranda Otto.
703 2. The attack of the Rohirrim
704 3. Peter Jackson being shot by Legolas
705     - on DVD only
706    He makes a really funny face when it happens.
707 @end example
709 Org-mode supports these lists by tuning filling and wrapping commands
710 to correctly deal with them.  Furthermore, the following commands act
711 on items when the cursor is in the first line of an item (the line
712 with the bullet or number).
714 @table @kbd
715 @kindex @key{TAB}
716 @item @key{TAB}
717 Items can be folded just like headline levels if you set the variable
718 @code{org-cycle-include-plain-lists}.  The level of an item is then
719 given by the indentation of the bullet/number.  However, items are
720 always subordinate to real headlines, the hierarchies remain
721 completely separated.
722 @kindex M-@key{RET}
723 @item M-@key{RET}
724 Insert new item at current level.  With prefix arg, for a new heading.
725 @kindex M-S-@key{up}
726 @kindex M-S-@key{down}
727 @item M-S-@key{up}
728 @itemx M-S-@key{down}
729 Move the item including subitems up/down (swap with previous/next item
730 of same indentation).  If the list is ordered, renumbering is
731 automatic.
732 @kindex M-S-@key{left}
733 @kindex M-S-@key{right}
734 @item M-S-@key{left}
735 @itemx M-S-@key{right}
736 Decrease/increase the indentation of the item, including subitems.
737 Initially, the item tree is selected based on current indentation.
738 When these commands are executed several times in direct succession,
739 the initially selected region is used, even if the new indentation
740 would imply a different hierarchy.  To use the new hierarchy, break
741 the command chain with a cursor motion or so.
742 @kindex C-c C-c
743 @item C-c C-c
744 Renumber the ordered list at the cursor.
745 @end table
747 @node Tables, Hyperlinks, Document Structure, Top
748 @chapter Tables
749 @cindex tables
750 @cindex editing tables
752 Org-mode has a very fast and intuitive table editor built-in.
753 Spreadsheet-like calculations are supported in connection with the
754 Emacs @file{calc} package.
756 @menu
757 * Built-in table editor::       Simple tables
758 * Table calculations::          Compute a field from other fields
759 * orgtbl-mode::                 The table editor as minor mode
760 * table.el::                    Complex tables
761 @end menu
763 @node Built-in table editor, Table calculations, Tables, Tables
764 @section The built-in table editor
765 @cindex table editor, builtin
767 Org-mode makes it easy to format tables in plain ASCII.  Any line with
768 @samp{|} as the first non-white character is considered part of a
769 table.  @samp{|} is also the column separator.  A table might look
770 like this:
772 @example
773 | Name  | Phone | Age |
774 |-------+-------+-----|
775 | Peter |  1234 |  17 |
776 | Anna  |  4321 |  25 |
777 @end example
779 A table is re-aligned automatically each time you press @key{TAB} or
780 @key{RET} or @kbd{C-c C-c} inside the table.  @key{TAB} also moves to
781 the next field (@key{RET} to the next row) and creates new table rows
782 at the end of the table or before horizontal lines.  The indentation
783 of the table is set by the first line.  Any line starting with
784 @samp{|-} is considered as a horizontal separator line and will be
785 expanded on the next re-align to span the whole table width.  So, to
786 create the above table, you would only type
788 @example
789 |Name|Phone|Age
791 @end example
792 @noindent and then press @key{TAB} to align the table and start filling in
793 fields.
795 When typing text into a field, Org-mode treats @key{DEL},
796 @key{Backspace}, and all character keys in a special way, so that
797 inserting and deleting avoids shifting other fields.  Also, when
798 typing @emph{immediately after the cursor was moved into a new field
799 with @kbd{@key{TAB}}, @kbd{S-@key{TAB}} or @kbd{@key{RET}}}, the
800 field is automatically made blank.  If this behavior is too
801 unpredictable for you, configure the variables
802 @code{org-enable-table-editor} and @code{org-table-auto-blank-field}.
804 @table @kbd
805 @tsubheading{Creation and conversion}
806 @item M-x org-table-create
807 Creates an empty Org-mode table.  However, it is much easier to just
808 start typing, like @kbd{|Name|Phone|Age @key{RET} |- @key{TAB}}
810 @kindex C-c C-c
811 @item C-c C-c
812 Convert region to table.  Works when the cursor is not in an existing
813 table, and when there is a region defined.  If every line contains at
814 least one TAB character, the function assumes that the material is tab
815 separated.  If not, lines are split at whitespace into fields.  You
816 can use a prefix argument to indicate how many consecutive spaces are
817 at least required to indicate a field separator (default: just one).
819 @tsubheading{Re-aligning and field motion}
820 @kindex C-c C-c
821 @item C-c C-c
822 Re-align the table without moving the cursor.
824 @kindex @key{TAB}
825 @item @key{TAB}
826 Re-align the table, move to the next field.  Creates a new row if
827 necessary.
829 @kindex S-@key{TAB}
830 @item S-@key{TAB}
831 Re-align, move to previous field.
833 @kindex @key{RET}
834 @item @key{RET}
835 Re-align the table and move down to next row.  Creates a new row if
836 necessary.  At the beginning or end of a line, @key{RET} still does
837 NEWLINE, so it can be used to split a table.
839 @tsubheading{Column and row editing}
840 @kindex M-@key{left}
841 @kindex M-@key{right}
842 @item M-@key{left}
843 @itemx M-@key{right}
844 Move the current column left/right
846 @kindex M-S-@key{left}
847 @item M-S-@key{left}
848 Kill the current column.
850 @kindex M-S-@key{right}
851 @item M-S-@key{right}
852 Insert a new column to the left of the cursor position.
854 @kindex M-@key{up}
855 @kindex M-@key{down}
856 @item M-@key{up}
857 @itemx M-@key{down}
858 Move the current row up/down
860 @kindex M-S-@key{up}
861 @item M-S-@key{up}
862 Kill the current row or horizontal line.
864 @kindex M-S-@key{down}
865 @item M-S-@key{down}
866 Insert a new row above (with arg: below) the current row.
868 @kindex C-c -
869 @item C-c -
870 Insert a horizontal line below current row. With prefix arg, the line
871 is created above the current line.
873 @kindex C-c ^
874 @item C-c ^
875 Sort the table lines in the region.  Point and mark must be in the first
876 and last line to be included, and must be in the column that should be
877 used for sorting.  The command prompts for numerical versus
878 alphanumerical sorting.
880 @tsubheading{Regions}
881 @kindex C-c C-x M-w
882 @item C-c C-x M-w
883 Copy a rectangular region from a table to a special clipboard.  Point
884 and mark determine edge fields of the rectangle.  The process ignores
885 horizontal separator lines.
886 @kindex C-c C-x C-w
887 @item C-c C-x C-w
888 Copy a rectangular region from a table to a special clipboard, and
889 blank all fields in the rectangle.  So this is the ``cut'' operation.
890 @kindex C-c C-x C-y
891 @item C-c C-x C-y
892 Paste a rectangular region into a table.
893 The upper right corner ends up in the current field.  All involved fields
894 will be overwritten.  If the rectangle does not fit into the present table,
895 the table is enlarged as needed.  The process ignores horizontal separator
896 lines.
897 @kindex C-c C-q
898 @item C-c C-q
899 Wrap several fields in a column like a paragraph.  If there is an active
900 region, and both point and mark are in the same column, the text in the
901 column is wrapped to minimum width for the given number of lines.  A
902 prefix ARG may be used to change the number of desired lines.  If there
903 is no region, the current field is split at the cursor position and the
904 text fragment to the right of the cursor is prepended to the field one
905 line down. If there is no region, but you specify a prefix ARG, the
906 current field gets blank, and the content is appended to the field
907 above.
909 @tsubheading{Calculations}
910 @cindex formula, in tables
911 @cindex calculations, in tables
912 @kindex C-c =
913 @item C-c =
914 Install a new formula for the current column and replace current field
915 with the result of the formula.
917 @kindex C-u C-c =
918 @item C-u C-c =
919 Install a new formula for the current field, which must be a named
920 field.  Evaluate the formula and replace the field content with the
921 result.
923 @kindex C-c '
924 @item C-c '
925 Edit all formulas associated with the current table in a separate
926 buffer.
928 @kindex C-c *
929 @item C-c *
930 Recalculate the current row by applying the stored formulas from left
931 to right.  When called with a @kbd{C-u} prefix, recalculate the
932 entire table, starting with the first non-header line (i.e. below the
933 first horizontal separator line).  For details, see @ref{Table calculations}.
935 @kindex C-#
936 @item C-#
937 Rotate the calculation mark in first column through the states
938 @samp{}, @samp{#}, @samp{*}, @samp{!}, @samp{$}.  For the meaning of
939 these marks see @ref{Advanced features}.  When there is an active
940 region, change all marks in the region.
942 @kindex C-c ?
943 @item C-c ?
944 Which table column is the cursor in?  Displays number >0 in echo
945 area.
947 @cindex region, active
948 @cindex active region
949 @cindex transient-mark-mode
950 @kindex C-c +
951 @item C-c +
952 Sum the numbers in the current column, or in the rectangle defined by
953 the active region.  The result is shown in the echo area and can
954 be inserted with @kbd{C-y}.
956 @kindex S-@key{RET}
957 @item S-@key{RET}
958 When current field is empty, copy from first non-empty field above.
959 When not empty, copy current field down to next row and move cursor
960 along with it.  Depending on the variable
961 @code{org-table-copy-increment}, integer field values will be
962 incremented during copy.  This key is also used by CUA-mode
963 (@pxref{Interaction}).
965 @tsubheading{Miscellaneous}
966 @kindex C-c |
967 @item C-c |
968 Toggle the visibility of vertical lines in tables.  The lines are
969 still there, only made invisible with a text property.  Any @samp{|}
970 added by hand will become invisible on the next align.
972 @item M-x org-table-import
973 Import a file as a table.  The table should be TAB- or whitespace
974 separated.  Useful for example to import an Excel table or data from a
975 database, because these programs generally can write TAB-separated text
976 files.  This command works by inserting the file into the buffer and
977 then converting the region to a table.  Any prefix argument is passed on
978 to the converter, which uses it to determine the separator.
980 @item M-x org-table-export
981 Export the table as a TAB-separated file.  Useful for data exchange with
982 for example Excel or database programs.
984 @end table
986 If you don't like the automatic table editor because it gets into your
987 way in lines which you would like to start with @samp{|}, you can turn
988 it off with
989 @lisp
990 (setq org-enable-table-editor nil)
991 @end lisp
992 @noindent The only table command which then still works is
993 @kbd{C-c C-c} to do a manual re-align.
995 @node Table calculations, orgtbl-mode, Built-in table editor, Tables
996 @section Calculations in tables
997 @cindex calculations, in tables
998 @cindex spreadsheet capabilities
999 @cindex @file{calc} package
1001 The table editor makes use of the Emacs @file{calc} package to
1002 implement spreadsheet-like capabilities.  Org-mode has two levels of
1003 complexity for table calculations.  On the basic level, tables do only
1004 horizontal computations, so a field can be computed from other fields
1005 @emph{in the same row}, and Org-mode assumes that there is only one
1006 formula for each column.  This is very efficient to work with and
1007 enough for many tasks.  On the complex level, columns and individual
1008 fields can be named for easier referencing in formulas, individual
1009 named fields can have their own formula associated with them, and
1010 recalculation can be automated.
1012 @menu
1013 * Formula syntax::              How to write a formula
1014 * Column formulas::             Formulas valid for all fields in a column
1015 * Advanced features::           Field names, parameters and automatic recalc
1016 * Named-field formulas::        Formulas valid in single fields
1017 * Editing/debugging formulas::  Changing a stored formula
1018 * Appetizer::                   Taste the power of calc
1019 @end menu
1021 @node Formula syntax, Column formulas, Table calculations, Table calculations
1022 @subsection Formula syntax
1023 @cindex formula syntax
1024 @cindex syntax, of formulas
1026 A formula can be any algebraic expression understood by the Emacs
1027 @file{calc} package.  Before evaluation by @code{calc-eval}
1028 (@pxref{Calling Calc from Your Lisp Programs,calc-eval,Calling calc
1029 from Your Lisp Programs,calc,GNU Emacs Calc Manual}), variable
1030 substitution takes place:
1032 @example
1033   $        @r{refers to the current field}
1034   $3       @r{refers to the field in column 3 of the current row}
1035   $3..$7   @r{a vector of the fields in columns 3-7 of current row}
1036   $P1..$P3 @r{vector of column range, using column names}
1037   &2       @r{second data field above the current, in same column}
1038   &5-2     @r{vector from fifth to second field above current}
1039   &III-II  @r{vector of fields between 2nd and 3rd hline above}
1040   &III     @r{vector of fields between third hline above and current field}
1041   $name    @r{a named field, parameter or constant}
1042 @end example
1044 @cindex vectors, in table calculations
1045 The range vectors can be directly fed into the calc vector functions
1046 like @samp{vmean} and @samp{vsum}.
1048 @cindex name, of column or field
1049 @cindex constants, in calculations
1050 @samp{$name} is interpreted as the name of a column, parameter or
1051 constant.  Constants are defined globally through the variable
1052 @code{org-table-formula-constants}.  If you have the
1053 @file{constants.el} package, it will also be used to resolve
1054 constants, including natural constants like @samp{$h} for Planck's
1055 constant, units like @samp{$km} for kilometers.  Column names and
1056 parameters can be specified in special table lines.  These are
1057 described below, see @ref{Advanced features}.
1059 @cindex format specifier
1060 @cindex mode, for @file{calc}
1061 A formula can contain an optional mode string after a semicolon.  This
1062 string consists of flags to influence calc's modes@footnote{By
1063 default, Org-mode uses the standard calc modes (precision 12, angular
1064 units degrees, fraction and symbolic modes off).  However, the display
1065 format has been changed to @code{(float 5)} to keep tables compact.
1066 The default settings can be configured using the variable
1067 @code{org-calc-default-modes}.} during execution, e.g.  @samp{p20} to
1068 switch the internal precision to 20 digits, @samp{n3}, @samp{s3},
1069 @samp{e2} or @samp{f4} to switch to normal, scientific, engineering,
1070 or fix display format, respectively, and @samp{D}, @samp{R}, @samp{F},
1071 and @samp{S} to turn on degrees, radians, fraction and symbolic modes,
1072 respectively.  In addition, you may provide a @code{printf} format
1073 specifier to reformat the final result.  A few examples:
1074 @example
1075   $1+$2                @r{Sum of first and second field}
1076   $1+$2;%.2f           @r{Same, format result to two decimals}
1077   exp($2)+exp($1)      @r{Math functions can be used}
1078   $;%.1f               @r{Reformat current cell to 1 decimal}
1079   ($3-32)*5/9          @r{Degrees F -> C conversion}
1080   $c/$1/$cm            @r{Hz -> cm conversion, using @file{constants.el}}
1081   tan($1);Dp3s1        @r{Compute in degrees, precision 3, display SCI 1}
1082   sin($1);Dp3%.1e      @r{Same, but use printf specifier for display}
1083   vmean($2..$7)        @r{Compute column range mean, using vector function}
1084   vsum(&III)           @r{Sum numbers from 3rd hline above to here}
1085   taylor($3,x=7,2)     @r{taylor series of $3, at x=7, second degree}
1086 @end example
1088 @node Column formulas, Advanced features, Formula syntax, Table calculations
1089 @subsection Column formulas
1090 @cindex column formula
1091 @cindex formula, for table column
1093 To apply a formula to a field, type it directly into the field,
1094 preceded by an equal sign, like @samp{=$1+$2}.  When you press
1095 @key{TAB} or @key{RET} or @kbd{C-c C-c} with the cursor still in the
1096 field, the formula will be stored as the formula for the current
1097 column, evaluated and the current field replaced with the result.  If
1098 the field contains only @samp{=}, the previously stored formula for
1099 this column is used.
1101 For each column, Org-mode will remember the most recently used
1102 formula.  The information is stored in a special line starting with
1103 @samp{#+TBLFM} directly below the table.  When adding/deleting/moving
1104 columns with the appropriate commands, the stored equations will be
1105 modified accordingly.  When a column used in a calculation is removed,
1106 references to this column become invalid and will cause an error upon
1107 applying the equation.
1109 Instead of typing an equation into the field, you may also use the
1110 command @kbd{C-c =}.  It prompts for a formula (with default taken
1111 from the @samp{#+TBLFM:} line) and applies it to the current field.  A
1112 numerical prefix (e.g. @kbd{C-5 C-c =}) will apply it to that many
1113 subsequent fields in the current column.
1115 @cindex recomputing table fields
1116 To recompute all the fields in a line, use the command @kbd{C-c *}.
1117 It re-applies all stored equations to the current row, from left to
1118 right.  With a @kbd{C-u} prefix, this will be done to every line in
1119 the table, so use this command it you want to make sure the entire
1120 table is up-to-date. @kbd{C-u C-c C-c} is another way to update the
1121 entire table.  Global updating does not touch the line(s) above the
1122 first horizontal separator line, assuming that this is the table
1123 header.
1125 @node Advanced features, Named-field formulas, Column formulas, Table calculations
1126 @subsection Advanced features
1128 If you want want the recalculation of fields to happen automatically,
1129 or if you want to be able to assign a formula to an individual field
1130 (instead of an entire column) you need to reserve the first column of
1131 the table for special marking characters.  Here is an example of a
1132 table that collects exam results of students and makes use of these
1133 features:
1134 @example
1135 @group
1136 |---+---------+--------+--------+--------+-------+------|
1137 |   | Student | Prob 1 | Prob 2 | Prob 3 | Total | Note |
1138 |---+---------+--------+--------+--------+-------+------|
1139 | ! |         |     P1 |     P2 |     P3 |   Tot |      |
1140 | # | Maximum |     10 |     15 |     25 |    50 | 10.0 |
1141 | ^ |         |     m1 |     m2 |     m3 |    mt |      |
1142 |---+---------+--------+--------+--------+-------+------|
1143 | # | Peter   |     10 |      8 |     23 |    41 |  8.2 |
1144 | # | Sara    |      6 |     14 |     19 |    39 |  7.8 |
1145 | # | Sam     |      2 |      4 |      3 |     9 |  1.8 |
1146 |---+---------+--------+--------+--------+-------+------|
1147 |   | Average |        |        |        |  29.7 |      |
1148 | ^ |         |        |        |        |    at |      |
1149 | $ | max=50  |        |        |        |       |      |
1150 |---+---------+--------+--------+--------+-------+------|
1151 #+TBLFM: $6=vsum($P1..$P3)::$7=10*$Tot/$max;%.1f::$at=vmean(&II);%.1f
1152 @end group
1153 @end example
1155 @noindent @b{Important}: Please note that for these special tables,
1156 recalculating the table with @kbd{C-u C-c *} does only affect rows
1157 which are marked @samp{#} or @samp{*}, and named fields.  The column
1158 formulas are not applied in rows with empty first field.
1160 @cindex marking characters, tables
1161 The marking characters have the following meaning:
1162 @table @samp
1163 @item !
1164 The fields in this line define names for the columns, so that you may
1165 refer to a column as @samp{$Tot} instead of @samp{$6}.
1166 @item ^
1167 This row defines names for the fields @emph{above} the row.  With such
1168 a definition, any formula in the table may use @samp{$m1} to refer to
1169 the value @samp{10}.  Also, named fields can have their own formula
1170 associated with them.
1171 @item _
1172 Similar to @samp{^}, but defines names for the fields in the row
1173 @emph{below}. 
1174 @item $
1175 Fields in this row can define @emph{parameters} for formulas.  For
1176 example, if a field in a @samp{$} row contains @samp{max=50}, then
1177 formulas in this table can refer to the value 50 using @samp{$max}.
1178 Parameters work exactly like constants, only that they can be defined on
1179 a per-table basis.  Changing a parameter and then recalculating the
1180 table can be useful.
1181 @item #
1182 Fields in this row are automatically recalculated when pressing
1183 @key{TAB} or @key{RET} or @kbd{S-@key{TAB}} in this row.  Also, this row
1184 is selected for a global recalculation with @kbd{C-u C-c *}.  Unmarked
1185 lines will be left alone by this command.
1186 @item *
1187 Selects this line for global recalculation with @kbd{C-u C-c *}, but
1188 not for automatic recalculation.  Use this when automatic
1189 recalculation slows down editing too much.
1190 @item  
1191 Unmarked lines are exempted from recalculation with @kbd{C-u C-c *}.
1192 All lines that should be recalculated should be marked with @samp{#}
1193 or @samp{*}.
1194 @end table
1196 @node Named-field formulas, Editing/debugging formulas, Advanced features, Table calculations
1197 @subsection Named-field formulas
1198 @cindex named field formula
1199 @cindex formula, for named table field
1201 A named field can have its own formula associated with it.  In the
1202 example above, this is used for the @samp{at} field that contains
1203 the average result of the students.  To enter a formula for a named
1204 field, just type it onto the buffer, preceded by @samp{:=}.  Or use
1205 @kbd{C-u C-c =}.  This equation will be stored below the table like
1206 @samp{$name=...}.  Any recalculation in the table (even if only
1207 requested for the current line) will also update all named field
1208 formulas.
1210 @node Editing/debugging formulas, Appetizer, Named-field formulas, Table calculations
1211 @subsection Editing and debugging formulas
1212 @cindex formula editing
1213 @cindex editing, of table formulas
1215 To edit a column or field formula, you can use the commands @kbd{C-c
1216 =} and @kbd{C-u C-c =}, respectively.  The currently active expression
1217 is then presented as default in the minibuffer, were it may be edited.
1219 Note that making a table field blank does not remove the formula
1220 associated with the field - during the next recalculation the field
1221 will be filled again.  To remove a formula from a field, you have to
1222 give an empty reply when prompted for the formula, or to edit the
1223 @samp{#+TBLFM} line.
1225 @kindex C-c C-c
1226 You may edit the @samp{#+TBLFM} directly and re-apply
1227 the changed equations with @kbd{C-c C-c} in that line, or with the
1228 normal recalculation commands in the table.  
1230 @kindex C-c '
1231 @kindex C-c C-c
1232 @kindex C-c C-q
1233 @kindex C-c ?
1234 In particular for large tables with many formulas, it is convenient to
1235 use the command @kbd{C-c '} to edit the formulas of the current table
1236 in a separate buffer.  That buffer will show the formulas one per
1237 line, and you are free to edit, add and remove formulas.  Press
1238 @kbd{C-c ?} on a @samp{$...}  expression to get information about its
1239 interpretation.  Exiting the buffer with @kbd{C-c C-c} only stores the
1240 modified formulas below the table.  Exiting with @kbd{C-u C-c C-c}
1241 also applies them to the entire table.  @kbd{C-c C-q} exits without
1242 installing the changes.
1244 When the evaluation of a formula leads to an error, the field content
1245 becomes the string @samp{#ERROR}.  If you would like see what is going
1246 on during variable substitution and calculation in order to find a
1247 bug, turn on formula debugging in the menu and repeat the calculation
1248 by pressing, for example by pressing @kbd{C-c = @key{RET}} in a field.
1249 Detailed information will be displayed.
1251 @node Appetizer,  , Editing/debugging formulas, Table calculations
1252 @subsection Appetizer
1254 Finally, just to wet your appetite on what can be done with the fantastic
1255 @file{calc} package, here is a table that computes the Taylor series
1256 for a couple of functions (homework: try that with Excel :-)
1258 @example
1259 @group
1260 |---+-------------+---+-----+--------------------------------------|
1261 |   | Func        | n | x   | Result                               |
1262 |---+-------------+---+-----+--------------------------------------|
1263 | # | exp(x)      | 1 | x   | 1 + x                                |
1264 | # | exp(x)      | 2 | x   | 1 + x + x^2 / 2                      |
1265 | # | exp(x)      | 3 | x   | 1 + x + x^2 / 2 + x^3 / 6            |
1266 | # | x^2+sqrt(x) | 2 | x=0 | x*(0.5 / 0) + x^2 (2 - 0.25 / 0) / 2 |
1267 | # | x^2+sqrt(x) | 2 | x=1 | 2 + 2.5 x - 2.5 + 0.875 (x - 1)^2    |
1268 | * | tan(x)      | 3 | x   | 0.0175 x + 1.77e-6 x^3               |
1269 |---+-------------+---+-----+--------------------------------------|
1270 #+TBLFM: $5=taylor($2,$4,$3);n3
1271 @end group
1272 @end example
1274 @node orgtbl-mode, table.el, Table calculations, Tables
1275 @section The Orgtbl minor mode
1276 @cindex orgtbl-mode
1277 @cindex minor mode for tables
1279 If you like the intuitive way the Org-mode table editor works, you
1280 might want to use it also in other modes like text-mode or mail-mode.
1281 The minor mode Orgtbl-mode makes this possible.  You can always toggle
1282 the mode with @kbd{M-x orgtbl-mode}.  To turn it on by default, for
1283 example in mail mode, use
1284 @lisp
1285 (add-hook 'mail-mode-hook 'turn-on-orgtbl)
1286 @end lisp
1288 @node table.el,  , orgtbl-mode, Tables
1289 @section The @file{table.el} package
1290 @kindex C-c C-c
1291 @cindex table editor, @file{table.el}
1292 @cindex @file{table.el}
1294 Complex ASCII tables with automatic line wrapping, column- and
1295 row-spanning, and alignment can be created using the Emacs table
1296 package by Takaaki Ota (@uref{http://sourceforge.net/projects/table}).
1297 When @key{TAB} or @kbd{C-c C-c} is pressed in such a table, Org-mode
1298 will call @command{table-recognize-table} and move the cursor into the
1299 table.  Inside a table, the keymap of Org-mode is inactive.  In order
1300 to execute Org-mode-related commands, leave the table.
1302 @table @kbd
1303 @kindex C-c C-c
1304 @item C-c C-c
1305 Recognize @file{table.el} table.  Works when the cursor is in a
1306 table.el table.
1308 @kindex C-c ~
1309 @item C-c ~
1310 Insert a table.el table.  If there is already a table at point, this
1311 command converts it between the table.el format and the Org-mode
1312 format.  See the documentation string of the command
1313 @code{org-convert-table} for the restrictions under which this is
1314 possible.
1315 @end table
1317 @node Hyperlinks, TODO items, Tables, Top
1318 @chapter Hyperlinks
1319 @cindex hyperlinks
1321 Just like HMTL, Org-mode provides links inside a file, and external
1322 links to other files, Usenet articles, emails and much more.
1324 @menu
1325 * Internal Links::              CamelCaseWords as internal links
1326 * External Links::              URL-like links to the world
1327 * Managing links::              Creating, inserting and following
1328 * Search Options::              Linking to a specific location
1329 * Remember::                    Org-trees store quick notes
1330 @end menu
1332 @node Internal Links, External Links, Hyperlinks, Hyperlinks
1333 @section Internal Links
1334 @cindex internal links
1335 @cindex links, internal
1336 @cindex CamelCase links
1338 Similar to Wiki implementations, Org-mode interprets words spelled in
1339 CamelCase (i.e. mixed case with at least one capital letter following
1340 on a small letter inside the word) as links.  While in Wiki these
1341 links usually point to another file, in Org-mode they point to a
1342 target in the current file.  Targets are CamelCased words in double
1343 angular brackets, and may be located anywhere, also in a comment line.
1344 For example
1345 @example
1346 # <<MyTarget>>
1347 @end example
1349 Each occurrence of @samp{MyTarget} in the file is an active link that
1350 can be followed with @kbd{C-c C-o} or with a mouse click
1351 (@pxref{Managing links}).  If no dedicated target exists, org-mode will
1352 search for the words in the link separated by white space, in the
1353 above example for @samp{my target}.  If the link starts with a star
1354 like @samp{*MyTarget}, the search is restricted to headlines.
1355 Org-mode will first try an exact match of a full headline, but then
1356 move on to more and more lenient searches.  The link @samp{*MyTargets}
1357 will find any of the following
1358 @example
1359 ** My targets
1360 ** TODO my targets are bright
1361 ** my 20 targets are
1362 @end example
1363 @cindex completion, of CamelCase links
1364 @cindex CamelCase links, completion of
1365 It is therefore often not even necessary to set a dedicated target.
1366 The link will automatically find a target.  If you want to see what
1367 lines in the current buffer are matched by a given CamelCase link,
1368 open the link with @kbd{C-u C-c C-o}.  Even if there are several
1369 matches, org-mode will usually find the right one since it tries
1370 targets and exact matches first.  To insert links targeting a
1371 headline, in-buffer completion can be used.  Just type a star followed
1372 by a few optional letters into the buffer and press @kbd{M-@key{TAB}}.
1373 CamelCased versions of all headlines in the current buffer will be
1374 offered as completions.  @xref{Managing links}, for more commands
1375 creating links.
1377 @node External Links, Managing links, Internal Links, Hyperlinks
1378 @section External Links
1379 @cindex links, external
1380 @cindex external links
1381 @cindex links, external
1382 @cindex GNUS links
1383 @cindex BBDB links
1384 @cindex URL links
1385 @cindex file links
1386 @cindex VM links
1387 @cindex RMAIL links
1388 @cindex WANDERLUST links
1389 @cindex USENET links
1390 @cindex SHELL links
1392 Org-mode supports links to files, websites, Usenet and email messages;
1393 and BBDB database entries.  Links are just plain-text URL-like
1394 locators, optionally enclosed by angular brackets.  The following list
1395 shows examples for each link type.
1397 @example
1398 <http://www.astro.uva.nl/~dominik>         @r{on the web}
1399 <file:/home/dominik/images/jupiter.jpg>    @r{file, absolute path}
1400 <file:papers/last.pdf>                     @r{file, relative path}
1401 <news:comp.emacs>                          @r{Usenet link}
1402 <mailto:adent@@galaxy.net>                  @r{Mail link}
1403 <vm:folder>                                @r{VM folder link}
1404 <vm:folder#id>                             @r{VM message link}
1405 <vm://myself@@some.where.org/folder#id>     @r{VM on remote machine}
1406 <wl:folder>                                @r{WANDERLUST folder link}
1407 <wl:folder#id>                             @r{WANDERLUST message link}
1408 <rmail:folder>                             @r{RMAIL folder link}
1409 <rmail:folder#id>                          @r{RMAIL message link}
1410 <gnus:group>                               @r{GNUS group link}
1411 <gnus:group#id>                            @r{GNUS article link}
1412 <bbdb:Richard Stallman>                    @r{BBDB link}
1413 <shell:ls *.org>@footnote{Note that @samp{<} and @samp{>} cannot be part of a link, and therefore of a shell command.  If you need redirection, use @@@{ and @@@} instead.}                          @r{A shell command}
1414 @end example
1416 A link may contain space characters and is terminated by @samp{>} or by
1417 the end of a line.  In tables, the end of a table field also terminates
1418 a link.  Angle brackets around a link are not required, but are
1419 recommended to avoid problems with punctuation and other text following
1420 the link.  See also the variable @code{org-allow-space-in-links}.
1423 @node Managing links, Search Options, External Links, Hyperlinks
1424 @section Managing links
1426 Org-mode provides methods to create a link in the correct syntax, to
1427 insert it into an org-mode file, and to follow the link.
1429 @table @kbd
1430 @kindex C-c l
1431 @cindex storing links
1432 @item C-c l
1433 Store a link to the current location.  This is a @emph{global} command
1434 which can be used in any buffer to create a link.  The link will be
1435 stored for later insertion into an Org-mode buffer (see below).  For
1436 VM, RMAIL, WANDERLUST, GNUS and BBDB buffers, the link will point to
1437 the current article/entry.  For W3 and W3M buffer, the link goes to
1438 the current URL.  For Org-mode files, the current headline is
1439 targeted.  For any other files, the link will point to the file, with
1440 a CamelCase (@pxref{Search Options}) search string pointing to the
1441 contents of the current line.  If there is an active region, the
1442 selected words will form the basis of the search string.  The key
1443 binding @kbd{C-c l} is only a suggestion - see @ref{Installation and
1444 Activation}.
1446 @kindex C-c C-l
1447 @cindex link completion
1448 @cindex file name completion
1449 @cindex completion, of links
1450 @cindex completion, of file names
1451 @cindex inserting links
1452 @item C-c C-l
1453 Insert a link.  This prompts for a link to be inserted into the
1454 buffer.  You can just type a link, using one of the link type prefixes
1455 mentioned in the examples above.  Through completion, all links stored
1456 during the current session can be accessed.  When called with prefix
1457 arg, you can use file name completion to enter a file link.  The link
1458 will be formatted as given in the variable @code{org-link-format} and
1459 inserted into the buffer.  Note that you don't have to use this
1460 command to insert a link.  Links in Org-mode are plain text, and you
1461 can type or paste them straight into the buffer.
1463 @cindex following links
1464 @kindex C-c C-o
1465 @kindex mouse-2
1466 @item C-c C-o
1467 @itemx mouse-2
1468 Open link at point.  This will launch a web browser for URLs (using
1469 @command{browse-url-at-point}), run vm/gnus/bbdb for the corresponding
1470 links, and execute the command in a shell link.  When the cursor is on
1471 a CamelCase link, this commands runs the corresponding search.  When
1472 the cursor is on a TAGS list in a headline, it creates the
1473 corresponding TAGS view.  Furthermore, it will visit text files in
1474 @samp{file:} links with Emacs and select a suitable application for
1475 non-text files.  Classification of files is based on file extension
1476 only.  See option @code{org-file-apps}.  If there is no link at point,
1477 the current subtree will be searched for one.  If you want to override
1478 the default application and visit the file with Emacs, use a @kbd{C-u}
1479 prefix.  If the cursor is on a time stamp, compiles the agenda for
1480 that date.
1482 @strong{IMPORTANT}: Be careful not to use any dangerous commands in a
1483 shell link.
1485 @kindex mouse-2
1486 @item mouse-2
1487 On links, @kbd{mouse-2} will open the link just like @kbd{C-c C-o} would.
1489 @kindex mouse-3
1490 @item mouse-3
1491 Like @kbd{mouse-2}, but force file links to be opened with Emacs.
1492 @end table
1495 @node Search Options, Remember, Managing links, Hyperlinks
1496 @section Search options in file links
1497 @cindex search option in file links
1498 @cindex file links, searching
1500 File links can contain additional information to make Emacs jump to a
1501 particular location in the file when following a link.  This can be a
1502 line number or a search option after a double@footnote{For backward
1503 compatibility, line numbers can also follow a single colon.} colon.
1504 For example:
1505 @example
1506 <file:~/code/main.c::255>
1507 <file:~/xx.org::MyTarget>
1508 <file:~/xx.org::find me>
1509 <file:~/xx.org::/regexp/>
1510 @end example
1511 @noindent Here is what these options do.
1513 @table @code
1514 @item 255
1515 Jump to line 255.
1516 @item MyGoal
1517 Search for a link target with name MyGoal, or do a text search for
1518 @samp{my target}, similar to the CamelCase search in internal links,
1519 see @ref{Internal Links}.
1520 @item find me
1521 Do a normal text search for the text @samp{find me}.
1522 @item /regexp/
1523 Do a regular expression search for @code{regexp}.  This uses the Emacs
1524 command @code{occur} to list all matches in a separate window.  If the
1525 target file is in Org-mode, @code{org-occur} is used to create a
1526 sparse tree with the matches.
1527 @c If the target file is a directory,
1528 @c @code{grep} will be used to search all files in the directory.
1529 @end table
1531 To use the search options also for a search in the current file, a
1532 file link with an empty file name can be used.  For example,
1533 @code{<file:::find me>} does a search for @samp{find me} in the
1534 current file.
1536 @node Remember,  , Search Options, Hyperlinks
1537 @section Remember
1538 @cindex @file{remember.el}
1540 Another way to create org entries with links to other files is through
1541 the @emph{Remember} package by John Wiegley.  @emph{Remember} lets you
1542 store quick notes with little interruption of your work flow.  See
1543 @uref{http://www.emacswiki.org/cgi-bin/wiki/RememberMode} for more
1544 information.  The notes produced by @emph{Remember} can be stored in
1545 different ways, and Org-mode files are a good target.  Org-mode allows
1546 to file away notes either to a default file, or directly to the
1547 correct location in your Org-mode outline tree.  The following
1548 customization@footnote{The two autoload forms are only necessary if
1549 @file{org.el} is not part of the Emacs distribution or an XEmacs
1550 package.} will tell @emph{Remember} to use org files as target, and to
1551 create annotations compatible with Org-mode links.
1553 @example
1554 (autoload 'org-remember-annotation "org")
1555 (autoload 'org-remember-handler "org")
1556 (setq org-directory "~/path/to/my/orgfiles/")
1557 (setq org-default-notes-file "~/.notes")
1558 (setq remember-annotation-functions '(org-remember-annotation))
1559 (setq remember-handler-functions '(org-remember-handler))
1560 @end example
1562 When you compose a note with remember, you have to press @kbd{C-c C-c}
1563 to exit remember-mode and to file away the note.  The handler first
1564 prompts for a target file - if you press @key{RET}, the value of
1565 @code{org-default-notes-file} is used.  Then the command offers the
1566 headings tree of the selected file.  You can either immediately press
1567 @key{RET} to get the note appended to the file.  Or you can use
1568 vertical cursor motion (@key{up} and @key{down}) and visibility
1569 cycling (@key{TAB}) to find a better place.  Pressing @key{RET} or
1570 @key{left} or @key{right} leads to the following result.
1572 @multitable @columnfractions 0.2 0.1 0.7
1573 @item @b{Cursor position} @tab @b{Key} @tab @b{Note gets inserted}
1574 @item buffer-start @tab @key{RET} @tab as level 2 heading at end of file
1575 @item on headline @tab @key{RET} @tab as sublevel of the heading at cursor
1576 @item             @tab @key{left}  @tab as same level, before current heading
1577 @item             @tab @key{right} @tab as same level, after current heading
1578 @item not on headline @tab @key{RET}
1579       @tab at cursor position, level taken from context.
1580            Or use prefix arg to specify level manually.
1581 @end multitable
1583 So a fast way to store the note is to press @kbd{C-c C-c @key{RET}
1584 @key{RET}} to append it to the default file.  Even shorter would be
1585 @kbd{C-u C-c C-c}, which does the same without even showing the tree.
1586 But with little extra effort, you can push it directly to the correct
1587 location.
1589 Before inserting the text into a tree, the function ensures that the
1590 text has a headline, i.e. a first line that starts with a @samp{*}.
1591 If not, a headline is constructed from the current date and some
1592 additional data.  If the variable @code{org-adapt-indentation} is
1593 non-nil, the entire text is also indented so that it starts in the
1594 same column as the headline (after the asterisks).
1596 @node TODO items, Timestamps, Hyperlinks, Top
1597 @chapter TODO items
1598 @cindex TODO items
1600 Org-mode does not maintain TODO lists as a separate document.  TODO
1601 items are an integral part of the notes file, because TODO items
1602 usually come up while taking notes!  With Org-mode, you simply mark
1603 any entry in a tree as being a TODO item.  In this way, the
1604 information is not duplicated, and the entire context from which the
1605 item emerged is always present when you check.
1607 Of course, this technique causes TODO items to be scattered throughout
1608 your file.  Org-mode provides methods to give you an overview over all
1609 things you have to do.
1611 @menu
1612 * TODO basics::                 Marking and displaying TODO entries
1613 * Progress Logging::            Document your productivity
1614 * TODO extensions::             Workflow and assignments
1615 * Priorities::                  Some things are more important than others
1616 @end menu
1618 @node TODO basics, Progress Logging, TODO items, TODO items
1619 @section Basic TODO functionality
1621 Any headline can become a TODO item by starting it with the word TODO,
1622 for example
1624 @example
1625 *** TODO Write letter to Sam Fortune
1626 @end example
1628 @noindent
1629 The most important commands to work with TODO entries are:
1631 @table @kbd
1632 @kindex C-c C-t
1633 @cindex cycling, of TODO states
1634 @item C-c C-t
1635 Rotate the TODO state of the current item between
1636 @example
1637 ,-> (unmarked) -> TODO -> DONE --.
1638 '--------------------------------'
1639 @end example
1640 The same rotation can also be done ``remotely'' from the timeline and
1641 agenda buffers with the @kbd{t} command key (@pxref{Agenda commands}).
1642 @kindex C-c C-v
1643 @cindex sparse tree, for TODO
1644 @item C-c C-v
1645 View TODO items in a @emph{sparse tree} (@pxref{Sparse trees}).  Folds
1646 the entire buffer, but shows all TODO items and the headings hierarchy
1647 above them.  With prefix arg, show also the DONE entries.  With
1648 numerical prefix N, show the tree for the Nth keyword in the variable
1649 @code{org-todo-keywords}.
1650 @kindex C-c a t
1651 @item C-c a t
1652 Show the global TODO list.  This collects the TODO items from all
1653 agenda files (@pxref{Agenda}) into a single buffer.  The buffer is in
1654 @code{agenda-mode}, so there are commands to examine and manipulate
1655 the TODO entries directly from that buffer (@pxref{Agenda commands}).
1656 @xref{Global TODO list}, for more information.
1657 @item @code{org-agenda-include-all-todo}
1658 If you would like to have all your TODO items listed as part of your
1659 agenda, customize the variable @code{org-agenda-include-all-todo}.
1660 @end table
1662 @node Progress Logging, TODO extensions, TODO basics, TODO items
1663 @section Progress Logging
1664 @cindex progress logging
1665 @cindex logging, of progress
1666 If you want to keep track of @emph{when} a certain TODO item was
1667 finished, turn on logging with
1668 @lisp
1669 (setq org-log-done t)
1670 @end lisp
1671 @noindent
1672 Then each time you turn a TODO entry into DONE using either @kbd{C-c
1673 C-t} in the Org-mode buffer or @kbd{t} in the agenda buffer, a line
1674 @samp{CLOSED: [timestamp]} will be inserted just after the headline.
1675 If you turn the entry back into a TODO item again through further
1676 state cycling, that line will be removed again.  In the timeline
1677 (@pxref{Timeline}) and in the agenda (@pxref{Agenda}), you can then
1678 use the @kbd{L} key to display the TODO items closed on each day,
1679 giving you an overview of what has been done on a day.
1681 @node TODO extensions, Priorities, Progress Logging, TODO items
1682 @section Extended use of TODO keywords
1683 @cindex extended TODO keywords
1685 The default implementation of TODO entries is just two states:  TODO
1686 and DONE.  You can, however, use the TODO feature for more
1687 complicated things by configuring the variables
1688 @code{org-todo-keywords} and @code{org-todo-interpretation}.  Using
1689 special setup, you can even use TODO keywords in different ways in
1690 different org files.
1692 @menu
1693 * Workflow states::             From TODO to DONE in steps
1694 * TODO types::                  I do this, Fred the rest
1695 * Per file keywords::           Different files, different requirements
1696 @end menu
1698 @node Workflow states, TODO types, TODO extensions, TODO extensions
1699 @subsection TODO keywords as workflow states
1700 @cindex TODO workflow
1701 @cindex workflow states as TODO keywords
1703 You can use TODO keywords to indicate different states in the process
1704 of working on an item, for example
1706 @lisp
1707 (setq org-todo-keywords '("TODO" "FEEDBACK" "VERIFY" "DONE")
1708       org-todo-interpretation 'sequence)
1709 @end lisp
1711 @cindex completion, of TODO keywords
1712 Changing these variables becomes only effective in a new Emacs session.
1713 With this setup, the command @kbd{C-c C-t} will cycle an entry from
1714 TODO to FEEDBACK, then to VERIFY, and finally to DONE.  You may also
1715 use a prefix argument to quickly select a specific state.  For example
1716 @kbd{C-3 C-c C-t} will change the state immediately to VERIFY.
1717 If you define many keywords, you can use in-buffer completion (see
1718 @ref{Completion}) to insert these words into the buffer.
1720 @node TODO types, Per file keywords, Workflow states, TODO extensions
1721 @subsection TODO keywords as types
1722 @cindex TODO types
1723 @cindex names as TODO keywords
1724 @cindex types as TODO keywords
1726 The second possibility is to use TODO keywords to indicate different
1727 types of action items.  For example, you might want to indicate that
1728 items are for ``work'' or ``home''.  If you are into David Allen's
1729 @emph{Getting Things DONE}, you might want to use todo types
1730 @samp{NEXTACTION}, @samp{WAITING}, @samp{MAYBE}.  Or, when you work
1731 with several people on a single project, you might want to assign
1732 action items directly to persons, by using their names as TODO
1733 keywords.  This would be set up like this:
1735 @lisp
1736 (setq org-todo-keywords '("Fred" "Sara" "Lucy" "Mike" "DONE")
1737       org-todo-interpretation 'type)
1738 @end lisp
1740 In this case, different keywords do not indicate a sequence, but
1741 rather different types.  So it is normally not useful to change from
1742 one type to another.  Therefore, in this case the behavior of the
1743 command @kbd{C-c C-t} is changed slightly@footnote{This is also true
1744 for the @kbd{t} command in the timeline and agenda buffers.}.  When
1745 used several times in succession, it will still cycle through all
1746 names.  But when you return to the item after some time and execute
1747 @kbd{C-c C-t} again, it will switch from each name directly to DONE.
1748 Use prefix arguments or completion to quickly select a specific name.
1749 You can also review the items of a specific TODO type in a sparse tree
1750 by using a numeric prefix to @kbd{C-c C-v}.  For example, to see all
1751 things Lucy has to do, you would use @kbd{C-3 C-c C-v}.  To collect
1752 collect Lucy's items from all agenda files into a single buffer, you
1753 would use the prefix arg as well when creating the global todo list:
1754 @kbd{C-3 C-c t}.
1756 @node Per file keywords,  , TODO types, TODO extensions
1757 @subsection Setting up TODO keywords for individual files
1758 @cindex keyword options
1759 @cindex per file keywords
1761 It can be very useful to use different aspects of the TODO mechanism
1762 in different files, which is not possible with the global settings
1763 described above.  For file-local settings, you need to add special
1764 lines to the file which set the keywords and interpretation for that
1765 file only.  For example, to set one of the two examples discussed
1766 above, you need one of the following lines, starting in column zero
1767 anywhere in the file:
1769 @example
1770 #+SEQ_TODO: TODO FEEDBACK VERIFY DONE
1771 #+TYP_TODO: Fred Sara Lucy Mike DONE
1772 @end example
1774 @cindex Completion, of option keywords
1775 @kindex M-@key{TAB}
1776 @noindent To make sure you are using the correct keyword, type
1777 @samp{#+} into the buffer and then use @kbd{M-@key{TAB}} completion.
1779 @cindex DONE, final TODO keyword
1780 Remember that the last keyword must always mean that the item is DONE
1781 (you may use a different word, though).  Also note that in each file,
1782 only one of the two aspects of TODO keywords can be used.  After
1783 changing one of these lines, use @kbd{C-c C-c} with the cursor still
1784 in the line to make the changes known to Org-mode@footnote{Org-mode
1785 parses these lines only when Org-mode is activated after visiting a
1786 file.  @kbd{C-c C-c} with the cursor in a line starting with @samp{#+}
1787 is simply restarting Org-mode, making sure that these changes will be
1788 respected.}.
1790 If you want to use very many keywords, for example when working with a
1791 large group of people, you may split the names over several lines:
1793 @example
1794 #+TYP_TODO: Fred Sara Lucy Mike
1795 #+TYP_TODO: Luis George Jules Jessica
1796 #+TYP_TODO: Kim Arnold Peter
1797 #+TYP_TODO: DONE
1798 @end example
1800 @node Priorities,  , TODO extensions, TODO items
1801 @section Priorities
1802 @cindex priorities
1804 If you use Org-mode extensively to organize your work, you may end up
1805 with a number of TODO entries so large that you'd like to prioritize
1806 them.  This can be done by placing a @emph{priority cookie} into the
1807 headline, like this
1809 @example
1810 *** TODO [#A] Write letter to Sam Fortune
1811 @end example
1813 @noindent
1814 With its standard setup, Org-mode supports priorities @samp{A},
1815 @samp{B}, and @samp{C}.  @samp{A} is the highest priority.  An entry
1816 without a cookie is treated as priority @samp{B}.  Priorities make a
1817 difference only in the agenda (@pxref{Agenda}).
1819 @table @kbd
1820 @kindex @kbd{C-c ,}
1821 @item @kbd{C-c ,}
1822 Set the priority of the current item.  The command prompts for a
1823 priority character @samp{A}, @samp{B} or @samp{C}.  When you press
1824 @key{SPC} instead, the priority cookie is removed from the headline.
1825 The priorities can also be changed ``remotely'' from the timeline and
1826 agenda buffer with the @kbd{,} command (@pxref{Agenda commands}).
1828 @kindex S-@key{up}
1829 @kindex S-@key{down}
1830 @item S-@key{up}
1831 @itemx S-@key{down}
1832 Increase/decrease priority of current item.  Note that these keys are
1833 also used to modify time stamps (@pxref{Creating timestamps}).
1834 Furthermore, these keys are also used by CUA-mode
1835 (@pxref{Interaction}).
1836 @end table
1838 @node Timestamps, Agenda Views, TODO items, Top
1839 @chapter Timestamps
1841 Items can be labeled with timestamps to make them useful for project
1842 planning.
1844 @menu
1845 * Time stamps::                 Assigning a time to a tree entry
1846 * Creating timestamps::         Commands which insert timestamps
1847 @end menu
1850 @node Time stamps, Creating timestamps, Timestamps, Timestamps
1851 @section Time stamps, deadlines and scheduling
1852 @cindex time stamps
1853 @cindex ranges, time
1854 @cindex date stamps
1855 @cindex deadlines
1856 @cindex scheduling
1858 A time stamp is a specification of a date (possibly with time) in a
1859 special format, either @samp{<2003-09-16 Tue>} or @samp{<2003-09-16
1860 Tue 09:39>}.  A time stamp can appear anywhere in the headline or body
1861 of an org-tree entry.  Its presence allows to show entries on specific
1862 dates in the agenda (@pxref{Agenda}).  We distinguish:
1864 @table @var
1865 @cindex timestamp
1866 @item TIMESTAMP
1867 A simple time stamp just assigns a date/time to an item.  In the
1868 timeline and agenda displays, the headline of the entry will be shown
1869 exactly on that date.
1871 @item TIMERANGE
1872 @cindex timerange
1873 Two time stamps connected by @samp{--} denote a time range.  The
1874 headline will be shown on the first and last day of the range, and on
1875 any dates that are displayed and fall in the range.  Here is an
1876 example:
1878 @example
1879 ** Meeting in Amsterdam
1880    <2004-08-23 Mon>--<2004-08-26 Thu>
1881 @end example
1883 @item DEADLINE
1884 @cindex DEADLINE keyword
1885 If a time stamp is preceded by the word @samp{DEADLINE:}, the task
1886 (most likely a TODO item) is supposed to be finished on that date, and
1887 it will be listed then.  In addition, the compilation for @emph{today}
1888 will carry a warning about the approaching or missed deadline,
1889 starting @code{org-deadline-warning-days} before the due date, and
1890 continuing until the entry is marked DONE.  An example:
1892 @example
1893 *** TODO write article about the Earth for the Guide
1894     The editor in charge is <bbdb:Ford Prefect>
1895     DEADLINE: <2004-02-29 Sun>
1896 @end example
1898 @item SCHEDULED
1899 @cindex SCHEDULED keyword
1900 If a time stamp is preceded by the word @samp{SCHEDULED:}, it means
1901 you are planning to start working on that task on the given date.  The
1902 headline will be listed under the given date.  In addition, a reminder
1903 that the scheduled date has passed will be present in the compilation
1904 for @emph{today}, until the entry is marked DONE.  I.e., the
1905 task will automatically be forwarded.
1906 @end table
1908 @node Creating timestamps,  , Time stamps, Timestamps
1909 @section Creating timestamps
1910 @cindex creating timestamps
1911 @cindex timestamps, creating
1913 For Org-mode to recognize time stamps, they need to be in the specific
1914 format.  All commands listed below produce time stamps in the correct
1915 format.
1917 @table @kbd
1918 @kindex C-c .
1919 @item C-c .
1920 Prompt for a date and insert a corresponding time stamp.  When the
1921 cursor is at a previously used time stamp, it is updated to NOW.  When
1922 this command is used twice in succession, a time range is inserted.
1924 @kindex C-u C-c .
1925 @item C-u C-c .
1926 Like @kbd{C-c .}, but use the alternative format which contains date
1927 and time.
1929 @kindex C-c !
1930 @item C-c !
1931 Like @kbd{C-c .}, but insert an inactive time stamp not triggering the
1932 agenda. 
1934 @kindex C-c <
1935 @item C-c <
1936 Insert a time stamp corresponding to the cursor date in the Calendar.
1938 @kindex C-c >
1939 @item C-c >
1940 Access the Emacs calendar for the current date.  If there is a
1941 timestamp in the current line, goto the corresponding date
1942 instead.
1944 @kindex C-c C-o
1945 @item C-c C-o
1946 Access the agenda for the date given by the time stamp at point
1947 (@pxref{Agenda}).
1949 @kindex C-c C-d
1950 @item C-c C-d
1951 Insert @samp{DEADLINE} keyword along with a stamp.
1952 @kindex C-c C-w
1953 @cindex sparse tree, for deadlines
1954 @item C-c C-w
1955 Create a sparse tree with all deadlines that are either past-due, or
1956 which will become due within @code{org-deadline-warning-days}.
1957 With @kbd{C-u} prefix, show all deadlines in the file.  With a numeric
1958 prefix, check that many days.  For example, @kbd{C-1 C-c C-w} shows
1959 all deadlines due tomorrow.
1961 @kindex C-c C-s
1962 @item C-c C-s
1963 Insert @samp{SCHEDULED} keyword along with a stamp.
1965 @kindex S-@key{left}
1966 @kindex S-@key{right}
1967 @item S-@key{left}
1968 @itemx S-@key{right}
1969 Change date at cursor by one day.  These key bindings conflict with
1970 CUA-mode (@pxref{Interaction}).
1972 @kindex S-@key{up}
1973 @kindex S-@key{down}
1974 @item S-@key{up}
1975 @itemx S-@key{down}
1976 Change the item under the cursor in a timestamp.  The cursor can be on
1977 a year, month, day, hour or minute.  Note that if the cursor is not at
1978 a time stamp, these same keys modify the priority of an item.
1979 (@pxref{Priorities}). The key bindings also conflict with CUA-mode
1980 (@pxref{Interaction}).
1983 @kindex C-c C-y
1984 @cindex evaluate time range
1985 @item C-c C-y
1986 Evaluate a time range by computing the difference between start and
1987 end.  With prefix arg, insert result after the time range (in a table:
1988 into the following column).
1989 @end table
1991 @cindex date, reading in minibuffer
1992 @cindex time, reading in minibuffer
1993 @cindex calendar, for selecting date
1994 When Org-mode prompts for a date/time, the function reading your input
1995 will replace anything you choose not to specify with the current date
1996 and time.  For details, see the documentation string of
1997 @command{org-read-date}.  Also, a calender will pop up to allow
1998 selecting a date.  The calendar can be fully controlled from the
1999 minibuffer, and a date can be selected with the following commands:
2001 @table @kbd
2002 @kindex <
2003 @item <
2004 Scroll calendar backwards by one month.
2005 @kindex >
2006 @item >
2007 Scroll calendar forwards by one month.
2008 @kindex mouse-1
2009 @item mouse-1
2010 Select date by clicking on it.
2011 @kindex S-@key{right}
2012 @item S-@key{right}
2013 One day forward.
2014 @kindex S-@key{left}
2015 @item S-@key{left}
2016 One day back.
2017 @kindex S-@key{down}
2018 @item S-@key{down}
2019 One week forward.
2020 @kindex S-@key{up}
2021 @item S-@key{up}
2022 One week back.
2023 @kindex M-S-@key{right}
2024 @item M-S-@key{right}
2025 One month forward.
2026 @kindex M-S-@key{left}
2027 @item M-S-@key{left}
2028 One month back.
2029 @kindex @key{RET}
2030 @item @key{RET}
2031 Choose date in calendar (only if nothing typed into minibuffer).
2032 @end table
2034 @node Agenda Views, Exporting, Timestamps, Top
2035 @chapter Agenda Views
2036 @cindex agenda views
2038 Org-mode can select items based of various criteria, and display them
2039 in a separate buffer.  The information to be shown is collected from
2040 all @emph{agenda files}, the files listed in the variable
2041 @code{org-agenda-files}.  Thus even if you only work with a single
2042 Org-mode file, this file must be put into that list@footnote{When
2043 using the dispatcher pressing @kbd{1} before selecting a command will
2044 actually limit the command to the current file, and ignore
2045 @code{org-agenda-files} until the next dispatcher command.}.  You can
2046 customize @code{org-agenda-files}, but the easiest way to maintain it
2047 is through the following commands
2049 @cindex files, adding to agenda list
2050 @table @kbd
2051 @kindex C-c [
2052 @item C-c [
2053 Add current file to the list of agenda files.  The file is added to
2054 the front of the list.  If it was already in the list, it is moved to
2055 the front.  With prefix arg, file is added/moved to the end.
2056 @kindex C-c ]
2057 @item C-c ]
2058 Remove current file from the list of agenda files.
2059 @kindex C-,
2060 @item C-,
2061 Cycle through agenda file list.
2062 @end table
2063 @noindent
2064 The Org menu always contains the current list of files and can be used
2065 to quickly visit any of them.
2067 Org-mode provides three different views on the information in these
2068 files: 
2069 @itemize @bullet
2070 @item
2071 an @emph{agenda} that is like a calendar and shows information
2072 for specific dates
2073 @item
2074 a @emph{TODO list} that covers all unfinished
2075 action items, and
2076 @item
2077 a @emph{tags view} that show information based on
2078 the tags associated with headlines in the outline tree.
2079 @end itemize
2080 @noindent
2081 The extracted information is displayed in a special @emph{agenda
2082 buffer}.  This buffer is read-only, but provides commands to visit the
2083 corresponding locations in the original Org-mode files, and even to
2084 edit these files remotely.
2086 @cindex custom agenda commands
2087 @cindex agenda commands, custom
2088 The views are created through a dispatcher that should be bound to a
2089 global key, for example @kbd{C-c a} (@pxref{Installation and
2090 Activation}).  In the following we will assume that @kbd{C-c a} is
2091 indeed how the dispatcher is accessed and list keyboard access to
2092 commands accordingly.  The dispatcher offers a number of default
2093 commands, for example to create a TODO list or a the calendar-like
2094 agenda.  You can also define a number of custom searches for tags and
2095 specific TODO keywords through the variable
2096 @code{org-agenda-custom-commands}.
2097 @kindex C-c a C
2098 These commands will be offered by the dispatcher just like the default
2099 commands.  If you press @kbd{C-c a C}, you will get a customization
2100 buffer for this variable.
2102 @menu
2103 * Agenda::                      Your weekly planner
2104 * Global TODO list::            Overview over all things to do
2105 * Matching headline tags::      Select information based on tags
2106 * Timeline::                    Time-sorted view for single file
2107 * Agenda commands::             Remote editing of org trees
2108 * Calendar/Diary integration::  Integrating Anniversaries and more
2109 @end menu
2111 @node Agenda, Global TODO list, Agenda Views, Agenda Views
2112 @section Agenda
2113 @cindex agenda
2115 The purpose of the @emph{agenda} is to act like a week/day page of a
2116 paper agenda, showing you all the tasks for the current week or day.
2118 @table @kbd
2119 @cindex org-agenda, command
2120 @kindex C-c a a
2121 @item C-c a a
2122 Compile an agenda for the current week from a list of org files.  The
2123 agenda shows the entries for each day.  With a @kbd{C-u} prefix (or
2124 when the variable @code{org-agenda-include-all-todo} is @code{t}), all
2125 unfinished TODO items (also those without a date) are also listed at
2126 the beginning of the buffer, before the first date.@*
2127 The key binding @kbd{C-c a a} is only a suggestion - see
2128 @ref{Installation and Activation}.
2129 @end table
2131 Remote editing from the agenda buffer means for example that you can
2132 change the dates of deadlines and appointments from the agenda buffer.
2133 The commands available in the Agenda buffer are listed in @ref{Agenda
2134 commands}.
2137 @subsection Categories
2139 @cindex category
2140 In the agenda buffer, each entry is preceded by a @emph{category},
2141 which is derived from the file name.  The category can also be set
2142 with a special line anywhere in the buffer, looking like this:
2143 @example
2144 #+CATEGORY: Thesis
2145 @end example
2146 If there are several such lines in a file, each specifies the category
2147 for the text below it.  The display in the agenda buffer looks best if
2148 the category is not longer than 10 characters.
2150 @subsection Time-of-Day Specifications
2152 Org-mode checks each agenda item for a time-of-day specification.  The
2153 time can be part of the time stamp that triggered inclusion into the
2154 agenda, for example as in @w{@samp{<2005-05-10 Tue 19:00>}}.  Time
2155 ranges can be specified with two time stamps, like
2157 @w{@samp{<2005-05-10 Tue 20:30>--<2005-05-10 Tue 22:15>}}.
2159 In the headline of the entry itself, a time(range) may also appear as
2160 plain text (like @samp{12:45} or a @samp{8:30-1pm}.  If the agenda
2161 integrates the Emacs diary (@pxref{Calendar/Diary integration}), time
2162 specifications in diary entries are recognized as well.
2164 For agenda display, Org-mode extracts the time and displays it in a
2165 standard 24 hour format as part of the prefix.  The example times in
2166 the previous paragraphs would end up in the agenda like this:
2168 @example
2169     8:30-13:00 Arthur Dent lies in front of the bulldozer
2170    12:45...... Ford Prefect arrives and takes Arthur to the pub
2171    19:00...... The Vogon reads his poem
2172    20:30-22:15 Marwin escorts the Hitchhikers to the bridge
2173 @end example
2175 If the agenda is in single-day mode, or for the display of today, the
2176 timed entries are embedded in a time grid, like
2178 @example
2179     8:00...... ------------------
2180     8:30-13:00 Arthur Dent lies in front of the bulldozer
2181    10:00...... ------------------
2182    12:00...... ------------------
2183    12:45...... Ford Prefect arrives and takes Arthur to the pub
2184    14:00...... ------------------
2185    16:00...... ------------------
2186    18:00...... ------------------
2187    19:00...... The Vogon reads his poem
2188    20:00...... ------------------
2189    20:30-22:15 Marwin escorts the Hitchhikers to the bridge
2190 @end example
2192 The time grid can be turned on and off with the variable
2193 @code{org-agenda-use-time-grid}, and can be configured with
2194 @code{org-agenda-time-grid}.
2197 @subsection Sorting of agenda items
2198 @cindex sorting, of agenda items
2199 @cindex priorities, of agenda items
2200 The entries for each day are sorted.  The default order is to first
2201 collect all items containing an explicit time-of-day specification.
2202 These entries will be shown at the beginning of the list, as a
2203 @emph{schedule} for the day.  After that, items remain grouped in
2204 categories, in the sequence given by @code{org-agenda-files}.  Within
2205 each category, items are sorted by priority (@pxref{Priorities}).
2207 The priority is a numerical quantity composed of the base priority
2208 (2000 for priority @samp{A}, 1000 for @samp{B}, and 0 for @samp{C}),
2209 plus additional increments for overdue scheduled or deadline items.
2211 Sorting can be customized using the variable
2212 @code{org-agenda-sorting-strategy}.
2214 @node Global TODO list, Matching headline tags, Agenda, Agenda Views
2215 @section The global TODO list
2216 @cindex global TODO list
2217 @cindex TODO list, global
2219 The global TODO list contains all unfinished TODO items, formatted and
2220 collected into a single place.
2222 @table @kbd
2223 @kindex C-c a t
2224 @item C-c a t
2225 Show the global TODO list.  This collects the TODO items from all
2226 agenda files (@pxref{Agenda}) into a single buffer.  The buffer is in
2227 @code{agenda-mode}, so there are commands to examine and manipulate
2228 the TODO entries directly from that buffer (@pxref{Agenda commands}).
2229 @xref{Global TODO list}, for more information.
2230 @kindex C-c a T
2231 @item C-c a T
2232 Like the above, but allow to select a specific TODO keyword.  You can
2233 also do this by specifying a prefix argument.  With a @kbd{C-u} prefix
2234 you are prompted for a keyword.  With a numeric prefix, the Nth
2235 keyword in @code{org-todo-keywords} is selected.
2236 @kindex r
2237 The @kbd{r} key in the agenda buffer regenerates it, and you can give
2238 a prefix argument to this command to change the selected TODO keyword,
2239 for example @kbd{3 r}.
2240 @end table
2242 Remote editing of TODO items means that you can change the state of a
2243 TODO entry with a single key press.  The commands available in the
2244 TODO list are described in @ref{Agenda commands}.
2246 @node Matching headline tags, Timeline, Global TODO list, Agenda Views
2247 @section Matching headline tags
2248 @cindex matching, of tags
2249 @cindex tags view
2251 If headlines in the agenda files are marked with @emph{tags}
2252 (@pxref{Tags}), you can select headlines based on the tags that apply
2253 to them and collect them into an agenda buffer.
2255 @table @kbd
2256 @kindex C-c a m
2257 @item C-c a m
2258 Produce a list of all headlines that match a given set of tags.  The
2259 command prompts for a selection criterion, which is a boolean logic
2260 expression with tags, like @samp{+WORK+URGENT-WITHBOSS} or
2261 @samp{WORK|HOME} (@pxref{Tags}).
2262 @kindex C-c a M
2263 @item C-c a M
2264 Like @kbd{C-c a m}, but only select headlines that are also TODO
2265 items.
2266 @end table
2268 The commands available in the tags list are described in @ref{Agenda
2269 commands}.
2271 @node Timeline, Agenda commands, Matching headline tags, Agenda Views
2272 @section Timeline for a single file
2273 @cindex single file summary
2274 @cindex agenda, for single file
2275 @cindex timeline, single file
2276 @cindex time-sorted view
2278 The timeline is not really an agenda view, because it only summarizes
2279 items from a single Org-mode file.  But it also uses the agenda buffer
2280 and provides similar commands, so we discuss it here.  The timeline
2281 shows all time-stamped items in a single Org-mode file (or the
2282 selected part of it), in @emph{time-sorted view}.  The main purpose of
2283 this command is to give an overview over events in a project.
2285 @table @kbd
2286 @kindex C-c C-r
2287 @item C-c C-r
2288 Show a time-sorted view of the org file, with all time-stamped items.
2289 When called with a @kbd{C-u} prefix, all unfinished TODO entries
2290 (scheduled or not) are also listed under the current date.
2291 @end table
2292 @noindent
2294 The commands available in the timeline buffer are listed in
2295 @ref{Agenda commands}.
2297 @node Agenda commands, Calendar/Diary integration, Timeline, Agenda Views
2298 @section Commands in the agenda buffer
2299 @cindex commands, in agenda buffer
2301 Entries in the agenda buffer are linked back to the org file or diary
2302 file where they originate.  You are not allowed to edit the agenda
2303 buffer itself, but commands are provided to show and jump to the
2304 original entry location, and to edit the org-files ``remotely'' from
2305 the agenda buffer.  In this way, all information is stored only once,
2306 and you don't risk that your agenda and note files diverge.
2308 Some commands can be executed with mouse clicks on agenda lines.  For
2309 the other commands, the cursor needs to be in the desired line.  Most
2310 commands are available for both timelines and the agenda.  The
2311 exceptions are marked.
2313 @table @kbd
2314 @tsubheading{Motion}
2315 @kindex n
2316 @item n
2317 Next line (same as @key{up}).
2318 @kindex p
2319 @item p
2320 Previous line (same as @key{down}).
2321 @tsubheading{View/GoTo org file}
2322 @kindex mouse-3
2323 @kindex @key{SPC}
2324 @item mouse-3
2325 @itemx @key{SPC}
2326 Display the original location of the item in another window.
2328 @kindex L
2329 @item L
2330 Display original location and recenter that window.
2332 @kindex mouse-2
2333 @kindex @key{TAB}
2334 @item mouse-2
2335 @itemx @key{TAB}
2336 Go to the original location of the item in another window.
2338 @kindex @key{RET}
2339 @itemx @key{RET}
2340 Go to the original location of the item and delete other windows.
2342 @kindex f
2343 @item f
2344 Toggle Follow mode.  In Follow mode, as you move the cursor through
2345 the agenda buffer, the other window always shows the corresponding
2346 location in the org file.
2348 @kindex l
2349 @item l
2350 Toggle Logbook mode.  In Logbook mode, entries that where marked DONE while
2351 logging was on (variable @code{org-log-done}) are shown in the agenda.
2353 @tsubheading{Change display}
2354 @kindex o
2355 @item o
2356 Delete other windows.
2358 @kindex w
2359 @item w
2360 Switch to weekly view (7 days displayed together)
2362 @kindex d
2363 @item d
2364 Switch to daily view (just one day displayed)
2366 @kindex D
2367 @item D
2368 Toggle the inclusion of diary entries.  See @ref{Calendar/Diary integration}.
2370 @kindex g
2371 @item g
2372 Toggle the time grid on and off.  See also the variables
2373 @code{org-agenda-use-time-grid} and @code{org-agenda-time-grid}.
2375 @kindex r
2376 @item r
2377 Recreate the agenda buffer, for example to reflect the changes
2378 after modification of the time stamps of items with S-@key{left} and
2379 S-@key{right}.  When the buffer is the global todo list, a prefix
2380 argument is interpreted to create a selective list for a specific TODO
2381 keyword.
2383 @kindex @key{right}
2384 @item @key{right}
2385 Display the following @code{org-agenda-ndays} days.  For example, if
2386 the display covers a week, switch to the following week.  With prefix
2387 arg, go forward that many times @code{org-agenda-ndays} days.  Not
2388 available in timelines.
2390 @kindex @key{left}
2391 @item @key{left}
2392 Display the previous dates.  Not available in timelines.
2394 @kindex .
2395 @item .
2396 Goto today.
2398 @tsubheading{Remote editing}
2400 @item 0-9
2401 Digit argument.
2403 @kindex t
2404 @item t
2405 Change the TODO state of the item, both in the agenda and in the
2406 original org file.
2408 @kindex :
2409 @item :
2410 Set tags for the current headline.
2412 @kindex ,
2413 @item ,
2414 Set the priority for the current item.  Org-mode prompts for the
2415 priority character. If you reply with @key{SPC}, the priority cookie
2416 is removed from the entry.
2418 @kindex P
2419 @item p
2420 Display weighted priority of current item.
2422 @kindex +
2423 @kindex S-@key{up}
2424 @item +
2425 @itemx S-@key{up}
2426 Increase the priority of the current item.  The priority is changed in
2427 the original buffer, but the agenda is not resorted.  Use the @kbd{r}
2428 key for this.
2430 @kindex -
2431 @kindex S-@key{down}
2432 @item -
2433 @itemx S-@key{down}
2434 Decrease the priority of the current item.
2436 @kindex S-@key{right}
2437 @item S-@key{right}
2438 Change the time stamp associated with the current line by one day into
2439 the future.  With prefix argument, change it by that many days.  For
2440 example, @kbd{3 6 5 S-@key{right}} will change it by a year.  The
2441 stamp is changed in the original org file, but the change is not
2442 directly reflected in the agenda buffer.  Use the
2443 @kbd{r} key to update the buffer.
2445 @kindex S-@key{left}
2446 @item S-@key{left}
2447 Change the time stamp associated with the current line by one day
2448 into the past.
2450 @kindex >
2451 @item >
2452 Change the time stamp associated with the current line to today.
2453 The key @kbd{>} has been chosen, because it is the same as @kbd{S-.}
2454 on my keyboard.
2456 @cindex diary entries, creating from agenda
2457 @kindex i
2458 @item i
2459 Insert a new entry into the diary.  Prompts for the type of entry
2460 (day, weekly, monthly, yearly, anniversary, cyclic) and creates a new
2461 entry in the diary, just like @kbd{i d} etc. would do in the calendar.
2462 The date is taken from the cursor position.
2464 @tsubheading{Calendar commands}
2465 @kindex c
2466 @item c
2467 Open the Emacs calendar and move to the date at the agenda cursor.
2469 @item c
2470 When in the calendar, compute and show the Org-mode agenda for the
2471 date at the cursor.
2473 @kindex M
2474 @item M
2475 Show the phases of the moon for three month around current date.
2477 @kindex S
2478 @item S
2479 Show sunrise and sunset times.  The geographical location must be set
2480 with calendar variables, see documentation of the Emacs calendar.
2482 @kindex C
2483 @item C
2484 Convert the date at cursor into many other cultural and historic
2485 calendars.
2487 @kindex H
2488 @item H
2489 Show holidays for three month around the cursor date.
2491 @kindex C-c C-x C-c
2492 @item C-c C-x C-c
2493 Export a single iCalendar file containing entries from all agenda files.
2494 Not available in timelines.
2496 @tsubheading{Quit and Exit}
2497 @kindex q
2498 @item q
2499 Quit Agenda, remove the agenda buffer.
2501 @kindex x
2502 @cindex agenda files, removing buffers
2503 @item x
2504 Exit agenda, remove the agenda buffer and all buffers loaded by Emacs
2505 for the compilation of the agenda.  Buffers created by the user to
2506 visit org files will not be removed.
2508 @end table
2510 @node Calendar/Diary integration,  , Agenda commands, Agenda Views
2511 @section Calendar/Diary integration
2512 @cindex calendar integration
2513 @cindex diary integration
2515 Emacs contains the calendar and diary by Edward M. Reingold.  The
2516 calendar displays a three-month calendar with holidays from different
2517 countries and cultures.  The diary allows to keep track of
2518 anniversaries, lunar phases, sunrise/set, recurrent appointments
2519 (weekly, monthly) and more.  In this way, it is quite complementary to
2520 Org-mode.  It can be very useful to combine output from Org-mode with
2521 the diary.
2523 The interaction between Org-mode and diary works both ways: You can
2524 list entries from the diary in the Org-mode agenda, from which many
2525 calendar and diary commands are directly accessible.  Or you can
2526 display entries from the org agenda in the Emacs diary.
2528 @menu
2529 * Diary to agenda::             Agenda incorporates the diary
2530 * Agenda to diary::             Diary incorporates the agenda
2531 @end menu
2533 @node Diary to agenda, Agenda to diary, Calendar/Diary integration, Calendar/Diary integration
2534 @subsection Including the diary into the agenda
2535 @cindex diary to agenda
2537 In order to include entries from the Emacs diary into Org-mode's
2538 agenda, you only need to customize the variable
2540 @lisp
2541 (setq org-agenda-include-diary t)
2542 @end lisp
2543 @noindent
2545 @noindent After that, everything will happen automatically.  All diary
2546 entries including holidays, anniversaries etc will be included in the
2547 agenda buffer created by Org-mode.  @key{SPC}, @key{TAB}, and
2548 @key{RET} can be used from the agenda buffer to jump to the diary
2549 file, in order to edit existing diary entries.  The @kbd{i} command to
2550 insert new entries for the current date works in the agenda buffer, as
2551 well as the commands @kbd{S}, @kbd{M}, and @kbd{C} to display
2552 Sunrise/Sunset times, show lunar phases and to convert to other
2553 calendars, respectively.  @kbd{c} can be used to switch back and forth
2554 between calendar and agenda.
2556 @node Agenda to diary,  , Diary to agenda, Calendar/Diary integration
2557 @subsection Including the agenda into the diary
2558 @cindex agenda to diary
2560 If you prefer to use the Emacs diary as your main instrument and if
2561 you wish to include the Org-mode agenda into it, the following steps
2562 are necessary: Autoload the function @command{org-diary} as shown
2563 above under @ref{Installation and Activation}.  You also need to use
2564 @emph{fancy diary display} by setting in @file{.emacs}:
2566 @lisp
2567 (add-hook 'diary-display-hook 'fancy-diary-display)
2568 @end lisp
2570 Then include the following line into your @file{~/diary} file, in
2571 order to get the entries from all files listed in the variable
2572 @code{org-agenda-files}:
2574 @example
2575 &%%(org-diary)
2576 @end example
2577 @noindent
2578 You may also select specific files with
2580 @example
2581 &%%(org-diary) ~/path/to/some/org-file.org
2582 &%%(org-diary) ~/path/to/another/org-file.org
2583 @end example
2585 If you now launch the calendar and press @kbd{d} to display a diary,
2586 the headlines of entries containing a timestamp, date range, schedule,
2587 or deadline referring to the selected date will be listed.  Just like
2588 in Org-mode's agenda view, the diary for @emph{today} contains
2589 additional entries for overdue deadlines and scheduled items.  See
2590 also the documentation of the @command{org-diary} function.
2592 @node Exporting, Miscellaneous, Agenda Views, Top
2593 @chapter Exporting
2594 @cindex exporting
2596 For printing and sharing of notes, Org-mode documents can be exported
2597 as ASCII or HTML files.  To incorporate entries with associated times
2598 like deadlines or appointments into a desktop calendar program like
2599 iCal, Org-mode can also produce extracts in the iCalendar format.
2601 @menu
2602 * ASCII export::                Export as a structured ASCII file
2603 * HTML export::                 Export as an HTML file
2604 * iCalendar export::            Create calendar entries.
2605 @end menu
2607 @node ASCII export, HTML export, Exporting, Exporting
2608 @section ASCII export
2609 @cindex ASCII export
2611 @cindex region, active
2612 @cindex active region
2613 @cindex transient-mark-mode
2614 @table @kbd
2615 @kindex C-c C-x a
2616 @item C-c C-x a
2617 Export as ASCII file.  If there is an active region, only the region
2618 will be exported.  For an org file @file{myfile.org}, the ASCII file
2619 will be @file{myfile.txt}.  The file will be overwritten without
2620 warning.
2621 @end table
2623 @cindex headline levels, for exporting
2624 In the exported version, the first 3 outline levels will become
2625 headlines, defining a general document structure.  Additional levels
2626 will be exported as itemize lists.  If you want that transition to occur
2627 at a different level, specify it with a prefix argument.  For example,
2628 @example
2629 @kbd{C-1 C-c C-x a org-export-as-ascii}
2630 @end example
2631 @noindent
2632 creates only top level headlines and does the rest as items.  Lines
2633 starting with @samp{#} and subtrees starting with the word @samp{COMMENT}
2634 will not be exported.
2636 @node HTML export, iCalendar export, ASCII export, Exporting
2637 @section HTML export
2638 @cindex HTML export
2640 Org-mode contains an HTML exporter with extensive HTML formatting, in
2641 ways similar to John Grubers @emph{markdown} language, but with
2642 additional support for tables.
2644 @cindex region, active
2645 @cindex active region
2646 @cindex transient-mark-mode
2647 @table @kbd
2648 @kindex C-c C-x h
2649 @item C-c C-x h
2650 Export as HTML file @file{myfile.html}.
2651 @kindex C-c C-x b
2652 @item C-c C-x b
2653 Export as HTML file and open it with a browser.
2654 @kindex C-c C-x t
2655 @item C-c C-x t
2656 Insert template with export options, see below.
2657 @kindex C-c :
2658 @item C-c :
2659 Toggle fixed-width for entry (QUOTE) or region, see below.
2660 @end table
2662 @cindex headline levels, for exporting
2663 In the exported version, the first 3 outline levels will become
2664 headlines, defining a general document structure.  Additional levels
2665 will be exported as itemize lists.  If you want that transition to occur
2666 at a different level, specify it with a prefix argument.  For example,
2667 @example
2668 @kbd{C-2 C-c C-x b}
2669 @end example
2670 @noindent
2671 creates two levels of headings and does the rest as items.
2673 @menu
2674 * HTML formatting::             Interpretation of the buffer content
2675 * Export options::              How to influence exports
2676 * Comment lines::               Lines which will not be exported
2677 @end menu
2679 @node HTML formatting, Export options, HTML export, HTML export
2680 @subsection HTML formatting
2682 Not all text is transferred literally to the exported HTML file.  The
2683 exporter implements the following interpretation:
2685 @itemize @bullet
2687 @cindex hand-formatted lists
2688 @cindex lists, hand-formatted
2689 @item
2690 Hand-formatted lists with @samp{-}, @samp{*} or @samp{+} as
2691 bullet, or with @samp{1.} or @samp{2)} as enumerator will be recognized and
2692 transformed into HTML lists.  See @xref{Plain Lists}.
2694 @cindex underlined text
2695 @cindex bold text
2696 @cindex italic text
2697 @item
2698 You can make words @b{*bold*}, @i{/italic/}, and _underlined_
2700 @cindex @TeX{} interpretation
2701 @item
2702 Simple @TeX{}-like math constructs are interpreted:
2704 @cindex completion, of @TeX{} symbols
2705 @itemize @minus
2706 @item
2707 @samp{10^22} and @samp{J_n} are super- and subscripts.  You can quote
2708 @samp{^} and @samp{_} with a backslash: @samp{\_} and @samp{\^}
2709 @item
2710 @samp{\alpha} indicates a Greek letter, @samp{\to} an arrow.  You can
2711 use completion for these macros, just type @samp{\} and maybe a few
2712 letters, and press @kbd{M-@key{TAB}} to see possible completions.
2713 @end itemize
2715 @cindex tables, export to HTML
2716 @item
2717 Tables are transformed into HTML tables.  Data fields before the first
2718 horizontal separator line will be formatted as table header fields.
2720 @cindex fixed width
2721 @item
2722 If a headline starts with the word @samp{QUOTE}, the text below the
2723 headline will be typeset as fixed-width, to allow quoting of computer
2724 codes etc.  Lines starting with @samp{:} are also typeset in
2725 fixed-width font.
2727 @cindex HTML tags
2728 @item
2729 If you want to include HTML tags which should be interpreted as such,
2730 mark them with a @samp{@@} like in @samp{@@<b>bold text@@</b>}.
2731 Plain @samp{<} and @samp{>} are always transformed to @samp{&lt;} and
2732 @samp{&gt;} in HTML export.
2733 @end itemize
2735 If these conversions conflict with your habits of typing ASCII text,
2736 they can all be turned off with corresponding variables.
2738 @node Export options, Comment lines, HTML formatting, HTML export
2739 @subsection Export options
2740 @cindex options, for export
2742 @cindex completion, of option keywords
2743 The exporter recognizes special lines in the buffer which provide
2744 additional information.  These lines may be put anywhere in the file.
2745 The whole set of lines can be inserted into the buffer with @kbd{C-c
2746 C-x t}.  For individual lines, a good way to make sure the keyword is
2747 correct is to type @samp{#+} and then use @kbd{M-@key{TAB}} completion
2748 (@pxref{Completion}).
2750 @example
2751 #+TITLE:     the title to be shown (default is the buffer name)
2752 #+AUTHOR:    the author (default taken from @code{user-full-name})
2753 #+EMAIL:     his/her email address (default from @code{user-mail-address})
2754 #+LANGUAGE:  language for HTML, e.g. @samp{en} (@code{org-export-default-language})
2755 #+TEXT:      Some descriptive text to be inserted at the beginning.
2756 #+TEXT:      Several lines may be given.
2757 #+OPTIONS:   H:2  num:t  toc:t  \n:nil  @:t  ::t  |:t  ^:t  *:nil  TeX:t
2758 @end example
2759 @noindent
2760 The OPTIONS line is a compact form to specify export settings.  Here
2761 you can
2762 @cindex headline levels
2763 @cindex section-numbers
2764 @cindex table of contents
2765 @cindex linebreak preservation
2766 @cindex quoted html tags
2767 @cindex fixed-width sections
2768 @cindex tables
2769 @cindex @TeX{}-like syntax for sub- and superscripts
2770 @cindex emphasized text
2771 @cindex @TeX{} macros
2772 @example
2773 H:      @r{set the number of headline levels for export}
2774 num:    @r{turn on/off section-numbers}
2775 toc:    @r{turn on/off table of contents}
2776 \n:     @r{turn on/off linebreak-preservation}
2777 @@:      @r{turn on/off quoted html tags}
2778 ::      @r{turn on/off fixed-width sections}
2779 |:      @r{turn on/off tables}
2780 ^:      @r{turn on/off @TeX{}-like syntax for sub- and superscripts.}
2781 *:      @r{turn on/off emphasized text (bold, italic, underlined)}
2782 TeX:    @r{turn on/off @TeX{} macros}
2783 @end example
2785 You can also give style information for the exported file.  The
2786 default specification can be configured through the option
2787 @code{org-export-html-style}.  If you want to use a file-local style,
2788 you may use file variables, best wrapped into a COMMENT section at the
2789 end of the outline tree.  For example:
2791 @example
2792 * COMMENT HTML style specifications
2794 # Local Variables: 
2795 # org-export-html-style: "   <style type=\"text/css\">
2796        p @{font-weight: normal; color: gray; @}
2797        h1 @{color: black; @}
2798    </style>"
2799 # End: ***
2800 @end example
2802 Remember to execute @kbd{M-x normal-mode} after changing this to make
2803 the new style visible to Emacs.
2805 @node Comment lines,  , Export options, HTML export
2806 @subsection Comment lines
2807 @cindex comment lines
2808 @cindex exporting, not
2810 Lines starting with @samp{#} in column zero are treated as comments
2811 and will never be exported.  Also entire subtrees starting with the
2812 word @samp{COMMENT} will never be exported.  Finally, any text before
2813 the first headline will not be exported either.  This applies also for
2814 ASCII export.
2816 @table @kbd
2817 @kindex C-c ;
2818 @item C-c ;
2819 Toggle the COMMENT keyword at the beginning of an entry.
2820 @end table
2822 @node iCalendar export,  , HTML export, Exporting
2823 @section iCalendar export
2824 @cindex iCalendar export
2826 Some people like to use Org-mode for keeping track of projects, but
2827 still prefer a standard calendar application for anniversaries and
2828 appointments.  In this case it can be useful to have deadlines and
2829 other time-stamped items in Org-mode files show up in the calendar
2830 application.  Org-mode can export calendar information in the standard
2831 iCalendar format.
2833 @table @kbd
2834 @kindex C-c C-x i
2835 @item C-c C-x i
2836 Create iCalendar entries for the current file and store them in the same
2837 directory, using a file extension @file{.ics}.
2838 @kindex C-c C-x C-i
2839 @item C-c C-x C-i
2840 Like @kbd{C-c C-x i}, but do this for all files in
2841 @code{org-agenda-files}.  For each of these files, a separate iCalendar
2842 file will be written.
2843 @kindex C-c C-x c
2844 @item C-c C-x c
2845 Create a single large iCalendar file from all files in
2846 @code{org-agenda-files} and write it to the file given by
2847 @code{org-combined-agenda-icalendar-file}.
2848 @end table
2850 How this calendar is best read and updated, depends on the application
2851 you are using.  For example, when using iCal under Apple MacOS X, you
2852 could create a new calendar @samp{OrgMode} (the default name for the
2853 calendar created by @kbd{C-c C-x c}, see the variables
2854 @code{org-icalendar-combined-name} and
2855 @code{org-combined-agenda-icalendar-file}).  Then set Org-mode to
2856 overwrite the corresponding file
2857 @file{~/Library/Calendars/OrgMode.ics}.  You may even use AppleScript
2858 to make iCal re-read the calendar files each time a new version of
2859 @file{OrgMode.ics} is produced.  Here is the setup needed for this:
2861 @cindex applescript, for calendar update
2862 @lisp
2863 (setq org-combined-agenda-icalendar-file
2864     "~/Library/Calendars/OrgMode.ics")
2865 (add-hook 'org-after-save-iCalendar-file-hook
2866  (lambda ()
2867   (shell-command
2868    "osascript -e 'tell application \"iCal\" to reload calendars'")))
2869 @end lisp
2871 @node Miscellaneous, Index, Exporting, Top
2872 @chapter Miscellaneous
2874 @menu
2875 * Completion::                  M-TAB knows what you need
2876 * Customization::               Adapting Org-mode to your taste
2877 * FAQ::                         Frequently asked questions
2878 * Interaction::                 Other Emacs packages
2879 * TTY keys::                    Using Org-mode on a tty
2880 * Bugs::                        Things which do not work perfectly
2881 * Acknowledgments::             These people provided feedback and more
2882 @end menu
2884 @node Completion, Customization, Miscellaneous, Miscellaneous
2885 @section Completion
2886 @cindex completion, of @TeX{} symbols
2887 @cindex completion, of TODO keywords
2888 @cindex completion, of dictionary words
2889 @cindex completion, of option keywords
2890 @cindex completion, of CamelCase links
2891 @cindex completion, of tags
2892 @cindex @TeX{} symbol completion
2893 @cindex TODO keywords completion
2894 @cindex dictionary word completion
2895 @cindex option keyword completion
2896 @cindex CamelCase link completion
2897 @cindex tag completion
2899 Org-mode supports in-buffer completion.  This type of completion does
2900 not make use of the minibuffer.  You simply type a few letters into
2901 the buffer and use the key to complete text right there.
2903 @table @kbd
2904 @kindex M-@key{TAB}
2905 @item M-@key{TAB}
2906 Complete word at point
2907 @itemize @bullet
2908 @item
2909 At the beginning of a headline, complete TODO keywords.
2910 @item
2911 After @samp{\}, complete @TeX{} symbols supported by the exporter.
2912 @item
2913 After @samp{*}, complete CamelCase versions of all headlines in the
2914 buffer.
2915 @item
2916 After @samp{:}, complete tags used elsewhere in the buffer.
2917 @item
2918 After @samp{#+}, complete the special keywords like @samp{TYP_TODO} or
2919 @samp{OPTIONS} which set file-specific options for Org-mode.  When the
2920 option keyword is already complete, pressing @kbd{M-@key{TAB}} again
2921 will insert example settings for this keyword.
2922 @item
2923 Elsewhere, complete dictionary words using ispell.
2924 @end itemize
2925 @end table
2927 @node Customization, FAQ, Completion, Miscellaneous
2928 @section Customization
2929 @cindex customization
2930 @cindex options, for customization
2931 @cindex variables, for customization
2933 There are more than 100 variables that can be used to customize
2934 Org-mode.  For the sake of compactness of the manual, we are not
2935 describing the variables here.  A structured overview of customization
2936 variables is available with @kbd{M-x org-customize}.  Or select
2937 @code{Browse Org Group} from the @code{Org->Customization} menu.
2939 @node FAQ, Interaction, Customization, Miscellaneous
2940 @section Frequently asked questions
2941 @cindex FAQ
2943 @enumerate
2944 @item @b{Org-mode seems to be a useful default mode for the various
2945 @file{README} files I have scattered through my directories.  How do I
2946 turn it on for all @file{README} files?}
2947 @example
2948 (add-to-list 'auto-mode-alist '("README$" . org-mode))
2949 @end example
2951 @item @b{I would like to have two windows on the same Org-mode
2952 file, but with different outline visibility.  Is that possible?}@*
2953 @cindex @code{make-indirect-buffer}
2954 @cindex indirect buffers
2955 In GNU Emacs, you may use @emph{indirect buffers} which do exactly
2956 this.  See the documentation on the command
2957 @code{make-indirect-buffer}.  In XEmacs, this is currently not
2958 possible because of the different outline implementation.
2960 @item @b{Is there an easy way to insert links to web locations?}@*
2961 @cindex URL, paste into buffer
2962 Sure, just type or paste them into the buffer.  A plain-text URL-like
2963 string is directly interpreted as a link.
2965 @item @b{When I export my TODO list, every TODO item becomes a
2966 separate section.  How do I enforce these items to be exported as an
2967 itemized list?}@*
2968 If you plan to use ASCII or HTML export, make sure things you want to
2969 be exported as item lists are level 4 at least, even if that does mean
2970 there is a level jump.  For example
2972 @example
2973 * Todays top priorities
2974 **** TODO write a letter to xyz
2975 **** TODO Finish the paper
2976 **** Pick up kids at the school
2977 @end example
2979 Alternatively, if you need a specific value for the heading/item
2980 transition in a particular file, use the @samp{+OPTIONS} line to
2981 configure the @samp{H} switch.
2983 @example
2984 +OPTIONS:   H:2; ...
2985 @end example
2987 @item @b{I would like to export only a subtree of my file to HTML.  How?}@*
2988 @cindex exporting a subtree
2989 If you want to export a subtree, mark the subtree as region and then
2990 export.  Marking can be done with @kbd{C-c @@ C-x C-x}, for example.
2992 @item @b{Org-mode takes over the S-cursor keys.  I also want to use
2993 CUA-mode, is there a way to fix this conflict?}@*
2994 Yes, see @ref{Interaction}
2996 @item @b{Is there an easy way to insert an empty table template with a
2997 default number of rows and columns?}@*
2998 @cindex table, empty template
2999 To insert an empty table template, just type @samp{|-} and use
3000 @key{TAB}.  The default size can be changed with the variable
3001 @code{org-table-default-size}.  However, just starting to type the
3002 first line is usually much easier.
3004 @item @b{One of my table columns has started to fill up with
3005 @samp{#ERROR}.  What is going on?}@*
3006 Org-mode tried to compute the column from other fields using a
3007 formula stored in the @samp{#+TBLFMT:} line just below the table, and
3008 the evaluation of the formula fails.  Fix the fields used in the
3009 formula, or fix the formula, or remove it!
3011 @item @b{When I am in the last column of a table and just above a
3012 horizontal line in the table, pressing TAB creates a new table line
3013 @i{before} the horizontal line.  How can I quickly move to the line
3014 @i{below} the horizontal line instead?}@*
3015 Press @key{down} (to get on the separator line) and then @key{TAB}.
3016 Or configure the variable @code{org-table-tab-jumps-over-hlines}.
3018 @item @b{How can I change the indentation of an entire table without
3019 fixing every line by hand?}@*
3020 @cindex indentation, of tables
3021 The indentation of a table is set by the first line.  So just fix the
3022 indentation of the first line and realign with @key{TAB}.
3024 @end enumerate
3027 @node Interaction, TTY keys, FAQ, Miscellaneous
3028 @section Interaction with other packages
3029 @cindex packages, interaction with other
3030 Org-mode can cooperate with the following packages:
3032 @table @asis
3033 @cindex @file{table.el}
3034 @item @file{table.el} by Takaaki Ota
3035 Org mode cooperates with table.el, see @ref{table.el}.
3036 @cindex @file{calc.el}
3037 @item @file{calc.el} by Dave Gillespie
3038 Org-mode uses the calc package for implementing spreadsheet
3039 functionality in its tables (@pxref{Table calculations}).  Org-modes
3040 checks for the availability of calc by looking for the function
3041 @code{calc-eval} which should be autoloaded in your setup if calc has
3042 been installed properly.  As of Emacs 22, calc is part of the Emacs
3043 distribution.  Another possibility for interaction between the two
3044 packages is using calc for embedded calculations. @xref{Embedded Mode,
3045 , Embedded Mode, calc, GNU Emacs Calc Manual}.
3046 @cindex @file{constants.el}
3047 @item @file{constants.el} by Carsten Dominik
3048 In a table formula (@pxref{Table calculations}), it is possible to use
3049 names for natural constants or units.  Instead of defining you own
3050 constants in the variable @code{org-table-formula-constants}, install
3051 the @file{constants} package which defines a large number of constants
3052 and units, and lets you use unit prefixes like @samp{M} for
3053 @samp{Mega} etc.  You will need version 2.0 of this package, available
3054 at @url{http://www.astro.uva.nl/~dominik/Tools}. Org-mode checks for
3055 the function @code{constants-get}, which has to be autoloaded in your
3056 setup.  See the installation instructions in the file
3057 @file{constants.el}.
3058 @cindex @file{remember.el}
3059 @cindex @file{CUA.el}
3060 @item @file{CUA.el} by Kim. F. Storm
3061 Keybindings in Org-mode conflict with the @kbd{S-<cursor>} keys
3062 used by CUA-mode (as well as pc-select-mode and s-region-mode) to
3063 select and extend the region.  If you want to use one of these
3064 packages along with Org-mode, configure the variable
3065 @code{org-CUA-compatible}.  When set, Org-mode will move the following
3066 keybindings in org-mode files, and in the agenda buffer (but not
3067 during date selection).
3068 @example
3069 S-UP    -> M-p             S-DOWN  -> M-n
3070 S-LEFT  -> M--             S-RIGHT -> M-+
3071 S-RET   -> C-S-RET
3072 @end example
3073 Yes, these are unfortunately more difficult to remember.  If you want
3074 to have other replacement keys, look at the variable
3075 @code{org-disputed-keys}.
3076 @item @file{remember.el} by John Wiegley
3077 Org mode cooperates with remember, see @ref{Remember}.
3078 @cindex @file{planner.el}
3079 @item @file{planner.el} by John Wiegley
3080 Planner is another tool to plan work and keep track of tasks.  Planner
3081 uses a multi-file approach with project pages and day pages.  Is based
3082 on Emacs-Wiki.  If Planner is your primary tool, it can be useful to
3083 display the agenda entries resulting from org files in day-pages of
3084 the planner.  This can be done through the diary of the calendar:
3085 Integrate org files into the diary as described above, and then turn
3086 on the diary support of planner.
3087 @end table
3089 @node TTY keys, Bugs, Interaction, Miscellaneous
3090 @section Using org-mode on a tty
3091 @cindex tty keybindings
3093 Org-mode uses a number of keys that are not accessible on a tty.  This
3094 applies to most special keys like cursor keys, @key{TAB} and
3095 @key{RET}, when these are combined with modifier keys like @key{Meta}
3096 and/or @key{Shift}.  Org-mode uses these bindings because it needs to
3097 provide keys for a large number of commands, and because these keys
3098 appeared particularly easy to remember.  In order to still be able to
3099 access the core functionality of Org-mode on a tty, alternative
3100 bindings are provided.  Here is a complete list of these bindings,
3101 which are obviously more cumbersome to use.  Note that sometimes a
3102 work-around can be better.  For example changing a time stamp is
3103 really only fun with @kbd{S-@key{cursor}} keys.  On a tty you would
3104 rather use @kbd{C-c .}  to re-insert the timestamp.
3106 @page
3107 @multitable @columnfractions 0.15 0.2 0.2
3108 @item @b{Default} @tab @b{Alternative 1} @tab @b{Alternative 2}
3109 @item @kbd{S-@key{TAB}}     @tab @kbd{C-u @key{TAB}}       @tab
3110 @item @kbd{M-@key{left}}    @tab @kbd{C-c C-x l}           @tab @kbd{@key{Esc} @key{left}}
3111 @item @kbd{M-S-@key{left}}  @tab @kbd{C-c C-x L}           @tab
3112 @item @kbd{M-@key{right}}   @tab @kbd{C-c C-x r}           @tab @kbd{@key{Esc} @key{right}}
3113 @item @kbd{M-S-@key{right}} @tab @kbd{C-c C-x R}           @tab
3114 @item @kbd{M-@key{up}}      @tab @kbd{C-c C-x u}           @tab @kbd{@key{Esc} @key{up}}
3115 @item @kbd{M-S-@key{up}}    @tab @kbd{C-c C-x U}           @tab
3116 @item @kbd{M-@key{down}}    @tab @kbd{C-c C-x d}           @tab @kbd{@key{Esc} @key{down}}
3117 @item @kbd{M-S-@key{down}}  @tab @kbd{C-c C-x D}           @tab
3118 @item @kbd{S-@key{RET}}     @tab @kbd{C-c C-x c}           @tab
3119 @item @kbd{M-@key{RET}}     @tab @kbd{C-c C-x m}           @tab @kbd{@key{Esc} @key{RET}}
3120 @item @kbd{M-S-@key{RET}}   @tab @kbd{C-c C-x M}           @tab
3121 @item @kbd{S-@key{left}}    @tab @kbd{C-c C-x @key{left}}  @tab
3122 @item @kbd{S-@key{right}}   @tab @kbd{C-c C-x @key{right}} @tab
3123 @item @kbd{S-@key{up}}      @tab @kbd{C-c C-x @key{up}}    @tab
3124 @item @kbd{S-@key{down}}    @tab @kbd{C-c C-x @key{down}}  @tab
3125 @end multitable
3127 @node Bugs, Acknowledgments, TTY keys, Miscellaneous
3128 @section Bugs
3129 @cindex bugs
3131 Here is a list of things which should work differently, but which I
3132 have found too hard to fix.
3134 @itemize @bullet
3135 @c @item
3136 @c If you call @code{fill-paragraph} (bound to @kbd{M-q}) in a table, the
3137 @c filling is correctly disabled.  However, if some text directly
3138 @c (without an empty line in between) precedes or follows a table, calling
3139 @c @code{fill-paragraph} in that text will also fill the table like
3140 @c normal text.  Also, @code{fill-region} does bypass the
3141 @c @code{fill-paragraph} code and will fill tables like normal text.
3142 @item
3143 Text in an entry protected with the @samp{QUOTE} keyword should not
3144 autowrap.
3145 @item
3146 When the application called by @kbd{C-c C-o} to open a file link fails
3147 (for example because the application does not exits or refuses to open
3148 the file), it does so silently.  No error message is displayed.
3149 @item
3150 The remote-editing commands in the agenda buffer cannot be undone with
3151 @code{undo} called from within the agenda buffer.  But you can go to
3152 the corresponding buffer (using @key{TAB} or @key{RET} and execute
3153 @code{undo} there.
3154 @item
3155 Recalculating a table line applies the formulas from left to right.
3156 If a formula uses @emph{calculated} fields further down the row,
3157 multiple recalculation may be needed to get all fields consistent.
3158 @item
3159 Under XEmacs, if Org-mode entries are included into the diary, it is
3160 not possible to jump back from the diary to the org file.  Apparently,
3161 the text properties are lost when the fancy-diary-display is used.
3162 However, from Org-mode's timeline and agenda buffers (created with
3163 @kbd{C-c C-r} and @kbd{C-c a}), things do work correctly.
3164 @item
3165 Linux should also have a default viewer application, using mailcap.
3166 Maybe we can use GNUS or VM mime code?  Or dired's guessing commands?
3167 Any hints (or even patches) are appreciated.
3168 @item
3169 When you write @samp{x = a /b/ c}, b will be exported in italics.
3170 @item
3171 The exporters work well, but could be made more efficient.
3172 @end itemize
3174 @page
3176 @node Acknowledgments,  , Bugs, Miscellaneous
3177 @section Acknowledgments
3178 @cindex acknowledgments
3179 @cindex thanks
3181 Org-mode was written by Carsten Dominik, who still maintains it at the
3182 Org-mode homepage @uref{http://www.astro.uva.nl/~dominik/Tools/org/}.
3183 The following people (in alphabetic order) have helped the development
3184 along with ideas, suggestions and patches.  Many thanks to all of you,
3185 Org-mode would not be what it is without your input.
3187 @itemize @bullet
3188 @item
3189 Pavel Chalmoviansky reported bugs and suggested improvements
3190 related to the agenda treatment of items with specified time.
3191 @item
3192 Sacha Chua, the current maintainer of Planner, suggested to copy
3193 linking code from Planner (I took code for RMAIL and Wanderlust).
3194 @item
3195 Christian Egli converted the documentation into TeXInfo format and
3196 patched basic CSS formatting support into the HTML exporter.  He also
3197 inspired the agenda by showing me his plans for a multifile summary.
3198 @item
3199 Kai Grossjohann pointed out that a number of key bindings in Org-mode
3200 conflict with other packages.
3201 @item
3202 Stefan Monnier provided a patch with lots of little fixes to keep the
3203 Emacs-Lisp compiler happy.
3204 @item
3205 Tim O'Callaghan suggested in-file links, search options for
3206 general file links, and TAGS.
3207 @item
3208 Oliver Oppitz made useful suggestions.
3209 @item
3210 Pete Phillips helped the development of the TAGS feature with beta
3211 testing and suggestions.
3212 @item
3213 Matthias Rempe (Oelde) provided ideas, a patch introducing Windows
3214 NT/2000 support, and quality control.
3215 @item
3216 Kevin Rogers contributed code to access VM files on remote hosts.
3217 @item
3218 Philip Rooke created the Org-mode reference card.  He also helped with
3219 beta testing and contributed a number of very useful ideas.
3220 @item
3221 Christian Schlauer proposed angular brackets around links, among other
3222 things.
3223 @item
3224 Linking to VM/BBDB/GNUS was inspired by Tom Shannon's
3225 @file{organizer-mode.el}.
3226 @item
3227 Juergen Vollmer contributed code generating the table of contents
3228 in HTML output, and other export improvements.
3229 @item
3230 David Wainberg suggested to implement an archiving mechanism and helped
3231 testing.
3232 @item
3233 Scheduling TODO items was inspired by John Wiegley's @file{planner.el}.
3234 @item
3235 Carsten Wimmer suggested some changes and helped fix a bug in linking
3236 to GNUS.
3237 @item 
3238 Roland Winkler pointed out that additional keybindings are needed to
3239 use Org-mode on a tty.
3240 @c @item
3241 @c Nic Ferrier and Christian Egli implemented XML export.
3242 @end itemize
3244 @node Index, Key Index, Miscellaneous, Top
3245 @chapter Index
3247 @printindex cp
3249 @node Key Index,  , Index, Top
3250 @chapter Key Index
3252 @printindex ky
3254 @bye
3256 @ignore
3257    arch-tag: 7893d1fe-cc57-4d13-b5e5-f494a1bcc7ac
3258 @end ignore