3 @setfilename ../../info/orgguide
4 @settitle The compact Org-mode Guide
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}
20 @c @hyphenation{time-stamp time-stamps time-stamp-ing time-stamp-ed}
35 @c Subheadings inside a table.
36 @macro tsubheading{text}
46 @noindent @b{Further reading}@*@noindent \text\
50 Copyright @copyright{} 2010 Free Software Foundation
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.
73 * Org Mode Guide: (orgguide). Abbreviated Org-mode Manual
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.
84 @vskip 0pt plus 1filll
88 @c Output the table of contents at the beginning.
92 @node Top, Introduction, (dir), (dir)
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
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
115 --- The Detailed Node Listing ---
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.
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
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
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
154 * Closing items:: When was this entry marked DONE?
155 * Tracking TODO state changes:: When did the status change?
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
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
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
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
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
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
234 @node Introduction, Document Structure, Top, Top
235 @chapter Introduction
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.
244 @node Preface, Installation, Introduction, Introduction
247 Org is a mode for keeping notes, maintaining TODO lists, and doing project
248 planning with a fast and effective plain-text system. It is also an
249 authoring and publishing system.
251 @i{This document is a much compressed derivative of the
252 @uref{http://orgmode.org/index.html#sec-4_1, comprehensive Org-mode manual}.
253 It contains all basic features and commands, along with important hints for
254 customization. It is intended for beginners who would shy back from a 200
255 page manual because of sheer size.}
257 @node Installation, Activation, Preface, Introduction
258 @section Installation
260 @b{Important:} @i{If you are using a version of Org that is part of the Emacs
261 distribution or an XEmacs package, please skip this section and go directly
262 to @ref{Activation}.}
264 If you have downloaded Org from the Web, either as a distribution @file{.zip}
265 or @file{.tar} file, or as a Git archive, it is best to run it directly from
266 the distribution directory. You need to add the @file{lisp} subdirectories
267 to the Emacs load path. To do this, add the following line to @file{.emacs}:
270 (setq load-path (cons "~/path/to/orgdir/lisp" load-path))
271 (setq load-path (cons "~/path/to/orgdir/contrib/lisp" load-path))
274 @noindent For speed you should byte-compile the Lisp files with the shell
281 Then add the following line to @file{.emacs}. It is needed so that
282 Emacs can autoload functions that are located in files not immediately loaded
283 when Org-mode starts.
285 (require 'org-install)
288 @node Activation, Feedback, Installation, Introduction
291 Add the following lines to your @file{.emacs} file. The last three lines
292 define @emph{global} keys for some commands --- please choose suitable keys
296 ;; The following lines are always needed. Choose your own keys.
297 (add-to-list 'auto-mode-alist '("\\.org\\'" . org-mode))
298 (add-hook 'org-mode-hook 'turn-on-font-lock) ; not needed when global-font-lock-mode is on
299 (global-set-key "\C-cl" 'org-store-link)
300 (global-set-key "\C-ca" 'org-agenda)
301 (global-set-key "\C-cb" 'org-iswitchb)
304 With this setup, all files with extension @samp{.org} will be put
307 @node Feedback, , Activation, Introduction
310 If you find problems with Org, or if you have questions, remarks, or ideas
311 about it, please mail to the Org mailing list @email{emacs-orgmode@@gnu.org}.
312 For information on how to submit bug reports, see the main manual.
314 @node Document Structure, Tables, Introduction, Top
315 @chapter Document Structure
317 Org is based on Outline mode and provides flexible commands to
318 edit the structure of the document.
321 * Outlines:: Org is based on Outline mode
322 * Headlines:: How to typeset Org tree headlines
323 * Visibility cycling:: Show and hide, much simplified
324 * Motion:: Jumping to other headlines
325 * Structure editing:: Changing sequence and level of headlines
326 * Sparse trees:: Matches embedded in context
327 * Plain lists:: Additional structure within an entry
328 * Footnotes:: How footnotes are defined in Org's syntax
331 @node Outlines, Headlines, Document Structure, Document Structure
334 Org is implemented on top of Outline mode. Outlines allow a
335 document to be organized in a hierarchical structure, which (at least
336 for me) is the best representation of notes and thoughts. An overview
337 of this structure is achieved by folding (hiding) large parts of the
338 document to show only the general document structure and the parts
339 currently being worked on. Org greatly simplifies the use of
340 outlines by compressing the entire show/hide functionality into a single
341 command, @command{org-cycle}, which is bound to the @key{TAB} key.
343 @node Headlines, Visibility cycling, Outlines, Document Structure
346 Headlines define the structure of an outline tree. The headlines in
347 Org start with one or more stars, on the left margin@footnote{See
348 the variable @code{org-special-ctrl-a/e} to configure special behavior
349 of @kbd{C-a} and @kbd{C-e} in headlines.}. For example:
359 * Another top level headline
362 @noindent Some people find the many stars too noisy and would prefer an
363 outline that has whitespace followed by a single star as headline
364 starters. @ref{Clean view}, describes a setup to realize this.
366 @node Visibility cycling, Motion, Headlines, Document Structure
367 @section Visibility cycling
369 Outlines make it possible to hide parts of the text in the buffer.
370 Org uses just two commands, bound to @key{TAB} and
371 @kbd{S-@key{TAB}} to change the visibility in the buffer.
375 @emph{Subtree cycling}: Rotate current subtree among the states
378 ,-> FOLDED -> CHILDREN -> SUBTREE --.
379 '-----------------------------------'
382 When called with a prefix argument (@kbd{C-u @key{TAB}}) or with the shift
383 key, global cycling is invoked.
385 @item S-@key{TAB} @r{and} C-u @key{TAB}
386 @emph{Global cycling}: Rotate the entire buffer among the states
389 ,-> OVERVIEW -> CONTENTS -> SHOW ALL --.
390 '--------------------------------------'
393 @item C-u C-u C-u @key{TAB}
394 Show all, including drawers.
397 When Emacs first visits an Org file, the global state is set to
398 OVERVIEW, i.e. only the top level headlines are visible. This can be
399 configured through the variable @code{org-startup-folded}, or on a
400 per-file basis by adding a startup keyword @code{overview}, @code{content},
401 @code{showall}, like this:
408 @node Motion, Structure editing, Visibility cycling, Document Structure
410 The following commands jump to other headlines in the buffer.
418 Next heading same level.
420 Previous heading same level.
422 Backward to higher level heading.
425 @node Structure editing, Sparse trees, Motion, Document Structure
426 @section Structure editing
430 Insert new heading with same level as current. If the cursor is in a plain
431 list item, a new item is created (@pxref{Plain lists}). When this command is
432 used in the middle of a line, the line is split and the rest of the line
433 becomes the new headline@footnote{If you do not want the line to be split,
434 customize the variable @code{org-M-RET-may-split-line}.}.
436 Insert new TODO entry with same level as current heading.
437 @item @key{TAB} @r{in new, empty entry}
438 In a new entry with no text yet, @key{TAB} will cycle through reasonable
440 @item M-@key{left}@r{/}@key{right}
441 Promote/demote current heading by one level.
442 @item M-S-@key{left}@r{/}@key{right}
443 Promote/demote the current subtree by one level.
444 @item M-S-@key{up}@r{/}@key{down}
445 Move subtree up/down (swap with previous/next subtree of same
448 Refile entry or region to a different location. @xref{Refiling notes}.
450 Narrow buffer to current subtree / widen it again
453 When there is an active region (Transient Mark mode), promotion and
454 demotion work on all headlines in the region.
456 @node Sparse trees, Plain lists, Structure editing, Document Structure
457 @section Sparse trees
459 An important feature of Org mode is the ability to construct @emph{sparse
460 trees} for selected information in an outline tree, so that the entire
461 document is folded as much as possible, but the selected information is made
462 visible along with the headline structure above it@footnote{See also the
463 variables @code{org-show-hierarchy-above}, @code{org-show-following-heading},
464 @code{org-show-siblings}, and @code{org-show-entry-below} for detailed
465 control on how much context is shown around each match.}. Just try it out
466 and you will see immediately how it works.
468 Org mode contains several commands creating such trees, all these
469 commands can be accessed through a dispatcher:
473 This prompts for an extra key to select a sparse-tree creating command.
475 Occur. Prompts for a regexp and shows a sparse tree with all matches. Each
476 match is also highlighted; the highlights disappear by pressing @kbd{C-c C-c}.
479 The other sparse tree commands select headings based on TODO keywords,
480 tags, or properties and will be discussed later in this manual.
482 @node Plain lists, Footnotes, Sparse trees, Document Structure
485 Within an entry of the outline tree, hand-formatted lists can provide
486 additional structure. They also provide a way to create lists of
487 checkboxes (@pxref{Checkboxes}). Org supports editing such lists,
488 and the HTML exporter (@pxref{Exporting}) parses and formats them.
490 Org knows ordered lists, unordered lists, and description lists.
493 @emph{Unordered} list items start with @samp{-}, @samp{+}, or
496 @emph{Ordered} list items start with @samp{1.} or @samp{1)}.
498 @emph{Description} list use @samp{ :: } to separate the @emph{term} from the
502 Items belonging to the same list must have the same indentation on the first
503 line. A list ends before the next line that is indented like the
504 bullet/number, or less. An example:
509 My favorite scenes are (in this order)
510 1. The attack of the Rohirrim
511 2. Eowyn's fight with the witch king
512 + this was already my favorite scene in the book
513 + I really like Miranda Otto.
514 Important actors in this film are:
515 - @b{Elijah Wood} :: He plays Frodo
516 - @b{Sean Austin} :: He plays Sam, Frodo's friend.
520 The following commands act on items when the cursor is in the first line of
521 an item (the line with the bullet or number).
525 Items can be folded just like headline levels.
527 Insert new item at current level. With a prefix argument, force a new
528 heading (@pxref{Structure editing}).
530 Insert a new item with a checkbox (@pxref{Checkboxes}).
531 @item M-S-@key{up}@r{/}@key{down}
532 Move the item including subitems up/down (swap with previous/next item
533 of same indentation). If the list is ordered, renumbering is
535 @item M-@key{left}@r{/}M-@key{right}
536 Decrease/increase the indentation of an item, leaving children alone.
537 @item M-S-@key{left}@r{/}@key{right}
538 Decrease/increase the indentation of the item, including subitems.
540 If there is a checkbox (@pxref{Checkboxes}) in the item line, toggle the
541 state of the checkbox. If not, make sure all items have the same bullet type
542 and renumber ordered lists.
544 Cycle the entire list level through the different itemize/enumerate bullets
545 (@samp{-}, @samp{+}, @samp{*}, @samp{1.}, @samp{1)}).
548 @node Footnotes, , Plain lists, Document Structure
551 A footnote is defined in a paragraph that is started by a footnote marker in
552 square brackets in column 0, no indentation allowed. The footnote reference
553 is simply the marker in square brackets, inside text. For example:
556 The Org homepage[fn:1] now looks a lot better than it used to.
558 [fn:1] The link is: http://orgmode.org
561 @noindent The following commands handle footnotes:
565 The footnote action command. When the cursor is on a footnote reference,
566 jump to the definition. When it is at a definition, jump to the (first)
567 reference. Otherwise, create a new footnote. When this command is called
568 with a prefix argument, a menu of additional options including renumbering is
572 Jump between definition and reference.
576 @uref{http://orgmode.org/manual/Document-Structure.html#Document-Structure,
577 Chapter 2 of the manual}@*
578 @uref{http://sachachua.com/wp/2008/01/outlining-your-notes-with-org/,
579 Sacha Chua's tutorial}}
582 @node Tables, Hyperlinks, Document Structure, Top
585 Org comes with a fast and intuitive table editor. Spreadsheet-like
586 calculations are supported in connection with the Emacs @file{calc}
589 (@pxref{Top,Calc,,Calc,Gnu Emacs Calculator Manual}).
592 (see the Emacs Calculator manual for more information about the Emacs
596 Org makes it easy to format tables in plain ASCII. Any line with
597 @samp{|} as the first non-whitespace character is considered part of a
598 table. @samp{|} is also the column separator. A table might look like
602 | Name | Phone | Age |
603 |-------+-------+-----|
604 | Peter | 1234 | 17 |
608 A table is re-aligned automatically each time you press @key{TAB} or
609 @key{RET} or @kbd{C-c C-c} inside the table. @key{TAB} also moves to
610 the next field (@key{RET} to the next row) and creates new table rows
611 at the end of the table or before horizontal lines. The indentation
612 of the table is set by the first line. Any line starting with
613 @samp{|-} is considered as a horizontal separator line and will be
614 expanded on the next re-align to span the whole table width. So, to
615 create the above table, you would only type
622 @noindent and then press @key{TAB} to align the table and start filling in
623 fields. Even faster would be to type @code{|Name|Phone|Age} followed by
626 When typing text into a field, Org treats @key{DEL},
627 @key{Backspace}, and all character keys in a special way, so that
628 inserting and deleting avoids shifting other fields. Also, when
629 typing @emph{immediately after the cursor was moved into a new field
630 with @kbd{@key{TAB}}, @kbd{S-@key{TAB}} or @kbd{@key{RET}}}, the
631 field is automatically made blank.
634 @tsubheading{Creation and conversion}
636 Convert the active region to table. If every line contains at least one
637 TAB character, the function assumes that the material is tab separated.
638 If every line contains a comma, comma-separated values (CSV) are assumed.
639 If not, lines are split at whitespace into fields.
641 If there is no active region, this command creates an empty Org
642 table. But it's easier just to start typing, like
643 @kbd{|Name|Phone|Age C-c @key{RET}}.
645 @tsubheading{Re-aligning and field motion}
647 Re-align the table without moving the cursor.
650 Re-align the table, move to the next field. Creates a new row if
654 Re-align, move to previous field.
657 Re-align the table and move down to next row. Creates a new row if
660 @tsubheading{Column and row editing}
663 Move the current column left/right.
666 Kill the current column.
668 @item M-S-@key{right}
669 Insert a new column to the left of the cursor position.
673 Move the current row up/down.
676 Kill the current row or horizontal line.
679 Insert a new row above the current row. With a prefix argument, the line is
680 created below the current one.
683 Insert a horizontal line below current row. With a prefix argument, the line
684 is created above the current line.
687 Insert a horizontal line below current row, and move the cursor into the row
691 Sort the table lines in the region. The position of point indicates the
692 column to be used for sorting, and the range of lines is the range
693 between the nearest horizontal separator lines, or the entire table.
698 @uref{http://orgmode.org/manual/Tables.html#Tables, Chapter 3 of the
700 @uref{http://orgmode.org/worg/org-tutorials/tables.php, Bastien's
702 @uref{http://orgmode.org/worg/org-tutorials/org-spreadsheet-intro.php,
703 Bastien's spreadsheet tutorial}@*
704 @uref{http://orgmode.org/worg/org-tutorials/org-plot.php, Eric's plotting tutorial}}
706 @node Hyperlinks, TODO Items, Tables, Top
709 Like HTML, Org provides links inside a file, external links to
710 other files, Usenet articles, emails, and much more.
713 * Link format:: How links in Org are formatted
714 * Internal links:: Links to other places in the current file
715 * External links:: URL-like links to the world
716 * Handling links:: Creating, inserting and following
717 * Targeted links:: Point at a location in a file
720 @node Link format, Internal links, Hyperlinks, Hyperlinks
723 Org will recognize plain URL-like links and activate them as
724 clickable links. The general link format, however, looks like this:
727 [[link][description]] @r{or alternatively} [[link]]
731 Once a link in the buffer is complete (all brackets present), Org will change
732 the display so that @samp{description} is displayed instead of
733 @samp{[[link][description]]} and @samp{link} is displayed instead of
734 @samp{[[link]]}. To edit the invisible @samp{link} part, use @kbd{C-c
735 C-l} with the cursor on the link.
737 @node Internal links, External links, Link format, Hyperlinks
738 @section Internal links
740 If the link does not look like a URL, it is considered to be internal in the
741 current file. The most important case is a link like
742 @samp{[[#my-custom-id]]} which will link to the entry with the
743 @code{CUSTOM_ID} property @samp{my-custom-id}.
745 Links such as @samp{[[My Target]]} or @samp{[[My Target][Find my target]]}
746 lead to a text search in the current file for the corresponding target which
747 looks like @samp{<<My Target>>}.
749 @node External links, Handling links, Internal links, Hyperlinks
750 @section External links
752 Org supports links to files, websites, Usenet and email messages,
753 BBDB database entries and links to both IRC conversations and their
754 logs. External links are URL-like locators. They start with a short
755 identifying string followed by a colon. There can be no space after
756 the colon. Here are some examples:
759 http://www.astro.uva.nl/~dominik @r{on the web}
760 file:/home/dominik/images/jupiter.jpg @r{file, absolute path}
761 /home/dominik/images/jupiter.jpg @r{same as above}
762 file:papers/last.pdf @r{file, relative path}
763 file:projects.org @r{another Org file}
764 docview:papers/last.pdf::NNN @r{open file in doc-view mode at page NNN}
765 id:B7423F4D-2E8A-471B-8810-C40F074717E9 @r{Link to heading by ID}
766 news:comp.emacs @r{Usenet link}
767 mailto:adent@@galaxy.net @r{Mail link}
768 vm:folder @r{VM folder link}
769 vm:folder#id @r{VM message link}
770 wl:folder#id @r{WANDERLUST message link}
771 mhe:folder#id @r{MH-E message link}
772 rmail:folder#id @r{RMAIL message link}
773 gnus:group#id @r{Gnus article link}
774 bbdb:R.*Stallman @r{BBDB link (with regexp)}
775 irc:/irc.com/#emacs/bob @r{IRC link}
776 info:org:External%20links @r{Info node link (with encoded space)}
779 A link should be enclosed in double brackets and may contain a
780 descriptive text to be displayed instead of the URL (@pxref{Link
781 format}), for example:
784 [[http://www.gnu.org/software/emacs/][GNU Emacs]]
788 If the description is a file name or URL that points to an image, HTML export
789 (@pxref{HTML export}) will inline the image as a clickable button. If there
790 is no description at all and the link points to an image, that image will be
791 inlined into the exported HTML file.
793 @node Handling links, Targeted links, External links, Hyperlinks
794 @section Handling links
796 Org provides methods to create a link in the correct syntax, to
797 insert it into an Org file, and to follow the link.
801 Store a link to the current location. This is a @emph{global} command (you
802 must create the key binding yourself) which can be used in any buffer to
803 create a link. The link will be stored for later insertion into an Org
807 Insert a link. This prompts for a link to be inserted into the buffer. You
808 can just type a link, or use history keys @key{up} and @key{down} to access
809 stored links. You will be prompted for the description part of the link.
810 When called with a @kbd{C-u} prefix argument, file name completion is used to
813 @item C-c C-l @r{(with cursor on existing link)}
814 When the cursor is on an existing link, @kbd{C-c C-l} allows you to edit the
815 link and description parts of the link.
817 @item C-c C-o @r{or} mouse-1 @r{or} mouse-2
820 Jump back to a recorded position. A position is recorded by the
821 commands following internal links, and by @kbd{C-c %}. Using this
822 command several times in direct succession moves through a ring of
823 previously recorded positions.
827 @node Targeted links, , Handling links, Hyperlinks
828 @section Targeted links
830 File links can contain additional information to make Emacs jump to a
831 particular location in the file when following a link. This can be a
832 line number or a search option after a double colon.
834 Here is the syntax of the different ways to attach a search to a file
835 link, together with an explanation:
838 [[file:~/code/main.c::255]] @r{Find line 255}
839 [[file:~/xx.org::My Target]] @r{Find @samp{<<My Target>>}}
840 [[file:~/xx.org::#my-custom-id]] @r{Find entry with custom id}
844 @uref{http://orgmode.org/manual/Hyperlinks.html#Hyperlinks, Chapter 4 of the
847 @node TODO Items, Tags, Hyperlinks, Top
850 Org mode does not maintain TODO lists as separate documents@footnote{Of
851 course, you can make a document that contains only long lists of TODO items,
852 but this is not required.}. Instead, TODO items are an integral part of the
853 notes file, because TODO items usually come up while taking notes! With Org
854 mode, simply mark any entry in a tree as being a TODO item. In this way,
855 information is not duplicated, and the entire context from which the TODO
856 item emerged is always present.
858 Of course, this technique for managing TODO items scatters them
859 throughout your notes file. Org mode compensates for this by providing
860 methods to give you an overview of all the things that you have to do.
863 * Using TODO states::
864 * Multi-state workflows::
865 * Progress logging:: Dates and notes for progress
866 * Priorities:: Some things are more important than others
867 * Breaking down tasks:: Splitting a task into manageable pieces
868 * Checkboxes:: Tick-off lists
871 @node Using TODO states, Multi-state workflows, TODO Items, TODO Items
872 @section Using TODO states
874 Any headline becomes a TODO item when it starts with the word
875 @samp{TODO}, for example:
878 *** TODO Write letter to Sam Fortune
882 The most important commands to work with TODO entries are:
886 Rotate the TODO state of the current item among
889 ,-> (unmarked) -> TODO -> DONE --.
890 '--------------------------------'
893 The same rotation can also be done ``remotely'' from the timeline and
894 agenda buffers with the @kbd{t} command key (@pxref{Agenda commands}).
896 @item S-@key{right}@r{/}@key{left}
897 Select the following/preceding TODO state, similar to cycling.
899 View TODO items in a @emph{sparse tree} (@pxref{Sparse trees}). Folds the
900 buffer, but shows all TODO items and the headings hierarchy above
903 Show the global TODO list. Collects the TODO items from all agenda files
904 (@pxref{Agenda Views}) into a single buffer. @xref{Global TODO list}, for
907 Insert a new TODO entry below the current one.
911 Changing a TODO state can also trigger tag changes. See the docstring of the
912 option @code{org-todo-state-tags-triggers} for details.
914 @node Multi-state workflows, Progress logging, Using TODO states, TODO Items
915 @section Multi-state workflows
917 You can use TODO keywords to indicate different @emph{sequential} states
918 in the process of working on an item, for example:
921 (setq org-todo-keywords
922 '((sequence "TODO" "FEEDBACK" "VERIFY" "|" "DONE" "DELEGATED")))
925 The vertical bar separates the TODO keywords (states that @emph{need
926 action}) from the DONE states (which need @emph{no further action}). If
927 you don't provide the separator bar, the last state is used as the DONE
929 With this setup, the command @kbd{C-c C-t} will cycle an entry from TODO
930 to FEEDBACK, then to VERIFY, and finally to DONE and DELEGATED.
932 Sometimes you may want to use different sets of TODO keywords in
933 parallel. For example, you may want to have the basic
934 @code{TODO}/@code{DONE}, but also a workflow for bug fixing, and a
935 separate state indicating that an item has been canceled (so it is not
936 DONE, but also does not require action). Your setup would then look
940 (setq org-todo-keywords
941 '((sequence "TODO(t)" "|" "DONE(d)")
942 (sequence "REPORT(r)" "BUG(b)" "KNOWNCAUSE(k)" "|" "FIXED(f)")
943 (sequence "|" "CANCELED(c)")))
946 The keywords should all be different, this helps Org mode to keep track of
947 which subsequence should be used for a given entry. The example also shows
948 how to define keys for fast access of a particular state, by adding a letter
949 in parenthesis after each keyword - you will be prompted for the key after
952 To define TODO keywords that are valid only in a single file, use the
953 following text anywhere in the file.
956 #+TODO: TODO(t) | DONE(d)
957 #+TODO: REPORT(r) BUG(b) KNOWNCAUSE(k) | FIXED(f)
958 #+TODO: | CANCELED(c)
961 After changing one of these lines, use @kbd{C-c C-c} with the cursor still in
962 the line to make the changes known to Org mode.
964 @node Progress logging, Priorities, Multi-state workflows, TODO Items
965 @section Progress logging
967 Org mode can automatically record a timestamp and possibly a note when
968 you mark a TODO item as DONE, or even each time you change the state of
969 a TODO item. This system is highly configurable, settings can be on a
970 per-keyword basis and can be localized to a file or even a subtree. For
971 information on how to clock working time for a task, see @ref{Clocking
975 * Closing items:: When was this entry marked DONE?
976 * Tracking TODO state changes:: When did the status change?
979 @node Closing items, Tracking TODO state changes, Progress logging, Progress logging
980 @unnumberedsubsec Closing items
982 The most basic logging is to keep track of @emph{when} a certain TODO
983 item was finished. This is achieved with@footnote{The corresponding
984 in-buffer setting is: @code{#+STARTUP: logdone}}.
987 (setq org-log-done 'time)
991 Then each time you turn an entry from a TODO (not-done) state into any of the
992 DONE states, a line @samp{CLOSED: [timestamp]} will be inserted just after
993 the headline. If you want to record a note along with the timestamp,
994 use@footnote{The corresponding in-buffer setting is: @code{#+STARTUP:
998 (setq org-log-done 'note)
1002 You will then be prompted for a note, and that note will be stored below
1003 the entry with a @samp{Closing Note} heading.
1005 @node Tracking TODO state changes, , Closing items, Progress logging
1006 @unnumberedsubsec Tracking TODO state changes
1008 You might want to keep track of TODO state changes. You can either record
1009 just a timestamp, or a time-stamped note for a change. These records will be
1010 inserted after the headline as an itemized list. When taking a lot of notes,
1011 you might want to get the notes out of the way into a drawer. Customize the
1012 variable @code{org-log-into-drawer} to get this behavior.
1014 For state logging, Org mode expects configuration on a per-keyword basis.
1015 This is achieved by adding special markers @samp{!} (for a timestamp) and
1016 @samp{@@} (for a note) in parentheses after each keyword. For example:
1018 #+TODO: TODO(t) WAIT(w@@/!) | DONE(d!) CANCELED(c@@)
1021 will define TODO keywords and fast access keys, and also request that a time
1022 is recorded when the entry is set to DONE, and that a note is recorded when
1023 switching to WAIT or CANCELED. The same syntax works also when setting
1024 @code{org-todo-keywords}.
1026 @node Priorities, Breaking down tasks, Progress logging, TODO Items
1029 If you use Org mode extensively, you may end up with enough TODO items that
1030 it starts to make sense to prioritize them. Prioritizing can be done by
1031 placing a @emph{priority cookie} into the headline of a TODO item, like this
1034 *** TODO [#A] Write letter to Sam Fortune
1038 Org mode supports three priorities: @samp{A}, @samp{B}, and @samp{C}.
1039 @samp{A} is the highest, @samp{B} the default if none is given. Priorities
1040 make a difference only in the agenda.
1044 Set the priority of the current headline. Press @samp{A}, @samp{B} or
1045 @samp{C} to select a priority, or @key{SPC} to remove the cookie.
1049 Increase/decrease priority of current headline
1052 @node Breaking down tasks, Checkboxes, Priorities, TODO Items
1053 @section Breaking tasks down into subtasks
1055 It is often advisable to break down large tasks into smaller, manageable
1056 subtasks. You can do this by creating an outline tree below a TODO item,
1057 with detailed subtasks on the tree. To keep the overview over the fraction
1058 of subtasks that are already completed, insert either @samp{[/]} or
1059 @samp{[%]} anywhere in the headline. These cookies will be updated each time
1060 the TODO status of a child changes, or when pressing @kbd{C-c C-c} on the
1061 cookie. For example:
1064 * Organize Party [33%]
1065 ** TODO Call people [1/2]
1069 ** DONE Talk to neighbor
1072 @node Checkboxes, , Breaking down tasks, TODO Items
1075 Every item in a plain list (@pxref{Plain lists}) can be made into a checkbox
1076 by starting it with the string @samp{[ ]}. Checkboxes are not included into
1077 the global TODO list, so they are often great to split a task into a number
1079 Here is an example of a checkbox list.
1082 * TODO Organize party [1/3]
1083 - [-] call people [1/2]
1087 - [ ] think about what music to play
1090 Checkboxes work hierarchically, so if a checkbox item has children that
1091 are checkboxes, toggling one of the children checkboxes will make the
1092 parent checkbox reflect if none, some, or all of the children are
1095 @noindent The following commands work with checkboxes:
1099 Toggle checkbox status or (with prefix arg) checkbox presence at point.
1101 Insert a new item with a checkbox.
1102 This works only if the cursor is already in a plain list item
1103 (@pxref{Plain lists}).
1107 @uref{http://orgmode.org/manual/TODO-Items.html#TODO-Items, Chapter 5 of the manual}@*
1108 @uref{http://orgmode.org/worg/org-tutorials/orgtutorial_dto.php, David
1109 O'Toole's introductory tutorial}@*
1110 @uref{http://members.optusnet.com.au/~charles57/GTD/gtd_workflow.html,
1111 Charles Cave's GTD setup}}
1113 @node Tags, Properties, TODO Items, Top
1116 An excellent way to implement labels and contexts for cross-correlating
1117 information is to assign @i{tags} to headlines. Org mode has extensive
1120 Every headline can contain a list of tags; they occur at the end of the
1121 headline. Tags are normal words containing letters, numbers, @samp{_}, and
1122 @samp{@@}. Tags must be preceded and followed by a single colon, e.g.,
1123 @samp{:work:}. Several tags can be specified, as in @samp{:work:urgent:}.
1124 Tags will by default be in bold face with the same color as the headline.
1127 * Tag inheritance:: Tags use the tree structure of the outline
1128 * Setting tags:: How to assign tags to a headline
1129 * Tag searches:: Searching for combinations of tags
1132 @node Tag inheritance, Setting tags, Tags, Tags
1133 @section Tag inheritance
1135 @i{Tags} make use of the hierarchical structure of outline trees. If a
1136 heading has a certain tag, all subheadings will inherit the tag as
1137 well. For example, in the list
1140 * Meeting with the French group :work:
1141 ** Summary by Frank :boss:notes:
1142 *** TODO Prepare slides for him :action:
1146 the final heading will have the tags @samp{:work:}, @samp{:boss:},
1147 @samp{:notes:}, and @samp{:action:} even though the final heading is not
1148 explicitly marked with those tags. You can also set tags that all entries in
1149 a file should inherit just as if these tags were defined in a hypothetical
1150 level zero that surrounds the entire file. Use a line like this@footnote{As
1151 with all these in-buffer settings, pressing @kbd{C-c C-c} activates any
1152 changes in the line.}:
1155 #+FILETAGS: :Peter:Boss:Secret:
1158 @node Setting tags, Tag searches, Tag inheritance, Tags
1159 @section Setting tags
1161 Tags can simply be typed into the buffer at the end of a headline.
1162 After a colon, @kbd{M-@key{TAB}} offers completion on tags. There is
1163 also a special command for inserting tags:
1167 Enter new tags for the current headline. Org mode will either offer
1168 completion or a special single-key interface for setting tags, see
1169 below. After pressing @key{RET}, the tags will be inserted and aligned
1170 to @code{org-tags-column}. When called with a @kbd{C-u} prefix, all
1171 tags in the current buffer will be aligned to that column, just to make
1174 When the cursor is in a headline, this does the same as @kbd{C-c C-q}.
1177 Org will support tag insertion based on a @emph{list of tags}. By
1178 default this list is constructed dynamically, containing all tags
1179 currently used in the buffer. You may also globally specify a hard list
1180 of tags with the variable @code{org-tag-alist}. Finally you can set
1181 the default tags for a given file with lines like
1184 #+TAGS: @@work @@home @@tennisclub
1185 #+TAGS: laptop car pc sailboat
1188 By default Org mode uses the standard minibuffer completion facilities for
1189 entering tags. However, it also implements another, quicker, tag selection
1190 method called @emph{fast tag selection}. This allows you to select and
1191 deselect tags with just a single key press. For this to work well you should
1192 assign unique letters to most of your commonly used tags. You can do this
1193 globally by configuring the variable @code{org-tag-alist} in your
1194 @file{.emacs} file. For example, you may find the need to tag many items in
1195 different files with @samp{:@@home:}. In this case you can set something
1199 (setq org-tag-alist '(("@@work" . ?w) ("@@home" . ?h) ("laptop" . ?l)))
1202 @noindent If the tag is only relevant to the file you are working on, then you
1203 can instead set the TAGS option line as:
1206 #+TAGS: @@work(w) @@home(h) @@tennisclub(t) laptop(l) pc(p)
1209 @node Tag searches, , Setting tags, Tags
1210 @section Tag searches
1212 Once a system of tags has been set up, it can be used to collect related
1213 information into special lists.
1218 Create a sparse tree with all headlines matching a tags search. With a
1219 @kbd{C-u} prefix argument, ignore headlines that are not a TODO line.
1221 Create a global list of tag matches from all agenda files.
1222 @xref{Matching tags and properties}.
1224 Create a global list of tag matches from all agenda files, but check
1225 only TODO items and force checking subitems (see variable
1226 @code{org-tags-match-list-sublevels}).
1229 These commands all prompt for a match string which allows basic Boolean logic
1230 like @samp{+boss+urgent-project1}, to find entries with tags @samp{boss} and
1231 @samp{urgent}, but not @samp{project1}, or @samp{Kathy|Sally} to find entries
1232 which are tagged, like @samp{Kathy} or @samp{Sally}. The full syntax of the
1233 search string is rich and allows also matching against TODO keywords, entry
1234 levels and properties. For a complete description with many examples, see
1235 @ref{Matching tags and properties}.
1238 @uref{http://orgmode.org/manual/Tags.html#Tags, Chapter 6 of the manual}@*
1239 @uref{http://sachachua.com/wp/2008/01/tagging-in-org-plus-bonus-code-for-timeclocks-and-tags/,
1240 Sacha Chua's article about tagging in Org-mode}}
1242 @node Properties, Dates and Times, Tags, Top
1245 Properties are key-value pairs associates with and entry. They live in a
1246 special drawer with the name @code{PROPERTIES}. Each
1247 property is specified on a single line, with the key (surrounded by colons)
1248 first, and the value after it:
1253 *** Goldberg Variations
1255 :Title: Goldberg Variations
1256 :Composer: J.S. Bach
1257 :Publisher: Deutsche Grammophon
1262 You may define the allowed values for a particular property @samp{:Xyz:}
1263 by setting a property @samp{:Xyz_ALL:}. This special property is
1264 @emph{inherited}, so if you set it in a level 1 entry, it will apply to
1265 the entire tree. When allowed values are defined, setting the
1266 corresponding property becomes easier and is less prone to typing
1267 errors. For the example with the CD collection, we can predefine
1268 publishers and the number of disks in a box like this:
1273 :NDisks_ALL: 1 2 3 4
1274 :Publisher_ALL: "Deutsche Grammophon" Philips EMI
1277 or globally using @code{org-global-properties}, or file-wide like this:
1279 #+PROPERTY: NDisks_ALL 1 2 3 4
1284 Set a property. This prompts for a property name and a value.
1286 Remove a property from the current entry.
1289 To create sparse trees and special lists with selection based on properties,
1290 the same commands are used as for tag searches (@pxref{Tag searches}). The
1291 syntax for the search string is described in @ref{Matching tags and
1298 @uref{http://orgmode.org/manual/Properties-and-Columns.html#Properties-and-Columns,
1299 Chapter 7 of the manual}@*
1300 @uref{http://orgmode.org/worg/org-tutorials/org-column-view-tutorial.php,Bastien
1301 Guerry's column view tutorial}}
1303 @node Dates and Times, Capture - Refile - Archive, Properties, Top
1304 @chapter Dates and Times
1306 To assist project planning, TODO items can be labeled with a date and/or
1307 a time. The specially formatted string carrying the date and time
1308 information is called a @emph{timestamp} in Org mode.
1311 * Timestamps:: Assigning a time to a tree entry
1312 * Creating timestamps:: Commands which insert timestamps
1313 * Deadlines and scheduling:: Planning your work
1314 * Clocking work time:: Tracking how long you spend on a task
1318 @node Timestamps, Creating timestamps, Dates and Times, Dates and Times
1321 A timestamp is a specification of a date (possibly with a time or a range of
1322 times) in a special format, either @samp{<2003-09-16 Tue>} or
1323 @samp{<2003-09-16 Tue 09:39>} or @samp{<2003-09-16 Tue 12:00-12:30>}. A
1324 timestamp can appear anywhere in the headline or body of an Org tree entry.
1325 Its presence causes entries to be shown on specific dates in the agenda
1326 (@pxref{Weekly/daily agenda}). We distinguish:
1328 @noindent @b{Plain timestamp; Event; Appointment}@*
1329 A simple timestamp just assigns a date/time to an item. This is just
1330 like writing down an appointment or event in a paper agenda.
1333 * Meet Peter at the movies <2006-11-01 Wed 19:15>
1334 * Discussion on climate change <2006-11-02 Thu 20:00-22:00>
1337 @noindent @b{Timestamp with repeater interval}@*
1338 A timestamp may contain a @emph{repeater interval}, indicating that it
1339 applies not only on the given date, but again and again after a certain
1340 interval of N days (d), weeks (w), months (m), or years (y). The
1341 following will show up in the agenda every Wednesday:
1343 * Pick up Sam at school <2007-05-16 Wed 12:30 +1w>
1346 @noindent @b{Diary-style sexp entries}@*
1347 For more complex date specifications, Org mode supports using the
1348 special sexp diary entries implemented in the Emacs calendar/diary
1349 package. For example
1351 * The nerd meeting on every 2nd Thursday of the month
1352 <%%(diary-float t 4 2)>
1355 @noindent @b{Time/Date range}@*
1356 Two timestamps connected by @samp{--} denote a range.
1358 ** Meeting in Amsterdam
1359 <2004-08-23 Mon>--<2004-08-26 Thu>
1362 @noindent @b{Inactive timestamp}@*
1363 Just like a plain timestamp, but with square brackets instead of
1364 angular ones. These timestamps are inactive in the sense that they do
1365 @emph{not} trigger an entry to show up in the agenda.
1368 * Gillian comes late for the fifth time [2006-11-01 Wed]
1372 @node Creating timestamps, Deadlines and scheduling, Timestamps, Dates and Times
1373 @section Creating timestamps
1375 For Org mode to recognize timestamps, they need to be in the specific
1376 format. All commands listed below produce timestamps in the correct
1381 Prompt for a date and insert a corresponding timestamp. When the cursor is
1382 at an existing timestamp in the buffer, the command is used to modify this
1383 timestamp instead of inserting a new one. When this command is used twice in
1384 succession, a time range is inserted. With a prefix, also add the current
1388 Like @kbd{C-c .}, but insert an inactive timestamp that will not cause
1391 @item S-@key{left}@r{/}@key{right}
1392 Change date at cursor by one day.
1394 @item S-@key{up}@r{/}@key{down}
1395 Change the item under the cursor in a timestamp. The cursor can be on a
1396 year, month, day, hour or minute. When the timestamp contains a time range
1397 like @samp{15:30-16:30}, modifying the first time will also shift the second,
1398 shifting the time block with constant length. To change the length, modify
1402 When Org mode prompts for a date/time, it will accept any string containing
1403 some date and/or time information, and intelligently interpret the string,
1404 deriving defaults for unspecified information from the current date and time.
1405 You can also select a date in the pop-up calendar. See the manual for more
1406 information on how exactly the date/time prompt works.
1408 @node Deadlines and scheduling, Clocking work time, Creating timestamps, Dates and Times
1409 @section Deadlines and scheduling
1411 A timestamp may be preceded by special keywords to facilitate planning:
1413 @noindent @b{DEADLINE}@*
1414 Meaning: the task (most likely a TODO item, though not necessarily) is supposed
1415 to be finished on that date.
1418 Insert @samp{DEADLINE} keyword along with a stamp, in the line following the
1422 On the deadline date, the task will be listed in the agenda. In
1423 addition, the agenda for @emph{today} will carry a warning about the
1424 approaching or missed deadline, starting
1425 @code{org-deadline-warning-days} before the due date, and continuing
1426 until the entry is marked DONE. An example:
1429 *** TODO write article about the Earth for the Guide
1430 The editor in charge is [[bbdb:Ford Prefect]]
1431 DEADLINE: <2004-02-29 Sun>
1435 @noindent @b{SCHEDULED}@*
1436 Meaning: you are @i{planning to start working} on that task on the given
1437 date@footnote{This is quite different from what is normally understood by
1438 @i{scheduling a meeting}, which is done in Org-mode by just inserting a time
1439 stamp without keyword.}.
1443 Insert @samp{SCHEDULED} keyword along with a stamp, in the line following the
1447 The headline will be listed under the given date@footnote{It will still
1448 be listed on that date after it has been marked DONE. If you don't like
1449 this, set the variable @code{org-agenda-skip-scheduled-if-done}.}. In
1450 addition, a reminder that the scheduled date has passed will be present
1451 in the compilation for @emph{today}, until the entry is marked DONE.
1452 I.e. the task will automatically be forwarded until completed.
1455 *** TODO Call Trillian for a date on New Years Eve.
1456 SCHEDULED: <2004-12-25 Sat>
1459 Some tasks need to be repeated again and again. Org mode helps to
1460 organize such tasks using a so-called repeater in a DEADLINE, SCHEDULED,
1461 or plain timestamp. In the following example
1463 ** TODO Pay the rent
1464 DEADLINE: <2005-10-01 Sat +1m>
1467 the @code{+1m} is a repeater; the intended interpretation is that the task
1468 has a deadline on <2005-10-01> and repeats itself every (one) month starting
1471 @node Clocking work time, , Deadlines and scheduling, Dates and Times
1472 @section Clocking work time
1474 Org mode allows you to clock the time you spend on specific tasks in a
1479 Start the clock on the current item (clock-in). This inserts the CLOCK
1480 keyword together with a timestamp. When called with a @kbd{C-u} prefix
1481 argument, select the task from a list of recently clocked tasks.
1484 Stop the clock (clock-out). This inserts another timestamp at the same
1485 location where the clock was last started. It also directly computes
1486 the resulting time in inserts it after the time range as @samp{=>
1489 Update the effort estimate for the current clock task.
1491 Cancel the current clock. This is useful if a clock was started by
1492 mistake, or if you ended up working on something else.
1494 Jump to the entry that contains the currently running clock. With a
1495 @kbd{C-u} prefix arg, select the target task from a list of recently clocked
1498 Insert a dynamic block containing a clock
1499 report as an Org-mode table into the current file. When the cursor is
1500 at an existing clock table, just update it.
1502 #+BEGIN: clocktable :maxlevel 2 :emphasize nil :scope file
1506 For details about how to customize this view, see @uref{http://orgmode.org/manual/Clocking-work-time.html#Clocking-work-time,the manual}.
1508 Update dynamic block at point. The cursor needs to be in the
1509 @code{#+BEGIN} line of the dynamic block.
1512 The @kbd{l} key may be used in the timeline (@pxref{Timeline}) and in
1513 the agenda (@pxref{Weekly/daily agenda}) to show which tasks have been
1514 worked on or closed during a day.
1517 @uref{http://orgmode.org/manual/Dates-and-Times.html#Dates-and-Times,
1518 Chapter 8 of the manual}@*
1519 @uref{http://members.optusnet.com.au/~charles57/GTD/org_dates/, Charles
1520 Cave's Date and Time tutorial}@*
1521 @uref{http://doc.norang.ca/org-mode.html#Clocking, Bernt Hansen's clocking workflow}}
1523 @node Capture - Refile - Archive, Agenda Views, Dates and Times, Top
1524 @chapter Capture - Refile - Archive
1526 An important part of any organization system is the ability to quickly
1527 capture new ideas and tasks, and to associate reference material with them.
1528 Org uses the @file{remember.el} package to create tasks, and stores files
1529 related to a task (@i{attachments}) in a special directory. Once in the
1530 system, tasks and projects need to be moved around. Moving completed project
1531 trees to an archive file keeps the system compact and fast.
1534 * Remember:: Capture new tasks/ideas with little interruption
1535 * Refiling notes:: Moving a tree from one place to another
1536 * Archiving:: What to do with finished projects
1539 @node Remember, Refiling notes, Capture - Refile - Archive, Capture - Refile - Archive
1542 The Remember package by John Wiegley lets you store quick notes with little
1543 interruption of your work flow. It is an excellent way to add new notes and
1544 tasks to Org files. The @code{remember.el} package is part of Emacs 23, not
1545 Emacs 22. See @uref{http://www.emacswiki.org/cgi-bin/wiki/RememberMode} for
1548 Org significantly expands the possibilities of Remember: you may define
1549 templates for different note types, and associate target files and headlines
1550 with specific templates. It also allows you to select the location where a
1551 note should be stored interactively, on the fly.
1554 * Setting up Remember for Org:: Some code for .emacs to get things going
1555 * Remember templates:: Define the outline of different note types
1556 * Storing notes:: Directly get the note to where it belongs
1559 @node Setting up Remember for Org, Remember templates, Remember, Remember
1560 @unnumberedsubsec Setting up Remember for Org
1562 The following customization will tell Remember to use Org files as
1563 target, and to create annotations compatible with Org links.
1566 (org-remember-insinuate)
1567 (setq org-directory "~/path/to/my/orgfiles/")
1568 (setq org-default-notes-file (concat org-directory "/notes.org"))
1569 (define-key global-map "\C-cr" 'org-remember)
1573 The last line binds the command @code{org-remember} to a global
1574 key@footnote{Please select your own key, @kbd{C-c r} is only a
1575 suggestion.}. @code{org-remember} basically just calls Remember,
1576 but it makes a few things easier: if there is an active region, it will
1577 automatically copy the region into the Remember buffer. It also allows
1578 to jump to the buffer and location where Remember notes are being
1579 stored: just call @code{org-remember} with a prefix argument. If you
1580 use two prefix arguments, Org jumps to the location where the last
1581 remember note was stored.
1583 @node Remember templates, Storing notes, Setting up Remember for Org, Remember
1584 @unnumberedsubsec Remember templates
1586 In combination with Org, you can use templates to generate
1587 different types of Remember notes. For example, if you would like
1588 to use one template to create general TODO entries, another one for
1589 journal entries, and a third one for collecting random ideas, you could
1593 (setq org-remember-templates
1594 '(("Todo" ?t "* TODO %?\n %i\n %a" "~/org/TODO.org" "Tasks")
1595 ("Journal" ?j "* %U %?\n\n %i\n %a" "~/org/JOURNAL.org")
1596 ("Idea" ?i "* %^@{Title@}\n %i\n %a" "~/org/JOURNAL.org" "New Ideas")))
1599 @noindent In these entries, the first string is just a name, and the
1600 character specifies how to select the template. It is useful if the
1601 character is also the first letter of the name. The next string specifies
1602 the template. Two more (optional) strings give the file in which, and the
1603 headline under which, the new note should be stored.
1605 When you call @kbd{M-x org-remember} (or @kbd{M-x remember}) to remember
1606 something, Org will prompt for a key to select the template (if you have
1607 more than one template) and then prepare the buffer like
1610 [[file:@var{link to where you called remember}]]
1614 During expansion of the template, special @kbd{%}-escapes@footnote{If you
1615 need one of these sequences literally, escape the @kbd{%} with a backslash.}
1616 allow dynamic insertion of content. Here is a small selection of the
1617 possibilities, consult the manual for more.
1619 %a @r{annotation, normally the link created with @code{org-store-link}}
1620 %i @r{initial content, the region when remember is called with C-u.}
1621 %t @r{timestamp, date only}
1622 %T @r{timestamp with date and time}
1623 %u, %U @r{like the above, but inactive timestamps}
1626 @node Storing notes, , Remember templates, Remember
1627 @unnumberedsubsec Storing notes
1629 When you are finished preparing a note with Remember, you have to press
1630 @kbd{C-c C-c} to file the note away.
1632 The handler will store the note in the file and under the headline
1633 specified in the template, or it will use the default file and headline. The
1634 window configuration will be restored, sending you back to the working
1635 context before the call to Remember.
1637 @node Refiling notes, Archiving, Remember, Capture - Refile - Archive
1638 @section Refiling notes
1640 When reviewing the captured data, you may want to refile some of the entries
1641 into a different list, for example into a project. Cutting, finding the
1642 right location, and then pasting the note is cumbersome. To simplify this
1643 process, you can use the following special command:
1647 Refile the entry or region at point. This command offers possible locations
1648 for refiling the entry and lets you select one with completion. The item (or
1649 all items in the region) is filed below the target heading as a subitem.@*
1650 By default, all level 1 headlines in the current buffer are considered to be
1651 targets, but you can have more complex definitions across a number of files.
1652 See the variable @code{org-refile-targets} for details.
1654 Use the refile interface to jump to a heading.
1655 @item C-u C-u C-c C-w
1656 Jump to the location where @code{org-refile} last moved a tree to.
1659 @node Archiving, , Refiling notes, Capture - Refile - Archive
1662 When a project represented by a (sub)tree is finished, you may want
1663 to move the tree out of the way and to stop it from contributing to the
1664 agenda. Archiving is important to keep your working files compact and global
1665 searches like the construction of agenda views fast.
1666 The most common archiving action is to move a project tree to another file,
1671 Archive the current entry using the command specified in the variable
1672 @code{org-archive-default-command}.
1673 @item C-c C-x C-s@ @r{or short} @ C-c $
1674 Archive the subtree starting at the cursor position to the location
1675 given by @code{org-archive-location}.
1678 The default archive location is a file in the same directory as the
1679 current file, with the name derived by appending @file{_archive} to the
1680 current file name. For information and examples on how to change this,
1681 see the documentation string of the variable
1682 @code{org-archive-location}. There is also an in-buffer option for
1683 setting this variable, for example
1686 #+ARCHIVE: %s_done::
1690 @uref{http://orgmode.org/manual/Capture-_002d-Refile-_002d-Archive.html#Capture-_002d-Refile-_002d-Archive,
1691 Chapter 9 of the manual}@*
1692 @uref{http://members.optusnet.com.au/~charles57/GTD/remember.html, Charles
1693 Cave's remember tutorial}@*
1694 @uref{http://orgmode.org/worg/org-tutorials/org-protocol-custom-handler.php,
1695 Sebastian Rose's tutorial for capturing from a web browser}}@uref{}@*
1697 @node Agenda Views, Markup, Capture - Refile - Archive, Top
1698 @chapter Agenda Views
1700 Due to the way Org works, TODO items, time-stamped items, and tagged
1701 headlines can be scattered throughout a file or even a number of files. To
1702 get an overview of open action items, or of events that are important for a
1703 particular date, this information must be collected, sorted and displayed in
1704 an organized way. There are several different views, see below.
1706 The extracted information is displayed in a special @emph{agenda buffer}.
1707 This buffer is read-only, but provides commands to visit the corresponding
1708 locations in the original Org files, and even to edit these files remotely.
1709 Remote editing from the agenda buffer means, for example, that you can
1710 change the dates of deadlines and appointments from the agenda buffer.
1711 The commands available in the Agenda buffer are listed in @ref{Agenda
1715 * Agenda files:: Files being searched for agenda information
1716 * Agenda dispatcher:: Keyboard access to agenda views
1717 * Built-in agenda views:: What is available out of the box?
1718 * Agenda commands:: Remote editing of Org trees
1719 * Custom agenda views:: Defining special searches and views
1722 @node Agenda files, Agenda dispatcher, Agenda Views, Agenda Views
1723 @section Agenda files
1725 The information to be shown is normally collected from all @emph{agenda
1726 files}, the files listed in the variable
1727 @code{org-agenda-files}.
1731 Add current file to the list of agenda files. The file is added to
1732 the front of the list. If it was already in the list, it is moved to
1733 the front. With a prefix argument, file is added/moved to the end.
1735 Remove current file from the list of agenda files.
1737 Cycle through agenda file list, visiting one file after the other.
1740 @node Agenda dispatcher, Built-in agenda views, Agenda files, Agenda Views
1741 @section The agenda dispatcher
1742 The views are created through a dispatcher, which should be bound to a
1743 global key---for example @kbd{C-c a} (@pxref{Installation}). After
1744 pressing @kbd{C-c a}, an additional letter is required to execute a
1748 The calendar-like agenda (@pxref{Weekly/daily agenda}).
1750 A list of all TODO items (@pxref{Global TODO list}).
1752 A list of headlines matching a TAGS expression (@pxref{Matching
1753 tags and properties}).
1755 The timeline view for the current buffer (@pxref{Timeline}).
1757 A list of entries selected by a boolean expression of keywords
1758 and/or regular expressions that must or must not occur in the entry.
1761 @node Built-in agenda views, Agenda commands, Agenda dispatcher, Agenda Views
1762 @section The built-in agenda views
1765 * Weekly/daily agenda:: The calendar page with current tasks
1766 * Global TODO list:: All unfinished action items
1767 * Matching tags and properties:: Structured information with fine-tuned search
1768 * Timeline:: Time-sorted view for single file
1769 * Search view:: Find entries by searching for text
1772 @node Weekly/daily agenda, Global TODO list, Built-in agenda views, Built-in agenda views
1773 @subsection The weekly/daily agenda
1775 The purpose of the weekly/daily @emph{agenda} is to act like a page of a
1776 paper agenda, showing all the tasks for the current week or day.
1780 Compile an agenda for the current week from a list of Org files. The agenda
1781 shows the entries for each day.
1784 Emacs contains the calendar and diary by Edward M. Reingold. Org-mode
1785 understands the syntax of the diary and allows you to use diary sexp entries
1786 directly in Org files:
1789 * Birthdays and similar stuff
1791 %%(org-calendar-holiday) ; special function for holiday names
1793 %%(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
1794 %%(diary-anniversary 10 2 1869) Mahatma Gandhi would be %d years old
1797 Org can interact with Emacs appointments notification facility. To add all
1798 the appointments of your agenda files, use the command
1799 @code{org-agenda-to-appt}. See the docstring for details.
1801 @node Global TODO list, Matching tags and properties, Weekly/daily agenda, Built-in agenda views
1802 @subsection The global TODO list
1804 The global TODO list contains all unfinished TODO items formatted and
1805 collected into a single place. Remote editing of TODO items lets you
1806 can change the state of a TODO entry with a single key press. The commands
1807 available in the TODO list are described in @ref{Agenda commands}.
1811 Show the global TODO list. This collects the TODO items from all
1812 agenda files (@pxref{Agenda Views}) into a single buffer.
1814 Like the above, but allows selection of a specific TODO keyword.
1817 @node Matching tags and properties, Timeline, Global TODO list, Built-in agenda views
1818 @subsection Matching tags and properties
1820 If headlines in the agenda files are marked with @emph{tags} (@pxref{Tags}),
1821 or have properties (@pxref{Properties}), you can select headlines
1822 based on this metadata and collect them into an agenda buffer. The match
1823 syntax described here also applies when creating sparse trees with @kbd{C-c /
1824 m}. The commands available in the tags list are described in @ref{Agenda
1829 Produce a list of all headlines that match a given set of tags. The
1830 command prompts for a selection criterion, which is a boolean logic
1831 expression with tags, like @samp{+work+urgent-withboss} or
1832 @samp{work|home} (@pxref{Tags}). If you often need a specific search,
1833 define a custom command for it (@pxref{Agenda dispatcher}).
1835 Like @kbd{C-c a m}, but only select headlines that are also TODO items.
1838 @subsubheading Match syntax
1840 A search string can use Boolean operators @samp{&} for AND and @samp{|} for
1841 OR. @samp{&} binds more strongly than @samp{|}. Parentheses are currently
1842 not implemented. Each element in the search is either a tag, a regular
1843 expression matching tags, or an expression like @code{PROPERTY OPERATOR
1844 VALUE} with a comparison operator, accessing a property value. Each element
1845 may be preceded by @samp{-}, to select against it, and @samp{+} is syntactic
1846 sugar for positive selection. The AND operator @samp{&} is optional when
1847 @samp{+} or @samp{-} is present. Here are some examples, using only tags.
1851 Select headlines tagged @samp{:work:}, but discard those also tagged
1854 Selects lines tagged @samp{:work:} or @samp{:laptop:}.
1855 @item work|laptop+night
1856 Like before, but require the @samp{:laptop:} lines to be tagged also
1860 You may also test for properties at the same
1861 time as matching tags, see the manual for more information.
1863 @node Timeline, Search view, Matching tags and properties, Built-in agenda views
1864 @subsection Timeline for a single file
1866 The timeline summarizes all time-stamped items from a single Org mode
1867 file in a @emph{time-sorted view}. The main purpose of this command is
1868 to give an overview over events in a project.
1872 Show a time-sorted view of the Org file, with all time-stamped items.
1873 When called with a @kbd{C-u} prefix, all unfinished TODO entries
1874 (scheduled or not) are also listed under the current date.
1877 @node Search view, , Timeline, Built-in agenda views
1878 @subsection Search view
1880 This agenda view is a general text search facility for Org mode entries.
1881 It is particularly useful to find notes.
1885 This is a special search that lets you select entries by matching a substring
1886 or specific words using a boolean logic.
1888 For example, the search string @samp{computer equipment} will find entries
1889 that contain @samp{computer equipment} as a substring.
1890 Search view can also search for specific keywords in the entry, using Boolean
1891 logic. The search string @samp{+computer +wifi -ethernet -@{8\.11[bg]@}}
1892 will search for note entries that contain the keywords @code{computer}
1893 and @code{wifi}, but not the keyword @code{ethernet}, and which are also
1894 not matched by the regular expression @code{8\.11[bg]}, meaning to
1895 exclude both 8.11b and 8.11g.
1897 Note that in addition to the agenda files, this command will also search
1898 the files listed in @code{org-agenda-text-search-extra-files}.
1900 @node Agenda commands, Custom agenda views, Built-in agenda views, Agenda Views
1901 @section Commands in the agenda buffer
1903 Entries in the agenda buffer are linked back to the Org file or diary
1904 file where they originate. Commands are provided to show and jump to the
1905 original entry location, and to edit the Org files ``remotely'' from
1906 the agenda buffer. This is just a selection of the many commands, explore
1907 the @code{Agenda} menu and the manual for a complete list.
1910 @tsubheading{Motion}
1912 Next line (same as @key{up} and @kbd{C-p}).
1914 Previous line (same as @key{down} and @kbd{C-n}).
1915 @tsubheading{View/Go to Org file}
1918 Display the original location of the item in another window.
1919 With prefix arg, make sure that the entire entry is made visible in the
1920 outline, not only the heading.
1923 Go to the original location of the item in another window. Under Emacs
1924 22, @kbd{mouse-1} will also works for this.
1927 Go to the original location of the item and delete other windows.
1930 @tsubheading{Change display}
1932 Delete other windows.
1935 Switch to day/week view.
1938 Go forward/backward in time to display the following @code{org-agenda-ndays}
1939 days. For example, if the display covers a week, switch to the
1940 following/previous week.
1946 Prompt for a date and go there.
1948 @item v l @ @r{or short} @ l
1949 Toggle Logbook mode. In Logbook mode, entries that were marked DONE while
1950 logging was on (variable @code{org-log-done}) are shown in the agenda, as are
1951 entries that have been clocked on that day. When called with a @kbd{C-u}
1952 prefix, show all possible logbook entries, including state changes.
1955 Recreate the agenda buffer, to reflect the changes.
1957 Save all Org buffers in the current Emacs session, and also the locations of
1960 @tsubheading{Secondary filtering and query editing}
1963 Filter the current agenda view with respect to a tag. You are prompted for a
1964 letter to select a tag. Press @samp{-} first to select against the tag.
1967 Narrow the current agenda filter by an additional condition.
1969 @tsubheading{Remote editing (see the manual for many more commands)}
1975 Change the TODO state of the item, in the agenda and in the
1979 Delete the current agenda item along with the entire subtree belonging
1980 to it in the original Org file.
1983 Refile the entry at point.
1985 @item C-c C-x C-a @ @r{or short} @ a
1986 Archive the subtree corresponding to the entry at point using the default
1987 archiving command set in @code{org-archive-default-command}.
1989 @item C-c C-x C-s @ @r{or short} @ $
1990 Archive the subtree corresponding to the current headline.
1993 Schedule this item, with prefix arg remove the scheduling timestamp
1996 Set a deadline for this item, with prefix arg remove the deadline.
1998 @item S-@key{right} @r{and} S-@key{left}
1999 Change the timestamp associated with the current line by one day.
2002 Start the clock on the current item.
2005 Stop/cancel the previously started clock.
2008 Jump to the running clock in another window.
2011 @node Custom agenda views, , Agenda commands, Agenda Views
2012 @section Custom agenda views
2014 The main application of custom searches is the definition of keyboard
2015 shortcuts for frequently used searches, either creating an agenda
2016 buffer, or a sparse tree (the latter covering of course only the current
2018 Custom commands are configured in the variable
2019 @code{org-agenda-custom-commands}. You can customize this variable, for
2020 example by pressing @kbd{C-c a C}. You can also directly set it with
2021 Emacs Lisp in @file{.emacs}. The following example contains all valid
2026 (setq org-agenda-custom-commands
2027 '(("w" todo "WAITING")
2028 ("u" tags "+boss-urgent")
2029 ("v" tags-todo "+boss-urgent")))
2034 The initial string in each entry defines the keys you have to press after the
2035 dispatcher command @kbd{C-c a} in order to access the command. Usually this
2036 will be just a single character. The second parameter is the search type,
2037 followed by the string or regular expression to be used for the matching.
2038 The example above will therefore define:
2042 as a global search for TODO entries with @samp{WAITING} as the TODO
2045 as a global tags search for headlines marked @samp{:boss:} but not
2048 as the same search as @kbd{C-c a u}, but limiting the search to
2049 headlines that are also TODO items
2053 @uref{http://orgmode.org/manual/Agenda-Views.html#Agenda-Views, Chapter 10 of
2055 @uref{http://orgmode.org/worg/org-tutorials/org-custom-agenda-commands.php,
2056 Mat Lundin's tutorial about custom agenda commands}@*
2057 @uref{http://www.newartisans.com/2007/08/using-org-mode-as-a-day-planner.html,
2058 John Wiegley's setup}}
2060 @node Markup, Exporting, Agenda Views, Top
2061 @chapter Markup for rich export
2063 When exporting Org-mode documents, the exporter tries to reflect the
2064 structure of the document as accurately as possible in the backend. Since
2065 export targets like HTML, La@TeX{}, or DocBook allow much richer formatting,
2066 Org mode has rules on how to prepare text for rich export. This section
2067 summarizes the markup rules used in an Org-mode buffer.
2070 * Structural markup elements:: The basic structure as seen by the exporter
2071 * Images and tables:: Tables and Images will be included
2072 * Literal examples:: Source code examples with special formatting
2073 * Include files:: Include additional files into a document
2074 * Embedded LaTeX:: LaTeX can be freely used inside Org documents
2077 @node Structural markup elements, Images and tables, Markup, Markup
2078 @section Structural markup elements
2081 * Document title:: Where the title is taken from
2082 * Headings and sections:: The document structure as seen by the exporter
2083 * Table of contents:: The if and where of the table of contents
2084 * Paragraphs:: Paragraphs
2085 * Emphasis and monospace:: Bold, italic, etc.
2086 * Comment lines:: What will *not* be exported
2089 @node Document title, Headings and sections, Structural markup elements, Structural markup elements
2090 @subheading Document title
2093 The title of the exported document is taken from the special line
2096 #+TITLE: This is the title of the document
2099 @node Headings and sections, Table of contents, Document title, Structural markup elements
2100 @subheading Headings and sections
2102 The outline structure of the document as described in @ref{Document
2103 Structure}, forms the basis for defining sections of the exported document.
2104 However, since the outline structure is also used for (for example) lists of
2105 tasks, only the first three outline levels will be used as headings. Deeper
2106 levels will become itemized lists. You can change the location of this
2107 switch globally by setting the variable @code{org-export-headline-levels}, or on a
2108 per-file basis with a line
2114 @node Table of contents, Paragraphs, Headings and sections, Structural markup elements
2115 @subheading Table of contents
2117 The table of contents is normally inserted directly before the first headline
2121 #+OPTIONS: toc:2 (only to two levels in TOC)
2122 #+OPTIONS: toc:nil (no TOC at all)
2125 @node Paragraphs, Emphasis and monospace, Table of contents, Structural markup elements
2126 @subheading Paragraphs, line breaks, and quoting
2128 Paragraphs are separated by at least one empty line. If you need to enforce
2129 a line break within a paragraph, use @samp{\\} at the end of a line.
2131 To keep the line breaks in a region, but otherwise use normal formatting, you
2132 can use this construct, which can also be used to format poetry.
2136 Great clouds overhead
2137 Tiny black birds rise and fall
2144 When quoting a passage from another document, it is customary to format this
2145 as a paragraph that is indented on both the left and the right margin. You
2146 can include quotations in Org-mode documents like this:
2150 Everything should be made as simple as possible,
2151 but not any simpler -- Albert Einstein
2155 If you would like to center some text, do it like this:
2158 Everything should be made as simple as possible, \\
2163 @node Emphasis and monospace, Comment lines, Paragraphs, Structural markup elements
2164 @subheading Emphasis and monospace
2166 You can make words @b{*bold*}, @i{/italic/}, _underlined_, @code{=code=}
2167 and @code{~verbatim~}, and, if you must, @samp{+strike-through+}. Text
2168 in the code and verbatim string is not processed for Org-mode specific
2169 syntax, it is exported verbatim. To insert a horizontal rules, use a line
2170 consisting of only dashes, and at least 5 of them.
2172 @node Comment lines, , Emphasis and monospace, Structural markup elements
2173 @subheading Comment lines
2175 Lines starting with @samp{#} in column zero are treated as comments and will
2176 never be exported. If you want an indented line to be treated as a comment,
2177 start it with @samp{#+ }. Also entire subtrees starting with the word
2178 @samp{COMMENT} will never be exported. Finally, regions surrounded by
2179 @samp{#+BEGIN_COMMENT} ... @samp{#+END_COMMENT} will not be exported.
2183 Toggle the COMMENT keyword at the beginning of an entry.
2186 @node Images and tables, Literal examples, Structural markup elements, Markup
2187 @section Images and Tables
2189 For Org mode tables, the lines before the first horizontal separator line
2190 will become table header lines. You can use the following lines somewhere
2191 before the table to assign a caption and a label for cross references, and in
2192 the text you can refer to the object with @code{\ref@{tab:basic-data@}}:
2195 #+CAPTION: This is the caption for the next table (or link)
2196 #+LABEL: tbl:basic-data
2201 Some backends (HTML, La@TeX{}, and DocBook) allow you to directly include
2202 images into the exported document. Org does this, if a link to an image
2203 files does not have a description part, for example @code{[[./img/a.jpg]]}.
2204 If you wish to define a caption for the image and maybe a label for internal
2205 cross references, you sure that the link is on a line by itself precede it
2209 #+CAPTION: This is the caption for the next figure link (or table)
2210 #+LABEL: fig:SED-HR4049
2214 You may also define additional attributes for the figure. As this is
2215 backend-specific, see the sections about the individual backends for more
2219 @node Literal examples, Include files, Images and tables, Markup
2220 @section Literal examples
2222 You can include literal examples that should not be subjected to
2223 markup. Such examples will be typeset in monospace, so this is well suited
2224 for source code and similar examples.
2228 Some example from a text file.
2232 For simplicity when using small examples, you can also start the example
2233 lines with a colon followed by a space. There may also be additional
2234 whitespace before the colon:
2238 : Some example from a text file.
2241 For source code from a programming language, or any other text
2242 that can be marked up by font-lock in Emacs, you can ask for it to
2243 look like the fontified Emacs buffer
2246 #+BEGIN_SRC emacs-lisp
2247 (defun org-xor (a b)
2253 To edit the example in a special buffer supporting this language, use
2254 @kbd{C-c '} to both enter and leave the editing buffer.
2256 @node Include files, Embedded LaTeX, Literal examples, Markup
2257 @section Include files
2259 During export, you can include the content of another file. For example, to
2260 include your @file{.emacs} file, you could use:
2263 #+INCLUDE: "~/.emacs" src emacs-lisp
2266 The optional second and third parameter are the markup (e.g. @samp{quote},
2267 @samp{example}, or @samp{src}), and, if the markup is @samp{src}, the
2268 language for formatting the contents. The markup is optional, if it is not
2269 given, the text will be assumed to be in Org mode format and will be
2270 processed normally. @kbd{C-c '} will visit the included file.
2272 @node Embedded LaTeX, , Include files, Markup
2273 @section Embedded La@TeX{}
2275 For scientific notes which need to be able to contain mathematical symbols
2276 and the occasional formula, Org-mode supports embedding La@TeX{} code into
2277 its files. You can directly use TeX-like macros for special symbols, enter
2278 formulas and entire LaTeX environments.
2281 Angles are written as Greek letters \alpha, \beta and \gamma. The mass if
2282 the sun is M_sun = 1.989 x 10^30 kg. The radius of the sun is R_@{sun@} =
2283 6.96 x 10^8 m. If $a^2=b$ and $b=2$, then the solution must be either
2284 $a=+\sqrt@{2@}$ or $a=-\sqrt@{2@}$.
2291 @uref{http://orgmode.org/manual/LaTeX-fragments.html#LaTeX-fragments,special
2292 setup}, LaTeX snippets will be included as images when exporting to HTML.
2295 @uref{http://orgmode.org/manual/Markup.html#Markup, Chapter 11 of the manual}}
2297 @node Exporting, Publishing, Markup, Top
2300 Org-mode documents can be exported into a variety of other formats: ASCII
2301 export for inclusion into emails, HTML to publish on the web, La@TeX{}/PDF
2302 for beautiful printed documents and DocBook to enter the world of many other
2303 formats using DocBook tools. There is also export to iCalendar format so
2304 that planning information can be incorporated into desktop calendars.
2307 * Export options:: Per-file export settings
2308 * The export dispatcher:: How to access exporter commands
2309 * ASCII/Latin-1/UTF-8 export:: Exporting to flat files with encoding
2310 * HTML export:: Exporting to HTML
2311 * LaTeX and PDF export:: Exporting to La@TeX{}, and processing to PDF
2312 * DocBook export:: Exporting to DocBook
2313 * iCalendar export::
2316 @node Export options, The export dispatcher, Exporting, Exporting
2317 @section Export options
2319 The exporter recognizes special lines in the buffer which provide
2320 additional information. These lines may be put anywhere in the file.
2321 The whole set of lines can be inserted into the buffer with @kbd{C-c
2326 Insert template with export options, see example below.
2330 #+TITLE: the title to be shown (default is the buffer name)
2331 #+AUTHOR: the author (default taken from @code{user-full-name})
2332 #+DATE: a date, fixed, of a format string for @code{format-time-string}
2333 #+EMAIL: his/her email address (default from @code{user-mail-address})
2334 #+DESCRIPTION: the page description, e.g. for the XHTML meta tag
2335 #+KEYWORDS: the page keywords, e.g. for the XHTML meta tag
2336 #+LANGUAGE: language for HTML, e.g. @samp{en} (@code{org-export-default-language})
2337 #+TEXT: Some descriptive text to be inserted at the beginning.
2338 #+TEXT: Several lines may be given.
2339 #+OPTIONS: H:2 num:t toc:t \n:nil @@:t ::t |:t ^:t f:t TeX:t ...
2340 #+LINK_UP: the ``up'' link of an exported page
2341 #+LINK_HOME: the ``home'' link of an exported page
2342 #+LATEX_HEADER: extra line(s) for the LaTeX header, like \usepackage@{xyz@}
2345 @node The export dispatcher, ASCII/Latin-1/UTF-8 export, Export options, Exporting
2346 @section The export dispatcher
2348 All export commands can be reached using the export dispatcher, which is a
2349 prefix key that prompts for an additional key specifying the command.
2350 Normally the entire file is exported, but if there is an active region that
2351 contains one outline tree, the first heading is used as document title and
2352 the subtrees are exported.
2356 Dispatcher for export and publishing commands.
2359 @node ASCII/Latin-1/UTF-8 export, HTML export, The export dispatcher, Exporting
2360 @section ASCII/Latin-1/UTF-8 export
2362 ASCII export produces a simple and very readable version of an Org-mode
2363 file, containing only plain ASCII. Latin-1 and UTF-8 export augment the file
2364 with special characters and symbols available in these encodings.
2368 Export as ASCII file.
2369 @item C-c C-e n @ @ @r{and} @ @ C-c C-e N
2370 Like the above commands, but use Latin-1 encoding.
2371 @item C-c C-e u @ @ @r{and} @ @ C-c C-e U
2372 Like the above commands, but use UTF-8 encoding.
2375 @node HTML export, LaTeX and PDF export, ASCII/Latin-1/UTF-8 export, Exporting
2376 @section HTML export
2380 Export as HTML file @file{myfile.html}.
2382 Export as HTML file and immediately open it with a browser.
2385 To insert HTML that should be copied verbatim to
2386 the exported file use either
2389 #+HTML: Literal HTML code for export
2394 All lines between these markers are exported literally
2398 @node LaTeX and PDF export, DocBook export, HTML export, Exporting
2399 @section La@TeX{} and PDF export
2403 Export as La@TeX{} file @file{myfile.tex}.
2405 Export as La@TeX{} and then process to PDF.
2407 Export as La@TeX{} and then process to PDF, then open the resulting PDF file.
2410 By default, the La@TeX{} output uses the class @code{article}. You can
2411 change this by adding an option like @code{#+LaTeX_CLASS: myclass} in your
2412 file. The class must be listed in @code{org-export-latex-classes}.
2414 Embedded La@TeX{} as described in @ref{Embedded LaTeX}, will be correctly
2415 inserted into the La@TeX{} file. Similarly to the HTML exporter, you can use
2416 @code{#+LaTeX:} and @code{#+BEGIN_LaTeX ... #+END_LaTeX} construct to add
2417 verbatim LaTeX code.
2419 @node DocBook export, iCalendar export, LaTeX and PDF export, Exporting
2420 @section DocBook export
2424 Export as DocBook file.
2427 Similarly to the HTML exporter, you can use @code{#+DocBook:} and
2428 @code{#+BEGIN_DocBook ... #+END_DocBook} construct to add verbatim LaTeX
2431 @node iCalendar export, , DocBook export, Exporting
2432 @section iCalendar export
2437 Create iCalendar entries for the current file in a @file{.ics} file.
2440 Create a single large iCalendar file from all files in
2441 @code{org-agenda-files} and write it to the file given by
2442 @code{org-combined-agenda-icalendar-file}.
2446 @uref{http://orgmode.org/manual/Exporting.html#Exporting, Chapter 12 of the manual}@*
2447 @uref{http://orgmode.org/worg/org-tutorials/images-and-xhtml-export.php,
2448 Sebastian Rose's image handling tutorial}@*
2449 @uref{http://orgmode.org/worg/org-tutorials/org-latex-export.php, Thomas
2450 Dye's LaTeX export tutorial}
2451 @uref{http://orgmode.org/worg/org-tutorials/org-beamer/tutorial.php, Eric
2452 Fraga's BEAMER presentation tutorial}}
2454 @node Publishing, Miscellaneous, Exporting, Top
2457 Org includes a publishing management system that allows you to configure
2458 automatic HTML conversion of @emph{projects} composed of interlinked org
2459 files. You can also configure Org to automatically upload your exported HTML
2460 pages and related attachments, such as images and source code files, to a web
2461 server. For detailed instructions about setup, see the manual.
2466 (setq org-publish-project-alist
2468 :base-directory "~/org/"
2469 :publishing-directory "~/public_html"
2470 :section-numbers nil
2471 :table-of-contents nil
2472 :style "<link rel=\"stylesheet\"
2473 href=\"../other/mystyle.css\"
2474 type=\"text/css\"/>")))
2479 Prompt for a specific project and publish all files that belong to it.
2481 Publish the project containing the current file.
2483 Publish only the current file.
2485 Publish every project.
2488 Org uses timestamps to track when a file has changed. The above functions
2489 normally only publish changed files. You can override this and force
2490 publishing of all files by giving a prefix argument to any of the commands
2494 @uref{http://orgmode.org/manual/Publishing.html#Publishing, Chapter 12 of the
2496 @uref{http://orgmode.org/worg/org-tutorials/org-publish-html-tutorial.php,
2497 Sebastian Rose's publishing tutorial}@*
2498 @uref{http://orgmode.org/worg/org-tutorials/org-jekyll.php, Ian Barton's
2499 Jekyll/blogging setup}}
2501 @node Miscellaneous, , Publishing, Top
2502 @chapter Miscellaneous
2505 * Completion:: M-TAB knows what you need
2506 * Clean view:: Getting rid of leading stars in the outline
2507 * MobileOrg:: Org-mode on the iPhone
2510 @node Completion, Clean view, Miscellaneous, Miscellaneous
2513 Org supports in-buffer completion with @kbd{M-@key{TAB}}. This type of
2514 completion does not make use of the minibuffer. You simply type a few
2515 letters into the buffer and use the key to complete text right there. For
2516 example, this command will complete @TeX{} symbols after @samp{\}, TODO
2517 keywords at the beginning of a headline, and tags after @samp{:} in a
2520 @node Clean view, MobileOrg, Completion, Miscellaneous
2521 @section A cleaner outline view
2523 Some people find it noisy and distracting that the Org headlines start with a
2524 potentially large number of stars, and that text below the headlines is not
2525 indented. While this is no problem when writing a @emph{book-like} document
2526 where the outline headings are really section headings, in a more
2527 @emph{list-oriented} outline, indented structure is a lot cleaner:
2531 * Top level headline | * Top level headline
2532 ** Second level | * Second level
2533 *** 3rd level | * 3rd level
2534 some text | some text
2535 *** 3rd level | * 3rd level
2536 more text | more text
2537 * Another top level headline | * Another top level headline
2542 If you are using at least Emacs 23.1.50.3 and version 6.29 of Org, this kind
2543 of view can be achieved dynamically at display time using
2544 @code{org-indent-mode}, which will prepend intangible space to each line.
2545 You can turn on @code{org-indent-mode} for all files by customizing the
2546 variable @code{org-startup-indented}, or you can turn it on for individual
2553 If you want a similar effect in earlier version of Emacs and/or Org, or if
2554 you want the indentation to be hard space characters so that the plain text
2555 file looks as similar as possible to the Emacs display, Org supports you by
2556 helping to indent (with @key{TAB}) text below each headline, by hiding
2557 leading stars, and by only using levels 1, 3, etc to get two characters
2558 indentation for each level. To get this support in a file, use
2561 #+STARTUP: hidestars odd
2564 @node MobileOrg, , Clean view, Miscellaneous
2567 @i{MobileOrg} is an application for the @i{iPhone/iPod Touch} series of
2568 devices, developed by Richard Moreland. For details, see the Org-mode
2572 @uref{http://orgmode.org/manual/Miscellaneous.html#Miscellaneous, Chapter 14
2574 @uref{http://orgmode.org/manual/MobileOrg.html#MobileOrg, Appendix B of the
2576 @uref{http://orgmode.org/orgcard.pdf,Key reference card}}
2581 arch-tag: 8f0a8557-0acc-4436-b2b2-0197699e1452
2585 @c ispell-local-dictionary: "en_US-w_accents"
2586 @c ispell-local-pdict: "./.aspell.org.pws"
2591 @c LocalWords: webdavhost pre