aboutsummaryrefslogtreecommitdiffstats
path: root/man
diff options
context:
space:
mode:
authorRichard M. Stallman2004-12-06 05:39:36 +0000
committerRichard M. Stallman2004-12-06 05:39:36 +0000
commit891f4676dc2fd2442698e14036af9bd90b62df38 (patch)
tree621420af3afcfcceb1840d560e889603c8540368 /man
parenta4231b040c816e810514d1fa045daaff3d1229f8 (diff)
downloademacs-891f4676dc2fd2442698e14036af9bd90b62df38.tar.gz
emacs-891f4676dc2fd2442698e14036af9bd90b62df38.zip
New file.
Diffstat (limited to 'man')
-rw-r--r--man/org.texi2042
1 files changed, 2042 insertions, 0 deletions
diff --git a/man/org.texi b/man/org.texi
new file mode 100644
index 00000000000..e97a61514df
--- /dev/null
+++ b/man/org.texi
@@ -0,0 +1,2042 @@
1\input texinfo
2@c %**start of header
3@setfilename ../info/org
4@settitle Org Mode Manual
5
6@set VERSION 3.03
7@set DATE December 2004
8
9@dircategory Emacs
10@direntry
11* Org Mode: (org.info). Outline-based notes management and organizer
12@end direntry
13
14@c Version and Contact Info
15@set MAINTAINERSITE @uref{http://www.astro.uva.nl/~dominik/Tools/org/,maintainers webpage}
16@set MAINTAINER Carsten Dominik
17@set MAINTAINEREMAIL @email{dominik@@science.uva.nl}
18@set MAINTAINERCONTACT @uref{mailto:dominik@@science.uva.nl,contact the maintainer}
19@c %**end of header
20@finalout
21
22@c Macro definitions
23
24@c Subheadings inside a table. Need a difference between info and the rest.
25@macro tsubheading{text}
26@ifinfo
27@subsubheading \text\
28@end ifinfo
29@ifnotinfo
30@item @b{\text\}
31@end ifnotinfo
32@end macro
33
34@copying
35This manual is for Org-mode (version @value{VERSION}).
36
37Copyright @copyright{} 2004 Free Software Foundation
38
39@quotation
40Permission is granted to copy, distribute and/or modify this document
41under the terms of the GNU Free Documentation License, Version 1.1 or
42any later version published by the Free Software Foundation; with no
43Invariant Sections, with the Front-Cover texts being ``A GNU Manual,''
44and with the Back-Cover Texts as in (a) below. A copy of the
45license is included in the section entitled ``GNU Free Documentation
46License.''
47
48(a) The FSF's Back-Cover Text is: ``You have freedom to copy and modify
49this GNU Manual, like GNU software. Copies published by the Free
50Software Foundation raise funds for GNU development.''
51@end quotation
52@end copying
53
54@titlepage
55@title Org Mode Manual
56
57@subtitle Release @value{VERSION}
58@author by Carsten Dominik
59
60@c The following two commands start the copyright page.
61@page
62@vskip 0pt plus 1filll
63@insertcopying
64@end titlepage
65
66@c Output the table of contents at the beginning.
67@contents
68
69@ifnottex
70@node Top, Introduction, (dir), (dir)
71@top Org Mode Manual
72
73@insertcopying
74@end ifnottex
75
76@menu
77* Introduction:: Getting started
78* Document Structure:: A tree works like your brain
79* TODO items:: Every tree branch can be a TODO item
80* Tables:: Pure magic for quick formatting
81* Hyperlinks:: Notes in context
82* Timestamps:: Assign date and time to items
83* Timeline and Agenda:: Use time-stamped items to produce an agenda
84* Exporting:: Sharing and publishing of notes
85* Miscellaneous:: All the rest which did not fit elsewhere
86* Index:: The fast road to specific information
87* Key Index:: Key bindings and where they are described
88
89@detailmenu
90 --- The Detailed Node Listing ---
91
92Introduction
93
94* Summary:: Brief summary of what Org-mode does
95* Installation:: How to install Org-mode
96
97Document Structure
98
99* Outlines:: Org-mode is based on outline-mode
100* Headlines:: How to typeset org-tree headlines
101* Visibility cycling:: Show ad hide, much simplified
102* Motion:: Jumping to other headlines
103* Structure editing:: Changing sequence and level of headlines
104* Sparse trees:: Matches embedded in context
105
106TODO items
107
108* TODO basics:: Marking and displaying TODO entries
109* Priorities:: Some things are more important than others
110* TODO extensions:: Workflow and assignments
111
112Extended use of TODO keywords
113
114* Workflow states:: From TODO to DONE in steps
115* TODO types:: I do this, Fred the rest
116* Per file keywords:: Different files, different requirements
117
118Tables
119
120* Built-in table editor:: Simple tables
121* table.el:: Complex tables
122
123Hyperlinks
124
125* Links:: URL-like links to the world
126* Remember:: Org-trees store quick notes
127
128Timestamps
129
130* Time stamps:: Assigning a time to a tree entry
131* Creating timestamps:: Commands which insert timestamps
132
133Timeline and Agenda
134
135* Timeline (single file):: Time-sorted view for single file
136* Agenda (multiple files):: Your weekly planner
137* Agenda commands:: Remote editing of org trees
138* Calendar/Diary integration:: Integrating Anniversaries and more
139
140Calendar/Diary integration
141
142* Diary to agenda:: Agenda incorporates the diary
143* Agenda to diary:: Diary incorporates the agenda
144
145Exporting
146
147* Export commands:: Commands which export and display
148* HTML formatting:: Interpretation of the buffer content
149* Export options:: How to influence exports
150* Comment lines:: Lines which will not be exported
151
152Miscellaneous
153
154* Completion:: M-TAB knows what you need
155* Customization:: Adapting Org-mode to your taste
156* Tips and Tricks:: An author-imposed FAQ, sort of
157* Interaction:: Other Emacs packages
158* Acknowledgments:: These people provided feedback and more
159* Bugs:: Things which do not work perfectly
160
161@end detailmenu
162@end menu
163
164@node Introduction, Document Structure, Top, Top
165@chapter Introduction
166@cindex introduction
167
168@menu
169* Summary:: Brief summary of what Org-mode does
170* Installation:: How to install Org-mode
171@end menu
172
173@node Summary, Installation, Introduction, Introduction
174@section Summary
175@cindex summary
176
177Org-mode is a mode for keeping notes, maintaining ToDo lists, and doing
178project planning with a fast and effective plain-text system.
179
180Org-mode develops organizational tasks around NOTES files that contain
181information about projects as plain text. Org-mode is implemented on
182top of outline-mode, which makes it possible to keep the content of
183large files well structured. Visibility cycling and structure editing
184help to work with the tree. Tables are easily created with a built-in
185table editor. Org-mode supports ToDo items, deadlines, time stamps,
186and scheduling. It dynamically compiles entries into an agenda.
187Plain text URL-like links connect to websites, emails, usenet
188messages, BBDB entries, and any files related to the projects. For
189printing and sharing of notes, an Org-mode file can be exported as a
190structured ASCII file, or as HTML.
191
192Org-mode keeps simple things simple. Not every outline branch needs
193to be an action item, not every action item needs to have priority or
194scheduling information associated with it. Org-mode can be used on
195different levels and in different ways, for example
196
197@example
198@r{@bullet{} as an outline extension with visibility cycling and structure editing}
199@r{@bullet{} as an ASCII system and table editor to take structured notes}
200@r{@bullet{} as a simple hypertext system, with HTML export}
201@r{@bullet{} as a TODO list editor}
202@r{@bullet{} as a full agenda and planner with deadlines and work scheduling}
203@end example
204
205@node Installation, , Summary, Introduction
206@section Installation
207@cindex installation
208@cindex autoload
209@cindex global keybindings
210@cindex keybindings, global
211
212The instructions below assume that you have downloaded Org-mode from
213the web. If Org-mode is part of the Emacs distribution or an XEmacs
214package, you only need to add to @file{.emacs} the last three Lisp
215lines below - all the rest will be taken care of automatically.
216
217Byte-compile @file{org.el} and put it on your load path. If you'd
218like to use the Info documentation, copy the file @file{org} into the
219directory containing info files and run the command @code{install-info
220org}.
221
222Then copy the following lines into @file{.emacs}. The last two lines
223define @emph{global} keys for the commands @command{org-store-link}
224and @command{org-agenda} - please choose suitable keys yourself.
225
226@c FIXME: autoloads not necessary when part of emacs
227@lisp
228(autoload 'org-mode "org" "Org mode" t)
229(autoload 'org-diary "org" "Diary entries from Org mode")
230(autoload 'org-agenda "org" "Multi-file agenda from Org mode" t)
231(autoload 'org-store-link "org" "Store a link to the current location" t)
232(add-to-list 'auto-mode-alist '("\\.org$" . org-mode))
233(define-key global-map "\C-cl" 'org-store-link)
234(define-key global-map "\C-ca" 'org-agenda)
235@end lisp
236
237@cindex org-mode, turning on
238@noindent
239This will put all files with extension @samp{.org} into Org-mode. As
240an alternative, make the first line of a file look like this:
241
242@example
243MY PROJECTS -*- mode: org; -*-
244@end example
245
246@noindent which will select Org-mode for this buffer no matter what
247the file's name is.
248
249@node Document Structure, TODO items, Introduction, Top
250@chapter Document Structure
251@cindex document structure
252@cindex structure of document
253
254Org-mode is based on outline mode and provides flexible commands to
255edit the structure of the document.
256
257@menu
258* Outlines:: Org-mode is based on outline-mode
259* Headlines:: How to typeset org-tree headlines
260* Visibility cycling:: Show ad hide, much simplified
261* Motion:: Jumping to other headlines
262* Structure editing:: Changing sequence and level of headlines
263* Sparse trees:: Matches embedded in context
264@end menu
265
266@node Outlines, Headlines, Document Structure, Document Structure
267@section Outlines
268@cindex outlines
269@cindex outline-mode
270
271Org-mode is implemented on top of outline-mode. Outlines allow to
272organize a document in a hierarchical structure, which (at least for
273me) is the best representation of notes and thoughts. Overview over
274this structure is achieved by folding (hiding) large parts of the
275document to show only the general document structure and the parts
276currently being worked on. Org-mode greatly simplifies the use of
277outlines by compressing the entire show/hide functionality into a
278single command @command{org-cycle}, which is bound to the @key{TAB}
279key.
280
281@node Headlines, Visibility cycling, Outlines, Document Structure
282@section Headlines
283@cindex headlines
284@cindex outline tree
285
286Headlines define the structure of an outline tree. The Headlines in
287Org-mode start with one or more stars, for example
288
289@example
290* Top level headline
291** Second level
292*** 3rd level
293 some text
294*** 3rd level
295 more text
296* Another top level headline
297@end example
298
299@node Visibility cycling, Motion, Headlines, Document Structure
300@section Visibility cycling
301@cindex visibility cycling
302@cindex trees, visibility
303
304Outlines make it possible to hide parts of the text in the buffer.
305Org-mode uses a single command bound to the @key{TAB} key to change
306the visibility in the buffer.
307
308@cindex subtree visibility states
309@cindex folded, subtree visibility state
310@cindex children, subtree visibility state
311@cindex subtree, subtree visibility state
312@table @kbd
313@kindex @key{TAB}
314@item @key{TAB}
315Rotate current subtree between the states
316@example
317,-> FOLDED -> CHILDREN -> SUBTREE --.
318'-----------------------------------'
319@end example
320At the beginning of the buffer (or when called with @kbd{C-u}), this does
321the same as the command @kbd{S-@key{TAB}} below.
322
323@cindex global visibility states
324@cindex overview, global visibility state
325@cindex contents, global visibility state
326@cindex show all, global visibility state
327@kindex S-@key{TAB}
328@item S-@key{TAB}
329Rotate the entire buffer between the states
330@example
331,-> OVERVIEW -> CONTENTS -> SHOW ALL --.
332'--------------------------------------'
333@end example
334Note that inside tables, @kbd{S-@key{TAB}} jumps to the previous field.
335
336@cindex show all, command
337@kindex C-c C-a
338@item C-c C-a
339Show all.
340@end table
341
342@node Motion, Structure editing, Visibility cycling, Document Structure
343@section Motion
344@cindex motion, between headlines
345@cindex jumping, to headlines
346The following commands jump to other headlines in the buffer.
347
348@table @kbd
349@kindex C-c C-n
350@item C-c C-n
351Next heading.
352@kindex C-c C-p
353@item C-c C-p
354Previous heading.
355@kindex C-c C-f
356@item C-c C-f
357Next heading same level.
358@kindex C-c C-b
359@item C-c C-b
360Previous heading same level.
361@kindex C-c C-u
362@item C-c C-u
363Backward to higher level heading.
364@kindex C-c C-j
365@item C-c C-j
366Jump to a different place without changing the current outline
367visibility. Shows the document structure in a temporary buffer, where
368you can use visibility cycling (@key{TAB}) to find your destination.
369After pressing @key{RET}, the cursor moves to the selected location in
370the original buffer, and the headings hierarchy above it is made
371visible.
372@end table
373
374@node Structure editing, Sparse trees, Motion, Document Structure
375@section Structure editing
376@cindex structure editing
377@cindex headline, promotion and demotion
378@cindex promotion, of subtrees
379@cindex demotion, of subtrees
380@cindex subtree, cut and paste
381@cindex pasting, subtrees
382@cindex cutting, subtrees
383@cindex copying, subtrees
384
385@table @kbd
386@kindex M-@key{RET}
387@item M-@key{RET}
388Insert new heading with same level as current
389@kindex M-@key{left}
390@item M-@key{left}
391Promote current heading by one level
392@kindex M-@key{right}
393@item M-@key{right}
394Demote current heading by one level
395@kindex M-S-@key{left}
396@item M-S-@key{left}
397Promote the current subtree by one level
398@kindex M-S-@key{right}
399@item M-S-@key{right}
400Demote the current subtree by one level
401@kindex M-S-@key{up}
402@item M-S-@key{up}
403Move subtree up (swap with previous subtree of same level)
404@kindex M-S-@key{down}
405@item M-S-@key{down}
406Move subtree down (swap with next subtree of same level)
407@kindex C-c C-h C-w
408@item C-c C-h C-w
409Kill subtree, i.e. remove it from buffer but save in kill ring.
410@kindex C-c C-h M-w
411@item C-c C-h M-w
412Copy subtree to kill ring.
413@kindex C-c C-h C-y
414@item C-c C-h C-y
415Yank subtree from kill ring. This does modify the level of subtree to
416make sure the tree fits in nicely at the yank position. The yank
417level can also be specified with a prefix arg, or by yanking after a
418headline marker like @samp{****}.
419@end table
420
421@cindex region, active
422@cindex active region
423@cindex transient-mark-mode
424When there is an active region (transient-mark-mode), promotion and
425demotion work on all headlines in the region. To select a region of
426headlines, it is best to place both point and mark at the beginning of a
427line, mark at the beginning of the first headline, and point at the line
428just after the last headline to change. Note that when the cursor is
429inside a table (@pxref{Tables}), the Meta-Cursor keys have different
430functionality.
431
432@node Sparse trees, , Structure editing, Document Structure
433@section Sparse trees
434@cindex sparse trees
435@cindex trees, sparse
436@cindex folding, sparse trees
437@cindex occur, command
438
439An important feature of Org-mode is the ability to construct
440@emph{sparse trees} for selected information in an outline tree. A
441sparse tree means that the entire document is folded as much as
442possible, but the selected information is made visible along with the
443headline structure above it. Just try it out and you will see
444immediately how it works.
445
446Org-mode contains several commands creating such trees. The most
447basic one is @command{org-occur}:
448
449@table @kbd
450@kindex C-c /
451@item C-c /
452Occur. Prompts for a regexp and shows a sparse tree with all matches.
453If the match is in a headline, the headline is made visible. If the
454match is in the body of an entry, headline and body are made visible.
455In order to provide minimal context, also the full hierarchy of
456headlines above the match is shown, as well as the headline following
457the match.
458@end table
459
460Other commands are using this feature as well. For example @kbd{C-c
461C-v} creates a sparse TODO tree (@pxref{TODO basics}).
462
463@node TODO items, Tables, Document Structure, Top
464@chapter TODO items
465@cindex TODO items
466
467Org-mode does not maintain TODO lists as a separate document. TODO
468items are an integral part of the notes file, because TODO items
469usually come up while taking notes! With Org-mode, you simply mark
470any entry in a tree as being a TODO item. In this way, the
471information is not duplicated, and the entire context from which the
472item emerged is always present when you check.
473
474Of course, this technique causes TODO items to be scattered throughout
475your file. Org-mode provides methods to give you an overview over all
476things you have to do.
477
478@menu
479* TODO basics:: Marking and displaying TODO entries
480* Priorities:: Some things are more important than others
481* TODO extensions:: Workflow and assignments
482@end menu
483
484@node TODO basics, Priorities, TODO items, TODO items
485@section Basic TODO functionality
486
487Any headline can become a TODO item by starting it with the word TODO,
488for example
489
490@example
491*** TODO Write letter to Sam Fortune
492@end example
493
494@noindent
495The most important commands to work with TODO entries are:
496
497@table @kbd
498@kindex C-c C-t
499@item C-c C-t
500Rotate the TODO state of the current item between
501@example
502,-> (unmarked) -> TODO -> DONE --.
503'--------------------------------'
504@end example
505@kindex C-c C-v
506@cindex sparse tree, for TODO
507@item C-c C-v
508View TODO items in a @emph{sparse tree} (@pxref{Sparse trees}). Folds
509the entire buffer, but shows all TODO items and the headings hierarchy
510above them. With prefix arg, show also the DONE entries.
511@end table
512
513@node Priorities, TODO extensions, TODO basics, TODO items
514@section Priorities
515@cindex priorities
516
517If you use Org-mode extensively to organize your work, you may end up
518with a number of TODO entries so large that you'd like to prioritize
519them. You can do this by placing a @emph{priority cookie} into the
520headline, like this
521
522@example
523*** TODO [#A] Write letter to Sam Fortune
524@end example
525
526@noindent
527With its standard setup, Org-mode supports priorities @samp{A},
528@samp{B}, and @samp{C}. @samp{A} is the highest priority. An entry
529without a cookie is treated as priority @samp{B}. Priorities make a
530difference only in the multi-file agenda (@pxref{Agenda (multiple files)}).
531
532@table @kbd
533@kindex @kbd{C-c ,}
534@item @kbd{C-c ,}
535Set the priority of the current item. The command prompts for a
536priority character @samp{A}, @samp{B} or @samp{C}. When you press
537@key{SPC} instead, the priority cookie is removed from the headline.
538@kindex S-@key{up}
539@kindex S-@key{down}
540@item S-@key{up}
541@itemx S-@key{down}
542Increase/decrease priority of current item. Note that these keys are
543also used to modify time stamps (@pxref{Creating timestamps}).
544@end table
545
546
547@node TODO extensions, , Priorities, TODO items
548@section Extended use of TODO keywords
549@cindex extended TODO keywords
550
551The default implementation of TODO entries is just two states: TODO
552and DONE. You can, however, use the TODO feature for more
553complicated things by configuring the variables
554@code{org-todo-keywords} and @code{org-todo-interpretation}. Using
555special setup, you can even use TODO keywords in different ways in
556different org files.
557
558@menu
559* Workflow states:: From TODO to DONE in steps
560* TODO types:: I do this, Fred the rest
561* Per file keywords:: Different files, different requirements
562@end menu
563
564@node Workflow states, TODO types, TODO extensions, TODO extensions
565@subsection TODO keywords as workflow states
566@cindex TODO workflow
567@cindex workflow states as TODO keywords
568
569You can use TODO keywords to indicate different states in the process
570of working on an item, for example
571
572@lisp
573(setq org-todo-keywords '("TODO" "FEEDBACK" "VERIFY" "DONE")
574 org-todo-interpretation 'sequence)
575@end lisp
576
577With this setup, the command @kbd{C-c C-t} will cycle an entry from
578TODO to FEEDBACK, then to VERIFY, and finally too DONE. You may also
579use a prefix argument to quickly select a specific state. For example
580@kbd{C-3 C-c C-t} will change the state immediately to VERIFY.
581If you define many keywords, you can use in-buffer completion (see
582@ref{Completion}) to insert these words into the buffer.
583
584@node TODO types, Per file keywords, Workflow states, TODO extensions
585@subsection TODO keywords as types
586@cindex TODO types
587@cindex names as TODO keywords
588@cindex types as TODO keywords
589
590The second possibility is to use TODO keywords to indicate different
591types of action items. For example, when you work with several people
592on a single project, you might want to assign action items to
593persons.
594
595@lisp
596(setq org-todo-keywords '("Fred" "Sara" "Lucy" "Mike" "DONE")
597 org-todo-interpretation 'type)
598@end lisp
599
600In this case, different keywords do not indicate a sequence, but
601rather different levels. This changes the behavior of the command
602@kbd{C-c C-t} slightly. When used several times in succession, it
603will still cycle through all names. But when when you return to the
604item after some time and execute @kbd{C-c C-t} again, it will switch
605from each name directly to DONE. Use prefix arguments or completion
606to quickly select a specific name.
607
608@node Per file keywords, , TODO types, TODO extensions
609@subsection Setting up TODO keywords for individual files
610@cindex keyword options
611@cindex per file keywords
612
613It can be very useful to use different aspects of the TODO mechanism
614in different files. For this you need to add special lines to the
615file which set the keywords and interpretation for that file only.
616For example, to set one of the two examples discussed above, you
617need one of the following lines, starting in column zero anywhere in
618the file:
619
620@example
621#+SEQ_TODO: TODO FEEDBACK VERIFY DONE
622#+TYP_TODO: Fred Sara Lucy Mike DONE
623@end example
624
625@cindex Completing option keywords
626@kindex M-@key{TAB}
627@noindent To make sure you are using the correct keyword, type
628@samp{#+} into the buffer and then use @kbd{M-@key{TAB}} completion.
629
630@cindex DONE, final TODO keyword
631Remember that the last keyword must always mean that the
632item is DONE (you may use a different word, though). After changing
633these lines, use @kbd{M-x normal-mode} to make the changes known to
634Org-mode. Also note that in each file, only one of the two aspects
635of TODO keywords can be used.
636
637If you want to use very many keywords, for example when working with a
638large group of people, you may split the names over several lines:
639
640@example
641#+TYP_TODO: Fred Sara Lucy Mike
642#+TYP_TODO: Luis George Jules Jessica
643#+TYP_TODO: Kim Arnold Peter
644#+TYP_TODO: DONE
645@end example
646
647@node Tables, Hyperlinks, TODO items, Top
648@chapter Tables
649@cindex tables
650
651For taking notes, tables are an essential tool because they allow
652immediate and clear structuring of data. Org-mode has a very fast and
653intuitive table editor built-in. More complex tables can be created
654with the Emacs table.el package.
655
656@menu
657* Built-in table editor:: Simple tables
658* table.el:: Complex tables
659@end menu
660
661@node Built-in table editor, table.el, Tables, Tables
662@section The built-in table editor
663@cindex table editor, builtin
664
665Org-mode makes it easy to format tables in plain ASCII. Any line with
666@samp{|} as the first non-white character is considered part of a
667table. @samp{|} is also the column separator. A table might look
668like this:
669
670@example
671| Name | Phone | Age |
672|-------+-------+-----|
673| Peter | 1234 | 17 |
674| Anna | 4321 | 25 |
675@end example
676
677A table is re-aligned automatically each time you press @key{TAB} or
678@key{RET} inside the table. @key{TAB} also moves to the next field
679(@key{RET} to the next row) and creates new table rows at the end of the
680table or before horizontal lines. The indentation of the table is set
681by the first line. Any line starting with @samp{|-} is considered as a
682horizontal separator line and will be expanded on the next re-align to
683span the whole table width. So, to create the above table, you would
684only type
685
686@example
687|Name|Phone|Age
688|-
689@end example
690
691@noindent and then press @key{TAB} to align the table and start filling in
692fields.
693
694@table @kbd
695@tsubheading{Creation and conversion}
696@kindex C-c C-c
697@item C-c C-c
698Recognize @file{table.el} table. Works when the cursor is in a
699table.el table
700
701@kindex C-c C-c
702@item C-c C-c
703Convert region to table. Works when the cursor is not in an existing
704table, and when there is a region defined. If every line contains at
705least one TAB character, the function assumes that the material is tab
706separated. If not, lines are split at whitespace into fields. You
707can use a prefix argument to indicate how many consecutive spaces are
708at least required to indicate a field separator (default: just one).
709
710@item M-x org-table-create
711Creates an empty Org-mode table. However, it is much easier to just
712start typing, like @kbd{|Name|Phone|Age @key{RET} |- @key{TAB}}
713
714@tsubheading{Re-aligning and field motion}
715@kindex C-c C-c
716@item C-c C-c
717Re-align the table without moving the cursor.
718
719@kindex @key{TAB}
720@item @key{TAB}
721Re-align the table, move to the next field. Creates a new row if
722necessary.
723
724@kindex S-@key{TAB}
725@item S-@key{TAB}
726Move to previous field.
727
728@kindex @key{RET}
729@item @key{RET}
730Re-align the table and move down to next row. Creates a new row if
731necessary. At the beginning or end of a line, @key{RET} still does
732NEWLINE, so it can be used to split a table.
733
734@kindex S-@key{RET}
735@item S-@key{RET}
736Copy from first non-empty
737 field above current field.
738
739@tsubheading{Column and row editing}
740@kindex M-@key{left}
741@kindex M-@key{right}
742@item M-@key{left}
743@itemx M-@key{right}
744Move the current column left/right
745
746@kindex M-S-@key{left}
747@item M-S-@key{left}
748Kill the current column.
749
750@kindex M-S-@key{right}
751@item M-S-@key{right}
752Insert a new column to the left of the cursor position.
753
754@kindex M-@key{up}
755@kindex M-@key{down}
756@item M-@key{up}
757@itemx M-@key{down}
758Move the current row up/down
759
760@kindex M-S-@key{up}
761@item M-S-@key{up}
762Kill the current row or horizontal line.
763
764@kindex M-S-@key{down}
765@item M-S-@key{down}
766Insert a new row above (with arg: below) the current row.
767
768@kindex C-c -
769@item C-c -
770Insert a horizontal line below current row. With prefix arg, line is
771created above the current line.
772
773@tsubheading{Regions}
774@kindex C-c C-h M-w
775@item C-c C-h M-w
776Copy an rectangular region from a table to a special clipboard. Point
777and mark determine edge fields of the rectangle. The process ignores
778horizontal separator lines.
779@kindex C-c C-h C-w
780@item C-c C-h C-w
781Copy an rectangular region from a table to a special clipboard, and
782blank all fields in the rectangle.
783@kindex C-c C-h C-y
784@item C-c C-h C-y
785Paste a rectangluar region into a table.
786The upper right corner ends up in the current field. All involved fields
787will be overwritten. If the rectangle does not fit into the present table,
788the table is enlarged as needed. The process ignores horizontal separator
789lines.
790@kindex C-c C-q
791@item C-c C-q
792Wrap several fields in a column like a paragraph. If there is an active
793region, and both point and mark are in the same column, the text in the
794column is wrapped to minimum width for the given number of lines. A
795prefix ARG may be used to change the number of desired lines. If there
796is no region, the current field is split at the cursor position and the
797text fragment to the right of the cursor is prepended to the field one
798line down. If there is no region, but you specify a prefix ARG, the
799current field gets blank, and the content is appended to the field
800above.
801
802@tsubheading{Calculations}
803@kindex C-c ?
804@item C-c ?
805Which table column is the cursor in? Displays number >0 in echo
806area.
807
808@cindex region, active
809@cindex active region
810@cindex transient-mark-mode
811@kindex C-c +
812@item C-c +
813Sum the numbers in the current column, or in the rectangle defined by
814the active region. The result is displayed in the echo area and can
815be inserted with @kbd{C-y}.
816
817@cindex formula, in tables
818@cindex calculations, in tables
819@kindex C-c =
820@item C-c =
821Replace current field with the result of a formula. Requires the
822Emacs calc package. The formula can access the current field with
823@samp{$}, and the other fields in the current row
824with @samp{$1}, @samp{$2},... For details see the documentation of the
825command @command{org-table-eval-formula}.
826
827@tsubheading{Miscellaneous}
828@kindex C-c |
829@item C-c |
830Toggle the visibility of vertical lines in tables. The lines are
831still there, only made invisible with a text property. Any @samp{|}
832added by hand will become invisible on the next align.
833Typographically it is good style to have no vertical lines in tables.
834
835@item M-x org-table-import
836Import a file as a table. The table should be TAB- or whitespace
837separated. Useful for example to import an Excel table or data from a
838database, because these programs generally can write TAB-separated text
839files. This command works by inserting the file into the buffer and
840then converting the region to a table. Any prefix argument is passed on
841to the converter, which uses it to determine the separator.
842
843@item M-x org-table-export
844Export the table as a TAB-separated file. Useful for data exchange with
845for example Excel or database programs.
846
847@end table
848
849If you don't like the automatic table editor because it gets into your
850way in lines which you would like to start with @samp{|}, you can turn
851it off with
852@lisp
853(setq org-enable-table-editor nil)
854@end lisp
855@noindent The only table command which then still works is
856@kbd{C-c C-c} to do a manual re-align.
857
858@node table.el, , Built-in table editor, Tables
859@section The @file{table.el} package
860@kindex C-c C-c
861@cindex table editor, table.el
862@cindex @file{table.el}
863
864More complex ASCII tables (with automatic line wrapping, column- and
865row-spanning, and alignment) can be created using the Emacs table
866package by Takaaki Ota (@uref{http://sourceforge.net/projects/table}).
867When @key{TAB} or @kbd{C-c C-c} is pressed in such a table, Org-mode
868will call @command{table-recognize-table} and move the cursor into the
869table. Inside a table, the keymap of Org-mode is inactive. In order
870to execute org-related commands, leave the table.
871
872@table @kbd
873@kindex C-c #
874@item C-c #
875Insert a table.el table. If there is already a table at point, this
876command converts it between the table.el format and the Org-mode
877format. See the documentation string of the command
878@code{org-convert-table} for the restrictions under which this is
879possible.
880@end table
881
882@node Hyperlinks, Timestamps, Tables, Top
883@chapter Hyperlinks
884@cindex hyperlinks
885
886Just like HMTL, Org-mode provides links to other files, usenet
887articles, emails and much more.
888
889@menu
890* Links:: URL-like links to the world
891* Remember:: Org-trees store quick notes
892@end menu
893
894@node Links, Remember, Hyperlinks, Hyperlinks
895@section Links
896@cindex links
897@cindex GNUS links
898@cindex BBDB links
899@cindex VM links
900@cindex RMAIL links
901@cindex WANDERLUST links
902@cindex USENET links
903@cindex SHELL links
904
905Org-mode supports links to files, websites, usenet and email messages;
906and BBDB database entries. Links are just plain-text URL-like locators.
907The following list shows examples for each link type.
908
909@example
910http://www.astro.uva.nl/~dominik @r{on the web}
911file:/home/dominik/images/jupiter.jpg @r{file, absolute path}
912file:papers/last.pdf @r{file, relative path}
913file:~/code/main.c:255 @r{file, with line number}
914news:comp.emacs @r{Usenet link}
915mailto:adent@@galaxy.net @r{Mail link}
916vm:folder @r{VM folder link}
917vm:folder#id @r{VM message link}
918vm://myself@@some.where.org/folder#id @r{VM on remote machine}
919wl:folder @r{WANDERLUST folder link}
920wl:folder#id @r{WANDERLUST message link}
921rmail:folder @r{RMAIL folder link}
922rmail:folder#id @r{RMAIL message link}
923gnus:group @r{GNUS group link}
924gnus:group#id @r{GNUS article link}
925bbdb:Richard Stallman @r{BBDB link}
926shell:ls *.org @r{A shell command}
927@end example
928
929A link may contain space characters and is terminated by the end of
930the line. Therefore, there can be only one link per line (but see the
931variable @code{org-allow-space-in-links}).
932
933@cindex storing links
934@table @kbd
935@kindex C-c l
936@item C-c l
937Store a link to the current location. This is a @emph{global} command
938which can be used in any buffer to create a link. The link will be
939stored for later insertion into an Org-mode buffer (see below). For VM,
940RMAIL, WANDERLUST, GNUS and BBDB buffers, the link will point to the
941current article/entry. For W3 and W3M buffer, the link goes to the
942current URL. For any other files, the link will just point to the file.
943The key binding @kbd{C-c l} is only a suggestion - see
944@ref{Installation}.
945
946@kindex C-c C-l
947@item C-c C-l
948Insert a link. This prompts for a link to be inserted into the
949buffer. You can just type a link, using one of the link type prefixes
950mentioned in the examples above. Through completion, all links stored
951during the current session can be accessed. When called with prefix
952arg, you can use file name completion to enter a file link. Note that
953you don't have to use this command to insert a link. Links in
954Org-mode are plain text, and you can type or paste them straight into
955the buffer.
956
957@cindex inserting links
958@kindex C-c C-o
959@item C-c C-o
960Open link at point. This will launch a web browser for URLs (using
961@command{browse-url-at-point}), run vm/gnus/bbdb for the corresponding
962links, execute the command in a shell link, visit text files with
963Emacs and select a suitable application for non-text files.
964Classification of files is based on file extension only. See option
965@code{org-file-apps}. If there is no link at point, the current
966subtree will be searched for one. If you want to override the default
967application and visit the file with Emacs, use a @kbd{C-u} prefix.
968If the cursor is on a time stamp, compiles the agenda for that date.
969
970@strong{IMPORTANT}: Be careful not to use any dangerous commands in a
971shell link.
972
973@kindex mouse-2
974@item mouse-2
975On links, @kbd{mouse-2} will open the link just like @kbd{C-c C-o} would.
976
977@kindex mouse-3
978@item mouse-3
979Like @kbd{mouse-2}, but force file links to be opened with Emacs.
980@end table
981
982@node Remember, , Links, Hyperlinks
983@section Remember
984@cindex @file{remember.el}
985
986Another way to create org entries with links to other files is through
987the @emph{Remember} package by John Wiegley. @emph{Remember} lets you
988store quick notes with little interruption of your work flow. See
989@uref{http://www.emacswiki.org/cgi-bin/wiki/RememberMode} for more
990information. The notes produced by @emph{Remember} can be stored in
991different ways, and Org-mode files are a good target.
992Org-mode allows to file away notes either to a default file, or
993directly to the correct location in your Org-mode outline tree. The
994following customization will tell @emph{Remember} to use org files as
995target, and to create annotations compatible with Org-mode links.
996
997
998@c FIXME: The autoload will not be necessary when Org-mode is part of Emacs
999@example
1000(autoload 'org-remember-annotation "org")
1001(autoload 'org-remember-handler "org")
1002(setq org-directory "~/path/to/my/orgfiles/")
1003(setq org-default-notes-file "~/.notes")
1004(setq remember-annotation-functions '(org-remember-annotation))
1005(setq remember-handler-functions '(org-remember-handler))
1006@end example
1007
1008When you compose a note with remember, you have to press @kbd{C-c C-c}
1009to exit remember-mode and to file away the note. The handler first
1010prompts for a target file - if you press @key{RET}, the value of
1011@code{org-default-notes-file} is used. Then the command offers the
1012headings tree of the selected file. You can either immediately press
1013@key{RET} to get the note appended to the file. Or you can use
1014vertical cursor motion (@key{up} and @key{down}) and visibility
1015cycling (@key{TAB}) to find a better place. Pressing @key{RET} or
1016@key{left} or @key{right} leads to the following result.
1017
1018@multitable @columnfractions 0.2 0.1 0.7
1019@item @b{Cursor position} @tab @b{Key} @tab @b{Note gets inserted}
1020@item buffer-start @tab @key{RET} @tab as level 2 heading at end of file
1021@item on headline @tab @key{RET} @tab as sublevel of the heading at cursor
1022@item @tab @key{left} @tab as same level, before current heading
1023@item @tab @key{right} @tab as same level, after current heading
1024@item not on headline @tab @key{RET}
1025 @tab at cursor position, level taken from context.
1026 Or use prefix arg to specify level manually.
1027@end multitable
1028
1029So the fastest way to store the note is to press @kbd{C-c C-c @key{RET}
1030@key{RET}} to append it to the default file. But with little extra
1031effort, you can push it directly to the correct location.
1032
1033Before inserting the text into a tree, the function ensures that the
1034text has a headline, i.e. a first line that starts with a @samp{*}.
1035If not, a headline is constructed from the current date and some
1036additional data. If the variable @code{org-adapt-indentation} is
1037non-nil, the entire text is also indented so that it starts in the
1038same column as the headline (after the asterixes).
1039
1040@node Timestamps, Timeline and Agenda, Hyperlinks, Top
1041@chapter Timestamps
1042
1043Items can be labeled with timestamps to make them useful for project
1044planning.
1045
1046@menu
1047* Time stamps:: Assigning a time to a tree entry
1048* Creating timestamps:: Commands which insert timestamps
1049@end menu
1050
1051
1052@node Time stamps, Creating timestamps, Timestamps, Timestamps
1053@section Time stamps, deadlines and scheduling
1054@cindex time stamps
1055@cindex deadlines
1056@cindex scheduling
1057
1058A time stamp is a specification of a date (possibly with time) in a
1059special format, either @samp{<2003-09-16 Tue>} or @samp{<2003-09-16
1060Tue 09:39>}. A time stamp can appear anywhere in the headline or body
1061of an org-tree entry. Its presence allows to show entries on specific
1062dates in the agenda (@pxref{Agenda (multiple files)}). We distinguish:
1063
1064@table @var
1065@cindex timestamp
1066@item TIMESTAMP
1067A simple time stamp just assigns a date/time to an item. In the
1068timeline and agenda displays, the headline of the entry will be shown
1069exactly on that date.
1070
1071@item TIMERANGE
1072@cindex timerange
1073Two time stamps connected by @samp{--} denote a time range. The
1074headline will be shown on the first and last day of the range, and on
1075any dates that are displayed and fall in the range. Here is an
1076example:
1077
1078@example
1079** Meeting in Amsterdam
1080 <2004-08-23 Mon>--<2004-08-26 Thu>
1081@end example
1082
1083@item DEADLINE
1084@cindex deadline
1085If a time stamp is preceded by the word @samp{DEADLINE:}, the task
1086(most likely a TODO item) is supposed to be finished on that date, and
1087it will be listed then In addition, the compilation for the
1088@emph{current day} will carry a warning about the approaching or
1089missed deadline, starting @code{org-deadline-warning-days} before the
1090due date, and continuing until the entry is marked DONE. An example:
1091
1092@example
1093*** TODO write article about the Earth for the Guide
1094 The editor in charge is bbdb:Ford Prefect
1095 DEADLINE: <2004-02-29 Sun>
1096@end example
1097
1098@item SCHEDULED
1099@cindex scheduled
1100If a time stamp is preceded by the word @samp{SCHEDULED:}, it means
1101you are planning to start working on that task on the given date. The
1102headline will be listed under the given date. In addition, a reminder
1103that the scheduled date has passed will be present in the compilation
1104for the @emph{current day}, until the entry is marked DONE. I.e., the
1105task will automatically be forwarded.
1106@end table
1107
1108@node Creating timestamps, , Time stamps, Timestamps
1109@section Creating timestamps
1110@cindex creating timestamps
1111
1112For Org-mode to recognize time stamps, they need to be in the specific
1113format. All commands listed below produce time stamps in the correct
1114format.
1115
1116@table @kbd
1117@kindex C-c .
1118@item C-c .
1119Prompt for a date and insert a corresponding time stamp. When the
1120cursor is at a previously used time stamp, it is updated to NOW. When
1121this command is used twice in succession, a time range is inserted.
1122
1123@kindex C-u C-c .
1124@item C-u C-c .
1125Like @kbd{C-c .}, but use the alternative format which contains date
1126and time.
1127
1128@kindex C-c <
1129@item C-c <
1130Insert a time stamp corresponding to the cursor date in the Calendar.
1131
1132@kindex C-c >
1133@item C-c >
1134Access the Emacs calendar for the current date. If there is a
1135timestamp in the current line, goto the corresponding date
1136instead.
1137
1138@kindex C-c C-o
1139@item C-c C-o
1140Access the agenda for the date given by the time stamp at point
1141(@pxref{Agenda (multiple files)}).
1142
1143@kindex C-c C-d
1144@item C-c C-d
1145Insert @samp{DEADLINE} keyword along with a stamp.
1146@kindex C-c C-w
1147@cindex sparse tree, for deadlines
1148@item C-c C-w
1149Create a sparse tree with all deadlines that are either past-due, or
1150which will become due within @code{org-deadline-warning-days}.
1151With @kbd{C-u} prefix, show all deadlines in the file. With a numeric
1152prefix, check that many days. For example, @kbd{C-1 C-c C-w} shows
1153all deadlines due tomorrow.
1154
1155@kindex C-c C-s
1156@item C-c C-s
1157Insert @samp{SCHEDULED} keyword along with a stamp.
1158
1159@kindex S-@key{left}
1160@kindex S-@key{right}
1161@item S-@key{left}
1162@itemx S-@key{right}
1163Change date at cursor by one day.
1164
1165@kindex S-@key{up}
1166@kindex S-@key{down}
1167@item S-@key{up}
1168@itemx S-@key{down}
1169Change the item under the cursor in a timestamp. The cursor can be on
1170a year, month, day, hour or minute. Note that if the cursor is not at
1171a time stamp, these same keys modify the priority of an item
1172(@pxref{Priorities}).
1173
1174@kindex C-c C-y
1175@cindex evaluate time range
1176@item C-c C-y
1177Evaluate a time range by computing the difference between start and
1178end. With prefix arg, insert result after the time range (in a table:
1179into the following column).
1180@end table
1181
1182@cindex date, reading in minibuffer
1183@cindex time, reading in minibuffer
1184@cindex calendar, for selecting date
1185When org prompts for a date/time, the function reading your input will
1186replace anything you choose not to specify with the current date and
1187time. For details, see the documentation string of
1188@command{org-read-date}. Also, a calender will pop up to allow
1189selecting a date. The calendar can be fully controlled from the
1190minibuffer, and a date can be selected with the following commands:
1191
1192@table @kbd
1193@kindex <
1194@item <
1195Scroll calendar backwards by one month.
1196@kindex >
1197@item >
1198Scroll calendar forwards by one month.
1199@kindex mouse-1
1200@item mouse-1
1201Select date by clicking on it.
1202@kindex S-@key{right}
1203@item S-@key{right}
1204One day forward.
1205@kindex S-@key{left}
1206@item S-@key{left}
1207One day back.
1208@kindex S-@key{down}
1209@item S-@key{down}
1210One week forward.
1211@kindex S-@key{up}
1212@item S-@key{up}
1213One week back.
1214@kindex M-S-@key{right}
1215@item M-S-@key{right}
1216One month forward.
1217@kindex M-S-@key{left}
1218@item M-S-@key{left}
1219One month back.
1220@kindex @key{RET}
1221@item @key{RET}
1222Choose date in calendar (only if nothing typed into minibuffer).
1223@end table
1224
1225@node Timeline and Agenda, Exporting, Timestamps, Top
1226@chapter Timeline and Agenda
1227@cindex agenda
1228
1229We have already described three commands to filter important
1230information in an org file into a sparse tree (@pxref{Sparse trees}):
1231
1232@cindex sparse trees
1233@itemize @bullet
1234@item
1235The TODO tree, (@kbd{C-c C-v}), see @ref{TODO items}.
1236@item
1237The occur tree @kbd{C-c /}, see @ref{TODO items}.
1238@item
1239Checking upcoming deadlines with @kbd{C-c C-w}, see @ref{Creating
1240timestamps}.
1241@end itemize
1242@noindent
1243
1244Instead of using the sparse trees, Org-mode can also collect and
1245time-sort the important items into a separate buffer, which we call
1246the @emph{timeline} of the org file. It can also collect information
1247from a @emph{list of files} and in this way provide an @emph{agenda}
1248which covers all of your current projects, action items and
1249appointments.
1250
1251@menu
1252* Timeline (single file):: Time-sorted view for single file
1253* Agenda (multiple files):: Your weekly planner
1254* Agenda commands:: Remote editing of org trees
1255* Calendar/Diary integration:: Integrating Anniversaries and more
1256@end menu
1257
1258@node Timeline (single file), Agenda (multiple files), Timeline and Agenda, Timeline and Agenda
1259@section Timeline for a single file
1260@cindex single file summary
1261@cindex agenda, for single file
1262@cindex timeline, single file
1263@cindex time-sorted view
1264
1265The timeline shows all time-stamped items in a single Org-mode file,
1266in @emph{time-sorted view}. The main purpose of this command is to
1267give an overview over events in a project.
1268
1269@table @kbd
1270@kindex C-c C-r
1271@item C-c C-r
1272Show a time-sorted view of the org file, with all time-stamped items
1273of today or later. When called with a @kbd{C-u} prefix, past dates
1274will be included as well. When called with two @kbd{C-u C-u}
1275prefixes, all unfinished TODO entries (scheduled or not) are also
1276listed under the current date.
1277@end table
1278@noindent
1279
1280The timeline is shown in a temporary buffer @file{*Org Agenda*}. The
1281commands available in the Agenda buffer are listed in @ref{Agenda
1282commands}.
1283
1284@node Agenda (multiple files), Agenda commands, Timeline (single file), Timeline and Agenda
1285@section Agenda from multiple files
1286@cindex agenda, from multiple files
1287
1288An agenda can be compiled from one or more org files. The main
1289purpose of this command is to act like a planner, in order to show you
1290what tasks are up for the current week, similar to a paper agenda.
1291
1292The Org-mode files to be processed in order to generate the agenda are
1293listed in the variable @code{org-agenda-files}. You can customize
1294this variable, but the easiest way to maintain it is through the
1295following commands
1296
1297@cindex files, adding to agenda list
1298@table @kbd
1299@kindex C-c [
1300@item C-c [
1301Add current file to the list of agenda files
1302@kindex C-c ]
1303@item C-c ]
1304Remove current file from the list of agenda files.
1305@end table
1306@noindent
1307The Org menu contains the list of all files and can be used to quickly
1308visit any of them.
1309
1310The global command @command{org-agenda} compiles the agenda from all
1311listed files.
1312
1313@table @kbd
1314@cindex org-agenda, command
1315@kindex C-c a
1316@item C-c a
1317Compile an agenda for the current week from a list of org files. The
1318agenda shows the entries for each day. With a @kbd{C-u} prefix (or
1319when the variable @code{org-agenda-include-all-todo} is @code{t}), all
1320unfinished TODO items (also those without a date) are also listed at
1321the beginning of the buffer, before the first date.@*
1322The key binding @kbd{C-c a} is only a suggestion - see
1323@ref{Installation}.
1324@end table
1325
1326The commands available in the Agenda buffer are listed in
1327@ref{Agenda commands}.
1328
1329@subsection Categories
1330
1331@cindex category
1332In the agenda buffer, each entry is preceded by a @emph{category},
1333which is derived from the file name. You can also set the category of
1334a file through file variables, for example by making the first line of
1335the file look like this:
1336
1337@cindex file variables
1338@example
1339Planet Finder -*- mode: org; org-category: Cheops -*-
1340@end example
1341@noindent
1342Or, like with TODO keywords (@pxref{Per file keywords}), you can
1343insert a special line anywhere in the file:
1344
1345@example
1346#+CATEGORY: Cheops
1347@end example
1348@noindent
1349The display looks best if the category is no longer than 10 characters.
1350
1351
1352@subsection Sorting of agenda items
1353@cindex sorting, of agenda items
1354@cindex priorities, of agenda items
1355The entries for each day are sorted. The default order is to first
1356collect all items containing an explicit time-of-day specification.
1357These entries will be shown at the beginning of the list, as a
1358@emph{schedule} for the day. After that, items remain grouped in
1359categories, in the sequence given by @code{org-agenda-files}. Within
1360each category, items are sorted by priority (@pxref{Priorities}).
1361
1362A time-of-day specification looks like @samp{12:45} or @samp{3pm} and
1363must appear in the headline. For example, a timestamp in a headline
1364that contains not only a date but also a time will trigger this
1365mechanism. Specifications of a time in diary entries are recognized
1366as well, so the schedule will be mixed from diary entries and Org-mode
1367files.
1368
1369The priority is a numerical quantity composed of the base priority
1370(2000 for priority @samp{A}, 1000 for @samp{B}, and 0 for @samp{C}),
1371plus additional increments for overdue scheduled or deadline items.
1372
1373Sorting can be customized using the variable
1374@code{org-agenda-sorting-strategy}.
1375
1376@node Agenda commands, Calendar/Diary integration, Agenda (multiple files), Timeline and Agenda
1377@section Commands in the agenda buffer
1378
1379Entries in the agenda buffer are linked back to the org file. You are
1380not allowed to edit the agenda buffer itself, but commands are provided
1381to edit the org-files ``remotely'' from the agenda buffer. In this
1382way, all information is stored only once, and you don't risk that your
1383agenda and note files diverge.
1384
1385Some commands can be executed with mouse clicks on agenda lines. For
1386the other commands, the cursor needs to be in the desired line. Most
1387commands are available for both timelines and the agenda. The
1388exceptions are marked.
1389
1390@table @kbd
1391@tsubheading{View/GoTo org file}
1392@kindex mouse-3
1393@kindex @key{SPC}
1394@item mouse-3
1395@itemx @key{SPC}
1396Display the original location of the item in another window.
1397
1398@kindex l
1399@item l
1400Display original location and recenter that window.
1401
1402@kindex mouse-2
1403@kindex @key{TAB}
1404@item mouse-2
1405@itemx @key{TAB}
1406Go to the original location of the item in another window.
1407
1408@kindex @key{RET}
1409@itemx @key{RET}
1410Go to the original location of the item and delete other windows.
1411
1412@kindex f
1413@item f
1414Toggle follow mode. In follow mode, as you move the cursor through
1415the agenda buffer, the other window always shows the corresponding
1416location in the org file.
1417
1418
1419@tsubheading{Change display}
1420@kindex o
1421@item o
1422Delete other windows.
1423
1424@kindex w
1425@item w
1426Toggle between weekly and daily view.
1427
1428@kindex d
1429@item d
1430Toggle the inclusion of diary entries. See @ref{Calendar/Diary integration}.
1431
1432@kindex r
1433@item r
1434Recreate the agenda buffer, for example to reflect the changes
1435after modification of the time stamps of items with S-@key{left} and
1436S-@key{right}.
1437
1438@kindex @key{right}
1439@item @key{right}
1440Display the following @code{org-agenda-ndays} days. For example, if
1441the display covers a week, switch to the following week. With prefix
1442arg, go forward that many times @code{org-agenda-ndays} days. Not
1443available in timlines.
1444
1445@kindex @key{left}
1446@item @key{left}
1447Display the previous dates. Not available in timelines.
1448
1449@kindex .
1450@item .
1451Goto today.
1452
1453@tsubheading{Remote editing}
1454
1455@item 0-9
1456Digit argument.
1457
1458@kindex t
1459@item t
1460Change the TODO state of the item, both in the agenda and in the
1461original org file.
1462
1463@kindex p
1464@item p
1465Set the priority for the current item. Org-mode prompts for the
1466priority character. If you reply with @key{SPC}, the priority cookie
1467is removed from the entry.
1468
1469@kindex P
1470@item p
1471Display weighted priority of current item.
1472
1473@kindex +
1474@item +
1475Increase the priority of the current item. The priority is changed in
1476the original buffer, but the agenda is not resorted. Use the @kbd{r}
1477key for this.
1478
1479@kindex -
1480@item -
1481Decrease the priority of the current item.
1482
1483@kindex S-@key{right}
1484@item S-@key{right}
1485Change the time stamp associated with the current line by one day into
1486the future. With prefix argument, change it by that many days. For
1487example, @kbd{3 6 5 S-@key{right}} will change it by a year. The
1488stamp is changed in the original org file, but the change is not
1489directly reflected in the agenda buffer. Use the
1490@kbd{r} key to update the buffer.
1491
1492@kindex S-@key{left}
1493@item S-@key{left}
1494Change the time stamp associated with the current line by one day
1495into the past.
1496
1497@kindex >
1498@item >
1499Change the time stamp associated with the current line to today.
1500The key @kbd{>} has been chosen, because it is the same as @kbd{S-.}
1501on my keyboard.
1502
1503@cindex diary entries, creating from agenda
1504@kindex i
1505@item i
1506Insert a new entry into the diary. Prompts for the type of entry
1507(day, weekly, monthly, yearly, anniversary, cyclic) and creates a new
1508entry in the diary, just like @kbd{i d} etc. would do in the calendar.
1509The date is taken from the cursor position.
1510
1511@tsubheading{Quit and Exit}
1512@kindex q
1513@item q
1514Quit Agenda, remove the agenda buffer.
1515
1516@kindex x
1517@cindex agenda files, removing buffers
1518@item x
1519Exit agenda, remove the agenda buffer and all buffers loaded by Emacs
1520for the compilation of the agenda. Buffers created by the user to
1521visit org files will not be removed.
1522
1523@end table
1524
1525@node Calendar/Diary integration, , Agenda commands, Timeline and Agenda
1526@section Calendar/Diary integration
1527@cindex calendar integration
1528@cindex diary integration
1529
1530Emacs contains the calendar and diary by Edward M. Reingold. The
1531calendar displays a three-month calendar with holidays from different
1532countries and cultures. The diary allows to keep track of
1533anniversaries, lunar phases, sunrise/set, recurrent appointments
1534(weekly, monthly) and more. In this way, it is quite complementary to
1535Org-mode. It can be very useful to combine output from Org-mode with
1536the diary.
1537
1538The interaction between Org-mode and diary works both ways: You can
1539list entries from the diary in the Org-mode agenda, or you can display
1540entries from the org agenda in the Emacs diary.
1541
1542@menu
1543* Diary to agenda:: Agenda incorporates the diary
1544* Agenda to diary:: Diary incorporates the agenda
1545@end menu
1546
1547@node Diary to agenda, Agenda to diary, Calendar/Diary integration, Calendar/Diary integration
1548@subsection Including the diary into the agenda
1549@cindex diary to agenda
1550
1551In order to include entries from the Emacs diary into Org-mode's
1552agenda, you only need to customize the variable
1553
1554@lisp
1555(setq org-agenda-include-diary t)
1556@end lisp
1557@noindent
1558
1559@noindent After that, everything will happen automatically.
1560
1561@node Agenda to diary, , Diary to agenda, Calendar/Diary integration
1562@subsection Including the agenda into the diary
1563
1564If you prefer to use the Emacs diary as your main instrument and if
1565you wish to include the Org-mode agenda into it, the following steps
1566are necessary: Autoload the function @command{org-diary} as shown
1567above under @ref{Installation}. You also need to use @emph{fancy
1568diary display} by setting in @file{.emacs}:
1569
1570@lisp
1571(add-hook 'diary-display-hook 'fancy-diary-display)
1572@end lisp
1573
1574Then include the following line into your @file{~/diary} file, in
1575order to get the entries from all files listed in the variable
1576@code{org-agenda-files}:
1577
1578@example
1579&%%(org-diary)
1580@end example
1581@noindent
1582You may also select specific files with
1583
1584@example
1585&%%(org-diary) ~/path/to/some/org-file.org
1586&%%(org-diary) ~/path/to/another/org-file.org
1587@end example
1588
1589If you now launch the calendar and press @kbd{d} to display a diary,
1590the headlines of entries containing a timestamp, date range, schedule,
1591or deadline referring to the selected date will be listed. Just like
1592in Org-mode's agenda view, the diary for @emph{today} contains
1593additional entries for overdue deadlines and scheduled items. See
1594also the documentation of the @command{org-diary} function.
1595
1596@node Exporting, Miscellaneous, Timeline and Agenda, Top
1597@chapter Exporting
1598@cindex exporting
1599@cindex ASCII file
1600@cindex HTML
1601
1602
1603@cindex headline levels, for exporting
1604For printing and sharing of notes, an Org-mode document can be
1605exported as an ASCII file, or as HTML. In the exported version, the
1606first 3 outline levels will become headlines, defining a general
1607document structure. Additional levels will be exported as itemize
1608lists. If you want that transition to occur at a different level,
1609specify it with a prefix argument. For example,
1610
1611@example
1612@kbd{M-1 M-x org-export-as-html}
1613@end example
1614@noindent
1615creates only top level headlines and does the rest as items.
1616
1617@menu
1618* Export commands:: Commands which export and display
1619* HTML formatting:: Interpretation of the buffer content
1620* Export options:: How to influence exports
1621* Comment lines:: Lines which will not be exported
1622@end menu
1623
1624@node Export commands, HTML formatting, Exporting, Exporting
1625@section Export commands
1626
1627@cindex region, active
1628@cindex active region
1629@cindex transient-mark-mode
1630@table @kbd
1631@kindex C-c C-x a
1632@item C-c C-x a
1633Export as ASCII file. If there is an active region, only the region
1634will be exported. For an org file @file{myfile.org}, the ASCII file
1635will be @file{myfile.txt}. The file will be overwritten without
1636warning.
1637@kindex C-c C-x h
1638@item C-c C-x h
1639Export as HTML file @file{myfile.html}.
1640@kindex C-c C-x C-h
1641@item C-c C-x C-h
1642Export as HTML file and open it with a browser.
1643@kindex C-c C-x t
1644@item C-c C-x t
1645Insert template with export options, see below.
1646@kindex C-c :
1647@item C-c :
1648Toggle fixed-width for line or region, see below.
1649@end table
1650
1651@node HTML formatting, Export options, Export commands, Exporting
1652@section HTML formatting
1653
1654Not all text is transferred literally to the exported HTML file. The
1655exporter implements the following interpretation:
1656
1657@itemize @bullet
1658@cindex underlined text
1659@cindex bold text
1660@cindex italic text
1661@item
1662You can make words @b{*bold*}, @i{/italic/}, and _underlined_
1663
1664@cindex @TeX{} interpretation
1665@item
1666Simple @TeX{}-like math constructs are interpreted:
1667
1668@itemize @minus
1669@item
1670@samp{10^22} and @samp{J_n} are super- and subscripts. You can quote
1671@samp{^} and @samp{_} with a backslash: @samp{\_} and @samp{\^}
1672@item
1673@samp{\alpha} indicates a Greek letter, @samp{\to} an arrow. You can
1674use completion for these macros, just type @samp{\} and maybe a few
1675letters, and press @kbd{M-@key{TAB}} to see possible completions.
1676@end itemize
1677
1678@cindex tables, export to HTML
1679@item
1680Tables are transformed into HTML tables.
1681
1682@cindex fixed width
1683@item
1684Lines starting with @samp{:} are typeset in a fixed-width font, to
1685allow quoting of computer code etc.
1686
1687@cindex HTML tags
1688@item
1689If you want to include HTML tags which should be interpreted as such,
1690mark them with a @samp{@@} like in @samp{@@<b>bold text@@</b>}.
1691Plain @samp{<} and @samp{>} are always transformed to @samp{&lt;} and
1692@samp{&gt;} in HTML export.
1693@end itemize
1694
1695If these conversions conflict with your habits of typing ASCII text,
1696they can all be turned off with corresponding variables.
1697
1698@node Export options, Comment lines, HTML formatting, Exporting
1699@section Export options
1700@cindex options, for export
1701
1702The exporter recognizes special lines in the buffer which provide
1703additional information. These lines may be put anywhere in the file.
1704The whole set of lines can be inserted into the buffer with @kbd{C-c
1705C-x t}. For individual lines, a good way to make sure the keyword is
1706correct it to type @samp{#+} and then use @kbd{M-@key{TAB}} completion
1707(@pxref{Completion}).
1708
1709@example
1710#+TITLE: the title to be shown (default is the buffer name)
1711#+AUTHOR: the author (default taken from @code{user-full-name})
1712#+EMAIL: his/her email address (default from @code{user-mail-address})
1713#+LANGUAGE: language for HTML, e.g. @samp{en} (@code{org-export-default-language})
1714#+TEXT: Some descriptive text to be inserted at the beginning.
1715#+TEXT: Several lines may be given.
1716#+OPTIONS: H:2 num:t toc:t \n:nil @:t ::t |:t ^:t *:nil TeX:t
1717@end example
1718@noindent
1719The OPTIONS line is a compact form to specify export settings. Here
1720you can
1721@cindex headline levels
1722@cindex section-numbers
1723@cindex table of contents
1724@cindex linebreak-preservation
1725@cindex quoted html tags
1726@cindex fixed-width sections
1727@cindex tables
1728@cindex @TeX{}-like syntax for sub- and superscripts
1729@cindex emphasized text
1730@cindex @TeX{} macros
1731@example
1732H: @r{set the number of headline levels for export}
1733num: @r{turn on/off section-numbers}
1734toc: @r{turn on/off table of contents}
1735\n: @r{turn on/off linebreak-preservation}
1736@@: @r{turn on/off quoted html tags}
1737:: @r{turn on/off fixed-width sections}
1738|: @r{turn on/off tables}
1739^: @r{turn on/off @TeX{}-like syntax for sub- and superscripts.}
1740*: @r{turn on/off emphasized text (bold, italic, underlined)}
1741TeX: @r{turn on/off @TeX{} macros}
1742@end example
1743
1744@node Comment lines, , Export options, Exporting
1745@section Comment lines
1746@cindex comment lines
1747@cindex exporting, not
1748
1749Lines starting with @samp{#} in column zero are treated as comments
1750and will never be exported. Also entire subtrees starting with the
1751word @samp{COMMENT} will never be exported. Finally, any text before
1752the first headline will not be exported either.
1753
1754@table @kbd
1755@kindex C-c ;
1756@item C-c ;
1757Toggle the COMMENT keyword at the beginning of an entry.
1758@end table
1759
1760@node Miscellaneous, Index, Exporting, Top
1761@chapter Miscellaneous
1762
1763@menu
1764* Completion:: M-TAB knows what you need
1765* Customization:: Adapting Org-mode to your taste
1766* Tips and Tricks:: An author-imposed FAQ, sort of
1767* Interaction:: Other Emacs packages
1768* Acknowledgments:: These people provided feedback and more
1769* Bugs:: Things which do not work perfectly
1770@end menu
1771
1772@node Completion, Customization, Miscellaneous, Miscellaneous
1773@section Completion
1774@cindex complete @TeX{} symbols
1775@cindex complete TODO keywords
1776@cindex complete dictionary words
1777@cindex complete option keywords
1778
1779Org-mode supports in-buffer completion. This type of completion does
1780not make use of the minibuffer. You simply type a few letters into
1781the buffer and use the key to complete text right there.
1782
1783@table @kbd
1784@kindex M-@key{TAB}
1785@item M-@key{TAB}
1786Complete word at point
1787@itemize @bullet
1788@item
1789At the beginning of a headline, complete TODO keywords.
1790@item
1791After @samp{\}, complete @TeX{} symbols supported by the exporter.
1792@item
1793After @samp{#+}, complete the special keywords like @samp{TYP_TODO} or
1794@samp{OPTIONS} which set file-specific options for Org-mode. When the
1795option keyword is already complete, pressing @kbd{M-@key{TAB}} again
1796will insert example settings for this keyword.
1797@item
1798Elsewhere, complete dictionary words using ispell.
1799@end itemize
1800@end table
1801
1802@node Customization, Tips and Tricks, Completion, Miscellaneous
1803@section Customization
1804@cindex customization
1805@cindex options, for customization
1806@cindex variables, for customization
1807
1808There is a large number of variables which can be used to customize
1809Org-mode. For the sake of compactness of the manual, we are not
1810describing the variables here. For an overview of customization
1811variables, use @kbd{M-x org-customize}. Or select @code{Browse Org
1812Group} from the @code{Org->Customization} menu.
1813
1814@node Tips and Tricks, Interaction, Customization, Miscellaneous
1815@section Tips and Tricks
1816
1817@itemize @bullet
1818@cindex README files
1819@item
1820I find Org-mode very useful for the many @file{README} files I have
1821scattered through my directories. So I turn on @file{org-mode} for
1822all @file{README} files with
1823
1824@example
1825(add-to-list 'auto-mode-alist '("README$" . org-mode))
1826@end example
1827
1828@ignore
1829@cindex files, adding automatically
1830@item
1831If you would like to add all org files you ever create to the list of
1832agenda files@footnote{Think twice. Do you @emph{really} want this?},
1833you could do so with
1834
1835@lisp
1836(add-hook 'org-mode-hook 'org-add-file)
1837@end lisp
1838
1839If you would like to add only a selection, for example everything
1840except the @file{README} files, this could be achieved in the
1841following way:
1842
1843@lisp
1844(add-hook 'org-mode-hook
1845 (lambda ()
1846 (or (string-match "README\\'" (buffer-file-name))
1847 (org-add-file))))
1848@end lisp
1849@end ignore
1850
1851@cindex @code{make-indirect-buffer}
1852@cindex indirect buffers
1853@item
1854It can be useful to have two different windows showing the same
1855Org-mode file. However, a problem here is that changes to the
1856visibility in one window immediately affect the other window. On
1857Emacs (not on XEmacs because it uses the old outline-mode) a way out
1858is the use of @emph{indirect buffers}, which visit the same file, but
1859have separate settings, also for outline visibility. See the
1860documentation on the command @code{make-indirect-buffer}.
1861
1862@cindex URL, paste into buffer
1863@item
1864Paste URLs into Org-mode whenever this seems useful. For example, if
1865you are writing notes about a paper which is available on the web, put
1866the corresponding URL there and a direct look at the paper is only a
1867mouse click away. If you have a local copy of the paper, use a
1868file:path link.
1869
1870@cindex headline levels, for export
1871@item
1872If you plan to use ASCII or HTML export, make sure things you want to
1873be exported as item lists are level 4 at least, even if that does mean
1874there is a level jump. For example
1875
1876@example
1877* Todays top priorities
1878**** TODO write a letter to xyz
1879**** TODO Finish the paper
1880**** Pick up kids at the school
1881@end example
1882
1883Alternatively, if you need a specific value for the heading/item
1884transition in a particular file, use the @samp{+OPTIONS} line to
1885configure the @samp{H} switch.
1886
1887@example
1888+OPTIONS: H:2; ...
1889@end example
1890
1891@cindex exporting a subtree
1892@item
1893If you want to export a subtree, mark the subtree as region and then
1894export. Marking can be done with @kbd{C-c @@ C-x C-x}, for example.
1895
1896@cindex table, empty template
1897@item
1898To insert an empty table template, just type @samp{|-} and use
1899@key{TAB}.
1900
1901@item
1902In a table, to add a new column at the end, just type some text
1903anywhere after the final @samp{|}. Upon the next re-align, a new
1904column will be created.
1905
1906@item
1907In tables, @key{TAB} creates new rows before horizontal separator lines. If
1908the cursor is at @samp{Age} in the following table,
1909
1910@example
1911| Name | Phone | Age |
1912|-------+-------+-----|
1913| | | |
1914@end example
1915
1916the next @key{TAB} would create a second header line. If you want
1917instead to go to the first empty field below the horizontal line,
1918press @key{down} (to get on the separator line) and then @key{TAB}.
1919
1920@cindex indentation, of tables
1921@item
1922To change the indentation of a table, just change the first line and
1923realign with @key{TAB}.
1924
1925@end itemize
1926
1927
1928@node Interaction, Acknowledgments, Tips and Tricks, Miscellaneous
1929@section Interaction with other packages
1930@cindex packages, interaction with other
1931@cindex @file{planner.el}
1932@cindex @file{remember.el}
1933@cindex @file{table.el}
1934@file{Org.el} can cooperate with the following packages:
1935
1936@table @asis
1937@cindex @file{remember.el}
1938@item @file{remember.el} by John Wiegley
1939Org mode cooperates with remember, see @ref{Remember}.
1940@cindex @file{plannner.el}
1941@item @file{planner.el} by John Wiegley
1942Planner is another tool to plan work and keep track of tasks. Planner
1943uses a multi-file approach with project pages and day pages. Is based
1944on Emacs-Wiki. It can be useful to display the agenda entries
1945resulting from org files in day-pages of the planner. This can be
1946done through the diary of the calendar: Integrate org files into the
1947diary as described above, and then turn on the diary support of
1948planner.
1949@cindex @file{table.el}
1950@item @file{table.el} by Takaaki Ota
1951Org mode cooperates with table.el, see @ref{table.el}.
1952@end table
1953
1954@c EmacsWiki
1955@c organizer-mode
1956@c todo-mode
1957@c records mode
1958
1959@page @c FIXME
1960
1961@node Acknowledgments, Bugs, Interaction, Miscellaneous
1962@section Acknowledgments
1963@cindex acknowledgments
1964
1965Org-mode was written by Carsten Dominik, who still maintains it at the
1966Org-mode homepage
1967@uref{http://www.astro.uva.nl/~dominik/Tools/org/}. The following
1968people have helped the development along with ideas, suggestions and
1969patches.
1970
1971@itemize @bullet
1972@item
1973Matthias Rempe (Oelde) provided ideas and suggestions, a patch
1974introducing Windows NT/2000 support, and quality control.
1975@item
1976Kevin Rogers contributed code to access VM files on remote hosts.
1977@item
1978Juergen Vollmer contributed code generating the table of contents
1979in HTML output, and other export improvements.
1980@item
1981Christian Egli converted the documentation into TeXInfo format. He
1982also showed me his plans for a multifile summary for Org-mode. Some of
1983his ideas have found their way into the agenda.
1984@item
1985Philip Rooke created the Org-mode reference card and did some
1986beta-testing.
1987@item
1988Linking to VM/BBDB/GNUS was inspired by Tom Shannon's
1989@file{organizer-mode.el}.
1990@item
1991Scheduling TODO items was inspired by John Wiegley's @file{planner.el}.
1992@item
1993Sacha Chua, the current maintainer of Planner suggested to take some
1994linking code from Planner, which I did (for RMAIL and Wanderlust).
1995@item
1996Oliver Oppitz sent several useful suggestions.
1997@item
1998Carsten Wimmer suggested some changes and helped fix a bug in linking
1999to GNUS.
2000@end itemize
2001
2002@node Bugs, , Acknowledgments, Miscellaneous
2003@section Bugs
2004@cindex bugs
2005
2006Here is a list of things which should work differently, but which I
2007have found too hard to fix.
2008
2009@itemize @bullet
2010@item
2011When the application called by @kbd{C-c C-o} to open a file link fails
2012(for example because the application does not exits or refuses to open
2013the file), it does so silently. No error message is displayed.
2014@item
2015Under XEmacs, if Org-mode entries are included into the diary, it is
2016not possible to jump back from the diary to the org file. Apparently,
2017the text properties are lost when the fancy-diary-display is used.
2018However, from Org-mode's agenda (created with @kbd{C-c C-r} or
2019@kbd{M-x org-agenda}), things do work correctly.
2020@item
2021Linux should also have a default viewer application, using mailcap.
2022Maybe we can use GNUS or VM mime code? Or dired's guessing commands?
2023Any hints (or even patches) are appreciated.
2024@item
2025When you write @samp{x = a /b/ c}, b will be exported in italics.
2026@item
2027The exporters work well, but could be made more efficient.
2028@end itemize
2029
2030@node Index, Key Index, Miscellaneous, Top
2031@chapter Index
2032
2033@printindex cp
2034
2035@node Key Index, , Index, Top
2036@chapter Key Index
2037
2038@printindex ky
2039
2040@bye
2041
2042