4 @setfilename ../info/org
5 @settitle Org Mode Manual
12 * Org Mode: (org). outline-based notes management and organizer
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}
25 @c Subheadings inside a table. Need a difference between info and the rest.
26 @macro tsubheading{text}
36 This manual is for Org-mode (version @value{VERSION}).
38 Copyright @copyright{} 2004, 2005, 2006 Free Software Foundation
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
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.''
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.
63 @vskip 0pt plus 1filll
67 @c Output the table of contents at the beginning.
71 @node Top, Introduction, (dir), (dir)
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
91 --- The Detailed Node Listing ---
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.
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:: Tagging headlines and matching sets of tags
109 * Plain Lists:: Editing hand-formatted lists
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
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
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
150 * Time stamps:: Assigning a time to a tree entry
151 * Creating timestamps:: Commands which insert timestamps
155 * Agenda files:: Files being searched for agenda information
156 * Agenda dispatcher:: Keyboard access to agenda views
157 * Weekly/Daily Agenda:: The calendar page with current tasks
158 * Global TODO list:: All infinished action items
159 * Matching headline tags:: Structured information with fine-tuned search
160 * Timeline:: Time-sorted view for single file
161 * Agenda commands:: Remote editing of org trees
165 * Categories:: Not all tasks are equal
166 * Time-of-day specifications:: How the agenda knows the time
167 * Calendar/Diary integration:: Integrating Anniversaries and more
168 * Sorting of agenda items:: The order of things
172 * ASCII export:: Export as a structured ASCII file
173 * HTML export:: Export as an HTML file
174 * iCalendar export:: Create calendar entries.
178 * HTML formatting:: Interpretation of the buffer content
179 * Export options:: How to influence exports
180 * Comment lines:: Lines which will not be exported
184 * Completion:: M-TAB knows what you need
185 * Customization:: Adapting Org-mode to your taste
186 * FAQ:: Frequently asked questions
187 * Interaction:: Other Emacs packages
188 * TTY keys:: Using Org-mode on a tty
189 * Bugs:: Things which do not work perfectly
190 * Acknowledgments:: These people provided feedback and more
195 @node Introduction, Document Structure, Top, Top
196 @chapter Introduction
200 * Summary:: Brief summary of what Org-mode does
201 * Installation and Activation:: How to install Org-mode
202 * Feedback:: Bug reports, ideas, patches etc.
205 @node Summary, Installation and Activation, Introduction, Introduction
209 Org-mode is a mode for keeping notes, maintaining ToDo lists, and doing
210 project planning with a fast and effective plain-text system.
212 Org-mode develops organizational tasks around NOTES files that contain
213 information about projects as plain text. Org-mode is implemented on
214 top of outline-mode, which makes it possible to keep the content of
215 large files well structured. Visibility cycling and structure editing
216 help to work with the tree. Tables are easily created with a built-in
217 table editor. Org-mode supports ToDo items, deadlines, time stamps,
218 and scheduling. It dynamically compiles entries into an agenda that
219 utilizes and smoothly integrates much of the Emacs calendar and diary.
220 Plain text URL-like links connect to websites, emails, Usenet
221 messages, BBDB entries, and any files related to the projects. For
222 printing and sharing of notes, an Org-mode file can be exported as a
223 structured ASCII file, as HTML, or (todo and agenda items only) as an
226 Org-mode keeps simple things simple. When first fired up, it should
227 feel like a simple but easy to use outliner. Complexity is not
228 imposed, but a large amount of functionality is available when you
229 need it. Org-mode can be used on different levels and in different
233 @r{@bullet{} as an outline extension with visibility cycling and structure editing}
234 @r{@bullet{} as an ASCII system and table editor for taking structured notes}
235 @r{@bullet{} as an ASCII table editor with spreadsheet-like capabilities}
236 @r{@bullet{} as a simple hypertext system, with HTML export}
237 @r{@bullet{} as a TODO list editor}
238 @r{@bullet{} as a full agenda and planner with deadlines and work scheduling}
241 The Org-mode table editor can be integrated into any major mode by
242 activating the minor Orgtbl-mode.
244 There is a website for Org-mode which provides links to the newest
245 version of Org-mode, as well as additional information, screen shots
246 and example files. This page is located at
247 @uref{http://www.astro.uva.nl/~dominik/Tools/org/}.
251 @node Installation and Activation, Feedback, Summary, Introduction
252 @section Installation and Activation
255 @cindex global keybindings
256 @cindex keybindings, global
258 If Org-mode is part of the Emacs distribution or an XEmacs package,
259 you only need to copy the following lines to your @file{.emacs} file.
260 The last two lines define @emph{global} keys for the commands
261 @command{org-store-link} and @command{org-agenda} - please
262 choose suitable keys yourself.
265 ;; The following lines are always needed. Choose your own keys.
266 (add-to-list 'auto-mode-alist '("\\.org$" . org-mode))
267 (define-key global-map "\C-cl" 'org-store-link)
268 (define-key global-map "\C-ca" 'org-agenda)
271 If you have downloaded Org-mode from the Web, you must byte-compile
272 @file{org.el} and put it on your load path. In addition to the Emacs
273 Lisp lines above, you also need to add the following lines to
277 ;; These lines only if org-mode is not part of the X/Emacs distribution.
278 (autoload 'org-mode "org" "Org mode" t)
279 (autoload 'org-diary "org" "Diary entries from Org mode")
280 (autoload 'org-agenda "org" "Multi-file agenda from Org mode" t)
281 (autoload 'org-store-link "org" "Store a link to the current location" t)
282 (autoload 'orgtbl-mode "org" "Org tables as a minor mode" t)
283 (autoload 'turn-on-orgtbl "org" "Org tables as a minor mode")
286 @cindex org-mode, turning on
287 With this setup, all files with extension @samp{.org} will be put into
288 Org-mode. As an alternative, make the first line of a file look like
292 MY PROJECTS -*- mode: org; -*-
295 @noindent which will select Org-mode for this buffer no matter what
296 the file's name is. See also the variable
297 @code{org-insert-mode-line-in-empty-file'}.
299 @node Feedback, , Installation and Activation, Introduction
306 If you find problems with Org-mode, or if you have questions, remarks,
307 or ideas about it, please contact the maintainer Carsten Dominik at
308 @value{MAINTAINEREMAIL}.
310 For bug reports, please provide as much information as possible,
311 including the version information of Emacs (@kbd{C-h v emacs-version
312 @key{RET}}) and Org-mode (@kbd{M-x org-version}), as well as the
313 Org-mode related setup in @file{.emacs}. If an error occurs, a
314 traceback can be very useful. Often a small example file helps, along
315 with clear information about:
317 @item What exactly did you do?
318 @item What did you expect to happen?
319 @item What happened instead?
321 @noindent Thanks for helping to improve this mode.
323 @node Document Structure, Tables, Introduction, Top
324 @chapter Document Structure
325 @cindex document structure
326 @cindex structure of document
328 Org-mode is based on outline mode and provides flexible commands to
329 edit the structure of the document.
332 * Outlines:: Org-mode is based on outline-mode
333 * Headlines:: How to typeset org-tree headlines
334 * Visibility cycling:: Show and hide, much simplified
335 * Motion:: Jumping to other headlines
336 * Structure editing:: Changing sequence and level of headlines
337 * Archiving:: Move done task trees to a different place
338 * Sparse trees:: Matches embedded in context
339 * Tags:: Tagging headlines and matching sets of tags
340 * Plain Lists:: Editing hand-formatted lists
343 @node Outlines, Headlines, Document Structure, Document Structure
348 Org-mode is implemented on top of outline-mode. Outlines allow to
349 organize a document in a hierarchical structure, which (at least for
350 me) is the best representation of notes and thoughts. Overview over
351 this structure is achieved by folding (hiding) large parts of the
352 document to show only the general document structure and the parts
353 currently being worked on. Org-mode greatly simplifies the use of
354 outlines by compressing the entire show/hide functionality into a
355 single command @command{org-cycle}, which is bound to the @key{TAB}
358 @node Headlines, Visibility cycling, Outlines, Document Structure
363 Headlines define the structure of an outline tree. The Headlines in
364 Org-mode start with one or more stars, on the left margin. For
374 * Another top level headline
377 @node Visibility cycling, Motion, Headlines, Document Structure
378 @section Visibility cycling
379 @cindex cycling, visibility
380 @cindex visibility cycling
381 @cindex trees, visibility
382 @cindex show hidden text
385 Outlines make it possible to hide parts of the text in the buffer.
386 Org-mode uses a single command bound to the @key{TAB} key to change
387 the visibility in the buffer.
389 @cindex subtree visibility states
390 @cindex folded, subtree visibility state
391 @cindex children, subtree visibility state
392 @cindex subtree, subtree visibility state
396 Rotate current subtree between the states
398 ,-> FOLDED -> CHILDREN -> SUBTREE --.
399 '-----------------------------------'
401 At the beginning of the buffer (or when called with @kbd{C-u}), this does
402 the same as the command @kbd{S-@key{TAB}} below.
404 @cindex global visibility states
405 @cindex overview, global visibility state
406 @cindex contents, global visibility state
407 @cindex show all, global visibility state
410 Rotate the entire buffer between the states
412 ,-> OVERVIEW -> CONTENTS -> SHOW ALL --.
413 '--------------------------------------'
415 Note that inside tables, @kbd{S-@key{TAB}} jumps to the previous field.
417 @cindex show all, command
423 When Emacs first visits an Org-mode file, the global state is set to
424 OVERVIEW, i.e. only the top level headlines are visible. This can be
425 configured through the variable @code{org-startup-folded}, or on a
426 per-file basis by adding one of the following lines anywhere in the
435 @node Motion, Structure editing, Visibility cycling, Document Structure
437 @cindex motion, between headlines
438 @cindex jumping, to headlines
439 @cindex headline navigation
440 The following commands jump to other headlines in the buffer.
451 Next heading same level.
454 Previous heading same level.
457 Backward to higher level heading.
460 Jump to a different place without changing the current outline
461 visibility. Shows the document structure in a temporary buffer, where
462 you can use visibility cycling (@key{TAB}) to find your destination.
463 After pressing @key{RET}, the cursor moves to the selected location in
464 the original buffer, and the headings hierarchy above it is made
468 @node Structure editing, Archiving, Motion, Document Structure
469 @section Structure editing
470 @cindex structure editing
471 @cindex headline, promotion and demotion
472 @cindex promotion, of subtrees
473 @cindex demotion, of subtrees
474 @cindex subtree, cut and paste
475 @cindex pasting, of subtrees
476 @cindex cutting, of subtrees
477 @cindex copying, of subtrees
478 @cindex subtrees, cut and paste
483 Insert new heading with same level as current. If the cursor is in a
484 plain list item, a new item is created. To force creation of a new
485 headline, use a prefix arg, or first press @key{RET} to get to the
486 beginning of the next line.
487 @kindex M-S-@key{RET}
489 Insert new TODO entry with same level as current heading.
492 Promote current heading by one level
493 @kindex M-@key{right}
495 Demote current heading by one level
496 @kindex M-S-@key{left}
498 Promote the current subtree by one level
499 @kindex M-S-@key{right}
500 @item M-S-@key{right}
501 Demote the current subtree by one level
504 Move subtree up (swap with previous subtree of same
506 @kindex M-S-@key{down}
508 Move subtree down (swap with next subtree of same level)
511 Kill subtree, i.e. remove it from buffer but save in kill ring.
514 Copy subtree to kill ring.
517 Yank subtree from kill ring. This does modify the level of the subtree to
518 make sure the tree fits in nicely at the yank position. The yank
519 level can also be specified with a prefix arg, or by yanking after a
520 headline marker like @samp{****}.
523 @cindex region, active
524 @cindex active region
525 @cindex transient-mark-mode
526 When there is an active region (transient-mark-mode), promotion and
527 demotion work on all headlines in the region. To select a region of
528 headlines, it is best to place both point and mark at the beginning of a
529 line, mark at the beginning of the first headline, and point at the line
530 just after the last headline to change. Note that when the cursor is
531 inside a table (@pxref{Tables}), the Meta-Cursor keys have different
534 @node Archiving, Sparse trees, Structure editing, Document Structure
537 @cindex filing subtrees
539 When a project represented by a (sub)tree is finished, you may want
540 to move the tree to an archive place, either in the same file under a
541 special top-level heading, or even to a different file.
545 Archive the subtree starting at the cursor position to the location
546 given by @code{org-archive-location}.
549 @cindex archive locations
550 The default archive is a file in the same directory as the current
551 file, with the name derived by appending @file{_archive} to the
552 current file name. For information and examples on how to change
553 this, see the documentation string of the variable
554 @code{org-archive-location}. If you are also using the Org-mode
555 agenda, archiving to a different file is a good way to keep archived
556 trees from contributing agenda items.
558 @node Sparse trees, Tags, Archiving, Document Structure
559 @section Sparse trees
561 @cindex trees, sparse
562 @cindex folding, sparse trees
563 @cindex occur, command
565 An important feature of Org-mode is the ability to construct
566 @emph{sparse trees} for selected information in an outline tree. A
567 sparse tree means that the entire document is folded as much as
568 possible, but the selected information is made visible along with the
569 headline structure above it@footnote{See also the variables
570 @code{org-show-hierarchy-above} and
571 @code{org-show-following-heading}.}. Just try it out and you will see
572 immediately how it works.
574 Org-mode contains several commands creating such trees. The most
575 basic one is @command{org-occur}:
580 Occur. Prompts for a regexp and shows a sparse tree with all matches.
581 If the match is in a headline, the headline is made visible. If the
582 match is in the body of an entry, headline and body are made visible.
583 In order to provide minimal context, also the full hierarchy of
584 headlines above the match is shown, as well as the headline following
585 the match. Each match is also highlighted, the highlights disappear
586 when the buffer is changed with an editing command.
589 For frequently used sparse trees of specific search strings, you can
590 use the variable @code{org-agenda-custom-commands} to define fast
591 keyboard access to specific sparse trees. These commands will then be
592 accessible through the agenda dispatcher (@pxref{Agenda dispatcher}).
595 (setq org-agenda-custom-commands
596 '(("f" occur-tree "FIXME")))
598 @noindent will define the key @kbd{C-c a f} as a shortcut for creating
599 a sparse tree matching the string @samp{FIXME}.
601 Other commands are using sparse trees as well. For example @kbd{C-c
602 C-v} creates a sparse TODO tree (@pxref{TODO basics}).
605 @cindex printing sparse trees
606 @cindex visible text, printing
607 To print a sparse tree, you can use the Emacs command
608 @code{ps-print-buffer-with-faces} which does not print invisible parts
609 of the document @footnote{This does not work under XEmacs, because
610 XEmacs uses selective display for outlining, not text properties}.
611 Or you can use the command @kbd{C-c C-x v} to copy the visible part of
612 the document to another file (extension @file{.txt}) which then can be
613 printed in any desired way.
615 @node Tags, Plain Lists, Sparse trees, Document Structure
618 @cindex headline tagging
619 @cindex matching, tags
620 @cindex sparse tree, tag based
622 If you wish to implement a tag system to cross-correlate information,
623 this can be done as well in Org-mode. Every headline can contain a
624 list of tags, at the end of the headline. Tags are normal words
625 containing letters and @samp{_}, but no numbers. Tags must be
626 preceded and followed by a single colon; like @samp{:WORK:}. Several
627 tags can be specified like @samp{:WORK:URGENT:}.
629 @cindex inheritance, of tags
630 Tags make use of the hierarchical structure of outline trees. If a
631 heading has a certain tag, all subheadings will inherit the tag as
632 well. For example, in the list
635 * Meeting with the French group :WORK:
636 ** Summary by Frank :BOSS:NOTES:
637 *** TODO Prepare slides for him :ACTION:
640 the final heading will have the tags @samp{:WORK:}, @samp{:BOSS:},
641 @samp{:NOTES:}, and @samp{:ACTION:}. When executing tag searches and
642 Org-mode finds that a certain headline matches the search criterion,
643 it will not check any sublevel headline, assuming that these likely
644 also match, and that the list of matches can become very long. You
645 can influence inheritance and searching using the variables
646 @code{org-use-tag-inheritance} and
647 @code{org-tags-match-list-sublevels}.
650 Tags can simply be typed into the buffer. After a colon,
651 @kbd{M-@key{TAB}} offers completion on all tags being used in the
652 current buffer. There are also special commands for inserting tags,
653 and for executing searches based on tags.
658 @cindex completion, of tags
659 Enter new tags for the current headline. The minibuffer will prompt
660 for a list of tags and offer completion with respect to all other tags
661 used in the current buffer. Several tags, separated by colons, may be
662 specified at the prompt. After pressing @key{RET}, the tags will
663 be inserted and aligned to @code{org-tags-column}. When called with a
664 @kbd{C-u} prefix, align all tags in the current buffer to that column,
665 just to make things look nice. TAGS are automatically realigned after
666 promotion, demotion, and TODO state changes (@pxref{TODO basics}).
669 Create a sparse tree with all headlines matching a tags search.
672 Create a global list of tag matches from all agenda files.
673 @xref{Matching headline tags}.
676 Create a global list of tag matches from all agenda files, but check
677 only TODO items and force checking subitems (see variable
678 @code{org-tags-match-list-sublevels}).
681 A tags search string can use Boolean operators @samp{&} for AND and
682 @samp{|} for OR. @samp{&} binds more strongly than
683 @samp{|}. Parenthesis are currently no implemented. A tag may also be
684 preceded by @samp{-}, to select against it, and @samp{+} is syntactic
685 sugar for positive selection. The AND operator @samp{&} is optional
686 when @samp{+} or @samp{-} is present. For example, @samp{+WORK-BOSS}
687 would select all headlines that are tagged @samp{:WORK:}, but discard
688 those also tagged @samp{:BOSS:}. The search string @samp{WORK|LAPTOP}
689 selects all lines tagged @samp{:WORK:} or @samp{:LAPTOP:}. The string
690 @samp{WORK|LAPTOP&NIGHT} requires that the @samp{:LAPTOP:} lines are
691 also tagged @samp{NIGHT}.
693 @node Plain Lists, , Tags, Document Structure
697 @cindex lists, ordered
698 @cindex ordered lists
700 Headlines define the structure of the Org-mode file, and also lists
701 (for example TODO items (@pxref{TODO items}) should be created using
702 headline levels. However, when taking notes, the plain text is
703 sometimes easier to read with hand-formatted lists. Org-mode supports
704 editing such lists, and the HTML exporter (@pxref{Exporting}) does
705 parse and format them.
707 Org-mode knows ordered and unordered lists. Unordered list items
708 start with @samp{-}, @samp{+}, or @samp{*}@footnote{When using
709 @samp{*} as a bullet, lines must be indented or they will be seen as
710 top-level headlines.} as bullets. Ordered list items start with
711 @samp{1.} or @samp{1)}. Items belonging to the same list must have
712 the same indentation on the first line. In particular, if an ordered
713 list reaches number @samp{10.}, also the 2--digit numbers must be
714 written left-aligned with the other numbers in the list. Indentation
715 also determines the end of a list item. It ends before the next line
716 that is indented like the bullet/number, or less. For example:
720 My favorite scenes are (in this order)
721 1. Eowyns fight with the witch king
722 + this was already my favorite scene in the book
723 + I really like Miranda Otto.
724 2. The attack of the Rohirrim
725 3. Peter Jackson being shot by Legolas
727 He makes a really funny face when it happens.
730 Org-mode supports these lists by tuning filling and wrapping commands
731 to correctly deal with them. Furthermore, the following commands act
732 on items when the cursor is in the first line of an item (the line
733 with the bullet or number).
738 Items can be folded just like headline levels if you set the variable
739 @code{org-cycle-include-plain-lists}. The level of an item is then
740 given by the indentation of the bullet/number. However, items are
741 always subordinate to real headlines, the hierarchies remain
742 completely separated.
745 Insert new item at current level. With prefix arg, for a new heading.
747 @kindex M-S-@key{down}
749 @itemx M-S-@key{down}
750 Move the item including subitems up/down (swap with previous/next item
751 of same indentation). If the list is ordered, renumbering is
753 @kindex M-S-@key{left}
754 @kindex M-S-@key{right}
756 @itemx M-S-@key{right}
757 Decrease/increase the indentation of the item, including subitems.
758 Initially, the item tree is selected based on current indentation.
759 When these commands are executed several times in direct succession,
760 the initially selected region is used, even if the new indentation
761 would imply a different hierarchy. To use the new hierarchy, break
762 the command chain with a cursor motion or so.
765 Renumber the ordered list at the cursor.
768 @node Tables, Hyperlinks, Document Structure, Top
771 @cindex editing tables
773 Org-mode has a very fast and intuitive table editor built-in.
774 Spreadsheet-like calculations are supported in connection with the
775 Emacs @file{calc} package.
778 * Built-in table editor:: Simple tables
779 * Table calculations:: Compute a field from other fields
780 * orgtbl-mode:: The table editor as minor mode
781 * table.el:: Complex tables
784 @node Built-in table editor, Table calculations, Tables, Tables
785 @section The built-in table editor
786 @cindex table editor, builtin
788 Org-mode makes it easy to format tables in plain ASCII. Any line with
789 @samp{|} as the first non-white character is considered part of a
790 table. @samp{|} is also the column separator. A table might look
794 | Name | Phone | Age |
795 |-------+-------+-----|
796 | Peter | 1234 | 17 |
800 A table is re-aligned automatically each time you press @key{TAB} or
801 @key{RET} or @kbd{C-c C-c} inside the table. @key{TAB} also moves to
802 the next field (@key{RET} to the next row) and creates new table rows
803 at the end of the table or before horizontal lines. The indentation
804 of the table is set by the first line. Any line starting with
805 @samp{|-} is considered as a horizontal separator line and will be
806 expanded on the next re-align to span the whole table width. So, to
807 create the above table, you would only type
813 @noindent and then press @key{TAB} to align the table and start filling in
816 When typing text into a field, Org-mode treats @key{DEL},
817 @key{Backspace}, and all character keys in a special way, so that
818 inserting and deleting avoids shifting other fields. Also, when
819 typing @emph{immediately after the cursor was moved into a new field
820 with @kbd{@key{TAB}}, @kbd{S-@key{TAB}} or @kbd{@key{RET}}}, the
821 field is automatically made blank. If this behavior is too
822 unpredictable for you, configure the variables
823 @code{org-enable-table-editor} and @code{org-table-auto-blank-field}.
826 @tsubheading{Creation and conversion}
827 @item M-x org-table-create
828 Creates an empty Org-mode table. However, it is much easier to just
829 start typing, like @kbd{|Name|Phone|Age @key{RET} |- @key{TAB}}
833 Convert region to table. Works when the cursor is not in an existing
834 table, and when there is a region defined. If every line contains at
835 least one TAB character, the function assumes that the material is tab
836 separated. If not, lines are split at whitespace into fields. You
837 can use a prefix argument to indicate how many consecutive spaces are
838 at least required to indicate a field separator (default: just one).
840 @tsubheading{Re-aligning and field motion}
843 Re-align the table without moving the cursor.
847 Re-align the table, move to the next field. Creates a new row if
852 Re-align, move to previous field.
856 Re-align the table and move down to next row. Creates a new row if
857 necessary. At the beginning or end of a line, @key{RET} still does
858 NEWLINE, so it can be used to split a table.
860 @tsubheading{Column and row editing}
862 @kindex M-@key{right}
865 Move the current column left/right
867 @kindex M-S-@key{left}
869 Kill the current column.
871 @kindex M-S-@key{right}
872 @item M-S-@key{right}
873 Insert a new column to the left of the cursor position.
879 Move the current row up/down
883 Kill the current row or horizontal line.
885 @kindex M-S-@key{down}
887 Insert a new row above (with arg: below) the current row.
891 Insert a horizontal line below current row. With prefix arg, the line
892 is created above the current line.
896 Sort the table lines in the region. Point and mark must be in the first
897 and last line to be included, and must be in the column that should be
898 used for sorting. The command prompts for numerical versus
899 alphanumerical sorting.
901 @tsubheading{Regions}
904 Copy a rectangular region from a table to a special clipboard. Point
905 and mark determine edge fields of the rectangle. The process ignores
906 horizontal separator lines.
909 Copy a rectangular region from a table to a special clipboard, and
910 blank all fields in the rectangle. So this is the ``cut'' operation.
913 Paste a rectangular region into a table.
914 The upper right corner ends up in the current field. All involved fields
915 will be overwritten. If the rectangle does not fit into the present table,
916 the table is enlarged as needed. The process ignores horizontal separator
920 Wrap several fields in a column like a paragraph. If there is an active
921 region, and both point and mark are in the same column, the text in the
922 column is wrapped to minimum width for the given number of lines. A
923 prefix ARG may be used to change the number of desired lines. If there
924 is no region, the current field is split at the cursor position and the
925 text fragment to the right of the cursor is prepended to the field one
926 line down. If there is no region, but you specify a prefix ARG, the
927 current field gets blank, and the content is appended to the field
930 @tsubheading{Calculations}
931 @cindex formula, in tables
932 @cindex calculations, in tables
935 Install a new formula for the current column and replace current field
936 with the result of the formula.
940 Install a new formula for the current field, which must be a named
941 field. Evaluate the formula and replace the field content with the
946 Edit all formulas associated with the current table in a separate
951 Recalculate the current row by applying the stored formulas from left
952 to right. When called with a @kbd{C-u} prefix, recalculate the
953 entire table, starting with the first non-header line (i.e. below the
954 first horizontal separator line). For details, see @ref{Table calculations}.
958 Rotate the calculation mark in first column through the states
959 @samp{}, @samp{#}, @samp{*}, @samp{!}, @samp{$}. For the meaning of
960 these marks see @ref{Advanced features}. When there is an active
961 region, change all marks in the region.
965 Which table column is the cursor in? Displays number >0 in echo
968 @cindex region, active
969 @cindex active region
970 @cindex transient-mark-mode
973 Sum the numbers in the current column, or in the rectangle defined by
974 the active region. The result is shown in the echo area and can
975 be inserted with @kbd{C-y}.
979 When current field is empty, copy from first non-empty field above.
980 When not empty, copy current field down to next row and move cursor
981 along with it. Depending on the variable
982 @code{org-table-copy-increment}, integer field values will be
983 incremented during copy. This key is also used by CUA-mode
984 (@pxref{Interaction}).
986 @tsubheading{Miscellaneous}
989 Toggle the visibility of vertical lines in tables. The lines are
990 still there, only made invisible with a text property. Any @samp{|}
991 added by hand will become invisible on the next align.
993 @item M-x org-table-import
994 Import a file as a table. The table should be TAB- or whitespace
995 separated. Useful for example to import an Excel table or data from a
996 database, because these programs generally can write TAB-separated text
997 files. This command works by inserting the file into the buffer and
998 then converting the region to a table. Any prefix argument is passed on
999 to the converter, which uses it to determine the separator.
1001 @item M-x org-table-export
1002 Export the table as a TAB-separated file. Useful for data exchange with
1003 for example Excel or database programs.
1007 If you don't like the automatic table editor because it gets into your
1008 way in lines which you would like to start with @samp{|}, you can turn
1011 (setq org-enable-table-editor nil)
1013 @noindent The only table command which then still works is
1014 @kbd{C-c C-c} to do a manual re-align.
1016 @node Table calculations, orgtbl-mode, Built-in table editor, Tables
1017 @section Calculations in tables
1018 @cindex calculations, in tables
1019 @cindex spreadsheet capabilities
1020 @cindex @file{calc} package
1022 The table editor makes use of the Emacs @file{calc} package to
1023 implement spreadsheet-like capabilities. Org-mode has two levels of
1024 complexity for table calculations. On the basic level, tables do only
1025 horizontal computations, so a field can be computed from other fields
1026 @emph{in the same row}, and Org-mode assumes that there is only one
1027 formula for each column. This is very efficient to work with and
1028 enough for many tasks. On the complex level, columns and individual
1029 fields can be named for easier referencing in formulas, individual
1030 named fields can have their own formula associated with them, and
1031 recalculation can be automated.
1034 * Formula syntax:: How to write a formula
1035 * Column formulas:: Formulas valid for all fields in a column
1036 * Advanced features:: Field names, parameters and automatic recalc
1037 * Named-field formulas:: Formulas valid in single fields
1038 * Editing/debugging formulas:: Changing a stored formula
1039 * Appetizer:: Taste the power of calc
1042 @node Formula syntax, Column formulas, Table calculations, Table calculations
1043 @subsection Formula syntax
1044 @cindex formula syntax
1045 @cindex syntax, of formulas
1047 A formula can be any algebraic expression understood by the Emacs
1048 @file{calc} package. Before evaluation by @code{calc-eval}
1049 (@pxref{Calling Calc from Your Lisp Programs,calc-eval,Calling calc
1050 from Your Lisp Programs,calc,GNU Emacs Calc Manual}), variable
1051 substitution takes place:
1054 $ @r{refers to the current field}
1055 $3 @r{refers to the field in column 3 of the current row}
1056 $3..$7 @r{a vector of the fields in columns 3-7 of current row}
1057 $P1..$P3 @r{vector of column range, using column names}
1058 &2 @r{second data field above the current, in same column}
1059 &5-2 @r{vector from fifth to second field above current}
1060 &III-II @r{vector of fields between 2nd and 3rd hline above}
1061 &III @r{vector of fields between third hline above and current field}
1062 $name @r{a named field, parameter or constant}
1065 @cindex vectors, in table calculations
1066 The range vectors can be directly fed into the calc vector functions
1067 like @samp{vmean} and @samp{vsum}.
1069 @cindex name, of column or field
1070 @cindex constants, in calculations
1071 @samp{$name} is interpreted as the name of a column, parameter or
1072 constant. Constants are defined globally through the variable
1073 @code{org-table-formula-constants}. If you have the
1074 @file{constants.el} package, it will also be used to resolve
1075 constants, including natural constants like @samp{$h} for Planck's
1076 constant, units like @samp{$km} for kilometers. Column names and
1077 parameters can be specified in special table lines. These are
1078 described below, see @ref{Advanced features}.
1080 @cindex format specifier
1081 @cindex mode, for @file{calc}
1082 A formula can contain an optional mode string after a semicolon. This
1083 string consists of flags to influence calc's modes@footnote{By
1084 default, Org-mode uses the standard calc modes (precision 12, angular
1085 units degrees, fraction and symbolic modes off). However, the display
1086 format has been changed to @code{(float 5)} to keep tables compact.
1087 The default settings can be configured using the variable
1088 @code{org-calc-default-modes}.} during execution, e.g. @samp{p20} to
1089 switch the internal precision to 20 digits, @samp{n3}, @samp{s3},
1090 @samp{e2} or @samp{f4} to switch to normal, scientific, engineering,
1091 or fix display format, respectively, and @samp{D}, @samp{R}, @samp{F},
1092 and @samp{S} to turn on degrees, radians, fraction and symbolic modes,
1093 respectively. In addition, you may provide a @code{printf} format
1094 specifier to reformat the final result. A few examples:
1096 $1+$2 @r{Sum of first and second field}
1097 $1+$2;%.2f @r{Same, format result to two decimals}
1098 exp($2)+exp($1) @r{Math functions can be used}
1099 $;%.1f @r{Reformat current cell to 1 decimal}
1100 ($3-32)*5/9 @r{Degrees F -> C conversion}
1101 $c/$1/$cm @r{Hz -> cm conversion, using @file{constants.el}}
1102 tan($1);Dp3s1 @r{Compute in degrees, precision 3, display SCI 1}
1103 sin($1);Dp3%.1e @r{Same, but use printf specifier for display}
1104 vmean($2..$7) @r{Compute column range mean, using vector function}
1105 vsum(&III) @r{Sum numbers from 3rd hline above to here}
1106 taylor($3,x=7,2) @r{taylor series of $3, at x=7, second degree}
1109 @node Column formulas, Advanced features, Formula syntax, Table calculations
1110 @subsection Column formulas
1111 @cindex column formula
1112 @cindex formula, for table column
1114 To apply a formula to a field, type it directly into the field,
1115 preceded by an equal sign, like @samp{=$1+$2}. When you press
1116 @key{TAB} or @key{RET} or @kbd{C-c C-c} with the cursor still in the
1117 field, the formula will be stored as the formula for the current
1118 column, evaluated and the current field replaced with the result. If
1119 the field contains only @samp{=}, the previously stored formula for
1120 this column is used.
1122 For each column, Org-mode will remember the most recently used
1123 formula. The information is stored in a special line starting with
1124 @samp{#+TBLFM} directly below the table. When adding/deleting/moving
1125 columns with the appropriate commands, the stored equations will be
1126 modified accordingly. When a column used in a calculation is removed,
1127 references to this column become invalid and will cause an error upon
1128 applying the equation.
1130 Instead of typing an equation into the field, you may also use the
1131 command @kbd{C-c =}. It prompts for a formula (with default taken
1132 from the @samp{#+TBLFM:} line) and applies it to the current field. A
1133 numerical prefix (e.g. @kbd{C-5 C-c =}) will apply it to that many
1134 subsequent fields in the current column.
1136 @cindex recomputing table fields
1137 To recompute all the fields in a line, use the command @kbd{C-c *}.
1138 It re-applies all stored equations to the current row, from left to
1139 right. With a @kbd{C-u} prefix, this will be done to every line in
1140 the table, so use this command it you want to make sure the entire
1141 table is up-to-date. @kbd{C-u C-c C-c} is another way to update the
1142 entire table. Global updating does not touch the line(s) above the
1143 first horizontal separator line, assuming that this is the table
1146 @node Advanced features, Named-field formulas, Column formulas, Table calculations
1147 @subsection Advanced features
1149 If you want want the recalculation of fields to happen automatically,
1150 or if you want to be able to assign a formula to an individual field
1151 (instead of an entire column) you need to reserve the first column of
1152 the table for special marking characters. Here is an example of a
1153 table that collects exam results of students and makes use of these
1157 |---+---------+--------+--------+--------+-------+------|
1158 | | Student | Prob 1 | Prob 2 | Prob 3 | Total | Note |
1159 |---+---------+--------+--------+--------+-------+------|
1160 | ! | | P1 | P2 | P3 | Tot | |
1161 | # | Maximum | 10 | 15 | 25 | 50 | 10.0 |
1162 | ^ | | m1 | m2 | m3 | mt | |
1163 |---+---------+--------+--------+--------+-------+------|
1164 | # | Peter | 10 | 8 | 23 | 41 | 8.2 |
1165 | # | Sara | 6 | 14 | 19 | 39 | 7.8 |
1166 | # | Sam | 2 | 4 | 3 | 9 | 1.8 |
1167 |---+---------+--------+--------+--------+-------+------|
1168 | | Average | | | | 29.7 | |
1169 | ^ | | | | | at | |
1170 | $ | max=50 | | | | | |
1171 |---+---------+--------+--------+--------+-------+------|
1172 #+TBLFM: $6=vsum($P1..$P3)::$7=10*$Tot/$max;%.1f::$at=vmean(&II);%.1f
1176 @noindent @b{Important}: Please note that for these special tables,
1177 recalculating the table with @kbd{C-u C-c *} does only affect rows
1178 which are marked @samp{#} or @samp{*}, and named fields. The column
1179 formulas are not applied in rows with empty first field.
1181 @cindex marking characters, tables
1182 The marking characters have the following meaning:
1185 The fields in this line define names for the columns, so that you may
1186 refer to a column as @samp{$Tot} instead of @samp{$6}.
1188 This row defines names for the fields @emph{above} the row. With such
1189 a definition, any formula in the table may use @samp{$m1} to refer to
1190 the value @samp{10}. Also, named fields can have their own formula
1191 associated with them.
1193 Similar to @samp{^}, but defines names for the fields in the row
1196 Fields in this row can define @emph{parameters} for formulas. For
1197 example, if a field in a @samp{$} row contains @samp{max=50}, then
1198 formulas in this table can refer to the value 50 using @samp{$max}.
1199 Parameters work exactly like constants, only that they can be defined on
1200 a per-table basis. Changing a parameter and then recalculating the
1201 table can be useful.
1203 Fields in this row are automatically recalculated when pressing
1204 @key{TAB} or @key{RET} or @kbd{S-@key{TAB}} in this row. Also, this row
1205 is selected for a global recalculation with @kbd{C-u C-c *}. Unmarked
1206 lines will be left alone by this command.
1208 Selects this line for global recalculation with @kbd{C-u C-c *}, but
1209 not for automatic recalculation. Use this when automatic
1210 recalculation slows down editing too much.
1212 Unmarked lines are exempted from recalculation with @kbd{C-u C-c *}.
1213 All lines that should be recalculated should be marked with @samp{#}
1217 @node Named-field formulas, Editing/debugging formulas, Advanced features, Table calculations
1218 @subsection Named-field formulas
1219 @cindex named field formula
1220 @cindex formula, for named table field
1222 A named field can have its own formula associated with it. In the
1223 example above, this is used for the @samp{at} field that contains
1224 the average result of the students. To enter a formula for a named
1225 field, just type it onto the buffer, preceded by @samp{:=}. Or use
1226 @kbd{C-u C-c =}. This equation will be stored below the table like
1227 @samp{$name=...}. Any recalculation in the table (even if only
1228 requested for the current line) will also update all named field
1231 @node Editing/debugging formulas, Appetizer, Named-field formulas, Table calculations
1232 @subsection Editing and debugging formulas
1233 @cindex formula editing
1234 @cindex editing, of table formulas
1236 To edit a column or field formula, you can use the commands @kbd{C-c
1237 =} and @kbd{C-u C-c =}, respectively. The currently active expression
1238 is then presented as default in the minibuffer, were it may be edited.
1240 Note that making a table field blank does not remove the formula
1241 associated with the field - during the next recalculation the field
1242 will be filled again. To remove a formula from a field, you have to
1243 give an empty reply when prompted for the formula, or to edit the
1244 @samp{#+TBLFM} line.
1247 You may edit the @samp{#+TBLFM} directly and re-apply
1248 the changed equations with @kbd{C-c C-c} in that line, or with the
1249 normal recalculation commands in the table.
1255 In particular for large tables with many formulas, it is convenient to
1256 use the command @kbd{C-c '} to edit the formulas of the current table
1257 in a separate buffer. That buffer will show the formulas one per
1258 line, and you are free to edit, add and remove formulas. Press
1259 @kbd{C-c ?} on a @samp{$...} expression to get information about its
1260 interpretation. Exiting the buffer with @kbd{C-c C-c} only stores the
1261 modified formulas below the table. Exiting with @kbd{C-u C-c C-c}
1262 also applies them to the entire table. @kbd{C-c C-q} exits without
1263 installing the changes.
1265 When the evaluation of a formula leads to an error, the field content
1266 becomes the string @samp{#ERROR}. If you would like see what is going
1267 on during variable substitution and calculation in order to find a
1268 bug, turn on formula debugging in the menu and repeat the calculation
1269 by pressing, for example by pressing @kbd{C-c = @key{RET}} in a field.
1270 Detailed information will be displayed.
1272 @node Appetizer, , Editing/debugging formulas, Table calculations
1273 @subsection Appetizer
1275 Finally, just to wet your appetite on what can be done with the fantastic
1276 @file{calc} package, here is a table that computes the Taylor series
1277 for a couple of functions (homework: try that with Excel :-)
1281 |---+-------------+---+-----+--------------------------------------|
1282 | | Func | n | x | Result |
1283 |---+-------------+---+-----+--------------------------------------|
1284 | # | exp(x) | 1 | x | 1 + x |
1285 | # | exp(x) | 2 | x | 1 + x + x^2 / 2 |
1286 | # | exp(x) | 3 | x | 1 + x + x^2 / 2 + x^3 / 6 |
1287 | # | x^2+sqrt(x) | 2 | x=0 | x*(0.5 / 0) + x^2 (2 - 0.25 / 0) / 2 |
1288 | # | x^2+sqrt(x) | 2 | x=1 | 2 + 2.5 x - 2.5 + 0.875 (x - 1)^2 |
1289 | * | tan(x) | 3 | x | 0.0175 x + 1.77e-6 x^3 |
1290 |---+-------------+---+-----+--------------------------------------|
1291 #+TBLFM: $5=taylor($2,$4,$3);n3
1295 @node orgtbl-mode, table.el, Table calculations, Tables
1296 @section The Orgtbl minor mode
1298 @cindex minor mode for tables
1300 If you like the intuitive way the Org-mode table editor works, you
1301 might want to use it also in other modes like text-mode or mail-mode.
1302 The minor mode Orgtbl-mode makes this possible. You can always toggle
1303 the mode with @kbd{M-x orgtbl-mode}. To turn it on by default, for
1304 example in mail mode, use
1306 (add-hook 'mail-mode-hook 'turn-on-orgtbl)
1309 @node table.el, , orgtbl-mode, Tables
1310 @section The @file{table.el} package
1312 @cindex table editor, @file{table.el}
1313 @cindex @file{table.el}
1315 Complex ASCII tables with automatic line wrapping, column- and
1316 row-spanning, and alignment can be created using the Emacs table
1317 package by Takaaki Ota (@uref{http://sourceforge.net/projects/table}).
1318 When @key{TAB} or @kbd{C-c C-c} is pressed in such a table, Org-mode
1319 will call @command{table-recognize-table} and move the cursor into the
1320 table. Inside a table, the keymap of Org-mode is inactive. In order
1321 to execute Org-mode-related commands, leave the table.
1326 Recognize @file{table.el} table. Works when the cursor is in a
1331 Insert a table.el table. If there is already a table at point, this
1332 command converts it between the table.el format and the Org-mode
1333 format. See the documentation string of the command
1334 @code{org-convert-table} for the restrictions under which this is
1338 @node Hyperlinks, TODO items, Tables, Top
1342 Just like HMTL, Org-mode provides links inside a file, and external
1343 links to other files, Usenet articles, emails and much more.
1346 * Internal Links:: CamelCaseWords as internal links
1347 * External Links:: URL-like links to the world
1348 * Managing links:: Creating, inserting and following
1349 * Search Options:: Linking to a specific location
1350 * Remember:: Org-trees store quick notes
1353 @node Internal Links, External Links, Hyperlinks, Hyperlinks
1354 @section Internal Links
1355 @cindex internal links
1356 @cindex links, internal
1357 @cindex CamelCase links
1359 Similar to Wiki implementations, Org-mode interprets words spelled in
1360 CamelCase (i.e. mixed case with at least one capital letter following
1361 on a small letter inside the word) as links. While in Wiki these
1362 links usually point to another file, in Org-mode they point to a
1363 target in the current file. Targets are CamelCased words in double
1364 angular brackets, and may be located anywhere, also in a comment line.
1370 Each occurrence of @samp{MyTarget} in the file is an active link that
1371 can be followed with @kbd{C-c C-o} or with a mouse click
1372 (@pxref{Managing links}). If no dedicated target exists, org-mode will
1373 search for the words in the link separated by white space, in the
1374 above example for @samp{my target}. If the link starts with a star
1375 like @samp{*MyTarget}, the search is restricted to headlines.
1376 Org-mode will first try an exact match of a full headline, but then
1377 move on to more and more lenient searches. The link @samp{*MyTargets}
1378 will find any of the following
1381 ** TODO my targets are bright
1382 ** my 20 targets are
1384 @cindex completion, of CamelCase links
1385 @cindex CamelCase links, completion of
1386 It is therefore often not even necessary to set a dedicated target.
1387 The link will automatically find a target. If you want to see what
1388 lines in the current buffer are matched by a given CamelCase link,
1389 open the link with @kbd{C-u C-c C-o}. Even if there are several
1390 matches, org-mode will usually find the right one since it tries
1391 targets and exact matches first. To insert links targeting a
1392 headline, in-buffer completion can be used. Just type a star followed
1393 by a few optional letters into the buffer and press @kbd{M-@key{TAB}}.
1394 CamelCased versions of all headlines in the current buffer will be
1395 offered as completions. @xref{Managing links}, for more commands
1398 @node External Links, Managing links, Internal Links, Hyperlinks
1399 @section External Links
1400 @cindex links, external
1401 @cindex external links
1402 @cindex links, external
1409 @cindex WANDERLUST links
1410 @cindex USENET links
1413 Org-mode supports links to files, websites, Usenet and email messages;
1414 and BBDB database entries. Links are just plain-text URL-like
1415 locators, optionally enclosed by angular brackets. The following list
1416 shows examples for each link type.
1419 <http://www.astro.uva.nl/~dominik> @r{on the web}
1420 <file:/home/dominik/images/jupiter.jpg> @r{file, absolute path}
1421 <file:papers/last.pdf> @r{file, relative path}
1422 <news:comp.emacs> @r{Usenet link}
1423 <mailto:adent@@galaxy.net> @r{Mail link}
1424 <vm:folder> @r{VM folder link}
1425 <vm:folder#id> @r{VM message link}
1426 <vm://myself@@some.where.org/folder#id> @r{VM on remote machine}
1427 <wl:folder> @r{WANDERLUST folder link}
1428 <wl:folder#id> @r{WANDERLUST message link}
1429 <rmail:folder> @r{RMAIL folder link}
1430 <rmail:folder#id> @r{RMAIL message link}
1431 <gnus:group> @r{GNUS group link}
1432 <gnus:group#id> @r{GNUS article link}
1433 <bbdb:Richard Stallman> @r{BBDB link}
1434 <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}
1437 A link may contain space characters and is terminated by @samp{>} or by
1438 the end of a line. In tables, the end of a table field also terminates
1439 a link. Angle brackets around a link are not required, but are
1440 recommended to avoid problems with punctuation and other text following
1441 the link. See also the variable @code{org-allow-space-in-links}.
1444 @node Managing links, Search Options, External Links, Hyperlinks
1445 @section Managing links
1447 Org-mode provides methods to create a link in the correct syntax, to
1448 insert it into an org-mode file, and to follow the link.
1452 @cindex storing links
1454 Store a link to the current location. This is a @emph{global} command
1455 which can be used in any buffer to create a link. The link will be
1456 stored for later insertion into an Org-mode buffer (see below). For
1457 VM, RMAIL, WANDERLUST, GNUS and BBDB buffers, the link will point to
1458 the current article/entry. For W3 and W3M buffer, the link goes to
1459 the current URL. For Org-mode files, the current headline is
1460 targeted. For any other files, the link will point to the file, with
1461 a CamelCase (@pxref{Search Options}) search string pointing to the
1462 contents of the current line. If there is an active region, the
1463 selected words will form the basis of the search string. The key
1464 binding @kbd{C-c l} is only a suggestion - see @ref{Installation and
1468 @cindex link completion
1469 @cindex file name completion
1470 @cindex completion, of links
1471 @cindex completion, of file names
1472 @cindex inserting links
1474 Insert a link. This prompts for a link to be inserted into the
1475 buffer. You can just type a link, using one of the link type prefixes
1476 mentioned in the examples above. Through completion, all links stored
1477 during the current session can be accessed. When called with prefix
1478 arg, you can use file name completion to enter a file link. The link
1479 will be formatted as given in the variable @code{org-link-format} and
1480 inserted into the buffer. Note that you don't have to use this
1481 command to insert a link. Links in Org-mode are plain text, and you
1482 can type or paste them straight into the buffer.
1484 @cindex following links
1489 Open link at point. This will launch a web browser for URLs (using
1490 @command{browse-url-at-point}), run vm/gnus/bbdb for the corresponding
1491 links, and execute the command in a shell link. When the cursor is on
1492 a CamelCase link, this commands runs the corresponding search. When
1493 the cursor is on a TAGS list in a headline, it creates the
1494 corresponding TAGS view. Furthermore, it will visit text files in
1495 @samp{file:} links with Emacs and select a suitable application for
1496 non-text files. Classification of files is based on file extension
1497 only. See option @code{org-file-apps}. If there is no link at point,
1498 the current subtree will be searched for one. If you want to override
1499 the default application and visit the file with Emacs, use a @kbd{C-u}
1500 prefix. If the cursor is on a time stamp, compiles the agenda for
1503 @strong{IMPORTANT}: Be careful not to use any dangerous commands in a
1508 On links, @kbd{mouse-2} will open the link just like @kbd{C-c C-o} would.
1512 Like @kbd{mouse-2}, but force file links to be opened with Emacs.
1516 @node Search Options, Remember, Managing links, Hyperlinks
1517 @section Search options in file links
1518 @cindex search option in file links
1519 @cindex file links, searching
1521 File links can contain additional information to make Emacs jump to a
1522 particular location in the file when following a link. This can be a
1523 line number or a search option after a double@footnote{For backward
1524 compatibility, line numbers can also follow a single colon.} colon.
1527 <file:~/code/main.c::255>
1528 <file:~/xx.org::MyTarget>
1529 <file:~/xx.org::find me>
1530 <file:~/xx.org::/regexp/>
1532 @noindent Here is what these options do.
1538 Search for a link target with name MyGoal, or do a text search for
1539 @samp{my target}, similar to the CamelCase search in internal links,
1540 see @ref{Internal Links}.
1542 Do a normal text search for the text @samp{find me}.
1544 Do a regular expression search for @code{regexp}. This uses the Emacs
1545 command @code{occur} to list all matches in a separate window. If the
1546 target file is in Org-mode, @code{org-occur} is used to create a
1547 sparse tree with the matches.
1548 @c If the target file is a directory,
1549 @c @code{grep} will be used to search all files in the directory.
1552 To use the search options also for a search in the current file, a
1553 file link with an empty file name can be used. For example,
1554 @code{<file:::find me>} does a search for @samp{find me} in the
1557 @node Remember, , Search Options, Hyperlinks
1559 @cindex @file{remember.el}
1561 Another way to create org entries with links to other files is through
1562 the @emph{Remember} package by John Wiegley. @emph{Remember} lets you
1563 store quick notes with little interruption of your work flow. See
1564 @uref{http://www.emacswiki.org/cgi-bin/wiki/RememberMode} for more
1565 information. The notes produced by @emph{Remember} can be stored in
1566 different ways, and Org-mode files are a good target. Org-mode allows
1567 to file away notes either to a default file, or directly to the
1568 correct location in your Org-mode outline tree. The following
1569 customization@footnote{The two autoload forms are only necessary if
1570 @file{org.el} is not part of the Emacs distribution or an XEmacs
1571 package.} will tell @emph{Remember} to use org files as target, and to
1572 create annotations compatible with Org-mode links.
1575 (autoload 'org-remember-annotation "org")
1576 (autoload 'org-remember-handler "org")
1577 (setq org-directory "~/path/to/my/orgfiles/")
1578 (setq org-default-notes-file "~/.notes")
1579 (setq remember-annotation-functions '(org-remember-annotation))
1580 (setq remember-handler-functions '(org-remember-handler))
1583 When you compose a note with remember, you have to press @kbd{C-c C-c}
1584 to exit remember-mode and to file away the note. The handler first
1585 prompts for a target file - if you press @key{RET}, the value of
1586 @code{org-default-notes-file} is used. Then the command offers the
1587 headings tree of the selected file. You can either immediately press
1588 @key{RET} to get the note appended to the file. Or you can use
1589 vertical cursor motion (@key{up} and @key{down}) and visibility
1590 cycling (@key{TAB}) to find a better place. Pressing @key{RET} or
1591 @key{left} or @key{right} leads to the following result.
1593 @multitable @columnfractions 0.2 0.1 0.7
1594 @item @b{Cursor position} @tab @b{Key} @tab @b{Note gets inserted}
1595 @item buffer-start @tab @key{RET} @tab as level 2 heading at end of file
1596 @item on headline @tab @key{RET} @tab as sublevel of the heading at cursor
1597 @item @tab @key{left} @tab as same level, before current heading
1598 @item @tab @key{right} @tab as same level, after current heading
1599 @item not on headline @tab @key{RET}
1600 @tab at cursor position, level taken from context.
1601 Or use prefix arg to specify level manually.
1604 So a fast way to store the note is to press @kbd{C-c C-c @key{RET}
1605 @key{RET}} to append it to the default file. Even shorter would be
1606 @kbd{C-u C-c C-c}, which does the same without even showing the tree.
1607 But with little extra effort, you can push it directly to the correct
1610 Before inserting the text into a tree, the function ensures that the
1611 text has a headline, i.e. a first line that starts with a @samp{*}.
1612 If not, a headline is constructed from the current date and some
1613 additional data. If the variable @code{org-adapt-indentation} is
1614 non-nil, the entire text is also indented so that it starts in the
1615 same column as the headline (after the asterisks).
1617 @node TODO items, Timestamps, Hyperlinks, Top
1621 Org-mode does not maintain TODO lists as a separate document. TODO
1622 items are an integral part of the notes file, because TODO items
1623 usually come up while taking notes! With Org-mode, you simply mark
1624 any entry in a tree as being a TODO item. In this way, the
1625 information is not duplicated, and the entire context from which the
1626 item emerged is always present when you check.
1628 Of course, this technique causes TODO items to be scattered throughout
1629 your file. Org-mode provides methods to give you an overview over all
1630 things you have to do.
1633 * TODO basics:: Marking and displaying TODO entries
1634 * Progress Logging:: Document your productivity
1635 * TODO extensions:: Workflow and assignments
1636 * Priorities:: Some things are more important than others
1639 @node TODO basics, Progress Logging, TODO items, TODO items
1640 @section Basic TODO functionality
1642 Any headline can become a TODO item by starting it with the word TODO,
1646 *** TODO Write letter to Sam Fortune
1650 The most important commands to work with TODO entries are:
1654 @cindex cycling, of TODO states
1656 Rotate the TODO state of the current item between
1658 ,-> (unmarked) -> TODO -> DONE --.
1659 '--------------------------------'
1661 The same rotation can also be done ``remotely'' from the timeline and
1662 agenda buffers with the @kbd{t} command key (@pxref{Agenda commands}).
1664 @cindex sparse tree, for TODO
1666 View TODO items in a @emph{sparse tree} (@pxref{Sparse trees}). Folds
1667 the entire buffer, but shows all TODO items and the headings hierarchy
1668 above them. With prefix arg, show also the DONE entries. With
1669 numerical prefix N, show the tree for the Nth keyword in the variable
1670 @code{org-todo-keywords}.
1673 Show the global TODO list. This collects the TODO items from all
1674 agenda files (@pxref{Agenda Views}) into a single buffer. The buffer is in
1675 @code{agenda-mode}, so there are commands to examine and manipulate
1676 the TODO entries directly from that buffer (@pxref{Agenda commands}).
1677 @xref{Global TODO list}, for more information.
1678 @item @code{org-agenda-include-all-todo}
1679 If you would like to have all your TODO items listed as part of your
1680 agenda, customize the variable @code{org-agenda-include-all-todo}.
1683 @node Progress Logging, TODO extensions, TODO basics, TODO items
1684 @section Progress Logging
1685 @cindex progress logging
1686 @cindex logging, of progress
1687 If you want to keep track of @emph{when} a certain TODO item was
1688 finished, turn on logging with
1690 (setq org-log-done t)
1693 Then each time you turn a TODO entry into DONE using either @kbd{C-c
1694 C-t} in the Org-mode buffer or @kbd{t} in the agenda buffer, a line
1695 @samp{CLOSED: [timestamp]} will be inserted just after the headline.
1696 If you turn the entry back into a TODO item again through further
1697 state cycling, that line will be removed again. In the timeline
1698 (@pxref{Timeline}) and in the agenda (@pxref{Weekly/Daily Agenda}),
1699 you can then use the @kbd{L} key to display the TODO items closed on
1700 each day, giving you an overview of what has been done on a day.
1702 @node TODO extensions, Priorities, Progress Logging, TODO items
1703 @section Extended use of TODO keywords
1704 @cindex extended TODO keywords
1706 The default implementation of TODO entries is just two states: TODO
1707 and DONE. You can, however, use the TODO feature for more
1708 complicated things by configuring the variables
1709 @code{org-todo-keywords} and @code{org-todo-interpretation}. Using
1710 special setup, you can even use TODO keywords in different ways in
1711 different org files.
1714 * Workflow states:: From TODO to DONE in steps
1715 * TODO types:: I do this, Fred the rest
1716 * Per file keywords:: Different files, different requirements
1719 @node Workflow states, TODO types, TODO extensions, TODO extensions
1720 @subsection TODO keywords as workflow states
1721 @cindex TODO workflow
1722 @cindex workflow states as TODO keywords
1724 You can use TODO keywords to indicate different states in the process
1725 of working on an item, for example
1728 (setq org-todo-keywords '("TODO" "FEEDBACK" "VERIFY" "DONE")
1729 org-todo-interpretation 'sequence)
1732 @cindex completion, of TODO keywords
1733 Changing these variables becomes only effective in a new Emacs session.
1734 With this setup, the command @kbd{C-c C-t} will cycle an entry from
1735 TODO to FEEDBACK, then to VERIFY, and finally to DONE. You may also
1736 use a prefix argument to quickly select a specific state. For example
1737 @kbd{C-3 C-c C-t} will change the state immediately to VERIFY.
1738 If you define many keywords, you can use in-buffer completion (see
1739 @ref{Completion}) to insert these words into the buffer.
1741 @node TODO types, Per file keywords, Workflow states, TODO extensions
1742 @subsection TODO keywords as types
1744 @cindex names as TODO keywords
1745 @cindex types as TODO keywords
1747 The second possibility is to use TODO keywords to indicate different
1748 types of action items. For example, you might want to indicate that
1749 items are for ``work'' or ``home''. If you are into David Allen's
1750 @emph{Getting Things DONE}, you might want to use todo types
1751 @samp{NEXTACTION}, @samp{WAITING}, @samp{MAYBE}. Or, when you work
1752 with several people on a single project, you might want to assign
1753 action items directly to persons, by using their names as TODO
1754 keywords. This would be set up like this:
1757 (setq org-todo-keywords '("Fred" "Sara" "Lucy" "Mike" "DONE")
1758 org-todo-interpretation 'type)
1761 In this case, different keywords do not indicate a sequence, but
1762 rather different types. So it is normally not useful to change from
1763 one type to another. Therefore, in this case the behavior of the
1764 command @kbd{C-c C-t} is changed slightly@footnote{This is also true
1765 for the @kbd{t} command in the timeline and agenda buffers.}. When
1766 used several times in succession, it will still cycle through all
1767 names. But when you return to the item after some time and execute
1768 @kbd{C-c C-t} again, it will switch from each name directly to DONE.
1769 Use prefix arguments or completion to quickly select a specific name.
1770 You can also review the items of a specific TODO type in a sparse tree
1771 by using a numeric prefix to @kbd{C-c C-v}. For example, to see all
1772 things Lucy has to do, you would use @kbd{C-3 C-c C-v}. To collect
1773 collect Lucy's items from all agenda files into a single buffer, you
1774 would use the prefix arg as well when creating the global todo list:
1777 @node Per file keywords, , TODO types, TODO extensions
1778 @subsection Setting up TODO keywords for individual files
1779 @cindex keyword options
1780 @cindex per file keywords
1782 It can be very useful to use different aspects of the TODO mechanism
1783 in different files, which is not possible with the global settings
1784 described above. For file-local settings, you need to add special
1785 lines to the file which set the keywords and interpretation for that
1786 file only. For example, to set one of the two examples discussed
1787 above, you need one of the following lines, starting in column zero
1788 anywhere in the file:
1791 #+SEQ_TODO: TODO FEEDBACK VERIFY DONE
1792 #+TYP_TODO: Fred Sara Lucy Mike DONE
1795 @cindex Completion, of option keywords
1797 @noindent To make sure you are using the correct keyword, type
1798 @samp{#+} into the buffer and then use @kbd{M-@key{TAB}} completion.
1800 @cindex DONE, final TODO keyword
1801 Remember that the last keyword must always mean that the item is DONE
1802 (you may use a different word, though). Also note that in each file,
1803 only one of the two aspects of TODO keywords can be used. After
1804 changing one of these lines, use @kbd{C-c C-c} with the cursor still
1805 in the line to make the changes known to Org-mode@footnote{Org-mode
1806 parses these lines only when Org-mode is activated after visiting a
1807 file. @kbd{C-c C-c} with the cursor in a line starting with @samp{#+}
1808 is simply restarting Org-mode, making sure that these changes will be
1811 If you want to use very many keywords, for example when working with a
1812 large group of people, you may split the names over several lines:
1815 #+TYP_TODO: Fred Sara Lucy Mike
1816 #+TYP_TODO: Luis George Jules Jessica
1817 #+TYP_TODO: Kim Arnold Peter
1821 @node Priorities, , TODO extensions, TODO items
1825 If you use Org-mode extensively to organize your work, you may end up
1826 with a number of TODO entries so large that you'd like to prioritize
1827 them. This can be done by placing a @emph{priority cookie} into the
1831 *** TODO [#A] Write letter to Sam Fortune
1835 With its standard setup, Org-mode supports priorities @samp{A},
1836 @samp{B}, and @samp{C}. @samp{A} is the highest priority. An entry
1837 without a cookie is treated as priority @samp{B}. Priorities make a
1838 difference only in the agenda (@pxref{Weekly/Daily Agenda}).
1843 Set the priority of the current item. The command prompts for a
1844 priority character @samp{A}, @samp{B} or @samp{C}. When you press
1845 @key{SPC} instead, the priority cookie is removed from the headline.
1846 The priorities can also be changed ``remotely'' from the timeline and
1847 agenda buffer with the @kbd{,} command (@pxref{Agenda commands}).
1850 @kindex S-@key{down}
1853 Increase/decrease priority of current item. Note that these keys are
1854 also used to modify time stamps (@pxref{Creating timestamps}).
1855 Furthermore, these keys are also used by CUA-mode
1856 (@pxref{Interaction}).
1859 @node Timestamps, Agenda Views, TODO items, Top
1862 Items can be labeled with timestamps to make them useful for project
1866 * Time stamps:: Assigning a time to a tree entry
1867 * Creating timestamps:: Commands which insert timestamps
1871 @node Time stamps, Creating timestamps, Timestamps, Timestamps
1872 @section Time stamps, deadlines and scheduling
1874 @cindex ranges, time
1879 A time stamp is a specification of a date (possibly with time) in a
1880 special format, either @samp{<2003-09-16 Tue>} or @samp{<2003-09-16
1881 Tue 09:39>}. A time stamp can appear anywhere in the headline or body
1882 of an org-tree entry. Its presence allows to show entries on specific
1883 dates in the agenda (@pxref{Weekly/Daily Agenda}). We distinguish:
1888 A simple time stamp just assigns a date/time to an item. In the
1889 timeline and agenda displays, the headline of the entry will be shown
1890 exactly on that date.
1894 Two time stamps connected by @samp{--} denote a time range. The
1895 headline will be shown on the first and last day of the range, and on
1896 any dates that are displayed and fall in the range. Here is an
1900 ** Meeting in Amsterdam
1901 <2004-08-23 Mon>--<2004-08-26 Thu>
1905 @cindex DEADLINE keyword
1906 If a time stamp is preceded by the word @samp{DEADLINE:}, the task
1907 (most likely a TODO item) is supposed to be finished on that date, and
1908 it will be listed then. In addition, the compilation for @emph{today}
1909 will carry a warning about the approaching or missed deadline,
1910 starting @code{org-deadline-warning-days} before the due date, and
1911 continuing until the entry is marked DONE. An example:
1914 *** TODO write article about the Earth for the Guide
1915 The editor in charge is <bbdb:Ford Prefect>
1916 DEADLINE: <2004-02-29 Sun>
1920 @cindex SCHEDULED keyword
1921 If a time stamp is preceded by the word @samp{SCHEDULED:}, it means
1922 you are planning to start working on that task on the given date. The
1923 headline will be listed under the given date. In addition, a reminder
1924 that the scheduled date has passed will be present in the compilation
1925 for @emph{today}, until the entry is marked DONE. I.e., the
1926 task will automatically be forwarded.
1929 @node Creating timestamps, , Time stamps, Timestamps
1930 @section Creating timestamps
1931 @cindex creating timestamps
1932 @cindex timestamps, creating
1934 For Org-mode to recognize time stamps, they need to be in the specific
1935 format. All commands listed below produce time stamps in the correct
1941 Prompt for a date and insert a corresponding time stamp. When the
1942 cursor is at a previously used time stamp, it is updated to NOW. When
1943 this command is used twice in succession, a time range is inserted.
1947 Like @kbd{C-c .}, but use the alternative format which contains date
1952 Like @kbd{C-c .}, but insert an inactive time stamp not triggering the
1957 Insert a time stamp corresponding to the cursor date in the Calendar.
1961 Access the Emacs calendar for the current date. If there is a
1962 timestamp in the current line, goto the corresponding date
1967 Access the agenda for the date given by the time stamp at point
1968 (@pxref{Weekly/Daily Agenda}).
1972 Insert @samp{DEADLINE} keyword along with a stamp.
1974 @cindex sparse tree, for deadlines
1976 Create a sparse tree with all deadlines that are either past-due, or
1977 which will become due within @code{org-deadline-warning-days}.
1978 With @kbd{C-u} prefix, show all deadlines in the file. With a numeric
1979 prefix, check that many days. For example, @kbd{C-1 C-c C-w} shows
1980 all deadlines due tomorrow.
1984 Insert @samp{SCHEDULED} keyword along with a stamp.
1986 @kindex S-@key{left}
1987 @kindex S-@key{right}
1989 @itemx S-@key{right}
1990 Change date at cursor by one day. These key bindings conflict with
1991 CUA-mode (@pxref{Interaction}).
1994 @kindex S-@key{down}
1997 Change the item under the cursor in a timestamp. The cursor can be on
1998 a year, month, day, hour or minute. Note that if the cursor is not at
1999 a time stamp, these same keys modify the priority of an item.
2000 (@pxref{Priorities}). The key bindings also conflict with CUA-mode
2001 (@pxref{Interaction}).
2005 @cindex evaluate time range
2007 Evaluate a time range by computing the difference between start and
2008 end. With prefix arg, insert result after the time range (in a table:
2009 into the following column).
2012 @cindex date, reading in minibuffer
2013 @cindex time, reading in minibuffer
2014 @cindex calendar, for selecting date
2015 When Org-mode prompts for a date/time, the function reading your input
2016 will replace anything you choose not to specify with the current date
2017 and time. For details, see the documentation string of
2018 @command{org-read-date}. Also, a calender will pop up to allow
2019 selecting a date. The calendar can be fully controlled from the
2020 minibuffer, and a date can be selected with the following commands:
2025 Scroll calendar backwards by one month.
2028 Scroll calendar forwards by one month.
2031 Select date by clicking on it.
2032 @kindex S-@key{right}
2035 @kindex S-@key{left}
2038 @kindex S-@key{down}
2044 @kindex M-S-@key{right}
2045 @item M-S-@key{right}
2047 @kindex M-S-@key{left}
2048 @item M-S-@key{left}
2052 Choose date in calendar (only if nothing typed into minibuffer).
2055 @node Agenda Views, Exporting, Timestamps, Top
2056 @chapter Agenda Views
2057 @cindex agenda views
2059 Due to the way Org-mode works, TODO items and time-stamped items can
2060 be scattered throughout a file or even a number of files. To get an
2061 overview over open action items, or over events that are important for
2062 a particular date, this information must be collected, sorted and
2063 displayed in an organized way.
2065 Org-mode can select items based on various criteria, and display them
2066 in a separate buffer. Three different views are provided:
2069 an @emph{agenda} that is like a calendar and shows information
2072 a @emph{TODO list} that covers all unfinished
2075 a @emph{tags view} that shows information based on
2076 the tags associated with headlines in the outline tree.
2079 The extracted information is displayed in a special @emph{agenda
2080 buffer}. This buffer is read-only, but provides commands to visit the
2081 corresponding locations in the original Org-mode files, and even to
2082 edit these files remotely.
2085 * Agenda files:: Files being searched for agenda information
2086 * Agenda dispatcher:: Keyboard access to agenda views
2087 * Weekly/Daily Agenda:: The calendar page with current tasks
2088 * Global TODO list:: All unfinished action items
2089 * Matching headline tags:: Structured information with fine-tuned search
2090 * Timeline:: Time-sorted view for single file
2091 * Agenda commands:: Remote editing of org trees
2094 @node Agenda files, Agenda dispatcher, Agenda Views, Agenda Views
2095 @section Agenda files
2097 The information to be shown is collected from all @emph{agenda files},
2098 the files listed in the variable @code{org-agenda-files}. Thus even
2099 if you only work with a single Org-mode file, this file should be put
2100 into that list@footnote{When using the dispatcher pressing @kbd{1}
2101 before selecting a command will actually limit the command to the
2102 current file, and ignore @code{org-agenda-files} until the next
2103 dispatcher command.}. You can customize @code{org-agenda-files}, but
2104 the easiest way to maintain it is through the following commands
2106 @cindex files, adding to agenda list
2110 Add current file to the list of agenda files. The file is added to
2111 the front of the list. If it was already in the list, it is moved to
2112 the front. With prefix arg, file is added/moved to the end.
2115 Remove current file from the list of agenda files.
2118 Cycle through agenda file list.
2121 The Org menu contains the current list of files and can be used
2122 to visit any of them.
2124 @node Agenda dispatcher, Weekly/Daily Agenda, Agenda files, Agenda Views
2125 @section The agenda dispatcher
2126 @cindex agenda dispatcher
2127 @cindex dispatching agenda commands
2128 @cindex custom agenda commands
2129 @cindex agenda commands, custom
2130 The views are created through a dispatcher that should be bound to a
2131 global key, for example @kbd{C-c a} (@pxref{Installation and
2132 Activation}). In the following we will assume that @kbd{C-c a} is
2133 indeed how the dispatcher is accessed and list keyboard access to
2134 commands accordingly. After pressing @kbd{C-c a}, an additional
2135 letter is required to execute a command. The dispatcher offers the
2136 following default commands:
2139 Create the calendar-like agenda (@pxref{Weekly/Daily Agenda}).
2141 Create a list of all TODO items (@pxref{Global TODO list}).
2143 Create a list of headline matching a TAGS expression (@pxref{Matching
2147 You can also define custom commands that will be accessible through
2148 the dispatcher, just like the default commands. Custom commands are
2149 global searches for tags and specific TODO keywords, or a variety of
2150 sparse tree creating commands (@pxref{Sparse trees}). As sparse trees
2151 are only defined for a single org-mode file, these latter commands act
2152 on the current buffer instead of the list of agenda files.
2155 Custom commands are configured in the variable
2156 @code{org-agenda-custom-commands}. You can customize this variable,
2157 for example by pressing @kbd{C-c a C}. You can also directly set it
2158 with Emacs Lisp in @file{.emacs}. For example:
2160 (setq org-agenda-custom-commands
2161 '(("w" todo "WAITING")
2162 ("u" tags "+BOSS-URGENT")
2163 ("U" tags-tree "+BOSS-URGENT")
2164 ("f" occur-tree "\\<FIXME\\>")))
2166 @noindent will define @kbd{C-c a w} as a global search for
2167 TODO entries with @samp{WAITING} as todo keyword, @kbd{C-c a u} as a
2168 global tags search for headlines marked @samp{:BOSS:} but not
2169 @samp{:URGENT:}, @kbd{C-c a U} to do the same search but only in the
2170 current buffer and display the result as a sparse tree, and @kbd{C-c a
2171 f} to create a sparse tree with all entries containing the word
2172 @samp{FIXME}. For more information, look at the documentation string
2173 of the variable @code{org-agenda-custom-commands}.
2175 @node Weekly/Daily Agenda, Global TODO list, Agenda dispatcher, Agenda Views
2176 @section The weekly/daily agenda
2179 The purpose of the weekly/daily @emph{agenda} is to act like a page of
2180 a paper agenda, showing all the tasks for the current week or day.
2183 @cindex org-agenda, command
2186 Compile an agenda for the current week from a list of org files. The
2187 agenda shows the entries for each day. With a @kbd{C-u} prefix (or
2188 when the variable @code{org-agenda-include-all-todo} is @code{t}), all
2189 unfinished TODO items (also those without a date) are also listed at
2190 the beginning of the buffer, before the first date.@*
2193 Remote editing from the agenda buffer means for example that you can
2194 change the dates of deadlines and appointments from the agenda buffer.
2195 The commands available in the Agenda buffer are listed in @ref{Agenda
2199 * Categories:: Not all tasks are equal
2200 * Time-of-day specifications:: How the agenda knows the time
2201 * Calendar/Diary integration:: Integrating Anniversaries and more
2202 * Sorting of agenda items:: The order of things
2205 @node Categories, Time-of-day specifications, Weekly/Daily Agenda, Weekly/Daily Agenda
2206 @subsection Categories
2209 In the agenda buffer, each entry is preceded by a @emph{category},
2210 which is derived from the file name. The category can also be set
2211 with a special line anywhere in the buffer, looking like this:
2215 If there are several such lines in a file, each specifies the category
2216 for the text below it. The display in the agenda buffer looks best if
2217 the category is not longer than 10 characters.
2219 @node Time-of-day specifications, Calendar/Diary integration, Categories, Weekly/Daily Agenda
2220 @subsection Time-of-Day Specifications
2222 Org-mode checks each agenda item for a time-of-day specification. The
2223 time can be part of the time stamp that triggered inclusion into the
2224 agenda, for example as in @w{@samp{<2005-05-10 Tue 19:00>}}. Time
2225 ranges can be specified with two time stamps, like
2227 @w{@samp{<2005-05-10 Tue 20:30>--<2005-05-10 Tue 22:15>}}.
2229 In the headline of the entry itself, a time(range) may also appear as
2230 plain text (like @samp{12:45} or a @samp{8:30-1pm}. If the agenda
2231 integrates the Emacs diary (@pxref{Calendar/Diary integration}), time
2232 specifications in diary entries are recognized as well.
2234 For agenda display, Org-mode extracts the time and displays it in a
2235 standard 24 hour format as part of the prefix. The example times in
2236 the previous paragraphs would end up in the agenda like this:
2239 8:30-13:00 Arthur Dent lies in front of the bulldozer
2240 12:45...... Ford Prefect arrives and takes Arthur to the pub
2241 19:00...... The Vogon reads his poem
2242 20:30-22:15 Marwin escorts the Hitchhikers to the bridge
2245 If the agenda is in single-day mode, or for the display of today, the
2246 timed entries are embedded in a time grid, like
2249 8:00...... ------------------
2250 8:30-13:00 Arthur Dent lies in front of the bulldozer
2251 10:00...... ------------------
2252 12:00...... ------------------
2253 12:45...... Ford Prefect arrives and takes Arthur to the pub
2254 14:00...... ------------------
2255 16:00...... ------------------
2256 18:00...... ------------------
2257 19:00...... The Vogon reads his poem
2258 20:00...... ------------------
2259 20:30-22:15 Marwin escorts the Hitchhikers to the bridge
2262 The time grid can be turned on and off with the variable
2263 @code{org-agenda-use-time-grid}, and can be configured with
2264 @code{org-agenda-time-grid}.
2267 @node Calendar/Diary integration, Sorting of agenda items, Time-of-day specifications, Weekly/Daily Agenda
2268 @subsection Calendar/Diary integration
2269 @cindex calendar integration
2270 @cindex diary integration
2272 Emacs contains the calendar and diary by Edward M. Reingold. The
2273 calendar displays a three-month calendar with holidays from different
2274 countries and cultures. The diary allows to keep track of
2275 anniversaries, lunar phases, sunrise/set, recurrent appointments
2276 (weekly, monthly) and more. In this way, it is quite complementary to
2277 Org-mode. It can be very useful to combine output from Org-mode with
2280 In order to include entries from the Emacs diary into Org-mode's
2281 agenda, you only need to customize the variable
2284 (setq org-agenda-include-diary t)
2288 @noindent After that, everything will happen automatically. All diary
2289 entries including holidays, anniversaries etc will be included in the
2290 agenda buffer created by Org-mode. @key{SPC}, @key{TAB}, and
2291 @key{RET} can be used from the agenda buffer to jump to the diary
2292 file, in order to edit existing diary entries. The @kbd{i} command to
2293 insert new entries for the current date works in the agenda buffer, as
2294 well as the commands @kbd{S}, @kbd{M}, and @kbd{C} to display
2295 Sunrise/Sunset times, show lunar phases and to convert to other
2296 calendars, respectively. @kbd{c} can be used to switch back and forth
2297 between calendar and agenda.
2299 @node Sorting of agenda items, , Calendar/Diary integration, Weekly/Daily Agenda
2300 @subsection Sorting of agenda items
2301 @cindex sorting, of agenda items
2302 @cindex priorities, of agenda items
2303 The entries for each day are sorted. The default order is to first
2304 collect all items containing an explicit time-of-day specification.
2305 These entries will be shown at the beginning of the list, as a
2306 @emph{schedule} for the day. After that, items remain grouped in
2307 categories, in the sequence given by @code{org-agenda-files}. Within
2308 each category, items are sorted by priority (@pxref{Priorities}).
2310 The priority is a numerical quantity composed of the base priority
2311 (2000 for priority @samp{A}, 1000 for @samp{B}, and 0 for @samp{C}),
2312 plus additional increments for overdue scheduled or deadline items.
2314 Sorting can be customized using the variable
2315 @code{org-agenda-sorting-strategy}.
2318 @node Global TODO list, Matching headline tags, Weekly/Daily Agenda, Agenda Views
2319 @section The global TODO list
2320 @cindex global TODO list
2321 @cindex TODO list, global
2323 The global TODO list contains all unfinished TODO items, formatted and
2324 collected into a single place.
2329 Show the global TODO list. This collects the TODO items from all
2330 agenda files (@pxref{Agenda Views}) into a single buffer. The buffer is in
2331 @code{agenda-mode}, so there are commands to examine and manipulate
2332 the TODO entries directly from that buffer (@pxref{Agenda commands}).
2333 @xref{Global TODO list}, for more information.
2336 Like the above, but allow to select a specific TODO keyword. You can
2337 also do this by specifying a prefix argument to @kbd{C-c a t}. With a
2338 @kbd{C-u} prefix you are prompted for a keyword. With a numeric
2339 prefix, the Nth keyword in @code{org-todo-keywords} is selected.
2341 The @kbd{r} key in the agenda buffer regenerates it, and you can give
2342 a prefix argument to this command to change the selected TODO keyword,
2343 for example @kbd{3 r}. If you often need a search for a specific
2344 keyword, define a custom command for it (@pxref{Agenda dispatcher}).
2347 Remote editing of TODO items means that you can change the state of a
2348 TODO entry with a single key press. The commands available in the
2349 TODO list are described in @ref{Agenda commands}.
2351 @node Matching headline tags, Timeline, Global TODO list, Agenda Views
2352 @section Matching headline tags
2353 @cindex matching, of tags
2356 If headlines in the agenda files are marked with @emph{tags}
2357 (@pxref{Tags}), you can select headlines based on the tags that apply
2358 to them and collect them into an agenda buffer.
2363 Produce a list of all headlines that match a given set of tags. The
2364 command prompts for a selection criterion, which is a boolean logic
2365 expression with tags, like @samp{+WORK+URGENT-WITHBOSS} or
2366 @samp{WORK|HOME} (@pxref{Tags}). If you often need a specific search,
2367 define a custom command for it (@pxref{Agenda dispatcher}).
2370 Like @kbd{C-c a m}, but only select headlines that are also TODO items
2371 and force checking subitems (see variable
2372 @code{org-tags-match-list-sublevels}.
2375 The commands available in the tags list are described in @ref{Agenda
2378 @node Timeline, Agenda commands, Matching headline tags, Agenda Views
2379 @section Timeline for a single file
2380 @cindex single file summary
2381 @cindex agenda, for single file
2382 @cindex timeline, single file
2383 @cindex time-sorted view
2385 The timeline is not really an agenda view, because it only summarizes
2386 items from a single Org-mode file. But it also uses the agenda buffer
2387 and provides similar commands, so we discuss it here. The timeline
2388 shows all time-stamped items in a single Org-mode file (or the
2389 selected part of it), in @emph{time-sorted view}. The main purpose of
2390 this command is to give an overview over events in a project.
2395 Show a time-sorted view of the org file, with all time-stamped items.
2396 When called with a @kbd{C-u} prefix, all unfinished TODO entries
2397 (scheduled or not) are also listed under the current date.
2401 The commands available in the timeline buffer are listed in
2402 @ref{Agenda commands}.
2404 @node Agenda commands, , Timeline, Agenda Views
2405 @section Commands in the agenda buffer
2406 @cindex commands, in agenda buffer
2408 Entries in the agenda buffer are linked back to the org file or diary
2409 file where they originate. You are not allowed to edit the agenda
2410 buffer itself, but commands are provided to show and jump to the
2411 original entry location, and to edit the org-files ``remotely'' from
2412 the agenda buffer. In this way, all information is stored only once,
2413 and you don't risk that your agenda and note files diverge.
2415 Some commands can be executed with mouse clicks on agenda lines. For
2416 the other commands, the cursor needs to be in the desired line.
2419 @tsubheading{Motion}
2422 Next line (same as @key{up}).
2425 Previous line (same as @key{down}).
2426 @tsubheading{View/GoTo org file}
2431 Display the original location of the item in another window.
2435 Display original location and recenter that window.
2441 Go to the original location of the item in another window.
2445 Go to the original location of the item and delete other windows.
2449 Toggle Follow mode. In Follow mode, as you move the cursor through
2450 the agenda buffer, the other window always shows the corresponding
2451 location in the org file.
2455 Toggle Logbook mode. In Logbook mode, entries that where marked DONE while
2456 logging was on (variable @code{org-log-done}) are shown in the agenda.
2458 @tsubheading{Change display}
2461 Delete other windows.
2465 Switch to weekly view (7 days displayed together)
2469 Switch to daily view (just one day displayed)
2473 Toggle the inclusion of diary entries. See @ref{Calendar/Diary integration}.
2477 Toggle the time grid on and off. See also the variables
2478 @code{org-agenda-use-time-grid} and @code{org-agenda-time-grid}.
2482 Recreate the agenda buffer, for example to reflect the changes
2483 after modification of the time stamps of items with S-@key{left} and
2484 S-@key{right}. When the buffer is the global todo list, a prefix
2485 argument is interpreted to create a selective list for a specific TODO
2490 Display the following @code{org-agenda-ndays} days. For example, if
2491 the display covers a week, switch to the following week. With prefix
2492 arg, go forward that many times @code{org-agenda-ndays} days.
2496 Display the previous dates.
2502 @tsubheading{Remote editing}
2509 Change the TODO state of the item, both in the agenda and in the
2514 Show all tags associated with the current item. Because of
2515 inheritance, this may be more than the tags listed in the line itself.
2519 Set tags for the current headline.
2523 Set the priority for the current item. Org-mode prompts for the
2524 priority character. If you reply with @key{SPC}, the priority cookie
2525 is removed from the entry.
2529 Display weighted priority of current item.
2535 Increase the priority of the current item. The priority is changed in
2536 the original buffer, but the agenda is not resorted. Use the @kbd{r}
2540 @kindex S-@key{down}
2543 Decrease the priority of the current item.
2545 @kindex S-@key{right}
2547 Change the time stamp associated with the current line by one day into
2548 the future. With prefix argument, change it by that many days. For
2549 example, @kbd{3 6 5 S-@key{right}} will change it by a year. The
2550 stamp is changed in the original org file, but the change is not
2551 directly reflected in the agenda buffer. Use the
2552 @kbd{r} key to update the buffer.
2554 @kindex S-@key{left}
2556 Change the time stamp associated with the current line by one day
2561 Change the time stamp associated with the current line to today.
2562 The key @kbd{>} has been chosen, because it is the same as @kbd{S-.}
2565 @cindex diary entries, creating from agenda
2568 Insert a new entry into the diary. Prompts for the type of entry
2569 (day, weekly, monthly, yearly, anniversary, cyclic) and creates a new
2570 entry in the diary, just like @kbd{i d} etc. would do in the calendar.
2571 The date is taken from the cursor position.
2573 @tsubheading{Calendar commands}
2576 Open the Emacs calendar and move to the date at the agenda cursor.
2579 When in the calendar, compute and show the Org-mode agenda for the
2584 Show the phases of the moon for three month around current date.
2588 Show sunrise and sunset times. The geographical location must be set
2589 with calendar variables, see documentation of the Emacs calendar.
2593 Convert the date at cursor into many other cultural and historic
2598 Show holidays for three month around the cursor date.
2602 Export a single iCalendar file containing entries from all agenda files.
2604 @tsubheading{Quit and Exit}
2607 Quit Agenda, remove the agenda buffer.
2610 @cindex agenda files, removing buffers
2612 Exit agenda, remove the agenda buffer and all buffers loaded by Emacs
2613 for the compilation of the agenda. Buffers created by the user to
2614 visit org files will not be removed.
2618 @node Exporting, Miscellaneous, Agenda Views, Top
2622 For printing and sharing of notes, Org-mode documents can be exported
2623 as ASCII or HTML files. To incorporate entries with associated times
2624 like deadlines or appointments into a desktop calendar program like
2625 iCal, Org-mode can also produce extracts in the iCalendar format.
2628 * ASCII export:: Export as a structured ASCII file
2629 * HTML export:: Export as an HTML file
2630 * iCalendar export:: Create calendar entries.
2633 @node ASCII export, HTML export, Exporting, Exporting
2634 @section ASCII export
2635 @cindex ASCII export
2637 @cindex region, active
2638 @cindex active region
2639 @cindex transient-mark-mode
2643 Export as ASCII file. If there is an active region, only the region
2644 will be exported. For an org file @file{myfile.org}, the ASCII file
2645 will be @file{myfile.txt}. The file will be overwritten without
2649 @cindex headline levels, for exporting
2650 In the exported version, the first 3 outline levels will become
2651 headlines, defining a general document structure. Additional levels
2652 will be exported as itemize lists. If you want that transition to occur
2653 at a different level, specify it with a prefix argument. For example,
2655 @kbd{C-1 C-c C-x a org-export-as-ascii}
2658 creates only top level headlines and does the rest as items. Lines
2659 starting with @samp{#} and subtrees starting with the word @samp{COMMENT}
2660 will not be exported.
2662 @node HTML export, iCalendar export, ASCII export, Exporting
2663 @section HTML export
2666 Org-mode contains an HTML exporter with extensive HTML formatting, in
2667 ways similar to John Grubers @emph{markdown} language, but with
2668 additional support for tables.
2670 @cindex region, active
2671 @cindex active region
2672 @cindex transient-mark-mode
2676 Export as HTML file @file{myfile.html}.
2679 Export as HTML file and open it with a browser.
2682 Insert template with export options, see below.
2685 Toggle fixed-width for entry (QUOTE) or region, see below.
2688 @cindex headline levels, for exporting
2689 In the exported version, the first 3 outline levels will become
2690 headlines, defining a general document structure. Additional levels
2691 will be exported as itemize lists. If you want that transition to occur
2692 at a different level, specify it with a prefix argument. For example,
2697 creates two levels of headings and does the rest as items.
2700 * HTML formatting:: Interpretation of the buffer content
2701 * Export options:: How to influence exports
2702 * Comment lines:: Lines which will not be exported
2705 @node HTML formatting, Export options, HTML export, HTML export
2706 @subsection HTML formatting
2708 Not all text is transferred literally to the exported HTML file. The
2709 exporter implements the following interpretation:
2713 @cindex hand-formatted lists
2714 @cindex lists, hand-formatted
2716 Hand-formatted lists with @samp{-}, @samp{*} or @samp{+} as
2717 bullet, or with @samp{1.} or @samp{2)} as enumerator will be recognized and
2718 transformed into HTML lists. See @xref{Plain Lists}.
2720 @cindex underlined text
2724 You can make words @b{*bold*}, @i{/italic/}, and _underlined_
2726 @cindex @TeX{} interpretation
2728 Simple @TeX{}-like math constructs are interpreted:
2730 @cindex completion, of @TeX{} symbols
2733 @samp{10^22} and @samp{J_n} are super- and subscripts. You can quote
2734 @samp{^} and @samp{_} with a backslash: @samp{\_} and @samp{\^}
2736 @samp{\alpha} indicates a Greek letter, @samp{\to} an arrow. You can
2737 use completion for these macros, just type @samp{\} and maybe a few
2738 letters, and press @kbd{M-@key{TAB}} to see possible completions.
2741 @cindex tables, export to HTML
2743 Tables are transformed into HTML tables. Data fields before the first
2744 horizontal separator line will be formatted as table header fields.
2748 If a headline starts with the word @samp{QUOTE}, the text below the
2749 headline will be typeset as fixed-width, to allow quoting of computer
2750 codes etc. Lines starting with @samp{:} are also typeset in
2755 If you want to include HTML tags which should be interpreted as such,
2756 mark them with a @samp{@@} like in @samp{@@<b>bold text@@</b>}.
2757 Plain @samp{<} and @samp{>} are always transformed to @samp{<} and
2758 @samp{>} in HTML export.
2761 If these conversions conflict with your habits of typing ASCII text,
2762 they can all be turned off with corresponding variables.
2764 @node Export options, Comment lines, HTML formatting, HTML export
2765 @subsection Export options
2766 @cindex options, for export
2768 @cindex completion, of option keywords
2769 The exporter recognizes special lines in the buffer which provide
2770 additional information. These lines may be put anywhere in the file.
2771 The whole set of lines can be inserted into the buffer with @kbd{C-c
2772 C-x t}. For individual lines, a good way to make sure the keyword is
2773 correct is to type @samp{#+} and then use @kbd{M-@key{TAB}} completion
2774 (@pxref{Completion}).
2777 #+TITLE: the title to be shown (default is the buffer name)
2778 #+AUTHOR: the author (default taken from @code{user-full-name})
2779 #+EMAIL: his/her email address (default from @code{user-mail-address})
2780 #+LANGUAGE: language for HTML, e.g. @samp{en} (@code{org-export-default-language})
2781 #+TEXT: Some descriptive text to be inserted at the beginning.
2782 #+TEXT: Several lines may be given.
2783 #+OPTIONS: H:2 num:t toc:t \n:nil @:t ::t |:t ^:t *:nil TeX:t
2786 The OPTIONS line is a compact form to specify export settings. Here
2788 @cindex headline levels
2789 @cindex section-numbers
2790 @cindex table of contents
2791 @cindex linebreak preservation
2792 @cindex quoted html tags
2793 @cindex fixed-width sections
2795 @cindex @TeX{}-like syntax for sub- and superscripts
2796 @cindex emphasized text
2797 @cindex @TeX{} macros
2799 H: @r{set the number of headline levels for export}
2800 num: @r{turn on/off section-numbers}
2801 toc: @r{turn on/off table of contents}
2802 \n: @r{turn on/off linebreak-preservation}
2803 @@: @r{turn on/off quoted html tags}
2804 :: @r{turn on/off fixed-width sections}
2805 |: @r{turn on/off tables}
2806 ^: @r{turn on/off @TeX{}-like syntax for sub- and superscripts.}
2807 *: @r{turn on/off emphasized text (bold, italic, underlined)}
2808 TeX: @r{turn on/off @TeX{} macros}
2811 You can also give style information for the exported file. The
2812 default specification can be configured through the option
2813 @code{org-export-html-style}. If you want to use a file-local style,
2814 you may use file variables, best wrapped into a COMMENT section at the
2815 end of the outline tree. For example:
2818 * COMMENT HTML style specifications
2821 # org-export-html-style: " <style type=\"text/css\">
2822 p @{font-weight: normal; color: gray; @}
2823 h1 @{color: black; @}
2828 Remember to execute @kbd{M-x normal-mode} after changing this to make
2829 the new style visible to Emacs.
2831 @node Comment lines, , Export options, HTML export
2832 @subsection Comment lines
2833 @cindex comment lines
2834 @cindex exporting, not
2836 Lines starting with @samp{#} in column zero are treated as comments
2837 and will never be exported. Also entire subtrees starting with the
2838 word @samp{COMMENT} will never be exported. Finally, any text before
2839 the first headline will not be exported either. This applies also for
2845 Toggle the COMMENT keyword at the beginning of an entry.
2848 @node iCalendar export, , HTML export, Exporting
2849 @section iCalendar export
2850 @cindex iCalendar export
2852 Some people like to use Org-mode for keeping track of projects, but
2853 still prefer a standard calendar application for anniversaries and
2854 appointments. In this case it can be useful to have deadlines and
2855 other time-stamped items in Org-mode files show up in the calendar
2856 application. Org-mode can export calendar information in the standard
2862 Create iCalendar entries for the current file and store them in the same
2863 directory, using a file extension @file{.ics}.
2866 Like @kbd{C-c C-x i}, but do this for all files in
2867 @code{org-agenda-files}. For each of these files, a separate iCalendar
2868 file will be written.
2871 Create a single large iCalendar file from all files in
2872 @code{org-agenda-files} and write it to the file given by
2873 @code{org-combined-agenda-icalendar-file}.
2876 How this calendar is best read and updated, depends on the application
2877 you are using. For example, when using iCal under Apple MacOS X, you
2878 could create a new calendar @samp{OrgMode} (the default name for the
2879 calendar created by @kbd{C-c C-x c}, see the variables
2880 @code{org-icalendar-combined-name} and
2881 @code{org-combined-agenda-icalendar-file}). Then set Org-mode to
2882 overwrite the corresponding file
2883 @file{~/Library/Calendars/OrgMode.ics}. You may even use AppleScript
2884 to make iCal re-read the calendar files each time a new version of
2885 @file{OrgMode.ics} is produced. Here is the setup needed for this:
2887 @cindex applescript, for calendar update
2889 (setq org-combined-agenda-icalendar-file
2890 "~/Library/Calendars/OrgMode.ics")
2891 (add-hook 'org-after-save-iCalendar-file-hook
2894 "osascript -e 'tell application \"iCal\" to reload calendars'")))
2897 @node Miscellaneous, Index, Exporting, Top
2898 @chapter Miscellaneous
2901 * Completion:: M-TAB knows what you need
2902 * Customization:: Adapting Org-mode to your taste
2903 * FAQ:: Frequently asked questions
2904 * Interaction:: Other Emacs packages
2905 * TTY keys:: Using Org-mode on a tty
2906 * Bugs:: Things which do not work perfectly
2907 * Acknowledgments:: These people provided feedback and more
2910 @node Completion, Customization, Miscellaneous, Miscellaneous
2912 @cindex completion, of @TeX{} symbols
2913 @cindex completion, of TODO keywords
2914 @cindex completion, of dictionary words
2915 @cindex completion, of option keywords
2916 @cindex completion, of CamelCase links
2917 @cindex completion, of tags
2918 @cindex @TeX{} symbol completion
2919 @cindex TODO keywords completion
2920 @cindex dictionary word completion
2921 @cindex option keyword completion
2922 @cindex CamelCase link completion
2923 @cindex tag completion
2925 Org-mode supports in-buffer completion. This type of completion does
2926 not make use of the minibuffer. You simply type a few letters into
2927 the buffer and use the key to complete text right there.
2932 Complete word at point
2935 At the beginning of a headline, complete TODO keywords.
2937 After @samp{\}, complete @TeX{} symbols supported by the exporter.
2939 After @samp{*}, complete CamelCase versions of all headlines in the
2942 After @samp{:}, complete tags used elsewhere in the buffer.
2944 After @samp{#+}, complete the special keywords like @samp{TYP_TODO} or
2945 @samp{OPTIONS} which set file-specific options for Org-mode. When the
2946 option keyword is already complete, pressing @kbd{M-@key{TAB}} again
2947 will insert example settings for this keyword.
2949 Elsewhere, complete dictionary words using ispell.
2953 @node Customization, FAQ, Completion, Miscellaneous
2954 @section Customization
2955 @cindex customization
2956 @cindex options, for customization
2957 @cindex variables, for customization
2959 There are more than 100 variables that can be used to customize
2960 Org-mode. For the sake of compactness of the manual, we are not
2961 describing the variables here. A structured overview of customization
2962 variables is available with @kbd{M-x org-customize}. Or select
2963 @code{Browse Org Group} from the @code{Org->Customization} menu.
2965 @node FAQ, Interaction, Customization, Miscellaneous
2966 @section Frequently asked questions
2970 @item @b{Org-mode seems to be a useful default mode for the various
2971 @file{README} files I have scattered through my directories. How do I
2972 turn it on for all @file{README} files?}
2974 (add-to-list 'auto-mode-alist '("README$" . org-mode))
2977 @item @b{I would like to have two windows on the same Org-mode
2978 file, but with different outline visibility. Is that possible?}@*
2979 @cindex @code{make-indirect-buffer}
2980 @cindex indirect buffers
2981 In GNU Emacs, you may use @emph{indirect buffers} which do exactly
2982 this. See the documentation on the command
2983 @code{make-indirect-buffer}. In XEmacs, this is currently not
2984 possible because of the different outline implementation.
2986 @item @b{Is there an easy way to insert links to web locations?}@*
2987 @cindex URL, paste into buffer
2988 Sure, just type or paste them into the buffer. A plain-text URL-like
2989 string is directly interpreted as a link.
2991 @item @b{When I export my TODO list, every TODO item becomes a
2992 separate section. How do I enforce these items to be exported as an
2994 If you plan to use ASCII or HTML export, make sure things you want to
2995 be exported as item lists are level 4 at least, even if that does mean
2996 there is a level jump. For example
2999 * Todays top priorities
3000 **** TODO write a letter to xyz
3001 **** TODO Finish the paper
3002 **** Pick up kids at the school
3005 Alternatively, if you need a specific value for the heading/item
3006 transition in a particular file, use the @samp{+OPTIONS} line to
3007 configure the @samp{H} switch.
3013 @item @b{I would like to export only a subtree of my file to HTML. How?}@*
3014 @cindex exporting a subtree
3015 If you want to export a subtree, mark the subtree as region and then
3016 export. Marking can be done with @kbd{C-c @@ C-x C-x}, for example.
3018 @item @b{Org-mode takes over the S-cursor keys. I also want to use
3019 CUA-mode, is there a way to fix this conflict?}@*
3020 Yes, see @ref{Interaction}
3022 @item @b{Is there an easy way to insert an empty table template with a
3023 default number of rows and columns?}@*
3024 @cindex table, empty template
3025 To insert an empty table template, just type @samp{|-} and use
3026 @key{TAB}. The default size can be changed with the variable
3027 @code{org-table-default-size}. However, just starting to type the
3028 first line is usually much easier.
3030 @item @b{One of my table columns has started to fill up with
3031 @samp{#ERROR}. What is going on?}@*
3032 Org-mode tried to compute the column from other fields using a
3033 formula stored in the @samp{#+TBLFMT:} line just below the table, and
3034 the evaluation of the formula fails. Fix the fields used in the
3035 formula, or fix the formula, or remove it!
3037 @item @b{When I am in the last column of a table and just above a
3038 horizontal line in the table, pressing TAB creates a new table line
3039 @i{before} the horizontal line. How can I quickly move to the line
3040 @i{below} the horizontal line instead?}@*
3041 Press @key{down} (to get on the separator line) and then @key{TAB}.
3042 Or configure the variable @code{org-table-tab-jumps-over-hlines}.
3044 @item @b{How can I change the indentation of an entire table without
3045 fixing every line by hand?}@*
3046 @cindex indentation, of tables
3047 The indentation of a table is set by the first line. So just fix the
3048 indentation of the first line and realign with @key{TAB}.
3050 @item @b{Is it possible to include entries from org-mode files into my
3052 Since the org-mode agenda is much more powerful and can contain the
3053 diary (@pxref{Calendar/Diary integration}), you should think twice
3054 before deciding to do this. Inegrating org-mode information into the
3055 diary is, however, possible. The following steps are necessary:
3056 Autoload the function @command{org-diary} as shown above under
3057 @ref{Installation and Activation}. You also need to use @emph{fancy
3058 diary display} by setting in @file{.emacs}:
3061 (add-hook 'diary-display-hook 'fancy-diary-display)
3064 Then include the following line into your @file{~/diary} file, in
3065 order to get the entries from all files listed in the variable
3066 @code{org-agenda-files}:
3072 You may also select specific files with
3075 &%%(org-diary) ~/path/to/some/org-file.org
3076 &%%(org-diary) ~/path/to/another/org-file.org
3079 If you now launch the calendar and press @kbd{d} to display a diary,
3080 the headlines of entries containing a timestamp, date range, schedule,
3081 or deadline referring to the selected date will be listed. Just like
3082 in Org-mode's agenda view, the diary for @emph{today} contains
3083 additional entries for overdue deadlines and scheduled items. See
3084 also the documentation of the @command{org-diary} function.
3089 @node Interaction, TTY keys, FAQ, Miscellaneous
3090 @section Interaction with other packages
3091 @cindex packages, interaction with other
3092 Org-mode can cooperate with the following packages:
3095 @cindex @file{table.el}
3096 @item @file{table.el} by Takaaki Ota
3097 Org mode cooperates with table.el, see @ref{table.el}.
3098 @cindex @file{calc.el}
3099 @item @file{calc.el} by Dave Gillespie
3100 Org-mode uses the calc package for implementing spreadsheet
3101 functionality in its tables (@pxref{Table calculations}). Org-modes
3102 checks for the availability of calc by looking for the function
3103 @code{calc-eval} which should be autoloaded in your setup if calc has
3104 been installed properly. As of Emacs 22, calc is part of the Emacs
3105 distribution. Another possibility for interaction between the two
3106 packages is using calc for embedded calculations. @xref{Embedded Mode,
3107 , Embedded Mode, calc, GNU Emacs Calc Manual}.
3108 @cindex @file{constants.el}
3109 @item @file{constants.el} by Carsten Dominik
3110 In a table formula (@pxref{Table calculations}), it is possible to use
3111 names for natural constants or units. Instead of defining you own
3112 constants in the variable @code{org-table-formula-constants}, install
3113 the @file{constants} package which defines a large number of constants
3114 and units, and lets you use unit prefixes like @samp{M} for
3115 @samp{Mega} etc. You will need version 2.0 of this package, available
3116 at @url{http://www.astro.uva.nl/~dominik/Tools}. Org-mode checks for
3117 the function @code{constants-get}, which has to be autoloaded in your
3118 setup. See the installation instructions in the file
3119 @file{constants.el}.
3120 @cindex @file{remember.el}
3121 @cindex @file{CUA.el}
3122 @item @file{CUA.el} by Kim. F. Storm
3123 Keybindings in Org-mode conflict with the @kbd{S-<cursor>} keys
3124 used by CUA-mode (as well as pc-select-mode and s-region-mode) to
3125 select and extend the region. If you want to use one of these
3126 packages along with Org-mode, configure the variable
3127 @code{org-CUA-compatible}. When set, Org-mode will move the following
3128 keybindings in org-mode files, and in the agenda buffer (but not
3129 during date selection).
3131 S-UP -> M-p S-DOWN -> M-n
3132 S-LEFT -> M-- S-RIGHT -> M-+
3135 Yes, these are unfortunately more difficult to remember. If you want
3136 to have other replacement keys, look at the variable
3137 @code{org-disputed-keys}.
3138 @item @file{remember.el} by John Wiegley
3139 Org mode cooperates with remember, see @ref{Remember}.
3140 @cindex @file{planner.el}
3141 @item @file{planner.el} by John Wiegley
3142 Planner is another tool to plan work and keep track of tasks. Planner
3143 uses a multi-file approach with project pages and day pages. Is based
3144 on Emacs-Wiki. If Planner is your primary tool, it can be useful to
3145 display the agenda entries resulting from org files in day-pages of
3146 the planner. This can be done through the diary of the calendar:
3147 Integrate org files into the diary as described above, and then turn
3148 on the diary support of planner.
3151 @node TTY keys, Bugs, Interaction, Miscellaneous
3152 @section Using org-mode on a tty
3153 @cindex tty keybindings
3155 Org-mode uses a number of keys that are not accessible on a tty. This
3156 applies to most special keys like cursor keys, @key{TAB} and
3157 @key{RET}, when these are combined with modifier keys like @key{Meta}
3158 and/or @key{Shift}. Org-mode uses these bindings because it needs to
3159 provide keys for a large number of commands, and because these keys
3160 appeared particularly easy to remember. In order to still be able to
3161 access the core functionality of Org-mode on a tty, alternative
3162 bindings are provided. Here is a complete list of these bindings,
3163 which are obviously more cumbersome to use. Note that sometimes a
3164 work-around can be better. For example changing a time stamp is
3165 really only fun with @kbd{S-@key{cursor}} keys. On a tty you would
3166 rather use @kbd{C-c .} to re-insert the timestamp.
3169 @multitable @columnfractions 0.15 0.2 0.2
3170 @item @b{Default} @tab @b{Alternative 1} @tab @b{Alternative 2}
3171 @item @kbd{S-@key{TAB}} @tab @kbd{C-u @key{TAB}} @tab
3172 @item @kbd{M-@key{left}} @tab @kbd{C-c C-x l} @tab @kbd{@key{Esc} @key{left}}
3173 @item @kbd{M-S-@key{left}} @tab @kbd{C-c C-x L} @tab
3174 @item @kbd{M-@key{right}} @tab @kbd{C-c C-x r} @tab @kbd{@key{Esc} @key{right}}
3175 @item @kbd{M-S-@key{right}} @tab @kbd{C-c C-x R} @tab
3176 @item @kbd{M-@key{up}} @tab @kbd{C-c C-x u} @tab @kbd{@key{Esc} @key{up}}
3177 @item @kbd{M-S-@key{up}} @tab @kbd{C-c C-x U} @tab
3178 @item @kbd{M-@key{down}} @tab @kbd{C-c C-x d} @tab @kbd{@key{Esc} @key{down}}
3179 @item @kbd{M-S-@key{down}} @tab @kbd{C-c C-x D} @tab
3180 @item @kbd{S-@key{RET}} @tab @kbd{C-c C-x c} @tab
3181 @item @kbd{M-@key{RET}} @tab @kbd{C-c C-x m} @tab @kbd{@key{Esc} @key{RET}}
3182 @item @kbd{M-S-@key{RET}} @tab @kbd{C-c C-x M} @tab
3183 @item @kbd{S-@key{left}} @tab @kbd{C-c C-x @key{left}} @tab
3184 @item @kbd{S-@key{right}} @tab @kbd{C-c C-x @key{right}} @tab
3185 @item @kbd{S-@key{up}} @tab @kbd{C-c C-x @key{up}} @tab
3186 @item @kbd{S-@key{down}} @tab @kbd{C-c C-x @key{down}} @tab
3189 @node Bugs, Acknowledgments, TTY keys, Miscellaneous
3193 Here is a list of things which should work differently, but which I
3194 have found too hard to fix.
3198 @c If you call @code{fill-paragraph} (bound to @kbd{M-q}) in a table, the
3199 @c filling is correctly disabled. However, if some text directly
3200 @c (without an empty line in between) precedes or follows a table, calling
3201 @c @code{fill-paragraph} in that text will also fill the table like
3202 @c normal text. Also, @code{fill-region} does bypass the
3203 @c @code{fill-paragraph} code and will fill tables like normal text.
3205 Text in an entry protected with the @samp{QUOTE} keyword should not
3208 When the application called by @kbd{C-c C-o} to open a file link fails
3209 (for example because the application does not exits or refuses to open
3210 the file), it does so silently. No error message is displayed.
3212 The remote-editing commands in the agenda buffer cannot be undone with
3213 @code{undo} called from within the agenda buffer. But you can go to
3214 the corresponding buffer (using @key{TAB} or @key{RET} and execute
3217 Recalculating a table line applies the formulas from left to right.
3218 If a formula uses @emph{calculated} fields further down the row,
3219 multiple recalculation may be needed to get all fields consistent.
3221 Under XEmacs, if Org-mode entries are included into the diary, it is
3222 not possible to jump back from the diary to the org file. Apparently,
3223 the text properties are lost when the fancy-diary-display is used.
3224 However, from Org-mode's timeline and agenda buffers (created with
3225 @kbd{C-c C-r} and @kbd{C-c a}), things do work correctly.
3227 Linux should also have a default viewer application, using mailcap.
3228 Maybe we can use GNUS or VM mime code? Or dired's guessing commands?
3229 Any hints (or even patches) are appreciated.
3231 When you write @samp{x = a /b/ c}, b will be exported in italics.
3233 The exporters work well, but could be made more efficient.
3238 @node Acknowledgments, , Bugs, Miscellaneous
3239 @section Acknowledgments
3240 @cindex acknowledgments
3243 Org-mode was written by Carsten Dominik, who still maintains it at the
3244 Org-mode homepage @uref{http://www.astro.uva.nl/~dominik/Tools/org/}.
3245 The following people (in alphabetic order) have helped the development
3246 along with ideas, suggestions and patches. Many thanks to all of you,
3247 Org-mode would not be what it is without your input.
3251 Pavel Chalmoviansky reported bugs and suggested improvements
3252 related to the agenda treatment of items with specified time.
3254 Sacha Chua, the current maintainer of Planner, suggested to copy
3255 linking code from Planner (I took code for RMAIL and Wanderlust).
3257 Christian Egli converted the documentation into TeXInfo format and
3258 patched basic CSS formatting support into the HTML exporter. He also
3259 inspired the agenda by showing me his plans for a multifile summary.
3261 Kai Grossjohann pointed out that a number of key bindings in Org-mode
3262 conflict with other packages.
3264 Stefan Monnier provided a patch with lots of little fixes to keep the
3265 Emacs-Lisp compiler happy.
3267 Tim O'Callaghan suggested in-file links, search options for
3268 general file links, and TAGS.
3270 Oliver Oppitz made useful suggestions.
3272 Pete Phillips helped the development of the TAGS feature with beta
3273 testing and suggestions.
3275 Matthias Rempe (Oelde) provided ideas, a patch introducing Windows
3276 NT/2000 support, and quality control.
3278 Kevin Rogers contributed code to access VM files on remote hosts.
3280 Philip Rooke created the Org-mode reference card. He also helped with
3281 beta testing and contributed a number of very useful ideas.
3283 Christian Schlauer proposed angular brackets around links, among other
3286 Linking to VM/BBDB/GNUS was inspired by Tom Shannon's
3287 @file{organizer-mode.el}.
3289 Juergen Vollmer contributed code generating the table of contents
3290 in HTML output, and other export improvements.
3292 David Wainberg suggested to implement an archiving mechanism and helped
3295 Scheduling TODO items was inspired by John Wiegley's @file{planner.el}.
3297 Carsten Wimmer suggested some changes and helped fix a bug in linking
3300 Roland Winkler pointed out that additional keybindings are needed to
3301 use Org-mode on a tty.
3303 @c Nic Ferrier and Christian Egli implemented XML export.
3306 @node Index, Key Index, Miscellaneous, Top
3311 @node Key Index, , Index, Top
3319 arch-tag: 7893d1fe-cc57-4d13-b5e5-f494a1bcc7ac