New compact Org-mode guide
[org-mode/org-tableheadings.git] / doc / orgguide.texi
blobe3e45bc210ec03bb1bf1a0f592c1fbf7feb03e44
1 \input texinfo
2 @c %**start of header
3 @setfilename ../../info/orgguide
4 @settitle The compact Org-mode Guide
6 @set VERSION 0.92
7 @set DATE April 2010
9 @c Version and Contact Info
10 @set MAINTAINERSITE @uref{http://orgmode.org,maintainers webpage}
11 @set AUTHOR Carsten Dominik
12 @set MAINTAINER Carsten Dominik
13 @set MAINTAINEREMAIL @email{carsten at orgmode dot org}
14 @set MAINTAINERCONTACT @uref{mailto:carsten at orgmode dot org,contact the maintainer}
15 @c %**end of header
16 @finalout
18 @c Macro definitions
19 @iftex
20 @c @hyphenation{time-stamp time-stamps time-stamp-ing time-stamp-ed}
21 @end iftex
22 @macro Ie {}
23 I.e.,
24 @end macro
25 @macro ie {}
26 i.e.,
27 @end macro
28 @macro Eg {}
29 E.g.,
30 @end macro
31 @macro eg {}
32 e.g.,
33 @end macro
35 @c Subheadings inside a table.
36 @macro tsubheading{text}
37 @ifinfo
38 @subsubheading \text\
39 @end ifinfo
40 @ifnotinfo
41 @item @b{\text\}
42 @end ifnotinfo
43 @end macro
45 @macro seealso{text}
46 @noindent @b{Further reading}@*@noindent \text\
47 @end macro
48 @copying
50 Copyright @copyright{} 2010 Free Software Foundation
52 @quotation
53 Permission is granted to copy, distribute and/or modify this document
54 under the terms of the GNU Free Documentation License, Version 1.3 or
55 any later version published by the Free Software Foundation; with no
56 Invariant Sections, with the Front-Cover texts being ``A GNU Manual,''
57 and with the Back-Cover Texts as in (a) below.  A copy of the license
58 is included in the section entitled ``GNU Free Documentation License.''
60 (a) The FSF's Back-Cover Text is: ``You have the freedom to copy and
61 modify this GNU manual.  Buying copies from the FSF supports it in
62 developing GNU and promoting software freedom.''
64 This document is part of a collection distributed under the GNU Free
65 Documentation License.  If you want to distribute this document
66 separately from the collection, you can do so by adding a copy of the
67 license to the document, as described in section 6 of the license.
68 @end quotation
69 @end copying
71 @dircategory Emacs
72 @direntry
73 * Org Mode Guide: (orgguide).  Abbreviated Org-mode Manual
74 @end direntry
76 @titlepage
77 @title The compact Org-mode Guide
79 @subtitle Release @value{VERSION}
80 @author by Carsten Dominik
82 @c The following two commands start the copyright page.
83 @page
84 @vskip 0pt plus 1filll
85 @insertcopying
86 @end titlepage
88 @c Output the table of contents at the beginning.
89 @shortcontents
91 @ifnottex
92 @node Top, Introduction, (dir), (dir)
93 @top Org Mode Manual
95 @insertcopying
96 @end ifnottex
98 @menu
99 * Introduction::                Getting started
100 * Document Structure::          A tree works like your brain
101 * Tables::                      Pure magic for quick formatting
102 * Hyperlinks::                  Notes in context
103 * TODO Items::                  Every tree branch can be a TODO item
104 * Tags::                        Tagging headlines and matching sets of tags
105 * Properties::                  
106 * Dates and Times::             Making items useful for planning
107 * Capture - Refile - Archive::  The ins and outs for projects
108 * Agenda Views::                Collecting information into views
109 * Markup::                      Prepare text for rich export
110 * Exporting::                   Sharing and publishing of notes
111 * Publishing::                  Create a web site of linked Org files
112 * Miscellaneous::               All the rest which did not fit elsewhere
114 @detailmenu
115  --- The Detailed Node Listing ---
117 Introduction
119 * Preface::                     Welcome
120 * Installation::                How to install a downloaded version of Org
121 * Activation::                  How to activate Org for certain buffers
122 * Feedback::                    Bug reports, ideas, patches etc.
124 Document Structure
126 * Outlines::                    Org is based on Outline mode
127 * Headlines::                   How to typeset Org tree headlines
128 * Visibility cycling::          Show and hide, much simplified
129 * Motion::                      Jumping to other headlines
130 * Structure editing::           Changing sequence and level of headlines
131 * Sparse trees::                Matches embedded in context
132 * Plain lists::                 Additional structure within an entry
133 * Footnotes::                   How footnotes are defined in Org's syntax
135 Hyperlinks
137 * Link format::                 How links in Org are formatted
138 * Internal links::              Links to other places in the current file
139 * External links::              URL-like links to the world
140 * Handling links::              Creating, inserting and following
141 * Targeted links::              Point at a location in a file
143 TODO Items
145 * Using TODO states::           
146 * Multi-state workflows::       
147 * Progress logging::            Dates and notes for progress
148 * Priorities::                  Some things are more important than others
149 * Breaking down tasks::         Splitting a task into manageable pieces
150 * Checkboxes::                  Tick-off lists
152 Progress logging
154 * Closing items::               When was this entry marked DONE?
155 * Tracking TODO state changes::  When did the status change?
157 Tags
159 * Tag inheritance::             Tags use the tree structure of the outline
160 * Setting tags::                How to assign tags to a headline
161 * Tag searches::                Searching for combinations of tags
163 Dates and Times
165 * Timestamps::                  Assigning a time to a tree entry
166 * Creating timestamps::         Commands which insert timestamps
167 * Deadlines and scheduling::    Planning your work
168 * Clocking work time::          Tracking how long you spend on a task
170 Capture - Refile - Archive
172 * Remember::                    Capture new tasks/ideas with little interruption
173 * Refiling notes::              Moving a tree from one place to another
174 * Archiving::                   What to do with finished projects
176 Remember
178 * Setting up Remember for Org::  Some code for .emacs to get things going
179 * Remember templates::          Define the outline of different note types
180 * Storing notes::               Directly get the note to where it belongs
182 Agenda Views
184 * Agenda files::                Files being searched for agenda information
185 * Agenda dispatcher::           Keyboard access to agenda views
186 * Built-in agenda views::       What is available out of the box?
187 * Agenda commands::             Remote editing of Org trees
188 * Custom agenda views::         Defining special searches and views
190 The built-in agenda views
192 * Weekly/daily agenda::         The calendar page with current tasks
193 * Global TODO list::            All unfinished action items
194 * Matching tags and properties::  Structured information with fine-tuned search
195 * Timeline::                    Time-sorted view for single file
196 * Search view::                 Find entries by searching for text
198 Markup for rich export
200 * Structural markup elements::  The basic structure as seen by the exporter
201 * Images and tables::           Tables and Images will be included
202 * Literal examples::            Source code examples with special formatting
203 * Include files::               Include additional files into a document
204 * Embedded LaTeX::              LaTeX can be freely used inside Org documents
206 Structural markup elements
208 * Document title::              Where the title is taken from
209 * Headings and sections::       The document structure as seen by the exporter
210 * Table of contents::           The if and where of the table of contents
211 * Paragraphs::                  Paragraphs
212 * Emphasis and monospace::      Bold, italic, etc.
213 * Comment lines::               What will *not* be exported
215 Exporting
217 * Export options::              Per-file export settings
218 * The export dispatcher::       How to access exporter commands
219 * ASCII/Latin-1/UTF-8 export::  Exporting to flat files with encoding
220 * HTML export::                 Exporting to HTML
221 * LaTeX and PDF export::        Exporting to La@TeX{}, and processing to PDF
222 * DocBook export::              Exporting to DocBook
223 * iCalendar export::            
225 Miscellaneous
227 * Completion::                  M-TAB knows what you need
228 * Clean view::                  Getting rid of leading stars in the outline
229 * MobileOrg::                   Org-mode on the iPhone
231 @end detailmenu
232 @end menu
234 @node Introduction, Document Structure, Top, Top
235 @chapter Introduction
237 @menu
238 * Preface::                     Welcome
239 * Installation::                How to install a downloaded version of Org
240 * Activation::                  How to activate Org for certain buffers
241 * Feedback::                    Bug reports, ideas, patches etc.
242 @end menu
244 @node Preface, Installation, Introduction, Introduction
245 @section Preface
247 Org is a mode for keeping notes, maintaining TODO lists, and doing
248 project planning with a fast and effective plain-text system.
250 @i{This document is an extract from the
251 @uref{http://orgmode.org/index.html#sec-4_1, comprehensive Org-mode manual}.
252 It contains all basic features and commands, along with important hints for
253 customization.  It is intended for beginners who would shy back from a 200
254 page manual because of sheer size.}
256 @node Installation, Activation, Preface, Introduction
257 @section Installation
259 @b{Important:} @i{If you are using a version of Org that is part of the Emacs
260 distribution or an XEmacs package, please skip this section and go directly
261 to @ref{Activation}.}
263 If you have downloaded Org from the Web, either as a distribution @file{.zip}
264 or @file{.tar} file, or as a Git archive, it is best to run it directly from
265 the distribution directory.  You need to add @file{lisp} subdirectory to the
266 Emacs load path.  To do this, add the following line to @file{.emacs}:
268 @smallexample
269 (setq load-path (cons "~/path/to/orgdir/lisp" load-path))
270 (setq load-path (cons "~/path/to/orgdir/contrib/lisp" load-path))
271 @end smallexample
273 @noindent For speed you should byte-compile the Lisp files with the shell
274 command:
276 @smallexample
277 make
278 @end smallexample
280 Then add the following line to @file{.emacs}.  It is needed so that
281 Emacs can autoload functions that are located in files not immediately loaded
282 when Org-mode starts.
283 @smalllisp
284 (require 'org-install)
285 @end smalllisp
287 Do not forget to activate Org as described in the following section.
289 @node Activation, Feedback, Installation, Introduction
290 @section Activation
292 Add the following lines to your @file{.emacs} file.  The last three lines
293 define @emph{global} keys for the commands @command{org-store-link},
294 @command{org-agenda}, and @command{org-iswitchb}---please choose suitable
295 keys yourself.
297 @smalllisp
298 ;; The following lines are always needed.  Choose your own keys.
299 (add-to-list 'auto-mode-alist '("\\.org\\'" . org-mode))
300 (global-font-lock-mode 1)                     ; for all buffers
301 (global-set-key "\C-cl" 'org-store-link)
302 (global-set-key "\C-ca" 'org-agenda)
303 (global-set-key "\C-cb" 'org-iswitchb)
304 @end smalllisp
306 With this setup, all files with extension @samp{.org} will be put
307 into Org mode. 
309 @node Feedback,  , Activation, Introduction
310 @section Feedback
312 If you find problems with Org, or if you have questions, remarks, or ideas
313 about it, please mail to the Org mailing list @email{emacs-orgmode@@gnu.org}.
314 If you are not a member of the mailing list, your mail will be passed to the
315 list after a moderator has approved it.  For information on how to submit bug
316 reports, see the main manual.
318 @node Document Structure, Tables, Introduction, Top
319 @chapter Document Structure
321 Org is based on Outline mode and provides flexible commands to
322 edit the structure of the document.
324 @menu
325 * Outlines::                    Org is based on Outline mode
326 * Headlines::                   How to typeset Org tree headlines
327 * Visibility cycling::          Show and hide, much simplified
328 * Motion::                      Jumping to other headlines
329 * Structure editing::           Changing sequence and level of headlines
330 * Sparse trees::                Matches embedded in context
331 * Plain lists::                 Additional structure within an entry
332 * Footnotes::                   How footnotes are defined in Org's syntax
333 @end menu
335 @node Outlines, Headlines, Document Structure, Document Structure
336 @section Outlines
338 Org is implemented on top of Outline mode.  Outlines allow a
339 document to be organized in a hierarchical structure, which (at least
340 for me) is the best representation of notes and thoughts.  An overview
341 of this structure is achieved by folding (hiding) large parts of the
342 document to show only the general document structure and the parts
343 currently being worked on.  Org greatly simplifies the use of
344 outlines by compressing the entire show/hide functionality into a single
345 command, @command{org-cycle}, which is bound to the @key{TAB} key.
347 @node Headlines, Visibility cycling, Outlines, Document Structure
348 @section Headlines
350 Headlines define the structure of an outline tree.  The headlines in
351 Org start with one or more stars, on the left margin@footnote{See
352 the variable @code{org-special-ctrl-a/e} to configure special behavior
353 of @kbd{C-a} and @kbd{C-e} in headlines.}.  For example:
355 @smallexample
356 * Top level headline
357 ** Second level
358 *** 3rd level
359     some text
360 *** 3rd level
361     more text
363 * Another top level headline
364 @end smallexample
366 @noindent Some people find the many stars too noisy and would prefer an
367 outline that has whitespace followed by a single star as headline
368 starters.  @ref{Clean view}, describes a setup to realize this.
370 @node Visibility cycling, Motion, Headlines, Document Structure
371 @section Visibility cycling
373 Outlines make it possible to hide parts of the text in the buffer.
374 Org uses just two commands, bound to @key{TAB} and
375 @kbd{S-@key{TAB}} to change the visibility in the buffer.
377 @table @kbd
378 @item @key{TAB}
379 @emph{Subtree cycling}: Rotate current subtree among the states
381 @smallexample
382 ,-> FOLDED -> CHILDREN -> SUBTREE --.
383 '-----------------------------------'
384 @end smallexample
386 When called with a prefix argument (@kbd{C-u @key{TAB}}) or with the shift
387 key, global cycling is invoked.
389 @item S-@key{TAB} @r{and} C-u @key{TAB}
390 @emph{Global cycling}: Rotate the entire buffer among the states
392 @smallexample
393 ,-> OVERVIEW -> CONTENTS -> SHOW ALL --.
394 '--------------------------------------'
395 @end smallexample
397 @item C-u C-u C-u @key{TAB}
398 Show all, including drawers.
399 @end table
401 When Emacs first visits an Org file, the global state is set to
402 OVERVIEW, i.e. only the top level headlines are visible.  This can be
403 configured through the variable @code{org-startup-folded}, or on a
404 per-file basis by adding a startup keyword @code{overview}, @code{content},
405 @code{showall}, like this:
407 @smallexample
408 #+STARTUP: content
409 @end smallexample
412 @node Motion, Structure editing, Visibility cycling, Document Structure
413 @section Motion
414 The following commands jump to other headlines in the buffer.
416 @table @kbd
417 @item C-c C-n
418 Next heading.
419 @item C-c C-p
420 Previous heading.
421 @item C-c C-f
422 Next heading same level.
423 @item C-c C-b
424 Previous heading same level.
425 @item C-c C-u
426 Backward to higher level heading.
427 @end table
429 @node Structure editing, Sparse trees, Motion, Document Structure
430 @section Structure editing
432 @table @kbd
433 @item M-@key{RET}
434 Insert new heading with same level as current.  If the cursor is in a plain
435 list item, a new item is created (@pxref{Plain lists}).  When this command is
436 used in the middle of a line, the line is split and the rest of the line
437 becomes the new headline@footnote{If you do not want the line to be split,
438 customize the variable @code{org-M-RET-may-split-line}.}.
439 @item M-S-@key{RET}
440 Insert new TODO entry with same level as current heading.
441 @item @key{TAB} @r{in new, empty entry}
442 In a new entry with no text yet, @key{TAB} will cycle through reasonable
443 levels.
444 @item M-@key{left}@r{/}@key{right}
445 Promote/demote current heading by one level.
446 @item M-S-@key{left}@r{/}@key{right}
447 Promote/demote the current subtree by one level.
448 @item M-S-@key{up}@r{/}@key{down}
449 Move subtree up/down (swap with previous/next subtree of same
450 level).
451 @item C-c C-w
452 Refile entry or region to a different location.  @xref{Refiling notes}.
453 @item C-x n s/w
454 Narrow buffer to current subtree / widen it again
455 @end table
457 When there is an active region (Transient Mark mode), promotion and
458 demotion work on all headlines in the region.
460 @node Sparse trees, Plain lists, Structure editing, Document Structure
461 @section Sparse trees
463 An important feature of Org mode is the ability to construct @emph{sparse
464 trees} for selected information in an outline tree, so that the entire
465 document is folded as much as possible, but the selected information is made
466 visible along with the headline structure above it@footnote{See also the
467 variables @code{org-show-hierarchy-above}, @code{org-show-following-heading},
468 @code{org-show-siblings}, and @code{org-show-entry-below} for detailed
469 control on how much context is shown around each match.}.  Just try it out
470 and you will see immediately how it works.
472 Org mode contains several commands creating such trees, all these
473 commands can be accessed through a dispatcher:
475 @table @kbd
476 @item C-c /
477 This prompts for an extra key to select a sparse-tree creating command.
478 @item C-c / r
479 Occur.  Prompts for a regexp and shows a sparse tree with all matches.  Each
480 match is also highlighted; the highlights disappear by pressing @kbd{C-c C-c}.
481 @end table
483 The other sparse tree commands select headings based on TODO keywords,
484 tags, or properties and will be discussed later in this manual.
486 @node Plain lists, Footnotes, Sparse trees, Document Structure
487 @section Plain lists
489 Within an entry of the outline tree, hand-formatted lists can provide
490 additional structure.  They also provide a way to create lists of
491 checkboxes (@pxref{Checkboxes}).  Org supports editing such lists,
492 and the HTML exporter (@pxref{Exporting}) parses and formats them.
494 Org knows ordered lists, unordered lists, and description lists.
495 @itemize @bullet
496 @item
497 @emph{Unordered} list items start with @samp{-}, @samp{+}, or
498 @samp{*} as bullets.
499 @item
500 @emph{Ordered} list items start with @samp{1.} or @samp{1)}.
501 @item
502 @emph{Description} list use @samp{ :: } to separate the @emph{term} from the
503 description.
504 @end itemize
506 Items belonging to the same list must have the same indentation on the first
507 line.  A list ends before the next line that is indented like the
508 bullet/number, or less.  An example:
510 @smallexample
511 @group
512 ** Lord of the Rings
513    My favorite scenes are (in this order)
514    1. The attack of the Rohirrim
515    2. Eowyn's fight with the witch king
516       + this was already my favorite scene in the book
517       + I really like Miranda Otto.
518    Important actors in this film are:
519    - @b{Elijah Wood} :: He plays Frodo
520    - @b{Sean Austin} :: He plays Sam, Frodo's friend.
521 @end group
522 @end smallexample
524 The following commands act on items when the cursor is in the first line of
525 an item (the line with the bullet or number).
527 @table @kbd
528 @item @key{TAB}
529 Items can be folded just like headline levels.
530 @item M-@key{RET}
531 Insert new item at current level.  With a prefix argument, force a new
532 heading (@pxref{Structure editing}).
533 @item M-S-@key{RET}
534 Insert a new item with a checkbox (@pxref{Checkboxes}).
535 @item M-S-@key{up}@r{/}@key{down}
536 Move the item including subitems up/down (swap with previous/next item
537 of same indentation).  If the list is ordered, renumbering is
538 automatic.
539 @item M-@key{left}@r{/}M-@key{right}
540 Decrease/increase the indentation of an item, leaving children alone.
541 @item M-S-@key{left}@r{/}@key{right}
542 Decrease/increase the indentation of the item, including subitems.
543 @item C-c C-c
544 If there is a checkbox (@pxref{Checkboxes}) in the item line, toggle the
545 state of the checkbox.  If not, make sure all items have the same bullet type
546 and renumber ordered lists.
547 @item C-c -
548 Cycle the entire list level through the different itemize/enumerate bullets
549 (@samp{-}, @samp{+}, @samp{*}, @samp{1.}, @samp{1)}).
550 @end table
552 @node Footnotes,  , Plain lists, Document Structure
553 @section Footnotes
555 A footnote is defined in a paragraph that is started by a footnote marker in
556 square brackets in column 0, no indentation allowed.  The footnote reference
557 is simply the marker in square brackets, inside text.  For example:
559 @smallexample
560 The Org homepage[fn:1] now looks a lot better than it used to.
562 [fn:1] The link is: http://orgmode.org
563 @end smallexample
565 @noindent The following commands handle footnotes:
567 @table @kbd
568 @item C-c C-x f
569 The footnote action command.  When the cursor is on a footnote reference,
570 jump to the definition.  When it is at a definition, jump to the (first)
571 reference.  Otherwise, create a new footnote.  When this command is called
572 with a prefix argument, a menu of additional options including renumbering is
573 offered.
575 @item C-c C-c
576 Jump between definition and reference.
577 @end table
579 @seealso{
580 @uref{http://orgmode.org/manual/Document-Structure.html#Document-Structure,
581 Chapter 2 of the manual}@*
582 @uref{http://sachachua.com/wp/2008/01/outlining-your-notes-with-org/,
583 Sacha Chua's tutorial}}
586 @node Tables, Hyperlinks, Document Structure, Top
587 @chapter Tables
589 Org comes with a fast and intuitive table editor.  Spreadsheet-like
590 calculations are supported in connection with the Emacs @file{calc}
591 package
592 @ifinfo
593 (@pxref{Top,Calc,,Calc,Gnu Emacs Calculator Manual}).
594 @end ifinfo
595 @ifnotinfo
596 (see the Emacs Calculator manual for more information about the Emacs
597 calculator).
598 @end ifnotinfo
600 Org makes it easy to format tables in plain ASCII.  Any line with
601 @samp{|} as the first non-whitespace character is considered part of a
602 table.  @samp{|} is also the column separator.  A table might look like
603 this:
605 @smallexample
606 | Name  | Phone | Age |
607 |-------+-------+-----|
608 | Peter |  1234 |  17 |
609 | Anna  |  4321 |  25 |
610 @end smallexample
612 A table is re-aligned automatically each time you press @key{TAB} or
613 @key{RET} or @kbd{C-c C-c} inside the table.  @key{TAB} also moves to
614 the next field (@key{RET} to the next row) and creates new table rows
615 at the end of the table or before horizontal lines.  The indentation
616 of the table is set by the first line.  Any line starting with
617 @samp{|-} is considered as a horizontal separator line and will be
618 expanded on the next re-align to span the whole table width.  So, to
619 create the above table, you would only type
621 @smallexample
622 |Name|Phone|Age|
624 @end smallexample
626 @noindent and then press @key{TAB} to align the table and start filling in
627 fields.  Even faster would be to type @code{|Name|Phone|Age} followed by
628 @kbd{C-c @key{RET}}.
630 When typing text into a field, Org treats @key{DEL},
631 @key{Backspace}, and all character keys in a special way, so that
632 inserting and deleting avoids shifting other fields.  Also, when
633 typing @emph{immediately after the cursor was moved into a new field
634 with @kbd{@key{TAB}}, @kbd{S-@key{TAB}} or @kbd{@key{RET}}}, the
635 field is automatically made blank.
637 @table @kbd
638 @tsubheading{Creation and conversion}
639 @item C-c |
640 Convert the active region to table. If every line contains at least one
641 TAB character, the function assumes that the material is tab separated.
642 If every line contains a comma, comma-separated values (CSV) are assumed.
643 If not, lines are split at whitespace into fields.
645 If there is no active region, this command creates an empty Org
646 table.  But it's easier just to start typing, like
647 @kbd{|Name|Phone|Age C-c @key{RET}}.
649 @tsubheading{Re-aligning and field motion}
650 @item C-c C-c
651 Re-align the table without moving the cursor.
653 @item @key{TAB}
654 Re-align the table, move to the next field.  Creates a new row if
655 necessary.
657 @item S-@key{TAB}
658 Re-align, move to previous field.
660 @item @key{RET}
661 Re-align the table and move down to next row.  Creates a new row if
662 necessary.
664 @tsubheading{Column and row editing}
665 @item M-@key{left}
666 @itemx M-@key{right}
667 Move the current column left/right.
669 @item M-S-@key{left}
670 Kill the current column.
672 @item M-S-@key{right}
673 Insert a new column to the left of the cursor position.
675 @item M-@key{up}
676 @itemx M-@key{down}
677 Move the current row up/down.
679 @item M-S-@key{up}
680 Kill the current row or horizontal line.
682 @item M-S-@key{down}
683 Insert a new row above the current row.  With a prefix argument, the line is
684 created below the current one.
686 @item C-c -
687 Insert a horizontal line below current row.  With a prefix argument, the line
688 is created above the current line.
690 @item C-c @key{RET}
691 Insert a horizontal line below current row, and move the cursor into the row
692 below that line.
694 @item C-c ^
695 Sort the table lines in the region.  The position of point indicates the
696 column to be used for sorting, and the range of lines is the range
697 between the nearest horizontal separator lines, or the entire table.
699 @end table
701 @seealso{
702 @uref{http://orgmode.org/manual/Tables.html#Tables, Chapter 3 of the
703 manual}@*
704 @uref{http://orgmode.org/worg/org-tutorials/tables.php, Bastien's
705 table tutorial}@*
706 @uref{http://orgmode.org/worg/org-tutorials/org-spreadsheet-intro.php,
707 Bastien's spreadsheet tutorial}@*
708 @uref{http://orgmode.org/worg/org-tutorials/org-plot.php, Eric's plotting tutorial}}
710 @node Hyperlinks, TODO Items, Tables, Top
711 @chapter Hyperlinks
713 Like HTML, Org provides links inside a file, external links to
714 other files, Usenet articles, emails, and much more.
716 @menu
717 * Link format::                 How links in Org are formatted
718 * Internal links::              Links to other places in the current file
719 * External links::              URL-like links to the world
720 * Handling links::              Creating, inserting and following
721 * Targeted links::              Point at a location in a file
722 @end menu
724 @node Link format, Internal links, Hyperlinks, Hyperlinks
725 @section Link format
727 Org will recognize plain URL-like links and activate them as
728 clickable links.  The general link format, however, looks like this:
730 @smallexample
731 [[link][description]]       @r{or alternatively}           [[link]]
732 @end smallexample
734 @noindent
735 Once a link in the buffer is complete (all brackets present), Org will change
736 the display so that @samp{description} is displayed instead of
737 @samp{[[link][description]]} and @samp{link} is displayed instead of
738 @samp{[[link]]}.  To edit the invisible @samp{link} part, use @kbd{C-c
739 C-l} with the cursor on the link.
741 @node Internal links, External links, Link format, Hyperlinks
742 @section Internal links
744 If the link does not look like a URL, it is considered to be internal in the
745 current file.  The most important case is a link like
746 @samp{[[#my-custom-id]]} which will link to the entry with the
747 @code{CUSTOM_ID} property @samp{my-custom-id}.
749 Links such as @samp{[[My Target]]} or @samp{[[My Target][Find my target]]}
750 lead to a text search in the current file for the corresponding target which
751 looks like @samp{<<My Target>>}.
753 @node External links, Handling links, Internal links, Hyperlinks
754 @section External links
756 Org supports links to files, websites, Usenet and email messages,
757 BBDB database entries and links to both IRC conversations and their
758 logs.  External links are URL-like locators.  They start with a short
759 identifying string followed by a colon.  There can be no space after
760 the colon.  Here are some examples:
762 @smallexample
763 http://www.astro.uva.nl/~dominik          @r{on the web}
764 file:/home/dominik/images/jupiter.jpg     @r{file, absolute path}
765 /home/dominik/images/jupiter.jpg          @r{same as above}
766 file:papers/last.pdf                      @r{file, relative path}
767 file:projects.org                         @r{another Org file}
768 docview:papers/last.pdf::NNN              @r{open file in doc-view mode at page NNN}
769 id:B7423F4D-2E8A-471B-8810-C40F074717E9   @r{Link to heading by ID}
770 news:comp.emacs                           @r{Usenet link}
771 mailto:adent@@galaxy.net                   @r{Mail link}
772 vm:folder                                 @r{VM folder link}
773 vm:folder#id                              @r{VM message link}
774 wl:folder#id                              @r{WANDERLUST message link}
775 mhe:folder#id                             @r{MH-E message link}
776 rmail:folder#id                           @r{RMAIL message link}
777 gnus:group#id                             @r{Gnus article link}
778 bbdb:R.*Stallman                          @r{BBDB link (with regexp)}
779 irc:/irc.com/#emacs/bob                   @r{IRC link}
780 info:org:External%20links                 @r{Info node link (with encoded space)}
781 @end smallexample
783 A link should be enclosed in double brackets and may contain a
784 descriptive text to be displayed instead of the URL (@pxref{Link
785 format}), for example:
787 @smallexample
788 [[http://www.gnu.org/software/emacs/][GNU Emacs]]
789 @end smallexample
791 @noindent
792 If the description is a file name or URL that points to an image, HTML export
793 (@pxref{HTML export}) will inline the image as a clickable button.  If there
794 is no description at all and the link points to an image, that image will be
795 inlined into the exported HTML file.
797 @node Handling links, Targeted links, External links, Hyperlinks
798 @section Handling links
800 Org provides methods to create a link in the correct syntax, to
801 insert it into an Org file, and to follow the link.
803 @table @kbd
804 @item C-c l
805 Store a link to the current location.  This is a @emph{global} command (you
806 must create the key binding yourself) which can be used in any buffer to
807 create a link.  The link will be stored for later insertion into an Org
808 buffer (see below).
810 @item C-c C-l
811 Insert a link.  This prompts for a link to be inserted into the buffer.  You
812 can just type a link, or use history keys @key{up} and @key{down} to access
813 stored links.  You will be prompted for the description part of the link.
814 When called with a @kbd{C-u} prefix argument, file name completion is used to
815 link to a file.
817 @item C-c C-l @r{(with cursor on existing link)}
818 When the cursor is on an existing link, @kbd{C-c C-l} allows you to edit the
819 link and description parts of the link.
821 @item C-c C-o @r{or} mouse-1 @r{or} mouse-2
822 Open link at point.
823 @item C-c &
824 Jump back to a recorded position.  A position is recorded by the
825 commands following internal links, and by @kbd{C-c %}.  Using this
826 command several times in direct succession moves through a ring of
827 previously recorded positions.
829 @end table
831 @node Targeted links,  , Handling links, Hyperlinks
832 @section Targeted links
834 File links can contain additional information to make Emacs jump to a
835 particular location in the file when following a link.  This can be a
836 line number or a search option after a double colon.
838 Here is the syntax of the different ways to attach a search to a file
839 link, together with an explanation:
841 @smallexample
842 [[file:~/code/main.c::255]]                 @r{Find line 255}
843 [[file:~/xx.org::My Target]]                @r{Find @samp{<<My Target>>}}
844 [[file:~/xx.org::#my-custom-id]]            @r{Find entry with custom id}
845 @end smallexample
847 @seealso{
848 @uref{http://orgmode.org/manual/Hyperlinks.html#Hyperlinks, Chapter 4 of the
849 manual}}
851 @node TODO Items, Tags, Hyperlinks, Top
852 @chapter TODO Items
854 Org mode does not maintain TODO lists as separate documents@footnote{Of
855 course, you can make a document that contains only long lists of TODO items,
856 but this is not required.}.  Instead, TODO items are an integral part of the
857 notes file, because TODO items usually come up while taking notes!  With Org
858 mode, simply mark any entry in a tree as being a TODO item.  In this way,
859 information is not duplicated, and the entire context from which the TODO
860 item emerged is always present.
862 Of course, this technique for managing TODO items scatters them
863 throughout your notes file.  Org mode compensates for this by providing
864 methods to give you an overview of all the things that you have to do.
866 @menu
867 * Using TODO states::           
868 * Multi-state workflows::       
869 * Progress logging::            Dates and notes for progress
870 * Priorities::                  Some things are more important than others
871 * Breaking down tasks::         Splitting a task into manageable pieces
872 * Checkboxes::                  Tick-off lists
873 @end menu
875 @node Using TODO states, Multi-state workflows, TODO Items, TODO Items
876 @section Using TODO states
878 Any headline becomes a TODO item when it starts with the word
879 @samp{TODO}, for example:
881 @smallexample
882 *** TODO Write letter to Sam Fortune
883 @end smallexample
885 @noindent
886 The most important commands to work with TODO entries are:
888 @table @kbd
889 @item C-c C-t
890 Rotate the TODO state of the current item among
892 @smallexample
893 ,-> (unmarked) -> TODO -> DONE --.
894 '--------------------------------'
895 @end smallexample
897 The same rotation can also be done ``remotely'' from the timeline and
898 agenda buffers with the @kbd{t} command key (@pxref{Agenda commands}).
900 @item S-@key{right}@r{/}@key{left}
901 Select the following/preceding TODO state, similar to cycling.
902 @item C-c / t
903 View TODO items in a @emph{sparse tree} (@pxref{Sparse trees}).  Folds the
904 buffer, but shows all TODO items and the headings hierarchy above
905 them.
906 @item C-c a t
907 Show the global TODO list.  Collects the TODO items from all agenda files
908 (@pxref{Agenda Views}) into a single buffer.  @xref{Global TODO list}, for
909 more information.
910 @item S-M-@key{RET}
911 Insert a new TODO entry below the current one.
912 @end table
914 @noindent
915 Changing a TODO state can also trigger tag changes.  See the docstring of the
916 option @code{org-todo-state-tags-triggers} for details.
918 @node Multi-state workflows, Progress logging, Using TODO states, TODO Items
919 @section Multi-state workflows
921 You can use TODO keywords to indicate different @emph{sequential} states
922 in the process of working on an item, for example:
924 @smalllisp
925 (setq org-todo-keywords
926   '((sequence "TODO" "FEEDBACK" "VERIFY" "|" "DONE" "DELEGATED")))
927 @end smalllisp
929 The vertical bar separates the TODO keywords (states that @emph{need
930 action}) from the DONE states (which need @emph{no further action}).  If
931 you don't provide the separator bar, the last state is used as the DONE
932 state.
933 With this setup, the command @kbd{C-c C-t} will cycle an entry from TODO
934 to FEEDBACK, then to VERIFY, and finally to DONE and DELEGATED.  
936 Sometimes you may want to use different sets of TODO keywords in
937 parallel.  For example, you may want to have the basic
938 @code{TODO}/@code{DONE}, but also a workflow for bug fixing, and a
939 separate state indicating that an item has been canceled (so it is not
940 DONE, but also does not require action).  Your setup would then look
941 like this:
943 @smalllisp
944 (setq org-todo-keywords
945       '((sequence "TODO(t)" "|" "DONE(d)")
946         (sequence "REPORT(r)" "BUG(b)" "KNOWNCAUSE(k)" "|" "FIXED(f)")
947         (sequence "|" "CANCELED(c)")))
948 @end smalllisp
950 The keywords should all be different, this helps Org mode to keep track of
951 which subsequence should be used for a given entry.  The example also shows
952 how to define keys for fast access of a particular state, by adding a letter
953 in parenthesis after each keyword - you will be prompted for the key after
954 @kbd{C-c C-t}.
956 To define TODO keywords that are valid only in a single file, use the
957 following text anywhere in the file.
959 @smallexample
960 #+TODO: TODO(t) | DONE(d)
961 #+TODO: REPORT(r) BUG(b) KNOWNCAUSE(k) | FIXED(f)
962 #+TODO: | CANCELED(c)
963 @end smallexample
965 After changing one of these lines, use @kbd{C-c C-c} with the cursor still in
966 the line to make the changes known to Org mode.
968 @node Progress logging, Priorities, Multi-state workflows, TODO Items
969 @section Progress logging
971 Org mode can automatically record a timestamp and possibly a note when
972 you mark a TODO item as DONE, or even each time you change the state of
973 a TODO item.  This system is highly configurable, settings can be on a
974 per-keyword basis and can be localized to a file or even a subtree.  For
975 information on how to clock working time for a task, see @ref{Clocking
976 work time}.
978 @menu
979 * Closing items::               When was this entry marked DONE?
980 * Tracking TODO state changes::  When did the status change?
981 @end menu
983 @node Closing items, Tracking TODO state changes, Progress logging, Progress logging
984 @unnumberedsubsec Closing items
986 The most basic logging is to keep track of @emph{when} a certain TODO
987 item was finished.  This is achieved with@footnote{The corresponding
988 in-buffer setting is: @code{#+STARTUP: logdone}}.
990 @smalllisp
991 (setq org-log-done 'time)
992 @end smalllisp
994 @noindent
995 Then each time you turn an entry from a TODO (not-done) state into any of the
996 DONE states, a line @samp{CLOSED: [timestamp]} will be inserted just after
997 the headline.  If you want to record a note along with the timestamp,
998 use@footnote{The corresponding in-buffer setting is: @code{#+STARTUP:
999 lognotedone}}
1001 @smalllisp
1002 (setq org-log-done 'note)
1003 @end smalllisp
1005 @noindent
1006 You will then be prompted for a note, and that note will be stored below
1007 the entry with a @samp{Closing Note} heading.
1009 @node Tracking TODO state changes,  , Closing items, Progress logging
1010 @unnumberedsubsec Tracking TODO state changes
1012 You might want to keep track of TODO state changes.  You can either record
1013 just a timestamp, or a time-stamped note for a change.  These records will be
1014 inserted after the headline as an itemized list.  When taking a lot of notes,
1015 you might want to get the notes out of the way into a drawer.  Customize the
1016 variable @code{org-log-into-drawer} to get this behavior.
1018 For state logging, Org mode expects configuration on a per-keyword basis.
1019 This is achieved by adding special markers @samp{!} (for a timestamp) and
1020 @samp{@@} (for a note) in parentheses after each keyword.  For example:
1021 @smallexample
1022 #+TODO: TODO(t) WAIT(w@@/!) | DONE(d!) CANCELED(c@@)
1023 @end smallexample
1024 @noindent
1025 will define TODO keywords and fast access keys, and also request that a time
1026 is recorded when the entry is set to DONE, and that a note is recorded when
1027 switching to WAIT or CANCELED.  The same syntax works also when setting
1028 @code{org-todo-keywords}.
1030 @node Priorities, Breaking down tasks, Progress logging, TODO Items
1031 @section Priorities
1033 If you use Org mode extensively, you may end up with enough TODO items that
1034 it starts to make sense to prioritize them.  Prioritizing can be done by
1035 placing a @emph{priority cookie} into the headline of a TODO item, like this
1037 @smallexample
1038 *** TODO [#A] Write letter to Sam Fortune
1039 @end smallexample
1041 @noindent
1042 Org mode supports three priorities: @samp{A}, @samp{B}, and @samp{C}.
1043 @samp{A} is the highest, @samp{B} the default if none is given.  Priorities
1044 make a difference only in the agenda.
1046 @table @kbd
1047 @item @kbd{C-c ,}
1048 Set the priority of the current headline.  Press @samp{A}, @samp{B} or
1049 @samp{C} to select a priority, or @key{SPC} to remove the cookie.
1051 @item S-@key{up}
1052 @itemx S-@key{down}
1053 Increase/decrease priority of current headline
1054 @end table
1056 @node Breaking down tasks, Checkboxes, Priorities, TODO Items
1057 @section Breaking tasks down into subtasks
1059 It is often advisable to break down large tasks into smaller, manageable
1060 subtasks.  You can do this by creating an outline tree below a TODO item,
1061 with detailed subtasks on the tree.  To keep the overview over the fraction
1062 of subtasks that are already completed, insert either @samp{[/]} or
1063 @samp{[%]} anywhere in the headline.  These cookies will be updated each time
1064 the TODO status of a child changes, or when pressing @kbd{C-c C-c} on the
1065 cookie.  For example:
1067 @smallexample
1068 * Organize Party [33%]
1069 ** TODO Call people [1/2]
1070 *** TODO Peter
1071 *** DONE Sarah
1072 ** TODO Buy food
1073 ** DONE Talk to neighbor
1074 @end smallexample
1076 @node Checkboxes,  , Breaking down tasks, TODO Items
1077 @section Checkboxes
1079 Every item in a plain list (@pxref{Plain lists}) can be made into a checkbox
1080 by starting it with the string @samp{[ ]}.  Checkboxes are not included into
1081 the global TODO list, so they are often great to split a task into a number
1082 of simple steps.
1083 Here is an example of a checkbox list.
1085 @smallexample
1086 * TODO Organize party [1/3]
1087   - [-] call people [1/2]
1088     - [ ] Peter
1089     - [X] Sarah
1090   - [X] order food
1091   - [ ] think about what music to play
1092 @end smallexample
1094 Checkboxes work hierarchically, so if a checkbox item has children that
1095 are checkboxes, toggling one of the children checkboxes will make the
1096 parent checkbox reflect if none, some, or all of the children are
1097 checked.
1099 @noindent The following commands work with checkboxes:
1101 @table @kbd
1102 @item C-c C-c
1103 Toggle checkbox status or (with prefix arg) checkbox presence at point.
1104 @item M-S-@key{RET}
1105 Insert a new item with a checkbox.
1106 This works only if the cursor is already in a plain list item
1107 (@pxref{Plain lists}).
1108 @end table
1110 @seealso{
1111 @uref{http://orgmode.org/manual/TODO-Items.html#TODO-Items, Chapter 5 of the manual}@*
1112 @uref{http://orgmode.org/worg/org-tutorials/orgtutorial_dto.php, David
1113 O'Toole's introductory tutorial}@*
1114 @uref{http://members.optusnet.com.au/~charles57/GTD/gtd_workflow.html,
1115 Charles Cave's GTD setup}}
1117 @node Tags, Properties, TODO Items, Top
1118 @chapter Tags
1120 An excellent way to implement labels and contexts for cross-correlating
1121 information is to assign @i{tags} to headlines.  Org mode has extensive
1122 support for tags.
1124 Every headline can contain a list of tags; they occur at the end of the
1125 headline.  Tags are normal words containing letters, numbers, @samp{_}, and
1126 @samp{@@}.  Tags must be preceded and followed by a single colon, e.g.,
1127 @samp{:work:}.  Several tags can be specified, as in @samp{:work:urgent:}.
1128 Tags will by default be in bold face with the same color as the headline.
1130 @menu
1131 * Tag inheritance::             Tags use the tree structure of the outline
1132 * Setting tags::                How to assign tags to a headline
1133 * Tag searches::                Searching for combinations of tags
1134 @end menu
1136 @node Tag inheritance, Setting tags, Tags, Tags
1137 @section Tag inheritance
1139 @i{Tags} make use of the hierarchical structure of outline trees.  If a
1140 heading has a certain tag, all subheadings will inherit the tag as
1141 well.  For example, in the list
1143 @smallexample
1144 * Meeting with the French group      :work:
1145 ** Summary by Frank                  :boss:notes:
1146 *** TODO Prepare slides for him      :action:
1147 @end smallexample
1149 @noindent
1150 the final heading will have the tags @samp{:work:}, @samp{:boss:},
1151 @samp{:notes:}, and @samp{:action:} even though the final heading is not
1152 explicitly marked with those tags.  You can also set tags that all entries in
1153 a file should inherit just as if these tags were defined in a hypothetical
1154 level zero that surrounds the entire file.  Use a line like this@footnote{As
1155 with all these in-buffer settings, pressing @kbd{C-c C-c} activates any
1156 changes in the line.}:
1158 @smallexample
1159 #+FILETAGS: :Peter:Boss:Secret:
1160 @end smallexample
1162 @node Setting tags, Tag searches, Tag inheritance, Tags
1163 @section Setting tags
1165 Tags can simply be typed into the buffer at the end of a headline.
1166 After a colon, @kbd{M-@key{TAB}} offers completion on tags.  There is
1167 also a special command for inserting tags:
1169 @table @kbd
1170 @item C-c C-q
1171 Enter new tags for the current headline.  Org mode will either offer
1172 completion or a special single-key interface for setting tags, see
1173 below.  After pressing @key{RET}, the tags will be inserted and aligned
1174 to @code{org-tags-column}.  When called with a @kbd{C-u} prefix, all
1175 tags in the current buffer will be aligned to that column, just to make
1176 things look nice.
1177 @item C-c C-c
1178 When the cursor is in a headline, this does the same as @kbd{C-c C-q}.
1179 @end table
1181 Org will support tag insertion based on a @emph{list of tags}.  By
1182 default this list is constructed dynamically, containing all tags
1183 currently used in the buffer.  You may also globally specify a hard list
1184 of tags with the variable @code{org-tag-alist}.  Finally you can set
1185 the default tags for a given file with lines like
1187 @smallexample
1188 #+TAGS: @@work @@home @@tennisclub
1189 #+TAGS: laptop car pc sailboat
1190 @end smallexample
1192 By default Org mode uses the standard minibuffer completion facilities for
1193 entering tags.  However, it also implements another, quicker, tag selection
1194 method called @emph{fast tag selection}.  This allows you to select and
1195 deselect tags with just a single key press.  For this to work well you should
1196 assign unique letters to most of your commonly used tags.  You can do this
1197 globally by configuring the variable @code{org-tag-alist} in your
1198 @file{.emacs} file.  For example, you may find the need to tag many items in
1199 different files with @samp{:@@home:}.  In this case you can set something
1200 like:
1202 @smalllisp
1203 (setq org-tag-alist '(("@@work" . ?w) ("@@home" . ?h) ("laptop" . ?l)))
1204 @end smalllisp
1206 @noindent If the tag is only relevant to the file you are working on, then you
1207 can instead set the TAGS option line as:
1209 @smallexample
1210 #+TAGS: @@work(w)  @@home(h)  @@tennisclub(t)  laptop(l)  pc(p)
1211 @end smallexample
1213 @node Tag searches,  , Setting tags, Tags
1214 @section Tag searches
1216 Once a system of tags has been set up, it can be used to collect related
1217 information into special lists.
1219 @table @kbd
1220 @item C-c \
1221 @itemx C-c / m
1222 Create a sparse tree with all headlines matching a tags search.  With a
1223 @kbd{C-u} prefix argument, ignore headlines that are not a TODO line.
1224 @item C-c a m
1225 Create a global list of tag matches from all agenda files.
1226 @xref{Matching tags and properties}.
1227 @item C-c a M
1228 Create a global list of tag matches from all agenda files, but check
1229 only TODO items and force checking subitems (see variable
1230 @code{org-tags-match-list-sublevels}).
1231 @end table
1233 These commands all prompt for a match string which allows basic Boolean logic
1234 like @samp{+boss+urgent-project1}, to find entries with tags @samp{boss} and
1235 @samp{urgent}, but not @samp{project1}, or @samp{Kathy|Sally} to find entries
1236 which are tagged, like @samp{Kathy} or @samp{Sally}.  The full syntax of the
1237 search string is rich and allows also matching against TODO keywords, entry
1238 levels and properties.  For a complete description with many examples, see
1239 @ref{Matching tags and properties}.
1241 @seealso{
1242 @uref{http://orgmode.org/manual/Tags.html#Tags, Chapter 6 of the manual}@*
1243 @uref{http://sachachua.com/wp/2008/01/tagging-in-org-plus-bonus-code-for-timeclocks-and-tags/,
1244 Sacha Chua's article about tagging in Org-mode}}
1246 @node Properties, Dates and Times, Tags, Top
1247 @chapter Properties
1249 Properties are key-value pairs associates with and entry.  They live in a
1250 special drawer with the name @code{PROPERTIES}.  Each
1251 property is specified on a single line, with the key (surrounded by colons)
1252 first, and the value after it:
1254 @smallexample
1255 * CD collection
1256 ** Classic
1257 *** Goldberg Variations
1258     :PROPERTIES:
1259     :Title:     Goldberg Variations
1260     :Composer:  J.S. Bach
1261     :Publisher: Deutsche Grammophon
1262     :NDisks:    1
1263     :END:
1264 @end smallexample
1266 You may define the allowed values for a particular property @samp{:Xyz:}
1267 by setting a property @samp{:Xyz_ALL:}.  This special property is
1268 @emph{inherited}, so if you set it in a level 1 entry, it will apply to
1269 the entire tree.  When allowed values are defined, setting the
1270 corresponding property becomes easier and is less prone to typing
1271 errors.  For the example with the CD collection, we can predefine
1272 publishers and the number of disks in a box like this:
1274 @smallexample
1275 * CD collection
1276   :PROPERTIES:
1277   :NDisks_ALL:  1 2 3 4
1278   :Publisher_ALL: "Deutsche Grammophon" Philips EMI
1279   :END:
1280 @end smallexample
1281 or globally using @code{org-global-properties}, or file-wide like this:
1282 @smallexample
1283 #+PROPERTY: NDisks_ALL 1 2 3 4
1284 @end smallexample
1286 @table @kbd
1287 @item C-c C-x p
1288 Set a property.  This prompts for a property name and a value.
1289 @item C-c C-c d
1290 Remove a property from the current entry.
1291 @end table
1293 To create sparse trees and special lists with selection based on properties,
1294 the same commands are used as for tag searches (@pxref{Tag searches}).  The
1295 syntax for the search string is described in @ref{Matching tags and
1296 properties}.
1298 @table @kbd
1299 @end table
1301 @seealso{
1302 @uref{http://orgmode.org/manual/Properties-and-Columns.html#Properties-and-Columns,
1303 Chapter 7 of the manual}@*
1304 @uref{http://orgmode.org/worg/org-tutorials/org-column-view-tutorial.php,Bastien
1305 Guerry's column view tutorial}}
1307 @node Dates and Times, Capture - Refile - Archive, Properties, Top
1308 @chapter Dates and Times
1310 To assist project planning, TODO items can be labeled with a date and/or
1311 a time.  The specially formatted string carrying the date and time
1312 information is called a @emph{timestamp} in Org mode.
1314 @menu
1315 * Timestamps::                  Assigning a time to a tree entry
1316 * Creating timestamps::         Commands which insert timestamps
1317 * Deadlines and scheduling::    Planning your work
1318 * Clocking work time::          Tracking how long you spend on a task
1319 @end menu
1322 @node Timestamps, Creating timestamps, Dates and Times, Dates and Times
1323 @section Timestamps
1325 A timestamp is a specification of a date (possibly with a time or a range of
1326 times) in a special format, either @samp{<2003-09-16 Tue>} or
1327 @samp{<2003-09-16 Tue 09:39>} or @samp{<2003-09-16 Tue 12:00-12:30>}.  A
1328 timestamp can appear anywhere in the headline or body of an Org tree entry.
1329 Its presence causes entries to be shown on specific dates in the agenda
1330 (@pxref{Weekly/daily agenda}).  We distinguish:
1332 @noindent @b{Plain timestamp; Event; Appointment}@*
1333 A simple timestamp just assigns a date/time to an item.  This is just
1334 like writing down an appointment or event in a paper agenda.
1336 @smallexample
1337 * Meet Peter at the movies <2006-11-01 Wed 19:15>
1338 * Discussion on climate change <2006-11-02 Thu 20:00-22:00>
1339 @end smallexample
1341 @noindent @b{Timestamp with repeater interval}@*
1342 A timestamp may contain a @emph{repeater interval}, indicating that it
1343 applies not only on the given date, but again and again after a certain
1344 interval of N days (d), weeks (w), months (m), or years (y).  The
1345 following will show up in the agenda every Wednesday:
1346 @smallexample
1347 * Pick up Sam at school <2007-05-16 Wed 12:30 +1w>
1348 @end smallexample
1350 @noindent @b{Diary-style sexp entries}@*
1351 For more complex date specifications, Org mode supports using the
1352 special sexp diary entries implemented in the Emacs calendar/diary
1353 package.  For example
1354 @smallexample
1355 * The nerd meeting on every 2nd Thursday of the month
1356   <%%(diary-float t 4 2)>
1357 @end smallexample
1359 @noindent @b{Time/Date range}@*
1360 Two timestamps connected by @samp{--} denote a range.
1361 @smallexample
1362 ** Meeting in Amsterdam
1363    <2004-08-23 Mon>--<2004-08-26 Thu>
1364 @end smallexample
1366 @noindent @b{Inactive timestamp}@*
1367 Just like a plain timestamp, but with square brackets instead of
1368 angular ones.  These timestamps are inactive in the sense that they do
1369 @emph{not} trigger an entry to show up in the agenda.
1371 @smallexample
1372 * Gillian comes late for the fifth time [2006-11-01 Wed]
1373 @end smallexample
1376 @node Creating timestamps, Deadlines and scheduling, Timestamps, Dates and Times
1377 @section Creating timestamps
1379 For Org mode to recognize timestamps, they need to be in the specific
1380 format.  All commands listed below produce timestamps in the correct
1381 format.
1383 @table @kbd
1384 @item C-c .
1385 Prompt for a date and insert a corresponding timestamp.  When the cursor is
1386 at an existing timestamp in the buffer, the command is used to modify this
1387 timestamp instead of inserting a new one.  When this command is used twice in
1388 succession, a time range is inserted.  With a prefix, also add the current
1389 time. 
1391 @item C-c !
1392 Like @kbd{C-c .}, but insert an inactive timestamp that will not cause
1393 an agenda entry.
1395 @item S-@key{left}@r{/}@key{right}
1396 Change date at cursor by one day.
1398 @item S-@key{up}@r{/}@key{down}
1399 Change the item under the cursor in a timestamp.  The cursor can be on a
1400 year, month, day, hour or minute.  When the timestamp contains a time range
1401 like @samp{15:30-16:30}, modifying the first time will also shift the second,
1402 shifting the time block with constant length.  To change the length, modify
1403 the second time.
1404 @end table
1406 When Org mode prompts for a date/time, it will accept any string containing
1407 some date and/or time information, and intelligently interpret the string,
1408 deriving defaults for unspecified information from the current date and time.
1409 You can also select a date in the pop-up calendar.  See the manual for more
1410 information on how exactly the date/time prompt works.
1412 @node Deadlines and scheduling, Clocking work time, Creating timestamps, Dates and Times
1413 @section Deadlines and scheduling
1415 A timestamp may be preceded by special keywords to facilitate planning:
1417 @noindent @b{DEADLINE}@*
1418 Meaning: the task (most likely a TODO item, though not necessarily) is supposed
1419 to be finished on that date.
1420 @table @kbd
1421 @item C-c C-d
1422 Insert @samp{DEADLINE} keyword along with a stamp, in the line following the
1423 headline.
1424 @end table
1426 On the deadline date, the task will be listed in the agenda.  In
1427 addition, the agenda for @emph{today} will carry a warning about the
1428 approaching or missed deadline, starting
1429 @code{org-deadline-warning-days} before the due date, and continuing
1430 until the entry is marked DONE.  An example:
1432 @smallexample
1433 *** TODO write article about the Earth for the Guide
1434     The editor in charge is [[bbdb:Ford Prefect]]
1435     DEADLINE: <2004-02-29 Sun>
1436 @end smallexample
1439 @noindent @b{SCHEDULED}@*
1440 Meaning: you are @i{planning to start working} on that task on the given
1441 date@footnote{This is quite different from what is normally understood by
1442 @i{scheduling a meeting}, which is done in Org-mode by just inserting a time
1443 stamp without keyword.}.
1445 @table @kbd
1446 @item C-c C-s
1447 Insert @samp{SCHEDULED} keyword along with a stamp, in the line following the
1448 headline.
1449 @end table
1451 The headline will be listed under the given date@footnote{It will still
1452 be listed on that date after it has been marked DONE.  If you don't like
1453 this, set the variable @code{org-agenda-skip-scheduled-if-done}.}.  In
1454 addition, a reminder that the scheduled date has passed will be present
1455 in the compilation for @emph{today}, until the entry is marked DONE.
1456 I.e. the task will automatically be forwarded until completed.
1458 @smallexample
1459 *** TODO Call Trillian for a date on New Years Eve.
1460     SCHEDULED: <2004-12-25 Sat>
1461 @end smallexample
1463 Some tasks need to be repeated again and again.  Org mode helps to
1464 organize such tasks using a so-called repeater in a DEADLINE, SCHEDULED,
1465 or plain timestamp.  In the following example
1466 @smallexample
1467 ** TODO Pay the rent
1468    DEADLINE: <2005-10-01 Sat +1m>
1469 @end smallexample
1470 @noindent
1471 the @code{+1m} is a repeater; the intended interpretation is that the task
1472 has a deadline on <2005-10-01> and repeats itself every (one) month starting
1473 from that time.
1475 @node Clocking work time,  , Deadlines and scheduling, Dates and Times
1476 @section Clocking work time
1478 Org mode allows you to clock the time you spend on specific tasks in a
1479 project.
1481 @table @kbd
1482 @item C-c C-x C-i
1483 Start the clock on the current item (clock-in).  This inserts the CLOCK
1484 keyword together with a timestamp.  When called with a @kbd{C-u} prefix
1485 argument, select the task from a list of recently clocked tasks.
1487 @item C-c C-x C-o
1488 Stop the clock (clock-out).  This inserts another timestamp at the same
1489 location where the clock was last started.  It also directly computes
1490 the resulting time in inserts it after the time range as @samp{=>
1491 HH:MM}.
1492 @item C-c C-x C-e
1493 Update the effort estimate for the current clock task.
1494 @item C-c C-x C-x
1495 Cancel the current clock.  This is useful if a clock was started by
1496 mistake, or if you ended up working on something else.
1497 @item C-c C-x C-j
1498 Jump to the entry that contains the currently running clock.  With a
1499 @kbd{C-u} prefix arg, select the target task from a list of recently clocked
1500 tasks.
1501 @item C-c C-x C-r
1502 Insert a dynamic block containing a clock
1503 report as an Org-mode table into the current file.  When the cursor is
1504 at an existing clock table, just update it.
1505 @smallexample
1506 #+BEGIN: clocktable :maxlevel 2 :emphasize nil :scope file
1507 #+END: clocktable
1508 @end smallexample
1509 @noindent
1510 For details about how to customize this view, see @uref{http://orgmode.org/manual/Clocking-work-time.html#Clocking-work-time,the manual}.
1511 @item C-c C-c
1512 Update dynamic block at point.  The cursor needs to be in the
1513 @code{#+BEGIN} line of the dynamic block.
1514 @end table
1516 The @kbd{l} key may be used in the timeline (@pxref{Timeline}) and in
1517 the agenda (@pxref{Weekly/daily agenda}) to show which tasks have been
1518 worked on or closed during a day.
1520 @seealso{
1521 @uref{http://orgmode.org/manual/Dates-and-Times.html#Dates-and-Times,
1522 Chapter 8 of the manual}@*
1523 @uref{http://members.optusnet.com.au/~charles57/GTD/org_dates/, Charles
1524 Cave's Date and Time tutorial}@*
1525 @uref{http://doc.norang.ca/org-mode.html#Clocking, Bernt Hansen's clocking workflow}}
1527 @node Capture - Refile - Archive, Agenda Views, Dates and Times, Top
1528 @chapter Capture - Refile - Archive
1530 An important part of any organization system is the ability to quickly
1531 capture new ideas and tasks, and to associate reference material with them.
1532 Org uses the @file{remember.el} package to create tasks, and stores files
1533 related to a task (@i{attachments}) in a special directory.  Once in the
1534 system, tasks and projects need to be moved around.  Moving completed project
1535 trees to an archive file keeps the system compact and fast.
1537 @menu
1538 * Remember::                    Capture new tasks/ideas with little interruption
1539 * Refiling notes::              Moving a tree from one place to another
1540 * Archiving::                   What to do with finished projects
1541 @end menu
1543 @node Remember, Refiling notes, Capture - Refile - Archive, Capture - Refile - Archive
1544 @section Remember
1546 The Remember package by John Wiegley lets you store quick notes with little
1547 interruption of your work flow.  It is an excellent way to add new notes and
1548 tasks to Org files.  The @code{remember.el} package is part of Emacs 23, not
1549 Emacs 22.  See @uref{http://www.emacswiki.org/cgi-bin/wiki/RememberMode} for
1550 more information.
1552 Org significantly expands the possibilities of Remember: you may define
1553 templates for different note types, and associate target files and headlines
1554 with specific templates.  It also allows you to select the location where a
1555 note should be stored interactively, on the fly.
1557 @menu
1558 * Setting up Remember for Org::  Some code for .emacs to get things going
1559 * Remember templates::          Define the outline of different note types
1560 * Storing notes::               Directly get the note to where it belongs
1561 @end menu
1563 @node Setting up Remember for Org, Remember templates, Remember, Remember
1564 @unnumberedsubsec Setting up Remember for Org
1566 The following customization will tell Remember to use Org files as
1567 target, and to create annotations compatible with Org links.
1569 @smallexample
1570 (org-remember-insinuate)
1571 (setq org-directory "~/path/to/my/orgfiles/")
1572 (setq org-default-notes-file (concat org-directory "/notes.org"))
1573 (define-key global-map "\C-cr" 'org-remember)
1574 @end smallexample
1576 @noindent
1577 The last line binds the command @code{org-remember} to a global
1578 key@footnote{Please select your own key, @kbd{C-c r} is only a
1579 suggestion.}.  @code{org-remember} basically just calls Remember,
1580 but it makes a few things easier: if there is an active region, it will
1581 automatically copy the region into the Remember buffer.  It also allows
1582 to jump to the buffer and location where Remember notes are being
1583 stored: just call @code{org-remember} with a prefix argument.  If you
1584 use two prefix arguments, Org jumps to the location where the last
1585 remember note was stored.
1587 @node Remember templates, Storing notes, Setting up Remember for Org, Remember
1588 @unnumberedsubsec Remember templates
1590 In combination with Org, you can use templates to generate
1591 different types of Remember notes.  For example, if you would like
1592 to use one template to create general TODO entries, another one for
1593 journal entries, and a third one for collecting random ideas, you could
1594 use:
1596 @smallexample
1597 (setq org-remember-templates
1598  '(("Todo" ?t "* TODO %?\n  %i\n  %a" "~/org/TODO.org" "Tasks")
1599    ("Journal" ?j "* %U %?\n\n  %i\n  %a" "~/org/JOURNAL.org")
1600    ("Idea" ?i "* %^@{Title@}\n  %i\n  %a" "~/org/JOURNAL.org" "New Ideas")))
1601 @end smallexample
1603 @noindent In these entries, the first string is just a name, and the
1604 character specifies how to select the template.  It is useful if the
1605 character is also the first letter of the name.  The next string specifies
1606 the template.  Two more (optional) strings give the file in which, and the
1607 headline under which, the new note should be stored.
1609 When you call @kbd{M-x org-remember} (or @kbd{M-x remember}) to remember
1610 something, Org will prompt for a key to select the template (if you have
1611 more than one template) and then prepare the buffer like
1612 @smallexample
1613 * TODO
1614   [[file:@var{link to where you called remember}]]
1615 @end smallexample
1617 @noindent
1618 During expansion of the template, special @kbd{%}-escapes@footnote{If you
1619 need one of these sequences literally, escape the @kbd{%} with a backslash.}
1620 allow dynamic insertion of content.  Here is a small selection of the
1621 possibilities, consult the manual for more.
1622 @smallexample
1623 %a          @r{annotation, normally the link created with @code{org-store-link}}
1624 %i          @r{initial content, the region when remember is called with C-u.}
1625 %t          @r{timestamp, date only}
1626 %T          @r{timestamp with date and time}
1627 %u, %U      @r{like the above, but inactive timestamps}
1628 @end smallexample
1630 @node Storing notes,  , Remember templates, Remember
1631 @unnumberedsubsec Storing notes
1633 When you are finished preparing a note with Remember, you have to press
1634 @kbd{C-c C-c} to file the note away. 
1636 The handler will store the note in the file and under the headline
1637 specified in the template, or it will use the default file and headline.  The
1638 window configuration will be restored, sending you back to the working
1639 context before the call to Remember.
1641 @node Refiling notes, Archiving, Remember, Capture - Refile - Archive
1642 @section Refiling notes
1644 When reviewing the captured data, you may want to refile some of the entries
1645 into a different list, for example into a project.  Cutting, finding the
1646 right location, and then pasting the note is cumbersome.  To simplify this
1647 process, you can use the following special command:
1649 @table @kbd
1650 @item C-c C-w
1651 Refile the entry or region at point.  This command offers possible locations
1652 for refiling the entry and lets you select one with completion.  The item (or
1653 all items in the region) is filed below the target heading as a subitem.@*
1654 By default, all level 1 headlines in the current buffer are considered to be
1655 targets, but you can have more complex definitions across a number of files.
1656 See the variable @code{org-refile-targets} for details.
1657 @item C-u C-c C-w
1658 Use the refile interface to jump to a heading.
1659 @item C-u C-u C-c C-w
1660 Jump to the location where @code{org-refile} last moved a tree to.
1661 @end table
1663 @node Archiving,  , Refiling notes, Capture - Refile - Archive
1664 @section Archiving
1666 When a project represented by a (sub)tree is finished, you may want
1667 to move the tree out of the way and to stop it from contributing to the
1668 agenda.  Archiving is important to keep your working files compact and global
1669 searches like the construction of agenda views fast.
1670 The most common archiving action is to move a project tree to another file,
1671 the archive file.
1673 @table @kbd
1674 @item C-c C-x C-a
1675 Archive the current entry using the command specified in the variable
1676 @code{org-archive-default-command}.
1677 @item C-c C-x C-s@ @r{or short} @ C-c $
1678 Archive the subtree starting at the cursor position to the location
1679 given by @code{org-archive-location}.
1680 @end table
1682 The default archive location is a file in the same directory as the
1683 current file, with the name derived by appending @file{_archive} to the
1684 current file name.  For information and examples on how to change this,
1685 see the documentation string of the variable
1686 @code{org-archive-location}.  There is also an in-buffer option for
1687 setting this variable, for example
1689 @smallexample
1690 #+ARCHIVE: %s_done::
1691 @end smallexample
1693 @seealso{
1694 @uref{http://orgmode.org/manual/Capture-_002d-Refile-_002d-Archive.html#Capture-_002d-Refile-_002d-Archive,
1695 Chapter 9 of the manual}@*
1696 @uref{http://members.optusnet.com.au/~charles57/GTD/remember.html, Charles
1697 Cave's remember tutorial}@*
1698 @uref{http://orgmode.org/worg/org-tutorials/org-protocol-custom-handler.php,
1699 Sebastian Rose's tutorial for capturing from a web browser}}@uref{}@*
1701 @node Agenda Views, Markup, Capture - Refile - Archive, Top
1702 @chapter Agenda Views
1704 Due to the way Org works, TODO items, time-stamped items, and tagged
1705 headlines can be scattered throughout a file or even a number of files.  To
1706 get an overview of open action items, or of events that are important for a
1707 particular date, this information must be collected, sorted and displayed in
1708 an organized way.  There are several different views, see below.
1710 The extracted information is displayed in a special @emph{agenda buffer}.
1711 This buffer is read-only, but provides commands to visit the corresponding
1712 locations in the original Org files, and even to edit these files remotely.
1713 Remote editing from the agenda buffer means, for example, that you can
1714 change the dates of deadlines and appointments from the agenda buffer.
1715 The commands available in the Agenda buffer are listed in @ref{Agenda
1716 commands}.
1718 @menu
1719 * Agenda files::                Files being searched for agenda information
1720 * Agenda dispatcher::           Keyboard access to agenda views
1721 * Built-in agenda views::       What is available out of the box?
1722 * Agenda commands::             Remote editing of Org trees
1723 * Custom agenda views::         Defining special searches and views
1724 @end menu
1726 @node Agenda files, Agenda dispatcher, Agenda Views, Agenda Views
1727 @section Agenda files
1729 The information to be shown is normally collected from all @emph{agenda
1730 files}, the files listed in the variable
1731 @code{org-agenda-files}.
1733 @table @kbd
1734 @item C-c [
1735 Add current file to the list of agenda files.  The file is added to
1736 the front of the list.  If it was already in the list, it is moved to
1737 the front.  With a prefix argument, file is added/moved to the end.
1738 @item C-c ]
1739 Remove current file from the list of agenda files.
1740 @item C-,
1741 Cycle through agenda file list, visiting one file after the other.
1742 @end table
1744 @node Agenda dispatcher, Built-in agenda views, Agenda files, Agenda Views
1745 @section The agenda dispatcher
1746 The views are created through a dispatcher, which should be bound to a
1747 global key---for example @kbd{C-c a} (@pxref{Installation}).  After
1748 pressing @kbd{C-c a}, an additional letter is required to execute a
1749 command:
1750 @table @kbd
1751 @item a
1752 The calendar-like agenda (@pxref{Weekly/daily agenda}).
1753 @item t @r{/} T
1754 A list of all TODO items (@pxref{Global TODO list}).
1755 @item m @r{/} M
1756 A list of headlines matching a TAGS expression (@pxref{Matching
1757 tags and properties}).
1758 @item L
1759 The timeline view for the current buffer (@pxref{Timeline}).
1760 @item s
1761 A list of entries selected by a boolean expression of keywords
1762 and/or regular expressions that must or must not occur in the entry.
1763 @end table
1765 @node Built-in agenda views, Agenda commands, Agenda dispatcher, Agenda Views
1766 @section The built-in agenda views
1768 @menu
1769 * Weekly/daily agenda::         The calendar page with current tasks
1770 * Global TODO list::            All unfinished action items
1771 * Matching tags and properties::  Structured information with fine-tuned search
1772 * Timeline::                    Time-sorted view for single file
1773 * Search view::                 Find entries by searching for text
1774 @end menu
1776 @node Weekly/daily agenda, Global TODO list, Built-in agenda views, Built-in agenda views
1777 @subsection The weekly/daily agenda
1779 The purpose of the weekly/daily @emph{agenda} is to act like a page of a
1780 paper agenda, showing all the tasks for the current week or day.
1782 @table @kbd
1783 @item C-c a a
1784 Compile an agenda for the current week from a list of Org files.  The agenda
1785 shows the entries for each day.
1786 @end table
1788 Emacs contains the calendar and diary by Edward M. Reingold.  Org-mode
1789 understands the syntax of the diary and allows you to use diary sexp entries
1790 directly in Org files:
1792 @smallexample
1793 * Birthdays and similar stuff
1794 #+CATEGORY: Holiday
1795 %%(org-calendar-holiday)   ; special function for holiday names
1796 #+CATEGORY: Ann
1797 %%(diary-anniversary  5 14 1956)@footnote{Note that the order of the arguments (month, day, year) depends on the setting of @code{calendar-date-style}.} Arthur Dent is %d years old
1798 %%(diary-anniversary 10  2 1869) Mahatma Gandhi would be %d years old
1799 @end smallexample
1801 Org can interact with Emacs appointments notification facility.  To add all
1802 the appointments of your agenda files, use the command
1803 @code{org-agenda-to-appt}.  See the docstring for details.
1805 @node Global TODO list, Matching tags and properties, Weekly/daily agenda, Built-in agenda views
1806 @subsection The global TODO list
1808 The global TODO list contains all unfinished TODO items formatted and
1809 collected into a single place.  Remote editing of TODO items lets you
1810 can change the state of a TODO entry with a single key press.  The commands
1811 available in the TODO list are described in @ref{Agenda commands}.
1813 @table @kbd
1814 @item C-c a t
1815 Show the global TODO list.  This collects the TODO items from all
1816 agenda files (@pxref{Agenda Views}) into a single buffer.
1817 @item C-c a T
1818 Like the above, but allows selection of a specific TODO keyword. 
1819 @end table
1821 @node Matching tags and properties, Timeline, Global TODO list, Built-in agenda views
1822 @subsection Matching tags and properties
1824 If headlines in the agenda files are marked with @emph{tags} (@pxref{Tags}),
1825 or have properties (@pxref{Properties}), you can select headlines
1826 based on this metadata and collect them into an agenda buffer.  The match
1827 syntax described here also applies when creating sparse trees with @kbd{C-c /
1828 m}.  The commands available in the tags list are described in @ref{Agenda
1829 commands}.
1831 @table @kbd
1832 @item C-c a m
1833 Produce a list of all headlines that match a given set of tags.  The
1834 command prompts for a selection criterion, which is a boolean logic
1835 expression with tags, like @samp{+work+urgent-withboss} or
1836 @samp{work|home} (@pxref{Tags}).  If you often need a specific search,
1837 define a custom command for it (@pxref{Agenda dispatcher}).
1838 @item C-c a M
1839 Like @kbd{C-c a m}, but only select headlines that are also TODO items.
1840 @end table
1842 @subsubheading Match syntax
1844 A search string can use Boolean operators @samp{&} for AND and @samp{|} for
1845 OR.  @samp{&} binds more strongly than @samp{|}.  Parentheses are currently
1846 not implemented.  Each element in the search is either a tag, a regular
1847 expression matching tags, or an expression like @code{PROPERTY OPERATOR
1848 VALUE} with a comparison operator, accessing a property value.  Each element
1849 may be preceded by @samp{-}, to select against it, and @samp{+} is syntactic
1850 sugar for positive selection.  The AND operator @samp{&} is optional when
1851 @samp{+} or @samp{-} is present.  Here are some examples, using only tags.
1853 @table @samp
1854 @item +work-boss
1855 Select headlines tagged @samp{:work:}, but discard those also tagged
1856 @samp{:boss:}.
1857 @item work|laptop
1858 Selects lines tagged @samp{:work:} or @samp{:laptop:}.
1859 @item work|laptop+night
1860 Like before, but require the @samp{:laptop:} lines to be tagged also
1861 @samp{:night:}.
1862 @end table
1864 You may also test for properties at the same
1865 time as matching tags, see the manual for more information.
1867 @node Timeline, Search view, Matching tags and properties, Built-in agenda views
1868 @subsection Timeline for a single file
1870 The timeline summarizes all time-stamped items from a single Org mode
1871 file in a @emph{time-sorted view}.  The main purpose of this command is
1872 to give an overview over events in a project.
1874 @table @kbd
1875 @item C-c a L
1876 Show a time-sorted view of the Org file, with all time-stamped items.
1877 When called with a @kbd{C-u} prefix, all unfinished TODO entries
1878 (scheduled or not) are also listed under the current date.
1879 @end table
1881 @node Search view,  , Timeline, Built-in agenda views
1882 @subsection Search view
1884 This agenda view is a general text search facility for Org mode entries.
1885 It is particularly useful to find notes.
1887 @table @kbd
1888 @item C-c a s
1889 This is a special search that lets you select entries by matching a substring
1890 or specific words using a boolean logic.
1891 @end table
1892 For example, the search string @samp{computer equipment} will find entries
1893 that contain @samp{computer equipment} as a substring. 
1894 Search view can also search for specific keywords in the entry, using Boolean
1895 logic.  The search string @samp{+computer +wifi -ethernet -@{8\.11[bg]@}}
1896 will search for note entries that contain the keywords @code{computer}
1897 and @code{wifi}, but not the keyword @code{ethernet}, and which are also
1898 not matched by the regular expression @code{8\.11[bg]}, meaning to
1899 exclude both 8.11b and 8.11g. 
1901 Note that in addition to the agenda files, this command will also search
1902 the files listed in @code{org-agenda-text-search-extra-files}.
1904 @node Agenda commands, Custom agenda views, Built-in agenda views, Agenda Views
1905 @section Commands in the agenda buffer
1907 Entries in the agenda buffer are linked back to the Org file or diary
1908 file where they originate.  Commands are provided to show and jump to the
1909 original entry location, and to edit the Org files ``remotely'' from
1910 the agenda buffer.  This is just a selection of the many commands, explore
1911 the @code{Agenda} menu and the manual for a complete list.
1913 @table @kbd
1914 @tsubheading{Motion}
1915 @item n
1916 Next line (same as @key{up} and @kbd{C-p}).
1917 @item p
1918 Previous line (same as @key{down} and @kbd{C-n}).
1919 @tsubheading{View/Go to Org file}
1920 @item mouse-3
1921 @itemx @key{SPC}
1922 Display the original location of the item in another window.
1923 With prefix arg, make sure that the entire entry is made visible in the
1924 outline, not only the heading.
1926 @itemx @key{TAB}
1927 Go to the original location of the item in another window.  Under Emacs
1928 22, @kbd{mouse-1} will also works for this.
1930 @itemx @key{RET}
1931 Go to the original location of the item and delete other windows.
1934 @tsubheading{Change display}
1935 @item o
1936 Delete other windows.
1938 @item d @r{/} w
1939 Switch to day/week view. 
1941 @item f @r{and} b
1942 Go forward/backward in time to display the following @code{org-agenda-ndays}
1943 days.  For example, if the display covers a week, switch to the
1944 following/previous week.
1946 @item .
1947 Go to today.
1949 @item j
1950 Prompt for a date and go there.
1952 @item v l @ @r{or short} @ l
1953 Toggle Logbook mode.  In Logbook mode, entries that were marked DONE while
1954 logging was on (variable @code{org-log-done}) are shown in the agenda, as are
1955 entries that have been clocked on that day.  When called with a @kbd{C-u}
1956 prefix, show all possible logbook entries, including state changes.
1958 @item r @r{or} g
1959 Recreate the agenda buffer, to reflect the changes.
1960 @item s
1961 Save all Org buffers in the current Emacs session, and also the locations of
1962 IDs.
1964 @tsubheading{Secondary filtering and query editing}
1966 @item /
1967 Filter the current agenda view with respect to a tag.  You are prompted for a
1968 letter to select a tag.  Press @samp{-} first to select against the tag.
1970 @item \
1971 Narrow the current agenda filter by an additional condition.
1973 @tsubheading{Remote editing (see the manual for many more commands)}
1975 @item 0-9
1976 Digit argument.
1978 @item t
1979 Change the TODO state of the item, in the agenda and in the
1980 org file.
1982 @item C-k
1983 Delete the current agenda item along with the entire subtree belonging
1984 to it in the original Org file.
1986 @item C-c C-w
1987 Refile the entry at point.
1989 @item C-c C-x C-a @ @r{or short} @ a
1990 Archive the subtree corresponding to the entry at point using the default
1991 archiving command set in @code{org-archive-default-command}.
1993 @item C-c C-x C-s @ @r{or short} @ $
1994 Archive the subtree corresponding to the current headline.
1996 @item C-c C-s
1997 Schedule this item, with prefix arg remove the scheduling timestamp
1999 @item C-c C-d
2000 Set a deadline for this item, with prefix arg remove the deadline.
2002 @item S-@key{right} @r{and} S-@key{left}
2003 Change the timestamp associated with the current line by one day.
2005 @item I
2006 Start the clock on the current item.
2008 @item O / X
2009 Stop/cancel the previously started clock.
2011 @item J
2012 Jump to the running clock in another window.
2013 @end table
2015 @node Custom agenda views,  , Agenda commands, Agenda Views
2016 @section Custom agenda views
2018 The main application of custom searches is the definition of keyboard
2019 shortcuts for frequently used searches, either creating an agenda
2020 buffer, or a sparse tree (the latter covering of course only the current
2021 buffer).
2022 Custom commands are configured in the variable
2023 @code{org-agenda-custom-commands}.  You can customize this variable, for
2024 example by pressing @kbd{C-c a C}.  You can also directly set it with
2025 Emacs Lisp in @file{.emacs}.  The following example contains all valid
2026 search types:
2028 @smalllisp
2029 @group
2030 (setq org-agenda-custom-commands
2031       '(("w" todo "WAITING")
2032         ("u" tags "+boss-urgent")
2033         ("v" tags-todo "+boss-urgent")))
2034 @end group
2035 @end smalllisp
2037 @noindent
2038 The initial string in each entry defines the keys you have to press after the
2039 dispatcher command @kbd{C-c a} in order to access the command.  Usually this
2040 will be just a single character.  The second parameter is the search type,
2041 followed by the string or regular expression to be used for the matching.
2042 The example above will therefore define:
2044 @table @kbd
2045 @item C-c a w
2046 as a global search for TODO entries with @samp{WAITING} as the TODO
2047 keyword
2048 @item C-c a u
2049 as a global tags search for headlines marked @samp{:boss:} but not
2050 @samp{:urgent:}
2051 @item C-c a v
2052 as the same search as @kbd{C-c a u}, but limiting the search to
2053 headlines that are also TODO items
2054 @end table
2056 @seealso{
2057 @uref{http://orgmode.org/manual/Agenda-Views.html#Agenda-Views, Chapter 10 of
2058 the manual}@*
2059 @uref{http://orgmode.org/worg/org-tutorials/org-custom-agenda-commands.php,
2060 Mat Lundin's tutorial about custom agenda commands}@*
2061 @uref{http://www.newartisans.com/2007/08/using-org-mode-as-a-day-planner.html,
2062 John Wiegley's setup}}
2064 @node Markup, Exporting, Agenda Views, Top
2065 @chapter Markup for rich export
2067 When exporting Org-mode documents, the exporter tries to reflect the
2068 structure of the document as accurately as possible in the backend.  Since
2069 export targets like HTML, La@TeX{}, or DocBook allow much richer formatting,
2070 Org mode has rules on how to prepare text for rich export.  This section
2071 summarizes the markup rules used in an Org-mode buffer.
2073 @menu
2074 * Structural markup elements::  The basic structure as seen by the exporter
2075 * Images and tables::           Tables and Images will be included
2076 * Literal examples::            Source code examples with special formatting
2077 * Include files::               Include additional files into a document
2078 * Embedded LaTeX::              LaTeX can be freely used inside Org documents
2079 @end menu
2081 @node Structural markup elements, Images and tables, Markup, Markup
2082 @section Structural markup elements
2084 @menu
2085 * Document title::              Where the title is taken from
2086 * Headings and sections::       The document structure as seen by the exporter
2087 * Table of contents::           The if and where of the table of contents
2088 * Paragraphs::                  Paragraphs
2089 * Emphasis and monospace::      Bold, italic, etc.
2090 * Comment lines::               What will *not* be exported
2091 @end menu
2093 @node Document title, Headings and sections, Structural markup elements, Structural markup elements
2094 @subheading Document title
2096 @noindent
2097 The title of the exported document is taken from the special line
2099 @smallexample
2100 #+TITLE: This is the title of the document
2101 @end smallexample
2103 @node Headings and sections, Table of contents, Document title, Structural markup elements
2104 @subheading Headings and sections
2106 The outline structure of the document as described in @ref{Document
2107 Structure}, forms the basis for defining sections of the exported document.
2108 However, since the outline structure is also used for (for example) lists of
2109 tasks, only the first three outline levels will be used as headings.  Deeper
2110 levels will become itemized lists.  You can change the location of this
2111 switch globally by setting the variable @code{org-export-headline-levels}, or on a
2112 per-file basis with a line
2114 @smallexample
2115 #+OPTIONS: H:4
2116 @end smallexample
2118 @node Table of contents, Paragraphs, Headings and sections, Structural markup elements
2119 @subheading Table of contents
2121 The table of contents is normally inserted directly before the first headline
2122 of the file.
2124 @smallexample
2125 #+OPTIONS: toc:2          (only to two levels in TOC)
2126 #+OPTIONS: toc:nil        (no TOC at all)
2127 @end smallexample
2129 @node Paragraphs, Emphasis and monospace, Table of contents, Structural markup elements
2130 @subheading Paragraphs, line breaks, and quoting
2132 Paragraphs are separated by at least one empty line.  If you need to enforce
2133 a line break within a paragraph, use @samp{\\} at the end of a line.
2135 To keep the line breaks in a region, but otherwise use normal formatting, you
2136 can use this construct, which can also be used to format poetry.
2138 @smallexample
2139 #+BEGIN_VERSE
2140  Great clouds overhead
2141  Tiny black birds rise and fall
2142  Snow covers Emacs
2144      -- AlexSchroeder
2145 #+END_VERSE
2146 @end smallexample
2148 When quoting a passage from another document, it is customary to format this
2149 as a paragraph that is indented on both the left and the right margin.  You
2150 can include quotations in Org-mode documents like this:
2152 @smallexample
2153 #+BEGIN_QUOTE
2154 Everything should be made as simple as possible,
2155 but not any simpler -- Albert Einstein
2156 #+END_QUOTE
2157 @end smallexample
2159 If you would like to center some text, do it like this:
2160 @smallexample
2161 #+BEGIN_CENTER
2162 Everything should be made as simple as possible, \\
2163 but not any simpler
2164 #+END_CENTER
2165 @end smallexample
2167 @node Emphasis and monospace, Comment lines, Paragraphs, Structural markup elements
2168 @subheading Emphasis and monospace
2170 You can make words @b{*bold*}, @i{/italic/}, _underlined_, @code{=code=}
2171 and @code{~verbatim~}, and, if you must, @samp{+strike-through+}.  Text
2172 in the code and verbatim string is not processed for Org-mode specific
2173 syntax, it is exported verbatim.  To insert a horizontal rules, use a line 
2174 consisting of only dashes, and at least 5 of them.
2176 @node Comment lines,  , Emphasis and monospace, Structural markup elements
2177 @subheading Comment lines
2179 Lines starting with @samp{#} in column zero are treated as comments and will
2180 never be exported. If you want an indented line to be treated as a comment,
2181 start it with @samp{#+ }.  Also entire subtrees starting with the word
2182 @samp{COMMENT} will never be exported.  Finally, regions surrounded by
2183 @samp{#+BEGIN_COMMENT} ... @samp{#+END_COMMENT} will not be exported.
2185 @table @kbd
2186 @item C-c ;
2187 Toggle the COMMENT keyword at the beginning of an entry.
2188 @end table
2190 @node Images and tables, Literal examples, Structural markup elements, Markup
2191 @section Images and Tables
2193 For Org mode tables, the lines before the first horizontal separator line
2194 will become table header lines.  You can use the following lines somewhere
2195 before the table to assign a caption and a label for cross references, and in
2196 the text you can refer to the object with @code{\ref@{tab:basic-data@}}:
2198 @smallexample
2199 #+CAPTION: This is the caption for the next table (or link)
2200 #+LABEL:   tbl:basic-data
2201    | ... | ...|
2202    |-----|----|
2203 @end smallexample
2205 Some backends (HTML, La@TeX{}, and DocBook) allow you to directly include
2206 images into the exported document.  Org does this, if a link to an image
2207 files does not have a description part, for example @code{[[./img/a.jpg]]}.
2208 If you wish to define a caption for the image and maybe a label for internal
2209 cross references, you sure that the link is on a line by itself precede it
2210 with:
2212 @smallexample
2213 #+CAPTION: This is the caption for the next figure link (or table)
2214 #+LABEL:   fig:SED-HR4049
2215 [[./img/a.jpg]]
2216 @end smallexample
2218 You may also define additional attributes for the figure.  As this is
2219 backend-specific, see the sections about the individual backends for more
2220 information.
2223 @node Literal examples, Include files, Images and tables, Markup
2224 @section Literal examples
2226 You can include literal examples that should not be subjected to
2227 markup.  Such examples will be typeset in monospace, so this is well suited
2228 for source code and similar examples.
2230 @smallexample
2231 #+BEGIN_EXAMPLE
2232 Some example from a text file.
2233 #+END_EXAMPLE
2234 @end smallexample
2236 For simplicity when using small examples, you can also start the example
2237 lines with a colon followed by a space.  There may also be additional
2238 whitespace before the colon:
2240 @smallexample
2241 Here is an example
2242    : Some example from a text file.
2243 @end smallexample
2245 For source code from a programming language, or any other text
2246 that can be marked up by font-lock in Emacs, you can ask for it to
2247 look like the fontified Emacs buffer
2249 @smallexample
2250 #+BEGIN_SRC emacs-lisp
2251 (defun org-xor (a b)
2252    "Exclusive or."
2253    (if a (not b) b))
2254 #+END_SRC
2255 @end smallexample
2257 To edit the example in a special buffer supporting this language, use
2258 @kbd{C-c '} to both enter and leave the editing buffer.
2260 @node Include files, Embedded LaTeX, Literal examples, Markup
2261 @section Include files
2263 During export, you can include the content of another file.  For example, to
2264 include your @file{.emacs} file, you could use:
2266 @smallexample
2267 #+INCLUDE: "~/.emacs" src emacs-lisp
2268 @end smallexample
2269 @noindent
2270 The optional second and third parameter are the markup (e.g. @samp{quote},
2271 @samp{example}, or @samp{src}), and, if the markup is @samp{src}, the
2272 language for formatting the contents.  The markup is optional, if it is not
2273 given, the text will be assumed to be in Org mode format and will be
2274 processed normally. @kbd{C-c '} will visit the included file.
2276 @node Embedded LaTeX,  , Include files, Markup
2277 @section Embedded La@TeX{}
2279 For scientific notes which need to be able to contain mathematical symbols
2280 and the occasional formula, Org-mode supports embedding La@TeX{} code into
2281 its files.  You can directly use TeX-like macros for special symbols, enter
2282 formulas and entire LaTeX environments.
2284 @smallexample
2285 Angles are written as Greek letters \alpha, \beta and \gamma.  The mass if
2286 the sun is M_sun = 1.989 x 10^30 kg.  The radius of the sun is R_@{sun@} =
2287 6.96 x 10^8 m.  If $a^2=b$ and $b=2$, then the solution must be either
2288 $a=+\sqrt@{2@}$ or $a=-\sqrt@{2@}$.
2290 \begin@{equation@}
2291 x=\sqrt@{b@}
2292 \end@{equation@}
2293 @end smallexample
2294 @noindent  With
2295 @uref{http://orgmode.org/manual/LaTeX-fragments.html#LaTeX-fragments,special
2296 setup}, LaTeX snippets will be included as images when exporting to HTML.
2298 @seealso{
2299 @uref{http://orgmode.org/manual/Markup.html#Markup, Chapter 11 of the manual}}
2301 @node Exporting, Publishing, Markup, Top
2302 @chapter Exporting
2304 Org-mode documents can be exported into a variety of other formats: ASCII
2305 export for inclusion into emails, HTML to publish on the web, La@TeX{}/PDF
2306 for beautiful printed documents and DocBook to enter the world of many other
2307 formats using DocBook tools.  There is also export to iCalendar format so
2308 that planning information can be incorporated into desktop calendars.
2310 @menu
2311 * Export options::              Per-file export settings
2312 * The export dispatcher::       How to access exporter commands
2313 * ASCII/Latin-1/UTF-8 export::  Exporting to flat files with encoding
2314 * HTML export::                 Exporting to HTML
2315 * LaTeX and PDF export::        Exporting to La@TeX{}, and processing to PDF
2316 * DocBook export::              Exporting to DocBook
2317 * iCalendar export::            
2318 @end menu
2320 @node Export options, The export dispatcher, Exporting, Exporting
2321 @section Export options
2323 The exporter recognizes special lines in the buffer which provide
2324 additional information.  These lines may be put anywhere in the file.
2325 The whole set of lines can be inserted into the buffer with @kbd{C-c
2326 C-e t}.
2328 @table @kbd
2329 @item C-c C-e t
2330 Insert template with export options, see example below.
2331 @end table
2333 @smallexample
2334 #+TITLE:       the title to be shown (default is the buffer name)
2335 #+AUTHOR:      the author (default taken from @code{user-full-name})
2336 #+DATE:        a date, fixed, of a format string for @code{format-time-string}
2337 #+EMAIL:       his/her email address (default from @code{user-mail-address})
2338 #+DESCRIPTION: the page description, e.g. for the XHTML meta tag
2339 #+KEYWORDS:    the page keywords, e.g. for the XHTML meta tag
2340 #+LANGUAGE:    language for HTML, e.g. @samp{en} (@code{org-export-default-language})
2341 #+TEXT:        Some descriptive text to be inserted at the beginning.
2342 #+TEXT:        Several lines may be given.
2343 #+OPTIONS:     H:2 num:t toc:t \n:nil @@:t ::t |:t ^:t f:t TeX:t ...
2344 #+LINK_UP:     the ``up'' link of an exported page
2345 #+LINK_HOME:   the ``home'' link of an exported page
2346 #+LATEX_HEADER: extra line(s) for the LaTeX header, like \usepackage@{xyz@}
2347 @end smallexample
2349 @node The export dispatcher, ASCII/Latin-1/UTF-8 export, Export options, Exporting
2350 @section The export dispatcher
2352 All export commands can be reached using the export dispatcher, which is a
2353 prefix key that prompts for an additional key specifying the command.
2354 Normally the entire file is exported, but if there is an active region that
2355 contains one outline tree, the first heading is used as document title and
2356 the subtrees are exported.
2358 @table @kbd
2359 @item C-c C-e
2360 Dispatcher for export and publishing commands.
2361 @end table
2363 @node ASCII/Latin-1/UTF-8 export, HTML export, The export dispatcher, Exporting
2364 @section ASCII/Latin-1/UTF-8 export
2366 ASCII export produces a simple and very readable version of an Org-mode
2367 file, containing only plain ASCII.  Latin-1 and UTF-8 export augment the file
2368 with special characters and symbols available in these encodings.
2370 @table @kbd
2371 @item C-c C-e a
2372 Export as ASCII file.
2373 @item C-c C-e n @ @ @r{and} @ @ C-c C-e N
2374 Like the above commands, but use Latin-1 encoding.
2375 @item C-c C-e u @ @ @r{and} @ @ C-c C-e U
2376 Like the above commands, but use UTF-8 encoding.
2377 @end table
2379 @node HTML export, LaTeX and PDF export, ASCII/Latin-1/UTF-8 export, Exporting
2380 @section HTML export
2382 @table @kbd
2383 @item C-c C-e h
2384 Export as HTML file @file{myfile.html}.
2385 @item C-c C-e b
2386 Export as HTML file and immediately open it with a browser.
2387 @end table
2389 To insert HTML that should be copied verbatim to
2390 the exported file use either
2392 @smallexample
2393 #+HTML: Literal HTML code for export
2394 @end smallexample
2395 @noindent or
2396 @smallexample
2397 #+BEGIN_HTML
2398 All lines between these markers are exported literally
2399 #+END_HTML
2400 @end smallexample
2402 @node LaTeX and PDF export, DocBook export, HTML export, Exporting
2403 @section La@TeX{} and PDF export
2405 @table @kbd
2406 @item C-c C-e l
2407 Export as La@TeX{} file @file{myfile.tex}.
2408 @item C-c C-e p
2409 Export as La@TeX{} and then process to PDF.
2410 @item C-c C-e d
2411 Export as La@TeX{} and then process to PDF, then open the resulting PDF file.
2412 @end table
2414 By default, the La@TeX{} output uses the class @code{article}.  You can
2415 change this by adding an option like @code{#+LaTeX_CLASS: myclass} in your
2416 file.  The class must be listed in @code{org-export-latex-classes}.
2418 Embedded La@TeX{} as described in @ref{Embedded LaTeX}, will be correctly
2419 inserted into the La@TeX{} file.  Similarly to the HTML exporter, you can use
2420 @code{#+LaTeX:} and @code{#+BEGIN_LaTeX ... #+END_LaTeX} construct to add
2421 verbatim LaTeX code.
2423 @node DocBook export, iCalendar export, LaTeX and PDF export, Exporting
2424 @section DocBook export
2426 @table @kbd
2427 @item C-c C-e D
2428 Export as DocBook file.
2429 @end table
2431 Similarly to the HTML exporter, you can use @code{#+DocBook:} and
2432 @code{#+BEGIN_DocBook ... #+END_DocBook} construct to add verbatim LaTeX
2433 code.
2435 @node iCalendar export,  , DocBook export, Exporting
2436 @section iCalendar export
2438 @table @kbd
2439 @kindex C-c C-e i
2440 @item C-c C-e i
2441 Create iCalendar entries for the current file in a @file{.ics} file.
2442 @kindex C-c C-e c
2443 @item C-c C-e c
2444 Create a single large iCalendar file from all files in
2445 @code{org-agenda-files} and write it to the file given by
2446 @code{org-combined-agenda-icalendar-file}.
2447 @end table
2449 @seealso{
2450 @uref{http://orgmode.org/manual/Exporting.html#Exporting, Chapter 12 of the manual}@*
2451 @uref{http://orgmode.org/worg/org-tutorials/images-and-xhtml-export.php,
2452 Sebastian Rose's image handling tutorial}@*
2453 @uref{http://orgmode.org/worg/org-tutorials/org-latex-export.php, Thomas
2454 Dye's LaTeX export tutorial}
2455 @uref{http://orgmode.org/worg/org-tutorials/org-beamer/tutorial.php, Eric
2456 Fraga's BEAMER presentation tutorial}}
2458 @node Publishing, Miscellaneous, Exporting, Top
2459 @chapter Publishing
2461 Org includes a publishing management system that allows you to configure
2462 automatic HTML conversion of @emph{projects} composed of interlinked org
2463 files.  You can also configure Org to automatically upload your exported HTML
2464 pages and related attachments, such as images and source code files, to a web
2465 server.  For detailed instructions about setup, see the manual.
2467 Here is an example:
2469 @smalllisp
2470 (setq org-publish-project-alist
2471       '(("org"
2472          :base-directory "~/org/"
2473          :publishing-directory "~/public_html"
2474          :section-numbers nil
2475          :table-of-contents nil
2476          :style "<link rel=\"stylesheet\"
2477                 href=\"../other/mystyle.css\"
2478                 type=\"text/css\"/>")))
2479 @end smalllisp
2481 @table @kbd
2482 @item C-c C-e C
2483 Prompt for a specific project and publish all files that belong to it.
2484 @item C-c C-e P
2485 Publish the project containing the current file.
2486 @item C-c C-e F
2487 Publish only the current file.
2488 @item C-c C-e E
2489 Publish every project.
2490 @end table
2492 Org uses timestamps to track when a file has changed. The above functions
2493 normally only publish changed files. You can override this and force
2494 publishing of all files by giving a prefix argument to any of the commands
2495 above.
2497 @seealso{
2498 @uref{http://orgmode.org/manual/Publishing.html#Publishing, Chapter 12 of the
2499 manual}@*
2500 @uref{http://orgmode.org/worg/org-tutorials/org-publish-html-tutorial.php,
2501 Sebastian Rose's publishing tutorial}@*
2502 @uref{http://orgmode.org/worg/org-tutorials/org-jekyll.php, Ian Barton's
2503 Jekyll/blogging setup}}
2505 @node Miscellaneous,  , Publishing, Top
2506 @chapter Miscellaneous
2508 @menu
2509 * Completion::                  M-TAB knows what you need
2510 * Clean view::                  Getting rid of leading stars in the outline
2511 * MobileOrg::                   Org-mode on the iPhone
2512 @end menu
2514 @node Completion, Clean view, Miscellaneous, Miscellaneous
2515 @section Completion
2517 Org supports in-buffer completion with @kbd{M-@key{TAB}}.  This type of
2518 completion does not make use of the minibuffer.  You simply type a few
2519 letters into the buffer and use the key to complete text right there.  For
2520 example, this command will complete @TeX{} symbols after @samp{\}, TODO
2521 keywords at the beginning of a headline, and ags after @samp{:} in a
2522 headline.
2524 @node Clean view, MobileOrg, Completion, Miscellaneous
2525 @section A cleaner outline view
2527 Some people find it noisy and distracting that the Org headlines start with a
2528 potentially large number of stars, and that text below the headlines is not
2529 indented.  While this is no problem when writing a @emph{book-like} document
2530 where the outline headings are really section headings, in a more
2531 @emph{list-oriented} outline, indented structure is a lot cleaner:
2533 @smallexample
2534 @group
2535 * Top level headline             |    * Top level headline
2536 ** Second level                  |      * Second level
2537 *** 3rd level                    |        * 3rd level
2538 some text                        |          some text
2539 *** 3rd level                    |        * 3rd level
2540 more text                        |          more text
2541 * Another top level headline     |    * Another top level headline
2542 @end group
2543 @end smallexample
2545 @noindent
2546 If you are using at least Emacs 23.1.50.3 and version 6.29 of Org, this kind
2547 of view can be achieved dynamically at display time using
2548 @code{org-indent-mode}, which will prepend intangible space to each line.
2549 You can turn on @code{org-indent-mode} for all files by customizing the
2550 variable @code{org-startup-indented}, or you can turn it on for individual
2551 files using
2553 @smallexample
2554 #+STARTUP: indent
2555 @end smallexample
2557 If you want a similar effect in earlier version of Emacs and/or Org, or if
2558 you want the indentation to be hard space characters so that the plain text
2559 file looks as similar as possible to the Emacs display, Org supports you by
2560 helping to indent (with @key{TAB}) text below each headline, by hiding
2561 leading stars, and by only using levels 1, 3, etc to get two characters
2562 indentation for each level.  To get this support in a file, use
2564 @smallexample
2565 #+STARTUP: hidestars odd
2566 @end smallexample
2568 @node MobileOrg,  , Clean view, Miscellaneous
2569 @section MobileOrg
2571 @i{MobileOrg} is an application for the @i{iPhone/iPod Touch} series of
2572 devices, developed by Richard Moreland.  For details, see the Org-mode
2573 manual.
2575 @seealso{
2576 @uref{http://orgmode.org/manual/Miscellaneous.html#Miscellaneous, Chapter 14
2577 of the manual}@*
2578 @uref{http://orgmode.org/manual/MobileOrg.html#MobileOrg, Appendix B of the
2579 manual}@*
2580 @uref{http://orgmode.org/orgcard.pdf,Key reference card}}
2582 @bye
2584 @ignore
2585         arch-tag: 8f0a8557-0acc-4436-b2b2-0197699e1452
2586 @end ignore
2588 @c Local variables:
2589 @c ispell-local-dictionary: "en_US-w_accents"
2590 @c ispell-local-pdict: "./.aspell.org.pws"
2591 @c fill-column: 77
2592 @c End:
2595 @c  LocalWords:  webdavhost pre