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.
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 * Tags:: Tagging headlines and matching sets of tags
85 * Agenda views:: Collecting information into views
86 * Exporting:: Sharing and publishing of notes
87 * Miscellaneous:: All the rest which did not fit elsewhere
88 * Index:: The fast road to specific information
89 * Key Index:: Key bindings and where they are described
92 --- The Detailed Node Listing ---
96 * Summary:: Brief summary of what Org-mode does
97 * Installation and activation:: How to install Org-mode
98 * Feedback:: Bug reports, ideas, patches etc.
102 * Outlines:: Org-mode is based on outline-mode
103 * Headlines:: How to typeset org-tree headlines
104 * Visibility cycling:: Show and hide, much simplified
105 * Motion:: Jumping to other headlines
106 * Structure editing:: Changing sequence and level of headlines
107 * Archiving:: Move done task trees to a different place
108 * Sparse trees:: Matches embedded in context
109 * Plain lists:: Editing hand-formatted lists
113 * Built-in table editor:: Simple tables
114 * Narrow columns:: Stop wasting space in tables
115 * Table calculations:: Compute a field from other fields
116 * orgtbl-mode:: The table editor as minor mode
117 * table.el:: Complex tables
119 Calculations in tables
121 * Formula syntax:: How to write a formula
122 * Column formulas:: Formulas valid for all fields in a column
123 * Advanced features:: Field names, parameters and automatic recalc
124 * Named-field formulas:: Formulas valid in single fields
125 * Editing/debugging formulas:: Changing a stored formula
126 * Appetizer:: Taste the power of calc
130 * Link format:: How links in Org-mode are formatted
131 * Internal links:: Links to other places in the current file
132 * External links:: URL-like links to the world
133 * Handling links:: Creating, inserting and following
134 * Search Options:: Linking to a specific location
135 * Remember:: Org-trees store quick notes
139 * Radio targets:: Make targets trigger links in plain text.
140 * CamelCase links:: Activating CamelCase words as links
144 * TODO basics:: Marking and displaying TODO entries
145 * Progress logging:: Document your productivity
146 * TODO extensions:: Workflow and assignments
147 * Priorities:: Some things are more important than others
149 Extended use of TODO keywords
151 * Workflow states:: From TODO to DONE in steps
152 * TODO types:: I do this, Fred the rest
153 * Per file keywords:: Different files, different requirements
157 * Time stamps:: Assigning a time to a tree entry
158 * Creating timestamps:: Commands which insert timestamps
162 * Tag inheritance:: Tags use the tree structure of the outline
163 * Setting tags:: How to assign tags to a headline
164 * Tag searches:: Searching for combinations of tags
168 * Agenda files:: Files being searched for agenda information
169 * Agenda dispatcher:: Keyboard access to agenda views
170 * Weekly/Daily agenda:: The calendar page with current tasks
171 * Global TODO list:: All unfinished action items
172 * Matching headline tags:: Structured information with fine-tuned search
173 * Timeline:: Time-sorted view for single file
174 * Agenda commands:: Remote editing of org trees
176 The weekly/daily agenda
178 * Categories:: Not all tasks are equal
179 * Time-of-day specifications:: How the agenda knows the time
180 * Calendar/Diary integration:: Integrating Anniversaries and more
181 * Sorting of agenda items:: The order of things
185 * ASCII export:: Exporting to plain ASCII
186 * HTML export:: Exporting to HTML
187 * XML export:: Exporting to XML
188 * iCalendar export:: Exporting in iCalendar format
189 * Text interpretation:: How the exporter looks at the file
191 Text interpretation by the exporter
193 * Comment lines:: Some lines will not be exported
194 * Enhancing text:: Subscripts, symbols and more
195 * Export options:: How to influence the export settings
199 * Completion:: M-TAB knows what you need
200 * Customization:: Adapting Org-mode to your taste
201 * Summary of in-buffer settings:: Using special lines to set options
202 * The very busy C-c C-c key:: When in doubt, press C-c C-c
203 * Clean view:: Getting rid of leading stars in the outline
204 * TTY keys:: Using Org-mode on a tty
205 * FAQ:: Frequently asked questions
206 * Interaction:: Other Emacs packages
207 * Bugs:: Things which do not work perfectly
208 * Acknowledgments:: These people provided feedback and more
213 @node Introduction, Document structure, Top, Top
214 @chapter Introduction
218 * Summary:: Brief summary of what Org-mode does
219 * Installation and activation:: How to install Org-mode
220 * Feedback:: Bug reports, ideas, patches etc.
223 @node Summary, Installation and activation, Introduction, Introduction
227 Org-mode is a mode for keeping notes, maintaining ToDo lists, and doing
228 project planning with a fast and effective plain-text system.
230 Org-mode develops organizational tasks around NOTES files that contain
231 information about projects as plain text. Org-mode is implemented on
232 top of outline-mode, which makes it possible to keep the content of
233 large files well structured. Visibility cycling and structure editing
234 help to work with the tree. Tables are easily created with a built-in
235 table editor. Org-mode supports ToDo items, deadlines, time stamps,
236 and scheduling. It dynamically compiles entries into an agenda that
237 utilizes and smoothly integrates much of the Emacs calendar and diary.
238 Plain text URL-like links connect to websites, emails, Usenet
239 messages, BBDB entries, and any files related to the projects. For
240 printing and sharing of notes, an Org-mode file can be exported as a
241 structured ASCII file, as HTML, or (todo and agenda items only) as an
244 Org-mode keeps simple things simple. When first fired up, it should
245 feel like a simple, easy to use outliner. Complexity is not imposed,
246 but a large amount of functionality is available when you need it.
247 Org-mode can be used on different levels and in different ways, for
251 @r{@bullet{} as an outline extension with visibility cycling and structure editing}
252 @r{@bullet{} as an ASCII system and table editor for taking structured notes}
253 @r{@bullet{} as an ASCII table editor with spreadsheet-like capabilities}
254 @r{@bullet{} as a simple hypertext system, with HTML export}
255 @r{@bullet{} as a TODO list editor}
256 @r{@bullet{} as a full agenda and planner with deadlines and work scheduling}
259 The Org-mode table editor can be integrated into any major mode by
260 activating the minor Orgtbl-mode.
262 There is a website for Org-mode which provides links to the newest
263 version of Org-mode, as well as additional information, screen shots
264 and example files. This page is located at
265 @uref{http://www.astro.uva.nl/~dominik/Tools/org/}.
269 @node Installation and activation, Feedback, Summary, Introduction
270 @section Installation and Activation
273 @cindex global keybindings
274 @cindex keybindings, global
276 If Org-mode is part of the Emacs distribution or an XEmacs package,
277 you only need to copy the following lines to your @file{.emacs} file.
278 The last two lines define @emph{global} keys for the commands
279 @command{org-store-link} and @command{org-agenda} - please
280 choose suitable keys yourself.
283 ;; The following lines are always needed. Choose your own keys.
284 (add-to-list 'auto-mode-alist '("\\.org$" . org-mode))
285 (define-key global-map "\C-cl" 'org-store-link)
286 (define-key global-map "\C-ca" 'org-agenda)
289 If you have downloaded Org-mode from the Web, you must byte-compile
290 @file{org.el} and put it on your load path. In addition to the Emacs
291 Lisp lines above, you also need to add the following lines to
295 ;; These lines only if org-mode is not part of the X/Emacs distribution.
296 (autoload 'org-mode "org" "Org mode" t)
297 (autoload 'org-diary "org" "Diary entries from Org mode")
298 (autoload 'org-agenda "org" "Multi-file agenda from Org mode" t)
299 (autoload 'org-store-link "org" "Store a link to the current location" t)
300 (autoload 'orgtbl-mode "org" "Org tables as a minor mode" t)
301 (autoload 'turn-on-orgtbl "org" "Org tables as a minor mode")
304 @cindex org-mode, turning on
305 With this setup, all files with extension @samp{.org} will be put into
306 Org-mode. As an alternative, make the first line of a file look like
310 MY PROJECTS -*- mode: org; -*-
313 @noindent which will select Org-mode for this buffer no matter what
314 the file's name is. See also the variable
315 @code{org-insert-mode-line-in-empty-file}.
317 @node Feedback, , Installation and activation, Introduction
324 If you find problems with Org-mode, or if you have questions, remarks,
325 or ideas about it, please contact the maintainer Carsten Dominik at
326 @value{MAINTAINEREMAIL}.
328 For bug reports, please provide as much information as possible,
329 including the version information of Emacs (@kbd{C-h v emacs-version
330 @key{RET}}) and Org-mode (@kbd{C-h v org-version @key{RET}}), as well as
331 the Org-mode related setup in @file{.emacs}. If an error occurs, a
332 traceback can be very useful. Often a small example file helps, along
333 with clear information about:
336 @item What exactly did you do?
337 @item What did you expect to happen?
338 @item What happened instead?
340 @noindent Thank you for helping to improve this mode.
342 @node Document structure, Tables, Introduction, Top
343 @chapter Document Structure
344 @cindex document structure
345 @cindex structure of document
347 Org-mode is based on outline mode and provides flexible commands to
348 edit the structure of the document.
351 * Outlines:: Org-mode is based on outline-mode
352 * Headlines:: How to typeset org-tree headlines
353 * Visibility cycling:: Show and hide, much simplified
354 * Motion:: Jumping to other headlines
355 * Structure editing:: Changing sequence and level of headlines
356 * Archiving:: Move done task trees to a different place
357 * Sparse trees:: Matches embedded in context
358 * Plain lists:: Editing hand-formatted lists
361 @node Outlines, Headlines, Document structure, Document structure
366 Org-mode is implemented on top of outline-mode. Outlines allow to
367 organize a document in a hierarchical structure, which (at least for
368 me) is the best representation of notes and thoughts. Overview over
369 this structure is achieved by folding (hiding) large parts of the
370 document to show only the general document structure and the parts
371 currently being worked on. Org-mode greatly simplifies the use of
372 outlines by compressing the entire show/hide functionality into a
373 single command @command{org-cycle}, which is bound to the @key{TAB}
376 @node Headlines, Visibility cycling, Outlines, Document structure
381 Headlines define the structure of an outline tree. The headlines in
382 Org-mode start with one or more stars, on the left margin. For
392 * Another top level headline
395 @noindent Some people find the many stars too noisy and would prefer an
396 outline that has whitespace followed by a single star as headline
397 starters. @ref{Clean view} describes a setup to realize this.
399 @node Visibility cycling, Motion, Headlines, Document structure
400 @section Visibility cycling
401 @cindex cycling, visibility
402 @cindex visibility cycling
403 @cindex trees, visibility
404 @cindex show hidden text
407 Outlines make it possible to hide parts of the text in the buffer.
408 Org-mode uses a single command bound to the @key{TAB} key to change
409 the visibility in the buffer.
411 @cindex subtree visibility states
412 @cindex folded, subtree visibility state
413 @cindex children, subtree visibility state
414 @cindex subtree, subtree visibility state
418 Rotate current subtree between the states
421 ,-> FOLDED -> CHILDREN -> SUBTREE --.
422 '-----------------------------------'
425 At the beginning of the buffer (or when called with @kbd{C-u}), this does
426 the same as the command @kbd{S-@key{TAB}} below.
428 @cindex global visibility states
429 @cindex overview, global visibility state
430 @cindex contents, global visibility state
431 @cindex show all, global visibility state
434 Rotate the entire buffer between the states
437 ,-> OVERVIEW -> CONTENTS -> SHOW ALL --.
438 '--------------------------------------'
441 Note that inside tables, @kbd{S-@key{TAB}} jumps to the previous field.
443 @cindex show all, command
449 When Emacs first visits an Org-mode file, the global state is set to
450 OVERVIEW, i.e. only the top level headlines are visible. This can be
451 configured through the variable @code{org-startup-folded}, or on a
452 per-file basis by adding one of the following lines anywhere in the
461 @node Motion, Structure editing, Visibility cycling, Document structure
463 @cindex motion, between headlines
464 @cindex jumping, to headlines
465 @cindex headline navigation
466 The following commands jump to other headlines in the buffer.
477 Next heading same level.
480 Previous heading same level.
483 Backward to higher level heading.
486 Jump to a different place without changing the current outline
487 visibility. Shows the document structure in a temporary buffer, where
488 you can use visibility cycling (@key{TAB}) to find your destination.
489 After pressing @key{RET}, the cursor moves to the selected location in
490 the original buffer, and the headings hierarchy above it is made
494 @node Structure editing, Archiving, Motion, Document structure
495 @section Structure editing
496 @cindex structure editing
497 @cindex headline, promotion and demotion
498 @cindex promotion, of subtrees
499 @cindex demotion, of subtrees
500 @cindex subtree, cut and paste
501 @cindex pasting, of subtrees
502 @cindex cutting, of subtrees
503 @cindex copying, of subtrees
504 @cindex subtrees, cut and paste
509 Insert new heading with same level as current. If the cursor is in a
510 plain list item, a new item is created (@pxref{Plain lists}). To force
511 creation of a new headline, use a prefix arg, or first press @key{RET}
512 to get to the beginning of the next line. When this command is used in
513 the middle of a line, the line is split and the rest of the line becomes
514 the new headline. If the command is used at the beginning of a
515 headline, the new headline is created before the current line. It at
516 the beginning of any other line, the content of that line is made the
518 @kindex M-S-@key{RET}
520 Insert new TODO entry with same level as current heading.
523 Promote current heading by one level.
524 @kindex M-@key{right}
526 Demote current heading by one level.
527 @kindex M-S-@key{left}
529 Promote the current subtree by one level.
530 @kindex M-S-@key{right}
531 @item M-S-@key{right}
532 Demote the current subtree by one level.
535 Move subtree up (swap with previous subtree of same
537 @kindex M-S-@key{down}
539 Move subtree down (swap with next subtree of same level).
544 Kill subtree, i.e. remove it from buffer but save in kill ring.
547 Copy subtree to kill ring.
550 Yank subtree from kill ring. This does modify the level of the subtree to
551 make sure the tree fits in nicely at the yank position. The yank
552 level can also be specified with a prefix arg, or by yanking after a
553 headline marker like @samp{****}.
556 @cindex region, active
557 @cindex active region
558 @cindex transient-mark-mode
559 When there is an active region (transient-mark-mode), promotion and
560 demotion work on all headlines in the region. To select a region of
561 headlines, it is best to place both point and mark at the beginning of a
562 line, mark at the beginning of the first headline, and point at the line
563 just after the last headline to change. Note that when the cursor is
564 inside a table (@pxref{Tables}), the Meta-Cursor keys have different
567 @node Archiving, Sparse trees, Structure editing, Document structure
570 @cindex filing subtrees
572 When a project represented by a (sub)tree is finished, you may want
573 to move the tree to an archive place, either in the same file under a
574 special top-level heading, or even to a different file.
578 Archive the subtree starting at the cursor position to the location
579 given by @code{org-archive-location}.
582 @cindex archive locations
583 The default archive is a file in the same directory as the current
584 file, with the name derived by appending @file{_archive} to the
585 current file name. For information and examples on how to change
586 this, see the documentation string of the variable
587 @code{org-archive-location}. If you are also using the Org-mode
588 agenda, archiving to a different file is a good way to keep archived
589 trees from contributing agenda items.
591 @node Sparse trees, Plain lists, Archiving, Document structure
592 @section Sparse trees
594 @cindex trees, sparse
595 @cindex folding, sparse trees
596 @cindex occur, command
598 An important feature of Org-mode is the ability to construct
599 @emph{sparse trees} for selected information in an outline tree. A
600 sparse tree means that the entire document is folded as much as
601 possible, but the selected information is made visible along with the
602 headline structure above it@footnote{See also the variables
603 @code{org-show-hierarchy-above} and
604 @code{org-show-following-heading}.}. Just try it out and you will see
605 immediately how it works.
607 Org-mode contains several commands creating such trees. The most
608 basic one is @command{org-occur}:
613 Occur. Prompts for a regexp and shows a sparse tree with all matches.
614 If the match is in a headline, the headline is made visible. If the
615 match is in the body of an entry, headline and body are made visible.
616 In order to provide minimal context, also the full hierarchy of
617 headlines above the match is shown, as well as the headline following
618 the match. Each match is also highlighted, the highlights disappear
619 when the buffer is changed with an editing command.
622 For frequently used sparse trees of specific search strings, you can
623 use the variable @code{org-agenda-custom-commands} to define fast
624 keyboard access to specific sparse trees. These commands will then be
625 accessible through the agenda dispatcher (@pxref{Agenda dispatcher}).
629 (setq org-agenda-custom-commands
630 '(("f" occur-tree "FIXME")))
633 @noindent will define the key @kbd{C-c a f} as a shortcut for creating
634 a sparse tree matching the string @samp{FIXME}.
636 Other commands are using sparse trees as well. For example @kbd{C-c
637 C-v} creates a sparse TODO tree (@pxref{TODO basics}).
640 @cindex printing sparse trees
641 @cindex visible text, printing
642 To print a sparse tree, you can use the Emacs command
643 @code{ps-print-buffer-with-faces} which does not print invisible parts
644 of the document @footnote{This does not work under XEmacs, because
645 XEmacs uses selective display for outlining, not text properties.}.
646 Or you can use the command @kbd{C-c C-x v} to copy the visible part of
647 the document to another file (extension @file{.txt}) which can then be
648 printed in any desired way.
651 @node Plain lists, , Sparse trees, Document structure
655 @cindex lists, ordered
656 @cindex ordered lists
658 Headlines define both the structure of the Org-mode file, and also lists
659 (for example, TODO items (@pxref{TODO items}) should be created using
660 headline levels). However, when taking notes, the plain text is
661 sometimes easier to read with hand-formatted lists. Org-mode supports
662 editing such lists, and the HTML exporter (@pxref{Exporting}) does
663 parse and format them.
665 Org-mode knows ordered and unordered lists. Unordered list items start
666 with @samp{-}, @samp{+}, or @samp{*}@footnote{When using @samp{*} as a
667 bullet, lines must be indented or they will be seen as top-level
668 headlines. Also, when you are hiding leading stars to get a clean
669 outline view, plain list items starting with a star are visually
670 indistinguishable from true headlines. In short: even though @samp{*}
671 is supported, it may be better to not use it for plain list items} as
672 bullets. Ordered list items start with @samp{1.} or @samp{1)}. Items
673 belonging to the same list must have the same indentation on the first
674 line. In particular, if an ordered list reaches number @samp{10.}, then
675 the 2--digit numbers must be written left-aligned with the other numbers
676 in the list. Indentation also determines the end of a list item. It
677 ends before the next line that is indented like the bullet/number, or
683 My favorite scenes are (in this order)
684 1. Eowyns fight with the witch king
685 + this was already my favorite scene in the book
686 + I really like Miranda Otto.
687 2. The attack of the Rohirrim
688 3. Peter Jackson being shot by Legolas
690 He makes a really funny face when it happens.
691 But in the end, not individual scenes matter but the film as a whole.
695 Org-mode supports these lists by tuning filling and wrapping commands
696 to correctly deal with them. Furthermore, the following commands act
697 on items when the cursor is in the first line of an item (the line
698 with the bullet or number).
703 Items can be folded just like headline levels if you set the variable
704 @code{org-cycle-include-plain-lists}. The level of an item is then
705 given by the indentation of the bullet/number. However, items are
706 always subordinate to real headlines, the hierarchies remain
707 completely separated.
710 Insert new item at current level. With prefix arg, force a new heading
711 (@pxref{Structure editing}). If this command is used in the middle of a
712 line, the line is @emph{split} and the rest of the line becomes the new
713 item. If this command is executed in the @emph{whitespace before a bullet or
714 number}, the new item is created @emph{before} the current item. If the
715 command is executed in the white space before the text that is part of
716 an item but does not contain the bullet, a bullet is added to the
719 @kindex M-S-@key{down}
721 @itemx M-S-@key{down}
722 Move the item including subitems up/down (swap with previous/next item
723 of same indentation). If the list is ordered, renumbering is
725 @kindex M-S-@key{left}
726 @kindex M-S-@key{right}
728 @itemx M-S-@key{right}
729 Decrease/increase the indentation of the item, including subitems.
730 Initially, the item tree is selected based on current indentation.
731 When these commands are executed several times in direct succession,
732 the initially selected region is used, even if the new indentation
733 would imply a different hierarchy. To use the new hierarchy, break
734 the command chain with a cursor motion or so.
737 Renumber the ordered list at the cursor.
740 @node Tables, Hyperlinks, Document structure, Top
743 @cindex editing tables
745 Org-mode has a very fast and intuitive table editor built-in.
746 Spreadsheet-like calculations are supported in connection with the
747 Emacs @file{calc} package.
750 * Built-in table editor:: Simple tables
751 * Narrow columns:: Stop wasting space in tables
752 * Table calculations:: Compute a field from other fields
753 * orgtbl-mode:: The table editor as minor mode
754 * table.el:: Complex tables
757 @node Built-in table editor, Narrow columns, Tables, Tables
758 @section The built-in table editor
759 @cindex table editor, builtin
761 Org-mode makes it easy to format tables in plain ASCII. Any line with
762 @samp{|} as the first non-white character is considered part of a
763 table. @samp{|} is also the column separator. A table might look
767 | Name | Phone | Age |
768 |-------+-------+-----|
769 | Peter | 1234 | 17 |
773 A table is re-aligned automatically each time you press @key{TAB} or
774 @key{RET} or @kbd{C-c C-c} inside the table. @key{TAB} also moves to
775 the next field (@key{RET} to the next row) and creates new table rows
776 at the end of the table or before horizontal lines. The indentation
777 of the table is set by the first line. Any line starting with
778 @samp{|-} is considered as a horizontal separator line and will be
779 expanded on the next re-align to span the whole table width. So, to
780 create the above table, you would only type
787 @noindent and then press @key{TAB} to align the table and start filling in
790 When typing text into a field, Org-mode treats @key{DEL},
791 @key{Backspace}, and all character keys in a special way, so that
792 inserting and deleting avoids shifting other fields. Also, when
793 typing @emph{immediately after the cursor was moved into a new field
794 with @kbd{@key{TAB}}, @kbd{S-@key{TAB}} or @kbd{@key{RET}}}, the
795 field is automatically made blank. If this behavior is too
796 unpredictable for you, configure the variables
797 @code{org-enable-table-editor} and @code{org-table-auto-blank-field}.
800 @tsubheading{Creation and conversion}
803 Convert the active region to table. If every line contains at least one
804 TAB character, the function assumes that the material is tab separated.
805 If not, lines are split at whitespace into fields. You can use a prefix
806 argument to indicate the minimum number of consecutive spaces required
807 to identify a field separator (default: just one).@*
808 If there is no active region, this command creates an empty Org-mode
809 table. However, it's easier to just start typing, like
810 @kbd{|Name|Phone|Age @key{RET} |- @key{TAB}}.
812 @tsubheading{Re-aligning and field motion}
815 Re-align the table without moving the cursor.
819 Re-align the table, move to the next field. Creates a new row if
824 Re-align, move to previous field.
828 Re-align the table and move down to next row. Creates a new row if
829 necessary. At the beginning or end of a line, @key{RET} still does
830 NEWLINE, so it can be used to split a table.
832 @tsubheading{Column and row editing}
834 @kindex M-@key{right}
837 Move the current column left/right.
839 @kindex M-S-@key{left}
841 Kill the current column.
843 @kindex M-S-@key{right}
844 @item M-S-@key{right}
845 Insert a new column to the left of the cursor position.
851 Move the current row up/down.
855 Kill the current row or horizontal line.
857 @kindex M-S-@key{down}
859 Insert a new row above (with arg: below) the current row.
863 Insert a horizontal line below current row. With prefix arg, the line
864 is created above the current line.
868 Sort the table lines in the region. Point and mark must be in the first
869 and last line to be included, and must be in the column that should be
870 used for sorting. The command prompts for numerical versus
871 alphanumerical sorting.
873 @tsubheading{Regions}
876 Copy a rectangular region from a table to a special clipboard. Point
877 and mark determine edge fields of the rectangle. The process ignores
878 horizontal separator lines.
881 Copy a rectangular region from a table to a special clipboard, and
882 blank all fields in the rectangle. So this is the ``cut'' operation.
885 Paste a rectangular region into a table.
886 The upper right corner ends up in the current field. All involved fields
887 will be overwritten. If the rectangle does not fit into the present table,
888 the table is enlarged as needed. The process ignores horizontal separator
892 Wrap several fields in a column like a paragraph. If there is an active
893 region, and both point and mark are in the same column, the text in the
894 column is wrapped to minimum width for the given number of lines. A
895 prefix ARG may be used to change the number of desired lines. If there
896 is no region, the current field is split at the cursor position and the
897 text fragment to the right of the cursor is prepended to the field one
898 line down. If there is no region, but you specify a prefix ARG, the
899 current field is made blank, and the content is appended to the field
902 @tsubheading{Calculations}
903 @cindex formula, in tables
904 @cindex calculations, in tables
907 Install a new formula for the current column and replace current field
908 with the result of the formula.
912 Install a new formula for the current field, which must be a named
913 field. Evaluate the formula and replace the field content with the
918 Edit all formulas associated with the current table in a separate
923 Recalculate the current row by applying the stored formulas from left
924 to right. When called with a @kbd{C-u} prefix, recalculate the
925 entire table, starting with the first non-header line (i.e. below the
926 first horizontal separator line). For details, see @ref{Table calculations}.
930 Rotate the calculation mark in first column through the states
931 @samp{}, @samp{#}, @samp{*}, @samp{!}, @samp{$}. For the meaning of
932 these marks see @ref{Advanced features}. When there is an active
933 region, change all marks in the region.
937 Which table column is the cursor in? Displays number >0 in echo
940 @cindex region, active
941 @cindex active region
942 @cindex transient-mark-mode
945 Sum the numbers in the current column, or in the rectangle defined by
946 the active region. The result is shown in the echo area and can
947 be inserted with @kbd{C-y}.
951 When current field is empty, copy from first non-empty field above.
952 When not empty, copy current field down to next row and move cursor
953 along with it. Depending on the variable
954 @code{org-table-copy-increment}, integer field values will be
955 incremented during copy. This key is also used by CUA-mode
956 (@pxref{Interaction}).
958 @tsubheading{Miscellaneous}
961 Edit the current field in a separate window. This is useful for fields
962 that are not fully visible (@pxref{Narrow columns}). When called with a
963 @kbd{C-u} prefix, just make the full field visible, so that it can be
966 @kindex C-c @key{TAB}
968 This is an alias for @kbd{C-u C-c `} to make the current field fully
971 @item M-x org-table-import
972 Import a file as a table. The table should be TAB- or whitespace
973 separated. Useful, for example, to import an Excel table or data from a
974 database, because these programs generally can write TAB-separated text
975 files. This command works by inserting the file into the buffer and
976 then converting the region to a table. Any prefix argument is passed on
977 to the converter, which uses it to determine the separator.
979 @item M-x org-table-export
980 Export the table as a TAB-separated file. Useful for data exchange with,
981 for example, Excel or database programs.
985 If you don't like the automatic table editor because it gets in your
986 way on lines which you would like to start with @samp{|}, you can turn
990 (setq org-enable-table-editor nil)
993 @noindent The only table command which then still works is
994 @kbd{C-c C-c} to do a manual re-align.
996 @node Narrow columns, Table calculations, Built-in table editor, Tables
997 @section Narrow columns
998 @cindex narrow columns in tables
1000 The width of columns is automatically determined by the table editor.
1001 Sometimes a single field or a few fields need to carry more text,
1002 leading to inconveniently wide columns. To limit@footnote{This feature
1003 does not work on XEmacs.} the width of a column, one field anywhere in
1004 the column may contain just the string @samp{<N>} where @samp{N} is an
1005 integer specifying the width of the column in characters. The next
1006 re-align will then set the width of this column to no more than this
1010 |---+------------------------------| |---+--------|
1012 | 1 | one | | 1 | one |
1013 | 2 | two | ----\ | 2 | two |
1014 | 3 | This is a long chunk of text | ----/ | 3 | This=> |
1015 | 4 | four | | 4 | four |
1016 |---+------------------------------| |---+--------|
1020 Fields that are wider become clipped and end in the string @samp{=>}.
1021 Note that the full text is still in the buffer, it is only invisible.
1022 To see the full text, hold the mouse over the field - a tooltip window
1023 will show the full content. To edit such a field, use the command
1024 @kbd{C-c `} (that is @kbd{C-c} followed by the backquote). This will
1025 open a new window with the full field. Edit it and finish with @kbd{C-c
1028 When visiting a file containing a table with narrowed columns, the
1029 necessary character hiding has not yet happened, and the table needs to
1030 be aligned before it looks nice. Setting the option
1031 @code{org-startup-align-all-tables} will realign all tables in a file
1032 upon visiting, but also slow down startup. You can also set this option
1033 on a per-file basis with:
1040 @node Table calculations, orgtbl-mode, Narrow columns, Tables
1041 @section Calculations in tables
1042 @cindex calculations, in tables
1043 @cindex spreadsheet capabilities
1044 @cindex @file{calc} package
1046 The table editor makes use of the Emacs @file{calc} package to
1047 implement spreadsheet-like capabilities. Org-mode has two levels of
1048 complexity for table calculations. On the basic level, tables do only
1049 horizontal computations, so a field can be computed from other fields
1050 @emph{in the same row}, and Org-mode assumes that there is only one
1051 formula for each column. This is very efficient to work with and
1052 enough for many tasks. On the complex level, columns and individual
1053 fields can be named for easier referencing in formulas, individual
1054 named fields can have their own formula associated with them, and
1055 recalculation can be automated.
1058 * Formula syntax:: How to write a formula
1059 * Column formulas:: Formulas valid for all fields in a column
1060 * Advanced features:: Field names, parameters and automatic recalc
1061 * Named-field formulas:: Formulas valid in single fields
1062 * Editing/debugging formulas:: Changing a stored formula
1063 * Appetizer:: Taste the power of calc
1066 @node Formula syntax, Column formulas, Table calculations, Table calculations
1067 @subsection Formula syntax
1068 @cindex formula syntax
1069 @cindex syntax, of formulas
1071 A formula can be any algebraic expression understood by the Emacs
1072 @file{calc} package. Note that @file{calc} has the slightly
1073 non-standard convention that @samp{/} has lower precedence than
1074 @samp{*}, so that @samp{a/b*c} is interpreted as @samp{a/(b*c)}. Before
1075 evaluation by @code{calc-eval} (@pxref{Calling Calc from Your
1076 Programs,calc-eval,Calling calc from Your Lisp Programs,calc,GNU Emacs
1077 Calc Manual}), variable substitution takes place:
1080 $ @r{refers to the current field}
1081 $3 @r{refers to the field in column 3 of the current row}
1082 $3..$7 @r{a vector of the fields in columns 3-7 of current row}
1083 $P1..$P3 @r{vector of column range, using column names}
1084 &2 @r{second data field above the current, in same column}
1085 &5-2 @r{vector from fifth to second field above current}
1086 &III-II @r{vector of fields between 2nd and 3rd hline above}
1087 &III @r{vector of fields between third hline above and current field}
1088 $name @r{a named field, parameter or constant}
1091 @cindex vectors, in table calculations
1092 The range vectors can be directly fed into the calc vector functions
1093 like @samp{vmean} and @samp{vsum}.
1095 @cindex name, of column or field
1096 @cindex constants, in calculations
1097 @samp{$name} is interpreted as the name of a column, parameter or
1098 constant. Constants are defined globally through the variable
1099 @code{org-table-formula-constants}. If you have the
1100 @file{constants.el} package, it will also be used to resolve
1101 constants, including natural constants like @samp{$h} for Planck's
1102 constant, and units like @samp{$km} for kilometers. Column names and
1103 parameters can be specified in special table lines. These are
1104 described below, see @ref{Advanced features}.
1106 @cindex format specifier
1107 @cindex mode, for @file{calc}
1108 A formula can contain an optional mode string after a semicolon. This
1109 string consists of flags to influence calc's modes@footnote{By
1110 default, Org-mode uses the standard calc modes (precision 12, angular
1111 units degrees, fraction and symbolic modes off). However, the display
1112 format has been changed to @code{(float 5)} to keep tables compact.
1113 The default settings can be configured using the variable
1114 @code{org-calc-default-modes}.} during execution, e.g. @samp{p20} to
1115 switch the internal precision to 20 digits, @samp{n3}, @samp{s3},
1116 @samp{e2} or @samp{f4} to switch to normal, scientific, engineering,
1117 or fixed display format, respectively, and @samp{D}, @samp{R}, @samp{F},
1118 and @samp{S} to turn on degrees, radians, fraction and symbolic modes,
1119 respectively. In addition, you may provide a @code{printf} format
1120 specifier to reformat the final result. A few examples:
1123 $1+$2 @r{Sum of first and second field}
1124 $1+$2;%.2f @r{Same, format result to two decimals}
1125 exp($2)+exp($1) @r{Math functions can be used}
1126 $;%.1f @r{Reformat current cell to 1 decimal}
1127 ($3-32)*5/9 @r{Degrees F -> C conversion}
1128 $c/$1/$cm @r{Hz -> cm conversion, using @file{constants.el}}
1129 tan($1);Dp3s1 @r{Compute in degrees, precision 3, display SCI 1}
1130 sin($1);Dp3%.1e @r{Same, but use printf specifier for display}
1131 vmean($2..$7) @r{Compute column range mean, using vector function}
1132 vsum(&III) @r{Sum numbers from 3rd hline above, up to here}
1133 taylor($3,x=7,2) @r{taylor series of $3, at x=7, second degree}
1136 @node Column formulas, Advanced features, Formula syntax, Table calculations
1137 @subsection Column formulas
1138 @cindex column formula
1139 @cindex formula, for table column
1141 To apply a formula to a field, type it directly into the field,
1142 preceded by an equal sign, like @samp{=$1+$2}. When you press
1143 @key{TAB} or @key{RET} or @kbd{C-c C-c} with the cursor still in the
1144 field, the formula will be stored as the formula for the current
1145 column, evaluated and the current field replaced with the result. If
1146 the field contains only @samp{=}, the previously stored formula for
1147 this column is used.
1149 For each column, Org-mode will remember the most recently used
1150 formula. The information is stored in a special line starting with
1151 @samp{#+TBLFM} directly below the table. When adding/deleting/moving
1152 columns with the appropriate commands, the stored equations will be
1153 modified accordingly. When a column used in a calculation is removed,
1154 references to this column become invalid and will cause an error upon
1155 applying the equation.
1157 Instead of typing an equation into the field, you may also use the
1158 command @kbd{C-c =}. It prompts for a formula (with default taken
1159 from the @samp{#+TBLFM:} line) and applies it to the current field. A
1160 numerical prefix (e.g. @kbd{C-5 C-c =}) will apply it to that many
1161 subsequent fields in the current column.
1163 @cindex recomputing table fields
1164 To recompute all the fields in a line, use the command @kbd{C-c *}.
1165 It re-applies all stored equations to the current row, from left to
1166 right. With a @kbd{C-u} prefix, this will be done to every line in
1167 the table, so use this command it you want to make sure the entire
1168 table is up-to-date. @kbd{C-u C-c C-c} is another way to update the
1169 entire table. Global updating does not touch the line(s) above the
1170 first horizontal separator line, assuming that this is the table
1173 @node Advanced features, Named-field formulas, Column formulas, Table calculations
1174 @subsection Advanced features
1176 If you want the recalculation of fields to happen automatically,
1177 or if you want to be able to assign a formula to an individual field
1178 (instead of an entire column) you need to reserve the first column of
1179 the table for special marking characters. Here is an example of a
1180 table that collects exam results of students and makes use of these
1185 |---+---------+--------+--------+--------+-------+------|
1186 | | Student | Prob 1 | Prob 2 | Prob 3 | Total | Note |
1187 |---+---------+--------+--------+--------+-------+------|
1188 | ! | | P1 | P2 | P3 | Tot | |
1189 | # | Maximum | 10 | 15 | 25 | 50 | 10.0 |
1190 | ^ | | m1 | m2 | m3 | mt | |
1191 |---+---------+--------+--------+--------+-------+------|
1192 | # | Peter | 10 | 8 | 23 | 41 | 8.2 |
1193 | # | Sara | 6 | 14 | 19 | 39 | 7.8 |
1194 | # | Sam | 2 | 4 | 3 | 9 | 1.8 |
1195 |---+---------+--------+--------+--------+-------+------|
1196 | | Average | | | | 29.7 | |
1197 | ^ | | | | | at | |
1198 | $ | max=50 | | | | | |
1199 |---+---------+--------+--------+--------+-------+------|
1200 #+TBLFM: $6=vsum($P1..$P3)::$7=10*$Tot/$max;%.1f::$at=vmean(&II);%.1f
1204 @noindent @b{Important}: Please note that for these special tables,
1205 recalculating the table with @kbd{C-u C-c *} will only affect rows
1206 which are marked @samp{#} or @samp{*}, and named fields. The column
1207 formulas are not applied in rows with empty first field.
1209 @cindex marking characters, tables
1210 The marking characters have the following meaning:
1213 The fields in this line define names for the columns, so that you may
1214 refer to a column as @samp{$Tot} instead of @samp{$6}.
1216 This row defines names for the fields @emph{above} the row. With such
1217 a definition, any formula in the table may use @samp{$m1} to refer to
1218 the value @samp{10}. Also, named fields can have their own formula
1219 associated with them.
1221 Similar to @samp{^}, but defines names for the fields in the row
1224 Fields in this row can define @emph{parameters} for formulas. For
1225 example, if a field in a @samp{$} row contains @samp{max=50}, then
1226 formulas in this table can refer to the value 50 using @samp{$max}.
1227 Parameters work exactly like constants, only that they can be defined on
1228 a per-table basis. Changing a parameter and then recalculating the
1229 table can be useful.
1231 Fields in this row are automatically recalculated when pressing
1232 @key{TAB} or @key{RET} or @kbd{S-@key{TAB}} in this row. Also, this row
1233 is selected for a global recalculation with @kbd{C-u C-c *}. Unmarked
1234 lines will be left alone by this command.
1236 Selects this line for global recalculation with @kbd{C-u C-c *}, but
1237 not for automatic recalculation. Use this when automatic
1238 recalculation slows down editing too much.
1240 Unmarked lines are exempt from recalculation with @kbd{C-u C-c *}.
1241 All lines that should be recalculated should be marked with @samp{#}
1245 @node Named-field formulas, Editing/debugging formulas, Advanced features, Table calculations
1246 @subsection Named-field formulas
1247 @cindex named field formula
1248 @cindex formula, for named table field
1250 A named field can have its own formula associated with it. In the
1251 example above, this is used for the @samp{at} field that contains
1252 the average result of the students. To enter a formula for a named
1253 field, just type it into the buffer, preceded by @samp{:=}. Or use
1254 @kbd{C-u C-c =}. This equation will be stored below the table like
1255 @samp{$name=...}. Any recalculation in the table (even if only
1256 requested for the current line) will also update all named field
1259 @node Editing/debugging formulas, Appetizer, Named-field formulas, Table calculations
1260 @subsection Editing and debugging formulas
1261 @cindex formula editing
1262 @cindex editing, of table formulas
1264 To edit a column or field formula, use the commands @kbd{C-c
1265 =} and @kbd{C-u C-c =}, respectively. The currently active expression
1266 is then presented as default in the minibuffer, where it may be edited.
1268 Note that making a table field blank does not remove the formula
1269 associated with the field - during the next recalculation the field
1270 will be filled again. To remove a formula from a field, you have to
1271 give an empty reply when prompted for the formula, or to edit the
1272 @samp{#+TBLFM} line.
1275 You may edit the @samp{#+TBLFM} directly and re-apply
1276 the changed equations with @kbd{C-c C-c} in that line, or with the
1277 normal recalculation commands in the table.
1283 In particular for large tables with many formulas, it is convenient to
1284 use the command @kbd{C-c '} to edit the formulas of the current table
1285 in a separate buffer. That buffer will show the formulas one per
1286 line, and you are free to edit, add and remove formulas. Press
1287 @kbd{C-c ?} on a @samp{$...} expression to get information about its
1288 interpretation. Exiting the buffer with @kbd{C-c C-c} only stores the
1289 modified formulas below the table. Exiting with @kbd{C-u C-c C-c}
1290 also applies them to the entire table. @kbd{C-c C-q} exits without
1291 installing the changes.
1293 When the evaluation of a formula leads to an error, the field content
1294 becomes the string @samp{#ERROR}. If you would like see what is going
1295 on during variable substitution and calculation in order to find a
1296 bug, turn on formula debugging in the menu and repeat the calculation,
1297 for example by pressing @kbd{C-c = @key{RET}} in a field.
1298 Detailed information will be displayed.
1300 @node Appetizer, , Editing/debugging formulas, Table calculations
1301 @subsection Appetizer
1303 Finally, just to wet your appetite on what can be done with the fantastic
1304 @file{calc} package, here is a table that computes the Taylor series
1305 for a couple of functions (homework: try that with Excel :-)
1309 |---+-------------+---+-----+--------------------------------------|
1310 | | Func | n | x | Result |
1311 |---+-------------+---+-----+--------------------------------------|
1312 | # | exp(x) | 1 | x | 1 + x |
1313 | # | exp(x) | 2 | x | 1 + x + x^2 / 2 |
1314 | # | exp(x) | 3 | x | 1 + x + x^2 / 2 + x^3 / 6 |
1315 | # | x^2+sqrt(x) | 2 | x=0 | x*(0.5 / 0) + x^2 (2 - 0.25 / 0) / 2 |
1316 | # | x^2+sqrt(x) | 2 | x=1 | 2 + 2.5 x - 2.5 + 0.875 (x - 1)^2 |
1317 | * | tan(x) | 3 | x | 0.0175 x + 1.77e-6 x^3 |
1318 |---+-------------+---+-----+--------------------------------------|
1319 #+TBLFM: $5=taylor($2,$4,$3);n3
1323 @node orgtbl-mode, table.el, Table calculations, Tables
1324 @section The Orgtbl minor mode
1326 @cindex minor mode for tables
1328 If you like the intuitive way the Org-mode table editor works, you
1329 might want to use it also in other modes like text-mode or mail-mode.
1330 The minor mode Orgtbl-mode makes this possible. You can always toggle
1331 the mode with @kbd{M-x orgtbl-mode}. To turn it on by default, for
1332 example in mail mode, use
1335 (add-hook 'mail-mode-hook 'turn-on-orgtbl)
1338 @node table.el, , orgtbl-mode, Tables
1339 @section The @file{table.el} package
1341 @cindex table editor, @file{table.el}
1342 @cindex @file{table.el}
1344 Complex ASCII tables with automatic line wrapping, column- and
1345 row-spanning, and alignment can be created using the Emacs table
1346 package by Takaaki Ota (@uref{http://sourceforge.net/projects/table},
1347 and also part of Emacs 22).
1348 When @key{TAB} or @kbd{C-c C-c} is pressed in such a table, Org-mode
1349 will call @command{table-recognize-table} and move the cursor into the
1350 table. Inside a table, the keymap of Org-mode is inactive. In order
1351 to execute Org-mode-related commands, leave the table.
1356 Recognize @file{table.el} table. Works when the cursor is in a
1361 Insert a table.el table. If there is already a table at point, this
1362 command converts it between the table.el format and the Org-mode
1363 format. See the documentation string of the command
1364 @code{org-convert-table} for the restrictions under which this is
1368 @node Hyperlinks, TODO items, Tables, Top
1372 Just like HMTL, Org-mode provides links inside a file, and external
1373 links to other files, Usenet articles, emails and much more.
1376 * Link format:: How links in Org-mode are formatted
1377 * Internal links:: Links to other places in the current file
1378 * External links:: URL-like links to the world
1379 * Handling links:: Creating, inserting and following
1380 * Search Options:: Linking to a specific location
1381 * Remember:: Org-trees store quick notes
1384 @node Link format, Internal links, Hyperlinks, Hyperlinks
1385 @section Link format
1387 @cindex format, of links
1389 Org-mode will recognize plain URL-like links and activate them as
1390 clickable links. However, the general link format looks like this:
1393 [[link][description]] @r{or alternatively} [[link]]
1396 Once a link in the buffer is complete (all brackets present), Org-mode
1397 will change the display so that @samp{description} is displayed instead
1398 of @samp{[[link][description]]} and @samp{link} is displayed instead of
1399 @samp{[[link]]}. Links will be highlighted in the face @code{org-link},
1400 which by default is an underlined face. You can directly edit the
1401 visible part of a link. Note that this can be either the @samp{link}
1402 part (if there is not description) or the @samp{description} part. To
1403 edit also the invisible @samp{link} part, use @kbd{C-c C-l} with the
1406 If you place the cursor at the beginning or just behind the end of the
1407 displayed text and press @key{BACKSPACE}, you will remove the
1408 (invisible) bracket at that location. This makes the link incomplete
1409 and the internals are again displayed as plain text. Inserting the
1410 missing bracket does hide the link internals again. To show the
1411 internal structure of all links, use the menu entry
1412 @code{Org->Hyperlinks->Literal links}.
1414 @node Internal links, External links, Link format, Hyperlinks
1415 @section Internal links
1416 @cindex internal links
1417 @cindex links, internal
1418 @cindex CamelCase links
1420 If the link does not look like a URL, it is considered to be internal in
1421 the current file. Links such as @samp{[[My Target]]} or @samp{[[My
1422 Target][Find my target]]} lead to a text search in the current file.
1423 The link can be followed with @kbd{C-c C-o} when the cursor is on the
1424 link, or with a mouse click (@pxref{Handling links}). The preferred
1425 match for such a link is a dedicated target: The same string in double
1426 angular brackets. Targets may be located anywhere, often it is
1427 convenient to put them into a comment line, for example
1433 @noindent In HTML export (@pxref{HTML export}), such targets will become
1434 named anchors for direct access through @samp{http} links.
1436 If no dedicated target exists, Org-mode will search for the words in the
1437 link. In the above example the search would be for @samp{my target}.
1438 Links starting with a star like @samp{*My Target} restrict the search to
1439 headlines. When searching, Org-mode will first try an exact match, but
1440 then move on to more and more lenient searches. For example, the link
1441 @samp{[[*My Targets]]} will find any of the following:
1445 ** TODO my targets are bright
1446 ** my 20 targets are
1449 To insert a link targeting a headline, in-buffer completion can be used.
1450 Just type a star followed by a few optional letters into the buffer and
1451 press @kbd{M-@key{TAB}}. All headlines in the current buffer will be
1452 offered as completions. @xref{Handling links}, for more commands
1455 Following a link pushes a mark onto Org-mode's own mark ring. You can
1456 return to the previous position with @kbd{C-c &}. Using this command
1457 several times in direct succession goes back to positions recorded
1461 * Radio targets:: Make targets trigger links in plain text.
1462 * CamelCase links:: Activating CamelCase words as links
1465 @node Radio targets, CamelCase links, Internal links, Internal links
1466 @subsection Radio targets
1468 You can configure Org-mode to link any occurrences of certain target
1469 names in normal text. So without explicitly creating a link, the text
1470 connects to the target radioing its position. Radio targets are
1471 enclosed by triple angular brackets. For example, a target
1472 @samp{<<<My Target>>>} causes each occurrence of @samp{my target} in
1473 normal text to become activated as a link. The Org-mode file is
1474 scanned automatically for radio targets only when the file is first
1475 loaded into Emacs. To update the target list during editing, press
1476 @kbd{C-c C-c} with the cursor on or at a target.
1478 @node CamelCase links, , Radio targets, Internal links
1479 @subsection CamelCase words as links
1480 @cindex completion, of CamelCase links
1481 @cindex CamelCase links, completion of
1483 Org-mode also supports CamelCase words as links. This feature is not
1484 turned on by default because of the inconsistencies this system suffers
1485 from. To activate CamelCase words as links, you need to customize
1486 the option @code{org-activate-links}. A CamelCase word then leads to a
1487 text search such that @samp{CamelCaseLink} is equivalent to
1488 @samp{[[camel case link]]}.
1490 @node External links, Handling links, Internal links, Hyperlinks
1491 @section External links
1492 @cindex links, external
1493 @cindex external links
1494 @cindex links, external
1501 @cindex WANDERLUST links
1503 @cindex USENET links
1506 Org-mode supports links to files, websites, Usenet and email messages;
1507 and BBDB database entries. External links are URL-like locators. The
1508 following list shows examples for each link type.
1511 http://www.astro.uva.nl/~dominik @r{on the web}
1512 file:/home/dominik/images/jupiter.jpg @r{file, absolute path}
1513 file:papers/last.pdf @r{file, relative path}
1514 news:comp.emacs @r{Usenet link}
1515 mailto:adent@@galaxy.net @r{Mail link}
1516 vm:folder @r{VM folder link}
1517 vm:folder#id @r{VM message link}
1518 vm://myself@@some.where.org/folder#id @r{VM on remote machine}
1519 wl:folder @r{WANDERLUST folder link}
1520 wl:folder#id @r{WANDERLUST message link}
1521 mhe:folder @r{MH-E folder link}
1522 mhe:folder#id @r{MH-E message link}
1523 rmail:folder @r{RMAIL folder link}
1524 rmail:folder#id @r{RMAIL message link}
1525 gnus:group @r{GNUS group link}
1526 gnus:group#id @r{GNUS article link}
1527 bbdb:Richard Stallman @r{BBDB link}
1528 shell:ls *.org @r{A shell command}
1531 A link should be enclosed in double brackets and may contain a
1532 descriptive text to be displayed instead of the url (@pxref{Link
1533 format}), for example:
1536 [[http://www.gnu.org/software/emacs/][GNU Emacs]]
1539 @cindex angular brackets, around links
1540 @cindex plain text external links
1541 Org-mode also finds external links in the normal text and activates them
1542 as links. If spaces must be part of the link (for example in
1543 @samp{bbdb:Richard Stallman}) or to remove ambiguities about the end of
1544 the link, enclose them in angular brackets.
1546 @node Handling links, Search Options, External links, Hyperlinks
1547 @section Handling links
1549 Org-mode provides methods to create a link in the correct syntax, to
1550 insert it into an org-mode file, and to follow the link.
1554 @cindex storing links
1556 Store a link to the current location. This is a @emph{global} command
1557 which can be used in any buffer to create a link. The link will be
1558 stored for later insertion into an Org-mode buffer (see below). For
1559 Org-mode files, if there is a @samp{<<target>>} at the cursor, the link
1560 points to the target. Otherwise it points to the current headline. For
1561 VM, RMAIL, WANDERLUST, MH-E, GNUS and BBDB buffers, the link will
1562 indicate to the current article/entry. For W3 and W3M buffers, the link
1563 goes to the current URL. For any other files, the link will point to
1564 the file, with a search string (@pxref{Search Options}) pointing to the
1565 contents of the current line. If there is an active region, the
1566 selected words will form the basis of the search string. The key
1567 binding @kbd{C-c l} is only a suggestion - see @ref{Installation and
1571 @cindex link completion
1572 @cindex completion, of links
1573 @cindex inserting links
1575 Insert a link. This prompts for a link to be inserted into the buffer.
1576 You can just type a link, using text for an internal link, or one of the
1577 link type prefixes mentioned in the examples above. Through completion,
1578 all links stored during the current session can be accessed. The link
1579 will be inserted into the buffer, along with a descriptive text. Note
1580 that you don't have to use this command to insert a link. Links in
1581 Org-mode are plain text, and you can type or paste them straight into
1582 the buffer. By using this command, the links are automatically enclosed
1583 in double brackets, and you will be asked for the optional descriptive
1587 @cindex file name completion
1588 @cindex completion, of file names
1590 When @kbd{C-c C-l} is called with a @kbd{C-u} prefix argument, a link to
1591 a file will be inserted and you may use file name completion to select
1592 the name of the file. The path to the file is inserted relative to the
1593 directory of the current org file, if the linked file is in the current
1594 directory or in a subdirectory of it, or if the path is written relative
1595 to the current directory using @samp{../}. Otherwise an absolute path
1596 is used, if possible with @samp{~/} for your home directory. You can
1597 force an absolute path with two @kbd{C-u} prefixes.
1599 @item C-c C-l @r{with cursor on existing link}
1600 When the cursor is on an existing link, @kbd{C-c C-l} allows to edit the
1601 link and description parts of the link.
1603 @cindex following links
1606 Open link at point. This will launch a web browser for URLs (using
1607 @command{browse-url-at-point}), run vm/mh-e/wanderlust/rmail/gnus/bbdb
1608 for the corresponding links, and execute the command in a shell link.
1609 When the cursor is on an internal link, this commands runs the
1610 corresponding search. When the cursor is on a TAGS list in a headline,
1611 it creates the corresponding TAGS view. If the cursor is on a time
1612 stamp, it compiles the agenda for that date. Furthermore, it will visit
1613 text files in @samp{file:} links with Emacs and select a suitable
1614 application for non-text files. Classification of files is based on
1615 file extension only. See option @code{org-file-apps}. If you want to
1616 override the default application and visit the file with Emacs, use a
1623 On links, @kbd{mouse-2} will open the link just like @kbd{C-c C-o}
1624 would. Under Emacs 22, also @kbd{mouse-1} will follow a link.
1628 Like @kbd{mouse-2}, but force file links to be opened with Emacs.
1633 Push the current position onto the mark ring, to be able to return
1634 easily. Commands following an internal link do this automatically.
1636 @cindex links, returning to
1639 Jump back to a recorded position. A position is recorded by the
1640 commands following internal links, and by @kbd{C-c %}. Using this
1641 command several times in direct succession moves through a ring of
1642 previously recorded positions.
1646 @node Search Options, Remember, Handling links, Hyperlinks
1647 @section Search options in file links
1648 @cindex search option in file links
1649 @cindex file links, searching
1651 File links can contain additional information to make Emacs jump to a
1652 particular location in the file when following a link. This can be a
1653 line number or a search option after a double@footnote{For backward
1654 compatibility, line numbers can also follow a single colon.} colon.
1658 [[file:~/code/main.c::255]]
1659 [[file:~/xx.org::My Target]]
1660 [[file:~/xx.org::*My Target]]
1661 [[file:~/xx.org::/regexp/]]
1664 @noindent Here is what these options do.
1670 Search for a link target @samp{<<My Target>>}, or do a text search for
1671 @samp{my target}, similar to the search in internal links, see
1672 @ref{Internal links}. In HTML export (@pxref{HTML export}), such a file
1673 link will become an html reference to the corresponding named anchor in
1676 In an Org-mode file, restrict search to headlines.
1678 Do a regular expression search for @code{regexp}. This uses the Emacs
1679 command @code{occur} to list all matches in a separate window. If the
1680 target file is in Org-mode, @code{org-occur} is used to create a
1681 sparse tree with the matches.
1682 @c If the target file is a directory,
1683 @c @code{grep} will be used to search all files in the directory.
1686 As a degenerate case, a file link with an empty file name can be used
1687 to search the current file. For example, @code{<file:::find me>} does
1688 a search for @samp{find me} in the current file, just like
1689 @samp{[[find me]]} would.
1691 @node Remember, , Search Options, Hyperlinks
1693 @cindex @file{remember.el}
1695 Another way to create org entries with links to other files is through
1696 the @emph{Remember} package by John Wiegley. @emph{Remember} lets you
1697 store quick notes with little interruption of your work flow. See
1698 @uref{http://www.emacswiki.org/cgi-bin/wiki/RememberMode} for more
1699 information. The notes produced by @emph{Remember} can be stored in
1700 different ways, and Org-mode files are a good target. Org-mode allows
1701 to file away notes either to a default file, or directly to the
1702 correct location in your Org-mode outline tree. The following
1703 customization@footnote{The three autoload forms are only necessary if
1704 @file{org.el} is not part of the Emacs distribution or an XEmacs
1705 package.} will tell @emph{Remember} to use org files as target, and to
1706 create annotations compatible with Org-mode links.
1709 (setq org-directory "~/path/to/my/orgfiles/")
1710 (setq org-default-notes-file "~/.notes")
1711 (autoload 'org-remember-annotation "org")
1712 (autoload 'org-remember-apply-template "org")
1713 (autoload 'org-remember-handler "org")
1714 (setq remember-annotation-functions '(org-remember-annotation))
1715 (setq remember-handler-functions '(org-remember-handler))
1716 (add-hook 'remember-mode-hook 'org-remember-apply-template)
1719 @cindex templates, for remember
1720 In combination with Org-mode, you can use templates to generate
1721 different types of remember notes. For example, if you would like to
1722 use one template to create general TODO entries, and another one for
1723 journal entries, you could use:
1726 (setq org-remember-templates
1727 '((?t "* TODO %?\n %i\n %a" "~/org/TODO.org")
1728 (?j "* %U %?\n\n %i\n %a" "~/org/JOURNAL.org")))
1731 @noindent In these entries, the character specifies how to select the
1732 template, the first string specifies the template, and the (optional)
1733 second string specifies a default file (overruling
1734 @code{org-default-notes-file}) as a target for this note.
1736 When you call @kbd{M-x remember} to remember something, org will prompt
1737 for a key to select the template and then prepare the buffer like
1740 <file:link to where you called remember>
1746 * [2006-03-21 Tue 15:37]
1748 <file:link to where you called remember>
1751 @noindent See the variable @code{org-remember-templates} for more details.
1753 When you are finished composing a note with remember, you have to press
1754 @kbd{C-c C-c} to file the note away. The handler first prompts for a
1755 target file - if you press @key{RET}, the value of
1756 @code{org-default-notes-file} is used. Then the command offers the
1757 headings tree of the selected file. You can either immediately press
1758 @key{RET} to get the note appended to the file. Or you can use vertical
1759 cursor motion (@key{up} and @key{down}) and visibility cycling
1760 (@key{TAB}) to find a better place. Pressing @key{RET} or @key{left} or
1761 @key{right} leads to the following result.
1763 @multitable @columnfractions 0.2 0.1 0.7
1764 @item @b{Cursor position} @tab @b{Key} @tab @b{Note gets inserted}
1765 @item buffer-start @tab @key{RET} @tab as level 2 heading at end of file
1766 @item on headline @tab @key{RET} @tab as sublevel of the heading at cursor
1767 @item @tab @key{left} @tab as same level, before current heading
1768 @item @tab @key{right} @tab as same level, after current heading
1769 @item not on headline @tab @key{RET}
1770 @tab at cursor position, level taken from context.
1771 Or use prefix arg to specify level manually.
1774 So a fast way to store the note is to press @kbd{C-c C-c @key{RET}
1775 @key{RET}} to append it to the default file. Even shorter would be
1776 @kbd{C-u C-c C-c}, which does the same without even showing the tree.
1777 But with little extra effort, you can push it directly to the correct
1780 Before inserting the text into a tree, the function ensures that the
1781 text has a headline, i.e. a first line that starts with a @samp{*}.
1782 If not, a headline is constructed from the current date and some
1783 additional data. If the variable @code{org-adapt-indentation} is
1784 non-nil, the entire text is also indented so that it starts in the
1785 same column as the headline (after the asterisks).
1788 @node TODO items, Timestamps, Hyperlinks, Top
1792 Org-mode does not maintain TODO lists as a separate document. TODO
1793 items are an integral part of the notes file, because TODO items
1794 usually come up while taking notes! With Org-mode, you simply mark
1795 any entry in a tree as being a TODO item. In this way, the
1796 information is not duplicated, and the entire context from which the
1797 item emerged is always present when you check.
1799 Of course, this technique causes TODO items to be scattered throughout
1800 your file. Org-mode provides methods to give you an overview over all
1801 things you have to do.
1804 * TODO basics:: Marking and displaying TODO entries
1805 * Progress logging:: Document your productivity
1806 * TODO extensions:: Workflow and assignments
1807 * Priorities:: Some things are more important than others
1810 @node TODO basics, Progress logging, TODO items, TODO items
1811 @section Basic TODO functionality
1813 Any headline can become a TODO item by starting it with the word TODO,
1817 *** TODO Write letter to Sam Fortune
1821 The most important commands to work with TODO entries are:
1825 @cindex cycling, of TODO states
1827 Rotate the TODO state of the current item between
1830 ,-> (unmarked) -> TODO -> DONE --.
1831 '--------------------------------'
1834 The same rotation can also be done ``remotely'' from the timeline and
1835 agenda buffers with the @kbd{t} command key (@pxref{Agenda commands}).
1837 @cindex sparse tree, for TODO
1839 View TODO items in a @emph{sparse tree} (@pxref{Sparse trees}). Folds
1840 the entire buffer, but shows all TODO items and the headings hierarchy
1841 above them. With prefix arg, show also the DONE entries. With
1842 numerical prefix N, show the tree for the Nth keyword in the variable
1843 @code{org-todo-keywords}.
1846 Show the global TODO list. This collects the TODO items from all
1847 agenda files (@pxref{Agenda views}) into a single buffer. The buffer is in
1848 @code{agenda-mode}, so there are commands to examine and manipulate
1849 the TODO entries directly from that buffer (@pxref{Agenda commands}).
1850 @xref{Global TODO list}, for more information.
1851 @c @item @code{org-agenda-include-all-todo}
1852 @c If you would like to have all your TODO items listed as part of your
1853 @c agenda, customize the variable @code{org-agenda-include-all-todo}.
1856 @node Progress logging, TODO extensions, TODO basics, TODO items
1857 @section Progress Logging
1858 @cindex progress logging
1859 @cindex logging, of progress
1860 If you want to keep track of @emph{when} a certain TODO item was
1861 finished, turn on logging with
1864 (setq org-log-done t)
1868 Then each time you turn a TODO entry into DONE using either @kbd{C-c
1869 C-t} in the Org-mode buffer or @kbd{t} in the agenda buffer, a line
1870 @samp{CLOSED: [timestamp]} will be inserted just after the headline.
1871 If you turn the entry back into a TODO item again through further
1872 state cycling, that line will be removed again. In the timeline
1873 (@pxref{Timeline}) and in the agenda (@pxref{Weekly/Daily agenda}),
1874 you can then use the @kbd{L} key to display the TODO items closed on
1875 each day, giving you an overview of what has been done on a day.
1877 @node TODO extensions, Priorities, Progress logging, TODO items
1878 @section Extended use of TODO keywords
1879 @cindex extended TODO keywords
1881 The default implementation of TODO entries is just two states: TODO and
1882 DONE. You can, however, use the TODO feature for more complicated
1883 things by configuring the variables @code{org-todo-keywords} and
1884 @code{org-todo-interpretation}. Using special setup, you can even use
1885 TODO keywords in different ways in different org files.
1887 Note that @i{tags} are another way to classify headlines in general and
1888 TODO items in particular (@pxref{Tags}).
1891 * Workflow states:: From TODO to DONE in steps
1892 * TODO types:: I do this, Fred the rest
1893 * Per file keywords:: Different files, different requirements
1896 @node Workflow states, TODO types, TODO extensions, TODO extensions
1897 @subsection TODO keywords as workflow states
1898 @cindex TODO workflow
1899 @cindex workflow states as TODO keywords
1901 You can use TODO keywords to indicate different states in the process
1902 of working on an item, for example:
1905 (setq org-todo-keywords '("TODO" "FEEDBACK" "VERIFY" "DONE")
1906 org-todo-interpretation 'sequence)
1909 @cindex completion, of TODO keywords
1910 Changing these variables becomes only effective in a new Emacs session.
1911 With this setup, the command @kbd{C-c C-t} will cycle an entry from
1912 TODO to FEEDBACK, then to VERIFY, and finally to DONE. You may also
1913 use a prefix argument to quickly select a specific state. For example
1914 @kbd{C-3 C-c C-t} will change the state immediately to VERIFY.
1915 If you define many keywords, you can use in-buffer completion (see
1916 @ref{Completion}) to insert these words into the buffer.
1918 @node TODO types, Per file keywords, Workflow states, TODO extensions
1919 @subsection TODO keywords as types
1921 @cindex names as TODO keywords
1922 @cindex types as TODO keywords
1924 The second possibility is to use TODO keywords to indicate different
1925 types of action items. For example, you might want to indicate that
1926 items are for ``work'' or ``home''. If you are into David Allen's
1927 @emph{Getting Things DONE}, you might want to use todo types
1928 @samp{NEXTACTION}, @samp{WAITING}, @samp{MAYBE}. Or, when you work
1929 with several people on a single project, you might want to assign
1930 action items directly to persons, by using their names as TODO
1931 keywords. This would be set up like this:
1934 (setq org-todo-keywords '("Fred" "Sara" "Lucy" "Mike" "DONE")
1935 org-todo-interpretation 'type)
1938 In this case, different keywords do not indicate a sequence, but
1939 rather different types. So it is normally not useful to change from
1940 one type to another. Therefore, in this case the behavior of the
1941 command @kbd{C-c C-t} is changed slightly@footnote{This is also true
1942 for the @kbd{t} command in the timeline and agenda buffers.}. When
1943 used several times in succession, it will still cycle through all
1944 names. But when you return to the item after some time and execute
1945 @kbd{C-c C-t} again, it will switch from each name directly to DONE.
1946 Use prefix arguments or completion to quickly select a specific name.
1947 You can also review the items of a specific TODO type in a sparse tree
1948 by using a numeric prefix to @kbd{C-c C-v}. For example, to see all
1949 things Lucy has to do, you would use @kbd{C-3 C-c C-v}. To collect
1950 Lucy's items from all agenda files into a single buffer, you
1951 would use the prefix arg as well when creating the global todo list:
1954 @node Per file keywords, , TODO types, TODO extensions
1955 @subsection Setting up TODO keywords for individual files
1956 @cindex keyword options
1957 @cindex per file keywords
1959 It can be very useful to use different aspects of the TODO mechanism
1960 in different files, which is not possible with the global settings
1961 described above. For file-local settings, you need to add special
1962 lines to the file which set the keywords and interpretation for that
1963 file only. For example, to set one of the two examples discussed
1964 above, you need one of the following lines, starting in column zero
1965 anywhere in the file:
1968 #+SEQ_TODO: TODO FEEDBACK VERIFY DONE
1969 #+TYP_TODO: Fred Sara Lucy Mike DONE
1972 @cindex Completion, of option keywords
1974 @noindent To make sure you are using the correct keyword, type
1975 @samp{#+} into the buffer and then use @kbd{M-@key{TAB}} completion.
1977 @cindex DONE, final TODO keyword
1978 Remember that the last keyword must always mean that the item is DONE
1979 (you may use a different word, though). Also note that in each file,
1980 only one of the two aspects of TODO keywords can be used. After
1981 changing one of these lines, use @kbd{C-c C-c} with the cursor still
1982 in the line to make the changes known to Org-mode@footnote{Org-mode
1983 parses these lines only when Org-mode is activated after visiting a
1984 file. @kbd{C-c C-c} with the cursor in a line starting with @samp{#+}
1985 is simply restarting Org-mode, making sure that these changes will be
1988 If you want to use very many keywords, for example when working with a
1989 large group of people, you may split the names over several lines:
1992 #+TYP_TODO: Fred Sara Lucy Mike
1993 #+TYP_TODO: Luis George Jules Jessica
1994 #+TYP_TODO: Kim Arnold Peter
1998 @node Priorities, , TODO extensions, TODO items
2002 If you use Org-mode extensively to organize your work, you may end up
2003 with a number of TODO entries so large that you'd like to prioritize
2004 them. This can be done by placing a @emph{priority cookie} into the
2008 *** TODO [#A] Write letter to Sam Fortune
2012 With its standard setup, Org-mode supports priorities @samp{A},
2013 @samp{B}, and @samp{C}. @samp{A} is the highest priority. An entry
2014 without a cookie is treated as priority @samp{B}. Priorities make a
2015 difference only in the agenda (@pxref{Weekly/Daily agenda}).
2020 Set the priority of the current item. The command prompts for a
2021 priority character @samp{A}, @samp{B} or @samp{C}. When you press
2022 @key{SPC} instead, the priority cookie is removed from the headline.
2023 The priorities can also be changed ``remotely'' from the timeline and
2024 agenda buffer with the @kbd{,} command (@pxref{Agenda commands}).
2027 @kindex S-@key{down}
2030 Increase/decrease priority of current item. Note that these keys are
2031 also used to modify time stamps (@pxref{Creating timestamps}).
2032 Furthermore, these keys are also used by CUA-mode
2033 (@pxref{Interaction}).
2036 @node Timestamps, Tags, TODO items, Top
2039 Items can be labeled with timestamps to make them useful for project
2043 * Time stamps:: Assigning a time to a tree entry
2044 * Creating timestamps:: Commands which insert timestamps
2048 @node Time stamps, Creating timestamps, Timestamps, Timestamps
2049 @section Time stamps, deadlines and scheduling
2051 @cindex ranges, time
2056 A time stamp is a specification of a date (possibly with time) in a
2057 special format, either @samp{<2003-09-16 Tue>} or @samp{<2003-09-16
2058 Tue 09:39>}. A time stamp can appear anywhere in the headline or body
2059 of an org-tree entry. Its presence allows entries to be shown on specific
2060 dates in the agenda (@pxref{Weekly/Daily agenda}). We distinguish:
2065 A simple time stamp just assigns a date/time to an item. This is just
2066 like writing down an appointment in a paper agenda, or like writing down
2067 an event in a diary, when you want to take not of when something
2068 happened. In the timeline and agenda displays, the headline of an entry
2069 associated with a plain time stamp will be shown exactly on that date.
2073 Two time stamps connected by @samp{--} denote a time range. The
2074 headline will be shown on the first and last day of the range, and on
2075 any dates that are displayed and fall in the range. Here is an
2079 ** Meeting in Amsterdam
2080 <2004-08-23 Mon>--<2004-08-26 Thu>
2084 @cindex SCHEDULED keyword
2085 If a time stamp is preceded by the word @samp{SCHEDULED:}, it means you
2086 are planning to start working on that task on the given date. So this is
2087 not about recording an event, but about planning your work. The
2088 headline will be listed under the given date. In addition, a reminder
2089 that the scheduled date has passed will be present in the compilation
2090 for @emph{today}, until the entry is marked DONE. I.e., the task will
2091 automatically be forwarded until completed.
2094 *** TODO Call Trillian for a date on New Years Eve.
2095 SCHEDULED: <2004-12-25 Sat>
2099 @cindex DEADLINE keyword
2100 If a time stamp is preceded by the word @samp{DEADLINE:}, the task
2101 (most likely a TODO item) is supposed to be finished on that date, and
2102 it will be listed then. In addition, the compilation for @emph{today}
2103 will carry a warning about the approaching or missed deadline,
2104 starting @code{org-deadline-warning-days} before the due date, and
2105 continuing until the entry is marked DONE. An example:
2108 *** TODO write article about the Earth for the Guide
2109 The editor in charge is <bbdb:Ford Prefect>
2110 DEADLINE: <2004-02-29 Sun>
2114 @node Creating timestamps, , Time stamps, Timestamps
2115 @section Creating timestamps
2116 @cindex creating timestamps
2117 @cindex timestamps, creating
2119 For Org-mode to recognize time stamps, they need to be in the specific
2120 format. All commands listed below produce time stamps in the correct
2126 Prompt for a date and insert a corresponding time stamp. When the
2127 cursor is at a previously used time stamp, it is updated to NOW. When
2128 this command is used twice in succession, a time range is inserted.
2132 Like @kbd{C-c .}, but use the alternative format which contains date
2133 and time. The default time can be rounded to multiples of 5 minutes,
2134 see the option @code{org-time-stamp-rounding-minutes}.
2138 Like @kbd{C-c .}, but insert an inactive time stamp not triggering the
2143 Insert a time stamp corresponding to the cursor date in the Calendar.
2147 Access the Emacs calendar for the current date. If there is a
2148 timestamp in the current line, goto the corresponding date
2153 Access the agenda for the date given by the time stamp at point
2154 (@pxref{Weekly/Daily agenda}).
2158 Insert @samp{DEADLINE} keyword along with a stamp.
2160 @cindex sparse tree, for deadlines
2162 Create a sparse tree with all deadlines that are either past-due, or
2163 which will become due within @code{org-deadline-warning-days}.
2164 With @kbd{C-u} prefix, show all deadlines in the file. With a numeric
2165 prefix, check that many days. For example, @kbd{C-1 C-c C-w} shows
2166 all deadlines due tomorrow.
2170 Insert @samp{SCHEDULED} keyword along with a stamp.
2172 @kindex S-@key{left}
2173 @kindex S-@key{right}
2175 @itemx S-@key{right}
2176 Change date at cursor by one day. These key bindings conflict with
2177 CUA-mode (@pxref{Interaction}).
2180 @kindex S-@key{down}
2183 Change the item under the cursor in a timestamp. The cursor can be on
2184 a year, month, day, hour or minute. Note that if the cursor is not at
2185 a time stamp, these same keys modify the priority of an item.
2186 (@pxref{Priorities}). The key bindings also conflict with CUA-mode
2187 (@pxref{Interaction}).
2191 @cindex evaluate time range
2193 Evaluate a time range by computing the difference between start and
2194 end. With prefix arg, insert result after the time range (in a table:
2195 into the following column).
2198 @cindex date, reading in minibuffer
2199 @cindex time, reading in minibuffer
2200 @cindex calendar, for selecting date
2201 When Org-mode prompts for a date/time, the function reading your input
2202 will replace anything you choose not to specify with the current date
2203 and time. For details, see the documentation string of
2204 @command{org-read-date}. Also, a calender will pop up to allow
2205 selecting a date. The calendar can be fully controlled from the
2206 minibuffer, and a date can be selected with the following commands:
2211 Scroll calendar backwards by one month.
2214 Scroll calendar forwards by one month.
2217 Select date by clicking on it.
2218 @kindex S-@key{right}
2221 @kindex S-@key{left}
2224 @kindex S-@key{down}
2230 @kindex M-S-@key{right}
2231 @item M-S-@key{right}
2233 @kindex M-S-@key{left}
2234 @item M-S-@key{left}
2238 Choose date in calendar (only if nothing typed into minibuffer).
2241 @node Tags, Agenda views, Timestamps, Top
2244 @cindex headline tagging
2245 @cindex matching, tags
2246 @cindex sparse tree, tag based
2248 If you wish to implement a system to cross-correlate information, an
2249 excellent way is to assign @i{tags} to headline. Org-mode has
2250 extensive support for using tags.
2252 Every headline can contain a list of tags, at the end of the headline.
2253 Tags are normal words containing letters, numbers, @samp{_}, and
2254 @samp{@@}. Tags must be preceded and followed by a single colon; like
2255 @samp{:WORK:}. Several tags can be specified like @samp{:WORK:URGENT:}.
2258 * Tag inheritance:: Tags use the tree structure of the outline
2259 * Setting tags:: How to assign tags to a headline
2260 * Tag searches:: Searching for combinations of tags
2263 @node Tag inheritance, Setting tags, Tags, Tags
2264 @section Tag inheritance
2265 @cindex inheritance, of tags
2267 @i{Tags} make use of the hierarchical structure of outline trees. If a
2268 heading has a certain tag, all subheadings will inherit the tag as
2269 well. For example, in the list
2272 * Meeting with the French group :WORK:
2273 ** Summary by Frank :BOSS:NOTES:
2274 *** TODO Prepare slides for him :ACTION:
2278 the final heading will have the tags @samp{:WORK:}, @samp{:BOSS:},
2279 @samp{:NOTES:}, and @samp{:ACTION:}. When executing tag searches and
2280 Org-mode finds that a certain headline matches the search criterion, it
2281 will not check any sublevel headline, assuming that these likely also
2282 match, and that the list of matches can become very long. However, this
2283 may not be what you want, and you can influence inheritance and
2284 searching using the variables @code{org-use-tag-inheritance} and
2285 @code{org-tags-match-list-sublevels}.
2287 @node Setting tags, Tag searches, Tag inheritance, Tags
2288 @section Setting tags
2289 @cindex setting tags
2292 As Org-mode deals with plain text files, tags can simply be typed into
2293 the buffer. After a colon, @kbd{M-@key{TAB}} offers completion on all
2294 tags being used in the current buffer. There is also a special command
2300 @cindex completion, of tags
2301 Enter new tags for the current headline. The minibuffer will prompt for
2302 a list of tags and offer completion with respect to all other tags used
2303 in the current buffer. Several tags, separated by colons, may be
2304 specified at the prompt. After pressing @key{RET}, the tags will be
2305 inserted and aligned to @code{org-tags-column}. When called with a
2306 @kbd{C-u} prefix, all tags in the current buffer will be aligned to that
2307 column, just to make things look nice. TAGS are automatically realigned
2308 after promotion, demotion, and TODO state changes (@pxref{TODO basics}).
2311 @node Tag searches, , Setting tags, Tags
2312 @section Tag searches
2313 @cindex tag searches
2315 Once a tags system has been set up, it can be used to collect related
2316 information into special lists.
2321 Create a sparse tree with all headlines matching a tags search.
2324 Create a global list of tag matches from all agenda files.
2325 @xref{Matching headline tags}.
2328 Create a global list of tag matches from all agenda files, but check
2329 only TODO items and force checking subitems (see variable
2330 @code{org-tags-match-list-sublevels}).
2333 A @i{tags} search string can use Boolean operators @samp{&} for AND and
2334 @samp{|} for OR. @samp{&} binds more strongly than @samp{|}.
2335 Parenthesis are currently not implemented. A tag may also be preceded
2336 by @samp{-}, to select against it, and @samp{+} is syntactic sugar for
2337 positive selection. The AND operator @samp{&} is optional when @samp{+}
2338 or @samp{-} is present. For example, @samp{+WORK-BOSS} would select all
2339 headlines that are tagged @samp{:WORK:}, but discard those also tagged
2340 @samp{:BOSS:}. The search string @samp{WORK|LAPTOP} selects all lines
2341 tagged @samp{:WORK:} or @samp{:LAPTOP:}. The string
2342 @samp{WORK|LAPTOP&NIGHT} requires that the @samp{:LAPTOP:} lines are
2343 also tagged @samp{NIGHT}.
2345 @node Agenda views, Exporting, Tags, Top
2346 @chapter Agenda Views
2347 @cindex agenda views
2349 Due to the way Org-mode works, TODO items, time-stamped items, and
2350 tagged headlines can be scattered throughout a file or even a number of
2351 files. To get an overview over open action items, or over events that
2352 are important for a particular date, this information must be collected,
2353 sorted and displayed in an organized way.
2355 Org-mode can select items based on various criteria, and display them
2356 in a separate buffer. Three different views are provided:
2360 an @emph{agenda} that is like a calendar and shows information
2363 a @emph{TODO list} that covers all unfinished
2366 a @emph{tags view} that shows information based on
2367 the tags associated with headlines in the outline tree.
2371 The extracted information is displayed in a special @emph{agenda
2372 buffer}. This buffer is read-only, but provides commands to visit the
2373 corresponding locations in the original Org-mode files, and even to
2374 edit these files remotely.
2377 * Agenda files:: Files being searched for agenda information
2378 * Agenda dispatcher:: Keyboard access to agenda views
2379 * Weekly/Daily agenda:: The calendar page with current tasks
2380 * Global TODO list:: All unfinished action items
2381 * Matching headline tags:: Structured information with fine-tuned search
2382 * Timeline:: Time-sorted view for single file
2383 * Agenda commands:: Remote editing of org trees
2386 @node Agenda files, Agenda dispatcher, Agenda views, Agenda views
2387 @section Agenda files
2389 The information to be shown is collected from all @emph{agenda files},
2390 the files listed in the variable @code{org-agenda-files}@footnote{If the
2391 value of that variable is not a list, but a single file name, then the
2392 list of agenda files will be maintained in that external file.}. Thus even
2393 if you only work with a single Org-mode file, this file should be put
2394 into that list@footnote{When using the dispatcher pressing @kbd{1}
2395 before selecting a command will actually limit the command to the
2396 current file, and ignore @code{org-agenda-files} until the next
2397 dispatcher command.}. You can customize @code{org-agenda-files}, but
2398 the easiest way to maintain it is through the following commands
2400 @cindex files, adding to agenda list
2404 Add current file to the list of agenda files. The file is added to
2405 the front of the list. If it was already in the list, it is moved to
2406 the front. With prefix arg, file is added/moved to the end.
2409 Remove current file from the list of agenda files.
2412 Cycle through agenda file list, visiting one file after the other.
2416 The Org menu contains the current list of files and can be used
2417 to visit any of them.
2419 @node Agenda dispatcher, Weekly/Daily agenda, Agenda files, Agenda views
2420 @section The agenda dispatcher
2421 @cindex agenda dispatcher
2422 @cindex dispatching agenda commands
2423 @cindex custom agenda commands
2424 @cindex agenda commands, custom
2425 The views are created through a dispatcher that should be bound to a
2426 global key, for example @kbd{C-c a} (@pxref{Installation and
2427 activation}). In the following we will assume that @kbd{C-c a} is
2428 indeed how the dispatcher is accessed and list keyboard access to
2429 commands accordingly. After pressing @kbd{C-c a}, an additional
2430 letter is required to execute a command. The dispatcher offers the
2431 following default commands:
2434 Create the calendar-like agenda (@pxref{Weekly/Daily agenda}).
2436 Create a list of all TODO items (@pxref{Global TODO list}).
2438 Create a list of headlines matching a TAGS expression (@pxref{Matching
2442 You can also define custom commands that will be accessible through
2443 the dispatcher, just like the default commands. Custom commands are
2444 global searches for tags and specific TODO keywords, or a variety of
2445 sparse tree creating commands (@pxref{Sparse trees}). As sparse trees
2446 are only defined for a single org-mode file, these latter commands act
2447 on the current buffer instead of the list of agenda files.
2450 Custom commands are configured in the variable
2451 @code{org-agenda-custom-commands}. You can customize this variable,
2452 for example by pressing @kbd{C-c a C}. You can also directly set it
2453 with Emacs Lisp in @file{.emacs}. For example:
2456 (setq org-agenda-custom-commands
2457 '(("w" todo "WAITING")
2458 ("u" tags "+BOSS-URGENT")
2459 ("U" tags-tree "+BOSS-URGENT")
2460 ("f" occur-tree "\\<FIXME\\>")))
2463 @noindent will define @kbd{C-c a w} as a global search for
2464 TODO entries with @samp{WAITING} as the TODO keyword, @kbd{C-c a u} as a
2465 global tags search for headlines marked @samp{:BOSS:} but not
2466 @samp{:URGENT:}, @kbd{C-c a U} to do the same search but only in the
2467 current buffer and display the result as a sparse tree, and @kbd{C-c a
2468 f} to create a sparse tree with all entries containing the word
2469 @samp{FIXME}. For more information, look at the documentation string
2470 of the variable @code{org-agenda-custom-commands}.
2472 @node Weekly/Daily agenda, Global TODO list, Agenda dispatcher, Agenda views
2473 @section The weekly/daily agenda
2476 The purpose of the weekly/daily @emph{agenda} is to act like a page of
2477 a paper agenda, showing all the tasks for the current week or day.
2480 @cindex org-agenda, command
2483 Compile an agenda for the current week from a list of org files. The
2484 agenda shows the entries for each day. With a @kbd{C-u} prefix (or
2485 when the variable @code{org-agenda-include-all-todo} is @code{t}), all
2486 unfinished TODO items (including those without a date) are also listed at
2487 the beginning of the buffer, before the first date.@*
2490 Remote editing from the agenda buffer means, for example, that you can
2491 change the dates of deadlines and appointments from the agenda buffer.
2492 The commands available in the Agenda buffer are listed in @ref{Agenda
2496 * Categories:: Not all tasks are equal
2497 * Time-of-day specifications:: How the agenda knows the time
2498 * Calendar/Diary integration:: Integrating Anniversaries and more
2499 * Sorting of agenda items:: The order of things
2502 @node Categories, Time-of-day specifications, Weekly/Daily agenda, Weekly/Daily agenda
2503 @subsection Categories
2506 In the agenda buffer, each entry is preceded by a @emph{category},
2507 which is derived from the file name. The category can also be set
2508 with a special line anywhere in the buffer, looking like this:
2514 If there are several such lines in a file, each specifies the category
2515 for the text below it (but the first category also applies to any text
2516 before the first CATEGORY line). The display in the agenda buffer looks
2517 best if the category is not longer than 10 characters.
2519 @node Time-of-day specifications, Calendar/Diary integration, Categories, Weekly/Daily agenda
2520 @subsection Time-of-Day Specifications
2522 Org-mode checks each agenda item for a time-of-day specification. The
2523 time can be part of the time stamp that triggered inclusion into the
2524 agenda, for example as in @w{@samp{<2005-05-10 Tue 19:00>}}. Time
2525 ranges can be specified with two time stamps, like
2527 @w{@samp{<2005-05-10 Tue 20:30>--<2005-05-10 Tue 22:15>}}.
2529 In the headline of the entry itself, a time(range) may also appear as
2530 plain text (like @samp{12:45} or a @samp{8:30-1pm}. If the agenda
2531 integrates the Emacs diary (@pxref{Calendar/Diary integration}), time
2532 specifications in diary entries are recognized as well.
2534 For agenda display, Org-mode extracts the time and displays it in a
2535 standard 24 hour format as part of the prefix. The example times in
2536 the previous paragraphs would end up in the agenda like this:
2539 8:30-13:00 Arthur Dent lies in front of the bulldozer
2540 12:45...... Ford Prefect arrives and takes Arthur to the pub
2541 19:00...... The Vogon reads his poem
2542 20:30-22:15 Marwin escorts the Hitchhikers to the bridge
2545 If the agenda is in single-day mode, or for the display of today, the
2546 timed entries are embedded in a time grid, like
2549 8:00...... ------------------
2550 8:30-13:00 Arthur Dent lies in front of the bulldozer
2551 10:00...... ------------------
2552 12:00...... ------------------
2553 12:45...... Ford Prefect arrives and takes Arthur to the pub
2554 14:00...... ------------------
2555 16:00...... ------------------
2556 18:00...... ------------------
2557 19:00...... The Vogon reads his poem
2558 20:00...... ------------------
2559 20:30-22:15 Marwin escorts the Hitchhikers to the bridge
2562 The time grid can be turned on and off with the variable
2563 @code{org-agenda-use-time-grid}, and can be configured with
2564 @code{org-agenda-time-grid}.
2567 @node Calendar/Diary integration, Sorting of agenda items, Time-of-day specifications, Weekly/Daily agenda
2568 @subsection Calendar/Diary integration
2569 @cindex calendar integration
2570 @cindex diary integration
2572 Emacs contains the calendar and diary by Edward M. Reingold. The
2573 calendar displays a three-month calendar with holidays from different
2574 countries and cultures. The diary allows you to keep track of
2575 anniversaries, lunar phases, sunrise/set, recurrent appointments
2576 (weekly, monthly) and more. In this way, it is quite complementary to
2577 Org-mode. It can be very useful to combine output from Org-mode with
2580 In order to include entries from the Emacs diary into Org-mode's
2581 agenda, you only need to customize the variable
2584 (setq org-agenda-include-diary t)
2587 @noindent After that, everything will happen automatically. All diary
2588 entries including holidays, anniversaries etc will be included in the
2589 agenda buffer created by Org-mode. @key{SPC}, @key{TAB}, and
2590 @key{RET} can be used from the agenda buffer to jump to the diary
2591 file in order to edit existing diary entries. The @kbd{i} command to
2592 insert new entries for the current date works in the agenda buffer, as
2593 well as the commands @kbd{S}, @kbd{M}, and @kbd{C} to display
2594 Sunrise/Sunset times, show lunar phases and to convert to other
2595 calendars, respectively. @kbd{c} can be used to switch back and forth
2596 between calendar and agenda.
2598 @node Sorting of agenda items, , Calendar/Diary integration, Weekly/Daily agenda
2599 @subsection Sorting of agenda items
2600 @cindex sorting, of agenda items
2601 @cindex priorities, of agenda items
2602 The entries for each day are sorted. The default order is to first
2603 collect all items containing an explicit time-of-day specification.
2604 These entries will be shown at the beginning of the list, as a
2605 @emph{schedule} for the day. After that, items remain grouped in
2606 categories, in the sequence given by @code{org-agenda-files}. Within
2607 each category, items are sorted by priority (@pxref{Priorities}).
2609 The priority is a numerical quantity composed of the base priority
2610 (2000 for priority @samp{A}, 1000 for @samp{B}, and 0 for @samp{C}),
2611 plus additional increments for overdue scheduled or deadline items.
2613 Sorting can be customized using the variable
2614 @code{org-agenda-sorting-strategy}.
2617 @node Global TODO list, Matching headline tags, Weekly/Daily agenda, Agenda views
2618 @section The global TODO list
2619 @cindex global TODO list
2620 @cindex TODO list, global
2622 The global TODO list contains all unfinished TODO items, formatted and
2623 collected into a single place.
2628 Show the global TODO list. This collects the TODO items from all
2629 agenda files (@pxref{Agenda views}) into a single buffer. The buffer is in
2630 @code{agenda-mode}, so there are commands to examine and manipulate
2631 the TODO entries directly from that buffer (@pxref{Agenda commands}).
2632 @xref{Global TODO list}, for more information.
2635 Like the above, but allows selection of a specific TODO keyword. You can
2636 also do this by specifying a prefix argument to @kbd{C-c a t}. With a
2637 @kbd{C-u} prefix you are prompted for a keyword. With a numeric
2638 prefix, the Nth keyword in @code{org-todo-keywords} is selected.
2640 The @kbd{r} key in the agenda buffer regenerates it, and you can give
2641 a prefix argument to this command to change the selected TODO keyword,
2642 for example @kbd{3 r}. If you often need a search for a specific
2643 keyword, define a custom command for it (@pxref{Agenda dispatcher}).
2646 Remote editing of TODO items means that you can change the state of a
2647 TODO entry with a single key press. The commands available in the
2648 TODO list are described in @ref{Agenda commands}.
2650 @node Matching headline tags, Timeline, Global TODO list, Agenda views
2651 @section Matching headline tags
2652 @cindex matching, of tags
2655 If headlines in the agenda files are marked with @emph{tags}
2656 (@pxref{Tags}), you can select headlines based on the tags that apply
2657 to them and collect them into an agenda buffer.
2662 Produce a list of all headlines that match a given set of tags. The
2663 command prompts for a selection criterion, which is a boolean logic
2664 expression with tags, like @samp{+WORK+URGENT-WITHBOSS} or
2665 @samp{WORK|HOME} (@pxref{Tags}). If you often need a specific search,
2666 define a custom command for it (@pxref{Agenda dispatcher}).
2669 Like @kbd{C-c a m}, but only select headlines that are also TODO items
2670 and force checking subitems (see variable
2671 @code{org-tags-match-list-sublevels}.
2674 The commands available in the tags list are described in @ref{Agenda
2677 @node Timeline, Agenda commands, Matching headline tags, Agenda views
2678 @section Timeline for a single file
2679 @cindex single file summary
2680 @cindex agenda, for single file
2681 @cindex timeline, single file
2682 @cindex time-sorted view
2684 The timeline is not really an agenda view, because it only summarizes
2685 items from a single Org-mode file. But it also uses the agenda buffer
2686 and provides similar commands, so we discuss it here. The timeline
2687 shows all time-stamped items in a single Org-mode file (or the
2688 selected part of it), in a @emph{time-sorted view}. The main purpose of
2689 this command is to give an overview over events in a project.
2694 Show a time-sorted view of the org file, with all time-stamped items.
2695 When called with a @kbd{C-u} prefix, all unfinished TODO entries
2696 (scheduled or not) are also listed under the current date.
2700 The commands available in the timeline buffer are listed in
2701 @ref{Agenda commands}.
2703 @node Agenda commands, , Timeline, Agenda views
2704 @section Commands in the agenda buffer
2705 @cindex commands, in agenda buffer
2707 Entries in the agenda buffer are linked back to the org file or diary
2708 file where they originate. You are not allowed to edit the agenda
2709 buffer itself, but commands are provided to show and jump to the
2710 original entry location, and to edit the org-files ``remotely'' from
2711 the agenda buffer. In this way, all information is stored only once,
2712 removing the risk that your agenda and note files may diverge.
2714 Some commands can be executed with mouse clicks on agenda lines. For
2715 the other commands, the cursor needs to be in the desired line.
2718 @tsubheading{Motion}
2721 Next line (same as @key{up}).
2724 Previous line (same as @key{down}).
2725 @tsubheading{View/GoTo org file}
2730 Display the original location of the item in another window.
2734 Display original location and recenter that window.
2742 Go to the original location of the item in another window. Under Emacs
2743 22, @kbd{mouse-1} will also works for this.
2747 Go to the original location of the item and delete other windows.
2751 Toggle Follow mode. In Follow mode, as you move the cursor through
2752 the agenda buffer, the other window always shows the corresponding
2753 location in the org file.
2757 Toggle Logbook mode. In Logbook mode, entries that where marked DONE while
2758 logging was on (variable @code{org-log-done}) are shown in the agenda.
2760 @tsubheading{Change display}
2763 Delete other windows.
2767 Switch to weekly view (7 days displayed together).
2771 Switch to daily view (just one day displayed).
2775 Toggle the inclusion of diary entries. See @ref{Calendar/Diary integration}.
2779 Toggle the time grid on and off. See also the variables
2780 @code{org-agenda-use-time-grid} and @code{org-agenda-time-grid}.
2784 Recreate the agenda buffer, for example to reflect the changes
2785 after modification of the time stamps of items with S-@key{left} and
2786 S-@key{right}. When the buffer is the global todo list, a prefix
2787 argument is interpreted to create a selective list for a specific TODO
2792 Display the following @code{org-agenda-ndays} days. For example, if
2793 the display covers a week, switch to the following week. With prefix
2794 arg, go forward that many times @code{org-agenda-ndays} days.
2798 Display the previous dates.
2804 @tsubheading{Remote editing}
2811 Change the TODO state of the item, both in the agenda and in the
2816 Show all tags associated with the current item. Because of
2817 inheritance, this may be more than the tags listed in the line itself.
2821 Set tags for the current headline.
2825 Set the priority for the current item. Org-mode prompts for the
2826 priority character. If you reply with @key{SPC}, the priority cookie
2827 is removed from the entry.
2831 Display weighted priority of current item.
2837 Increase the priority of the current item. The priority is changed in
2838 the original buffer, but the agenda is not resorted. Use the @kbd{r}
2842 @kindex S-@key{down}
2845 Decrease the priority of the current item.
2847 @kindex S-@key{right}
2849 Change the time stamp associated with the current line by one day into
2850 the future. With prefix argument, change it by that many days. For
2851 example, @kbd{3 6 5 S-@key{right}} will change it by a year. The
2852 stamp is changed in the original org file, but the change is not
2853 directly reflected in the agenda buffer. Use the
2854 @kbd{r} key to update the buffer.
2856 @kindex S-@key{left}
2858 Change the time stamp associated with the current line by one day
2863 Change the time stamp associated with the current line to today.
2864 The key @kbd{>} has been chosen, because it is the same as @kbd{S-.}
2867 @cindex diary entries, creating from agenda
2870 Insert a new entry into the diary. Prompts for the type of entry
2871 (day, weekly, monthly, yearly, anniversary, cyclic) and creates a new
2872 entry in the diary, just like @kbd{i d} etc. would do in the calendar.
2873 The date is taken from the cursor position.
2875 @tsubheading{Calendar commands}
2878 Open the Emacs calendar and move to the date at the agenda cursor.
2881 When in the calendar, compute and show the Org-mode agenda for the
2886 Show the phases of the moon for the three months around current date.
2890 Show sunrise and sunset times. The geographical location must be set
2891 with calendar variables, see documentation of the Emacs calendar.
2895 Convert the date at cursor into many other cultural and historic
2900 Show holidays for three month around the cursor date.
2904 Export a single iCalendar file containing entries from all agenda files.
2906 @tsubheading{Quit and Exit}
2909 Quit agenda, remove the agenda buffer.
2912 @cindex agenda files, removing buffers
2914 Exit agenda, remove the agenda buffer and all buffers loaded by Emacs
2915 for the compilation of the agenda. Buffers created by the user to
2916 visit org files will not be removed.
2920 @node Exporting, Miscellaneous, Agenda views, Top
2924 Org-mode documents can be exported into a variety of other formats. For
2925 printing and sharing of notes, ASCII export produces a readable and
2926 simple version of an Org-mode file. HTML export allows to publish a
2927 notes file on the web, while the XML format provides a solid base for
2928 exchange with a broad range of other applications. To incorporate
2929 entries with associated times like deadlines or appointments into a
2930 desktop calendar program like iCal, Org-mode can also produce extracts
2931 in the iCalendar format. Currently Org-mode only supports export, not
2932 import of these different formats.
2934 When exporting, Org-mode uses special conventions to enrich the output
2935 produced. @xref{Text interpretation}, for more details.
2938 * ASCII export:: Exporting to plain ASCII
2939 * HTML export:: Exporting to HTML
2940 * XML export:: Exporting to XML
2941 * iCalendar export:: Exporting in iCalendar format
2942 * Text interpretation:: How the exporter looks at the file
2945 @node ASCII export, HTML export, Exporting, Exporting
2946 @section ASCII export
2947 @cindex ASCII export
2949 ASCII export produces an simple and very readable version of an Org-mode
2952 @cindex region, active
2953 @cindex active region
2954 @cindex transient-mark-mode
2958 Export as ASCII file. If there is an active region, only the region
2959 will be exported. For an org file @file{myfile.org}, the ASCII file
2960 will be @file{myfile.txt}. The file will be overwritten without
2964 @cindex headline levels, for exporting
2965 In the exported version, the first 3 outline levels will become
2966 headlines, defining a general document structure. Additional levels
2967 will be exported as itemized lists. If you want that transition to occur
2968 at a different level, specify it with a prefix argument. For example,
2971 @kbd{C-1 C-c C-x a org-export-as-ascii}
2975 creates only top level headlines and does the rest as items.
2977 @node HTML export, XML export, ASCII export, Exporting
2978 @section HTML export
2981 Org-mode contains an HTML exporter with extensive HTML formatting, in
2982 ways similar to John Grubers @emph{markdown} language, but with
2983 additional support for tables.
2985 @cindex region, active
2986 @cindex active region
2987 @cindex transient-mark-mode
2991 Export as HTML file @file{myfile.html}.
2994 Export as HTML file and open it with a browser.
2997 @cindex headline levels, for exporting
2998 In the exported version, the first 3 outline levels will become
2999 headlines, defining a general document structure. Additional levels
3000 will be exported as itemized lists. If you want that transition to occur
3001 at a different level, specify it with a prefix argument. For example,
3008 creates two levels of headings and does the rest as items.
3010 If you want to include HTML tags which should be interpreted as such,
3011 mark them with a @samp{@@} like in @samp{@@<b>bold text@@</b>}.
3012 Plain @samp{<} and @samp{>} are always transformed to @samp{<} and
3013 @samp{>} in HTML export.
3015 You can also give style information for the exported file. The
3016 default specification can be configured through the option
3017 @code{org-export-html-style}. If you want to use a file-local style,
3018 you may use file variables, best wrapped into a COMMENT section at the
3019 end of the outline tree. For example:
3022 * COMMENT HTML style specifications
3025 # org-export-html-style: " <style type=\"text/css\">
3026 p @{font-weight: normal; color: gray; @}
3027 h1 @{color: black; @}
3032 Remember to execute @kbd{M-x normal-mode} after changing this to make
3033 the new style visible to Emacs. This command restarts org-mode for the
3034 current buffer and forces Emacs to re-evaluate the local variables
3035 section in the buffer.
3037 @c FIXME: More about header and footer styles
3038 @c FIXME: Talk about links and targets.
3040 @node XML export, iCalendar export, HTML export, Exporting
3044 Org-mode contains an XML exporter that produces XOXO-style XML.
3045 Currently, this exporter only handles the general outline structure and
3046 does not interpret any additional Org-mode features.
3051 Export as XML file @file{myfile.xml}.
3054 @node iCalendar export, Text interpretation, XML export, Exporting
3055 @section iCalendar export
3056 @cindex iCalendar export
3058 Some people like to use Org-mode for keeping track of projects, but
3059 still prefer a standard calendar application for anniversaries and
3060 appointments. In this case it can be useful to have deadlines and
3061 other time-stamped items in Org-mode files show up in the calendar
3062 application. Org-mode can export calendar information in the standard
3068 Create iCalendar entries for the current file and store them in the same
3069 directory, using a file extension @file{.ics}.
3072 Like @kbd{C-c C-x i}, but do this for all files in
3073 @code{org-agenda-files}. For each of these files, a separate iCalendar
3074 file will be written.
3077 Create a single large iCalendar file from all files in
3078 @code{org-agenda-files} and write it to the file given by
3079 @code{org-combined-agenda-icalendar-file}.
3082 How this calendar is best read and updated, depends on the application
3083 you are using. For example, when using iCal under Apple MacOS X, you
3084 could create a new calendar @samp{OrgMode} (the default name for the
3085 calendar created by @kbd{C-c C-x c}, see the variables
3086 @code{org-icalendar-combined-name} and
3087 @code{org-combined-agenda-icalendar-file}). Then set Org-mode to
3088 overwrite the corresponding file
3089 @file{~/Library/Calendars/OrgMode.ics}. You may even use AppleScript
3090 to make iCal re-read the calendar files each time a new version of
3091 @file{OrgMode.ics} is produced. Here is the setup needed for this:
3093 @cindex applescript, for calendar update
3095 (setq org-combined-agenda-icalendar-file
3096 "~/Library/Calendars/OrgMode.ics")
3097 (add-hook 'org-after-save-iCalendar-file-hook
3100 "osascript -e 'tell application \"iCal\" to reload calendars'")))
3103 @node Text interpretation, , iCalendar export, Exporting
3104 @section Text interpretation by the exporter
3106 The exporter backends interpret additional structure in the Org-mode file
3107 in order to produce better output.
3110 * Comment lines:: Some lines will not be exported
3111 * Enhancing text:: Subscripts, symbols and more
3112 * Export options:: How to influence the export settings
3115 @node Comment lines, Enhancing text, Text interpretation, Text interpretation
3116 @subsection Comment lines
3117 @cindex comment lines
3118 @cindex exporting, not
3120 Lines starting with @samp{#} in column zero are treated as comments
3121 and will never be exported. Also entire subtrees starting with the
3122 word @samp{COMMENT} will never be exported. Finally, any text before
3123 the first headline will not be exported either.
3128 Toggle the COMMENT keyword at the beginning of an entry.
3133 @node Enhancing text, Export options, Comment lines, Text interpretation
3134 @subsection Enhancing text for export
3135 @cindex enhancing text
3138 Some of the export backends of Org-mode allow for sophisticated text
3139 formatting, this is true in particular for the HTML backend. Org-mode
3140 has a number of typing conventions that allow to produce a richly
3146 @cindex hand-formatted lists
3147 @cindex lists, hand-formatted
3149 Plain lists @samp{-}, @samp{*} or @samp{+} as bullet, or with @samp{1.}
3150 or @samp{2)} as enumerator will be recognized and transformed if the
3151 backend supports lists. See @xref{Plain lists}.
3153 @cindex underlined text
3157 You can make words @b{*bold*}, @i{/italic/}, and _underlined_
3159 @cindex @TeX{} interpretation
3161 Simple @TeX{}-like math constructs are interpreted:
3163 @cindex completion, of @TeX{} symbols
3166 @samp{10^22} and @samp{J_n} are super- and subscripts. You can quote
3167 @samp{^} and @samp{_} with a backslash: @samp{\_} and @samp{\^}
3169 @samp{\alpha} indicates a Greek letter, @samp{\to} an arrow. You can
3170 use completion for these macros, just type @samp{\} and maybe a few
3171 letters, and press @kbd{M-@key{TAB}} to see possible completions.
3174 @cindex tables, export
3176 Tables are transformed into native tables under the exporter, if the
3177 export backend supports this. Data fields before the first horizontal
3178 separator line will be formatted as table header fields.
3182 If a headline starts with the word @samp{QUOTE}, the text below the
3183 headline will be typeset as fixed-width, to allow quoting of computer
3184 codes etc. Lines starting with @samp{:} are also typeset in
3189 Toggle fixed-width for entry (QUOTE) or region, see below.
3193 If these conversions conflict with your habits of typing ASCII text,
3194 they can all be turned off with corresponding variables (see the
3195 customization group @code{org-export-general}, and the following section
3196 which explains how to set export options with special lines in a
3199 @node Export options, , Enhancing text, Text interpretation
3200 @subsection Export options
3201 @cindex options, for export
3203 @cindex completion, of option keywords
3204 The exporter recognizes special lines in the buffer which provide
3205 additional information. These lines may be put anywhere in the file.
3206 The whole set of lines can be inserted into the buffer with @kbd{C-c
3207 C-x t}. For individual lines, a good way to make sure the keyword is
3208 correct is to type @samp{#+} and then use @kbd{M-@key{TAB}} completion
3209 (@pxref{Completion}).
3214 Insert template with export options, see example below.
3218 #+TITLE: the title to be shown (default is the buffer name)
3219 #+AUTHOR: the author (default taken from @code{user-full-name})
3220 #+EMAIL: his/her email address (default from @code{user-mail-address})
3221 #+LANGUAGE: language for HTML, e.g. @samp{en} (@code{org-export-default-language})
3222 #+TEXT: Some descriptive text to be inserted at the beginning.
3223 #+TEXT: Several lines may be given.
3224 #+OPTIONS: H:2 num:t toc:t \n:nil @:t ::t |:t ^:t *:nil TeX:t
3228 The OPTIONS line is a compact form to specify export settings. Here
3230 @cindex headline levels
3231 @cindex section-numbers
3232 @cindex table of contents
3233 @cindex linebreak preservation
3234 @cindex quoted html tags
3235 @cindex fixed-width sections
3237 @cindex @TeX{}-like syntax for sub- and superscripts
3238 @cindex emphasized text
3239 @cindex @TeX{} macros
3241 H: @r{set the number of headline levels for export}
3242 num: @r{turn on/off section-numbers}
3243 toc: @r{turn on/off table of contents}
3244 \n: @r{turn on/off linebreak-preservation}
3245 @@: @r{turn on/off quoted html tags}
3246 :: @r{turn on/off fixed-width sections}
3247 |: @r{turn on/off tables}
3248 ^: @r{turn on/off @TeX{}-like syntax for sub- and superscripts.}
3249 *: @r{turn on/off emphasized text (bold, italic, underlined)}
3250 TeX: @r{turn on/off @TeX{} macros}
3253 @node Miscellaneous, Index, Exporting, Top
3254 @chapter Miscellaneous
3257 * Completion:: M-TAB knows what you need
3258 * Customization:: Adapting Org-mode to your taste
3259 * Summary of in-buffer settings:: Using special lines to set options
3260 * The very busy C-c C-c key:: When in doubt, press C-c C-c
3261 * Clean view:: Getting rid of leading stars in the outline
3262 * TTY keys:: Using Org-mode on a tty
3263 * FAQ:: Frequently asked questions
3264 * Interaction:: Other Emacs packages
3265 * Bugs:: Things which do not work perfectly
3266 * Acknowledgments:: These people provided feedback and more
3269 @node Completion, Customization, Miscellaneous, Miscellaneous
3271 @cindex completion, of @TeX{} symbols
3272 @cindex completion, of TODO keywords
3273 @cindex completion, of dictionary words
3274 @cindex completion, of option keywords
3275 @cindex completion, of CamelCase links
3276 @cindex completion, of tags
3277 @cindex @TeX{} symbol completion
3278 @cindex TODO keywords completion
3279 @cindex dictionary word completion
3280 @cindex option keyword completion
3281 @cindex CamelCase link completion
3282 @cindex tag completion
3284 Org-mode supports in-buffer completion. This type of completion does
3285 not make use of the minibuffer. You simply type a few letters into
3286 the buffer and use the key to complete text right there.
3291 Complete word at point
3294 At the beginning of a headline, complete TODO keywords.
3296 After @samp{\}, complete @TeX{} symbols supported by the exporter.
3298 After @samp{*}, complete CamelCase versions of all headlines in the
3301 After @samp{:}, complete tags used elsewhere in the buffer.
3303 After @samp{#+}, complete the special keywords like @samp{TYP_TODO} or
3304 @samp{OPTIONS} which set file-specific options for Org-mode. When the
3305 option keyword is already complete, pressing @kbd{M-@key{TAB}} again
3306 will insert example settings for this keyword.
3308 Elsewhere, complete dictionary words using ispell.
3313 @node Customization, Summary of in-buffer settings, Completion, Miscellaneous
3314 @section Customization
3315 @cindex customization
3316 @cindex options, for customization
3317 @cindex variables, for customization
3319 There are more than 100 variables that can be used to customize
3320 Org-mode. For the sake of compactness of the manual, we are not
3321 describing the variables here. A structured overview of customization
3322 variables is available with @kbd{M-x org-customize}. Or select
3323 @code{Browse Org Group} from the @code{Org->Customization} menu. Many
3324 settings can also be activated on a per-file basis, by putting special
3325 lines into the buffer (@pxref{Summary of in-buffer settings}).
3327 @node Summary of in-buffer settings, The very busy C-c C-c key, Customization, Miscellaneous
3328 @section Summary of in-buffer settings
3329 @cindex in-buffer settings
3330 @cindex special keywords
3332 Org-mode uses special lines in the buffer to define settings on a
3333 per-file basis. These lines start with a @samp{#+} followed by a
3334 keyword, a colon, and then individual words defining a setting. Several
3335 settings words con be in the same line, but you can also have multiple
3336 lines for the keyword. While these settings are described throughout
3337 the manual, here is a summary. After changing any of those lines in the
3338 buffer, press @kbd{C-c C-c} with the cursor still in the line to
3339 activate the changes immediately. Otherwise they become effective only
3340 when the file is visited again in a new Emacs session.
3344 This line sets options to be used at startup of org-mode, when an
3345 Org-mode file is being visited. The first set of options deals with the
3346 initial visibility of the outline tree. The corresponding variable for
3347 global default settings is @code{org-startup-folded}, with a default
3348 value @code{t}, which means @code{overview}.
3350 overview @r{top-level headlines only}
3351 content @r{all headlines}
3352 showall @r{no folding at all, show everything}
3354 Then there are options for aligning tables upon visiting a file. This
3355 is useful in files containing narrowed table columns. The corresponding
3356 variable is @code{org-startup-align-all-tables}, with a default value
3359 align @r{align all tables}
3360 noalign @r{don't align tables on startup}
3362 Here are the options for hiding leading stars in outline headings. The
3363 corresponding variables are @code{org-hide-leading-stars} and
3364 @code{org-odd-levels-only}, both with a default setting @code{nil}
3365 (meaning @code{showstars} and @code{oddeven}).
3367 hidestars @r{make all but one of the stars starting a headline invisible.}
3368 showstars @r{show all stars starting a headline}
3369 odd @r{allow only odd outline levels (1,3,...)}
3370 oddeven @r{allow all outline levels}
3372 @item #+SEQ_TODO: #+TYP_TODO:
3373 These lines that the TODO keywords and their interpretation in the
3374 current file. The corresponding variables are @code{org-todo-keywords}
3375 and @code{org-todo-interpretation}.
3377 This line sets the category for the agenda file. The category applies
3378 for all subsequent lines until the next @samp{#+CATEGORY} line, or the
3381 This line contains the formulas for the table directly above the line.
3382 @item #+TITLE:, #+AUTHOR:, #+EMAIL:, #+LANGUAGE:, #+TEXT:, #+OPTIONS:
3383 These lines provide setting for exporting files. For more details see
3384 @ref{Export options}.
3387 @node The very busy C-c C-c key, Clean view, Summary of in-buffer settings, Miscellaneous
3388 @section The very busy C-c C-c key
3391 The key @kbd{C-c C-c} has many purposes in org-mode, which are all
3392 mentioned scattered throughout this manual. One specific function of
3393 this key is to add @emph{tags} to a headline (@pxref{Tags}). In many
3394 other circumstances it means something like @emph{Hey Org-mode, look
3395 here and update according to what you see here}. Here is a summary what
3396 this means in different contexts.
3400 @c If the cursor is in a headline, prompt for tags and insert them
3401 @c into the current line, aligned to `org-tags-column'. When called
3402 @c with prefix arg, realign all tags in the current buffer.
3404 If the cursor is in one of the special #+KEYWORD lines, this
3405 triggers scanning the buffer for these lines and updating the
3408 If the cursor is inside a table, realign the table. This command
3409 works even if the automatic table editor has been turned off.
3411 If the cursor is on a #+TBLFM line, re-apply the formulas to
3414 If the cursor is inside a table created by the @file{table.el} package,
3415 activate that table.
3417 If the current buffer is a remember buffer, close note and file it.
3418 with a prefix argument, file it without further interaction to the default
3421 If the cursor is on a <<<target>>>, update radio targets and corresponding
3422 links in this buffer.
3424 If the cursor is on a numbered item in a plain list, renumber the
3428 @node Clean view, TTY keys, The very busy C-c C-c key, Miscellaneous
3429 @section A cleaner outline view
3430 @cindex hiding leading stars
3431 @cindex clean outline view
3433 Some people find it noisy and distracting that the Org-mode headlines
3434 are starting with a potentially large number of stars. For example
3435 the tree from @ref{Headlines}:
3438 * Top level headline
3444 * Another top level headline
3448 Unfortunately this is deeply ingrained into the code of Org-mode and
3449 cannot be easily changed. You can, however, modify the display in such
3450 a way that all leading stars become invisible and the outline more easy
3451 to read. To do this, customize the variable
3452 @code{org-hide-leading-stars} like this:
3455 (setq org-hide-leading-stars t)
3459 or change this on a per-file basis with one of the lines (anywhere in
3463 #+STARTUP: showstars
3464 #+STARTUP: hidestars
3468 Press @kbd{C-c C-c} with the cursor in a @samp{STARTUP} line to activate
3471 With stars hidden, the tree becomes:
3474 * Top level headline
3480 * Another top level headline
3484 Note that the leading stars are not truly replaced by whitespace, they
3485 are only fontified with the face @code{org-hide} that uses the
3486 background color as font color. If are are not using either white or
3487 black background, you may have to customize this face to get the wanted
3488 effect. Another possibility is to set this font such that the extra
3489 stars are @i{almost} invisible, for example using the color
3490 @code{grey90} on a white background.
3492 Things become cleaner still if you skip all the even levels and use only
3493 odd levels 1, 3, 5..., effectively adding two stars to go from one
3494 outline level to the next:
3497 * Top level headline
3503 * Another top level headline
3507 In order to make the structure editing and export commands handle this
3508 convention correctly, use
3511 (setq org-odd-levels-only t)
3515 or set this on a per-file basis with one of the following lines (don't
3516 forget to press @kbd{C-c C-c} with the cursor in the startup line to
3517 activate changes immediately).
3524 You can convert an Org-mode file from single-star-per-level to the
3525 double-star-per-level convention with @kbd{M-x org-convert-to-odd-levels
3526 RET} in that file. The reverse operation is @kbd{M-x
3527 org-convert-to-oddeven-levels}.
3529 @node TTY keys, FAQ, Clean view, Miscellaneous
3530 @section Using org-mode on a tty
3531 @cindex tty keybindings
3533 Org-mode uses a number of keys that are not accessible on a tty. This
3534 applies to most special keys like cursor keys, @key{TAB} and
3535 @key{RET}, when these are combined with modifier keys like @key{Meta}
3536 and/or @key{Shift}. Org-mode uses these bindings because it needs to
3537 provide keys for a large number of commands, and because these keys
3538 appeared particularly easy to remember. In order to still be able to
3539 access the core functionality of Org-mode on a tty, alternative
3540 bindings are provided. Here is a complete list of these bindings,
3541 which are obviously more cumbersome to use. Note that sometimes a
3542 work-around can be better. For example changing a time stamp is
3543 really only fun with @kbd{S-@key{cursor}} keys. On a tty you would
3544 rather use @kbd{C-c .} to re-insert the timestamp.
3546 @multitable @columnfractions 0.15 0.2 0.2
3547 @item @b{Default} @tab @b{Alternative 1} @tab @b{Alternative 2}
3548 @item @kbd{S-@key{TAB}} @tab @kbd{C-u @key{TAB}} @tab
3549 @item @kbd{M-@key{left}} @tab @kbd{C-c C-x l} @tab @kbd{@key{Esc} @key{left}}
3550 @item @kbd{M-S-@key{left}} @tab @kbd{C-c C-x L} @tab
3551 @item @kbd{M-@key{right}} @tab @kbd{C-c C-x r} @tab @kbd{@key{Esc} @key{right}}
3552 @item @kbd{M-S-@key{right}} @tab @kbd{C-c C-x R} @tab
3553 @item @kbd{M-@key{up}} @tab @kbd{C-c C-x u} @tab @kbd{@key{Esc} @key{up}}
3554 @item @kbd{M-S-@key{up}} @tab @kbd{C-c C-x U} @tab
3555 @item @kbd{M-@key{down}} @tab @kbd{C-c C-x d} @tab @kbd{@key{Esc} @key{down}}
3556 @item @kbd{M-S-@key{down}} @tab @kbd{C-c C-x D} @tab
3557 @item @kbd{S-@key{RET}} @tab @kbd{C-c C-x c} @tab
3558 @item @kbd{M-@key{RET}} @tab @kbd{C-c C-x m} @tab @kbd{@key{Esc} @key{RET}}
3559 @item @kbd{M-S-@key{RET}} @tab @kbd{C-c C-x M} @tab
3560 @item @kbd{S-@key{left}} @tab @kbd{C-c C-x @key{left}} @tab
3561 @item @kbd{S-@key{right}} @tab @kbd{C-c C-x @key{right}} @tab
3562 @item @kbd{S-@key{up}} @tab @kbd{C-c C-x @key{up}} @tab
3563 @item @kbd{S-@key{down}} @tab @kbd{C-c C-x @key{down}} @tab
3566 @node FAQ, Interaction, TTY keys, Miscellaneous
3567 @section Frequently asked questions
3572 @cindex allout.el, conflict with
3573 @cindex @code{keymapp nil} error
3574 @item @b{When I try to use Org-mode, I always get
3575 @code{(wrong-type-argument keymapp nil)}}.@*
3576 This is a conflict with an outdated version of the @file{allout.el}
3577 package which pretends to be also the standard outline-mode but is not.
3578 This happens with older versions of @file{allout.el}, for example the
3579 one distributed with Emacs 21. Upgrade to Emacs 22 and this problem
3580 will disappear. If for some reason you cannot do this, make sure that
3581 org.el is loaded @emph{before} @file{allout.el}, for example by putting
3582 @code{(require 'org)} early enough into your @file{.emacs} file.
3584 @item @b{Org-mode seems to be a useful default mode for the various
3585 @file{README} files I have scattered through my directories. How do I
3586 turn it on for all @file{README} files?}
3590 (add-to-list 'auto-mode-alist '("README$" . org-mode))
3593 @item @b{Some of my links stopped working after I upgraded to a version
3594 4.20 or later. Why is this, and how can I fix it?}@*
3596 These must be links in plain text, containing white space, such as
3597 @samp{bbdb:Richard Stallman}. You need to protect these links by
3598 putting double brackets around them, like @samp{[[bbdb:Richard
3601 @item @b{I see that Org-mode now creates links using the double bracket
3602 convention that hides the link part and the brackets, only showing the
3603 description part. How can I convert my old links to this new format?}@*
3605 Execute once in each Org-mode file: @kbd{M-x org-upgrade-old-links}.
3606 This replaces angular brackets with the new link format.
3608 @item @b{I don't care if you find the new bracket links great, I am
3609 attached to the old style using angular brackets and no hiding of the
3610 link text. Please give them back to me, don't tell me it is not
3613 Would I let you down like that? If you must, you can do this
3616 (setq org-link-style 'plain
3617 org-link-format "<%s>")
3620 @item @b{When I am executing shell links I always get a
3621 confirmation prompt and need to type @kbd{yes @key{RET}}, thats 4 key
3622 presses! Can I get rid of this?}@*
3624 @cindex shell links, confirmation
3625 @cindex dangerous commands
3626 The confirmation is there to protect you from unwantingly execute
3627 potentially dangerous commands. For example, imagine a link
3628 @samp{[[shell:rm -rf ~/*][Google Search]]}. In an Org-mode buffer, this
3629 command would look like @samp{Google Search}, but really it would remove
3630 your home directory. If you wish, you can make it easier to respond to
3631 the query by setting @code{org-confirm-shell-links} to @code{y-or-n-p}.
3632 Then a single @kbd{y} keypress will be enough to confirm shell links.
3633 It is also possible to turn off this check entirely, but I do not
3634 recommend to do this. Be warned.
3636 @item @b{All these stars are driving me mad, I just find the Emacs
3637 outlines unreadable. Can't you just put white space and a single star as a
3638 starter for headlines?}@*
3640 See @ref{Clean view}.
3642 @item @b{I would like to have two windows on the same Org-mode
3643 file, but with different outline visibility. Is that possible?}@*
3645 @cindex @code{make-indirect-buffer}
3646 @cindex indirect buffers
3647 In GNU Emacs, you may use @emph{indirect buffers} which do exactly this.
3648 See the documentation on the command @code{make-indirect-buffer}. In
3649 XEmacs, this is currently not possible because of the different outline
3652 @item @b{When I export my TODO list, every TODO item becomes a
3653 separate section. How do I enforce these items to be exported as an
3656 If you plan to use ASCII or HTML export, make sure things you want to
3657 be exported as item lists are level 4 at least, even if that does mean
3658 there is a level jump. For example:
3661 * Todays top priorities
3662 **** TODO write a letter to xyz
3663 **** TODO Finish the paper
3664 **** Pick up kids at the school
3667 Alternatively, if you need a specific value for the heading/item
3668 transition in a particular file, use the @samp{+OPTIONS} line to
3669 configure the @samp{H} switch.
3675 @item @b{I would like to export only a subtree of my file to HTML.
3678 @cindex exporting a subtree
3679 If you want to export a subtree, mark the subtree as region and then
3680 export. Marking can be done with @kbd{C-c @@ C-x C-x}, for example.
3682 @item @b{Org-mode takes over the S-cursor keys. I also want to use
3683 CUA-mode, is there a way to fix this conflict?}@*
3684 Yes, see @ref{Interaction}.
3686 @item @b{One of my table columns has started to fill up with
3687 @samp{#ERROR}. What is going on?}@*
3689 Org-mode tried to compute the column from other fields using a
3690 formula stored in the @samp{#+TBLFM:} line just below the table, and
3691 the evaluation of the formula fails. Fix the fields used in the
3692 formula, or fix the formula, or remove it!
3694 @item @b{When I am in the last column of a table and just above a
3695 horizontal line in the table, pressing TAB creates a new table line
3696 @i{before} the horizontal line. How can I quickly move to the line
3697 @i{below} the horizontal line instead?}@*
3699 Press @key{down} (to get on the separator line) and then @key{TAB}.
3700 Or configure the variable @code{org-table-tab-jumps-over-hlines}.
3702 @item @b{How can I change the indentation of an entire table without
3703 fixing every line by hand?}@*
3705 @cindex indentation, of tables
3706 The indentation of a table is set by the first line. So just fix the
3707 indentation of the first line and realign with @key{TAB}.
3709 @item @b{Is it possible to include entries from org-mode files into my
3712 Since the org-mode agenda is much more powerful and can contain the
3713 diary (@pxref{Calendar/Diary integration}), you should think twice
3714 before deciding to do this. Integrating Org-mode information into the
3715 diary is, however, possible. The following steps are necessary:
3716 Autoload the function @command{org-diary} as shown above under
3717 @ref{Installation and activation}. You also need to use @emph{fancy
3718 diary display} by setting in @file{.emacs}:
3721 (add-hook 'diary-display-hook 'fancy-diary-display)
3724 Then include the following line into your @file{~/diary} file, in
3725 order to get the entries from all files listed in the variable
3726 @code{org-agenda-files}:
3732 You may also select specific files with
3735 &%%(org-diary) ~/path/to/some/org-file.org
3736 &%%(org-diary) ~/path/to/another/org-file.org
3739 If you now launch the calendar and press @kbd{d} to display a diary, the
3740 headlines of entries containing a timestamp, date range, schedule, or
3741 deadline referring to the selected date will be listed. Just like in
3742 Org-mode's agenda view, the diary for @emph{today} contains additional
3743 entries for overdue deadlines and scheduled items. See also the
3744 documentation of the @command{org-diary} function. Under XEmacs, it is
3745 not possible to jump back from the diary to the org, this works only in
3751 @node Interaction, Bugs, FAQ, Miscellaneous
3752 @section Interaction with other packages
3753 @cindex packages, interaction with other
3754 Org-mode can cooperate with the following packages:
3757 @cindex @file{org-mouse.el}
3758 @item @file{org-mouse.el} by Piotr Zielinski
3759 This package implements extended mouse functionality for Org-mode. It
3760 allows you to cycle visibility and to edit the document structure with
3761 the mouse. Best of all, it provides a context-sensitive menu on
3762 @key{mouse-3} that changes depending on the context of a mouse-click.
3763 Use a search engine to find this package on the web.
3764 @cindex @file{table.el}
3765 @item @file{table.el} by Takaaki Ota
3766 Org mode cooperates with table.el, see @ref{table.el}. @file{table.el}
3767 is part of Emacs 22.
3768 @cindex @file{calc.el}
3769 @item @file{calc.el} by Dave Gillespie
3770 Org-mode uses the calc package for implementing spreadsheet
3771 functionality in its tables (@pxref{Table calculations}). Org-modes
3772 checks for the availability of calc by looking for the function
3773 @code{calc-eval} which should be autoloaded in your setup if calc has
3774 been installed properly. As of Emacs 22, calc is part of the Emacs
3775 distribution. Another possibility for interaction between the two
3776 packages is using calc for embedded calculations. @xref{Embedded Mode,
3777 , Embedded Mode, calc, GNU Emacs Calc Manual}.
3778 @cindex @file{constants.el}
3779 @item @file{constants.el} by Carsten Dominik
3780 In a table formula (@pxref{Table calculations}), it is possible to use
3781 names for natural constants or units. Instead of defining your own
3782 constants in the variable @code{org-table-formula-constants}, install
3783 the @file{constants} package which defines a large number of constants
3784 and units, and lets you use unit prefixes like @samp{M} for
3785 @samp{Mega} etc. You will need version 2.0 of this package, available
3786 at @url{http://www.astro.uva.nl/~dominik/Tools}. Org-mode checks for
3787 the function @code{constants-get}, which has to be autoloaded in your
3788 setup. See the installation instructions in the file
3789 @file{constants.el}.
3790 @cindex @file{remember.el}
3791 @cindex @file{CUA.el}
3792 @item @file{CUA.el} by Kim. F. Storm
3793 Keybindings in Org-mode conflict with the @kbd{S-<cursor>} keys
3794 used by CUA-mode (as well as pc-select-mode and s-region-mode) to
3795 select and extend the region. If you want to use one of these
3796 packages along with Org-mode, configure the variable
3797 @code{org-CUA-compatible}. When set, Org-mode will move the following
3798 keybindings in org-mode files, and in the agenda buffer (but not
3799 during date selection).
3802 S-UP -> M-p S-DOWN -> M-n
3803 S-LEFT -> M-- S-RIGHT -> M-+
3807 Yes, these are unfortunately more difficult to remember. If you want
3808 to have other replacement keys, look at the variable
3809 @code{org-disputed-keys}.
3810 @item @file{remember.el} by John Wiegley
3811 Org mode cooperates with remember, see @ref{Remember}.
3812 @file{Remember.el} is not part of Emacs, find it on the web.
3815 @node Bugs, Acknowledgments, Interaction, Miscellaneous
3819 Here is a list of things that should work differently, but which I
3820 have found too hard to fix.
3824 If a table field starts with a link, and if the corresponding table
3825 column is narrowed (@pxref{Narrow columns}) to a width too small to
3826 display the link, the field would look entirely empty even though it is
3827 not. To prevent this, Org-mode throws an error. The work-around is to
3828 make the column wide enough to fit the link, or to add some text (at
3829 least 2 characters) before the link in the same field.
3831 Narrowing table columns does not work on XEmacs, because the
3832 @code{format} function does not transport text properties.
3834 Text in an entry protected with the @samp{QUOTE} keyword should not
3837 When the application called by @kbd{C-c C-o} to open a file link fails
3838 (for example because the application does not exits or refuses to open
3839 the file), it does so silently. No error message is displayed.
3841 Plain list items should be able to hold a TODO item. Unfortunately this
3842 has so many technical problems that I will only consider this change for
3843 the next major release (5.0).
3845 The remote-editing commands in the agenda buffer cannot be undone with
3846 @code{undo} called from within the agenda buffer. But you can go to
3847 the corresponding buffer (using @key{TAB} or @key{RET} and execute
3850 Recalculating a table line applies the formulas from left to right.
3851 If a formula uses @emph{calculated} fields further down the row,
3852 multiple recalculation may be needed to get all fields consistent.
3854 You can only make a single word boldface or italic. To emphasize
3855 several words in a row, each must have the emphasize markers, like in
3856 @samp{*three* *bold* *words*}.
3858 The exporters work well, but could be made more efficient.
3861 @node Acknowledgments, , Bugs, Miscellaneous
3862 @section Acknowledgments
3863 @cindex acknowledgments
3866 Org-mode was written by Carsten Dominik, who still maintains it at the
3867 Org-mode homepage @uref{http://www.astro.uva.nl/~dominik/Tools/org/}.
3868 The following people (in alphabetic order) have helped the development
3869 along with ideas, suggestions and patches. Many thanks to all of you,
3870 Org-mode would not be what it is without your input.
3874 Thomas Baumann contributed the code for links to the MH-E email system.
3876 Alex Bochannek provided a patch for rounding time stamps.
3878 Charles Caves' suggestion sparked the implementation of templates for
3881 Pavel Chalmoviansky influenced the agenda treatment of items with
3884 Sacha Chua suggested to copy some linking code from Planner.
3886 Kees Dullemond inspired the use of narrowed tabled columns.
3888 Christian Egli converted the documentation into TeXInfo format, patched
3889 CSS formatting into the HTML exporter, and inspired the agenda.
3891 Nic Ferrier contributed mailcap and XML support.
3893 Kai Grossjohann pointed out key-binding conflicts caused by Org-mode.
3895 Stefan Monnier provided a patch to keep the Emacs-Lisp compiler happy.
3897 Tim O'Callaghan suggested in-file links, search options for
3898 general file links, and TAGS.
3900 Oliver Oppitz suggested multi-state TODO items.
3902 Scott Otterson sparked the introduction of descriptive text for links,
3905 Pete Phillips helped the development of the TAGS feature.
3907 Matthias Rempe (Oelde) provided ideas, Windows support, and quality
3910 Kevin Rogers contributed code to access VM files on remote hosts.
3912 Frank Ruell solved the mystery of the @code{keymapp nil} bug, a conflict
3913 with @file{allout.el}.
3915 Philip Rooke created the Org-mode reference card and provided lots of feedback.
3917 Christian Schlauer proposed angular brackets around links, among other
3920 Linking to VM/BBDB/GNUS was inspired by Tom Shannon's
3921 @file{organizer-mode.el}.
3923 J@"urgen Vollmer contributed code generating the table of contents
3926 Chris Wallace provided a patch implementing the @samp{QUOTE} keyword.
3928 David Wainberg suggested archiving, and improvements to the linking
3931 John Wiegley wrote @file{emacs-wiki.el} and @file{planner.el}. The
3932 development of Org-mode was fully independent, and both systems are
3933 really different beasts in their basic ideas and implementation details.
3934 However, I have later looked at John's code and learned from his
3935 implementation of (i) links where the link itself is hidden and only a
3936 description is shown, and (ii) popping up a calendar to select a date.
3938 Carsten Wimmer suggested some changes and helped fix a bug in linking
3941 Roland Winkler requested additional keybindings to make Org-mode
3944 Piotr Zielinski wrote @file{org-mouse.el} and showed how to follow links
3948 @node Index, Key Index, Miscellaneous, Top
3953 @node Key Index, , Index, Top
3961 arch-tag: 7893d1fe-cc57-4d13-b5e5-f494a1bcc7ac