4 @setfilename ../info/org
5 @settitle Org Mode Manual
12 * Org Mode: (org). Outline-based notes management and organizer
15 @c Version and Contact Info
16 @set MAINTAINERSITE @uref{http://www.astro.uva.nl/~dominik/Tools/org/,maintainers webpage}
17 @set MAINTAINER Carsten Dominik
18 @set MAINTAINEREMAIL @email{dominik@@science.uva.nl}
19 @set MAINTAINERCONTACT @uref{mailto:dominik@@science.uva.nl,contact the maintainer}
25 @c Subheadings inside a table. Need a difference between info and the rest.
26 @macro tsubheading{text}
36 This manual is for Org-mode (version @value{VERSION}).
38 Copyright @copyright{} 2004, 2005 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 * Timeline and Agenda:: Use time-stamped items to produce an agenda
85 * Exporting:: Sharing and publishing of notes
86 * Miscellaneous:: All the rest which did not fit elsewhere
87 * Index:: The fast road to specific information
88 * Key Index:: Key bindings and where they are described
91 --- The Detailed Node Listing ---
95 * Summary:: Brief summary of what Org-mode does
96 * Installation and Activation:: How to install Org-mode
97 * Feedback:: Bug reports, ideas, patches etc.
101 * Outlines:: Org-mode is based on outline-mode
102 * Headlines:: How to typeset org-tree headlines
103 * Visibility cycling:: Show and hide, much simplified
104 * Motion:: Jumping to other headlines
105 * Structure editing:: Changing sequence and level of headlines
106 * Archiving:: Move done task trees to a different place
107 * Sparse trees:: Matches embedded in context
111 * Built-in table editor:: Simple tables
112 * Table calculations:: Compute a field from other fields
113 * orgtbl-mode:: The table editor as minor mode
114 * table.el:: Complex tables
116 Calculations in tables
118 * Formula syntax:: How to write a formula
119 * Column formulas:: Formulas valid for all fields in a column
120 * Advanced features:: Field names, parameters and automatic recalc
121 * Named-field formulas:: Formulas valid in single fields
122 * Editing/debugging formulas:: Changing a stored formula
123 * Appetizer:: Taste the power of calc
127 * Links:: URL-like links to the world
128 * Remember:: Org-trees store quick notes
132 * TODO basics:: Marking and displaying TODO entries
133 * TODO extensions:: Workflow and assignments
134 * Priorities:: Some things are more important than others
136 Extended use of TODO keywords
138 * Workflow states:: From TODO to DONE in steps
139 * TODO types:: I do this, Fred the rest
140 * Per file keywords:: Different files, different requirements
144 * Time stamps:: Assigning a time to a tree entry
145 * Creating timestamps:: Commands which insert timestamps
149 * Timeline:: Time-sorted view for single file
150 * Agenda:: Your weekly planner
151 * Agenda commands:: Remote editing of org trees
152 * Calendar/Diary integration:: Integrating Anniversaries and more
154 Calendar/Diary integration
156 * Diary to agenda:: Agenda incorporates the diary
157 * Agenda to diary:: Diary incorporates the agenda
161 * ASCII export:: Export as a structured ASCII file
162 * HTML export:: Export as an HTML file
163 * iCalendar export:: Create calendar entries.
167 * HTML formatting:: Interpretation of the buffer content
168 * Export options:: How to influence exports
169 * Comment lines:: Lines which will not be exported
173 * Completion:: M-TAB knows what you need
174 * Customization:: Adapting Org-mode to your taste
175 * FAQ:: Frequently asked questions
176 * Interaction:: Other Emacs packages
177 * TTY keys:: Using Org-mode on a tty
178 * Bugs:: Things which do not work perfectly
179 * Acknowledgments:: These people provided feedback and more
184 @node Introduction, Document Structure, Top, Top
185 @chapter Introduction
189 * Summary:: Brief summary of what Org-mode does
190 * Installation and Activation:: How to install Org-mode
191 * Feedback:: Bug reports, ideas, patches etc.
194 @node Summary, Installation and Activation, Introduction, Introduction
198 Org-mode is a mode for keeping notes, maintaining ToDo lists, and doing
199 project planning with a fast and effective plain-text system.
201 Org-mode develops organizational tasks around NOTES files that contain
202 information about projects as plain text. Org-mode is implemented on
203 top of outline-mode, which makes it possible to keep the content of
204 large files well structured. Visibility cycling and structure editing
205 help to work with the tree. Tables are easily created with a built-in
206 table editor. Org-mode supports ToDo items, deadlines, time stamps,
207 and scheduling. It dynamically compiles entries into an agenda that
208 utilizes and smoothly integrates much of the Emacs calendar and diary.
209 Plain text URL-like links connect to websites, emails, Usenet
210 messages, BBDB entries, and any files related to the projects. For
211 printing and sharing of notes, an Org-mode file can be exported as a
212 structured ASCII file, as HTML, or (todo and agenda items only) as an
215 Org-mode keeps simple things simple. Not every outline branch needs
216 to be an action item, not every action item needs to have priority or
217 scheduling information associated with it. Org-mode can be used on
218 different levels and in different ways, for example
221 @r{@bullet{} as an outline extension with visibility cycling and structure editing}
222 @r{@bullet{} as an ASCII system and table editor to take structured notes}
223 @r{@bullet{} as an ASCII table editor with some spreadsheet-like capabilities}
224 @r{@bullet{} as a simple hypertext system, with HTML export}
225 @r{@bullet{} as a TODO list editor}
226 @r{@bullet{} as a full agenda and planner with deadlines and work scheduling}
229 The Org-mode table editor can be integrated into any major mode by
230 activating the minor Orgtbl-mode.
232 There is a website for Org-mode which provides links to the newest
233 version of Org-mode, as well as additional information, screen shots
234 and example files. This page is located at
235 @uref{http://www.astro.uva.nl/~dominik/Tools/org/}.
239 @node Installation and Activation, Feedback, Summary, Introduction
240 @section Installation and Activation
243 @cindex global keybindings
244 @cindex keybindings, global
246 If Org-mode is part of the Emacs distribution or an XEmacs package,
247 you only need to copy the following lines to your @file{.emacs} file.
248 The last two lines define @emph{global} keys for the commands
249 @command{org-store-link} and @command{org-agenda} - please choose
250 suitable keys yourself.
253 ;; The following lines are always needed. Choose your own keys.
254 (add-to-list 'auto-mode-alist '("\\.org$" . org-mode))
255 (define-key global-map "\C-cl" 'org-store-link)
256 (define-key global-map "\C-ca" 'org-agenda)
259 If you have downloaded Org-mode from the Web, you must byte-compile
260 @file{org.el} and put it on your load path. In addition to the Emacs
261 Lisp lines above, you also need to add the following lines to
265 ;; These lines only if org-mode is not part of the X/Emacs distribution.
266 (autoload 'org-mode "org" "Org mode" t)
267 (autoload 'org-diary "org" "Diary entries from Org mode")
268 (autoload 'org-agenda "org" "Multi-file agenda from Org mode" t)
269 (autoload 'org-store-link "org" "Store a link to the current location" t)
270 (autoload 'orgtbl-mode "org" "Org tables as a minor mode" t)
271 (autoload 'turn-on-orgtbl "org" "Org tables as a minor mode")
274 @cindex org-mode, turning on
275 With this setup, all files with extension @samp{.org} will be put into
276 Org-mode. As an alternative, make the first line of a file look like
280 MY PROJECTS -*- mode: org; -*-
283 @noindent which will select Org-mode for this buffer no matter what
284 the file's name is. See also the variable
285 @code{org-insert-mode-line-in-empty-file'}.
287 @node Feedback, , Installation and Activation, Introduction
294 If you find problems with Org-mode, or if you have questions, remarks,
295 or ideas about it, please contact the maintainer Carsten Dominik at
296 @value{MAINTAINEREMAIL}.
298 For bug reports, please provide as much information as possible,
299 including the version information of Emacs (@kbd{C-h v emacs-version
300 @key{RET}}) and Org-mode (@kbd{M-x org-version}), as well as the
301 Org-mode related setup in @file{.emacs}. If an error occurs, a
302 traceback can be very useful. Often a small example file helps, along
303 with clear information about:
305 @item What exactly did you do?
306 @item What did you expect to happen?
307 @item What happened instead?
309 @noindent Thanks for helping to improve this mode.
311 @node Document Structure, Tables, Introduction, Top
312 @chapter Document Structure
313 @cindex document structure
314 @cindex structure of document
316 Org-mode is based on outline mode and provides flexible commands to
317 edit the structure of the document.
320 * Outlines:: Org-mode is based on outline-mode
321 * Headlines:: How to typeset org-tree headlines
322 * Visibility cycling:: Show and hide, much simplified
323 * Motion:: Jumping to other headlines
324 * Structure editing:: Changing sequence and level of headlines
325 * Archiving:: Move done task trees to a different place
326 * Sparse trees:: Matches embedded in context
329 @node Outlines, Headlines, Document Structure, Document Structure
334 Org-mode is implemented on top of outline-mode. Outlines allow to
335 organize a document in a hierarchical structure, which (at least for
336 me) is the best representation of notes and thoughts. Overview over
337 this structure is achieved by folding (hiding) large parts of the
338 document to show only the general document structure and the parts
339 currently being worked on. Org-mode greatly simplifies the use of
340 outlines by compressing the entire show/hide functionality into a
341 single command @command{org-cycle}, which is bound to the @key{TAB}
344 @node Headlines, Visibility cycling, Outlines, Document Structure
349 Headlines define the structure of an outline tree. The Headlines in
350 Org-mode start with one or more stars, for example
359 * Another top level headline
362 @node Visibility cycling, Motion, Headlines, Document Structure
363 @section Visibility cycling
364 @cindex visibility cycling
365 @cindex trees, visibility
367 Outlines make it possible to hide parts of the text in the buffer.
368 Org-mode uses a single command bound to the @key{TAB} key to change
369 the visibility in the buffer.
371 @cindex subtree visibility states
372 @cindex folded, subtree visibility state
373 @cindex children, subtree visibility state
374 @cindex subtree, subtree visibility state
378 Rotate current subtree between the states
380 ,-> FOLDED -> CHILDREN -> SUBTREE --.
381 '-----------------------------------'
383 At the beginning of the buffer (or when called with @kbd{C-u}), this does
384 the same as the command @kbd{S-@key{TAB}} below.
386 @cindex global visibility states
387 @cindex overview, global visibility state
388 @cindex contents, global visibility state
389 @cindex show all, global visibility state
392 Rotate the entire buffer between the states
394 ,-> OVERVIEW -> CONTENTS -> SHOW ALL --.
395 '--------------------------------------'
397 Note that inside tables, @kbd{S-@key{TAB}} jumps to the previous field.
399 @cindex show all, command
405 When Emacs first visits an Org-mode file, the global state is set to
406 OVERVIEW, i.e. only the top level headlines are visible. This can be
407 configured through the variable @code{org-startup-folded}, or on a
408 per-file basis by adding one of the following lines anywhere in the
417 @node Motion, Structure editing, Visibility cycling, Document Structure
419 @cindex motion, between headlines
420 @cindex jumping, to headlines
421 The following commands jump to other headlines in the buffer.
432 Next heading same level.
435 Previous heading same level.
438 Backward to higher level heading.
441 Jump to a different place without changing the current outline
442 visibility. Shows the document structure in a temporary buffer, where
443 you can use visibility cycling (@key{TAB}) to find your destination.
444 After pressing @key{RET}, the cursor moves to the selected location in
445 the original buffer, and the headings hierarchy above it is made
449 @node Structure editing, Archiving, Motion, Document Structure
450 @section Structure editing
451 @cindex structure editing
452 @cindex headline, promotion and demotion
453 @cindex promotion, of subtrees
454 @cindex demotion, of subtrees
455 @cindex subtree, cut and paste
456 @cindex pasting, of subtrees
457 @cindex cutting, of subtrees
458 @cindex copying, of subtrees
463 Insert new heading with same level as current
464 @kindex M-S-@key{RET}
466 Insert new TODO entry with same level as current heading.
469 Promote current heading by one level
470 @kindex M-@key{right}
472 Demote current heading by one level
473 @kindex M-S-@key{left}
475 Promote the current subtree by one level
476 @kindex M-S-@key{right}
477 @item M-S-@key{right}
478 Demote the current subtree by one level
481 Move subtree up (swap with previous subtree of same level)
482 @kindex M-S-@key{down}
484 Move subtree down (swap with next subtree of same level)
487 Kill subtree, i.e. remove it from buffer but save in kill ring.
490 Copy subtree to kill ring.
493 Yank subtree from kill ring. This does modify the level of the subtree to
494 make sure the tree fits in nicely at the yank position. The yank
495 level can also be specified with a prefix arg, or by yanking after a
496 headline marker like @samp{****}.
499 @cindex region, active
500 @cindex active region
501 @cindex transient-mark-mode
502 When there is an active region (transient-mark-mode), promotion and
503 demotion work on all headlines in the region. To select a region of
504 headlines, it is best to place both point and mark at the beginning of a
505 line, mark at the beginning of the first headline, and point at the line
506 just after the last headline to change. Note that when the cursor is
507 inside a table (@pxref{Tables}), the Meta-Cursor keys have different
510 @node Archiving, Sparse trees, Structure editing, Document Structure
514 When a project represented by a (sub)tree is finished, you may want
515 to move the tree to an archive place, either in the same file under a
516 special top-level heading, or even to a different file.
520 Archive the subtree starting at the cursor position to the location
521 given by @code{org-archive-location}.
524 @cindex archive locations
525 The default archive is a file in the same directory as the current
526 file, with the name derived by appending @file{_archive} to the
527 current file name. For information and examples on how to change
528 this, see the documentation string of the variable
529 @code{org-archive-location}. If you are also using the Org-mode
530 agenda, archiving to a different file is a good way to keep archived
531 trees from contributing agenda items.
533 @node Sparse trees, , Archiving, Document Structure
534 @section Sparse trees
536 @cindex trees, sparse
537 @cindex folding, sparse trees
538 @cindex occur, command
540 An important feature of Org-mode is the ability to construct
541 @emph{sparse trees} for selected information in an outline tree. A
542 sparse tree means that the entire document is folded as much as
543 possible, but the selected information is made visible along with the
544 headline structure above it@footnote{See also the variable
545 @code{org-show-following-heading}.}. Just try it out and you will see
546 immediately how it works.
548 Org-mode contains several commands creating such trees. The most
549 basic one is @command{org-occur}:
554 Occur. Prompts for a regexp and shows a sparse tree with all matches.
555 If the match is in a headline, the headline is made visible. If the
556 match is in the body of an entry, headline and body are made visible.
557 In order to provide minimal context, also the full hierarchy of
558 headlines above the match is shown, as well as the headline following
562 Other commands are using this feature as well. For example @kbd{C-c
563 C-v} creates a sparse TODO tree (@pxref{TODO basics}).
566 @cindex printing sparse trees
567 @cindex visible text, printing
568 To print a sparse tree, you can use the Emacs command
569 @code{ps-print-buffer-with-faces} which does not print invisible parts
570 of the document @footnote{This does not work under XEmacs, because
571 XEmacs uses selective display for outlining, not text properties}.
572 Or you can use the command @kbd{C-c C-x v} to copy the visible part of
573 the document to another file (extension @file{.txt}) which then can be
574 printed in any desired way.
576 @node Tables, Hyperlinks, Document Structure, Top
580 Org-mode has a very fast and intuitive table editor built-in.
581 Spreadsheet-like calculations are supported in connection with the
582 Emacs @file{calc} package.
585 * Built-in table editor:: Simple tables
586 * Table calculations:: Compute a field from other fields
587 * orgtbl-mode:: The table editor as minor mode
588 * table.el:: Complex tables
591 @node Built-in table editor, Table calculations, Tables, Tables
592 @section The built-in table editor
593 @cindex table editor, builtin
595 Org-mode makes it easy to format tables in plain ASCII. Any line with
596 @samp{|} as the first non-white character is considered part of a
597 table. @samp{|} is also the column separator. A table might look
601 | Name | Phone | Age |
602 |-------+-------+-----|
603 | Peter | 1234 | 17 |
607 A table is re-aligned automatically each time you press @key{TAB} or
608 @key{RET} or @kbd{C-c C-c} inside the table. @key{TAB} also moves to
609 the next field (@key{RET} to the next row) and creates new table rows
610 at the end of the table or before horizontal lines. The indentation
611 of the table is set by the first line. Any line starting with
612 @samp{|-} is considered as a horizontal separator line and will be
613 expanded on the next re-align to span the whole table width. So, to
614 create the above table, you would only type
620 @noindent and then press @key{TAB} to align the table and start filling in
623 When typing text into a field, Org-mode treats @key{DEL},
624 @key{Backspace}, and all character keys in a special way, so that
625 inserting and deleting avoids shifting other fields. Also, when
626 typing @emph{immediately after the cursor was moved into a new field
627 with @kbd{@key{TAB}}, @kbd{S-@key{TAB}} or @kbd{@key{RET}}}, the
628 field is automatically made blank. If this behavior is too
629 unpredictable for you, configure the variables
630 @code{org-enable-table-editor} and @code{org-table-auto-blank-field}.
633 @tsubheading{Creation and conversion}
634 @item M-x org-table-create
635 Creates an empty Org-mode table. However, it is much easier to just
636 start typing, like @kbd{|Name|Phone|Age @key{RET} |- @key{TAB}}
640 Convert region to table. Works when the cursor is not in an existing
641 table, and when there is a region defined. If every line contains at
642 least one TAB character, the function assumes that the material is tab
643 separated. If not, lines are split at whitespace into fields. You
644 can use a prefix argument to indicate how many consecutive spaces are
645 at least required to indicate a field separator (default: just one).
647 @tsubheading{Re-aligning and field motion}
650 Re-align the table without moving the cursor.
654 Re-align the table, move to the next field. Creates a new row if
659 Re-align, move to previous field.
663 Re-align the table and move down to next row. Creates a new row if
664 necessary. At the beginning or end of a line, @key{RET} still does
665 NEWLINE, so it can be used to split a table.
667 @tsubheading{Column and row editing}
669 @kindex M-@key{right}
672 Move the current column left/right
674 @kindex M-S-@key{left}
676 Kill the current column.
678 @kindex M-S-@key{right}
679 @item M-S-@key{right}
680 Insert a new column to the left of the cursor position.
686 Move the current row up/down
690 Kill the current row or horizontal line.
692 @kindex M-S-@key{down}
694 Insert a new row above (with arg: below) the current row.
698 Insert a horizontal line below current row. With prefix arg, the line
699 is created above the current line.
701 @tsubheading{Regions}
704 Copy a rectangular region from a table to a special clipboard. Point
705 and mark determine edge fields of the rectangle. The process ignores
706 horizontal separator lines.
709 Copy a rectangular region from a table to a special clipboard, and
710 blank all fields in the rectangle. So this is the ``cut'' operation.
713 Paste a rectangular region into a table.
714 The upper right corner ends up in the current field. All involved fields
715 will be overwritten. If the rectangle does not fit into the present table,
716 the table is enlarged as needed. The process ignores horizontal separator
720 Wrap several fields in a column like a paragraph. If there is an active
721 region, and both point and mark are in the same column, the text in the
722 column is wrapped to minimum width for the given number of lines. A
723 prefix ARG may be used to change the number of desired lines. If there
724 is no region, the current field is split at the cursor position and the
725 text fragment to the right of the cursor is prepended to the field one
726 line down. If there is no region, but you specify a prefix ARG, the
727 current field gets blank, and the content is appended to the field
730 @tsubheading{Calculations}
731 @cindex formula, in tables
732 @cindex calculations, in tables
735 Install a new formula for the current column and replace current field
736 with the result of the formula.
740 Install a new formula for the current field, which must be a named
741 field. Evaluate the formula and replace the field content with the
746 Edit all formulas associated with the current table in a separate
751 Recalculate the current row by applying the stored formulas from left
752 to right. When called with a @kbd{C-u} prefix, recalculate the
753 entire table, starting with the first non-header line (i.e. below the
754 first horizontal separator line). For details, see @ref{Table calculations}.
758 Rotate the calculation mark in first column through the states
759 @samp{}, @samp{#}, @samp{*}, @samp{!}, @samp{$}. For the meaning of
760 these marks see @ref{Advanced features}. When there is an active
761 region, change all marks in the region.
765 Which table column is the cursor in? Displays number >0 in echo
768 @cindex region, active
769 @cindex active region
770 @cindex transient-mark-mode
773 Sum the numbers in the current column, or in the rectangle defined by
774 the active region. The result is shown in the echo area and can
775 be inserted with @kbd{C-y}.
779 When current field is empty, copy from first non-empty field above.
780 When not empty, copy current field down to next row and move cursor
781 along with it. Depending on the variable
782 @code{org-table-copy-increment}, integer field values will be
783 incremented during copy. This key is also used by CUA-mode
784 (@pxref{Interaction}).
786 @tsubheading{Miscellaneous}
789 Toggle the visibility of vertical lines in tables. The lines are
790 still there, only made invisible with a text property. Any @samp{|}
791 added by hand will become invisible on the next align.
793 @item M-x org-table-import
794 Import a file as a table. The table should be TAB- or whitespace
795 separated. Useful for example to import an Excel table or data from a
796 database, because these programs generally can write TAB-separated text
797 files. This command works by inserting the file into the buffer and
798 then converting the region to a table. Any prefix argument is passed on
799 to the converter, which uses it to determine the separator.
801 @item M-x org-table-export
802 Export the table as a TAB-separated file. Useful for data exchange with
803 for example Excel or database programs.
807 If you don't like the automatic table editor because it gets into your
808 way in lines which you would like to start with @samp{|}, you can turn
811 (setq org-enable-table-editor nil)
813 @noindent The only table command which then still works is
814 @kbd{C-c C-c} to do a manual re-align.
816 @node Table calculations, orgtbl-mode, Built-in table editor, Tables
817 @section Calculations in tables
818 @cindex calculations, in tables
820 The table editor makes use of the Emacs @file{calc} package to
821 implement spreadsheet-like capabilities. Org-mode has two levels of
822 complexity for table calculations. On the basic level, tables do only
823 horizontal computations, so a field can be computed from other fields
824 @emph{in the same row}, and Org-mode assumes that there is only one
825 formula for each column. This is very efficient to work with and
826 enough for many tasks. On the complex level, columns and individual
827 fields can be named for easier referencing in formulas, individual
828 named fields can have their own formula associated with them, and
829 recalculation can be automated.
832 * Formula syntax:: How to write a formula
833 * Column formulas:: Formulas valid for all fields in a column
834 * Advanced features:: Field names, parameters and automatic recalc
835 * Named-field formulas:: Formulas valid in single fields
836 * Editing/debugging formulas:: Changing a stored formula
837 * Appetizer:: Taste the power of calc
840 @node Formula syntax, Column formulas, Table calculations, Table calculations
841 @subsection Formula syntax
843 A formula can be any algebraic expression understood by the Emacs
844 @file{calc} package. Before evaluation by @code{calc-eval}
845 (@pxref{Calling Calc from Your Lisp Programs,calc-eval,Calling calc
846 from Your Lisp Programs,calc,GNU Emacs Calc Manual}), variable
847 substitution takes place:
850 $ @r{refers to the current field}
851 $3 @r{refers to the field in column 3 of the current row}
852 $3..$7 @r{a vector of the fields in columns 3-7 of current row}
853 $P1..$P3 @r{vector of column range, using column names}
854 &2 @r{second data field above the current, in same column}
855 &5-2 @r{vector from fifth to second field above current}
856 &III-II @r{vector of fields between 2nd and 3rd hline above}
857 &III @r{vector of fields between third hline above and current field}
858 $name @r{a named field, parameter or constant}
861 The range vectors can be directly fed into the calc vector functions
862 like functions @samp{vmean} and @samp{vsum}.
864 @samp{$name} is interpreted as the name of a column, parameter or
865 constant. Constants are defined globally through the variable
866 @code{org-table-formula-constants}. If you have the
867 @file{constants.el} package, it will also be used to resolve
868 constants, including natural constants like @samp{$k} for Planck's
869 constant, units like @samp{$km} for kilometers. Column names and
870 parameters can be specified in special table lines. These are
871 described below, see @ref{Advanced features}.
873 A formula can contain an optional mode string after a semicolon. This
874 string consists of flags to influence calc's modes@footnote{By
875 default, Org-mode uses the standard calc modes (precision 12, angular
876 units degrees, fraction and symbolic modes off). However, the display
877 format has been changed to @code{(float 5)} to keep tables compact.
878 The default settings can be configured using the variable
879 @code{org-calc-default-modes}.} during execution, e.g. @samp{p20} to
880 switch the internal precision to 20 digits, @samp{n3}, @samp{s3},
881 @samp{e2} or @samp{f4} to switch to normal, scientific, engineering,
882 or fix display format, respectively, and @samp{D}, @samp{R}, @samp{F},
883 and @samp{S} to turn on degrees, radians, fraction and symbolic modes,
884 respectively. In addition, you may provide a @code{printf} format
885 specifier to reformat the final result. A few examples:
887 $1+$2 @r{Sum of first and second field}
888 $1+$2;%.2f @r{Same, format result to two decimals}
889 exp($2)+exp($1) @r{Math functions can be used}
890 $;%.1f @r{Reformat current cell to 1 decimal}
891 ($3-32)*5/9 @r{Degrees F -> C conversion}
892 $c/$1/$cm @r{Hz -> cm conversion, using @file{constants.el}}
893 tan($1);Dp3s1 @r{Compute in degrees, precision 3, display SCI 1}
894 sin($1);Dp3%.1e @r{Same, but use printf specifier for display}
895 vmean($2..$7) @r{Compute column range mean, using vector function}
896 vsum(&III) @r{Sum numbers from 3rd hline above to here}
897 taylor($3,x=7,2) @r{taylor series of $3, at x=7, second degree}
900 @node Column formulas, Advanced features, Formula syntax, Table calculations
901 @subsection Column formulas
903 To apply a formula to a field, type it directly into the field,
904 preceded by an equal sign, like @samp{=$1+$2}. When you press
905 @key{TAB} or @key{RET} or @kbd{C-c C-c} with the cursor still in the
906 field, the formula will be stored as the formula for the current
907 column, evaluated and the current field replaced with the result. If
908 the field contains only @samp{=}, the previously stored formula for
911 For each column, Org-mode will remember the most recently used
912 formula. The information is stored in a special line starting with
913 @samp{#+TBLFM} directly below the table. When adding/deleting/moving
914 columns with the appropriate commands, the stored equations will be
915 modified accordingly. When a column used in a calculation is removed,
916 references to this column become invalid and will cause an error upon
917 applying the equation.
919 Instead of typing an equation into the field, you may also use the
920 command @kbd{C-c =}. It prompts for a formula (with default taken
921 from the @samp{#+TBLFM:} line) and applies it to the current field. A
922 numerical prefix (e.g. @kbd{C-5 C-c =}) will apply it to that many
923 subsequent fields in the current column.
925 To recompute all the fields in a line, use the command @kbd{C-c *}.
926 It re-applies all stored equations to the current row, from left to
927 right. With a @kbd{C-u} prefix, this will be done to every line in
928 the table, so use this command it you want to make sure the entire
929 table is up-to-date. @kbd{C-u C-c C-c} is another way to update the
930 entire table. Global updating does not touch the line(s) above the
931 first horizontal separator line, assuming that this is the table
934 @node Advanced features, Named-field formulas, Column formulas, Table calculations
935 @subsection Advanced features
937 If you want want the recalculation of fields to happen automatically,
938 or if you want to be able to assign a formula to an individual field
939 (instead of an entire column) you need to reserve the first column of
940 the table for special marking characters. Here is an example of a
941 table that collects exam results of students and makes use of these
945 |---+---------+--------+--------+--------+-------+------|
946 | | Student | Prob 1 | Prob 2 | Prob 3 | Total | Note |
947 |---+---------+--------+--------+--------+-------+------|
948 | ! | | P1 | P2 | P3 | Tot | |
949 | # | Maximum | 10 | 15 | 25 | 50 | 10.0 |
950 | ^ | | m1 | m2 | m3 | mt | |
951 |---+---------+--------+--------+--------+-------+------|
952 | # | Peter | 10 | 8 | 23 | 41 | 8.2 |
953 | # | Sara | 6 | 14 | 19 | 39 | 7.8 |
954 | # | Sam | 2 | 4 | 3 | 9 | 1.8 |
955 |---+---------+--------+--------+--------+-------+------|
956 | | Average | | | | 29.7 | |
958 | $ | max=50 | | | | | |
959 |---+---------+--------+--------+--------+-------+------|
960 #+TBLFM: $6=vsum($P1..$P3)::$7=10*$Tot/$max;%.1f::$at=vmean(&II);%.1f
964 @noindent @b{Important}: Please note that for these special tables,
965 recalculating the table with @kbd{C-u C-c *} does only affect rows
966 which are marked @samp{#} or @samp{*}, and named fields. The column
967 formulas are not applied in rows with empty first field.
969 The marking characters have the following meaning:
972 The fields in this line define names for the columns, so that you may
973 refer to a column as @samp{$Tot} instead of @samp{$6}.
975 This row define names for the fields @emph{above} the row. With such
976 a definition, any formula in the table may use @samp{$m1} to refer to
977 the value @samp{10}. Also, named fields can have their own formula
978 associated with them.
980 Similar to @samp{^}, but defines names for the fields in the row
983 Fields in this row can define @emph{parameters} for formulas. For
984 example, if a field in a @samp{$} row contains @samp{max=50}, then
985 formulas in this table can refer to the value 50 using @samp{$max}.
986 Parameters work exactly like constants, only that they can be defined on
987 a per-table basis. Changing a parameter and then recalculating the
990 Fields in this row are automatically recalculated when pressing
991 @key{TAB} or @key{RET} or @kbd{S-@key{TAB}} in this row. Also, this row
992 is selected for a global recalculation with @kbd{C-u C-c *}. Unmarked
993 lines will be left alone by this command.
995 Selects this line for global recalculation with @kbd{C-u C-c *}, but
996 not for automatic recalculation. Use this when automatic
997 recalculation slows down editing too much.
999 Unmarked lines are exempted from recalculation with @kbd{C-u C-c *}.
1000 All lines that should be recalculated should be marked with @samp{#}
1004 @node Named-field formulas, Editing/debugging formulas, Advanced features, Table calculations
1005 @subsection Named-field formulas
1007 A named field can have its own formula associated with it. In the
1008 example above, this is used for the @samp{at} field that contains
1009 the average result of the students. To enter a formula for a named
1010 field, just type it onto the buffer, preceded by @samp{:=}. Or use
1011 @kbd{C-u C-c =}. This equation will be stored below the table like
1012 @samp{$name=...}. Any recalculation in the table (even if only
1013 requested for the current line) will also update all named field
1016 @node Editing/debugging formulas, Appetizer, Named-field formulas, Table calculations
1017 @subsection Editing and debugging formulas
1019 To edit a column or field formula, you can use the commands @kbd{C-c
1020 =} and @kbd{C-u C-c =}, respectively. The currently active expression
1021 is then presented as default in the minibuffer, were it may be edited.
1023 Note that making a table field blank does not remove the formula
1024 associated with the field - during the next recalculation the field
1025 will be filled again. To remove a formula from a field, you have to
1026 give an empty reply when prompted for the formula, or to edit the
1027 @samp{#+TBLFM} line.
1030 You may edit the @samp{#+TBLFM} directly and re-apply
1031 the changed equations with @kbd{C-c C-c} in that line, or with the
1032 normal recalculation commands in the table.
1038 In particular for large tables with many formulas, it is convenient to
1039 use the command @kbd{C-c '} to edit the formulas of the current table
1040 in a separate buffer. That buffer will show the formulas one per
1041 line, and you are free to edit, add and remove formulas. Press
1042 @kbd{C-c ?} on a @samp{$...} expression to get information about its
1043 interpretation. Exiting the buffer with @kbd{C-c C-c} only stores the
1044 modified formulas below the table. Exiting with @kbd{C-u C-c C-c}
1045 also applies them to the entire table. @kbd{C-c C-q} exits without
1046 installing the changes.
1048 When the evaluation of a formula leads to an error, the field content
1049 becomes the string @samp{#ERROR}. If you would like see what is going
1050 on during variable substitution and calculation in order to find a
1051 bug, turn on formula debugging in the menu and repeat the calculation
1052 by pressing, for example by pressing @kbd{C-c = @key{RET}} in a field.
1053 Detailed information will be displayed.
1055 @node Appetizer, , Editing/debugging formulas, Table calculations
1056 @subsection Appetizer
1058 Finally, just to wet your appetite on what can be done with the fantastic
1059 @file{calc} package, here is a table that computes the Taylor series
1060 for a couple of functions (homework: try that with Excel :-)
1064 |---+-------------+---+-----+--------------------------------------|
1065 | | Func | n | x | Result |
1066 |---+-------------+---+-----+--------------------------------------|
1067 | # | exp(x) | 1 | x | 1 + x |
1068 | # | exp(x) | 2 | x | 1 + x + x^2 / 2 |
1069 | # | exp(x) | 3 | x | 1 + x + x^2 / 2 + x^3 / 6 |
1070 | # | x^2+sqrt(x) | 2 | x=0 | x*(0.5 / 0) + x^2 (2 - 0.25 / 0) / 2 |
1071 | # | x^2+sqrt(x) | 2 | x=1 | 2 + 2.5 x - 2.5 + 0.875 (x - 1)^2 |
1072 | * | tan(x) | 3 | x | 0.0175 x + 1.77e-6 x^3 |
1073 |---+-------------+---+-----+--------------------------------------|
1074 #+TBLFM: $5=taylor($2,$4,$3);n3
1078 @node orgtbl-mode, table.el, Table calculations, Tables
1079 @section The Orgtbl minor mode
1081 @cindex minor mode for tables
1083 If you like the intuitive way the Org-mode table editor works, you
1084 might want to use it also in other modes like text-mode or mail-mode.
1085 The minor mode Orgtbl-mode makes this possible. You can always toggle
1086 the mode with @kbd{M-x orgtbl-mode}. To turn it on by default, for
1087 example in mail mode, use
1089 (add-hook 'mail-mode-hook 'turn-on-orgtbl)
1092 @node table.el, , orgtbl-mode, Tables
1093 @section The @file{table.el} package
1095 @cindex table editor, @file{table.el}
1096 @cindex @file{table.el}
1098 Complex ASCII tables with automatic line wrapping, column- and
1099 row-spanning, and alignment can be created using the Emacs table
1100 package by Takaaki Ota (@uref{http://sourceforge.net/projects/table}).
1101 When @key{TAB} or @kbd{C-c C-c} is pressed in such a table, Org-mode
1102 will call @command{table-recognize-table} and move the cursor into the
1103 table. Inside a table, the keymap of Org-mode is inactive. In order
1104 to execute Org-mode-related commands, leave the table.
1109 Recognize @file{table.el} table. Works when the cursor is in a
1114 Insert a table.el table. If there is already a table at point, this
1115 command converts it between the table.el format and the Org-mode
1116 format. See the documentation string of the command
1117 @code{org-convert-table} for the restrictions under which this is
1121 @node Hyperlinks, TODO items, Tables, Top
1125 Just like HMTL, Org-mode provides links to other files, Usenet
1126 articles, emails and much more.
1129 * Links:: URL-like links to the world
1130 * Remember:: Org-trees store quick notes
1133 @node Links, Remember, Hyperlinks, Hyperlinks
1142 @cindex WANDERLUST links
1143 @cindex USENET links
1146 Org-mode supports links to files, websites, Usenet and email messages;
1147 and BBDB database entries. Links are just plain-text URL-like
1148 locators, optionally enclosed by angular brackets. The following list
1149 shows examples for each link type.
1152 <http://www.astro.uva.nl/~dominik> @r{on the web}
1153 <file:/home/dominik/images/jupiter.jpg> @r{file, absolute path}
1154 <file:papers/last.pdf> @r{file, relative path}
1155 <file:~/code/main.c:255> @r{file, with line number}
1156 <news:comp.emacs> @r{Usenet link}
1157 <mailto:adent@@galaxy.net> @r{Mail link}
1158 <vm:folder> @r{VM folder link}
1159 <vm:folder#id> @r{VM message link}
1160 <vm://myself@@some.where.org/folder#id> @r{VM on remote machine}
1161 <wl:folder> @r{WANDERLUST folder link}
1162 <wl:folder#id> @r{WANDERLUST message link}
1163 <rmail:folder> @r{RMAIL folder link}
1164 <rmail:folder#id> @r{RMAIL message link}
1165 <gnus:group> @r{GNUS group link}
1166 <gnus:group#id> @r{GNUS article link}
1167 <bbdb:Richard Stallman> @r{BBDB link}
1168 <shell:ls *.org>@footnote{Note that @samp{<} and @samp{>} cannot be part of a link, and therefore of a shell command. If you need redirection, use @@@{ and @@@} instead.} @r{A shell command}
1171 A link may contain space characters and is terminated by @samp{>} or by
1172 the end of a line. In tables, the end of a table field also terminates
1173 a link. Angle brackets around a link are not required, but are
1174 recommended to avoid problems with punctuation and other text following
1175 the link. See also the variable @code{org-allow-space-in-links}.
1177 @cindex storing links
1181 Store a link to the current location. This is a @emph{global} command
1182 which can be used in any buffer to create a link. The link will be
1183 stored for later insertion into an Org-mode buffer (see below). For VM,
1184 RMAIL, WANDERLUST, GNUS and BBDB buffers, the link will point to the
1185 current article/entry. For W3 and W3M buffer, the link goes to the
1186 current URL. For any other files, the link will just point to the file.
1187 The key binding @kbd{C-c l} is only a suggestion - see
1188 @ref{Installation and Activation}.
1191 @cindex completion, of links
1192 @cindex completion, of file names
1194 Insert a link. This prompts for a link to be inserted into the
1195 buffer. You can just type a link, using one of the link type prefixes
1196 mentioned in the examples above. Through completion, all links stored
1197 during the current session can be accessed. When called with prefix
1198 arg, you can use file name completion to enter a file link. The link
1199 will be formatted as given in the variable @code{org-link-format} and
1200 inserted into the buffer. Note that you don't have to use this
1201 command to insert a link. Links in Org-mode are plain text, and you
1202 can type or paste them straight into the buffer.
1204 @cindex inserting links
1207 Open link at point. This will launch a web browser for URLs (using
1208 @command{browse-url-at-point}), run vm/gnus/bbdb for the corresponding
1209 links, execute the command in a shell link, visit text files with
1210 Emacs and select a suitable application for non-text files.
1211 Classification of files is based on file extension only. See option
1212 @code{org-file-apps}. If there is no link at point, the current
1213 subtree will be searched for one. If you want to override the default
1214 application and visit the file with Emacs, use a @kbd{C-u} prefix.
1215 If the cursor is on a time stamp, compiles the agenda for that date.
1217 @strong{IMPORTANT}: Be careful not to use any dangerous commands in a
1222 On links, @kbd{mouse-2} will open the link just like @kbd{C-c C-o} would.
1226 Like @kbd{mouse-2}, but force file links to be opened with Emacs.
1229 @node Remember, , Links, Hyperlinks
1231 @cindex @file{remember.el}
1233 Another way to create org entries with links to other files is through
1234 the @emph{Remember} package by John Wiegley. @emph{Remember} lets you
1235 store quick notes with little interruption of your work flow. See
1236 @uref{http://www.emacswiki.org/cgi-bin/wiki/RememberMode} for more
1237 information. The notes produced by @emph{Remember} can be stored in
1238 different ways, and Org-mode files are a good target. Org-mode allows
1239 to file away notes either to a default file, or directly to the
1240 correct location in your Org-mode outline tree. The following
1241 customization@footnote{The two autoload forms are only necessary if
1242 @file{org.el} is not part of the Emacs distribution or and XEmacs
1243 package.} will tell @emph{Remember} to use org files as target, and to
1244 create annotations compatible with Org-mode links.
1247 (autoload 'org-remember-annotation "org")
1248 (autoload 'org-remember-handler "org")
1249 (setq org-directory "~/path/to/my/orgfiles/")
1250 (setq org-default-notes-file "~/.notes")
1251 (setq remember-annotation-functions '(org-remember-annotation))
1252 (setq remember-handler-functions '(org-remember-handler))
1255 When you compose a note with remember, you have to press @kbd{C-c C-c}
1256 to exit remember-mode and to file away the note. The handler first
1257 prompts for a target file - if you press @key{RET}, the value of
1258 @code{org-default-notes-file} is used. Then the command offers the
1259 headings tree of the selected file. You can either immediately press
1260 @key{RET} to get the note appended to the file. Or you can use
1261 vertical cursor motion (@key{up} and @key{down}) and visibility
1262 cycling (@key{TAB}) to find a better place. Pressing @key{RET} or
1263 @key{left} or @key{right} leads to the following result.
1265 @multitable @columnfractions 0.2 0.1 0.7
1266 @item @b{Cursor position} @tab @b{Key} @tab @b{Note gets inserted}
1267 @item buffer-start @tab @key{RET} @tab as level 2 heading at end of file
1268 @item on headline @tab @key{RET} @tab as sublevel of the heading at cursor
1269 @item @tab @key{left} @tab as same level, before current heading
1270 @item @tab @key{right} @tab as same level, after current heading
1271 @item not on headline @tab @key{RET}
1272 @tab at cursor position, level taken from context.
1273 Or use prefix arg to specify level manually.
1276 So a fast way to store the note is to press @kbd{C-c C-c @key{RET}
1277 @key{RET}} to append it to the default file. Even shorter would be
1278 @kbd{C-u C-c C-c}, which does the same without even showing the tree.
1279 But with little extra effort, you can push it directly to the correct
1282 Before inserting the text into a tree, the function ensures that the
1283 text has a headline, i.e. a first line that starts with a @samp{*}.
1284 If not, a headline is constructed from the current date and some
1285 additional data. If the variable @code{org-adapt-indentation} is
1286 non-nil, the entire text is also indented so that it starts in the
1287 same column as the headline (after the asterisks).
1289 @node TODO items, Timestamps, Hyperlinks, Top
1293 Org-mode does not maintain TODO lists as a separate document. TODO
1294 items are an integral part of the notes file, because TODO items
1295 usually come up while taking notes! With Org-mode, you simply mark
1296 any entry in a tree as being a TODO item. In this way, the
1297 information is not duplicated, and the entire context from which the
1298 item emerged is always present when you check.
1300 Of course, this technique causes TODO items to be scattered throughout
1301 your file. Org-mode provides methods to give you an overview over all
1302 things you have to do.
1305 * TODO basics:: Marking and displaying TODO entries
1306 * TODO extensions:: Workflow and assignments
1307 * Priorities:: Some things are more important than others
1310 @node TODO basics, TODO extensions, TODO items, TODO items
1311 @section Basic TODO functionality
1313 Any headline can become a TODO item by starting it with the word TODO,
1317 *** TODO Write letter to Sam Fortune
1321 The most important commands to work with TODO entries are:
1326 Rotate the TODO state of the current item between
1328 ,-> (unmarked) -> TODO -> DONE --.
1329 '--------------------------------'
1331 The same rotation can also be done ``remotely'' from the timeline and
1332 agenda buffers with the @kbd{t} command key (@pxref{Agenda commands}).
1334 @cindex sparse tree, for TODO
1336 View TODO items in a @emph{sparse tree} (@pxref{Sparse trees}). Folds
1337 the entire buffer, but shows all TODO items and the headings hierarchy
1338 above them. With prefix arg, show also the DONE entries.
1340 A @kbd{C-u} argument to the @code{org-agenda command} (@pxref{Agenda})
1341 collects all unfinished TODO items into a single place.
1344 @node TODO extensions, Priorities, TODO basics, TODO items
1345 @section Extended use of TODO keywords
1346 @cindex extended TODO keywords
1348 The default implementation of TODO entries is just two states: TODO
1349 and DONE. You can, however, use the TODO feature for more
1350 complicated things by configuring the variables
1351 @code{org-todo-keywords} and @code{org-todo-interpretation}. Using
1352 special setup, you can even use TODO keywords in different ways in
1353 different org files.
1356 * Workflow states:: From TODO to DONE in steps
1357 * TODO types:: I do this, Fred the rest
1358 * Per file keywords:: Different files, different requirements
1361 @node Workflow states, TODO types, TODO extensions, TODO extensions
1362 @subsection TODO keywords as workflow states
1363 @cindex TODO workflow
1364 @cindex workflow states as TODO keywords
1366 You can use TODO keywords to indicate different states in the process
1367 of working on an item, for example
1370 (setq org-todo-keywords '("TODO" "FEEDBACK" "VERIFY" "DONE")
1371 org-todo-interpretation 'sequence)
1374 @cindex completion, of TODO keywords
1375 Changing these variables becomes only effective in a new Emacs session.
1376 With this setup, the command @kbd{C-c C-t} will cycle an entry from
1377 TODO to FEEDBACK, then to VERIFY, and finally to DONE. You may also
1378 use a prefix argument to quickly select a specific state. For example
1379 @kbd{C-3 C-c C-t} will change the state immediately to VERIFY.
1380 If you define many keywords, you can use in-buffer completion (see
1381 @ref{Completion}) to insert these words into the buffer.
1383 @node TODO types, Per file keywords, Workflow states, TODO extensions
1384 @subsection TODO keywords as types
1386 @cindex names as TODO keywords
1387 @cindex types as TODO keywords
1389 The second possibility is to use TODO keywords to indicate different
1390 types of action items. For example, you might want to indicate that
1391 items are for ``work'' or ``home''. Or, when you work with several
1392 people on a single project, you might want to assign action items
1393 directly to persons, by using their names as TODO keywords. This
1394 would be set up like this:
1397 (setq org-todo-keywords '("Fred" "Sara" "Lucy" "Mike" "DONE")
1398 org-todo-interpretation 'type)
1401 In this case, different keywords do not indicate a sequence, but
1402 rather different types. So it is normally not useful to change from
1403 one type to another. Therefore, in this case the behavior of the
1404 command @kbd{C-c C-t} is changed slightly@footnote{This is also true
1405 for the @kbd{t} command in the timeline and agenda buffers.}. When
1406 used several times in succession, it will still cycle through all
1407 names. But when you return to the item after some time and
1408 execute @kbd{C-c C-t} again, it will switch from each name directly to
1409 DONE. Use prefix arguments or completion to quickly select a specific
1412 @node Per file keywords, , TODO types, TODO extensions
1413 @subsection Setting up TODO keywords for individual files
1414 @cindex keyword options
1415 @cindex per file keywords
1417 It can be very useful to use different aspects of the TODO mechanism
1418 in different files, which is not possible with the global settings
1419 described above. For file-local settings, you need to add special
1420 lines to the file which set the keywords and interpretation for that
1421 file only. For example, to set one of the two examples discussed
1422 above, you need one of the following lines, starting in column zero
1423 anywhere in the file:
1426 #+SEQ_TODO: TODO FEEDBACK VERIFY DONE
1427 #+TYP_TODO: Fred Sara Lucy Mike DONE
1430 @cindex Completion, of option keywords
1432 @noindent To make sure you are using the correct keyword, type
1433 @samp{#+} into the buffer and then use @kbd{M-@key{TAB}} completion.
1435 @cindex DONE, final TODO keyword
1436 Remember that the last keyword must always mean that the item is DONE
1437 (you may use a different word, though). Also note that in each file,
1438 only one of the two aspects of TODO keywords can be used. After
1439 changing one of these lines, use @kbd{C-c C-c} with the cursor still
1440 in the line to make the changes known to Org-mode@footnote{Org-mode
1441 parses these lines only when Org-mode is activated after visiting a
1442 file. @kbd{C-c C-c} with the cursor in a line starting with @samp{#+}
1443 is simply restarting Org-mode, making sure that these changes will be
1446 If you want to use very many keywords, for example when working with a
1447 large group of people, you may split the names over several lines:
1450 #+TYP_TODO: Fred Sara Lucy Mike
1451 #+TYP_TODO: Luis George Jules Jessica
1452 #+TYP_TODO: Kim Arnold Peter
1456 @node Priorities, , TODO extensions, TODO items
1460 If you use Org-mode extensively to organize your work, you may end up
1461 with a number of TODO entries so large that you'd like to prioritize
1462 them. This can be done by placing a @emph{priority cookie} into the
1466 *** TODO [#A] Write letter to Sam Fortune
1470 With its standard setup, Org-mode supports priorities @samp{A},
1471 @samp{B}, and @samp{C}. @samp{A} is the highest priority. An entry
1472 without a cookie is treated as priority @samp{B}. Priorities make a
1473 difference only in the agenda (@pxref{Agenda}).
1478 Set the priority of the current item. The command prompts for a
1479 priority character @samp{A}, @samp{B} or @samp{C}. When you press
1480 @key{SPC} instead, the priority cookie is removed from the headline.
1481 The priorities can also be changed ``remotely'' from the timeline and
1482 agenda buffer with the @kbd{,} command (@pxref{Agenda commands}).
1485 @kindex S-@key{down}
1488 Increase/decrease priority of current item. Note that these keys are
1489 also used to modify time stamps (@pxref{Creating timestamps}).
1490 Furthermore, these keys are also used by CUA-mode
1491 (@pxref{Interaction}).
1496 @node Timestamps, Timeline and Agenda, TODO items, Top
1499 Items can be labeled with timestamps to make them useful for project
1503 * Time stamps:: Assigning a time to a tree entry
1504 * Creating timestamps:: Commands which insert timestamps
1508 @node Time stamps, Creating timestamps, Timestamps, Timestamps
1509 @section Time stamps, deadlines and scheduling
1514 A time stamp is a specification of a date (possibly with time) in a
1515 special format, either @samp{<2003-09-16 Tue>} or @samp{<2003-09-16
1516 Tue 09:39>}. A time stamp can appear anywhere in the headline or body
1517 of an org-tree entry. Its presence allows to show entries on specific
1518 dates in the agenda (@pxref{Agenda}). We distinguish:
1523 A simple time stamp just assigns a date/time to an item. In the
1524 timeline and agenda displays, the headline of the entry will be shown
1525 exactly on that date.
1529 Two time stamps connected by @samp{--} denote a time range. The
1530 headline will be shown on the first and last day of the range, and on
1531 any dates that are displayed and fall in the range. Here is an
1535 ** Meeting in Amsterdam
1536 <2004-08-23 Mon>--<2004-08-26 Thu>
1540 @cindex DEADLINE keyword
1541 If a time stamp is preceded by the word @samp{DEADLINE:}, the task
1542 (most likely a TODO item) is supposed to be finished on that date, and
1543 it will be listed then. In addition, the compilation for @emph{today}
1544 will carry a warning about the approaching or missed deadline,
1545 starting @code{org-deadline-warning-days} before the due date, and
1546 continuing until the entry is marked DONE. An example:
1549 *** TODO write article about the Earth for the Guide
1550 The editor in charge is <bbdb:Ford Prefect>
1551 DEADLINE: <2004-02-29 Sun>
1555 @cindex SCHEDULED keyword
1556 If a time stamp is preceded by the word @samp{SCHEDULED:}, it means
1557 you are planning to start working on that task on the given date. The
1558 headline will be listed under the given date. In addition, a reminder
1559 that the scheduled date has passed will be present in the compilation
1560 for @emph{today}, until the entry is marked DONE. I.e., the
1561 task will automatically be forwarded.
1564 @node Creating timestamps, , Time stamps, Timestamps
1565 @section Creating timestamps
1566 @cindex creating timestamps
1568 For Org-mode to recognize time stamps, they need to be in the specific
1569 format. All commands listed below produce time stamps in the correct
1575 Prompt for a date and insert a corresponding time stamp. When the
1576 cursor is at a previously used time stamp, it is updated to NOW. When
1577 this command is used twice in succession, a time range is inserted.
1581 Like @kbd{C-c .}, but use the alternative format which contains date
1586 Like @kbd{C-c .}, but insert an inactive time stamp not triggering the
1591 Insert a time stamp corresponding to the cursor date in the Calendar.
1595 Access the Emacs calendar for the current date. If there is a
1596 timestamp in the current line, goto the corresponding date
1601 Access the agenda for the date given by the time stamp at point
1606 Insert @samp{DEADLINE} keyword along with a stamp.
1608 @cindex sparse tree, for deadlines
1610 Create a sparse tree with all deadlines that are either past-due, or
1611 which will become due within @code{org-deadline-warning-days}.
1612 With @kbd{C-u} prefix, show all deadlines in the file. With a numeric
1613 prefix, check that many days. For example, @kbd{C-1 C-c C-w} shows
1614 all deadlines due tomorrow.
1618 Insert @samp{SCHEDULED} keyword along with a stamp.
1620 @kindex S-@key{left}
1621 @kindex S-@key{right}
1623 @itemx S-@key{right}
1624 Change date at cursor by one day. These key bindings conflict with
1625 CUA-mode (@pxref{Interaction}).
1628 @kindex S-@key{down}
1631 Change the item under the cursor in a timestamp. The cursor can be on
1632 a year, month, day, hour or minute. Note that if the cursor is not at
1633 a time stamp, these same keys modify the priority of an item.
1634 (@pxref{Priorities}). The key bindings also conflict with CUA-mode
1635 (@pxref{Interaction}).
1639 @cindex evaluate time range
1641 Evaluate a time range by computing the difference between start and
1642 end. With prefix arg, insert result after the time range (in a table:
1643 into the following column).
1646 @cindex date, reading in minibuffer
1647 @cindex time, reading in minibuffer
1648 @cindex calendar, for selecting date
1649 When Org-mode prompts for a date/time, the function reading your input
1650 will replace anything you choose not to specify with the current date
1651 and time. For details, see the documentation string of
1652 @command{org-read-date}. Also, a calender will pop up to allow
1653 selecting a date. The calendar can be fully controlled from the
1654 minibuffer, and a date can be selected with the following commands:
1659 Scroll calendar backwards by one month.
1662 Scroll calendar forwards by one month.
1665 Select date by clicking on it.
1666 @kindex S-@key{right}
1669 @kindex S-@key{left}
1672 @kindex S-@key{down}
1678 @kindex M-S-@key{right}
1679 @item M-S-@key{right}
1681 @kindex M-S-@key{left}
1682 @item M-S-@key{left}
1686 Choose date in calendar (only if nothing typed into minibuffer).
1689 @node Timeline and Agenda, Exporting, Timestamps, Top
1690 @chapter Timeline and Agenda
1693 We have already described three commands to filter important
1694 information in an org file into a sparse tree (@pxref{Sparse trees}):
1696 @cindex sparse trees
1699 The TODO tree, (@kbd{C-c C-v}), see @ref{TODO items}.
1701 The occur tree @kbd{C-c /}, see @ref{TODO items}.
1703 Checking upcoming deadlines with @kbd{C-c C-w}, see @ref{Creating
1708 Instead of using the sparse trees, Org-mode can also collect and
1709 time-sort the important items into a separate buffer, which we call
1710 the @emph{timeline} of the org file. It can also collect information
1711 from a @emph{list of files} and in this way provide an @emph{agenda}
1712 which covers all of your current projects, action items and
1716 * Timeline:: Time-sorted view for single file
1717 * Agenda:: Your weekly planner
1718 * Agenda commands:: Remote editing of org trees
1719 * Calendar/Diary integration:: Integrating Anniversaries and more
1722 @node Timeline, Agenda, Timeline and Agenda, Timeline and Agenda
1723 @section Timeline for a single file
1724 @cindex single file summary
1725 @cindex agenda, for single file
1726 @cindex timeline, single file
1727 @cindex time-sorted view
1729 The timeline shows all time-stamped items in a single Org-mode file,
1730 in @emph{time-sorted view}. The main purpose of this command is to
1731 give an overview over events in a project.
1736 Show a time-sorted view of the org file, with all time-stamped items
1737 of today or later. When called with a @kbd{C-u} prefix, past dates
1738 will be included as well. When called with two @kbd{C-u C-u}
1739 prefixes, all unfinished TODO entries (scheduled or not) are also
1740 listed under the current date.
1744 The timeline is shown in a temporary buffer @file{*Org Agenda*}. The
1745 commands available in the Agenda buffer are listed in @ref{Agenda
1748 @node Agenda, Agenda commands, Timeline, Timeline and Agenda
1752 An agenda can be compiled from one or more org files. The main
1753 purpose of this command is to act like a paper agenda, showing you all
1754 the tasks for the current day or week.
1756 The Org-mode files to be processed in order to generate the agenda are
1757 listed in the variable @code{org-agenda-files}. You can customize
1758 this variable, but the easiest way to maintain it is through the
1761 @cindex files, adding to agenda list
1765 Add current file to the list of agenda files
1768 Remove current file from the list of agenda files.
1771 The Org menu contains the list of all files and can be used to quickly
1774 The global command @command{org-agenda} compiles the agenda from all
1778 @cindex org-agenda, command
1781 Compile an agenda for the current week from a list of org files. The
1782 agenda shows the entries for each day. With a @kbd{C-u} prefix (or
1783 when the variable @code{org-agenda-include-all-todo} is @code{t}), all
1784 unfinished TODO items (also those without a date) are also listed at
1785 the beginning of the buffer, before the first date.@*
1786 The key binding @kbd{C-c a} is only a suggestion - see
1787 @ref{Installation and Activation}.
1790 The commands available in the Agenda buffer are listed in
1791 @ref{Agenda commands}.
1793 @subsection Categories
1796 In the agenda buffer, each entry is preceded by a @emph{category},
1797 which is derived from the file name. The category can also be set
1798 with a special line anywhere in the buffer, looking like this:
1803 After changing this line, press @kbd{C-c C-c} with the cursor still in
1804 the line, to make the changes known to org-mode. Otherwise, the
1805 change will only be active the next time you visit this file with
1808 The display in the agenda buffer looks best if the category is not
1809 longer than 10 characters.
1811 @subsection Time-of-Day Specifications
1813 Org-mode checks each agenda item for a time-of-day specification. The
1814 time can be part of the time stamp that triggered inclusion into the
1815 agenda, for example as in @w{@samp{<2005-05-10 Tue 19:00>}}. Time
1816 ranges can be specified with two time stamps, like
1818 @w{@samp{<2005-05-10 Tue 20:30>--<2005-05-10 Tue 22:15>}}.
1820 In the headline of the entry itself, a time(range) may also appear as
1821 plain text (like @samp{12:45} or a @samp{8:30-1pm}. If the agenda
1822 integrates the Emacs diary (@pxref{Calendar/Diary integration}), time
1823 specifications in diary entries are recognized as well.
1825 For agenda display, Org-mode extracts the time and displays it in a
1826 standard 24 hour format as part of the prefix. The example times in
1827 the previous paragraphs would end up in the agenda like this:
1830 8:30-13:00 Arthur Dent lies in front of the bulldozer
1831 12:45...... Ford Prefect arrives and takes Arthur to the pub
1832 19:00...... The Vogon reads his poem
1833 20:30-22:15 Marwin escorts the Hitchhikers to the bridge
1836 If the agenda is in single-day mode, or for the display of today, the
1837 timed entries are embedded in a time grid, like
1840 8:00...... ------------------
1841 8:30-13:00 Arthur Dent lies in front of the bulldozer
1842 10:00...... ------------------
1843 12:00...... ------------------
1844 12:45...... Ford Prefect arrives and takes Arthur to the pub
1845 14:00...... ------------------
1846 16:00...... ------------------
1847 18:00...... ------------------
1848 19:00...... The Vogon reads his poem
1849 20:00...... ------------------
1850 20:30-22:15 Marwin escorts the Hitchhikers to the bridge
1853 The time grid can be turned on and off with the variable
1854 @code{org-agenda-use-time-grid}, and can be configured with
1855 @code{org-agenda-time-grid}.
1858 @subsection Sorting of agenda items
1859 @cindex sorting, of agenda items
1860 @cindex priorities, of agenda items
1861 The entries for each day are sorted. The default order is to first
1862 collect all items containing an explicit time-of-day specification.
1863 These entries will be shown at the beginning of the list, as a
1864 @emph{schedule} for the day. After that, items remain grouped in
1865 categories, in the sequence given by @code{org-agenda-files}. Within
1866 each category, items are sorted by priority (@pxref{Priorities}).
1868 The priority is a numerical quantity composed of the base priority
1869 (2000 for priority @samp{A}, 1000 for @samp{B}, and 0 for @samp{C}),
1870 plus additional increments for overdue scheduled or deadline items.
1872 Sorting can be customized using the variable
1873 @code{org-agenda-sorting-strategy}.
1875 @node Agenda commands, Calendar/Diary integration, Agenda, Timeline and Agenda
1876 @section Commands in the agenda buffer
1878 Entries in the agenda buffer are linked back to the org file or diary
1879 file where they originate. You are not allowed to edit the agenda
1880 buffer itself, but commands are provided to show and jump to the
1881 original entry location, and to edit the org-files ``remotely'' from
1882 the agenda buffer. In this way, all information is stored only once,
1883 and you don't risk that your agenda and note files diverge.
1885 Some commands can be executed with mouse clicks on agenda lines. For
1886 the other commands, the cursor needs to be in the desired line. Most
1887 commands are available for both timelines and the agenda. The
1888 exceptions are marked.
1891 @tsubheading{Motion}
1894 Next line (same as @key{up}).
1897 Previous line (same as @key{down}).
1898 @tsubheading{View/GoTo org file}
1903 Display the original location of the item in another window.
1907 Display original location and recenter that window.
1913 Go to the original location of the item in another window.
1917 Go to the original location of the item and delete other windows.
1921 Toggle follow mode. In follow mode, as you move the cursor through
1922 the agenda buffer, the other window always shows the corresponding
1923 location in the org file.
1925 @tsubheading{Change display}
1928 Delete other windows.
1932 Switch to weekly view (7 days displayed together)
1936 Switch to daily view (just one day displayed)
1940 Toggle the inclusion of diary entries. See @ref{Calendar/Diary integration}.
1944 Toggle the time grid on and off. See also the variables
1945 @code{org-agenda-use-time-grid} and @code{org-agenda-time-grid}.
1949 Recreate the agenda buffer, for example to reflect the changes
1950 after modification of the time stamps of items with S-@key{left} and
1955 Display the following @code{org-agenda-ndays} days. For example, if
1956 the display covers a week, switch to the following week. With prefix
1957 arg, go forward that many times @code{org-agenda-ndays} days. Not
1958 available in timelines.
1962 Display the previous dates. Not available in timelines.
1968 @tsubheading{Remote editing}
1975 Change the TODO state of the item, both in the agenda and in the
1980 Set the priority for the current item. Org-mode prompts for the
1981 priority character. If you reply with @key{SPC}, the priority cookie
1982 is removed from the entry.
1986 Display weighted priority of current item.
1992 Increase the priority of the current item. The priority is changed in
1993 the original buffer, but the agenda is not resorted. Use the @kbd{r}
1997 @kindex S-@key{down}
2000 Decrease the priority of the current item.
2002 @kindex S-@key{right}
2004 Change the time stamp associated with the current line by one day into
2005 the future. With prefix argument, change it by that many days. For
2006 example, @kbd{3 6 5 S-@key{right}} will change it by a year. The
2007 stamp is changed in the original org file, but the change is not
2008 directly reflected in the agenda buffer. Use the
2009 @kbd{r} key to update the buffer.
2011 @kindex S-@key{left}
2013 Change the time stamp associated with the current line by one day
2018 Change the time stamp associated with the current line to today.
2019 The key @kbd{>} has been chosen, because it is the same as @kbd{S-.}
2022 @cindex diary entries, creating from agenda
2025 Insert a new entry into the diary. Prompts for the type of entry
2026 (day, weekly, monthly, yearly, anniversary, cyclic) and creates a new
2027 entry in the diary, just like @kbd{i d} etc. would do in the calendar.
2028 The date is taken from the cursor position.
2030 @tsubheading{Calendar commands}
2033 Open the Emacs calendar and move to the date at the agenda cursor.
2036 When in the calendar, compute and show the Org-mode agenda for the
2041 Show the phases of the moon for three month around current date.
2045 Show sunrise and sunset times. The geographical location must be set
2046 with calendar variables, see documentation of the Emacs calendar.
2050 Convert the date at cursor into many other cultural and historic
2055 Show holidays for three month around the cursor date.
2059 Export a single iCalendar file containing entries from all agenda files.
2060 Not available in timelines.
2062 @tsubheading{Quit and Exit}
2065 Quit Agenda, remove the agenda buffer.
2068 @cindex agenda files, removing buffers
2070 Exit agenda, remove the agenda buffer and all buffers loaded by Emacs
2071 for the compilation of the agenda. Buffers created by the user to
2072 visit org files will not be removed.
2076 @node Calendar/Diary integration, , Agenda commands, Timeline and Agenda
2077 @section Calendar/Diary integration
2078 @cindex calendar integration
2079 @cindex diary integration
2081 Emacs contains the calendar and diary by Edward M. Reingold. The
2082 calendar displays a three-month calendar with holidays from different
2083 countries and cultures. The diary allows to keep track of
2084 anniversaries, lunar phases, sunrise/set, recurrent appointments
2085 (weekly, monthly) and more. In this way, it is quite complementary to
2086 Org-mode. It can be very useful to combine output from Org-mode with
2089 The interaction between Org-mode and diary works both ways: You can
2090 list entries from the diary in the Org-mode agenda, from which many
2091 calendar and diary commands are directly accessible. Or you can
2092 display entries from the org agenda in the Emacs diary.
2095 * Diary to agenda:: Agenda incorporates the diary
2096 * Agenda to diary:: Diary incorporates the agenda
2099 @node Diary to agenda, Agenda to diary, Calendar/Diary integration, Calendar/Diary integration
2100 @subsection Including the diary into the agenda
2101 @cindex diary to agenda
2103 In order to include entries from the Emacs diary into Org-mode's
2104 agenda, you only need to customize the variable
2107 (setq org-agenda-include-diary t)
2111 @noindent After that, everything will happen automatically. All diary
2112 entries including holidays, anniversaries etc will be included in the
2113 agenda buffer created by Org-mode. @key{SPC}, @key{TAB}, and
2114 @key{RET} can be used from the agenda buffer to jump to the diary
2115 file, in order to edit existing diary entries. The @kbd{i} command to
2116 insert new entries for the current date works in the agenda buffer, as
2117 well as the commands @kbd{S}, @kbd{M}, and @kbd{C} to display
2118 Sunrise/Sunset times, show lunar phases and to convert to other
2119 calendars, respectively. @kbd{c} can be used to switch back and forth
2120 between calendar and agenda.
2122 @node Agenda to diary, , Diary to agenda, Calendar/Diary integration
2123 @subsection Including the agenda into the diary
2125 If you prefer to use the Emacs diary as your main instrument and if
2126 you wish to include the Org-mode agenda into it, the following steps
2127 are necessary: Autoload the function @command{org-diary} as shown
2128 above under @ref{Installation and Activation}. You also need to use
2129 @emph{fancy diary display} by setting in @file{.emacs}:
2132 (add-hook 'diary-display-hook 'fancy-diary-display)
2135 Then include the following line into your @file{~/diary} file, in
2136 order to get the entries from all files listed in the variable
2137 @code{org-agenda-files}:
2143 You may also select specific files with
2146 &%%(org-diary) ~/path/to/some/org-file.org
2147 &%%(org-diary) ~/path/to/another/org-file.org
2150 If you now launch the calendar and press @kbd{d} to display a diary,
2151 the headlines of entries containing a timestamp, date range, schedule,
2152 or deadline referring to the selected date will be listed. Just like
2153 in Org-mode's agenda view, the diary for @emph{today} contains
2154 additional entries for overdue deadlines and scheduled items. See
2155 also the documentation of the @command{org-diary} function.
2157 @node Exporting, Miscellaneous, Timeline and Agenda, Top
2161 For printing and sharing of notes, Org-mode documents can be exported
2162 as ASCII or HTML files. To incorporate entries with associated times
2163 like deadlines or appointments into a desktop calendar program like
2164 iCal, Org-mode can also produce extracts in the iCalendar format.
2167 * ASCII export:: Export as a structured ASCII file
2168 * HTML export:: Export as an HTML file
2169 * iCalendar export:: Create calendar entries.
2172 @node ASCII export, HTML export, Exporting, Exporting
2173 @section ASCII export
2174 @cindex ASCII export
2176 @cindex region, active
2177 @cindex active region
2178 @cindex transient-mark-mode
2182 Export as ASCII file. If there is an active region, only the region
2183 will be exported. For an org file @file{myfile.org}, the ASCII file
2184 will be @file{myfile.txt}. The file will be overwritten without
2188 @cindex headline levels, for exporting
2189 In the exported version, the first 3 outline levels will become
2190 headlines, defining a general document structure. Additional levels
2191 will be exported as itemize lists. If you want that transition to occur
2192 at a different level, specify it with a prefix argument. For example,
2194 @kbd{C-1 C-c C-x a org-export-as-ascii}
2197 creates only top level headlines and does the rest as items. Lines
2198 starting with @samp{#} and subtree starting with the word @samp{COMMENT}
2199 will not be exported.
2201 @node HTML export, iCalendar export, ASCII export, Exporting
2202 @section HTML export
2205 Org-mode contains an HTML exporter with extensive HTML formatting.
2207 @cindex region, active
2208 @cindex active region
2209 @cindex transient-mark-mode
2213 Export as HTML file @file{myfile.html}.
2216 Export as HTML file and open it with a browser.
2219 Insert template with export options, see below.
2222 Toggle fixed-width for entry (QUOTE) or region, see below.
2225 @cindex headline levels, for exporting
2226 In the exported version, the first 3 outline levels will become
2227 headlines, defining a general document structure. Additional levels
2228 will be exported as itemize lists. If you want that transition to occur
2229 at a different level, specify it with a prefix argument. For example,
2234 creates two levels of headings and does the rest as items.
2237 * HTML formatting:: Interpretation of the buffer content
2238 * Export options:: How to influence exports
2239 * Comment lines:: Lines which will not be exported
2242 @node HTML formatting, Export options, HTML export, HTML export
2243 @subsection HTML formatting
2245 Not all text is transferred literally to the exported HTML file. The
2246 exporter implements the following interpretation:
2249 @cindex underlined text
2253 You can make words @b{*bold*}, @i{/italic/}, and _underlined_
2255 @cindex @TeX{} interpretation
2257 Simple @TeX{}-like math constructs are interpreted:
2259 @cindex completion, of @TeX{} symbols
2262 @samp{10^22} and @samp{J_n} are super- and subscripts. You can quote
2263 @samp{^} and @samp{_} with a backslash: @samp{\_} and @samp{\^}
2265 @samp{\alpha} indicates a Greek letter, @samp{\to} an arrow. You can
2266 use completion for these macros, just type @samp{\} and maybe a few
2267 letters, and press @kbd{M-@key{TAB}} to see possible completions.
2270 @cindex tables, export to HTML
2272 Tables are transformed into HTML tables. Data fields before the first
2273 horizontal separator line will be formatted as table header fields.
2277 If a headline starts with the word @samp{QUOTE}, the text below the
2278 headline will be typeset as fixed-width, to allow quoting of computer
2279 codes etc. Lines starting with @samp{:} are also typeset in
2284 If you want to include HTML tags which should be interpreted as such,
2285 mark them with a @samp{@@} like in @samp{@@<b>bold text@@</b>}.
2286 Plain @samp{<} and @samp{>} are always transformed to @samp{<} and
2287 @samp{>} in HTML export.
2290 If these conversions conflict with your habits of typing ASCII text,
2291 they can all be turned off with corresponding variables.
2293 @node Export options, Comment lines, HTML formatting, HTML export
2294 @subsection Export options
2295 @cindex options, for export
2297 @cindex completion, of option keywords
2298 The exporter recognizes special lines in the buffer which provide
2299 additional information. These lines may be put anywhere in the file.
2300 The whole set of lines can be inserted into the buffer with @kbd{C-c
2301 C-x t}. For individual lines, a good way to make sure the keyword is
2302 correct is to type @samp{#+} and then use @kbd{M-@key{TAB}} completion
2303 (@pxref{Completion}).
2306 #+TITLE: the title to be shown (default is the buffer name)
2307 #+AUTHOR: the author (default taken from @code{user-full-name})
2308 #+EMAIL: his/her email address (default from @code{user-mail-address})
2309 #+LANGUAGE: language for HTML, e.g. @samp{en} (@code{org-export-default-language})
2310 #+TEXT: Some descriptive text to be inserted at the beginning.
2311 #+TEXT: Several lines may be given.
2312 #+OPTIONS: H:2 num:t toc:t \n:nil @:t ::t |:t ^:t *:nil TeX:t
2315 The OPTIONS line is a compact form to specify export settings. Here
2317 @cindex headline levels
2318 @cindex section-numbers
2319 @cindex table of contents
2320 @cindex linebreak preservation
2321 @cindex quoted html tags
2322 @cindex fixed-width sections
2324 @cindex @TeX{}-like syntax for sub- and superscripts
2325 @cindex emphasized text
2326 @cindex @TeX{} macros
2328 H: @r{set the number of headline levels for export}
2329 num: @r{turn on/off section-numbers}
2330 toc: @r{turn on/off table of contents}
2331 \n: @r{turn on/off linebreak-preservation}
2332 @@: @r{turn on/off quoted html tags}
2333 :: @r{turn on/off fixed-width sections}
2334 |: @r{turn on/off tables}
2335 ^: @r{turn on/off @TeX{}-like syntax for sub- and superscripts.}
2336 *: @r{turn on/off emphasized text (bold, italic, underlined)}
2337 TeX: @r{turn on/off @TeX{} macros}
2340 @node Comment lines, , Export options, HTML export
2341 @subsection Comment lines
2342 @cindex comment lines
2343 @cindex exporting, not
2345 Lines starting with @samp{#} in column zero are treated as comments
2346 and will never be exported. Also entire subtrees starting with the
2347 word @samp{COMMENT} will never be exported. Finally, any text before
2348 the first headline will not be exported either. This applies also for
2354 Toggle the COMMENT keyword at the beginning of an entry.
2357 @node iCalendar export, , HTML export, Exporting
2358 @section iCalendar export
2360 Some people like to use Org-mode for keeping track of projects, but
2361 still prefer a standard calendar application for anniversaries and
2362 appointments. In this case it can be useful to have deadlines and
2363 other time-stamped items in Org-mode files show up in the calendar
2364 application. Org-mode can export calendar information in the standard
2370 Create iCalendar entries for the current file and store them in the same
2371 directory, using a file extension @file{.ics}.
2374 Like @kbd{C-c C-x i}, but do this for all files in
2375 @code{org-agenda-files}. For each of these files, a separate iCalendar
2376 file will be written.
2379 Create a single large iCalendar file from all files in
2380 @code{org-agenda-files} and write it to the file given by
2381 @code{org-combined-agenda-icalendar-file}.
2384 How this calendar is best read and updated, depends on the on the
2385 application you are using. For example, when using iCal under Apple
2386 MacOS X, you could create a new calendar @samp{OrgMode} (the default
2387 name for the calendar created by @kbd{C-c C-x c}, see the variables
2388 @code{org-icalendar-combined-name} and
2389 @code{org-combined-agenda-icalendar-file}). Then set Org-mode to
2390 overwrite the corresponding file
2391 @file{~/Library/Calendars/OrgMode.ics}. You may even use AppleScript
2392 to make iCal re-read the calendar files each time a new version of
2393 @file{OrgMode.ics} is produced. Here is the setup needed for this:
2396 (setq org-combined-agenda-icalendar-file
2397 "~/Library/Calendars/OrgMode.ics")
2398 (add-hook 'org-after-save-iCalendar-file-hook
2401 "osascript -e 'tell application \"iCal\" to reload calendars'")))
2404 @node Miscellaneous, Index, Exporting, Top
2405 @chapter Miscellaneous
2408 * Completion:: M-TAB knows what you need
2409 * Customization:: Adapting Org-mode to your taste
2410 * FAQ:: Frequently asked questions
2411 * Interaction:: Other Emacs packages
2412 * TTY keys:: Using Org-mode on a tty
2413 * Bugs:: Things which do not work perfectly
2414 * Acknowledgments:: These people provided feedback and more
2417 @node Completion, Customization, Miscellaneous, Miscellaneous
2419 @cindex completion, of @TeX{} symbols
2420 @cindex completion, of TODO keywords
2421 @cindex completion, of dictionary words
2422 @cindex completion, of option keywords
2424 Org-mode supports in-buffer completion. This type of completion does
2425 not make use of the minibuffer. You simply type a few letters into
2426 the buffer and use the key to complete text right there.
2431 Complete word at point
2434 At the beginning of a headline, complete TODO keywords.
2436 After @samp{\}, complete @TeX{} symbols supported by the exporter.
2438 After @samp{#+}, complete the special keywords like @samp{TYP_TODO} or
2439 @samp{OPTIONS} which set file-specific options for Org-mode. When the
2440 option keyword is already complete, pressing @kbd{M-@key{TAB}} again
2441 will insert example settings for this keyword.
2443 Elsewhere, complete dictionary words using ispell.
2447 @node Customization, FAQ, Completion, Miscellaneous
2448 @section Customization
2449 @cindex customization
2450 @cindex options, for customization
2451 @cindex variables, for customization
2453 There is a large number of variables which can be used to customize
2454 Org-mode. For the sake of compactness of the manual, we are not
2455 describing the variables here. For an overview of customization
2456 variables, use @kbd{M-x org-customize}. Or select @code{Browse Org
2457 Group} from the @code{Org->Customization} menu.
2459 @node FAQ, Interaction, Customization, Miscellaneous
2460 @section Frequently asked questions
2463 @item @b{Org-mode seems to be a useful default mode for the various
2464 @file{README} files I have scattered through my directories. How do I
2465 turn it on for all @file{README} files?}
2467 (add-to-list 'auto-mode-alist '("README$" . org-mode))
2470 @item @b{I would like to have two windows on the same Org-mode
2471 file, but with different outline visibility. Is that possible?}@*
2472 @cindex @code{make-indirect-buffer}
2473 @cindex indirect buffers
2474 In GNU Emacs, you may use @emph{indirect buffers} which do exactly
2475 this. See the documentation on the command
2476 @code{make-indirect-buffer}. In XEmacs, this is currently not
2477 possible because of the different outline implementation.
2479 @item @b{Is there an easy way to insert links to web locations?}@*
2480 @cindex URL, paste into buffer
2481 Sure, just type or paste them into the buffer. A plain-text URL-like
2482 string is directly interpreted as a link.
2484 @item @b{When I export my TODO list, every TODO item becomes a
2485 separate section. How do I enforce these items to be exported as an
2487 If you plan to use ASCII or HTML export, make sure things you want to
2488 be exported as item lists are level 4 at least, even if that does mean
2489 there is a level jump. For example
2492 * Todays top priorities
2493 **** TODO write a letter to xyz
2494 **** TODO Finish the paper
2495 **** Pick up kids at the school
2498 Alternatively, if you need a specific value for the heading/item
2499 transition in a particular file, use the @samp{+OPTIONS} line to
2500 configure the @samp{H} switch.
2506 @item @b{I would like to export only a subtree of my file to HTML. How?}@*
2507 @cindex exporting a subtree
2508 If you want to export a subtree, mark the subtree as region and then
2509 export. Marking can be done with @kbd{C-c @@ C-x C-x}, for example.
2511 @item @b{Org-mode takes over the S-cursor keys. I also want to use
2512 CUA-mode, is there a way to fix this conflict?}@*
2513 Yes, see @ref{Interaction}
2515 @item @b{Is there an easy way to insert an empty table template with a
2516 default number of rows and columns?}@*
2517 @cindex table, empty template
2518 To insert an empty table template, just type @samp{|-} and use
2519 @key{TAB}. The default size can be changed with the variable
2520 @code{org-table-default-size}. However, just starting to type the
2521 first line is usually much easier.
2523 @item @b{One of my table columns has started to fill up with
2524 @samp{#ERROR}. What is going on?}@*
2525 Org-mode tried to compute the column from other fields using a
2526 formula stored in the @samp{#+TBLFMT:} line just below the table, and
2527 the evaluation of the formula fails. Fix the fields used in the
2528 formula, or fix the formula, or remove it!
2530 @item @b{When I am in the last column of a table and just above a
2531 horizontal line in the table, pressing TAB creates a new table line
2532 @i{before} the horizontal line. How can I quickly move to the line
2533 @i{below} the horizontal line instead?}@*
2534 Press @key{down} (to get on the separator line) and then @key{TAB}.
2536 @item @b{How can I change the indentation of an entire table without
2537 fixing every line by hand?}@*
2538 @cindex indentation, of tables
2539 The indentation of a table is set by the first line. So just fix the
2540 indentation of the first line and realign with @key{TAB}.
2545 @node Interaction, TTY keys, FAQ, Miscellaneous
2546 @section Interaction with other packages
2547 @cindex packages, interaction with other
2548 Org-mode can cooperate with the following packages:
2551 @cindex @file{table.el}
2552 @item @file{table.el} by Takaaki Ota
2553 Org mode cooperates with table.el, see @ref{table.el}.
2554 @cindex @file{calc.el}
2555 @item @file{calc.el} by Dave Gillespie
2556 Org-mode uses the calc package for implementing spreadsheet
2557 functionality in its tables (@pxref{Table calculations}). Org-modes
2558 checks for the availability of calc by looking for the function
2559 @code{calc-eval} which should be autoloaded in your setup if calc has
2560 been installed properly. As of Emacs 22, calc is part of the Emacs
2561 distribution. Another possibility for interaction between the two
2562 packages is using calc for embedded calculations. @xref{Embedded Mode,
2563 , Embedded Mode, calc, GNU Emacs Calc Manual}.
2564 @cindex @file{constants.el}
2565 @item @file{constants.el} by Carsten Dominik
2566 In a table formula (@pxref{Table calculations}), it is possible to use
2567 names for natural constants or units. Instead of defining you own
2568 constants in the variable @code{org-table-formula-constants}, install
2569 the @file{constants} package which defines a large number of constants
2570 and units, and lets you use unit prefixes like @samp{M} for
2571 @samp{Mega} etc. You will need version 2.0 of this package, available
2572 at @url{http://www.astro.uva.nl/~dominik/Tools}. Org-mode checks for
2573 the function @code{constants-get}, which has to be autoloaded in your
2574 setup. See the installation instructions in the file
2575 @file{constants.el}.
2576 @cindex @file{remember.el}
2577 @cindex @file{CUA.el}
2578 @item @file{CUA.el} by Kim. F. Storm
2579 Keybindings in Org-mode conflict with the @kbd{S-<cursor>} keys
2580 used by CUA-mode (as well as pc-select-mode and s-region-mode) to
2581 select and extend the region. If you want to use one of these
2582 packages along with Org-mode, configure the variable
2583 @code{org-CUA-compatible}. When set, Org-mode will move the following
2584 keybindings in org-mode files, and in the agenda buffer (but not
2585 during date selection).
2587 S-UP -> M-p S-DOWN -> M-n
2588 S-LEFT -> M-- S-RIGHT -> M-+
2591 Yes, these are unfortunately more difficult to remember. If you want
2592 to have other replacement keys, look at the variable
2593 @code{org-disputed-keys}.
2594 @item @file{remember.el} by John Wiegley
2595 Org mode cooperates with remember, see @ref{Remember}.
2596 @cindex @file{planner.el}
2597 @item @file{planner.el} by John Wiegley
2598 Planner is another tool to plan work and keep track of tasks. Planner
2599 uses a multi-file approach with project pages and day pages. Is based
2600 on Emacs-Wiki. If Planner is your primary tool, it can be useful to
2601 display the agenda entries resulting from org files in day-pages of
2602 the planner. This can be done through the diary of the calendar:
2603 Integrate org files into the diary as described above, and then turn
2604 on the diary support of planner.
2607 @node TTY keys, Bugs, Interaction, Miscellaneous
2608 @section Using org-mode on a tty
2610 Org-mode uses a number of keys that are not accessible on a tty. This
2611 applies to most special keys like cursor keys, @key{TAB} and
2612 @key{RET}, when these are combined with modifier keys like @key{Meta}
2613 and/or @key{Shift}. Org-mode uses these bindings because it needs to
2614 provide keys for a large number of commands, and because these keys
2615 appeared particularly easy to remember. In order to still be able to
2616 access the core functionality of Org-mode on a tty, alternative
2617 bindings are provided. Here is a complete list of these bindings,
2618 which are obviously more cumbersome to use. Note that sometimes a
2619 work-around can be better. For example changing a time stamp is
2620 really only fun with @kbd{S-@key{cursor}} keys. On a tty you would
2621 rather use @kbd{C-c .} to re-insert the timestamp.
2624 @multitable @columnfractions 0.15 0.2 0.2
2625 @item @b{Default} @tab @b{Alternative 1} @tab @b{Alternative 2}
2626 @item @kbd{S-@key{TAB}} @tab @kbd{C-u @key{TAB}} @tab
2627 @item @kbd{M-@key{left}} @tab @kbd{C-c C-x l} @tab @kbd{@key{Esc} @key{left}}
2628 @item @kbd{M-S-@key{left}} @tab @kbd{C-c C-x L} @tab
2629 @item @kbd{M-@key{right}} @tab @kbd{C-c C-x r} @tab @kbd{@key{Esc} @key{right}}
2630 @item @kbd{M-S-@key{right}} @tab @kbd{C-c C-x R} @tab
2631 @item @kbd{M-@key{up}} @tab @kbd{C-c C-x u} @tab @kbd{@key{Esc} @key{up}}
2632 @item @kbd{M-S-@key{up}} @tab @kbd{C-c C-x U} @tab
2633 @item @kbd{M-@key{down}} @tab @kbd{C-c C-x d} @tab @kbd{@key{Esc} @key{down}}
2634 @item @kbd{M-S-@key{down}} @tab @kbd{C-c C-x D} @tab
2635 @item @kbd{S-@key{RET}} @tab @kbd{C-c C-x c} @tab
2636 @item @kbd{M-@key{RET}} @tab @kbd{C-c C-x m} @tab @kbd{@key{Esc} @key{RET}}
2637 @item @kbd{M-S-@key{RET}} @tab @kbd{C-c C-x M} @tab
2638 @item @kbd{S-@key{left}} @tab @kbd{C-c C-x @key{left}} @tab
2639 @item @kbd{S-@key{right}} @tab @kbd{C-c C-x @key{right}} @tab
2640 @item @kbd{S-@key{up}} @tab @kbd{C-c C-x @key{up}} @tab
2641 @item @kbd{S-@key{down}} @tab @kbd{C-c C-x @key{down}} @tab
2644 @node Bugs, Acknowledgments, TTY keys, Miscellaneous
2648 Here is a list of things which should work differently, but which I
2649 have found too hard to fix.
2653 If you call @code{fill-paragraph} (bound to @kbd{M-q}) in a table, the
2654 filling is correctly disabled. However, if some text directly
2655 (without an empty line in between) precedes or follows a table, calling
2656 @code{fill-paragraph} in that text will also fill the table like
2657 normal text. Also, @code{fill-region} does bypass the
2658 @code{fill-paragraph} code and will fill tables like normal text.
2660 Text in an entry protected with the @samp{QUOTE} keyword should not
2663 When the application called by @kbd{C-c C-o} to open a file link fails
2664 (for example because the application does not exits or refuses to open
2665 the file), it does so silently. No error message is displayed.
2667 The remote-editing commands in the agenda buffer cannot be undone with
2668 @code{undo} called from within the agenda buffer. But you can go to
2669 the corresponding buffer (using @key{TAB} or @key{RET} and execute
2672 Recalculating a table line applies the formulas from left to right.
2673 If a formula uses @emph{calculated} fields further down the row,
2674 multiple recalculation may be needed to get all fields consistent.
2676 Under XEmacs, if Org-mode entries are included into the diary, it is
2677 not possible to jump back from the diary to the org file. Apparently,
2678 the text properties are lost when the fancy-diary-display is used.
2679 However, from Org-mode's timeline and agenda buffers (created with
2680 @kbd{C-c C-r} and @kbd{C-c a}), things do work correctly.
2682 Linux should also have a default viewer application, using mailcap.
2683 Maybe we can use GNUS or VM mime code? Or dired's guessing commands?
2684 Any hints (or even patches) are appreciated.
2686 When you write @samp{x = a /b/ c}, b will be exported in italics.
2688 The exporters work well, but could be made more efficient.
2693 @node Acknowledgments, , Bugs, Miscellaneous
2694 @section Acknowledgments
2695 @cindex acknowledgments
2697 Org-mode was written by Carsten Dominik, who still maintains it at the
2698 Org-mode homepage @uref{http://www.astro.uva.nl/~dominik/Tools/org/}.
2699 The following people have helped the development along with ideas,
2700 suggestions and patches.
2704 Matthias Rempe (Oelde) provided ideas, a patch introducing Windows
2705 NT/2000 support, and quality control.
2707 Kevin Rogers contributed code to access VM files on remote hosts.
2709 Juergen Vollmer contributed code generating the table of contents
2710 in HTML output, and other export improvements.
2712 Christian Egli converted the documentation into TeXInfo format. He
2713 also showed me his plans for a multifile summary for Org-mode. Some of
2714 his ideas have found their way into the agenda.
2716 Philip Rooke created the Org-mode reference card. He also helped with
2717 beta testing and contributed a number of very useful ideas.
2719 Christian Schlauer proposed angular brackets around links, among other
2722 David Wainberg suggested to implement an archiving mechanism and helped
2725 Linking to VM/BBDB/GNUS was inspired by Tom Shannon's
2726 @file{organizer-mode.el}.
2728 Scheduling TODO items was inspired by John Wiegley's @file{planner.el}.
2730 Sacha Chua, the current maintainer of Planner, offered linking code
2731 from Planner. I made use of the offer for links to RMAIL and Wanderlust.
2733 Oliver Oppitz sent several useful suggestions.
2735 Carsten Wimmer suggested some changes and helped fix a bug in linking
2738 Pavel Chalmoviansky reported bugs and suggested improvements related
2739 to the agenda treatment of items with specified time.
2741 Stefan Monnier provided a patch with lots of little fixes to keep the
2742 Emacs-Lisp compiler happy.
2744 Kai Grossjohann pointed out that a number of key bindings in Org-mode
2745 conflict with other packages.
2747 Roland Winkler pointed out that additional keybindings are need to use
2751 @node Index, Key Index, Miscellaneous, Top
2756 @node Key Index, , Index, Top
2764 arch-tag: 7893d1fe-cc57-4d13-b5e5-f494a1bcc7ac