aboutsummaryrefslogtreecommitdiffstats
path: root/doc
diff options
context:
space:
mode:
authorPaul Eggert2011-09-03 16:03:38 -0700
committerPaul Eggert2011-09-03 16:03:38 -0700
commitb49e353d9d01adbe60bc5d0b1658b4ef978b0b06 (patch)
tree9f2ffa6f7a6562abf661a4951012b488ad8b1ae7 /doc
parent74b880cbc18bd0194c7b1fc44c4a983ee05adae2 (diff)
parentbc3200871917d5c54c8c4299a06bf8f8ba2ea02d (diff)
downloademacs-b49e353d9d01adbe60bc5d0b1658b4ef978b0b06.tar.gz
emacs-b49e353d9d01adbe60bc5d0b1658b4ef978b0b06.zip
Merge from trunk.
Diffstat (limited to 'doc')
-rw-r--r--doc/emacs/ChangeLog64
-rw-r--r--doc/emacs/Makefile.in1
-rw-r--r--doc/emacs/buffers.texi10
-rw-r--r--doc/emacs/cal-xtra.texi8
-rw-r--r--doc/emacs/calendar.texi2
-rw-r--r--doc/emacs/custom.texi2
-rw-r--r--doc/emacs/dired.texi16
-rw-r--r--doc/emacs/display.texi91
-rw-r--r--doc/emacs/emacs.texi138
-rw-r--r--doc/emacs/files.texi181
-rw-r--r--doc/emacs/frames.texi8
-rw-r--r--doc/emacs/help.texi16
-rw-r--r--doc/emacs/makefile.w32-in1
-rw-r--r--doc/emacs/mini.texi6
-rw-r--r--doc/emacs/misc.texi588
-rw-r--r--doc/emacs/modes.texi13
-rw-r--r--doc/emacs/package.texi230
-rw-r--r--doc/emacs/picture-xtra.texi10
-rw-r--r--doc/emacs/rmail.texi2
-rw-r--r--doc/emacs/text.texi91
-rw-r--r--doc/emacs/trouble.texi2
-rw-r--r--doc/lispref/ChangeLog94
-rw-r--r--doc/lispref/debugging.texi19
-rw-r--r--doc/lispref/display.texi242
-rw-r--r--doc/lispref/elisp.texi6
-rw-r--r--doc/lispref/files.texi64
-rw-r--r--doc/lispref/frames.texi17
-rw-r--r--doc/lispref/lists.texi2
-rw-r--r--doc/lispref/modes.texi389
-rw-r--r--doc/lispref/nonascii.texi66
-rw-r--r--doc/lispref/objects.texi10
-rw-r--r--doc/lispref/os.texi104
-rw-r--r--doc/lispref/searching.texi6
-rw-r--r--doc/lispref/syntax.texi18
-rw-r--r--doc/lispref/text.texi5
-rw-r--r--doc/lispref/vol1.texi8
-rw-r--r--doc/lispref/vol2.texi8
-rw-r--r--doc/misc/ChangeLog128
-rw-r--r--doc/misc/org.texi2108
-rw-r--r--doc/misc/texinfo.tex5
-rw-r--r--doc/misc/trampver.texi2
41 files changed, 3082 insertions, 1699 deletions
diff --git a/doc/emacs/ChangeLog b/doc/emacs/ChangeLog
index 794771e24d3..2407d7dd18f 100644
--- a/doc/emacs/ChangeLog
+++ b/doc/emacs/ChangeLog
@@ -1,3 +1,67 @@
12011-08-29 Chong Yidong <cyd@stupidchicken.com>
2
3 * modes.texi (Choosing Modes): auto-mode-case-fold is now t.
4
52011-08-28 Chong Yidong <cyd@stupidchicken.com>
6
7 * files.texi (File Archives):
8 * cal-xtra.texi (Diary Display):
9 * help.texi (Help Mode): Add xref to View Mode.
10
112011-08-28 Chong Yidong <cyd@stupidchicken.com>
12
13 * display.texi (View Mode): New node. Move view-file here from
14 Misc File Ops. Move view-buffer here from Misc Buffer.
15
16 * buffers.texi (Misc Buffer): Move view-buffer to View Mode.
17
18 * files.texi (Misc File Ops): Document new
19 delete-by-moving-to-trash behavior. Remove view-file.
20
21 * dired.texi (Dired Deletion): Shorten description of Trash.
22
23 * misc.texi (emacsclient Options): Document server-port.
24
252011-08-27 Eli Zaretskii <eliz@gnu.org>
26
27 * frames.texi (Frame Commands): Advise setting focus-follows-mouse
28 even on MS-Windows. Fix a typo.
29
302011-08-26 Chong Yidong <cyd@stupidchicken.com>
31
32 * package.texi: New file, documenting the package manager.
33
34 * emacs.texi: Include it.
35
36 * help.texi (Help Summary): Add describe-package.
37
382011-08-25 Chong Yidong <cyd@stupidchicken.com>
39
40 * misc.texi (Printing): Convert subnodes into subsections.
41
42 * text.texi (Two-Column): Move into Text chapter.
43
44 * picture-xtra.texi (Picture Mode): Group with Editing Binary
45 Files section. Convert from chapter into section.
46
47 * display.texi (Narrowing): Move into display chapter.
48
49 * sending.texi (Sending Mail):
50 * rmail.texi (Rmail):
51 * misc.texi (Gnus, Document View):
52 * dired.texi (Dired):
53 * emacs.texi: Group the mail, rmail, and gnus chapters together.
54
552011-08-07 Juri Linkov <juri@jurta.org>
56
57 * dired.texi (Operating on Files): Rewrite according to the fact
58 that `dired-do-chmod' doesn't use the `chmod' program anymore.
59
602011-07-30 Michael Albinus <michael.albinus@gmx.de>
61
62 * mini.texi (Minibuffer File): Insert a reference to Tramp for
63 remote file name completion. (Bug#9197)
64
12011-07-28 Eli Zaretskii <eliz@gnu.org> 652011-07-28 Eli Zaretskii <eliz@gnu.org>
2 66
3 * mule.texi (Bidirectional Editing): Document the fact that 67 * mule.texi (Bidirectional Editing): Document the fact that
diff --git a/doc/emacs/Makefile.in b/doc/emacs/Makefile.in
index 9465c726eba..66cd7f1d92e 100644
--- a/doc/emacs/Makefile.in
+++ b/doc/emacs/Makefile.in
@@ -96,6 +96,7 @@ EMACSSOURCES= \
96 ${srcdir}/dired.texi \ 96 ${srcdir}/dired.texi \
97 ${srcdir}/calendar.texi \ 97 ${srcdir}/calendar.texi \
98 ${srcdir}/misc.texi \ 98 ${srcdir}/misc.texi \
99 ${srcdir}/package.texi \
99 ${srcdir}/custom.texi \ 100 ${srcdir}/custom.texi \
100 ${srcdir}/trouble.texi \ 101 ${srcdir}/trouble.texi \
101 ${srcdir}/cmdargs.texi \ 102 ${srcdir}/cmdargs.texi \
diff --git a/doc/emacs/buffers.texi b/doc/emacs/buffers.texi
index d4cc4f7bb6a..c4880af2b5d 100644
--- a/doc/emacs/buffers.texi
+++ b/doc/emacs/buffers.texi
@@ -285,16 +285,6 @@ buffers with particular names. (With some of these features, such as
285switch to some other buffer before using the command, in order for it 285switch to some other buffer before using the command, in order for it
286to make a different buffer.) 286to make a different buffer.)
287 287
288@findex view-buffer
289 @kbd{M-x view-buffer} is much like @kbd{M-x view-file} (@pxref{Misc
290File Ops}) except that it examines an already existing Emacs buffer.
291View mode provides commands for scrolling through the buffer
292conveniently but not for changing it. When you exit View mode with
293@kbd{q}, that switches back to the buffer (and the position) which was
294previously displayed in the window. Alternatively, if you exit View
295mode with @kbd{e}, the buffer and the value of point that resulted from
296your perusal remain in effect.
297
298 The commands @kbd{M-x append-to-buffer} and @kbd{M-x insert-buffer} 288 The commands @kbd{M-x append-to-buffer} and @kbd{M-x insert-buffer}
299can be used to copy text from one buffer to another. @xref{Accumulating 289can be used to copy text from one buffer to another. @xref{Accumulating
300Text}. 290Text}.
diff --git a/doc/emacs/cal-xtra.texi b/doc/emacs/cal-xtra.texi
index 52898efc268..6d20c92a6d9 100644
--- a/doc/emacs/cal-xtra.texi
+++ b/doc/emacs/cal-xtra.texi
@@ -538,13 +538,7 @@ are no diary entries, even if that day is a holiday. If you want such
538days to be shown in the fancy diary buffer, set the variable 538days to be shown in the fancy diary buffer, set the variable
539@code{diary-list-include-blanks} to @code{t}.@refill 539@code{diary-list-include-blanks} to @code{t}.@refill
540 540
541@c View mode does not seem to be described in the manual. 541 The fancy diary buffer enables View mode (@pxref{View Mode}).
542@c buffers.texi has a brief mention.
543 The fancy diary buffer enables View mode, a minor mode that provides
544commands for scrolling and searching the text. For example, @key{SPC}
545and @key{DEL} scroll forward and backward, and @key{s} starts an
546incremental search. See the documentation of the function
547@code{view-mode} for more information.
548 542
549 The alternative display method @code{diary-simple-display} shows the 543 The alternative display method @code{diary-simple-display} shows the
550actual diary buffer, and uses invisible text to hide entries that don't 544actual diary buffer, and uses invisible text to hide entries that don't
diff --git a/doc/emacs/calendar.texi b/doc/emacs/calendar.texi
index 9de223854c1..71a2dba7d08 100644
--- a/doc/emacs/calendar.texi
+++ b/doc/emacs/calendar.texi
@@ -2,7 +2,7 @@
2@c Copyright (C) 1985-1987, 1993-1995, 1997, 2000-2011 2@c Copyright (C) 1985-1987, 1993-1995, 1997, 2000-2011
3@c Free Software Foundation, Inc. 3@c Free Software Foundation, Inc.
4@c See file emacs.texi for copying conditions. 4@c See file emacs.texi for copying conditions.
5@node Calendar/Diary, Document View, Dired, Top 5@node Calendar/Diary
6@chapter The Calendar and the Diary 6@chapter The Calendar and the Diary
7@cindex calendar 7@cindex calendar
8@findex calendar 8@findex calendar
diff --git a/doc/emacs/custom.texi b/doc/emacs/custom.texi
index 6a6d465438d..a22d6c1f5dd 100644
--- a/doc/emacs/custom.texi
+++ b/doc/emacs/custom.texi
@@ -2,7 +2,7 @@
2@c Copyright (C) 1985-1987, 1993-1995, 1997, 2000-2011 2@c Copyright (C) 1985-1987, 1993-1995, 1997, 2000-2011
3@c Free Software Foundation, Inc. 3@c Free Software Foundation, Inc.
4@c See file emacs.texi for copying conditions. 4@c See file emacs.texi for copying conditions.
5@node Customization, Quitting, Amusements, Top 5@node Customization
6@chapter Customization 6@chapter Customization
7@cindex customization 7@cindex customization
8 8
diff --git a/doc/emacs/dired.texi b/doc/emacs/dired.texi
index 501c4152e6a..eb2bcc109e8 100644
--- a/doc/emacs/dired.texi
+++ b/doc/emacs/dired.texi
@@ -2,7 +2,7 @@
2@c Copyright (C) 1985-1987, 1993-1995, 1997, 2000-2011 2@c Copyright (C) 1985-1987, 1993-1995, 1997, 2000-2011
3@c Free Software Foundation, Inc. 3@c Free Software Foundation, Inc.
4@c See file emacs.texi for copying conditions. 4@c See file emacs.texi for copying conditions.
5@node Dired, Calendar/Diary, Rmail, Top 5@node Dired
6@chapter Dired, the Directory Editor 6@chapter Dired, the Directory Editor
7@c This node is referenced in the tutorial. When renaming or deleting 7@c This node is referenced in the tutorial. When renaming or deleting
8@c it, the tutorial needs to be adjusted. 8@c it, the tutorial needs to be adjusted.
@@ -201,12 +201,10 @@ delete nonempty directories including all their contents. That can
201be somewhat risky. 201be somewhat risky.
202 202
203@vindex delete-by-moving-to-trash 203@vindex delete-by-moving-to-trash
204 On some systems, there is a facility called the ``Trash'' or 204 If you change the variable @code{delete-by-moving-to-trash} to
205``Recycle Bin'', but Emacs does @emph{not} use it by default. Thus, 205@code{t}, the above deletion commands will move the affected files or
206when you delete a file in Dired, it is gone forever. However, you can 206directories into the operating system's Trash, instead of deleting
207tell Emacs to use the Trash for file deletion, by changing the 207them outright. @xref{Misc File Ops}.
208variable @code{delete-by-moving-to-trash} to @code{t}. @xref{Misc
209File Ops}, for more information about the Trash.
210 208
211@node Flagging Many Files 209@node Flagging Many Files
212@section Flagging Many Files at Once 210@section Flagging Many Files at Once
@@ -645,8 +643,8 @@ link.
645@cindex changing file permissions (in Dired) 643@cindex changing file permissions (in Dired)
646@item M @var{modespec} @key{RET} 644@item M @var{modespec} @key{RET}
647Change the mode (also called ``permission bits'') of the specified files 645Change the mode (also called ``permission bits'') of the specified files
648(@code{dired-do-chmod}). This uses the @code{chmod} program, so 646(@code{dired-do-chmod}). @var{modespec} can be in octal or symbolic
649@var{modespec} can be any argument that @code{chmod} can handle. 647notation like arguments handled by the @code{chmod} program.
650 648
651@findex dired-do-chgrp 649@findex dired-do-chgrp
652@kindex G @r{(Dired)} 650@kindex G @r{(Dired)}
diff --git a/doc/emacs/display.texi b/doc/emacs/display.texi
index bfbfb355c9c..09e365d9d5f 100644
--- a/doc/emacs/display.texi
+++ b/doc/emacs/display.texi
@@ -15,6 +15,9 @@ want to see, and how to display it.
15* Scrolling:: Commands to move text up and down in a window. 15* Scrolling:: Commands to move text up and down in a window.
16* Auto Scrolling:: Redisplay scrolls text automatically when needed. 16* Auto Scrolling:: Redisplay scrolls text automatically when needed.
17* Horizontal Scrolling:: Moving text left and right in a window. 17* Horizontal Scrolling:: Moving text left and right in a window.
18* Narrowing:: Restricting display and editing to a portion
19 of the buffer.
20* View Mode:: Viewing read-only buffers.
18* Follow Mode:: Follow mode lets two windows scroll as one. 21* Follow Mode:: Follow mode lets two windows scroll as one.
19* Faces:: How to change the display style using faces. 22* Faces:: How to change the display style using faces.
20* Standard Faces:: Emacs' predefined faces. 23* Standard Faces:: Emacs' predefined faces.
@@ -300,6 +303,94 @@ a lower bound for automatic horizontal scrolling. Automatic scrolling
300will continue to scroll the window, but never farther to the right 303will continue to scroll the window, but never farther to the right
301than the amount you previously set by @code{scroll-left}. 304than the amount you previously set by @code{scroll-left}.
302 305
306@node Narrowing
307@section Narrowing
308@cindex widening
309@cindex restriction
310@cindex narrowing
311@cindex accessible portion
312
313 @dfn{Narrowing} means focusing in on some portion of the buffer,
314making the rest temporarily inaccessible. The portion which you can
315still get to is called the @dfn{accessible portion}. Canceling the
316narrowing, which makes the entire buffer once again accessible, is
317called @dfn{widening}. The bounds of narrowing in effect in a buffer
318are called the buffer's @dfn{restriction}.
319
320 Narrowing can make it easier to concentrate on a single subroutine or
321paragraph by eliminating clutter. It can also be used to limit the
322range of operation of a replace command or repeating keyboard macro.
323
324@table @kbd
325@item C-x n n
326Narrow down to between point and mark (@code{narrow-to-region}).
327@item C-x n w
328Widen to make the entire buffer accessible again (@code{widen}).
329@item C-x n p
330Narrow down to the current page (@code{narrow-to-page}).
331@item C-x n d
332Narrow down to the current defun (@code{narrow-to-defun}).
333@end table
334
335 When you have narrowed down to a part of the buffer, that part appears
336to be all there is. You can't see the rest, you can't move into it
337(motion commands won't go outside the accessible part), you can't change
338it in any way. However, it is not gone, and if you save the file all
339the inaccessible text will be saved. The word @samp{Narrow} appears in
340the mode line whenever narrowing is in effect.
341
342@kindex C-x n n
343@findex narrow-to-region
344 The primary narrowing command is @kbd{C-x n n} (@code{narrow-to-region}).
345It sets the current buffer's restrictions so that the text in the current
346region remains accessible, but all text before the region or after the
347region is inaccessible. Point and mark do not change.
348
349@kindex C-x n p
350@findex narrow-to-page
351@kindex C-x n d
352@findex narrow-to-defun
353 Alternatively, use @kbd{C-x n p} (@code{narrow-to-page}) to narrow
354down to the current page. @xref{Pages}, for the definition of a page.
355@kbd{C-x n d} (@code{narrow-to-defun}) narrows down to the defun
356containing point (@pxref{Defuns}).
357
358@kindex C-x n w
359@findex widen
360 The way to cancel narrowing is to widen with @kbd{C-x n w}
361(@code{widen}). This makes all text in the buffer accessible again.
362
363 You can get information on what part of the buffer you are narrowed down
364to using the @kbd{C-x =} command. @xref{Position Info}.
365
366 Because narrowing can easily confuse users who do not understand it,
367@code{narrow-to-region} is normally a disabled command. Attempting to use
368this command asks for confirmation and gives you the option of enabling it;
369if you enable the command, confirmation will no longer be required for
370it. @xref{Disabling}.
371
372@node View Mode
373@section View Mode
374@cindex View mode
375@cindex mode, View
376
377 View mode is a minor mode that lets you scan a buffer by sequential
378screenfuls. It provides commands for scrolling through the buffer
379conveniently but not for changing it. Apart from the usual Emacs
380cursor motion commands, you can type @key{SPC} to scroll forward one
381windowful, @key{DEL} to scroll backward, and @kbd{s} to start an
382incremental search.
383
384 Typing @kbd{q} disables View mode, and switches back to the buffer
385and position before View mode was enabled. Alternatively, typing
386@kbd{e} disables View mode, keeping the current buffer and position.
387
388@findex view-buffer
389@findex view-file
390 @kbd{M-x view-buffer} prompts for an existing Emacs buffer, switches
391to it, and enables View mode. @kbd{M-x view-file} prompts for a file
392and visits it with View mode enabled.
393
303@node Follow Mode 394@node Follow Mode
304@section Follow Mode 395@section Follow Mode
305@cindex Follow mode 396@cindex Follow mode
diff --git a/doc/emacs/emacs.texi b/doc/emacs/emacs.texi
index e8fb42db0bb..2ba4af712af 100644
--- a/doc/emacs/emacs.texi
+++ b/doc/emacs/emacs.texi
@@ -187,39 +187,32 @@ Major Structures of Emacs
187Advanced Features 187Advanced Features
188* Modes:: Major and minor modes alter Emacs' basic behavior. 188* Modes:: Major and minor modes alter Emacs' basic behavior.
189* Indentation:: Editing the white space at the beginnings of lines. 189* Indentation:: Editing the white space at the beginnings of lines.
190* Text:: Commands and modes for editing English. 190* Text:: Commands and modes for editing human languages.
191* Programs:: Commands and modes for editing programs. 191* Programs:: Commands and modes for editing programs.
192* Building:: Compiling, running and debugging programs. 192* Building:: Compiling, running and debugging programs.
193* Maintaining:: Features for maintaining large programs. 193* Maintaining:: Features for maintaining large programs.
194* Abbrevs:: Defining text abbreviations to reduce 194* Abbrevs:: Defining text abbreviations to reduce
195 the number of characters you must type. 195 the number of characters you must type.
196@c AFAICS, the tex stuff generates its own index and does not use this one. 196* Dired:: Directory and file manager.
197@ifnottex 197* Calendar/Diary:: Calendar and diary facilities.
198* Picture Mode:: Editing pictures made up of characters using
199 the quarter-plane screen model.
200@end ifnottex
201* Sending Mail:: Sending mail in Emacs. 198* Sending Mail:: Sending mail in Emacs.
202* Rmail:: Reading mail in Emacs. 199* Rmail:: Reading mail in Emacs.
203* Dired:: You can "edit" a directory to manage files in it.
204* Calendar/Diary:: The calendar and diary facilities.
205* Document View:: Viewing PDF, PS and DVI files.
206* Gnus:: A flexible mail and news reader. 200* Gnus:: A flexible mail and news reader.
201* Document View:: Viewing PDF, PS and DVI files.
207* Shell:: Executing shell commands from Emacs. 202* Shell:: Executing shell commands from Emacs.
208* Emacs Server:: Using Emacs as an editing server. 203* Emacs Server:: Using Emacs as an editing server.
209* Printing:: Printing hardcopies of buffers or regions. 204* Printing:: Printing hardcopies of buffers or regions.
210* Sorting:: Sorting lines, paragraphs or pages within Emacs. 205* Sorting:: Sorting lines, paragraphs or pages within Emacs.
211* Narrowing:: Restricting display and editing to a portion 206@ifnottex
212 of the buffer. 207* Picture Mode:: Editing pictures made up of text characters.
213* Two-Column:: Splitting apart columns to edit them 208@end ifnottex
214 in side-by-side windows. 209* Editing Binary Files:: Editing binary files with Hexl mode.
215* Editing Binary Files::Using Hexl mode to edit binary files.
216* Saving Emacs Sessions:: Saving Emacs state from one session to the next. 210* Saving Emacs Sessions:: Saving Emacs state from one session to the next.
217* Recursive Edit:: A command can allow you to do editing 211* Recursive Edit:: Performing edits while "within another command".
218 "within the command". This is called a
219 "recursive editing level".
220* Emulation:: Emulating some other editors with Emacs. 212* Emulation:: Emulating some other editors with Emacs.
221* Hyperlinking:: Following links in buffers. 213* Hyperlinking:: Following links in buffers.
222* Amusements:: Various games and hacks. 214* Amusements:: Various games and hacks.
215* Packages:: Installing additional features.
223* Customization:: Modifying the behavior of Emacs. 216* Customization:: Modifying the behavior of Emacs.
224 217
225Recovery from Problems 218Recovery from Problems
@@ -350,6 +343,9 @@ Controlling the Display
350* Scrolling:: Commands to move text up and down in a window. 343* Scrolling:: Commands to move text up and down in a window.
351* Auto Scrolling:: Redisplay scrolls text automatically when needed. 344* Auto Scrolling:: Redisplay scrolls text automatically when needed.
352* Horizontal Scrolling:: Moving text left and right in a window. 345* Horizontal Scrolling:: Moving text left and right in a window.
346* Narrowing:: Restricting display and editing to a portion
347 of the buffer.
348* View Mode:: Viewing read-only buffers.
353* Follow Mode:: Follow mode lets two windows scroll as one. 349* Follow Mode:: Follow mode lets two windows scroll as one.
354* Faces:: How to change the display style using faces. 350* Faces:: How to change the display style using faces.
355* Standard Faces:: Emacs' predefined faces. 351* Standard Faces:: Emacs' predefined faces.
@@ -577,6 +573,7 @@ Commands for Human Languages
577* Nroff Mode:: Editing input to the formatter nroff. 573* Nroff Mode:: Editing input to the formatter nroff.
578* Formatted Text:: Editing formatted text directly in WYSIWYG fashion. 574* Formatted Text:: Editing formatted text directly in WYSIWYG fashion.
579* Text Based Tables:: Editing text-based tables in WYSIWYG fashion. 575* Text Based Tables:: Editing text-based tables in WYSIWYG fashion.
576* Two-Column:: Splitting text columns into separate windows.
580 577
581Filling Text 578Filling Text
582 579
@@ -885,52 +882,6 @@ Editing Pictures
885* Rectangles in Picture:: Clearing and superimposing rectangles. 882* Rectangles in Picture:: Clearing and superimposing rectangles.
886@end ifnottex 883@end ifnottex
887 884
888Sending Mail
889
890* Mail Format:: Format of the mail being composed.
891* Mail Headers:: Details of some standard mail header fields.
892* Mail Aliases:: Abbreviating and grouping mail addresses.
893* Mail Commands:: Special commands for editing mail being composed.
894* Mail Signature:: Adding a signature to every message.
895* Mail Amusements:: Distracting the NSA; adding fortune messages.
896* Mail Methods:: Using alternative mail-composition methods.
897
898Mail Commands
899
900* Mail Sending:: Commands to send the message.
901* Header Editing:: Commands to move to header fields and edit them.
902* Citing Mail:: Quoting a message you are replying to.
903* Mail Misc:: Attachments, spell checking, etc.
904
905Reading Mail with Rmail
906
907* Rmail Basics:: Basic concepts of Rmail, and simple use.
908* Rmail Scrolling:: Scrolling through a message.
909* Rmail Motion:: Moving to another message.
910* Rmail Deletion:: Deleting and expunging messages.
911* Rmail Inbox:: How mail gets into the Rmail file.
912* Rmail Files:: Using multiple Rmail files.
913* Rmail Output:: Copying message out to files.
914* Rmail Labels:: Classifying messages by labeling them.
915* Rmail Attributes:: Certain standard labels, called attributes.
916* Rmail Reply:: Sending replies to messages you are viewing.
917* Rmail Summary:: Summaries show brief info on many messages.
918* Rmail Sorting:: Sorting messages in Rmail.
919* Rmail Display:: How Rmail displays a message; customization.
920* Rmail Coding:: How Rmail handles decoding character sets.
921* Rmail Editing:: Editing message text and headers in Rmail.
922* Rmail Digest:: Extracting the messages from a digest message.
923* Rmail Rot13:: Reading messages encoded in the rot13 code.
924* Movemail:: More details of fetching new mail.
925* Remote Mailboxes:: Retrieving mail from remote mailboxes.
926* Other Mailbox Formats:: Retrieving mail from local mailboxes in
927 various formats.
928
929Summaries
930
931* Rmail Make Summary:: Making various sorts of summaries.
932* Rmail Summary Edit:: Manipulating messages from the summary.
933
934Dired, the Directory Editor 885Dired, the Directory Editor
935 886
936* Dired Enter:: How to invoke Dired. 887* Dired Enter:: How to invoke Dired.
@@ -1014,6 +965,52 @@ Document Viewing
1014* Slicing:: Specifying which part of pages should be displayed. 965* Slicing:: Specifying which part of pages should be displayed.
1015* Conversion:: Influencing and triggering conversion. 966* Conversion:: Influencing and triggering conversion.
1016 967
968Sending Mail
969
970* Mail Format:: Format of the mail being composed.
971* Mail Headers:: Details of some standard mail header fields.
972* Mail Aliases:: Abbreviating and grouping mail addresses.
973* Mail Commands:: Special commands for editing mail being composed.
974* Mail Signature:: Adding a signature to every message.
975* Mail Amusements:: Distracting the NSA; adding fortune messages.
976* Mail Methods:: Using alternative mail-composition methods.
977
978Mail Commands
979
980* Mail Sending:: Commands to send the message.
981* Header Editing:: Commands to move to header fields and edit them.
982* Citing Mail:: Quoting a message you are replying to.
983* Mail Misc:: Attachments, spell checking, etc.
984
985Reading Mail with Rmail
986
987* Rmail Basics:: Basic concepts of Rmail, and simple use.
988* Rmail Scrolling:: Scrolling through a message.
989* Rmail Motion:: Moving to another message.
990* Rmail Deletion:: Deleting and expunging messages.
991* Rmail Inbox:: How mail gets into the Rmail file.
992* Rmail Files:: Using multiple Rmail files.
993* Rmail Output:: Copying message out to files.
994* Rmail Labels:: Classifying messages by labeling them.
995* Rmail Attributes:: Certain standard labels, called attributes.
996* Rmail Reply:: Sending replies to messages you are viewing.
997* Rmail Summary:: Summaries show brief info on many messages.
998* Rmail Sorting:: Sorting messages in Rmail.
999* Rmail Display:: How Rmail displays a message; customization.
1000* Rmail Coding:: How Rmail handles decoding character sets.
1001* Rmail Editing:: Editing message text and headers in Rmail.
1002* Rmail Digest:: Extracting the messages from a digest message.
1003* Rmail Rot13:: Reading messages encoded in the rot13 code.
1004* Movemail:: More details of fetching new mail.
1005* Remote Mailboxes:: Retrieving mail from remote mailboxes.
1006* Other Mailbox Formats:: Retrieving mail from local mailboxes in
1007 various formats.
1008
1009Rmail Summaries
1010
1011* Rmail Make Summary:: Making various sorts of summaries.
1012* Rmail Summary Edit:: Manipulating messages from the summary.
1013
1017Gnus 1014Gnus
1018 1015
1019* Buffers of Gnus:: The group, summary, and article buffers. 1016* Buffers of Gnus:: The group, summary, and article buffers.
@@ -1058,6 +1055,12 @@ Hyperlinking and Navigation Features
1058* Goto Address mode:: Activating URLs. 1055* Goto Address mode:: Activating URLs.
1059* FFAP:: Finding files etc. at point. 1056* FFAP:: Finding files etc. at point.
1060 1057
1058Emacs Lisp Packages
1059
1060* Package Menu:: Buffer for viewing and managing packages.
1061* Package Installation:: Options for package installation.
1062* Package Files:: Where packages are installed.
1063
1061Customization 1064Customization
1062 1065
1063* Easy Customization:: Convenient way to browse and change settings. 1066* Easy Customization:: Convenient way to browse and change settings.
@@ -1494,16 +1497,15 @@ Lisp programming.
1494@c Includes vc1-xtra, emerge-xtra. 1497@c Includes vc1-xtra, emerge-xtra.
1495@include maintaining.texi 1498@include maintaining.texi
1496@include abbrevs.texi 1499@include abbrevs.texi
1497@ifnottex
1498@include picture-xtra.texi
1499@end ifnottex
1500@include sending.texi
1501@include rmail.texi
1502@c Includes dired-xtra. 1500@c Includes dired-xtra.
1503@include dired.texi 1501@include dired.texi
1504@c Includes cal-xtra. 1502@c Includes cal-xtra.
1505@include calendar.texi 1503@include calendar.texi
1504@include sending.texi
1505@include rmail.texi
1506@c Includes picture-xtra.texi
1506@include misc.texi 1507@include misc.texi
1508@include package.texi
1507@include custom.texi 1509@include custom.texi
1508@include trouble.texi 1510@include trouble.texi
1509 1511
diff --git a/doc/emacs/files.texi b/doc/emacs/files.texi
index 793a11e62ed..2672c30363b 100644
--- a/doc/emacs/files.texi
+++ b/doc/emacs/files.texi
@@ -1272,11 +1272,11 @@ this, it runs the program specified by
1272 The command @kbd{M-x delete-directory} prompts for a directory name 1272 The command @kbd{M-x delete-directory} prompts for a directory name
1273using the minibuffer, and deletes the directory if it is empty. If 1273using the minibuffer, and deletes the directory if it is empty. If
1274the directory is not empty, you will be asked whether you want to 1274the directory is not empty, you will be asked whether you want to
1275delete it recursively. On systems that have a ``Trash'' or ``Recycle 1275delete it recursively. On systems that have a ``Trash'' (or ``Recycle
1276Bin'' feature, you can make this command move the specified directory 1276Bin'') feature, you can make this command move the specified directory
1277to the Trash or Recycle Bin, instead of deleting it outright, by 1277to the Trash instead of deleting it outright, by changing the variable
1278changing the variable @code{delete-by-moving-to-trash} to @code{t}. 1278@code{delete-by-moving-to-trash} to @code{t}. @xref{Misc File Ops},
1279@xref{Misc File Ops}, for more information about using the Trash. 1279for more information about using the Trash.
1280 1280
1281@node Comparing Files 1281@node Comparing Files
1282@section Comparing Files 1282@section Comparing Files
@@ -1503,23 +1503,78 @@ patch syntax (@pxref{Useless Whitespace}).
1503 Emacs has commands for performing many other operations on files. 1503 Emacs has commands for performing many other operations on files.
1504All operate on one file; they do not accept wildcard file names. 1504All operate on one file; they do not accept wildcard file names.
1505 1505
1506@findex view-file 1506@findex delete-file
1507@cindex viewing 1507@cindex deletion (of files)
1508@cindex View mode 1508 @kbd{M-x delete-file} prompts for a file and deletes it. If you are
1509@cindex mode, View 1509deleting many files in one directory, it may be more convenient to use
1510 @kbd{M-x view-file} allows you to scan or read a file by sequential 1510Dired rather than @code{delete-file}. @xref{Dired Deletion}.
1511screenfuls. It reads a file name argument using the minibuffer. After 1511
1512reading the file into an Emacs buffer, @code{view-file} displays the 1512@cindex trash
1513beginning. You can then type @key{SPC} to scroll forward one windowful, 1513@cindex recycle bin
1514or @key{DEL} to scroll backward. Various other commands are provided 1514 @kbd{M-x move-file-to-trash} moves a file into the system
1515for moving around in the file, but none for changing it; type @kbd{?} 1515@dfn{Trash} (or @dfn{Recycle Bin}). This is a facility available on
1516while viewing for a list of them. They are mostly the same as normal 1516most operating systems; files that are moved into the Trash can be
1517Emacs cursor motion commands. To exit from viewing, type @kbd{q}. 1517brought back later if you change your mind.
1518The commands for viewing are defined by a special minor mode called View 1518
1519mode. 1519@vindex delete-by-moving-to-trash
1520 1520 By default, Emacs deletion commands do @emph{not} use the Trash. To
1521 A related command, @kbd{M-x view-buffer}, views a buffer already present 1521use the Trash (when it is available) for common deletion commands,
1522in Emacs. @xref{Misc Buffer}. 1522change the variable @code{delete-by-moving-to-trash} to @code{t}.
1523This affects the commands @kbd{M-x delete-file} and @kbd{M-x
1524delete-directory} (@pxref{Directories}), as well as the deletion
1525commands in Dired (@pxref{Dired Deletion}). Supplying a prefix
1526argument to @kbd{M-x delete-file} or @kbd{M-x delete-directory} makes
1527them delete outright, instead of using the Trash, regardless of
1528@code{delete-by-moving-to-trash}.
1529
1530@findex copy-file
1531@cindex copying files
1532 @kbd{M-x copy-file} reads the file @var{old} and writes a new file
1533named @var{new} with the same contents.
1534
1535@findex copy-directory
1536 @kbd{M-x copy-directory} copies directories, similar to the
1537@command{cp -r} shell command. It prompts for a directory @var{old}
1538and a destination @var{new}. If @var{new} is an existing directory,
1539it creates a copy of the @var{old} directory and puts it in @var{new}.
1540If @var{new} is not an existing directory, it copies all the contents
1541of @var{old} into a new directory named @var{new}.
1542
1543@findex rename-file
1544 @kbd{M-x rename-file} reads two file names @var{old} and @var{new}
1545using the minibuffer, then renames file @var{old} as @var{new}. If
1546the file name @var{new} already exists, you must confirm with
1547@kbd{yes} or renaming is not done; this is because renaming causes the
1548old meaning of the name @var{new} to be lost. If @var{old} and
1549@var{new} are on different file systems, the file @var{old} is copied
1550and deleted. If the argument @var{new} is just a directory name, the
1551real new name is in that directory, with the same non-directory
1552component as @var{old}. For example, @kbd{M-x rename-file RET ~/foo
1553RET /tmp RET} renames @file{~/foo} to @file{/tmp/foo}. The same rule
1554applies to all the remaining commands in this section. All of them
1555ask for confirmation when the new file name already exists, too.
1556
1557@findex add-name-to-file
1558@cindex hard links (creation)
1559 @kbd{M-x add-name-to-file} adds an additional name to an existing
1560file without removing its old name. The new name is created as a
1561``hard link'' to the existing file. The new name must belong on the
1562same file system that the file is on. On MS-Windows, this command
1563works only if the file resides in an NTFS file system. On MS-DOS, it
1564works by copying the file.
1565
1566@findex make-symbolic-link
1567@cindex symbolic links (creation)
1568 @kbd{M-x make-symbolic-link} reads two file names @var{target} and
1569@var{linkname}, then creates a symbolic link named @var{linkname},
1570which points at @var{target}. The effect is that future attempts to
1571open file @var{linkname} will refer to whatever file is named
1572@var{target} at the time the opening is done, or will get an error if
1573the name @var{target} is nonexistent at that time. This command does
1574not expand the argument @var{target}, so that it allows you to specify
1575a relative name as the target of the link. Not all systems support
1576symbolic links; on systems that don't support them, this command is
1577not defined.
1523 1578
1524@kindex C-x i 1579@kindex C-x i
1525@findex insert-file 1580@findex insert-file
@@ -1544,74 +1599,6 @@ specified file. @xref{Accumulating Text}. The variable
1544@code{write-region-inhibit-fsync} applies to these commands, as well 1599@code{write-region-inhibit-fsync} applies to these commands, as well
1545as saving files; see @ref{Customize Save}. 1600as saving files; see @ref{Customize Save}.
1546 1601
1547@findex delete-file
1548@cindex deletion (of files)
1549@vindex delete-by-moving-to-trash
1550 @kbd{M-x delete-file} deletes the specified file, like the @code{rm}
1551command in the shell. If you are deleting many files in one
1552directory, it may be more convenient to use Dired rather than
1553@code{delete-file}. @xref{Dired}.
1554
1555@cindex trash
1556@cindex recycle bin
1557 On some systems, there is a facility called the ``Trash'' (or
1558``Recycle Bin''); ``deleting'' a file normally means moving it into
1559the Trash, and you can bring the file back from the Trash if you later
1560change your mind. By default, Emacs does @emph{not} use the Trash for
1561file deletion---when Emacs deletes a file, it is gone forever. You
1562can tell Emacs to use the Trash by changing the variable
1563@code{delete-by-moving-to-trash} to @code{t}. This applies to file
1564deletion via @kbd{M-x delete-file}, as well as @kbd{M-x
1565delete-directory} (@pxref{Directories}) and file deletion in Dired
1566(@pxref{Dired Deletion}). In addition, you can explicitly move a file
1567into the Trash with the command @kbd{M-x move-file-to-trash}.
1568
1569@findex rename-file
1570 @kbd{M-x rename-file} reads two file names @var{old} and @var{new} using
1571the minibuffer, then renames file @var{old} as @var{new}. If the file name
1572@var{new} already exists, you must confirm with @kbd{yes} or renaming is not
1573done; this is because renaming causes the old meaning of the name @var{new}
1574to be lost. If @var{old} and @var{new} are on different file systems, the
1575file @var{old} is copied and deleted.
1576
1577 If the argument @var{new} is just a directory name, the real new
1578name is in that directory, with the same non-directory component as
1579@var{old}. For example, @kbd{M-x rename-file RET ~/foo RET /tmp RET}
1580renames @file{~/foo} to @file{/tmp/foo}. The same rule applies to all
1581the remaining commands in this section. All of them ask for
1582confirmation when the new file name already exists, too.
1583
1584@findex add-name-to-file
1585@cindex hard links (creation)
1586 The similar command @kbd{M-x add-name-to-file} is used to add an
1587additional name to an existing file without removing its old name.
1588The new name is created as a ``hard link'' to the existing file.
1589The new name must belong on the same file system that the file is on.
1590On MS-Windows, this command works only if the file resides in an NTFS
1591file system. On MS-DOS, it works by copying the file.
1592
1593@findex copy-file
1594@findex copy-directory
1595@cindex copying files
1596 @kbd{M-x copy-file} reads the file @var{old} and writes a new file
1597named @var{new} with the same contents. @kbd{M-x copy-directory} does
1598the same for directories, by recursive copying all files and
1599subdirectories.
1600
1601@findex make-symbolic-link
1602@cindex symbolic links (creation)
1603 @kbd{M-x make-symbolic-link} reads two file names @var{target} and
1604@var{linkname}, then creates a symbolic link named @var{linkname},
1605which points at @var{target}. The effect is that future attempts to
1606open file @var{linkname} will refer to whatever file is named
1607@var{target} at the time the opening is done, or will get an error if
1608the name @var{target} is nonexistent at that time. This command does
1609not expand the argument @var{target}, so that it allows you to specify
1610a relative name as the target of the link.
1611
1612 Not all systems support symbolic links; on systems that don't
1613support them, this command is not defined.
1614
1615@findex set-file-modes 1602@findex set-file-modes
1616@cindex file modes 1603@cindex file modes
1617@cindex file permissions 1604@cindex file permissions
@@ -1670,13 +1657,13 @@ Tar mode is used also for compressed archives---files with extensions
1670 The keys @kbd{e}, @kbd{f} and @key{RET} all extract a component file 1657 The keys @kbd{e}, @kbd{f} and @key{RET} all extract a component file
1671into its own buffer. You can edit it there, and if you save the 1658into its own buffer. You can edit it there, and if you save the
1672buffer, the edited version will replace the version in the Tar buffer. 1659buffer, the edited version will replace the version in the Tar buffer.
1673@kbd{v} extracts a file into a buffer in View mode. @kbd{o} extracts 1660@kbd{v} extracts a file into a buffer in View mode (@pxref{View
1674the file and displays it in another window, so you could edit the file 1661Mode}). @kbd{o} extracts the file and displays it in another window,
1675and operate on the archive simultaneously. @kbd{d} marks a file for 1662so you could edit the file and operate on the archive simultaneously.
1676deletion when you later use @kbd{x}, and @kbd{u} unmarks a file, as in 1663@kbd{d} marks a file for deletion when you later use @kbd{x}, and
1677Dired. @kbd{C} copies a file from the archive to disk and @kbd{R} 1664@kbd{u} unmarks a file, as in Dired. @kbd{C} copies a file from the
1678renames a file within the archive. @kbd{g} reverts the buffer from 1665archive to disk and @kbd{R} renames a file within the archive.
1679the archive on disk. 1666@kbd{g} reverts the buffer from the archive on disk.
1680 1667
1681 The keys @kbd{M}, @kbd{G}, and @kbd{O} change the file's permission 1668 The keys @kbd{M}, @kbd{G}, and @kbd{O} change the file's permission
1682bits, group, and owner, respectively. 1669bits, group, and owner, respectively.
diff --git a/doc/emacs/frames.texi b/doc/emacs/frames.texi
index b9b56670988..328deaec357 100644
--- a/doc/emacs/frames.texi
+++ b/doc/emacs/frames.texi
@@ -467,12 +467,14 @@ for Emacs to detect this automatically, so you should set the variable
467@code{focus-follows-mouse}. The default is @code{nil}, meaning you 467@code{focus-follows-mouse}. The default is @code{nil}, meaning you
468have to click on the window to select it (the default for most modern 468have to click on the window to select it (the default for most modern
469window managers). You should change it to @code{t} if your window 469window managers). You should change it to @code{t} if your window
470manager selects and window and gives it focus anytime you move the 470manager selects a window and gives it focus anytime you move the mouse
471mouse onto the window. 471onto the window.
472 472
473 The window manager that is part of MS-Windows always gives focus to 473 The window manager that is part of MS-Windows always gives focus to
474a frame that raises, so this variable has no effect in the native 474a frame that raises, so this variable has no effect in the native
475MS-Windows build of Emacs. 475MS-Windows build of Emacs. However, you may still wish to set this
476variable to @code{t} to have Emacs automatically move the mouse
477pointer to the raised frame.
476 478
477@node Fonts 479@node Fonts
478@section Fonts 480@section Fonts
diff --git a/doc/emacs/help.texi b/doc/emacs/help.texi
index 9a75bfb1887..9ff995138f5 100644
--- a/doc/emacs/help.texi
+++ b/doc/emacs/help.texi
@@ -126,16 +126,20 @@ The complete Emacs manual is available on-line in Info.
126Display the name and documentation of the command that @var{key} runs 126Display the name and documentation of the command that @var{key} runs
127(@code{describe-key}). 127(@code{describe-key}).
128@item C-h l 128@item C-h l
129Display a description of your last 300 keystrokes 129Display a description of your last 300 keystrokes
130(@code{view-lossage}). 130(@code{view-lossage}).
131@item C-h m 131@item C-h m
132Display documentation of the current major mode (@code{describe-mode}). 132Display documentation of the current major mode (@code{describe-mode}).
133@item C-h n 133@item C-h n
134Display news of recent Emacs changes (@code{view-emacs-news}). 134Display news of recent Emacs changes (@code{view-emacs-news}).
135@item C-h p 135@item C-h p
136Find packages by topic keyword (@code{finder-by-keyword}). For an 136Find packages by topic keyword (@code{finder-by-keyword}). This lists
137alternative interface to the same information, try the @code{info-finder} 137packages using a package menu buffer (@pxref{Package Menu}); for an
138command. 138alternative interface to the same information, try the
139@code{info-finder} command.
140@item C-h P @var{package} @key{RET}
141Display documentation about the package named @var{package}
142(@code{describe-package}; @pxref{Packages}).
139@item C-h r 143@item C-h r
140Display the Emacs manual in Info (@code{info-emacs-manual}). 144Display the Emacs manual in Info (@code{info-emacs-manual}).
141@item C-h s 145@item C-h s
@@ -401,8 +405,8 @@ the variable @code{apropos-documentation-sort-by-scores} is
401@node Help Mode 405@node Help Mode
402@section Help Mode Commands 406@section Help Mode Commands
403 407
404 Help buffers provide the same commands as View mode (@pxref{Misc File 408 Help buffers provide the same commands as View mode (@pxref{View
405Ops}), plus a few special commands of their own. 409Mode}), plus a few special commands of their own.
406 410
407@table @kbd 411@table @kbd
408@item @key{SPC} 412@item @key{SPC}
diff --git a/doc/emacs/makefile.w32-in b/doc/emacs/makefile.w32-in
index 4064f4ef6a3..e128a50ebd3 100644
--- a/doc/emacs/makefile.w32-in
+++ b/doc/emacs/makefile.w32-in
@@ -88,6 +88,7 @@ EMACSSOURCES= \
88 $(srcdir)/dired.texi \ 88 $(srcdir)/dired.texi \
89 $(srcdir)/calendar.texi \ 89 $(srcdir)/calendar.texi \
90 $(srcdir)/misc.texi \ 90 $(srcdir)/misc.texi \
91 $(srcdir)/package.texi \
91 $(srcdir)/custom.texi \ 92 $(srcdir)/custom.texi \
92 $(srcdir)/trouble.texi \ 93 $(srcdir)/trouble.texi \
93 $(srcdir)/cmdargs.texi \ 94 $(srcdir)/cmdargs.texi \
diff --git a/doc/emacs/mini.texi b/doc/emacs/mini.texi
index ce0d396fd0d..da1e88ab331 100644
--- a/doc/emacs/mini.texi
+++ b/doc/emacs/mini.texi
@@ -125,6 +125,10 @@ file names, change the variable @code{insert-default-directory} to
125Nonetheless, relative file name arguments are still interpreted based 125Nonetheless, relative file name arguments are still interpreted based
126on the same default directory. 126on the same default directory.
127 127
128 For rules how to read remote file names in the minibuffer, see
129@ref{Filename completion, file name completion,, tramp}, in the Tramp
130manual.
131
128@node Minibuffer Edit 132@node Minibuffer Edit
129@section Editing in the Minibuffer 133@section Editing in the Minibuffer
130 134
@@ -491,7 +495,7 @@ argument (@code{previous-history-element}).
491Move to the next item in the minibuffer history 495Move to the next item in the minibuffer history
492(@code{next-history-element}). 496(@code{next-history-element}).
493@item M-r @var{regexp} @key{RET} 497@item M-r @var{regexp} @key{RET}
494Move to an earlier item in the minibuffer history that 498Move to an earlier item in the minibuffer history that
495matches @var{regexp} (@code{previous-matching-history-element}). 499matches @var{regexp} (@code{previous-matching-history-element}).
496@item M-s @var{regexp} @key{RET} 500@item M-s @var{regexp} @key{RET}
497Move to a later item in the minibuffer history that matches 501Move to a later item in the minibuffer history that matches
diff --git a/doc/emacs/misc.texi b/doc/emacs/misc.texi
index 426610e65b9..598f495784f 100644
--- a/doc/emacs/misc.texi
+++ b/doc/emacs/misc.texi
@@ -10,9 +10,9 @@ else: viewing ``document files'', reading netnews, running shell
10commands and shell subprocesses, using a single shared Emacs for 10commands and shell subprocesses, using a single shared Emacs for
11utilities that expect to run an editor as a subprocess, printing 11utilities that expect to run an editor as a subprocess, printing
12hardcopy, sorting text, narrowing display to part of the buffer, 12hardcopy, sorting text, narrowing display to part of the buffer,
13editing double-column files and binary files, saving an Emacs session 13editing binary files, saving an Emacs session for later resumption,
14for later resumption, following hyperlinks, browsing images, emulating 14following hyperlinks, browsing images, emulating other editors, and
15other editors, and various diversions and amusements. 15various diversions and amusements.
16 16
17@end iftex 17@end iftex
18 18
@@ -20,187 +20,7 @@ other editors, and various diversions and amusements.
20@raisesections 20@raisesections
21@end ifnottex 21@end ifnottex
22 22
23@node Document View, Gnus, Calendar/Diary, Top 23@node Gnus
24@section Document Viewing
25@cindex DVI file
26@cindex PDF file
27@cindex PS file
28@cindex Postscript file
29@cindex OpenDocument file
30@cindex Microsoft Office file
31@cindex DocView mode
32@cindex mode, DocView
33@cindex document viewer (DocView)
34@findex doc-view-mode
35
36DocView mode (@code{doc-view-mode}) is a viewer for DVI, Postscript
37(PS), PDF, OpenDocument, and Microsoft Office documents. It provides
38features such as slicing, zooming, and searching inside documents. It
39works by converting the document to a set of images using the
40@command{gs} (GhostScript) command and other external tools
41@footnote{@code{gs} is a hard requirement. For DVI files,
42@code{dvipdf} or @code{dvipdfm} is needed. For OpenDocument and
43Microsoft Office documents, the @code{unoconv} tool is needed.}, and
44displaying those images.
45
46@findex doc-view-toggle-display
47@findex doc-view-toggle-display
48@cindex doc-view-minor-mode
49 When you visit a document file with the exception of Postscript
50files, Emacs automatically switches to DocView mode if possible
51@footnote{The needed external tools for this document type have to be
52available, emacs needs to run in a graphical frame, and PNG image
53support has to be compiled into emacs. If any of these requirements
54is not fulfilled, DocView falls back to an appropriate mode.}. When
55you visit a Postscript file, Emacs switches to PS mode, a major mode
56for editing Postscript files as text; however, it also enables DocView
57minor mode, so you can type @kbd{C-c C-c} to view the document with
58DocView. (PDF and DVI files, unlike Postscript files, are not usually
59human-editable.) In either case, repeating @kbd{C-c C-c}
60(@code{doc-view-toggle-display}) toggles between DocView and the file
61text.
62
63 You can explicitly toggle DocView mode with the command @code{M-x
64doc-view-mode}, and DocView minor mode with the command @code{M-x
65doc-view-minor-mode}.
66
67 When DocView mode starts, it displays a welcome screen and begins
68formatting the file, page by page. It displays the first page once
69that has been formatted.
70
71@findex doc-view-enlarge
72@findex doc-view-shrink
73@vindex doc-view-resolution
74 When in DocView mode, you can enlarge or shrink the document with
75@kbd{+} (@code{doc-view-enlarge}) and @kbd{-}
76(@code{doc-view-shrink}). To specify the default size for DocView,
77set or customize the variable @code{doc-view-resolution}.
78
79 To kill the DocView buffer, type @kbd{k}
80(@code{doc-view-kill-proc-and-buffer}). To bury it, type @kbd{q}
81(@code{quit-window}).
82
83@menu
84* Navigation:: Navigation inside DocView buffers.
85* Searching:: Searching inside documents.
86* Slicing:: Specifying which part of pages should be displayed.
87* Conversion:: Influencing and triggering conversion.
88@end menu
89
90@node Navigation
91@subsection Navigation
92
93When in DocView mode, you can scroll the current page using the usual
94Emacs movement keys: @kbd{C-p}, @kbd{C-n}, @kbd{C-b}, @kbd{C-f}, and
95the arrow keys.
96
97@vindex doc-view-continuous
98 By default, the line-motion keys @kbd{C-p} and @kbd{C-n} stop
99scrolling at the beginning and end of the current page, respectively.
100However, if you change the variable @code{doc-view-continuous} to a
101non-@code{nil} value, then @kbd{C-p} displays the previous page if you
102are already at the beginning of the current page, and @kbd{C-n}
103displays the next page if you are at the end of the current page.
104
105@findex doc-view-next-page
106@findex doc-view-previous-page
107 You can also display the next page by typing @kbd{n}, @key{next} or
108@kbd{C-x ]} (@code{doc-view-next-page}). To display the previous
109page, type @kbd{p}, @key{prior} or @kbd{C-x [}
110(@code{doc-view-previous-page}).
111
112@findex doc-view-scroll-up-or-next-page
113@findex doc-view-scroll-down-or-previous-page
114 The @key{SPC} (@code{doc-view-scroll-up-or-next-page}) key is a
115convenient way to advance through the document. It scrolls within the
116current page or advances to the next. @key{DEL} moves backwards in a
117similar way (@code{doc-view-scroll-down-or-previous-page}).
118
119@findex doc-view-first-page
120@findex doc-view-last-page
121@findex doc-view-goto-page
122 To go to the first page, type @kbd{M-<}
123(@code{doc-view-first-page}); to go to the last one, type @kbd{M->}
124(@code{doc-view-last-page}). To jump to a page by its number, type
125@kbd{M-g M-g} or @kbd{M-g g} (@code{doc-view-goto-page}).
126
127@node Searching
128@subsection Searching
129
130While in DocView mode, you can search the file's text for a regular
131expression (@pxref{Regexps}). The interface for searching is inspired
132by @code{isearch} (@pxref{Incremental Search}).
133
134@findex doc-view-search
135@findex doc-view-search-backward
136@findex doc-view-show-tooltip
137 To begin a search, type @kbd{C-s} (@code{doc-view-search}) or
138@kbd{C-r} (@code{doc-view-search-backward}). This reads a regular
139expression using a minibuffer, then echoes the number of matches found
140within the document. You can move forward and back among the matches
141by typing @kbd{C-s} and @kbd{C-r}. DocView mode has no way to show
142the match inside the page image; instead, it displays a tooltip (at
143the mouse position) listing all matching lines in the current page.
144To force display of this tooltip, type @kbd{C-t}
145(@code{doc-view-show-tooltip}).
146
147 To start a new search, use the search command with a prefix
148argument; i.e., @kbd{C-u C-s} for a forward search or @kbd{C-u C-r}
149for a backward search.
150
151@node Slicing
152@subsection Slicing
153
154Documents often have wide margins for printing. They are annoying
155when reading the document on the screen, because they use up screen
156space and can cause inconvenient scrolling.
157
158@findex doc-view-set-slice
159@findex doc-view-set-slice-using-mouse
160 With DocView you can hide these margins by selecting a @dfn{slice}
161of pages to display. A slice is a rectangle within the page area;
162once you specify a slice in DocView, it applies to whichever page you
163look at.
164
165 To specify the slice numerically, type @kbd{s s}
166(@code{doc-view-set-slice}); then enter the top left pixel position
167and the slice's width and height.
168@c ??? how does this work?
169
170 A more convenient graphical way to specify the slice is with @kbd{s
171m} (@code{doc-view-set-slice-using-mouse}), where you use the mouse to
172select the slice.
173@c ??? How does this work?
174
175@findex doc-view-reset-slice
176 To cancel the selected slice, type @kbd{s r}
177(@code{doc-view-reset-slice}). Then DocView shows the entire page
178including its entire margins.
179
180@node Conversion
181@subsection Conversion
182
183@vindex doc-view-cache-directory
184@findex doc-view-clear-cache
185For efficiency, DocView caches the images produced by @command{gs}.
186The name of this directory is given by the variable
187@code{doc-view-cache-directory}. You can clear the cache directory by
188typing @code{M-x doc-view-clear-cache}.
189
190@findex doc-view-kill-proc
191@findex doc-view-kill-proc-and-buffer
192 To force a reconversion of the currently viewed document, type
193@kbd{r} or @kbd{g} (@code{revert-buffer}). To kill the converter
194process associated with the current buffer, type @kbd{K}
195(@code{doc-view-kill-proc}). The command @kbd{k}
196(@code{doc-view-kill-proc-and-buffer}) kills the converter process and
197the DocView buffer.
198
199 The zoom commands @kbd{+} (@code{doc-view-enlarge}) and @kbd{-}
200(@code{doc-view-shrink}) need to reconvert the document at the new
201size. The current page is converted first.
202
203@node Gnus, Shell, Document View, Top
204@section Gnus 24@section Gnus
205@cindex Gnus 25@cindex Gnus
206@cindex reading netnews 26@cindex reading netnews
@@ -411,82 +231,187 @@ for @var{regexp}.
411 231
412@end table 232@end table
413 233
414@ignore 234@node Document View
415@node Where to Look 235@section Document Viewing
416@subsection Where to Look Further 236@cindex DVI file
237@cindex PDF file
238@cindex PS file
239@cindex Postscript file
240@cindex OpenDocument file
241@cindex Microsoft Office file
242@cindex DocView mode
243@cindex mode, DocView
244@cindex document viewer (DocView)
245@findex doc-view-mode
417 246
418@c Too many references to the name of the manual if done with xref in TeX! 247DocView mode (@code{doc-view-mode}) is a viewer for DVI, Postscript
419Gnus is powerful and customizable. Here are references to a few 248(PS), PDF, OpenDocument, and Microsoft Office documents. It provides
420@ifnottex 249features such as slicing, zooming, and searching inside documents. It
421additional topics: 250works by converting the document to a set of images using the
251@command{gs} (GhostScript) command and other external tools
252@footnote{@code{gs} is a hard requirement. For DVI files,
253@code{dvipdf} or @code{dvipdfm} is needed. For OpenDocument and
254Microsoft Office documents, the @code{unoconv} tool is needed.}, and
255displaying those images.
422 256
423@end ifnottex 257@findex doc-view-toggle-display
424@iftex 258@findex doc-view-toggle-display
425additional topics in @cite{The Gnus Manual}: 259@cindex doc-view-minor-mode
260 When you visit a document file with the exception of Postscript
261files, Emacs automatically switches to DocView mode if possible
262@footnote{The needed external tools for this document type have to be
263available, emacs needs to run in a graphical frame, and PNG image
264support has to be compiled into emacs. If any of these requirements
265is not fulfilled, DocView falls back to an appropriate mode.}. When
266you visit a Postscript file, Emacs switches to PS mode, a major mode
267for editing Postscript files as text; however, it also enables DocView
268minor mode, so you can type @kbd{C-c C-c} to view the document with
269DocView. (PDF and DVI files, unlike Postscript files, are not usually
270human-editable.) In either case, repeating @kbd{C-c C-c}
271(@code{doc-view-toggle-display}) toggles between DocView and the file
272text.
426 273
427@itemize @bullet 274 You can explicitly toggle DocView mode with the command @code{M-x
428@item 275doc-view-mode}, and DocView minor mode with the command @code{M-x
429Follow discussions on specific topics.@* 276doc-view-minor-mode}.
430See section ``Threading.''
431 277
432@item 278 When DocView mode starts, it displays a welcome screen and begins
433Read digests. See section ``Document Groups.'' 279formatting the file, page by page. It displays the first page once
280that has been formatted.
434 281
435@item 282@findex doc-view-enlarge
436Refer to and jump to the parent of the current article.@* 283@findex doc-view-shrink
437See section ``Finding the Parent.'' 284@vindex doc-view-resolution
285 When in DocView mode, you can enlarge or shrink the document with
286@kbd{+} (@code{doc-view-enlarge}) and @kbd{-}
287(@code{doc-view-shrink}). To specify the default size for DocView,
288set or customize the variable @code{doc-view-resolution}.
438 289
439@item 290 To kill the DocView buffer, type @kbd{k}
440Refer to articles by using Message-IDs included in the messages.@* 291(@code{doc-view-kill-proc-and-buffer}). To bury it, type @kbd{q}
441See section ``Article Keymap.'' 292(@code{quit-window}).
442 293
443@item 294@menu
444Save articles. See section ``Saving Articles.'' 295* Navigation:: Navigation inside DocView buffers.
296* Searching:: Searching inside documents.
297* Slicing:: Specifying which part of pages should be displayed.
298* Conversion:: Influencing and triggering conversion.
299@end menu
445 300
446@item 301@node Navigation
447Have Gnus score articles according to various criteria, like author 302@subsection Navigation
448name, subject, or string in the body of the articles.@*
449See section ``Scoring.''
450 303
451@item 304When in DocView mode, you can scroll the current page using the usual
452Send an article to a newsgroup.@* 305Emacs movement keys: @kbd{C-p}, @kbd{C-n}, @kbd{C-b}, @kbd{C-f}, and
453See section ``Composing Messages.'' 306the arrow keys.
454@end itemize
455@end iftex
456@ifnottex
457@itemize @bullet
458@item
459Follow discussions on specific topics.@*
460@xref{Threading, , Reading Based on Conversation Threads,
461gnus, The Gnus Manual}.
462 307
463@item 308@vindex doc-view-continuous
464Read digests. @xref{Document Groups, , , gnus, The Gnus Manual}. 309 By default, the line-motion keys @kbd{C-p} and @kbd{C-n} stop
310scrolling at the beginning and end of the current page, respectively.
311However, if you change the variable @code{doc-view-continuous} to a
312non-@code{nil} value, then @kbd{C-p} displays the previous page if you
313are already at the beginning of the current page, and @kbd{C-n}
314displays the next page if you are at the end of the current page.
465 315
466@item 316@findex doc-view-next-page
467Refer to and jump to the parent of the current article.@* 317@findex doc-view-previous-page
468@xref{Finding the Parent, , , gnus, The Gnus Manual}. 318 You can also display the next page by typing @kbd{n}, @key{next} or
319@kbd{C-x ]} (@code{doc-view-next-page}). To display the previous
320page, type @kbd{p}, @key{prior} or @kbd{C-x [}
321(@code{doc-view-previous-page}).
469 322
470@item 323@findex doc-view-scroll-up-or-next-page
471Refer to articles by using Message-IDs included in the messages.@* 324@findex doc-view-scroll-down-or-previous-page
472@xref{Article Keymap, , , gnus, The Gnus Manual}. 325 The @key{SPC} (@code{doc-view-scroll-up-or-next-page}) key is a
326convenient way to advance through the document. It scrolls within the
327current page or advances to the next. @key{DEL} moves backwards in a
328similar way (@code{doc-view-scroll-down-or-previous-page}).
473 329
474@item 330@findex doc-view-first-page
475Save articles. @xref{Saving Articles, , , gnus, The Gnus Manual}. 331@findex doc-view-last-page
332@findex doc-view-goto-page
333 To go to the first page, type @kbd{M-<}
334(@code{doc-view-first-page}); to go to the last one, type @kbd{M->}
335(@code{doc-view-last-page}). To jump to a page by its number, type
336@kbd{M-g M-g} or @kbd{M-g g} (@code{doc-view-goto-page}).
476 337
477@item 338@node Searching
478Have Gnus score articles according to various criteria, like author 339@subsection Searching
479name, subject, or string in the body of the articles.@*
480@xref{Scoring, , , gnus, The Gnus Manual}.
481 340
482@item 341While in DocView mode, you can search the file's text for a regular
483Send an article to a newsgroup.@* 342expression (@pxref{Regexps}). The interface for searching is inspired
484@xref{Composing Messages, , , gnus, The Gnus Manual}. 343by @code{isearch} (@pxref{Incremental Search}).
485@end itemize 344
486@end ifnottex 345@findex doc-view-search
487@end ignore 346@findex doc-view-search-backward
347@findex doc-view-show-tooltip
348 To begin a search, type @kbd{C-s} (@code{doc-view-search}) or
349@kbd{C-r} (@code{doc-view-search-backward}). This reads a regular
350expression using a minibuffer, then echoes the number of matches found
351within the document. You can move forward and back among the matches
352by typing @kbd{C-s} and @kbd{C-r}. DocView mode has no way to show
353the match inside the page image; instead, it displays a tooltip (at
354the mouse position) listing all matching lines in the current page.
355To force display of this tooltip, type @kbd{C-t}
356(@code{doc-view-show-tooltip}).
357
358 To start a new search, use the search command with a prefix
359argument; i.e., @kbd{C-u C-s} for a forward search or @kbd{C-u C-r}
360for a backward search.
361
362@node Slicing
363@subsection Slicing
364
365Documents often have wide margins for printing. They are annoying
366when reading the document on the screen, because they use up screen
367space and can cause inconvenient scrolling.
368
369@findex doc-view-set-slice
370@findex doc-view-set-slice-using-mouse
371 With DocView you can hide these margins by selecting a @dfn{slice}
372of pages to display. A slice is a rectangle within the page area;
373once you specify a slice in DocView, it applies to whichever page you
374look at.
375
376 To specify the slice numerically, type @kbd{s s}
377(@code{doc-view-set-slice}); then enter the top left pixel position
378and the slice's width and height.
379@c ??? how does this work?
380
381 A more convenient graphical way to specify the slice is with @kbd{s
382m} (@code{doc-view-set-slice-using-mouse}), where you use the mouse to
383select the slice.
384@c ??? How does this work?
385
386@findex doc-view-reset-slice
387 To cancel the selected slice, type @kbd{s r}
388(@code{doc-view-reset-slice}). Then DocView shows the entire page
389including its entire margins.
390
391@node Conversion
392@subsection Conversion
393
394@vindex doc-view-cache-directory
395@findex doc-view-clear-cache
396For efficiency, DocView caches the images produced by @command{gs}.
397The name of this directory is given by the variable
398@code{doc-view-cache-directory}. You can clear the cache directory by
399typing @code{M-x doc-view-clear-cache}.
488 400
489@node Shell, Emacs Server, Gnus, Top 401@findex doc-view-kill-proc
402@findex doc-view-kill-proc-and-buffer
403 To force a reconversion of the currently viewed document, type
404@kbd{r} or @kbd{g} (@code{revert-buffer}). To kill the converter
405process associated with the current buffer, type @kbd{K}
406(@code{doc-view-kill-proc}). The command @kbd{k}
407(@code{doc-view-kill-proc-and-buffer}) kills the converter process and
408the DocView buffer.
409
410 The zoom commands @kbd{+} (@code{doc-view-enlarge}) and @kbd{-}
411(@code{doc-view-shrink}) need to reconvert the document at the new
412size. The current page is converted first.
413
414@node Shell
490@section Running Shell Commands from Emacs 415@section Running Shell Commands from Emacs
491@cindex subshell 416@cindex subshell
492@cindex shell commands 417@cindex shell commands
@@ -1671,6 +1596,11 @@ runs, and (ii) provide @command{emacsclient} with the server file.
1671(One convenient way to do the latter is to put the server file on a 1596(One convenient way to do the latter is to put the server file on a
1672networked file system such as NFS.) 1597networked file system such as NFS.)
1673 1598
1599@vindex server-port
1600 When the Emacs server is using TCP, the variable @code{server-port}
1601determines the port number to listen on; the default value,
1602@code{nil}, means to choose a random port when the server starts.
1603
1674@item -n 1604@item -n
1675@itemx --no-wait 1605@itemx --no-wait
1676Let @command{emacsclient} exit immediately, instead of waiting until 1606Let @command{emacsclient} exit immediately, instead of waiting until
@@ -1788,7 +1718,7 @@ not compatible with @code{lpr}.
1788@end menu 1718@end menu
1789 1719
1790@node PostScript, PostScript Variables,, Printing 1720@node PostScript, PostScript Variables,, Printing
1791@section PostScript Hardcopy 1721@subsection PostScript Hardcopy
1792 1722
1793 These commands convert buffer contents to PostScript, 1723 These commands convert buffer contents to PostScript,
1794either printing it or leaving it in another Emacs buffer. 1724either printing it or leaving it in another Emacs buffer.
@@ -1878,7 +1808,7 @@ supports ISO 8859-1 characters.
1878@end ifnottex 1808@end ifnottex
1879 1809
1880@node PostScript Variables, Printing Package, PostScript, Printing 1810@node PostScript Variables, Printing Package, PostScript, Printing
1881@section Variables for PostScript Hardcopy 1811@subsection Variables for PostScript Hardcopy
1882 1812
1883@vindex ps-lpr-command 1813@vindex ps-lpr-command
1884@vindex ps-lpr-switches 1814@vindex ps-lpr-switches
@@ -1973,7 +1903,7 @@ includes a single directory @file{/usr/local/share/emacs/fonts/bdf}.
1973described in the Lisp files @file{ps-print.el} and @file{ps-mule.el}. 1903described in the Lisp files @file{ps-print.el} and @file{ps-mule.el}.
1974 1904
1975@node Printing Package,, PostScript Variables, Printing 1905@node Printing Package,, PostScript Variables, Printing
1976@section Printing Package 1906@subsection Printing Package
1977@cindex Printing package 1907@cindex Printing package
1978 1908
1979 The basic Emacs facilities for printing hardcopy can be extended 1909 The basic Emacs facilities for printing hardcopy can be extended
@@ -1999,7 +1929,7 @@ to print, you start the print job using the @samp{Print} button (click
1999further information on the various options, use the @samp{Interface 1929further information on the various options, use the @samp{Interface
2000Help} button. 1930Help} button.
2001 1931
2002@node Sorting, Narrowing, Printing, Top 1932@node Sorting
2003@section Sorting Text 1933@section Sorting Text
2004@cindex sorting 1934@cindex sorting
2005 1935
@@ -2134,163 +2064,13 @@ rectangle moves along with the text inside the rectangle.
2134 Many of the sort commands ignore case differences when comparing, if 2064 Many of the sort commands ignore case differences when comparing, if
2135@code{sort-fold-case} is non-@code{nil}. 2065@code{sort-fold-case} is non-@code{nil}.
2136 2066
2137@node Narrowing, Two-Column, Sorting, Top 2067@c Picture Mode documentation
2138@section Narrowing 2068@ifnottex
2139@cindex widening 2069@include picture-xtra.texi
2140@cindex restriction 2070@end ifnottex
2141@cindex narrowing
2142@cindex accessible portion
2143
2144 @dfn{Narrowing} means focusing in on some portion of the buffer,
2145making the rest temporarily inaccessible. The portion which you can
2146still get to is called the @dfn{accessible portion}. Canceling the
2147narrowing, which makes the entire buffer once again accessible, is
2148called @dfn{widening}. The bounds of narrowing in effect in a buffer
2149are called the buffer's @dfn{restriction}.
2150
2151 Narrowing can make it easier to concentrate on a single subroutine or
2152paragraph by eliminating clutter. It can also be used to limit the
2153range of operation of a replace command or repeating keyboard macro.
2154
2155@table @kbd
2156@item C-x n n
2157Narrow down to between point and mark (@code{narrow-to-region}).
2158@item C-x n w
2159Widen to make the entire buffer accessible again (@code{widen}).
2160@item C-x n p
2161Narrow down to the current page (@code{narrow-to-page}).
2162@item C-x n d
2163Narrow down to the current defun (@code{narrow-to-defun}).
2164@end table
2165
2166 When you have narrowed down to a part of the buffer, that part appears
2167to be all there is. You can't see the rest, you can't move into it
2168(motion commands won't go outside the accessible part), you can't change
2169it in any way. However, it is not gone, and if you save the file all
2170the inaccessible text will be saved. The word @samp{Narrow} appears in
2171the mode line whenever narrowing is in effect.
2172
2173@kindex C-x n n
2174@findex narrow-to-region
2175 The primary narrowing command is @kbd{C-x n n} (@code{narrow-to-region}).
2176It sets the current buffer's restrictions so that the text in the current
2177region remains accessible, but all text before the region or after the
2178region is inaccessible. Point and mark do not change.
2179
2180@kindex C-x n p
2181@findex narrow-to-page
2182@kindex C-x n d
2183@findex narrow-to-defun
2184 Alternatively, use @kbd{C-x n p} (@code{narrow-to-page}) to narrow
2185down to the current page. @xref{Pages}, for the definition of a page.
2186@kbd{C-x n d} (@code{narrow-to-defun}) narrows down to the defun
2187containing point (@pxref{Defuns}).
2188
2189@kindex C-x n w
2190@findex widen
2191 The way to cancel narrowing is to widen with @kbd{C-x n w}
2192(@code{widen}). This makes all text in the buffer accessible again.
2193
2194 You can get information on what part of the buffer you are narrowed down
2195to using the @kbd{C-x =} command. @xref{Position Info}.
2196
2197 Because narrowing can easily confuse users who do not understand it,
2198@code{narrow-to-region} is normally a disabled command. Attempting to use
2199this command asks for confirmation and gives you the option of enabling it;
2200if you enable the command, confirmation will no longer be required for
2201it. @xref{Disabling}.
2202
2203@node Two-Column, Editing Binary Files, Narrowing, Top
2204@section Two-Column Editing
2205@cindex two-column editing
2206@cindex splitting columns
2207@cindex columns, splitting
2208
2209 Two-column mode lets you conveniently edit two side-by-side columns of
2210text. It uses two side-by-side windows, each showing its own
2211buffer.
2212
2213 There are three ways to enter two-column mode:
2214 2071
2215@table @asis
2216@item @kbd{@key{F2} 2} or @kbd{C-x 6 2}
2217@kindex F2 2
2218@kindex C-x 6 2
2219@findex 2C-two-columns
2220Enter two-column mode with the current buffer on the left, and on the
2221right, a buffer whose name is based on the current buffer's name
2222(@code{2C-two-columns}). If the right-hand buffer doesn't already
2223exist, it starts out empty; the current buffer's contents are not
2224changed.
2225
2226This command is appropriate when the current buffer is empty or contains
2227just one column and you want to add another column.
2228
2229@item @kbd{@key{F2} s} or @kbd{C-x 6 s}
2230@kindex F2 s
2231@kindex C-x 6 s
2232@findex 2C-split
2233Split the current buffer, which contains two-column text, into two
2234buffers, and display them side by side (@code{2C-split}). The current
2235buffer becomes the left-hand buffer, but the text in the right-hand
2236column is moved into the right-hand buffer. The current column
2237specifies the split point. Splitting starts with the current line and
2238continues to the end of the buffer.
2239
2240This command is appropriate when you have a buffer that already contains
2241two-column text, and you wish to separate the columns temporarily.
2242
2243@item @kbd{@key{F2} b @var{buffer} @key{RET}}
2244@itemx @kbd{C-x 6 b @var{buffer} @key{RET}}
2245@kindex F2 b
2246@kindex C-x 6 b
2247@findex 2C-associate-buffer
2248Enter two-column mode using the current buffer as the left-hand buffer,
2249and using buffer @var{buffer} as the right-hand buffer
2250(@code{2C-associate-buffer}).
2251@end table
2252 2072
2253 @kbd{@key{F2} s} or @kbd{C-x 6 s} looks for a column separator, which 2073@node Editing Binary Files
2254is a string that appears on each line between the two columns. You can
2255specify the width of the separator with a numeric argument to
2256@kbd{@key{F2} s}; that many characters, before point, constitute the
2257separator string. By default, the width is 1, so the column separator
2258is the character before point.
2259
2260 When a line has the separator at the proper place, @kbd{@key{F2} s}
2261puts the text after the separator into the right-hand buffer, and
2262deletes the separator. Lines that don't have the column separator at
2263the proper place remain unsplit; they stay in the left-hand buffer, and
2264the right-hand buffer gets an empty line to correspond. (This is the
2265way to write a line that ``spans both columns while in two-column
2266mode'': write it in the left-hand buffer, and put an empty line in the
2267right-hand buffer.)
2268
2269@kindex F2 RET
2270@kindex C-x 6 RET
2271@findex 2C-newline
2272 The command @kbd{C-x 6 @key{RET}} or @kbd{@key{F2} @key{RET}}
2273(@code{2C-newline}) inserts a newline in each of the two buffers at
2274corresponding positions. This is the easiest way to add a new line to
2275the two-column text while editing it in split buffers.
2276
2277@kindex F2 1
2278@kindex C-x 6 1
2279@findex 2C-merge
2280 When you have edited both buffers as you wish, merge them with
2281@kbd{@key{F2} 1} or @kbd{C-x 6 1} (@code{2C-merge}). This copies the
2282text from the right-hand buffer as a second column in the other buffer.
2283To go back to two-column editing, use @kbd{@key{F2} s}.
2284
2285@kindex F2 d
2286@kindex C-x 6 d
2287@findex 2C-dissociate
2288 Use @kbd{@key{F2} d} or @kbd{C-x 6 d} to dissociate the two buffers,
2289leaving each as it stands (@code{2C-dissociate}). If the other buffer,
2290the one not current when you type @kbd{@key{F2} d}, is empty,
2291@kbd{@key{F2} d} kills it.
2292
2293@node Editing Binary Files, Saving Emacs Sessions, Two-Column, Top
2294@section Editing Binary Files 2074@section Editing Binary Files
2295 2075
2296@cindex Hexl mode 2076@cindex Hexl mode
@@ -2738,7 +2518,7 @@ Display a menu of files and URLs mentioned in current buffer, then
2738find the one you select (@code{ffap-menu}). 2518find the one you select (@code{ffap-menu}).
2739@end table 2519@end table
2740 2520
2741@node Amusements, Customization, Hyperlinking, Top 2521@node Amusements, Packages, Hyperlinking, Top
2742@section Other Amusements 2522@section Other Amusements
2743@cindex boredom 2523@cindex boredom
2744 2524
diff --git a/doc/emacs/modes.texi b/doc/emacs/modes.texi
index 314d5d4347e..d82423a73b4 100644
--- a/doc/emacs/modes.texi
+++ b/doc/emacs/modes.texi
@@ -353,12 +353,13 @@ the element has the form @code{(@var{regexp} @var{mode-function}
353@var{regexp} and searches the list again for another match. 353@var{regexp} and searches the list again for another match.
354 354
355@vindex auto-mode-case-fold 355@vindex auto-mode-case-fold
356 On systems with case-insensitive file names, such as Microsoft 356 On GNU/Linux and other systems with case-sensitive file names, Emacs
357Windows, Emacs performs a single case-insensitive search through 357performs a case-sensitive search through @code{auto-mode-alist}; if
358@code{auto-mode-alist}. On other systems, Emacs normally performs a 358this search fails, it performs a second case-insensitive search
359single case-sensitive search through the alist. However, if you 359through the alist. To suppress the second search, change the variable
360change the variable @code{auto-mode-case-fold} to @code{t}, Emacs 360@code{auto-mode-case-fold} to @code{nil}. On systems with
361performs a second case-insensitive search if the first search fails. 361case-insensitive file names, such as Microsoft Windows, Emacs performs
362a single case-insensitive search through @code{auto-mode-alist}.
362 363
363@vindex magic-fallback-mode-alist 364@vindex magic-fallback-mode-alist
364 Finally, if Emacs @emph{still} hasn't found a major mode to use, it 365 Finally, if Emacs @emph{still} hasn't found a major mode to use, it
diff --git a/doc/emacs/package.texi b/doc/emacs/package.texi
new file mode 100644
index 00000000000..739a8ce6c65
--- /dev/null
+++ b/doc/emacs/package.texi
@@ -0,0 +1,230 @@
1@c This is part of the Emacs manual.
2@c Copyright (C) 1985-1987, 1993-1995, 1997, 2000-2011
3@c Free Software Foundation, Inc.
4@c See file emacs.texi for copying conditions.
5@node Packages
6@chapter Emacs Lisp Packages
7@cindex Package
8@cindex Emacs Lisp package archive
9@cindex Package archive
10@cindex Emacs Lisp package
11
12Emacs includes a facility that lets you easily download and install
13@dfn{packages} that implement additional features. Each package is a
14separate Emacs Lisp program, sometimes including other components such
15as an Info manual.
16
17 @kbd{M-x list-packages} brings up a buffer named @samp{*Packages*}
18with a list of all packages. You can install or uninstall packages
19via this buffer. @xref{Package Menu}.
20
21@findex describe-package
22 The command @kbd{C-h P} (@code{describe-package}) prompts for the
23name of a package, and displays a help buffer describing that
24attributes of the package and the features that it implements.
25
26 By default, Emacs downloads packages from a @dfn{package archive}
27maintained by the Emacs developers and hosted by the GNU project.
28Optionally, you can also download packages from archives maintained by
29third parties. @xref{Package Installation}.
30
31 For information about turning an Emacs Lisp program into an
32installable package, @xref{Packaging,,,elisp, The Emacs Lisp Reference
33Manual}. For information about finding third-party packages and other
34Emacs Lisp extensions, @xref{Packages that do not come with
35Emacs,,,efaq, GNU Emacs FAQ}.
36
37@menu
38* Package Menu:: Buffer for viewing and managing packages.
39* Package Installation:: Options for package installation.
40* Package Files:: Where packages are installed.
41@end menu
42
43@node Package Menu
44@section The Package Menu Buffer
45@cindex package menu
46@cindex built-in package
47@findex list-packages
48
49The command @kbd{M-x list-packages} brings up the @dfn{package menu}.
50This is a buffer listing all the packages that Emacs knows about, one
51on each line, with the following information:
52
53@itemize @bullet
54@item
55The package name (e.g. @samp{auctex}).
56
57@item
58The package's version number (e.g. @samp{11.86}).
59
60@item
61The package's status---normally one of @samp{available} (can be
62downloaded from the package archive), @samp{installed}, or
63@samp{built-in} (included in Emacs by default).
64
65In some instances, the status can be @samp{held}, @samp{disabled}, or
66@samp{obsolete}. @xref{Package Installation}.
67
68@item
69A short description of the package.
70@end itemize
71
72@noindent
73The @code{list-packages} command accesses the network, to retrieve the
74list of available packages from the package archive server. If the
75network is unavailable, it falls back on the most recently retrieved
76list.
77
78The following commands are available in the package menu:
79
80@table @kbd
81@item h
82Print a short message summarizing how to use the package menu
83(@code{package-menu-quick-help}).
84
85@item ?
86@itemx @key{RET}
87Display a help buffer for the package on the current line
88(@code{package-menu-describe-package}), similar to the help window
89displayed by the @kbd{C-h P} command (@pxref{Packages}).
90
91@item i
92Mark the package on the current line for installation
93(@code{package-menu-mark-install}). If the package status is
94@samp{available}, this adds an @samp{I} character to the start of the
95line; typing @kbd{x} (see below) will download and install the
96package.
97
98@item d
99Mark the package on the current line for deletion
100(@code{package-menu-mark-delete}). If the package status is
101@samp{installed}, this adds a @samp{D} character to the start of the
102line; typing @kbd{x} (see below) will delete the package.
103@xref{Package Files}, for information about what package deletion
104entails.
105
106@item u
107Remove any installation or deletion mark previously added to the
108current line by an @kbd{i} or @kbd{d} command.
109
110@item x
111Download and install all packages marked with @kbd{i}, and their
112dependencies; also, delete all packages marked with @kbd{d}
113(@code{package-menu-execute}). This also removes the marks.
114
115@item r
116Refresh the package list (@code{package-menu-refresh}). This also
117retrieves the list of available packages from the package archive
118again.
119@end table
120
121@noindent
122For example, you can install a package by typing @kbd{i} on the line
123listing that package, followed by @kbd{x}.
124
125@node Package Installation
126@section Package Installation
127
128@findex package-install
129 Packages are most conveniently installed using the package menu
130(@pxref{Package Menu}), but you can also use the command @kbd{M-x
131package-install}. This prompts for the name of a package with the
132@samp{available} status, then downloads and installs it.
133
134@cindex package requirements
135 A package may @dfn{require} certain other packages to be installed,
136because it relies on functionality provided by them. When Emacs
137installs such a package, it also automatically downloads and installs
138any required package that is not already installed. (If a required
139package is somehow unavailable, Emacs signals an error and stops
140installation.) A package's requirements list is shown in its help
141buffer.
142
143@vindex package-archives
144 By default, packages are downloaded from a single package archive
145maintained by the Emacs developers. This is controlled by the
146variable @code{package-archives}, whose value is a list of package
147archives known to Emacs. Each list element must have the form
148@code{(@var{id} . @var{location})}, where @var{id} is the name of a
149package archive and @var{location} is the @acronym{HTTP} address or
150directory name of the package archive. You can alter this list if you
151wish to use third party package archives---but do so at your own risk,
152and use only third parties that you think you can trust!
153
154 Once a package is downloaded and installed, it takes effect in the
155current Emacs session. What ``taking effect'' means depends on the
156package; most packages just make some new commands available, while
157others have more wide-ranging effects on the Emacs session. For such
158information, consult the package's help buffer.
159
160 By default, Emacs also automatically loads all installed packages
161(causing them to ``take effect'') in subsequent Emacs sessions. This
162happens at startup, after processing the init file (@pxref{Init
163File}). As an exception, Emacs does not load packages at startup if
164invoked with the @samp{-q} or @samp{--no-init-file} options
165(@pxref{Initial Options}).
166
167@vindex package-enable-at-startup
168@findex package-initialize
169 To disable automatic package loading, change the variable
170@code{package-enable-at-startup} to @code{nil}. If you do this, you
171can use the command @kbd{M-x package-initialize} to load your
172packages.
173
174@vindex package-load-list
175 For finer control over package loading, you can use the variable
176@code{package-load-list}. Its value should be a list. A list element
177of the form @code{(@var{name} @var{version})} tells Emacs to load
178version @var{version} of the package named @var{name}. Here,
179@var{version} should be a version string (corresponding to a specific
180version of the package), or @code{t} (which means to load any
181installed version), or @code{nil} (which means no version; this
182``disables'' the package, preventing it from being loaded). A list
183element can also be the symbol @code{all}, which means to load the
184latest installed version of any package not named by the other list
185elements. The default value is just @code{'(all)}.
186
187 For example, if you set @code{package-load-list} to @code{'((muse
188"3.20") all)}, then Emacs only loads version 3.20 of the @samp{muse}
189package, plus any installed version of packages other than
190@samp{muse}. Any other version of @samp{muse} that happens to be
191installed will be ignored. The @samp{muse} package will be listed in
192the package menu with the @samp{held} status.
193
194@node Package Files
195@section Package Files and Directory Layout
196@cindex package directory
197
198@cindex package file
199@findex package-install-file
200 Each package is downloaded from the package archive in the form of a
201single @dfn{package file}---either an Emacs Lisp source file, or a tar
202file containing multiple Emacs Lisp source and other files. Package
203files are automatically retrieved, processed, and disposed of by the
204Emacs commands that install packages. Normally, you will not need to
205deal directly with them, unless you are making a package
206(@pxref{Packaging,,,elisp, The Emacs Lisp Reference Manual}). Should
207you ever need to install a package directly from a package file, use
208the command @kbd{M-x package-install-file}.
209
210@vindex package-user-dir
211 Once installed, the contents of a package are placed in a
212subdirectory of @file{~/.emacs.d/elpa/} (you can change the name of
213that directory by changing the variable @code{package-user-dir}). The
214package subdirectory is named @file{@var{name}-@var{version}}, where
215@var{name} is the package name and @var{version} is its version
216string.
217
218@cindex system-wide packages
219@vindex package-directory-list
220 In addition to @code{package-user-dir}, Emacs looks for installed
221packages in the directories listed in @code{package-directory-list}.
222These directories are meant for system administrators to make Emacs
223packages available system-wide; Emacs itself never installs packages
224there. The package subdirectories for @code{package-directory-list}
225are laid out in the same way as in @code{package-user-dir}.
226
227 Deleting a package (@pxref{Package Menu}) involves deleting the
228corresponding package subdirectory. This only works for packages
229installed in @code{package-user-dir}; if told to act on a package in a
230system-wide package directory, the deletion command signals an error.
diff --git a/doc/emacs/picture-xtra.texi b/doc/emacs/picture-xtra.texi
index 0dcfc7a9627..43a2dbc4704 100644
--- a/doc/emacs/picture-xtra.texi
+++ b/doc/emacs/picture-xtra.texi
@@ -5,7 +5,7 @@
5@c This file is included either in emacs-xtra.texi (when producing the 5@c This file is included either in emacs-xtra.texi (when producing the
6@c printed version) or in the main Emacs manual (for the on-line version). 6@c printed version) or in the main Emacs manual (for the on-line version).
7@node Picture Mode 7@node Picture Mode
8@chapter Editing Pictures 8@section Editing Pictures
9@cindex pictures 9@cindex pictures
10@cindex making pictures out of text characters 10@cindex making pictures out of text characters
11@findex picture-mode 11@findex picture-mode
@@ -59,7 +59,7 @@ Additional extensions to Picture mode can be found in
59@end menu 59@end menu
60 60
61@node Basic Picture 61@node Basic Picture
62@section Basic Editing in Picture Mode 62@subsection Basic Editing in Picture Mode
63 63
64@findex picture-forward-column 64@findex picture-forward-column
65@findex picture-backward-column 65@findex picture-backward-column
@@ -124,7 +124,7 @@ modes), or one of the picture rectangle commands (@pxref{Rectangles in
124Picture}). 124Picture}).
125 125
126@node Insert in Picture 126@node Insert in Picture
127@section Controlling Motion after Insert 127@subsection Controlling Motion after Insert
128 128
129@findex picture-movement-up 129@findex picture-movement-up
130@findex picture-movement-down 130@findex picture-movement-down
@@ -188,7 +188,7 @@ same direction as motion after ``insertion'' currently does, while @kbd{C-c
188C-b} (@code{picture-motion-reverse}) moves in the opposite direction. 188C-b} (@code{picture-motion-reverse}) moves in the opposite direction.
189 189
190@node Tabs in Picture 190@node Tabs in Picture
191@section Picture Mode Tabs 191@subsection Picture Mode Tabs
192 192
193@kindex M-TAB @r{(Picture mode)} 193@kindex M-TAB @r{(Picture mode)}
194@findex picture-tab-search 194@findex picture-tab-search
@@ -228,7 +228,7 @@ up the picture. You can do this by setting the variable
228@code{indent-tabs-mode} to @code{nil}. 228@code{indent-tabs-mode} to @code{nil}.
229 229
230@node Rectangles in Picture 230@node Rectangles in Picture
231@section Picture Mode Rectangle Commands 231@subsection Picture Mode Rectangle Commands
232@cindex rectangles and Picture mode 232@cindex rectangles and Picture mode
233@cindex Picture mode and rectangles 233@cindex Picture mode and rectangles
234 234
diff --git a/doc/emacs/rmail.texi b/doc/emacs/rmail.texi
index ad22ae921e0..0a9594d3798 100644
--- a/doc/emacs/rmail.texi
+++ b/doc/emacs/rmail.texi
@@ -2,7 +2,7 @@
2@c Copyright (C) 1985-1987, 1993-1995, 1997, 2001-2011 2@c Copyright (C) 1985-1987, 1993-1995, 1997, 2001-2011
3@c Free Software Foundation, Inc. 3@c Free Software Foundation, Inc.
4@c See file emacs.texi for copying conditions. 4@c See file emacs.texi for copying conditions.
5@node Rmail, Dired, Sending Mail, Top 5@node Rmail
6@chapter Reading Mail with Rmail 6@chapter Reading Mail with Rmail
7@cindex Rmail 7@cindex Rmail
8@cindex reading mail 8@cindex reading mail
diff --git a/doc/emacs/text.texi b/doc/emacs/text.texi
index e3f5c05d8da..0b0e4867ae5 100644
--- a/doc/emacs/text.texi
+++ b/doc/emacs/text.texi
@@ -70,6 +70,7 @@ for editing such pictures.
70* Nroff Mode:: Editing input to the formatter nroff. 70* Nroff Mode:: Editing input to the formatter nroff.
71* Formatted Text:: Editing formatted text directly in WYSIWYG fashion. 71* Formatted Text:: Editing formatted text directly in WYSIWYG fashion.
72* Text Based Tables:: Editing text-based tables in WYSIWYG fashion. 72* Text Based Tables:: Editing text-based tables in WYSIWYG fashion.
73* Two-Column:: Splitting text columns into separate windows.
73@end menu 74@end menu
74 75
75@node Words 76@node Words
@@ -2837,3 +2838,93 @@ then inserts the generated table in the proper syntax into the
2837destination buffer. The default destination buffer is 2838destination buffer. The default destination buffer is
2838@code{table.@var{lang}}, where @var{lang} is the language you 2839@code{table.@var{lang}}, where @var{lang} is the language you
2839specified. 2840specified.
2841
2842@node Two-Column
2843@section Two-Column Editing
2844@cindex two-column editing
2845@cindex splitting columns
2846@cindex columns, splitting
2847
2848 Two-column mode lets you conveniently edit two side-by-side columns of
2849text. It uses two side-by-side windows, each showing its own
2850buffer.
2851
2852 There are three ways to enter two-column mode:
2853
2854@table @asis
2855@item @kbd{@key{F2} 2} or @kbd{C-x 6 2}
2856@kindex F2 2
2857@kindex C-x 6 2
2858@findex 2C-two-columns
2859Enter two-column mode with the current buffer on the left, and on the
2860right, a buffer whose name is based on the current buffer's name
2861(@code{2C-two-columns}). If the right-hand buffer doesn't already
2862exist, it starts out empty; the current buffer's contents are not
2863changed.
2864
2865This command is appropriate when the current buffer is empty or contains
2866just one column and you want to add another column.
2867
2868@item @kbd{@key{F2} s} or @kbd{C-x 6 s}
2869@kindex F2 s
2870@kindex C-x 6 s
2871@findex 2C-split
2872Split the current buffer, which contains two-column text, into two
2873buffers, and display them side by side (@code{2C-split}). The current
2874buffer becomes the left-hand buffer, but the text in the right-hand
2875column is moved into the right-hand buffer. The current column
2876specifies the split point. Splitting starts with the current line and
2877continues to the end of the buffer.
2878
2879This command is appropriate when you have a buffer that already contains
2880two-column text, and you wish to separate the columns temporarily.
2881
2882@item @kbd{@key{F2} b @var{buffer} @key{RET}}
2883@itemx @kbd{C-x 6 b @var{buffer} @key{RET}}
2884@kindex F2 b
2885@kindex C-x 6 b
2886@findex 2C-associate-buffer
2887Enter two-column mode using the current buffer as the left-hand buffer,
2888and using buffer @var{buffer} as the right-hand buffer
2889(@code{2C-associate-buffer}).
2890@end table
2891
2892 @kbd{@key{F2} s} or @kbd{C-x 6 s} looks for a column separator, which
2893is a string that appears on each line between the two columns. You can
2894specify the width of the separator with a numeric argument to
2895@kbd{@key{F2} s}; that many characters, before point, constitute the
2896separator string. By default, the width is 1, so the column separator
2897is the character before point.
2898
2899 When a line has the separator at the proper place, @kbd{@key{F2} s}
2900puts the text after the separator into the right-hand buffer, and
2901deletes the separator. Lines that don't have the column separator at
2902the proper place remain unsplit; they stay in the left-hand buffer, and
2903the right-hand buffer gets an empty line to correspond. (This is the
2904way to write a line that ``spans both columns while in two-column
2905mode'': write it in the left-hand buffer, and put an empty line in the
2906right-hand buffer.)
2907
2908@kindex F2 RET
2909@kindex C-x 6 RET
2910@findex 2C-newline
2911 The command @kbd{C-x 6 @key{RET}} or @kbd{@key{F2} @key{RET}}
2912(@code{2C-newline}) inserts a newline in each of the two buffers at
2913corresponding positions. This is the easiest way to add a new line to
2914the two-column text while editing it in split buffers.
2915
2916@kindex F2 1
2917@kindex C-x 6 1
2918@findex 2C-merge
2919 When you have edited both buffers as you wish, merge them with
2920@kbd{@key{F2} 1} or @kbd{C-x 6 1} (@code{2C-merge}). This copies the
2921text from the right-hand buffer as a second column in the other buffer.
2922To go back to two-column editing, use @kbd{@key{F2} s}.
2923
2924@kindex F2 d
2925@kindex C-x 6 d
2926@findex 2C-dissociate
2927 Use @kbd{@key{F2} d} or @kbd{C-x 6 d} to dissociate the two buffers,
2928leaving each as it stands (@code{2C-dissociate}). If the other buffer,
2929the one not current when you type @kbd{@key{F2} d}, is empty,
2930@kbd{@key{F2} d} kills it.
diff --git a/doc/emacs/trouble.texi b/doc/emacs/trouble.texi
index 4be892639fc..fd06dde5174 100644
--- a/doc/emacs/trouble.texi
+++ b/doc/emacs/trouble.texi
@@ -15,7 +15,7 @@ also considered.
15@raisesections 15@raisesections
16@end ifnottex 16@end ifnottex
17 17
18@node Quitting, Lossage, Customization, Top 18@node Quitting
19@section Quitting and Aborting 19@section Quitting and Aborting
20@cindex quitting 20@cindex quitting
21 21
diff --git a/doc/lispref/ChangeLog b/doc/lispref/ChangeLog
index f08ee3a227c..3f52d684683 100644
--- a/doc/lispref/ChangeLog
+++ b/doc/lispref/ChangeLog
@@ -1,3 +1,97 @@
12011-08-30 Dani Moncayo <dmoncayo@gmail.com> (tiny change)
2
3 * lists.texi (Building Lists): Fix typo.
4
52011-08-30 Chong Yidong <cyd@stupidchicken.com>
6
7 * display.texi (Basic Faces): New node. Document new faces.
8
9 * modes.texi (Major Mode Conventions): Move some text there.
10 (Mode Help): Remove major-mode var, duplicated in Major Modes.
11
122011-08-29 Chong Yidong <cyd@stupidchicken.com>
13
14 * modes.texi (Basic Major Modes): New node. Callers updated.
15 (Major Modes): Document fundamental-mode and major-mode.
16 (Major Mode Basics): Node deleted; text moved to Major Modes.
17 (Derived Modes): Document derived-mode-p.
18
192011-08-28 Chong Yidong <cyd@stupidchicken.com>
20
21 * files.texi (Changing Files, Create/Delete Dirs): Document new
22 arguments for delete-file, delete-directory, and copy-directory.
23 (Visiting Functions): Remove view-file; it is documented in the
24 Emacs manual.
25
26 * frames.texi (Layout Parameters): The defaults for the
27 menu-bar-lines and tool-bar-lines parameters depend on the mode.
28
29 * display.texi (Progress): Document spinner functionality.
30
31 * os.texi (Killing Emacs): Note that kill-emacs can be called by
32 operating system signals. Refer to save-buffers-kill-terminal
33 instead of save-buffers-kill-emacs.
34
35 * objects.texi (Symbol Type): Document ## print representation.
36
372011-08-25 Eli Zaretskii <eliz@gnu.org>
38
39 * display.texi (Specified Space): Mention that `space' specs
40 influence bidi reordering.
41 (Bidirectional Display): Explain how to use `(space . PROPS)' for
42 separating fields with bidirectional content.
43
442011-08-24 Eli Zaretskii <eliz@gnu.org>
45
46 * display.texi (Bidirectional Display): Document return value in
47 buffers that are not bidi-reordered for display, and in unibyte
48 buffers.
49
502011-08-23 Eli Zaretskii <eliz@gnu.org>
51
52 * nonascii.texi (Character Properties): Document the values for
53 unassigned codepoints.
54
552011-08-18 Eli Zaretskii <eliz@gnu.org>
56
57 * nonascii.texi (Character Properties): Document use of
58 `bidi-class' and `mirroring' properties as part of reordering.
59 Provide cross-references to "Bidirectional Display".
60
61 * display.texi (Bidirectional Display): Document the pitfalls of
62 concatenating strings with bidirectional content, with possible
63 solutions. Document bidi-string-mark-left-to-right. Mention
64 paragraph direction in modes that inherit from prog-mode.
65 Document use of `bidi-class' and `mirroring' properties as part of
66 reordering.
67
682011-08-16 Eli Zaretskii <eliz@gnu.org>
69
70 * modes.texi (Major Mode Conventions): Improve the documentation
71 of `mode-class' `special' modes.
72
73 * nonascii.texi (Character Properties): Document the `mirroring'
74 property. Add index entries.
75
76 * syntax.texi (Categories): Add an example of defining a new
77 category and category table.
78
79 * searching.texi (Regexp Backslash): Document how to display
80 existing categories. Mention the possibility of adding
81 categories, and add an xref to where this is described. Add an
82 index entry.
83
842011-08-09 Chong Yidong <cyd@stupidchicken.com>
85
86 * text.texi (Special Properties):
87 * display.texi (Overlay Properties): Note that mouse-face cannot
88 change the text size (Bug#8530).
89
902011-08-08 Chong Yidong <cyd@stupidchicken.com>
91
92 * os.texi (Time of Day): Remove set-time-zone-rule, and recommend
93 using setenv instead.
94
12011-07-28 Eli Zaretskii <eliz@gnu.org> 952011-07-28 Eli Zaretskii <eliz@gnu.org>
2 96
3 * display.texi (Bidirectional Display): Document the fact that 97 * display.texi (Bidirectional Display): Document the fact that
diff --git a/doc/lispref/debugging.texi b/doc/lispref/debugging.texi
index d9e807afb88..757906f286e 100644
--- a/doc/lispref/debugging.texi
+++ b/doc/lispref/debugging.texi
@@ -596,25 +596,6 @@ forms are elided.
596@end smallexample 596@end smallexample
597@end deffn 597@end deffn
598 598
599@ignore @c Not worth mentioning
600@defopt stack-trace-on-error
601@cindex stack trace
602This variable controls whether Lisp automatically displays a
603backtrace buffer after every error that is not handled. A quit signal
604counts as an error for this variable. If it is non-@code{nil} then a
605backtrace is shown in a pop-up buffer named @samp{*Backtrace*} on every
606error. If it is @code{nil}, then a backtrace is not shown.
607
608When a backtrace is shown, that buffer is not selected. If either
609@code{debug-on-quit} or @code{debug-on-error} is also non-@code{nil}, then
610a backtrace is shown in one buffer, and the debugger is popped up in
611another buffer with its own backtrace.
612
613We consider this feature to be obsolete and superseded by the debugger
614itself.
615@end defopt
616@end ignore
617
618@defvar debug-on-next-call 599@defvar debug-on-next-call
619@cindex @code{eval}, and debugging 600@cindex @code{eval}, and debugging
620@cindex @code{apply}, and debugging 601@cindex @code{apply}, and debugging
diff --git a/doc/lispref/display.texi b/doc/lispref/display.texi
index 077d0992232..68291319ef1 100644
--- a/doc/lispref/display.texi
+++ b/doc/lispref/display.texi
@@ -367,10 +367,9 @@ echo area, or @code{nil} if there is none.
367 When an operation can take a while to finish, you should inform the 367 When an operation can take a while to finish, you should inform the
368user about the progress it makes. This way the user can estimate 368user about the progress it makes. This way the user can estimate
369remaining time and clearly see that Emacs is busy working, not hung. 369remaining time and clearly see that Emacs is busy working, not hung.
370A convenient way to do this is to use a @dfn{progress reporter}.
370 371
371 Functions listed in this section provide simple and efficient way of 372 Here is a working example that does nothing useful:
372reporting operation progress. Here is a working example that does
373nothing useful:
374 373
375@smallexample 374@smallexample
376(let ((progress-reporter 375(let ((progress-reporter
@@ -382,11 +381,11 @@ nothing useful:
382 (progress-reporter-done progress-reporter)) 381 (progress-reporter-done progress-reporter))
383@end smallexample 382@end smallexample
384 383
385@defun make-progress-reporter message min-value max-value &optional current-value min-change min-time 384@defun make-progress-reporter message &optional min-value max-value current-value min-change min-time
386This function creates and returns a @dfn{progress reporter}---an 385This function creates and returns a progress reporter object, which
387object you will use as an argument for all other functions listed 386you will use as an argument for the other functions listed below. The
388here. The idea is to precompute as much data as possible to make 387idea is to precompute as much data as possible to make progress
389progress reporting very fast. 388reporting very fast.
390 389
391When this progress reporter is subsequently used, it will display 390When this progress reporter is subsequently used, it will display
392@var{message} in the echo area, followed by progress percentage. 391@var{message} in the echo area, followed by progress percentage.
@@ -394,24 +393,28 @@ When this progress reporter is subsequently used, it will display
394on a filename, for instance, use @code{format} before calling this 393on a filename, for instance, use @code{format} before calling this
395function. 394function.
396 395
397@var{min-value} and @var{max-value} arguments stand for starting and 396The arguments @var{min-value} and @var{max-value} should be numbers
398final states of your operation. For instance, if you scan a buffer, 397standing for the starting and final states of the operation. For
399they should be the results of @code{point-min} and @code{point-max} 398instance, an operation that ``scans'' a buffer should set these to the
400correspondingly. It is required that @var{max-value} is greater than 399results of @code{point-min} and @code{point-max} correspondingly.
401@var{min-value}. If you create progress reporter when some part of 400@var{max-value} should be greater than @var{min-value}.
402the operation has already been completed, then specify 401
403@var{current-value} argument. But normally you should omit it or set 402Alternatively, you can set @var{min-value} and @var{max-value} to
404it to @code{nil}---it will default to @var{min-value} then. 403@code{nil}. In that case, the progress reporter does not report
405 404process percentages; it instead displays a ``spinner'' that rotates a
406Remaining arguments control the rate of echo area updates. Progress 405notch each time you update the progress reporter.
407reporter will wait for at least @var{min-change} more percents of the 406
408operation to be completed before printing next message. 407If @var{min-value} and @var{max-value} are numbers, you can give the
409@var{min-time} specifies the minimum time in seconds to pass between 408argument @var{current-value} a numerical value specifying the initial
410successive prints. It can be fractional. Depending on Emacs and 409progress; if omitted, this defaults to @var{min-value}.
411system capabilities, progress reporter may or may not respect this 410
412last argument or do it with varying precision. Default value for 411The remaining arguments control the rate of echo area updates. The
413@var{min-change} is 1 (one percent), for @var{min-time}---0.2 412progress reporter will wait for at least @var{min-change} more
414(seconds.) 413percents of the operation to be completed before printing next
414message; the default is one percent. @var{min-time} specifies the
415minimum time in seconds to pass between successive prints; the default
416is 0.2 seconds. (On some operating systems, the progress reporter may
417handle fractions of seconds with varying precision).
415 418
416This function calls @code{progress-reporter-update}, so the first 419This function calls @code{progress-reporter-update}, so the first
417message is printed immediately. 420message is printed immediately.
@@ -1454,7 +1457,10 @@ specify just the foreground color or just the background color.
1454@item mouse-face 1457@item mouse-face
1455@kindex mouse-face @r{(overlay property)} 1458@kindex mouse-face @r{(overlay property)}
1456This property is used instead of @code{face} when the mouse is within 1459This property is used instead of @code{face} when the mouse is within
1457the range of the overlay. 1460the range of the overlay. However, Emacs ignores all face attributes
1461from this property that alter the text size (e.g. @code{:height},
1462@code{:weight}, and @code{:slant}). Those attributes are always the
1463same as in the unhighlighted text.
1458 1464
1459@item display 1465@item display
1460@kindex display @r{(overlay property)} 1466@kindex display @r{(overlay property)}
@@ -1827,9 +1833,10 @@ particular face name a special meaning in one frame if you wish.
1827* Face Attributes:: What is in a face? 1833* Face Attributes:: What is in a face?
1828* Attribute Functions:: Functions to examine and set face attributes. 1834* Attribute Functions:: Functions to examine and set face attributes.
1829* Displaying Faces:: How Emacs combines the faces specified for a character. 1835* Displaying Faces:: How Emacs combines the faces specified for a character.
1830* Face Remapping:: Remapping faces to alternative definitions. 1836* Face Remapping:: Remapping faces to alternative definitions.
1831* Face Functions:: How to define and examine faces. 1837* Face Functions:: How to define and examine faces.
1832* Auto Faces:: Hook for automatic face assignment. 1838* Auto Faces:: Hook for automatic face assignment.
1839* Basic Faces:: Faces that are defined by default.
1833* Font Selection:: Finding the best available font for a face. 1840* Font Selection:: Finding the best available font for a face.
1834* Font Lookup:: Looking up the names of available fonts 1841* Font Lookup:: Looking up the names of available fonts
1835 and information about them. 1842 and information about them.
@@ -2681,6 +2688,62 @@ For efficiency, we recommend writing these functions so that they
2681usually assign faces to around 400 to 600 characters at each call. 2688usually assign faces to around 400 to 600 characters at each call.
2682@end defvar 2689@end defvar
2683 2690
2691@node Basic Faces
2692@subsection Basic Faces
2693
2694If your Emacs Lisp program needs to assign some faces to text, it is
2695often a good idea to use certain existing faces or inherit from them,
2696rather than defining entirely new faces. This way, if other users
2697have customized the basic faces to give Emacs a certain look, your
2698program will ``fit in'' without additional customization.
2699
2700 Some of the basic faces defined in Emacs are listed below. In
2701addition to these, you might want to make use of the Font Lock faces
2702for syntactic highlighting, if highlighting is not already handled by
2703Font Lock mode, or if some Font Lock faces are not in use.
2704@xref{Faces for Font Lock}.
2705
2706@table @code
2707@item default
2708The default face, whose attributes are all specified. All other faces
2709implicitly inherit from it: any unspecified attribute defaults to the
2710attribute on this face (@pxref{Face Attributes}).
2711
2712@item bold
2713@itemx italic
2714@itemx bold-italic
2715@itemx underline
2716@itemx fixed-pitch
2717@itemx variable-pitch
2718These have the attributes indicated by their names (e.g. @code{bold}
2719has a bold @code{:weight} attribute), with all other attributes
2720unspecified (and so given by @code{default}).
2721
2722@item shadow
2723For ``dimmed out'' text. For example, it is used for the ignored
2724part of a filename in the minibuffer (@pxref{Minibuffer File,,
2725Minibuffers for File Names, emacs, The GNU Emacs Manual}).
2726
2727@item link
2728@itemx link-visited
2729For clickable text buttons that send the user to a different
2730buffer or ``location''.
2731
2732@item highlight
2733For stretches of text that should temporarily stand out. For example,
2734it is commonly assigned to the @code{mouse-face} property for cursor
2735highlighting (@pxref{Special Properties}).
2736
2737@item match
2738For text matching a search command.
2739
2740@item error
2741@itemx warning
2742@itemx success
2743For text concerning errors, warnings, or successes. For example,
2744these are used for messages in @samp{*Compilation*} buffers.
2745@end table
2746
2684@node Font Selection 2747@node Font Selection
2685@subsection Font Selection 2748@subsection Font Selection
2686 2749
@@ -3791,6 +3854,10 @@ with a @dfn{pixel ascent} specification (@pxref{Pixel Specification}).
3791non-graphic terminals, but the other space properties in this section 3854non-graphic terminals, but the other space properties in this section
3792are not. 3855are not.
3793 3856
3857 Note that space properties are treated as paragraph separators for
3858the purposes of reordering bidirectional text for display.
3859@xref{Bidirectional Display}, for the details.
3860
3794@node Pixel Specification 3861@node Pixel Specification
3795@subsection Pixel Specification for Spaces 3862@subsection Pixel Specification for Spaces
3796@cindex spaces, pixel specification 3863@cindex spaces, pixel specification
@@ -5989,6 +6056,7 @@ left-to-right and right-to-left characters.
5989for editing and displaying bidirectional text. 6056for editing and displaying bidirectional text.
5990 6057
5991@cindex logical order 6058@cindex logical order
6059@cindex reading order
5992@cindex visual order 6060@cindex visual order
5993@cindex unicode bidirectional algorithm 6061@cindex unicode bidirectional algorithm
5994 Emacs stores right-to-left and bidirectional text in the so-called 6062 Emacs stores right-to-left and bidirectional text in the so-called
@@ -6003,17 +6071,16 @@ for display. Reordering of bidirectional text for display in Emacs is
6003a ``Full bidirectionality'' class implementation of the @acronym{UBA}. 6071a ``Full bidirectionality'' class implementation of the @acronym{UBA}.
6004 6072
6005@defvar bidi-display-reordering 6073@defvar bidi-display-reordering
6006 The buffer-local variable @code{bidi-display-reordering} controls 6074 This buffer-local variable controls whether text in the buffer is
6007whether text in the buffer is reordered for display. If its value is 6075reordered for display. If its value is non-@code{nil}, Emacs reorders
6008non-@code{nil}, Emacs reorders characters that have right-to-left 6076characters that have right-to-left directionality when they are
6009directionality when they are displayed. The default value is 6077displayed. The default value is @code{t}. Text in overlay strings
6010@code{t}. Text in overlay strings (@pxref{Overlay 6078(@pxref{Overlay Properties,,before-string}), display strings
6011Properties,,before-string}), display strings (@pxref{Overlay 6079(@pxref{Overlay Properties,,display}), and @code{display} text
6012Properties,,display}), and @code{display} text properties 6080properties (@pxref{Display Property}) is also reordered for display if
6013(@pxref{Display Property}) is also reordered if the buffer whose text 6081the buffer whose text includes these strings is reordered. Turning
6014includes these strings is reordered for display. Turning off 6082off @code{bidi-display-reordering} for a buffer turns off reordering
6015@code{bidi-display-reordering} for a buffer turns off reordering of 6083of all the overlay and display strings in that buffer.
6016all the overlay and display strings in that buffer.
6017 6084
6018 Reordering of strings that are unrelated to any buffer, such as text 6085 Reordering of strings that are unrelated to any buffer, such as text
6019displayed on the mode line (@pxref{Mode Line Format}) or header line 6086displayed on the mode line (@pxref{Mode Line Format}) or header line
@@ -6053,7 +6120,7 @@ it is reordered for display. That is, the entire chunk of text
6053covered by these properties is reordered together. Moreover, the 6120covered by these properties is reordered together. Moreover, the
6054bidirectional properties of the characters in this chunk of text are 6121bidirectional properties of the characters in this chunk of text are
6055ignored, and Emacs reorders them as if they were replaced with a 6122ignored, and Emacs reorders them as if they were replaced with a
6056single character @code{u+FFFC}, known as the @dfn{Object Replacement 6123single character @code{U+FFFC}, known as the @dfn{Object Replacement
6057Character}. This means that placing a display property over a portion 6124Character}. This means that placing a display property over a portion
6058of text may change the way that the surrounding text is reordered for 6125of text may change the way that the surrounding text is reordered for
6059display. To prevent this unexpected effect, always place such 6126display. To prevent this unexpected effect, always place such
@@ -6070,9 +6137,9 @@ begins at the right margin and is continued or truncated at the left
6070margin. 6137margin.
6071 6138
6072@defvar bidi-paragraph-direction 6139@defvar bidi-paragraph-direction
6073 Emacs determines the base direction of each paragraph dynamically, 6140 By default, Emacs determines the base direction of each paragraph
6074based on the text at the beginning of the paragraph. The precise 6141dynamically, based on the text at the beginning of the paragraph. The
6075method of determining the base direction is specified by the 6142precise method of determining the base direction is specified by the
6076@acronym{UBA}; in a nutshell, the first character in a paragraph that 6143@acronym{UBA}; in a nutshell, the first character in a paragraph that
6077has an explicit directionality determines the base direction of the 6144has an explicit directionality determines the base direction of the
6078paragraph. However, sometimes a buffer may need to force a certain 6145paragraph. However, sometimes a buffer may need to force a certain
@@ -6084,6 +6151,13 @@ dynamic determination of the base direction, and instead forces all
6084paragraphs in the buffer to have the direction specified by its 6151paragraphs in the buffer to have the direction specified by its
6085buffer-local value. The value can be either @code{right-to-left} or 6152buffer-local value. The value can be either @code{right-to-left} or
6086@code{left-to-right}. Any other value is interpreted as @code{nil}. 6153@code{left-to-right}. Any other value is interpreted as @code{nil}.
6154The default is @code{nil}.
6155
6156@cindex @code{prog-mode}, and @code{bidi-paragraph-direction}
6157Modes that are meant to display program source code should force a
6158@code{left-to-right} paragraph direction. The easiest way of doing so
6159is to derive the mode from Prog Mode, which already sets
6160@code{bidi-paragraph-direction} to that value.
6087@end defvar 6161@end defvar
6088 6162
6089@defun current-bidi-paragraph-direction &optional buffer 6163@defun current-bidi-paragraph-direction &optional buffer
@@ -6094,5 +6168,83 @@ omitted or @code{nil}, it defaults to the current buffer. If the
6094buffer-local value of the variable @code{bidi-paragraph-direction} is 6168buffer-local value of the variable @code{bidi-paragraph-direction} is
6095non-@code{nil}, the returned value will be identical to that value; 6169non-@code{nil}, the returned value will be identical to that value;
6096otherwise, the returned value reflects the paragraph direction 6170otherwise, the returned value reflects the paragraph direction
6097determined dynamically by Emacs. 6171determined dynamically by Emacs. For buffers whose value of
6098@end defun 6172@code{bidi-display-reordering} is @code{nil} as well as unibyte
6173buffers, this function always returns @code{left-to-right}.
6174@end defun
6175
6176@cindex layout on display, and bidirectional text
6177@cindex jumbled display of bidirectional text
6178@cindex concatenating bidirectional strings
6179 Reordering of bidirectional text for display can have surprising and
6180unpleasant effects when two strings with bidirectional content are
6181juxtaposed in a buffer, or otherwise programmatically concatenated
6182into a string of text. A typical example is a buffer whose lines are
6183actually sequences of items, or fields, separated by whitespace or
6184punctuation characters. This is used in specialized modes such as
6185Buffer-menu Mode or various email summary modes, like Rmail Summary
6186Mode. Because these separator characters are @dfn{weak}, i.e.@: have
6187no strong directionality, they take on the directionality of
6188surrounding text. As result, a numeric field that follows a field
6189with bidirectional content can be displayed @emph{to the left} of the
6190preceding field, producing a jumbled display and messing up the
6191expected layout.
6192
6193 To countermand this, we recommend that you use one of the following
6194techniques for forcing correct order of fields on display:
6195
6196@itemize @minus
6197@item
6198Append the special character @code{U+200E}, LEFT-TO-RIGHT MARK, or
6199@acronym{LRM}, to the end of each field that may have bidirectional
6200content, or prepend it to the beginning of the following field. The
6201function @code{bidi-string-mark-left-to-right}, described below, comes
6202in handy for this purpose. (In a right-to-left paragraph, use
6203@code{U+200F}, RIGHT-TO-LEFT MARK, or @acronym{RLM}, instead.) This
6204is one of the solutions recommended by
6205@uref{http://www.unicode.org/reports/tr9/#Separators, the
6206@acronym{UBA}}.
6207
6208@item
6209Include the tab character in the field separator. The tab character
6210plays the role of @dfn{segment separator} in the @acronym{UBA}
6211reordering, whose effect is to make each field a separate segment, and
6212thus reorder them separately.
6213
6214@cindex @code{space} display spec, and bidirectional text
6215@item
6216Separate fields with a @code{display} property or overlay with the
6217property value of the form @code{(space . PROPS)} (@pxref{Specified
6218Space}). This display specification is treated by Emacs as a
6219@dfn{paragraph separator}; the text before and after the separator is
6220reordered separately, which avoids the influence of any field on its
6221neighboring fields.
6222@end itemize
6223
6224@defun bidi-string-mark-left-to-right string
6225This subroutine returns its argument @var{string}, possibly modified,
6226such that the result can be safely concatenated with another string,
6227or juxtaposed with another string in a buffer, without disrupting the
6228relative layout of this string and the next one on display. If the
6229string returned by this function is displayed as part of a
6230left-to-right paragraph, it will always appear on display to the left
6231of the text that follows it. The function works by examining the
6232characters of its argument, and if any of those characters could cause
6233reordering on display, the function appends the @acronym{LRM}
6234character to the string. The appended @acronym{LRM} character is made
6235@emph{invisible} (@pxref{Invisible Text}), to hide it on display.
6236@end defun
6237
6238 The reordering algorithm uses the bidirectional properties of the
6239characters stored as their @code{bidi-class} property
6240(@pxref{Character Properties}). Lisp programs can change these
6241properties by calling the @code{put-char-code-property} function.
6242However, doing this requires a thorough understanding of the
6243@acronym{UBA}, and is therefore not recommended. Any changes to the
6244bidirectional properties of a character have global effect: they
6245affect all Emacs frames and windows.
6246
6247 Similarly, the @code{mirroring} property is used to display the
6248appropriate mirrored character in the reordered text. Lisp programs
6249can affect the mirrored display by changing this property. Again, any
6250such changes affect all of Emacs display.
diff --git a/doc/lispref/elisp.texi b/doc/lispref/elisp.texi
index bb05f1b4a0b..bcf6d3318ef 100644
--- a/doc/lispref/elisp.texi
+++ b/doc/lispref/elisp.texi
@@ -765,8 +765,7 @@ Major and Minor Modes
765* Major Modes:: Defining major modes. 765* Major Modes:: Defining major modes.
766* Minor Modes:: Defining minor modes. 766* Minor Modes:: Defining minor modes.
767* Mode Line Format:: Customizing the text that appears in the mode line. 767* Mode Line Format:: Customizing the text that appears in the mode line.
768* Imenu:: How a mode can provide a menu 768* Imenu:: Providing a menu of definitions made in a buffer.
769 of definitions in the buffer.
770* Font Lock Mode:: How modes can highlight text according to syntax. 769* Font Lock Mode:: How modes can highlight text according to syntax.
771* Desktop Save Mode:: How modes can have buffer state saved between 770* Desktop Save Mode:: How modes can have buffer state saved between
772 Emacs sessions. 771 Emacs sessions.
@@ -778,12 +777,12 @@ Hooks
778 777
779Major Modes 778Major Modes
780 779
781* Major Mode Basics::
782* Major Mode Conventions:: Coding conventions for keymaps, etc. 780* Major Mode Conventions:: Coding conventions for keymaps, etc.
783* Auto Major Mode:: How Emacs chooses the major mode automatically. 781* Auto Major Mode:: How Emacs chooses the major mode automatically.
784* Mode Help:: Finding out how to use a mode. 782* Mode Help:: Finding out how to use a mode.
785* Derived Modes:: Defining a new major mode based on another major 783* Derived Modes:: Defining a new major mode based on another major
786 mode. 784 mode.
785* Basic Major Modes:: Modes that other modes are often derived from.
787* Generic Modes:: Defining a simple major mode that supports 786* Generic Modes:: Defining a simple major mode that supports
788 comment syntax and Font Lock mode. 787 comment syntax and Font Lock mode.
789* Mode Hooks:: Hooks run at the end of major mode functions. 788* Mode Hooks:: Hooks run at the end of major mode functions.
@@ -1309,6 +1308,7 @@ Faces
1309* Face Remapping:: Remapping faces to alternative definitions. 1308* Face Remapping:: Remapping faces to alternative definitions.
1310* Face Functions:: How to define and examine faces. 1309* Face Functions:: How to define and examine faces.
1311* Auto Faces:: Hook for automatic face assignment. 1310* Auto Faces:: Hook for automatic face assignment.
1311* Basic Faces:: Faces that are defined by default.
1312* Font Selection:: Finding the best available font for a face. 1312* Font Selection:: Finding the best available font for a face.
1313* Font Lookup:: Looking up the names of available fonts 1313* Font Lookup:: Looking up the names of available fonts
1314 and information about them. 1314 and information about them.
diff --git a/doc/lispref/files.texi b/doc/lispref/files.texi
index 4d992bd2c51..bd904bf49c0 100644
--- a/doc/lispref/files.texi
+++ b/doc/lispref/files.texi
@@ -203,17 +203,6 @@ When this command is called interactively, it prompts for
203@var{filename}. 203@var{filename}.
204@end deffn 204@end deffn
205 205
206@deffn Command view-file filename
207This command visits @var{filename} using View mode, returning to the
208previous buffer when you exit View mode. View mode is a minor mode that
209provides commands to skim rapidly through the file, but does not let you
210modify the text. Entering View mode runs the normal hook
211@code{view-mode-hook}. @xref{Hooks}.
212
213When @code{view-file} is called interactively, it prompts for
214@var{filename}.
215@end deffn
216
217@defopt find-file-wildcards 206@defopt find-file-wildcards
218If this variable is non-@code{nil}, then the various @code{find-file} 207If this variable is non-@code{nil}, then the various @code{find-file}
219commands check for wildcard characters and visit all the files that 208commands check for wildcard characters and visit all the files that
@@ -1529,19 +1518,26 @@ This function is not available on systems that don't support symbolic
1529links. 1518links.
1530@end deffn 1519@end deffn
1531 1520
1532@deffn Command delete-file filename 1521@cindex trash
1522@vindex delete-by-moving-to-trash
1523@deffn Command delete-file filename &optional trash
1533@pindex rm 1524@pindex rm
1534This command deletes the file @var{filename}, like the shell command 1525This command deletes the file @var{filename}. If the file has
1535@samp{rm @var{filename}}. If the file has multiple names, it continues 1526multiple names, it continues to exist under the other names. If
1536to exist under the other names. 1527@var{filename} is a symbolic link, @code{delete-file} deletes only the
1537 1528symbolic link and not its target (though it does follow symbolic links
1538A suitable kind of @code{file-error} error is signaled if the file does 1529at all levels of parent directories).
1539not exist, or is not deletable. (On Unix and GNU/Linux, a file is 1530
1540deletable if its directory is writable.) 1531A suitable kind of @code{file-error} error is signaled if the file
1541 1532does not exist, or is not deletable. (On Unix and GNU/Linux, a file
1542If @var{filename} is a symbolic link, @code{delete-file} does not 1533is deletable if its directory is writable.)
1543replace it with its target, but it does follow symbolic links at all 1534
1544levels of parent directories. 1535If the optional argument @var{trash} is non-@code{nil} and the
1536variable @code{delete-by-moving-to-trash} is non-@code{nil}, this
1537command moves the file into the system Trash instead of deleting it.
1538@xref{Misc File Ops,,Miscellaneous File Operations, emacs, The GNU
1539Emacs Manual}. When called interactively, @var{trash} is @code{t} if
1540no prefix argument is given, and @code{nil} otherwise.
1545 1541
1546See also @code{delete-directory} in @ref{Create/Delete Dirs}. 1542See also @code{delete-directory} in @ref{Create/Delete Dirs}.
1547@end deffn 1543@end deffn
@@ -2507,7 +2503,7 @@ if they don't already exist.
2507@code{mkdir} is an alias for this. 2503@code{mkdir} is an alias for this.
2508@end deffn 2504@end deffn
2509 2505
2510@deffn Command copy-directory dirname newname &optional keep-time parents 2506@deffn Command copy-directory dirname newname &optional keep-time parents copy-contents
2511This command copies the directory named @var{dirname} to 2507This command copies the directory named @var{dirname} to
2512@var{newname}. If @var{newname} names an existing directory, 2508@var{newname}. If @var{newname} names an existing directory,
2513@var{dirname} will be copied to a subdirectory there. 2509@var{dirname} will be copied to a subdirectory there.
@@ -2515,16 +2511,23 @@ This command copies the directory named @var{dirname} to
2515It always sets the file modes of the copied files to match the 2511It always sets the file modes of the copied files to match the
2516corresponding original file. 2512corresponding original file.
2517 2513
2518The third arg @var{keep-time} non-@code{nil} means to preserve the 2514The third argument @var{keep-time} non-@code{nil} means to preserve the
2519modification time of the copied files. A prefix arg makes 2515modification time of the copied files. A prefix arg makes
2520@var{keep-time} non-@code{nil}. 2516@var{keep-time} non-@code{nil}.
2521 2517
2522Noninteractively, the last argument @var{parents} says whether to 2518The fourth argument @var{parents} says whether to
2523create parent directories if they don't exist. Interactively, 2519create parent directories if they don't exist. Interactively,
2524this happens by default. 2520this happens by default.
2521
2522The fifth argument @var{copy-contents}, if non-@code{nil}, means to
2523copy the contents of @var{dirname} directly into @var{newname} if the
2524latter is an existing directory, instead of copying @var{dirname} into
2525it as a subdirectory.
2525@end deffn 2526@end deffn
2526 2527
2527@deffn Command delete-directory dirname &optional recursive 2528@cindex trash
2529@vindex delete-by-moving-to-trash
2530@deffn Command delete-directory dirname &optional recursive trash
2528This command deletes the directory named @var{dirname}. The function 2531This command deletes the directory named @var{dirname}. The function
2529@code{delete-file} does not work for files that are directories; you 2532@code{delete-file} does not work for files that are directories; you
2530must use @code{delete-directory} for them. If @var{recursive} is 2533must use @code{delete-directory} for them. If @var{recursive} is
@@ -2533,6 +2536,13 @@ must use @code{delete-directory} for them. If @var{recursive} is
2533 2536
2534@code{delete-directory} only follows symbolic links at the level of 2537@code{delete-directory} only follows symbolic links at the level of
2535parent directories. 2538parent directories.
2539
2540If the optional argument @var{trash} is non-@code{nil} and the
2541variable @code{delete-by-moving-to-trash} is non-@code{nil}, this
2542command moves the file into the system Trash instead of deleting it.
2543@xref{Misc File Ops,,Miscellaneous File Operations, emacs, The GNU
2544Emacs Manual}. When called interactively, @var{trash} is @code{t} if
2545no prefix argument is given, and @code{nil} otherwise.
2536@end deffn 2546@end deffn
2537 2547
2538@node Magic File Names 2548@node Magic File Names
diff --git a/doc/lispref/frames.texi b/doc/lispref/frames.texi
index b6012a4dd53..e799cfa6b7f 100644
--- a/doc/lispref/frames.texi
+++ b/doc/lispref/frames.texi
@@ -695,20 +695,19 @@ right fringe. However, you can force one fringe or the other to a
695precise width by specifying that width as a negative integer. If both 695precise width by specifying that width as a negative integer. If both
696widths are negative, only the left fringe gets the specified width. 696widths are negative, only the left fringe gets the specified width.
697 697
698@vindex menu-bar-lines, a frame parameter 698@vindex menu-bar-lines frame parameter
699@item menu-bar-lines 699@item menu-bar-lines
700The number of lines to allocate at the top of the frame for a menu 700The number of lines to allocate at the top of the frame for a menu
701bar. The default is 1. A value of @code{nil} means don't display a 701bar. The default is 1 if Menu Bar mode is enabled, and 0 otherwise.
702menu bar. @xref{Menu Bar}. (The X toolkit and GTK allow at most one 702@xref{Menu Bars,,,emacs, The GNU Emacs Manual}.
703menu bar line; they treat larger values as 1.)
704 703
705@vindex tool-bar-lines, a frame parameter 704@vindex tool-bar-lines frame parameter
706@item tool-bar-lines 705@item tool-bar-lines
707The number of lines to use for the tool bar. A value of @code{nil} 706The number of lines to use for the tool bar. The default is 1 if Tool
708means don't display a tool bar. (GTK and Nextstep allow at most one 707Bar mode is enabled, and 0 otherwise. @xref{Tool Bars,,,emacs, The
709tool bar line; they treat larger values as 1.) 708GNU Emacs Manual}.
710 709
711@vindex tool-bar-position, a frame parameter 710@vindex tool-bar-position frame parameter
712@item tool-bar-position 711@item tool-bar-position
713The position of the tool bar. Currently only for the GTK tool bar. 712The position of the tool bar. Currently only for the GTK tool bar.
714Value can be one of @code{top}, @code{bottom} @code{left}, @code{right}. 713Value can be one of @code{top}, @code{bottom} @code{left}, @code{right}.
diff --git a/doc/lispref/lists.texi b/doc/lispref/lists.texi
index 064be89632f..7a530b602e0 100644
--- a/doc/lispref/lists.texi
+++ b/doc/lispref/lists.texi
@@ -462,7 +462,7 @@ element is @var{object}. Compare @code{make-list} with
462 @result{} nil 462 @result{} nil
463@end group 463@end group
464@group 464@group
465(setq l (make-list 3 '(a b)) 465(setq l (make-list 3 '(a b)))
466 @result{} ((a b) (a b) (a b)) 466 @result{} ((a b) (a b) (a b))
467(eq (car l) (cadr l)) 467(eq (car l) (cadr l))
468 @result{} t 468 @result{} t
diff --git a/doc/lispref/modes.texi b/doc/lispref/modes.texi
index dd3b2e3038f..eb81ebc4acb 100644
--- a/doc/lispref/modes.texi
+++ b/doc/lispref/modes.texi
@@ -19,16 +19,15 @@ user. For related topics such as keymaps and syntax tables, see
19@ref{Keymaps}, and @ref{Syntax Tables}. 19@ref{Keymaps}, and @ref{Syntax Tables}.
20 20
21@menu 21@menu
22* Hooks:: How to use hooks; how to write code that provides hooks. 22* Hooks:: How to use hooks; how to write code that provides hooks.
23* Major Modes:: Defining major modes. 23* Major Modes:: Defining major modes.
24* Minor Modes:: Defining minor modes. 24* Minor Modes:: Defining minor modes.
25* Mode Line Format:: Customizing the text that appears in the mode line. 25* Mode Line Format:: Customizing the text that appears in the mode line.
26* Imenu:: How a mode can provide a menu 26* Imenu:: Providing a menu of definitions made in a buffer.
27 of definitions in the buffer. 27* Font Lock Mode:: How modes can highlight text according to syntax.
28* Font Lock Mode:: How modes can highlight text according to syntax. 28* Auto-Indentation:: How to teach Emacs to indent for a major mode.
29* Auto-Indentation:: How to teach Emacs to indent for a major mode. 29* Desktop Save Mode:: How modes can have buffer state saved between
30* Desktop Save Mode:: How modes can have buffer state saved between 30 Emacs sessions.
31 Emacs sessions.
32@end menu 31@end menu
33 32
34@node Hooks 33@node Hooks
@@ -48,12 +47,12 @@ convention, whenever the hook name ends in @samp{-hook}, that tells
48you it is normal. We try to make all hooks normal, as much as 47you it is normal. We try to make all hooks normal, as much as
49possible, so that you can use them in a uniform way. 48possible, so that you can use them in a uniform way.
50 49
51 Every major mode function is supposed to run a normal hook called 50 Every major mode command is supposed to run a normal hook called the
52the @dfn{mode hook} as the one of the last steps of initialization. 51@dfn{mode hook} as the one of the last steps of initialization. This
53This makes it easy for a user to customize the behavior of the mode, 52makes it easy for a user to customize the behavior of the mode, by
54by overriding the buffer-local variable assignments already made by 53overriding the buffer-local variable assignments already made by the
55the mode. Most minor mode functions also run a mode hook at the end. 54mode. Most minor mode functions also run a mode hook at the end. But
56But hooks are used in other contexts too. For example, the hook 55hooks are used in other contexts too. For example, the hook
57@code{suspend-hook} runs just before Emacs suspends itself 56@code{suspend-hook} runs just before Emacs suspends itself
58(@pxref{Suspending Emacs}). 57(@pxref{Suspending Emacs}).
59 58
@@ -78,8 +77,8 @@ convention.
78its value is just a single function, not a list of functions. 77its value is just a single function, not a list of functions.
79 78
80@menu 79@menu
81* Running Hooks:: How to run a hook. 80* Running Hooks:: How to run a hook.
82* Setting Hooks:: How to put functions on a hook, or remove them. 81* Setting Hooks:: How to put functions on a hook, or remove them.
83@end menu 82@end menu
84 83
85@node Running Hooks 84@node Running Hooks
@@ -195,115 +194,98 @@ from the buffer-local hook list instead of from the global hook list.
195@section Major Modes 194@section Major Modes
196@cindex major mode 195@cindex major mode
197 196
197@cindex major mode command
198 Major modes specialize Emacs for editing particular kinds of text. 198 Major modes specialize Emacs for editing particular kinds of text.
199Each buffer has only one major mode at a time. For each major mode 199Each buffer has one major mode at a time. Every major mode is
200there is a function to switch to that mode in the current buffer; its 200associated with a @dfn{major mode command}, whose name should end in
201name should end in @samp{-mode}. These functions work by setting 201@samp{-mode}. This command takes care of switching to that mode in the
202buffer-local variable bindings and other data associated with the 202current buffer, by setting various buffer-local variables such as a
203buffer, such as a local keymap. The effect lasts until you switch 203local keymap. @xref{Major Mode Conventions}.
204to another major mode in the same buffer. 204
205 The least specialized major mode is called @dfn{Fundamental mode},
206which has no mode-specific definitions or variable settings.
207
208@deffn Command fundamental-mode
209This is the major mode command for Fundamental mode. Unlike other mode
210commands, it does @emph{not} run any mode hooks (@pxref{Major Mode
211Conventions}), since you are not supposed to customize this mode.
212@end deffn
213
214 The easiest way to write a major mode is to use the macro
215@code{define-derived-mode}, which sets up the new mode as a variant of
216an existing major mode. @xref{Derived Modes}. We recommend using
217@code{define-derived-mode} even if the new mode is not an obvious
218derivative of another mode, as it automatically enforces many coding
219conventions for you. @xref{Basic Major Modes}, for common modes to
220derive from.
221
222 The standard GNU Emacs Lisp directory tree contains the code for
223several major modes, in files such as @file{text-mode.el},
224@file{texinfo.el}, @file{lisp-mode.el}, and @file{rmail.el}. You can
225study these libraries to see how modes are written.
226
227@defopt major-mode
228The buffer-local value of this variable holds the symbol for the current
229major mode. Its default value holds the default major mode for new
230buffers. The standard default value is @code{fundamental-mode}.
231
232If the default value is @code{nil}, then whenever Emacs creates a new
233buffer via a command such as @kbd{C-x b} (@code{switch-to-buffer}), the
234new buffer is put in the major mode of the previously current buffer.
235As an exception, if the major mode of the previous buffer has a
236@code{mode-class} symbol property with value @code{special}, the new
237buffer is put in Fundamental mode (@pxref{Major Mode Conventions}).
238@end defopt
205 239
206@menu 240@menu
207* Major Mode Basics:: 241* Major Mode Conventions:: Coding conventions for keymaps, etc.
208* Major Mode Conventions:: Coding conventions for keymaps, etc. 242* Auto Major Mode:: How Emacs chooses the major mode automatically.
209* Auto Major Mode:: How Emacs chooses the major mode automatically. 243* Mode Help:: Finding out how to use a mode.
210* Mode Help:: Finding out how to use a mode. 244* Derived Modes:: Defining a new major mode based on another major
211* Derived Modes:: Defining a new major mode based on another major
212 mode. 245 mode.
213* Generic Modes:: Defining a simple major mode that supports 246* Basic Major Modes:: Modes that other modes are often derived from.
247* Generic Modes:: Defining a simple major mode that supports
214 comment syntax and Font Lock mode. 248 comment syntax and Font Lock mode.
215* Mode Hooks:: Hooks run at the end of major mode functions. 249* Mode Hooks:: Hooks run at the end of major mode commands.
216* Example Major Modes:: Text mode and Lisp modes. 250* Example Major Modes:: Text mode and Lisp modes.
217@end menu 251@end menu
218 252
219@node Major Mode Basics
220@subsection Major Mode Basics
221@cindex Fundamental mode
222
223 The least specialized major mode is called @dfn{Fundamental mode}.
224This mode has no mode-specific definitions or variable settings, so each
225Emacs command behaves in its default manner, and each option is in its
226default state. All other major modes redefine various keys and options.
227For example, Lisp Interaction mode provides special key bindings for
228@kbd{C-j} (@code{eval-print-last-sexp}), @key{TAB}
229(@code{lisp-indent-line}), and other keys.
230
231 When you need to write several editing commands to help you perform a
232specialized editing task, creating a new major mode is usually a good
233idea. In practice, writing a major mode is easy (in contrast to
234writing a minor mode, which is often difficult).
235
236 If the new mode is similar to an old one, it is often unwise to
237modify the old one to serve two purposes, since it may become harder
238to use and maintain. Instead, copy and rename an existing major mode
239definition and alter the copy---or use the @code{define-derived-mode}
240macro to define a @dfn{derived mode} (@pxref{Derived Modes}). For
241example, Rmail Edit mode is a major mode that is very similar to Text
242mode except that it provides two additional commands. Its definition
243is distinct from that of Text mode, but uses that of Text mode.
244
245 Even if the new mode is not an obvious derivative of any other mode,
246we recommend to use @code{define-derived-mode}, since it automatically
247enforces the most important coding conventions for you.
248
249 For a very simple programming language major mode that handles
250comments and fontification, you can use @code{define-generic-mode}.
251@xref{Generic Modes}.
252
253 Rmail Edit mode offers an example of changing the major mode
254temporarily for a buffer, so it can be edited in a different way (with
255ordinary Emacs commands rather than Rmail commands). In such cases, the
256temporary major mode usually provides a command to switch back to the
257buffer's usual mode (Rmail mode, in this case). You might be tempted to
258present the temporary redefinitions inside a recursive edit and restore
259the usual ones when the user exits; but this is a bad idea because it
260constrains the user's options when it is done in more than one buffer:
261recursive edits must be exited most-recently-entered first. Using an
262alternative major mode avoids this limitation. @xref{Recursive
263Editing}.
264
265 The standard GNU Emacs Lisp library directory tree contains the code
266for several major modes, in files such as @file{text-mode.el},
267@file{texinfo.el}, @file{lisp-mode.el}, @file{c-mode.el}, and
268@file{rmail.el}. They are found in various subdirectories of the
269@file{lisp} directory. You can study these libraries to see how modes
270are written. Text mode is perhaps the simplest major mode aside from
271Fundamental mode. Rmail mode is a complicated and specialized mode.
272
273@node Major Mode Conventions 253@node Major Mode Conventions
274@subsection Major Mode Conventions 254@subsection Major Mode Conventions
275@cindex major mode conventions 255@cindex major mode conventions
276@cindex conventions for writing major modes 256@cindex conventions for writing major modes
277 257
278 The code for existing major modes follows various coding conventions, 258 The code for every major mode should follow various coding
279including conventions for local keymap and syntax table initialization, 259conventions, including conventions for local keymap and syntax table
280global names, and hooks. Please follow these conventions when you 260initialization, function and variable names, and hooks.
281define a new major mode. (Fundamental mode is an exception to many 261
282of these conventions, because its definition is to present the global 262 If you use the @code{define-derived-mode} macro, it will take care of
283state of Emacs.) 263many of these conventions automatically. @xref{Derived Modes}. Note
264also that fundamental mode is an exception to many of these conventions,
265because its definition is to present the global state of Emacs.
284 266
285 This list of conventions is only partial, because each major mode 267 The following list of conventions is only partial. Each major mode
286should aim for consistency in general with other Emacs major modes. 268should aim for consistency in general with other Emacs major modes, as
287This makes Emacs as a whole more coherent. It is impossible to list 269this makes Emacs as a whole more coherent. It is impossible to list
288here all the possible points where this issue might come up; if the 270here all the possible points where this issue might come up; if the
289Emacs developers point out an area where your major mode deviates from 271Emacs developers point out an area where your major mode deviates from
290the usual conventions, please make it compatible. 272the usual conventions, please make it compatible.
291 273
292@itemize @bullet 274@itemize @bullet
293@item 275@item
294Define a command whose name ends in @samp{-mode}, with no arguments, 276Define a major mode command whose name ends in @samp{-mode}. When
295that switches to the new mode in the current buffer. This command 277called with no arguments, this command should switch to the new mode in
296should set up the keymap, syntax table, and buffer-local variables in an 278the current buffer by setting up the keymap, syntax table, and
297existing buffer, without changing the buffer's contents. 279buffer-local variables in an existing buffer. It should not change the
280buffer's contents.
298 281
299@item 282@item
300Write a documentation string for this command that describes the 283Write a documentation string for this command that describes the special
301special commands available in this mode. @kbd{C-h m} 284commands available in this mode. @xref{Mode Help}.
302(@code{describe-mode}) in your mode will display this string.
303 285
304The documentation string may include the special documentation 286The documentation string may include the special documentation
305substrings, @samp{\[@var{command}]}, @samp{\@{@var{keymap}@}}, and 287substrings, @samp{\[@var{command}]}, @samp{\@{@var{keymap}@}}, and
306@samp{\<@var{keymap}>}, which enable the documentation to adapt 288@samp{\<@var{keymap}>}, which allow the help display to adapt
307automatically to the user's own key bindings. @xref{Keys in 289automatically to the user's own key bindings. @xref{Keys in
308Documentation}. 290Documentation}.
309 291
@@ -421,28 +403,7 @@ setting up a buffer-local value for the variable
421 403
422@item 404@item
423Each face that the mode defines should, if possible, inherit from an 405Each face that the mode defines should, if possible, inherit from an
424existing Emacs face. This reduces the chance of conflicting with a 406existing Emacs face. @xref{Basic Faces}, and @ref{Faces for Font Lock}.
425user's face customizations. Useful faces include:
426
427@table @asis
428@item @code{highlight}
429for stretches of text that should temporarily stand out.
430
431@item @code{match}
432for text matching a search command.
433
434@item @code{link} and @code{link-visited}
435for clickable text buttons that send the user to a different buffer or
436``location''.
437
438@item @code{button}
439for clickable text buttons that perform other actions.
440
441@item @asis{Font Lock faces}
442for other kinds of syntactic highlighting, if highlighting is not
443handled by Font Lock mode or some Font Lock faces are not in use.
444@xref{Faces for Font Lock}, for how to assign Font Lock faces.
445@end table
446 407
447@item 408@item
448The mode should specify how Imenu should find the definitions or 409The mode should specify how Imenu should find the definitions or
@@ -505,27 +466,31 @@ this mode to any other major mode, this mode can set up a buffer-local
505value for @code{change-major-mode-hook} (@pxref{Creating Buffer-Local}). 466value for @code{change-major-mode-hook} (@pxref{Creating Buffer-Local}).
506 467
507@item 468@item
508If this mode is appropriate only for specially-prepared text, then the 469If this mode is appropriate only for specially-prepared text produced by
509major mode command symbol should have a property named @code{mode-class} 470the mode itself (rather than by the user typing at the keyboard or by an
510with value @code{special}, put on as follows: 471external file), then the major mode command symbol should have a
472property named @code{mode-class} with value @code{special}, put on as
473follows:
511 474
512@kindex mode-class @r{(property)} 475@kindex mode-class @r{(property)}
513@cindex @code{special} 476@cindex @code{special} modes
514@example 477@example
515(put 'funny-mode 'mode-class 'special) 478(put 'funny-mode 'mode-class 'special)
516@end example 479@end example
517 480
518@noindent 481@noindent
519This tells Emacs that new buffers created while the current buffer is 482This tells Emacs that new buffers created while the current buffer is in
520in Funny mode should not inherit Funny mode, in case the default value 483Funny mode should not be put in Funny mode, even though the default
521of @code{major-mode} is @code{nil}. Modes such as Dired, Rmail, 484value of @code{major-mode} is @code{nil}. By default, the value of
522and Buffer List use this feature. 485@code{nil} for @code{major-mode} means to use the current buffer's major
486mode when creating new buffers (@pxref{Auto Major Mode}), but with such
487@code{special} modes, Fundamental mode is used instead. Modes such as
488Dired, Rmail, and Buffer List use this feature.
523 489
524The @code{define-derived-mode} macro automatically marks the derived 490The @code{define-derived-mode} macro automatically marks the derived
525mode as special if the parent mode is special. The special mode 491mode as special if the parent mode is special. Special mode is a
526@code{special-mode} provides a convenient parent for other special 492convenient parent for such modes to inherit from; @xref{Basic Major
527modes to inherit from; it sets @code{buffer-read-only} to @code{t}, 493Modes}.
528and does little else.
529 494
530@item 495@item
531If you want to make the new mode the default for files with certain 496If you want to make the new mode the default for files with certain
@@ -559,16 +524,6 @@ Even if you never load the file more than once, someone else will.
559automatically selects a major mode for the new buffer when a file is 524automatically selects a major mode for the new buffer when a file is
560visited. It also processes local variables specified in the file text. 525visited. It also processes local variables specified in the file text.
561 526
562@deffn Command fundamental-mode
563 Fundamental mode is a major mode that is not specialized for anything
564in particular. Other major modes are defined in effect by comparison
565with this one---their definitions say what to change, starting from
566Fundamental mode. The @code{fundamental-mode} function does @emph{not}
567run any mode hooks; you're not supposed to customize it. (If you want Emacs
568to behave differently in Fundamental mode, change the @emph{global}
569state of Emacs.)
570@end deffn
571
572@deffn Command normal-mode &optional find-file 527@deffn Command normal-mode &optional find-file
573This function establishes the proper major mode and buffer-local variable 528This function establishes the proper major mode and buffer-local variable
574bindings for the current buffer. First it calls @code{set-auto-mode} 529bindings for the current buffer. First it calls @code{set-auto-mode}
@@ -594,23 +549,22 @@ by the default value of @code{major-mode} (see below).
594 549
595@cindex file mode specification error 550@cindex file mode specification error
596@code{normal-mode} uses @code{condition-case} around the call to the 551@code{normal-mode} uses @code{condition-case} around the call to the
597major mode function, so errors are caught and reported as a @samp{File 552major mode command, so errors are caught and reported as a @samp{File
598mode specification error}, followed by the original error message. 553mode specification error}, followed by the original error message.
599@end deffn 554@end deffn
600 555
601@defun set-auto-mode &optional keep-mode-if-same 556@defun set-auto-mode &optional keep-mode-if-same
602@cindex visited file mode 557@cindex visited file mode
603 This function selects the major mode that is appropriate for the 558 This function selects the major mode that is appropriate for the
604current buffer. It bases its decision (in order of precedence) on 559current buffer. It bases its decision (in order of precedence) on the
605the @w{@samp{-*-}} line, on any @samp{mode:} local variable near the 560@w{@samp{-*-}} line, on any @samp{mode:} local variable near the end of
606end of a file, on the @w{@samp{#!}} line (using 561a file, on the @w{@samp{#!}} line (using @code{interpreter-mode-alist}),
607@code{interpreter-mode-alist}), on the text at the beginning of the 562on the text at the beginning of the buffer (using
608buffer (using @code{magic-mode-alist}), and finally on the visited 563@code{magic-mode-alist}), and finally on the visited file name (using
609file name (using @code{auto-mode-alist}). @xref{Choosing Modes, , How 564@code{auto-mode-alist}). @xref{Choosing Modes, , How Major Modes are
610Major Modes are Chosen, emacs, The GNU Emacs Manual}. 565Chosen, emacs, The GNU Emacs Manual}. If @code{enable-local-variables}
611If @code{enable-local-variables} is @code{nil}, @code{set-auto-mode} 566is @code{nil}, @code{set-auto-mode} does not check the @w{@samp{-*-}}
612does not check the @w{@samp{-*-}} line, or near the end of the file, 567line, or near the end of the file, for any mode tag.
613for any mode tag.
614 568
615If @var{keep-mode-if-same} is non-@code{nil}, this function does not 569If @var{keep-mode-if-same} is non-@code{nil}, this function does not
616call the mode command if the buffer is already in the proper major 570call the mode command if the buffer is already in the proper major
@@ -619,21 +573,6 @@ mode. For instance, @code{set-visited-file-name} sets this to
619have set. 573have set.
620@end defun 574@end defun
621 575
622@defopt major-mode
623The buffer-local value of this variable holds the major mode
624currently active. The default value of this variable holds the
625default major mode for new buffers. The standard default value is
626@code{fundamental-mode}.
627
628If the default value of @code{major-mode} is @code{nil}, Emacs uses
629the (previously) current buffer's major mode as the default major mode
630of a new buffer. However, if that major mode symbol has a @code{mode-class}
631property with value @code{special}, then it is not used for new buffers;
632Fundamental mode is used instead. The modes that have this property are
633those such as Dired and Rmail that are useful only with text that has
634been specially prepared.
635@end defopt
636
637@defun set-buffer-major-mode buffer 576@defun set-buffer-major-mode buffer
638This function sets the major mode of @var{buffer} to the default value of 577This function sets the major mode of @var{buffer} to the default value of
639@code{major-mode}; if that is @code{nil}, it uses the 578@code{major-mode}; if that is @code{nil}, it uses the
@@ -740,38 +679,30 @@ init file.)
740@cindex help for major mode 679@cindex help for major mode
741@cindex documentation for major mode 680@cindex documentation for major mode
742 681
743 The @code{describe-mode} function is used to provide information 682 The @code{describe-mode} function is provides information about major
744about major modes. It is normally called with @kbd{C-h m}. The 683modes. It is normally bound to @kbd{C-h m}. It uses the value of the
745@code{describe-mode} function uses the value of @code{major-mode}, 684variable @code{major-mode} (@pxref{Major Modes}), which is why every
746which is why every major mode function needs to set the 685major mode command needs to set that variable.
747@code{major-mode} variable.
748 686
749@deffn Command describe-mode 687@deffn Command describe-mode
750This function displays the documentation of the current major mode. 688This function displays the documentation of the current major mode.
751 689
752The @code{describe-mode} function calls the @code{documentation} 690The @code{describe-mode} function calls the @code{documentation}
753function using the value of @code{major-mode} as an argument. Thus, it 691function using the value of @code{major-mode} as an argument. Thus, it
754displays the documentation string of the major mode function. 692displays the documentation string of the major mode command.
755(@xref{Accessing Documentation}.) 693(@xref{Accessing Documentation}.)
756@end deffn 694@end deffn
757 695
758@defvar major-mode
759This buffer-local variable holds the symbol for the current buffer's
760major mode. This symbol should have a function definition that is the
761command to switch to that major mode. The @code{describe-mode}
762function uses the documentation string of the function as the
763documentation of the major mode.
764@end defvar
765
766@node Derived Modes 696@node Derived Modes
767@subsection Defining Derived Modes 697@subsection Defining Derived Modes
768@cindex derived mode 698@cindex derived mode
769 699
770 The recommended way to define a new major mode is to derive it 700 The recommended way to define a new major mode is to derive it from an
771from an existing one using @code{define-derived-mode}. If there is no 701existing one using @code{define-derived-mode}. If there is no closely
772closely related mode, you can inherit from @code{text-mode}, 702related mode, you should inherit from either @code{text-mode},
773@code{special-mode}, @code{prog-mode}, or in the worst case 703@code{special-mode}, or @code{prog-mode}. @xref{Basic Major Modes}. If
774@code{fundamental-mode}. 704none of these are suitable, you can inherit from @code{fundamental-mode}
705(@pxref{Major Modes}).
775 706
776@defmac define-derived-mode variant parent name docstring keyword-args@dots{} body@dots{} 707@defmac define-derived-mode variant parent name docstring keyword-args@dots{} body@dots{}
777This macro defines @var{variant} as a major mode command, using 708This macro defines @var{variant} as a major mode command, using
@@ -872,6 +803,64 @@ Do not write an @code{interactive} spec in the definition;
872@code{define-derived-mode} does that automatically. 803@code{define-derived-mode} does that automatically.
873@end defmac 804@end defmac
874 805
806@defun derived-mode-p &rest modes
807This function returns non-@code{nil} if the current major mode is
808derived from any of the major modes given by the symbols @var{modes}.
809@end defun
810
811@node Basic Major Modes
812@subsection Basic Major Modes
813
814 Apart from Fundamental mode, there are three major modes that other
815major modes commonly derive from: Text mode, Prog mode, and Special
816mode. While Text mode is useful in its own right (e.g. for editing
817files ending in @file{.txt}), Prog mode and Special mode exist mainly to
818let other modes derive from them.
819
820@vindex prog-mode-hook
821 As far as possible, new major modes should be derived, either directly
822or indirectly, from one of these three modes. One reason is that this
823allows users to customize a single mode hook
824(e.g. @code{prog-mode-hook}) for an entire family of relevant modes
825(e.g. all programming language modes).
826
827@deffn Command text-mode
828Text mode is a major mode for editing human languages. It defines the
829@samp{"} and @samp{\} characters as having punctuation syntax
830(@pxref{Syntax Class Table}), and binds @kbd{M-@key{TAB}} to
831@code{ispell-complete-word} (@pxref{Spelling,,, emacs, The GNU Emacs
832Manual}).
833
834An example of a major mode derived from Text mode is HTML mode.
835@xref{HTML Mode,,SGML and HTML Modes, emacs, The GNU Emacs Manual}.
836@end deffn
837
838@deffn Command prog-mode
839Prog mode is a basic major mode for buffers containing programming
840language source code. Most of the programming language major modes
841built into Emacs are derived from it.
842
843Prog mode binds @code{parse-sexp-ignore-comments} to @code{t}
844(@pxref{Motion via Parsing}) and @code{bidi-paragraph-direction} to
845@code{left-to-right} (@pxref{Bidirectional Display}).
846@end deffn
847
848@deffn Command special-mode
849Special mode is a basic major mode for buffers containing text that is
850produced specially by Emacs, rather than from a file. Major modes
851derived from Special mode are given a @code{mode-class} property of
852@code{special} (@pxref{Major Mode Conventions}).
853
854Special mode sets the buffer to read-only. Its keymap defines several
855common bindings, including @kbd{q} for @code{quit-window}, @kbd{z} for
856@code{kill-this-buffer}, and @kbd{g} for @code{revert-buffer}
857(@pxref{Reverting}).
858
859An example of a major mode derived from Special mode is Buffer Menu
860mode, which is used by the @samp{*Buffer List*} buffer. @xref{List
861Buffers,,Listing Existing Buffers, emacs, The GNU Emacs Manual}.
862@end deffn
863
875@node Generic Modes 864@node Generic Modes
876@subsection Generic Modes 865@subsection Generic Modes
877@cindex generic mode 866@cindex generic mode
@@ -916,7 +905,7 @@ before it runs the mode hook variable @code{@var{mode}-hook}.
916@node Mode Hooks 905@node Mode Hooks
917@subsection Mode Hooks 906@subsection Mode Hooks
918 907
919 Every major mode function should finish by running its mode hook and 908 Every major mode command should finish by running its mode hook and
920the mode-independent normal hook @code{after-change-major-mode-hook}. 909the mode-independent normal hook @code{after-change-major-mode-hook}.
921It does this by calling @code{run-mode-hooks}. If the major mode is a 910It does this by calling @code{run-mode-hooks}. If the major mode is a
922derived mode, that is if it calls another major mode (the parent mode) 911derived mode, that is if it calls another major mode (the parent mode)
@@ -961,7 +950,7 @@ construct.
961 950
962@defvar after-change-major-mode-hook 951@defvar after-change-major-mode-hook
963This is a normal hook run by @code{run-mode-hooks}. It is run at the 952This is a normal hook run by @code{run-mode-hooks}. It is run at the
964very end of every properly-written major mode function. 953very end of every properly-written major mode command.
965@end defvar 954@end defvar
966 955
967@node Example Major Modes 956@node Example Major Modes
@@ -1189,8 +1178,8 @@ And here is the code to set up the keymap for Lisp mode:
1189@end group 1178@end group
1190@end smallexample 1179@end smallexample
1191 1180
1192 Finally, here is the complete major mode function definition for 1181 Finally, here is the complete major mode command definition for Lisp
1193Lisp mode. 1182mode.
1194 1183
1195@smallexample 1184@smallexample
1196@group 1185@group
@@ -2747,10 +2736,10 @@ highlighting patterns. See the variables
2747@code{c-font-lock-extra-types}, @code{c++-font-lock-extra-types}, 2736@code{c-font-lock-extra-types}, @code{c++-font-lock-extra-types},
2748and @code{java-font-lock-extra-types}, for example. 2737and @code{java-font-lock-extra-types}, for example.
2749 2738
2750@strong{Warning:} major mode functions must not call 2739@strong{Warning:} major mode commands must not call
2751@code{font-lock-add-keywords} under any circumstances, either directly 2740@code{font-lock-add-keywords} under any circumstances, either directly
2752or indirectly, except through their mode hooks. (Doing so would lead 2741or indirectly, except through their mode hooks. (Doing so would lead to
2753to incorrect behavior for some minor modes.) They should set up their 2742incorrect behavior for some minor modes.) They should set up their
2754rules for search-based fontification by setting 2743rules for search-based fontification by setting
2755@code{font-lock-keywords}. 2744@code{font-lock-keywords}.
2756@end defun 2745@end defun
diff --git a/doc/lispref/nonascii.texi b/doc/lispref/nonascii.texi
index 77337899923..298c7c3d1a8 100644
--- a/doc/lispref/nonascii.texi
+++ b/doc/lispref/nonascii.texi
@@ -369,6 +369,12 @@ replacing each @samp{_} character with a dash @samp{-}. For example,
369@code{canonical-combining-class}. However, sometimes we shorten the 369@code{canonical-combining-class}. However, sometimes we shorten the
370names to make their use easier. 370names to make their use easier.
371 371
372@cindex unassigned character codepoints
373 Some codepoints are left @dfn{unassigned} by the
374@acronym{UCD}---they don't correspond to any character. The Unicode
375Standard defines default values of properties for such codepoints;
376they are mentioned below for each property.
377
372 Here is the full list of value types for all the character 378 Here is the full list of value types for all the character
373properties that Emacs knows about: 379properties that Emacs knows about:
374 380
@@ -376,22 +382,31 @@ properties that Emacs knows about:
376@item name 382@item name
377Corresponds to the @code{Name} Unicode property. The value is a 383Corresponds to the @code{Name} Unicode property. The value is a
378string consisting of upper-case Latin letters A to Z, digits, spaces, 384string consisting of upper-case Latin letters A to Z, digits, spaces,
379and hyphen @samp{-} characters. 385and hyphen @samp{-} characters. For unassigned codepoints, the value
386is an empty string.
380 387
381@cindex unicode general category 388@cindex unicode general category
382@item general-category 389@item general-category
383Corresponds to the @code{General_Category} Unicode property. The 390Corresponds to the @code{General_Category} Unicode property. The
384value is a symbol whose name is a 2-letter abbreviation of the 391value is a symbol whose name is a 2-letter abbreviation of the
385character's classification. 392character's classification. For unassigned codepoints, the value
393is @code{Cn}.
386 394
387@item canonical-combining-class 395@item canonical-combining-class
388Corresponds to the @code{Canonical_Combining_Class} Unicode property. 396Corresponds to the @code{Canonical_Combining_Class} Unicode property.
389The value is an integer number. 397The value is an integer number. For unassigned codepoints, the value
398is zero.
390 399
400@cindex bidirectional class of characters
391@item bidi-class 401@item bidi-class
392Corresponds to the Unicode @code{Bidi_Class} property. The value is a 402Corresponds to the Unicode @code{Bidi_Class} property. The value is a
393symbol whose name is the Unicode @dfn{directional type} of the 403symbol whose name is the Unicode @dfn{directional type} of the
394character. 404character. Emacs uses this property when it reorders bidirectional
405text for display (@pxref{Bidirectional Display}). For unassigned
406codepoints, the value depends on the code blocks to which the
407codepoint belongs: most unassigned codepoints get the value of
408@code{L} (strong L), but some get values of @code{AL} (Arabic letter)
409or @code{R} (strong R).
395 410
396@item decomposition 411@item decomposition
397Corresponds to the Unicode @code{Decomposition_Type} and 412Corresponds to the Unicode @code{Decomposition_Type} and
@@ -403,19 +418,22 @@ Note that the Unicode spec writes these tag names inside
403brackets; e.g., Unicode specifies @samp{<small>} where Emacs uses 418brackets; e.g., Unicode specifies @samp{<small>} where Emacs uses
404@samp{small}. 419@samp{small}.
405}; the other elements are characters that give the compatibility 420}; the other elements are characters that give the compatibility
406decomposition sequence of this character. 421decomposition sequence of this character. For unassigned codepoints,
422the value is the character itself.
407 423
408@item decimal-digit-value 424@item decimal-digit-value
409Corresponds to the Unicode @code{Numeric_Value} property for 425Corresponds to the Unicode @code{Numeric_Value} property for
410characters whose @code{Numeric_Type} is @samp{Digit}. The value is an 426characters whose @code{Numeric_Type} is @samp{Digit}. The value is an
411integer number. 427integer number. For unassigned codepoints, the value is @code{nil},
428which means @acronym{NaN}, or ``not-a-number''.
412 429
413@item digit-value 430@item digit-value
414Corresponds to the Unicode @code{Numeric_Value} property for 431Corresponds to the Unicode @code{Numeric_Value} property for
415characters whose @code{Numeric_Type} is @samp{Decimal}. The value is 432characters whose @code{Numeric_Type} is @samp{Decimal}. The value is
416an integer number. Examples of such characters include compatibility 433an integer number. Examples of such characters include compatibility
417subscript and superscript digits, for which the value is the 434subscript and superscript digits, for which the value is the
418corresponding number. 435corresponding number. For unassigned codepoints, the value is
436@code{nil}, which means @acronym{NaN}.
419 437
420@item numeric-value 438@item numeric-value
421Corresponds to the Unicode @code{Numeric_Value} property for 439Corresponds to the Unicode @code{Numeric_Value} property for
@@ -424,33 +442,53 @@ this property is an integer or a floating-point number. Examples of
424characters that have this property include fractions, subscripts, 442characters that have this property include fractions, subscripts,
425superscripts, Roman numerals, currency numerators, and encircled 443superscripts, Roman numerals, currency numerators, and encircled
426numbers. For example, the value of this property for the character 444numbers. For example, the value of this property for the character
427@code{U+2155} (@sc{vulgar fraction one fifth}) is @code{0.2}. 445@code{U+2155} (@sc{vulgar fraction one fifth}) is @code{0.2}. For
446unassigned codepoints, the value is @code{nil}, which means
447@acronym{NaN}.
428 448
449@cindex mirroring of characters
429@item mirrored 450@item mirrored
430Corresponds to the Unicode @code{Bidi_Mirrored} property. The value 451Corresponds to the Unicode @code{Bidi_Mirrored} property. The value
431of this property is a symbol, either @code{Y} or @code{N}. 452of this property is a symbol, either @code{Y} or @code{N}. For
453unassigned codepoints, the value is @code{N}.
454
455@item mirroring
456Corresponds to the Unicode @code{Bidi_Mirroring_Glyph} property. The
457value of this property is a character whose glyph represents the
458mirror image of the character's glyph, or @code{nil} if there's no
459defined mirroring glyph. All the characters whose @code{mirrored}
460property is @code{N} have @code{nil} as their @code{mirroring}
461property; however, some characters whose @code{mirrored} property is
462@code{Y} also have @code{nil} for @code{mirroring}, because no
463appropriate characters exist with mirrored glyphs. Emacs uses this
464property to display mirror images of characters when appropriate
465(@pxref{Bidirectional Display}). For unassigned codepoints, the value
466is @code{nil}.
432 467
433@item old-name 468@item old-name
434Corresponds to the Unicode @code{Unicode_1_Name} property. The value 469Corresponds to the Unicode @code{Unicode_1_Name} property. The value
435is a string. 470is a string. For unassigned codepoints, the value is an empty string.
436 471
437@item iso-10646-comment 472@item iso-10646-comment
438Corresponds to the Unicode @code{ISO_Comment} property. The value is 473Corresponds to the Unicode @code{ISO_Comment} property. The value is
439a string. 474a string. For unassigned codepoints, the value is an empty string.
440 475
441@item uppercase 476@item uppercase
442Corresponds to the Unicode @code{Simple_Uppercase_Mapping} property. 477Corresponds to the Unicode @code{Simple_Uppercase_Mapping} property.
443The value of this property is a single character. 478The value of this property is a single character. For unassigned
479codepoints, the value is @code{nil}, which means the character itself.
444 480
445@item lowercase 481@item lowercase
446Corresponds to the Unicode @code{Simple_Lowercase_Mapping} property. 482Corresponds to the Unicode @code{Simple_Lowercase_Mapping} property.
447The value of this property is a single character. 483The value of this property is a single character. For unassigned
484codepoints, the value is @code{nil}, which means the character itself.
448 485
449@item titlecase 486@item titlecase
450Corresponds to the Unicode @code{Simple_Titlecase_Mapping} property. 487Corresponds to the Unicode @code{Simple_Titlecase_Mapping} property.
451@dfn{Title case} is a special form of a character used when the first 488@dfn{Title case} is a special form of a character used when the first
452character of a word needs to be capitalized. The value of this 489character of a word needs to be capitalized. The value of this
453property is a single character. 490property is a single character. For unassigned codepoints, the value
491is @code{nil}, which means the character itself.
454@end table 492@end table
455 493
456@defun get-char-code-property char propname 494@defun get-char-code-property char propname
diff --git a/doc/lispref/objects.texi b/doc/lispref/objects.texi
index 6d63bb7b750..26def7858b7 100644
--- a/doc/lispref/objects.texi
+++ b/doc/lispref/objects.texi
@@ -597,6 +597,7 @@ FOO ; @r{A symbol named @samp{FOO}, different from @samp{foo}.}
597@end group 597@end group
598@end example 598@end example
599 599
600@cindex @samp{##} read syntax
600@ifinfo 601@ifinfo
601@c This uses ``colon'' instead of a literal `:' because Info cannot 602@c This uses ``colon'' instead of a literal `:' because Info cannot
602@c cope with a `:' in a menu 603@c cope with a `:' in a menu
@@ -605,9 +606,12 @@ FOO ; @r{A symbol named @samp{FOO}, different from @samp{foo}.}
605@ifnotinfo 606@ifnotinfo
606@cindex @samp{#:} read syntax 607@cindex @samp{#:} read syntax
607@end ifnotinfo 608@end ifnotinfo
608 Normally the Lisp reader interns all symbols (@pxref{Creating 609 As an exception to the rule that a symbol's name serves as its
609Symbols}). To prevent interning, you can write @samp{#:} before the 610printed representation, @samp{##} is the printed representation for an
610name of the symbol. 611interned symbol whose name is an empty string. Furthermore,
612@samp{#:@var{foo}} is the printed representation for an uninterned
613symbol whose name is @var{foo}. (Normally, the Lisp reader interns
614all symbols; @pxref{Creating Symbols}.)
611 615
612@node Sequence Type 616@node Sequence Type
613@subsection Sequence Types 617@subsection Sequence Types
diff --git a/doc/lispref/os.texi b/doc/lispref/os.texi
index 5f422065c5b..7d05f8f3468 100644
--- a/doc/lispref/os.texi
+++ b/doc/lispref/os.texi
@@ -544,10 +544,11 @@ parent process normally resumes control. The low-level primitive for
544killing Emacs is @code{kill-emacs}. 544killing Emacs is @code{kill-emacs}.
545 545
546@deffn Command kill-emacs &optional exit-data 546@deffn Command kill-emacs &optional exit-data
547This command exits the Emacs process and kills it. 547This command calls the hook @code{kill-emacs-hook}, then exits the
548Emacs process and kills it.
548 549
549If @var{exit-data} is an integer, then it is used as the exit status 550If @var{exit-data} is an integer, that is used as the exit status of
550of the Emacs process. (This is useful primarily in batch operation; see 551the Emacs process. (This is useful primarily in batch operation; see
551@ref{Batch Mode}.) 552@ref{Batch Mode}.)
552 553
553If @var{exit-data} is a string, its contents are stuffed into the 554If @var{exit-data} is a string, its contents are stuffed into the
@@ -555,35 +556,44 @@ terminal input buffer so that the shell (or whatever program next reads
555input) can read them. 556input) can read them.
556@end deffn 557@end deffn
557 558
558 All the information in the Emacs process, aside from files that have 559@cindex SIGTERM
559been saved, is lost when the Emacs process is killed. Because killing 560@cindex SIGHUP
560Emacs inadvertently can lose a lot of work, Emacs queries for 561@cindex SIGINT
561confirmation before actually terminating if you have buffers that need 562@cindex operating system signal
562saving or subprocesses that are running. This is done in the function 563 The @code{kill-emacs} function is normally called via the
563@code{save-buffers-kill-emacs}, the higher level function from which 564higher-level command @kbd{C-x C-c}
564@code{kill-emacs} is usually called. 565(@code{save-buffers-kill-terminal}). @xref{Exiting,,, emacs, The GNU
566Emacs Manual}. It is also called automatically if Emacs receives a
567@code{SIGTERM} or @code{SIGHUP} operating system signal (e.g. when the
568controlling terminal is disconnected), or if it receives a
569@code{SIGINT} signal while running in batch mode (@pxref{Batch Mode}).
565 570
566@defvar kill-emacs-query-functions 571@defvar kill-emacs-hook
567After asking the standard questions, @code{save-buffers-kill-emacs} 572This normal hook is run by @code{kill-emacs}, before it kills Emacs.
568calls the functions in the list @code{kill-emacs-query-functions}, in 573
569order of appearance, with no arguments. These functions can ask for 574Because @code{kill-emacs} can be called in situations where user
570additional confirmation from the user. If any of them returns 575interaction is impossible (e.g. when the terminal is disconnected),
571@code{nil}, @code{save-buffers-kill-emacs} does not kill Emacs, and 576functions on this hook should not attempt to interact with the user.
572does not run the remaining functions in this hook. Calling 577If you want to interact with the user when Emacs is shutting down, use
573@code{kill-emacs} directly does not run this hook. 578@code{kill-emacs-query-functions}, described below.
574@end defvar 579@end defvar
575 580
576@defvar kill-emacs-hook 581 When Emacs is killed, all the information in the Emacs process,
577This variable is a normal hook; once @code{save-buffers-kill-emacs} is 582aside from files that have been saved, is lost. Because killing Emacs
578finished with all file saving and confirmation, it calls 583inadvertently can lose a lot of work, the
579@code{kill-emacs} which runs the functions in this hook. 584@code{save-buffers-kill-terminal} command queries for confirmation if
580 585you have buffers that need saving or subprocesses that are running.
581@code{kill-emacs} may be invoked directly (that is not via 586It also runs the abnormal hook @code{kill-emacs-query-functions}:
582@code{save-buffers-kill-emacs}) if the terminal is disconnected, or in 587
583similar situations where interaction with the user is not possible. 588@defvar kill-emacs-query-functions
584Thus, if your hook needs to interact with the user, put it on 589When @code{save-buffers-kill-terminal} is killing Emacs, it calls the
585@code{kill-emacs-query-functions}; if it needs to run regardless of 590functions in this hook, after asking the standard questions and before
586how Emacs is killed, put it on @code{kill-emacs-hook}. 591calling @code{kill-emacs}. The functions are called in order of
592appearance, with no arguments. Each function can ask for additional
593confirmation from the user. If any of them returns @code{nil},
594@code{save-buffers-kill-emacs} does not kill Emacs, and does not run
595the remaining functions in this hook. Calling @code{kill-emacs}
596directly does not run this hook.
587@end defvar 597@end defvar
588 598
589@node Suspending Emacs 599@node Suspending Emacs
@@ -1143,6 +1153,18 @@ get with the function @code{file-attributes}.
1143@xref{Definition of file-attributes}. 1153@xref{Definition of file-attributes}.
1144@end defun 1154@end defun
1145 1155
1156@defun float-time &optional time-value
1157This function returns the current time as a floating-point number of
1158seconds since the epoch. The argument @var{time-value}, if given,
1159specifies a time to convert instead of the current time. The argument
1160should have the same form as for @code{current-time-string} (see
1161above). Thus, it accepts the output of @code{current-time} and
1162@code{file-attributes} (@pxref{Definition of file-attributes}).
1163
1164@emph{Warning}: Since the result is floating point, it may not be
1165exact. Do not use this function if precise time stamps are required.
1166@end defun
1167
1146@defun current-time-zone &optional time-value 1168@defun current-time-zone &optional time-value
1147This function returns a list describing the time zone that the user is 1169This function returns a list describing the time zone that the user is
1148in. 1170in.
@@ -1165,25 +1187,11 @@ times obtained from @code{current-time} (see above) and from
1165@code{file-attributes}. @xref{Definition of file-attributes}. 1187@code{file-attributes}. @xref{Definition of file-attributes}.
1166@end defun 1188@end defun
1167 1189
1168@defun set-time-zone-rule tz 1190The current time zone is determined by the @samp{TZ} environment
1169This function specifies the local time zone according to @var{tz}. If 1191variable. @xref{System Environment}. For example, you can tell Emacs
1170@var{tz} is @code{nil}, that means to use an implementation-defined 1192to use universal time with @code{(setenv "TZ" "UTC0")}. If @samp{TZ}
1171default time zone. If @var{tz} is @code{t}, that means to use 1193is not in the environment, Emacs uses a platform-dependent default
1172Universal Time. Otherwise, @var{tz} should be a string specifying a 1194time zone.
1173time zone rule.
1174@end defun
1175
1176@defun float-time &optional time-value
1177This function returns the current time as a floating-point number of
1178seconds since the epoch. The argument @var{time-value}, if given,
1179specifies a time to convert instead of the current time. The argument
1180should have the same form as for @code{current-time-string} (see
1181above). Thus, it accepts the output of @code{current-time} and
1182@code{file-attributes} (@pxref{Definition of file-attributes}).
1183
1184@emph{Warning}: Since the result is floating point, it may not be
1185exact. Do not use this function if precise time stamps are required.
1186@end defun
1187 1195
1188@node Time Conversion 1196@node Time Conversion
1189@section Time Conversion 1197@section Time Conversion
diff --git a/doc/lispref/searching.texi b/doc/lispref/searching.texi
index 6272301dbb4..fe7c805c6f7 100644
--- a/doc/lispref/searching.texi
+++ b/doc/lispref/searching.texi
@@ -717,11 +717,15 @@ the characters that stand for them.
717@cindex @samp{\S} in regexp 717@cindex @samp{\S} in regexp
718matches any character whose syntax is not @var{code}. 718matches any character whose syntax is not @var{code}.
719 719
720@cindex category, regexp search for
720@item \c@var{c} 721@item \c@var{c}
721matches any character whose category is @var{c}. Here @var{c} is a 722matches any character whose category is @var{c}. Here @var{c} is a
722character that represents a category: thus, @samp{c} for Chinese 723character that represents a category: thus, @samp{c} for Chinese
723characters or @samp{g} for Greek characters in the standard category 724characters or @samp{g} for Greek characters in the standard category
724table. 725table. You can see the list of all the currently defined categories
726with @kbd{M-x describe-categories @key{RET}}. You can also define
727your own categories in addition to the standard ones using the
728@code{define-category} function (@pxref{Categories}).
725 729
726@item \C@var{c} 730@item \C@var{c}
727matches any character whose category is not @var{c}. 731matches any character whose category is not @var{c}.
diff --git a/doc/lispref/syntax.texi b/doc/lispref/syntax.texi
index 31ee7eb4e7d..0d7a0c0bed4 100644
--- a/doc/lispref/syntax.texi
+++ b/doc/lispref/syntax.texi
@@ -1084,6 +1084,24 @@ defaults to the current buffer's category table.
1084@defun define-category char docstring &optional table 1084@defun define-category char docstring &optional table
1085This function defines a new category, with name @var{char} and 1085This function defines a new category, with name @var{char} and
1086documentation @var{docstring}, for the category table @var{table}. 1086documentation @var{docstring}, for the category table @var{table}.
1087
1088Here's an example of defining a new category for characters that have
1089strong right-to-left directionality (@pxref{Bidirectional Display})
1090and using it in a special category table:
1091
1092@example
1093(defvar special-category-table-for-bidi
1094 (let ((category-table (make-category-table))
1095 (uniprop-table (unicode-property-table-internal 'bidi-class)))
1096 (define-category ?R "Characters of bidi-class R, AL, or RLO"
1097 category-table)
1098 (map-char-table
1099 #'(lambda (key val)
1100 (if (memq val '(R AL RLO))
1101 (modify-category-entry key ?R category-table)))
1102 uniprop-table)
1103 category-table))
1104@end example
1087@end defun 1105@end defun
1088 1106
1089@defun category-docstring category &optional table 1107@defun category-docstring category &optional table
diff --git a/doc/lispref/text.texi b/doc/lispref/text.texi
index b91afb044f0..2348e3706dc 100644
--- a/doc/lispref/text.texi
+++ b/doc/lispref/text.texi
@@ -3015,6 +3015,11 @@ near the character. For this purpose, ``near'' means that all text
3015between the character and where the mouse is have the same 3015between the character and where the mouse is have the same
3016@code{mouse-face} property value. 3016@code{mouse-face} property value.
3017 3017
3018Emacs ignores all face attributes from the @code{mouse-face} property
3019that alter the text size (e.g. @code{:height}, @code{:weight}, and
3020@code{:slant}). Those attributes are always the same as for the
3021unhighlighted text.
3022
3018@item fontified 3023@item fontified
3019@kindex fontified @r{(text property)} 3024@kindex fontified @r{(text property)}
3020This property says whether the text is ready for display. If 3025This property says whether the text is ready for display. If
diff --git a/doc/lispref/vol1.texi b/doc/lispref/vol1.texi
index 3b7718814b5..1275628cc94 100644
--- a/doc/lispref/vol1.texi
+++ b/doc/lispref/vol1.texi
@@ -786,8 +786,7 @@ Major and Minor Modes
786* Major Modes:: Defining major modes. 786* Major Modes:: Defining major modes.
787* Minor Modes:: Defining minor modes. 787* Minor Modes:: Defining minor modes.
788* Mode Line Format:: Customizing the text that appears in the mode line. 788* Mode Line Format:: Customizing the text that appears in the mode line.
789* Imenu:: How a mode can provide a menu 789* Imenu:: Providing a menu of definitions made in a buffer.
790 of definitions in the buffer.
791* Font Lock Mode:: How modes can highlight text according to syntax. 790* Font Lock Mode:: How modes can highlight text according to syntax.
792* Desktop Save Mode:: How modes can have buffer state saved between 791* Desktop Save Mode:: How modes can have buffer state saved between
793 Emacs sessions. 792 Emacs sessions.
@@ -799,15 +798,15 @@ Hooks
799 798
800Major Modes 799Major Modes
801 800
802* Major Mode Basics::
803* Major Mode Conventions:: Coding conventions for keymaps, etc. 801* Major Mode Conventions:: Coding conventions for keymaps, etc.
804* Auto Major Mode:: How Emacs chooses the major mode automatically. 802* Auto Major Mode:: How Emacs chooses the major mode automatically.
805* Mode Help:: Finding out how to use a mode. 803* Mode Help:: Finding out how to use a mode.
806* Derived Modes:: Defining a new major mode based on another major 804* Derived Modes:: Defining a new major mode based on another major
807 mode. 805 mode.
806* Basic Major Modes:: Modes that other modes are often derived from.
808* Generic Modes:: Defining a simple major mode that supports 807* Generic Modes:: Defining a simple major mode that supports
809 comment syntax and Font Lock mode. 808 comment syntax and Font Lock mode.
810* Mode Hooks:: Hooks run at the end of major mode functions. 809* Mode Hooks:: Hooks run at the end of major mode commands.
811* Example Major Modes:: Text mode and Lisp modes. 810* Example Major Modes:: Text mode and Lisp modes.
812 811
813Minor Modes 812Minor Modes
@@ -1330,6 +1329,7 @@ Faces
1330* Face Remapping:: Remapping faces to alternative definitions. 1329* Face Remapping:: Remapping faces to alternative definitions.
1331* Face Functions:: How to define and examine faces. 1330* Face Functions:: How to define and examine faces.
1332* Auto Faces:: Hook for automatic face assignment. 1331* Auto Faces:: Hook for automatic face assignment.
1332* Basic Faces:: Faces that are defined by default.
1333* Font Selection:: Finding the best available font for a face. 1333* Font Selection:: Finding the best available font for a face.
1334* Font Lookup:: Looking up the names of available fonts 1334* Font Lookup:: Looking up the names of available fonts
1335 and information about them. 1335 and information about them.
diff --git a/doc/lispref/vol2.texi b/doc/lispref/vol2.texi
index 22a51d3235c..3d849fa2dcf 100644
--- a/doc/lispref/vol2.texi
+++ b/doc/lispref/vol2.texi
@@ -785,8 +785,7 @@ Major and Minor Modes
785* Major Modes:: Defining major modes. 785* Major Modes:: Defining major modes.
786* Minor Modes:: Defining minor modes. 786* Minor Modes:: Defining minor modes.
787* Mode Line Format:: Customizing the text that appears in the mode line. 787* Mode Line Format:: Customizing the text that appears in the mode line.
788* Imenu:: How a mode can provide a menu 788* Imenu:: Providing a menu of definitions made in a buffer.
789 of definitions in the buffer.
790* Font Lock Mode:: How modes can highlight text according to syntax. 789* Font Lock Mode:: How modes can highlight text according to syntax.
791* Desktop Save Mode:: How modes can have buffer state saved between 790* Desktop Save Mode:: How modes can have buffer state saved between
792 Emacs sessions. 791 Emacs sessions.
@@ -798,15 +797,15 @@ Hooks
798 797
799Major Modes 798Major Modes
800 799
801* Major Mode Basics::
802* Major Mode Conventions:: Coding conventions for keymaps, etc. 800* Major Mode Conventions:: Coding conventions for keymaps, etc.
803* Auto Major Mode:: How Emacs chooses the major mode automatically. 801* Auto Major Mode:: How Emacs chooses the major mode automatically.
804* Mode Help:: Finding out how to use a mode. 802* Mode Help:: Finding out how to use a mode.
805* Derived Modes:: Defining a new major mode based on another major 803* Derived Modes:: Defining a new major mode based on another major
806 mode. 804 mode.
805* Basic Major Modes:: Modes that other modes are often derived from.
807* Generic Modes:: Defining a simple major mode that supports 806* Generic Modes:: Defining a simple major mode that supports
808 comment syntax and Font Lock mode. 807 comment syntax and Font Lock mode.
809* Mode Hooks:: Hooks run at the end of major mode functions. 808* Mode Hooks:: Hooks run at the end of major mode commands.
810* Example Major Modes:: Text mode and Lisp modes. 809* Example Major Modes:: Text mode and Lisp modes.
811 810
812Minor Modes 811Minor Modes
@@ -1329,6 +1328,7 @@ Faces
1329* Face Remapping:: Remapping faces to alternative definitions. 1328* Face Remapping:: Remapping faces to alternative definitions.
1330* Face Functions:: How to define and examine faces. 1329* Face Functions:: How to define and examine faces.
1331* Auto Faces:: Hook for automatic face assignment. 1330* Auto Faces:: Hook for automatic face assignment.
1331* Basic Faces:: Faces that are defined by default.
1332* Font Selection:: Finding the best available font for a face. 1332* Font Selection:: Finding the best available font for a face.
1333* Font Lookup:: Looking up the names of available fonts 1333* Font Lookup:: Looking up the names of available fonts
1334 and information about them. 1334 and information about them.
diff --git a/doc/misc/ChangeLog b/doc/misc/ChangeLog
index 75e39104dcb..8260df911a8 100644
--- a/doc/misc/ChangeLog
+++ b/doc/misc/ChangeLog
@@ -1,27 +1,31 @@
12011-07-28 Bastien Guerry <bzg@gnu.org> 12011-08-15 Suvayu Ali <fatkasuvayu+linux@gmail.com> (tiny change)
2
3 * org.texi (Images in LaTeX export): rewrite.
4
52011-08-15 Bastien Guerry <bzg@gnu.org>
2 6
3 * org.texi (Using the mapping API): mention 'region as a possible 7 * org.texi (Using the mapping API): mention 'region as a possible
4 scope for `org-map-entries'. 8 scope for `org-map-entries'.
5 9
62011-07-28 Carsten Dominik <carsten.dominik@gmail.com> 102011-08-15 Carsten Dominik <carsten.dominik@gmail.com>
7 11
8 * org.texi (Visibility cycling): Document `org-copy-visible'. 12 * org.texi (Visibility cycling): Document `org-copy-visible'.
9 13
102011-07-28 Bastien Guerry <bzg@gnu.org> 142011-08-15 Bastien Guerry <bzg@gnu.org>
11 15
12 * org.texi (Template expansion): order template sequences in the 16 * org.texi (Template expansion): order template sequences in the
13 proper order. 17 proper order.
14 18
152011-07-28 Eric Schulte <schulte.eric@gmail.com> 192011-08-15 Eric Schulte <schulte.eric@gmail.com>
16 20
17 * org.texi (eval): Expand discussion of the :eval header argument. 21 * org.texi (eval): Expand discussion of the :eval header argument.
18 22
192011-07-28 Bastien Guerry <bzg@gnu.org> 232011-08-15 Bastien Guerry <bzg@gnu.org>
20 24
21 * org.texi (Languages): Add Lilypond and Awk as supported 25 * org.texi (Languages): Add Lilypond and Awk as supported
22 languages. 26 languages.
23 27
242011-07-28 Achim Gratz <stromeko@nexgo.de> 282011-08-15 Achim Gratz <stromeko@nexgo.de>
25 29
26 * org.texi: document that both CLOCK_INTO_DRAWER and 30 * org.texi: document that both CLOCK_INTO_DRAWER and
27 LOG_INTO_DRAWER can be used to override the contents of variable 31 LOG_INTO_DRAWER can be used to override the contents of variable
@@ -29,240 +33,250 @@
29 33
30 * org.texi: replace @xref->@pxref. 34 * org.texi: replace @xref->@pxref.
31 35
322011-07-28 Eric Schulte <schulte.eric@gmail.com> 362011-08-15 Eric Schulte <schulte.eric@gmail.com>
33 37
34 * org.texi (Evaluating code blocks): Documenting the new option 38 * org.texi (Evaluating code blocks): Documenting the new option
35 for inline call lines. 39 for inline call lines.
36 40
372011-07-28 Eric Schulte <schulte.eric@gmail.com> 412011-08-15 Eric Schulte <schulte.eric@gmail.com>
38 42
39 * org.texi (Results of evaluation): More explicit about the 43 * org.texi (Results of evaluation): More explicit about the
40 mechanism through which interactive evaluation of code is 44 mechanism through which interactive evaluation of code is
41 performed. 45 performed.
42 46
432011-07-28 Eric Schulte <schulte.eric@gmail.com> 472011-08-15 Eric Schulte <schulte.eric@gmail.com>
44 48
45 * org.texi (noweb-ref): New header argument documentation. 49 * org.texi (noweb-ref): New header argument documentation.
46 50
472011-07-28 Eric Schulte <schulte.eric@gmail.com> 512011-08-15 Eric Schulte <schulte.eric@gmail.com>
48 52
49 * org.texi (Extracting source code): Documentation of the new 53 * org.texi (Extracting source code): Documentation of the new
50 org-babel-tangle-named-block-combination variable. 54 org-babel-tangle-named-block-combination variable.
51 55
522011-07-28 Eric Schulte <schulte.eric@gmail.com> 562011-08-15 Eric Schulte <schulte.eric@gmail.com>
53 57
54 * org.texi (Structure of code blocks): explicitly state that the 58 * org.texi (Structure of code blocks): explicitly state that the
55 behavior of multiple blocks of the same name is undefined 59 behavior of multiple blocks of the same name is undefined
56 60
572011-07-28 Christian Egli <christian.egli@sbszh.ch> 612011-08-15 Christian Egli <christian.egli@sbszh.ch>
58 62
59 * org.texi (TaskJuggler export): Modify the example to reflect the 63 * org.texi (TaskJuggler export): Modify the example to reflect the
60 new effort durations. 64 new effort durations.
61 65
622011-07-28 David Maus <dmaus@ictsoc.de> 662011-08-15 David Maus <dmaus@ictsoc.de>
63 67
64 * org.texi (Images in LaTeX export): Escape curly brackets in 68 * org.texi (Images in LaTeX export): Escape curly brackets in
65 LaTeX example. 69 LaTeX example.
66 70
672011-07-28 Carsten Dominik <carsten.dominik@gmail.com> 712011-08-15 Carsten Dominik <carsten.dominik@gmail.com>
68 72
69 * org.texi (The clock table): Document the :properties and 73 * org.texi (The clock table): Document the :properties and
70 :inherit-props arguments for the clocktable. 74 :inherit-props arguments for the clocktable.
71 75
722011-07-28 Carsten Dominik <carsten.dominik@gmail.com> 762011-08-15 Carsten Dominik <carsten.dominik@gmail.com>
73 77
74 * org.texi (Tables in LaTeX export): Document specifying placement 78 * org.texi (Tables in LaTeX export): Document specifying placement
75 options for tables. 79 options for tables.
76 80
772011-07-28 Eric Schulte <schulte.eric@gmail.com> 812011-08-15 Eric Schulte <schulte.eric@gmail.com>
78 82
79 * org.texi (Evaluating code blocks): More specific documentation 83 * org.texi (Evaluating code blocks): More specific documentation
80 about the different types of header arguments. 84 about the different types of header arguments.
81 85
822011-07-28 Manuel Giraud <manuel.giraud@univ-nantes.fr> 862011-08-15 Manuel Giraud <manuel.giraud@univ-nantes.fr>
83 87
84 * org.texi (Sitemap): Document `:sitemap-sans-extension' property. 88 * org.texi (Sitemap): Document `:sitemap-sans-extension' property.
85 89
862011-07-28 Carsten Dominik <carsten.dominik@gmail.com> 902011-08-15 Carsten Dominik <carsten.dominik@gmail.com>
87 91
88 * org.texi (Built-in table editor): Document the table field 92 * org.texi (Built-in table editor): Document the table field
89 follow mode. 93 follow mode.
90 94
912011-07-28 Robert P. Goldman <rpgoldman@real-time.com> 952011-08-15 Robert P. Goldman <rpgoldman@real-time.com>
92 96
93 * org.texi (Easy Templates): Document new template. 97 * org.texi (Easy Templates): Document new template.
94 98
952011-07-28 Robert P. Goldman <rpgoldman@real-time.com> 992011-08-15 Robert P. Goldman <rpgoldman@real-time.com>
96 100
97 * org.texi (Literal examples): Add a cross-reference from "Literal 101 * org.texi (Literal examples): Add a cross-reference from "Literal
98 Examples" to "Easy Templates." 102 Examples" to "Easy Templates."
99 103
1002011-07-28 Carsten Dominik <carsten.dominik@gmail.com> 1042011-08-15 Carsten Dominik <carsten.dominik@gmail.com>
101 105
102 * org.texi (The clock table): Add link to match syntax. 106 * org.texi (The clock table): Add link to match syntax.
103 107
1042011-07-28 Carsten Dominik <carsten.dominik@gmail.com> 1082011-08-15 Carsten Dominik <carsten.dominik@gmail.com>
105 109
106 * org.texi (Agenda commands): Document clock consistency checks. 110 * org.texi (Agenda commands): Document clock consistency checks.
107 111
1082011-07-28 Carsten Dominik <carsten.dominik@gmail.com> 1122011-08-15 Carsten Dominik <carsten.dominik@gmail.com>
109 113
110 * org.texi (Built-in table editor): Document that \vert represents 114 * org.texi (Built-in table editor): Document that \vert represents
111 a vertical bar in a table field. 115 a vertical bar in a table field.
112 116
1132011-07-28 Eric Schulte <schulte.eric@gmail.com> 1172011-08-15 Eric Schulte <schulte.eric@gmail.com>
114 118
115 * org.texi (Literal examples): Link from "Markup" > "Literate 119 * org.texi (Literal examples): Link from "Markup" > "Literate
116 Examples" to "Working with Source Code". 120 Examples" to "Working with Source Code".
117 121
1182011-07-28 Puneeth Chaganti <punchagan@gmail.com> 1222011-08-15 Puneeth Chaganti <punchagan@gmail.com>
119 123
120 * org.texi (Agenda commands): Doc for function option to bulk 124 * org.texi (Agenda commands): Doc for function option to bulk
121 action. 125 action.
122 126
1232011-07-28 Carsten Dominik <carsten.dominik@gmail.com> 1272011-08-15 Carsten Dominik <carsten.dominik@gmail.com>
124 128
125 * org.texi (Template expansion): Document new %<...> template 129 * org.texi (Template expansion): Document new %<...> template
126 escape. 130 escape.
127 131
1282011-07-28 Carsten Dominik <carsten.dominik@gmail.com> 1322011-08-15 Carsten Dominik <carsten.dominik@gmail.com>
129 133
130 * org.texi (Selective export): Document exclusion of any tasks 134 * org.texi (Selective export): Document exclusion of any tasks
131 from export. 135 from export.
132 136
1332011-07-28 Carsten Dominik <carsten.dominik@gmail.com> 1372011-08-15 Carsten Dominik <carsten.dominik@gmail.com>
134 138
135 * org.texi (Selective export): Document how to exclude DONE tasks 139 * org.texi (Selective export): Document how to exclude DONE tasks
136 from export. 140 from export.
137 (Publishing options): Document the properties to be used to turn off 141 (Publishing options): Document the properties to be used to turn off
138 export of DONE tasks. 142 export of DONE tasks.
139 143
1402011-07-28 Carsten Dominik <carsten.dominik@gmail.com> 1442011-08-15 Carsten Dominik <carsten.dominik@gmail.com>
141 145
142 * org.texi (The date/time prompt): Document date range protection. 146 * org.texi (The date/time prompt): Document date range protection.
143 147
1442011-07-28 Eric Schulte <schulte.eric@gmail.com> 1482011-08-15 Eric Schulte <schulte.eric@gmail.com>
145 149
146 * org.texi (padline): Documentation of the new padline header 150 * org.texi (padline): Documentation of the new padline header
147 argument. 151 argument.
148 152
1492011-07-28 Eric Schulte <schulte.eric@gmail.com> 1532011-08-15 Eric Schulte <schulte.eric@gmail.com>
150 154
151 * org.texi (var): Adding "[" to list of characters triggering 155 * org.texi (var): Adding "[" to list of characters triggering
152 elisp evaluation. 156 elisp evaluation.
153 157
1542011-07-28 Eric Schulte <schulte.eric@gmail.com> 1582011-08-15 Eric Schulte <schulte.eric@gmail.com>
155 159
156 * org.texi (var): Documentation of Emacs Lisp evaluation during 160 * org.texi (var): Documentation of Emacs Lisp evaluation during
157 variable assignment. 161 variable assignment.
158 162
1592011-07-28 Eric Schulte <schulte.eric@gmail.com> 1632011-08-15 Eric Schulte <schulte.eric@gmail.com>
160 164
161 * org.texi (colnames): Reference indexing into variables, and note 165 * org.texi (colnames): Reference indexing into variables, and note
162 that colnames are *not* removed before indexing occurs. 166 that colnames are *not* removed before indexing occurs.
163 (rownames): Reference indexing into variables, and note that 167 (rownames): Reference indexing into variables, and note that
164 rownames are *not* removed before indexing occurs. 168 rownames are *not* removed before indexing occurs.
165 169
1662011-07-28 Eric Schulte <schulte.eric@gmail.com> 1702011-08-15 Eric Schulte <schulte.eric@gmail.com>
167 171
168 * org.texi (var): Clarification of indexing into tabular 172 * org.texi (var): Clarification of indexing into tabular
169 variables. 173 variables.
170 174
1712011-07-28 Eric Schulte <schulte.eric@gmail.com> 1752011-08-15 Eric Schulte <schulte.eric@gmail.com>
172 176
173 * org.texi (results): Documentation of the `:results wrap' header 177 * org.texi (results): Documentation of the `:results wrap' header
174 argument. 178 argument.
175 179
1762011-07-28 Bastien Guerry <bzg@gnu.org> 1802011-08-15 Bastien Guerry <bzg@gnu.org>
177 181
178 * org.texi (LaTeX and PDF export): add a note about a limitation 182 * org.texi (LaTeX and PDF export): add a note about a limitation
179 of the LaTeX export: the org file has to be properly structured. 183 of the LaTeX export: the org file has to be properly structured.
180 184
1812011-07-28 Bastien Guerry <bzg@gnu.org> 1852011-08-15 Bastien Guerry <bzg@gnu.org>
182 186
183 * org.texi (Dynamic blocks, Structure editing): Mention 187 * org.texi (Dynamic blocks, Structure editing): Mention
184 the function `org-narrow-to-block'. 188 the function `org-narrow-to-block'.
185 189
1862011-07-28 Eric Schulte <schulte.eric@gmail.com> 1902011-08-15 Eric Schulte <schulte.eric@gmail.com>
187 191
188 * org.texi (Languages): Updating list of code block supported 192 * org.texi (Languages): Updating list of code block supported
189 languages. 193 languages.
190 194
1912011-07-28 Carsten Dominik <carsten.dominik@gmail.com> 1952011-08-15 Carsten Dominik <carsten.dominik@gmail.com>
192 196
193 * org.texi (Special properties): CATEGORY is a special property, 197 * org.texi (Special properties): CATEGORY is a special property,
194 but it may also used in the drawer. 198 but it may also used in the drawer.
195 199
1962011-07-28 Eric Schulte <schulte.eric@gmail.com> 2002011-08-15 Eric Schulte <schulte.eric@gmail.com>
197 201
198 * org.texi (mkdirp): Documentation of the :mkdirp header argument. 202 * org.texi (mkdirp): Documentation of the :mkdirp header argument.
199 203
2002011-07-28 Puneeth Chaganti <punchagan@gmail.com> 2042011-08-15 Puneeth Chaganti <punchagan@gmail.com>
201 205
202 * org.texi (Include files): Document :lines. 206 * org.texi (Include files): Document :lines.
203 207
2042011-07-28 Eric Schulte <schulte.eric@gmail.com> 2082011-08-15 Eric Schulte <schulte.eric@gmail.com>
205 209
206 * org.texi (comments): Documentation of the ":comments noweb" code 210 * org.texi (comments): Documentation of the ":comments noweb" code
207 block header argument. 211 block header argument.
208 212
2092011-07-28 Eric Schulte <schulte.eric@gmail.com> 2132011-08-15 Eric Schulte <schulte.eric@gmail.com>
210 214
211 * org.texi (Conflicts): Changed "yasnippets" to "yasnippet" and 215 * org.texi (Conflicts): Changed "yasnippets" to "yasnippet" and
212 added extra whitespace around functions to be consistent with the 216 added extra whitespace around functions to be consistent with the
213 rest of the section. 217 rest of the section.
214 218
2152011-07-28 Eric Schulte <schulte.eric@gmail.com> 2192011-08-15 Eric Schulte <schulte.eric@gmail.com>
216 220
217 * org.texi (Evaluating code blocks): Expanded discussion of 221 * org.texi (Evaluating code blocks): Expanded discussion of
218 #+call: line syntax. 222 #+call: line syntax.
219 (Header arguments in function calls): Expanded discussion of 223 (Header arguments in function calls): Expanded discussion of
220 #+call: line syntax. 224 #+call: line syntax.
221 225
2222011-07-28 Eric Schulte <schulte.eric@gmail.com> 2262011-08-15 Eric Schulte <schulte.eric@gmail.com>
223 227
224 * org.texi (Evaluating code blocks): More explicit about how to 228 * org.texi (Evaluating code blocks): More explicit about how to
225 pass variables to #+call lines. 229 pass variables to #+call lines.
226 230
2272011-07-28 Eric Schulte <schulte.eric@gmail.com> 2312011-08-15 Eric Schulte <schulte.eric@gmail.com>
228 232
229 * org.texi (Results of evaluation): Link to the :results header 233 * org.texi (Results of evaluation): Link to the :results header
230 argument list from the "Results of evaluation" section. 234 argument list from the "Results of evaluation" section.
231 235
2322011-07-28 Eric Schulte <schulte.eric@gmail.com> 2362011-08-15 Eric Schulte <schulte.eric@gmail.com>
233 237
234 * org.texi (Conflicts): Adding additional information about 238 * org.texi (Conflicts): Adding additional information about
235 resolving org/yasnippet conflicts. 239 resolving org/yasnippet conflicts.
236 240
2372011-07-28 David Maus <dmaus@ictsoc.de> 2412011-08-15 David Maus <dmaus@ictsoc.de>
238 242
239 * org.texi (Publishing options): Document style-include-scripts 243 * org.texi (Publishing options): Document style-include-scripts
240 publishing project property. 244 publishing project property.
241 245
2422011-07-28 Carsten Dominik <carsten.dominik@gmail.com> 2462011-08-15 Carsten Dominik <carsten.dominik@gmail.com>
243 247
244 * org.texi (Sparse trees): Document the next-error / 248 * org.texi (Sparse trees): Document the next-error /
245 previous-error functionality. 249 previous-error functionality.
246 250
2472011-07-28 Tom Dye <tsd@tsdye.com> 2512011-08-15 Tom Dye <tsd@tsdye.com>
248 252
249 * org.texi (cache): Improved documentation of code block caches. 253 * org.texi (cache): Improved documentation of code block caches.
250 254
2512011-07-28 Tom Dye <tsd@tsdye.com> 2552011-08-15 Tom Dye <tsd@tsdye.com>
252 256
253 * org.texi (Code block specific header arguments): Documentation 257 * org.texi (Code block specific header arguments): Documentation
254 of multi-line header arguments. 258 of multi-line header arguments.
255 259
2562011-07-28 Eric Schulte <schulte.eric@gmail.com> 2602011-08-15 Eric Schulte <schulte.eric@gmail.com>
257 261
258 * org.texi (Code evaluation security): Add example for using a 262 * org.texi (Code evaluation security): Add example for using a
259 function. 263 function.
260 264
2612011-07-28 Eric Schulte <schulte.eric@gmail.com> 2652011-08-15 Eric Schulte <schulte.eric@gmail.com>
262 266
263 * org.texi (Tables in LaTeX export): Documentation of new 267 * org.texi (Tables in LaTeX export): Documentation of new
264 attr_latex options for tables. 268 attr_latex options for tables.
265 269
2702011-08-03 Michael Albinus <michael.albinus@gmx.de>
271
272 * trampver.texi: Update release number.
273
2742011-07-30 Michael Albinus <michael.albinus@gmx.de>
275
276 Sync with Tramp 2.2.2.
277
278 * trampver.texi: Update release number.
279
2662011-07-15 Lars Magne Ingebrigtsen <larsi@gnus.org> 2802011-07-15 Lars Magne Ingebrigtsen <larsi@gnus.org>
267 281
268 * flymake.texi (Example -- Configuring a tool called via make): 282 * flymake.texi (Example -- Configuring a tool called via make):
@@ -274,15 +288,15 @@
274 global keymap parent, which doesn't seem to be accurate 288 global keymap parent, which doesn't seem to be accurate
275 (bug#7045). 289 (bug#7045).
276 290
2912011-07-12 Lars Magne Ingebrigtsen <larsi@gnus.org>
292
293 * org.texi (Special agenda views): Fix double quoting (bug#3509).
294
2772010-07-10 Kevin Ryde <user42@zip.com.au> 2952010-07-10 Kevin Ryde <user42@zip.com.au>
278 296
279 * cl.texi (For Clauses): Add destructuring example processing an 297 * cl.texi (For Clauses): Add destructuring example processing an
280 alist (bug#6596). 298 alist (bug#6596).
281 299
2822011-07-12 Lars Magne Ingebrigtsen <larsi@gnus.org>
283
284 * org.texi (Special agenda views): Fix double quoting (bug#3509).
285
2862011-07-07 Lars Magne Ingebrigtsen <larsi@gnus.org> 3002011-07-07 Lars Magne Ingebrigtsen <larsi@gnus.org>
287 301
288 * ediff.texi (Major Entry Points): Remove mention of `require', 302 * ediff.texi (Major Entry Points): Remove mention of `require',
diff --git a/doc/misc/org.texi b/doc/misc/org.texi
index 8e01a10bde3..2a3d99ca7f4 100644
--- a/doc/misc/org.texi
+++ b/doc/misc/org.texi
@@ -4,8 +4,8 @@
4@setfilename ../../info/org 4@setfilename ../../info/org
5@settitle The Org Manual 5@settitle The Org Manual
6 6
7@set VERSION 7.4 7@set VERSION 7.7
8@set DATE December 2010 8@set DATE July 2011
9 9
10@c Use proper quote and backtick for code sections in PDF output 10@c Use proper quote and backtick for code sections in PDF output
11@c Cf. Texinfo manual 14.2 11@c Cf. Texinfo manual 14.2
@@ -34,7 +34,7 @@
34 34
35@c Below we define the following macros for Org key tables: 35@c Below we define the following macros for Org key tables:
36 36
37@c orgkey{key} A key item 37@c orgkey{key} A key item
38@c orgcmd{key,cmd} Key with command name 38@c orgcmd{key,cmd} Key with command name
39@c xorgcmd{key,cmmand} Key with command name as @itemx 39@c xorgcmd{key,cmmand} Key with command name as @itemx
40@c orgcmdnki{key,cmd} Like orgcmd, but do not index the key 40@c orgcmdnki{key,cmd} Like orgcmd, but do not index the key
@@ -286,7 +286,7 @@ license to the document, as described in section 6 of the license.
286@end quotation 286@end quotation
287@end copying 287@end copying
288 288
289@dircategory Emacs editing modes 289@dircategory Emacs
290@direntry 290@direntry
291* Org Mode: (org). Outline-based notes management and organizer 291* Org Mode: (org). Outline-based notes management and organizer
292@end direntry 292@end direntry
@@ -377,7 +377,8 @@ The spreadsheet
377* References:: How to refer to another field or range 377* References:: How to refer to another field or range
378* Formula syntax for Calc:: Using Calc to compute stuff 378* Formula syntax for Calc:: Using Calc to compute stuff
379* Formula syntax for Lisp:: Writing formulas in Emacs Lisp 379* Formula syntax for Lisp:: Writing formulas in Emacs Lisp
380* Field formulas:: Formulas valid for a single field 380* Durations and time values:: How to compute durations and time values
381* Field and range formulas:: Formula for specific (ranges of) fields
381* Column formulas:: Formulas valid for an entire column 382* Column formulas:: Formulas valid for an entire column
382* Editing and debugging formulas:: Fixing formulas 383* Editing and debugging formulas:: Fixing formulas
383* Updating the table:: Recomputing all dependent fields 384* Updating the table:: Recomputing all dependent fields
@@ -480,7 +481,7 @@ Capture - Refile - Archive
480* Capture:: Capturing new stuff 481* Capture:: Capturing new stuff
481* Attachments:: Add files to tasks 482* Attachments:: Add files to tasks
482* RSS Feeds:: Getting input from RSS feeds 483* RSS Feeds:: Getting input from RSS feeds
483* Protocols:: External (e.g. Browser) access to Emacs and Org 484* Protocols:: External (e.g.@: Browser) access to Emacs and Org
484* Refiling notes:: Moving a tree from one place to another 485* Refiling notes:: Moving a tree from one place to another
485* Archiving:: What to do with finished projects 486* Archiving:: What to do with finished projects
486 487
@@ -572,6 +573,7 @@ Exporting
572* HTML export:: Exporting to HTML 573* HTML export:: Exporting to HTML
573* LaTeX and PDF export:: Exporting to @LaTeX{}, and processing to PDF 574* LaTeX and PDF export:: Exporting to @LaTeX{}, and processing to PDF
574* DocBook export:: Exporting to DocBook 575* DocBook export:: Exporting to DocBook
576* OpenDocumentText export:: Exporting to OpenDocumentText
575* TaskJuggler export:: Exporting to TaskJuggler 577* TaskJuggler export:: Exporting to TaskJuggler
576* Freemind export:: Exporting to Freemind mind maps 578* Freemind export:: Exporting to Freemind mind maps
577* XOXO export:: Exporting to XOXO 579* XOXO export:: Exporting to XOXO
@@ -580,6 +582,7 @@ Exporting
580HTML export 582HTML export
581 583
582* HTML Export commands:: How to invoke HTML export 584* HTML Export commands:: How to invoke HTML export
585* HTML preamble and postamble:: How to insert a preamble and a postamble
583* Quoting HTML tags:: Using direct HTML in Org-mode 586* Quoting HTML tags:: Using direct HTML in Org-mode
584* Links in HTML export:: How links will be interpreted and formatted 587* Links in HTML export:: How links will be interpreted and formatted
585* Tables in HTML export:: How to modify the formatting of tables 588* Tables in HTML export:: How to modify the formatting of tables
@@ -607,6 +610,16 @@ DocBook export
607* Images in DocBook export:: How to insert figures into DocBook output 610* Images in DocBook export:: How to insert figures into DocBook output
608* Special characters:: How to handle special characters 611* Special characters:: How to handle special characters
609 612
613OpenDocument export
614
615* OpenDocumentText export commands:: How to invoke OpenDocumentText export
616* Applying Custom Styles:: How to apply custom styles to the output
617* Converting to Other formats:: How to convert to formats like doc, docx etc
618* Links in OpenDocumentText export:: How links will be interpreted and formatted
619* Tables in OpenDocumentText export:: How Tables are handled
620* Images in OpenDocumentText export:: How to insert figures
621* Additional Documentation:: How to handle special characters
622
610Publishing 623Publishing
611 624
612* Configuration:: Defining projects 625* Configuration:: Defining projects
@@ -620,7 +633,7 @@ Configuration
620* Sources and destinations:: From here to there 633* Sources and destinations:: From here to there
621* Selecting files:: What files are part of the project? 634* Selecting files:: What files are part of the project?
622* Publishing action:: Setting the function doing the publishing 635* Publishing action:: Setting the function doing the publishing
623* Publishing options:: Tweaking HTML export 636* Publishing options:: Tweaking HTML/@LaTeX{} export
624* Publishing links:: Which links keep working after publishing? 637* Publishing links:: Which links keep working after publishing?
625* Sitemap:: Generating a list of all pages 638* Sitemap:: Generating a list of all pages
626* Generating an index:: An index that reaches across pages 639* Generating an index:: An index that reaches across pages
@@ -669,13 +682,19 @@ Specific header arguments
669 directory for code block execution 682 directory for code block execution
670* exports:: Export code and/or results 683* exports:: Export code and/or results
671* tangle:: Toggle tangling and specify file name 684* tangle:: Toggle tangling and specify file name
685* mkdirp:: Toggle creation of parent directories of target
686 files during tangling
672* comments:: Toggle insertion of comments in tangled 687* comments:: Toggle insertion of comments in tangled
673 code files 688 code files
689* padline:: Control insertion of padding lines in tangled
690 code files
674* no-expand:: Turn off variable assignment and noweb 691* no-expand:: Turn off variable assignment and noweb
675 expansion during tangling 692 expansion during tangling
676* session:: Preserve the state of code evaluation 693* session:: Preserve the state of code evaluation
677* noweb:: Toggle expansion of noweb references 694* noweb:: Toggle expansion of noweb references
695* noweb-ref:: Specify block's noweb reference resolution target
678* cache:: Avoid re-evaluating unchanged code blocks 696* cache:: Avoid re-evaluating unchanged code blocks
697* sep:: Delimiter for writing tabular results outside Org
679* hlines:: Handle horizontal lines in tables 698* hlines:: Handle horizontal lines in tables
680* colnames:: Handle column names in tables 699* colnames:: Handle column names in tables
681* rownames:: Handle row names in tables 700* rownames:: Handle row names in tables
@@ -694,6 +713,7 @@ Miscellaneous
694* Clean view:: Getting rid of leading stars in the outline 713* Clean view:: Getting rid of leading stars in the outline
695* TTY keys:: Using Org on a tty 714* TTY keys:: Using Org on a tty
696* Interaction:: Other Emacs packages 715* Interaction:: Other Emacs packages
716* org-crypt.el:: Encrypting Org files
697 717
698Interaction with other packages 718Interaction with other packages
699 719
@@ -769,7 +789,7 @@ create dynamic @i{agenda views}.
769 789
770Org mode contains the Org Babel environment which allows you to work with 790Org mode contains the Org Babel environment which allows you to work with
771embedded source code blocks in a file, to facilitate code evaluation, 791embedded source code blocks in a file, to facilitate code evaluation,
772documentation, and tangling. 792documentation, and literate programming techniques.
773 793
774Org's automatic, context-sensitive table editor with spreadsheet 794Org's automatic, context-sensitive table editor with spreadsheet
775capabilities can be integrated into any major mode by activating the 795capabilities can be integrated into any major mode by activating the
@@ -803,6 +823,11 @@ version of Org, as well as additional information, frequently asked
803questions (FAQ), links to tutorials, etc@. This page is located at 823questions (FAQ), links to tutorials, etc@. This page is located at
804@uref{http://orgmode.org}. 824@uref{http://orgmode.org}.
805 825
826@cindex print edition
827The version 7.3 of this manual is available as a
828@uref{http://www.network-theory.co.uk/org/manual/, paperback book from Network
829Theory Ltd.}
830
806@page 831@page
807 832
808 833
@@ -813,7 +838,9 @@ questions (FAQ), links to tutorials, etc@. This page is located at
813 838
814@b{Important:} @i{If you are using a version of Org that is part of the Emacs 839@b{Important:} @i{If you are using a version of Org that is part of the Emacs
815distribution or an XEmacs package, please skip this section and go directly 840distribution or an XEmacs package, please skip this section and go directly
816to @ref{Activation}.} 841to @ref{Activation}. To see what version of Org (if any) is part of your
842Emacs distribution, type @kbd{M-x load-library RET org} and then @kbd{M-x
843org-version}.}
817 844
818If you have downloaded Org from the Web, either as a distribution @file{.zip} 845If you have downloaded Org from the Web, either as a distribution @file{.zip}
819or @file{.tar} file, or as a Git archive, you must take the following steps 846or @file{.tar} file, or as a Git archive, you must take the following steps
@@ -852,15 +879,21 @@ make install
852@end example 879@end example
853 880
854Installing Info files is system dependent, because of differences in the 881Installing Info files is system dependent, because of differences in the
855@file{install-info} program. In Debian it copies the info files into the 882@file{install-info} program. The following should correctly install the Info
856correct directory and modifies the info directory file. In many other 883files on most systems, please send a bug report if not@footnote{The output
857systems, the files need to be copied to the correct directory separately, and 884from install-info (if any) is also system dependent. In particular Debian
858@file{install-info} then only modifies the directory file. Check your system 885and its derivatives use two different versions of install-info and you may
859documentation to find out which of the following commands you need: 886see the message:
887
888@example
889This is not dpkg install-info anymore, but GNU install-info
890See the man page for ginstall-info for command line arguments
891@end example
892
893@noindent which can be safely ignored.}.
860 894
861@example 895@example
862make install-info 896make install-info
863make install-info-debian
864@end example 897@end example
865 898
866Then add the following line to @file{.emacs}. It is needed so that 899Then add the following line to @file{.emacs}. It is needed so that
@@ -880,28 +913,27 @@ Do not forget to activate Org as described in the following section.
880@cindex global key bindings 913@cindex global key bindings
881@cindex key bindings, global 914@cindex key bindings, global
882 915
883Add the following lines to your @file{.emacs} file. The last three lines 916To make sure files with extension @file{.org} use Org mode, add the following
884define @emph{global} keys for the commands @command{org-store-link}, 917line to your @file{.emacs} file.
885@command{org-agenda}, and @command{org-iswitchb}---please choose suitable
886keys yourself.
887
888@lisp 918@lisp
889;; The following lines are always needed. Choose your own keys.
890(add-to-list 'auto-mode-alist '("\\.org\\'" . org-mode)) 919(add-to-list 'auto-mode-alist '("\\.org\\'" . org-mode))
920@end lisp
921@noindent Org mode buffers need font-lock to be turned on - this is the
922default in Emacs@footnote{If you don't use font-lock globally, turn it on in
923Org buffer with @code{(add-hook 'org-mode-hook 'turn-on-font-lock)}}.
924
925The four Org commands @command{org-store-link}, @command{org-capture},
926@command{org-agenda}, and @command{org-iswitchb} should be accessible through
927global keys (i.e.@: anywhere in Emacs, not just in Org buffers). Here are
928suggested bindings for these keys, please modify the keys to your own
929liking.
930@lisp
891(global-set-key "\C-cl" 'org-store-link) 931(global-set-key "\C-cl" 'org-store-link)
932(global-set-key "\C-cc" 'org-capture)
892(global-set-key "\C-ca" 'org-agenda) 933(global-set-key "\C-ca" 'org-agenda)
893(global-set-key "\C-cb" 'org-iswitchb) 934(global-set-key "\C-cb" 'org-iswitchb)
894@end lisp 935@end lisp
895 936
896Furthermore, you must activate @code{font-lock-mode} in Org
897buffers, because significant functionality depends on font-locking being
898active. You can do this with either one of the following two lines
899(XEmacs users must use the second option):
900@lisp
901(global-font-lock-mode 1) ; for all buffers
902(add-hook 'org-mode-hook 'turn-on-font-lock) ; Org buffers only
903@end lisp
904
905@cindex Org-mode, turning on 937@cindex Org-mode, turning on
906With this setup, all files with extension @samp{.org} will be put 938With this setup, all files with extension @samp{.org} will be put
907into Org-mode. As an alternative, make the first line of a file look 939into Org-mode. As an alternative, make the first line of a file look
@@ -1183,6 +1215,8 @@ but without affecting visibility in that buffer.}. With a numeric
1183prefix argument N, go up to level N and then take that tree. If N is 1215prefix argument N, go up to level N and then take that tree. If N is
1184negative then go up that many levels. With a @kbd{C-u} prefix, do not remove 1216negative then go up that many levels. With a @kbd{C-u} prefix, do not remove
1185the previously used indirect buffer. 1217the previously used indirect buffer.
1218@orgcmd{C-c C-x v,org-copy-visible}
1219Copy the @i{visible} text in the region into the kill ring.
1186@end table 1220@end table
1187 1221
1188@vindex org-startup-folded 1222@vindex org-startup-folded
@@ -1192,7 +1226,7 @@ the previously used indirect buffer.
1192@cindex @code{showeverything}, STARTUP keyword 1226@cindex @code{showeverything}, STARTUP keyword
1193 1227
1194When Emacs first visits an Org file, the global state is set to 1228When Emacs first visits an Org file, the global state is set to
1195OVERVIEW, i.e. only the top level headlines are visible. This can be 1229OVERVIEW, i.e.@: only the top level headlines are visible. This can be
1196configured through the variable @code{org-startup-folded}, or on a 1230configured through the variable @code{org-startup-folded}, or on a
1197per-file basis by adding one of the following lines anywhere in the 1231per-file basis by adding one of the following lines anywhere in the
1198buffer: 1232buffer:
@@ -1212,7 +1246,7 @@ for this property are @code{folded}, @code{children}, @code{content}, and
1212@code{all}. 1246@code{all}.
1213@table @asis 1247@table @asis
1214@orgcmd{C-u C-u @key{TAB},org-set-startup-visibility} 1248@orgcmd{C-u C-u @key{TAB},org-set-startup-visibility}
1215Switch back to the startup visibility of the buffer, i.e. whatever is 1249Switch back to the startup visibility of the buffer, i.e.@: whatever is
1216requested by startup options and @samp{VISIBILITY} properties in individual 1250requested by startup options and @samp{VISIBILITY} properties in individual
1217entries. 1251entries.
1218@end table 1252@end table
@@ -1273,19 +1307,17 @@ See also the variable @code{org-goto-interface}.
1273@table @asis 1307@table @asis
1274@orgcmd{M-@key{RET},org-insert-heading} 1308@orgcmd{M-@key{RET},org-insert-heading}
1275@vindex org-M-RET-may-split-line 1309@vindex org-M-RET-may-split-line
1276Insert new heading with same level as current. If the cursor is in a 1310Insert new heading with same level as current. If the cursor is in a plain
1277plain list item, a new item is created (@pxref{Plain lists}). To force 1311list item, a new item is created (@pxref{Plain lists}). To force creation of
1278creation of a new headline, use a prefix argument, or first press @key{RET} 1312a new headline, use a prefix argument. When this command is used in the
1279to get to the beginning of the next line. When this command is used in 1313middle of a line, the line is split and the rest of the line becomes the new
1280the middle of a line, the line is split and the rest of the line becomes 1314headline@footnote{If you do not want the line to be split, customize the
1281the new headline@footnote{If you do not want the line to be split, 1315variable @code{org-M-RET-may-split-line}.}. If the command is used at the
1282customize the variable @code{org-M-RET-may-split-line}.}. If the 1316beginning of a headline, the new headline is created before the current line.
1283command is used at the beginning of a headline, the new headline is 1317If at the beginning of any other line, the content of that line is made the
1284created before the current line. If at the beginning of any other line, 1318new heading. If the command is used at the end of a folded subtree (i.e.@:
1285the content of that line is made the new heading. If the command is 1319behind the ellipses at the end of a headline), then a headline like the
1286used at the end of a folded subtree (i.e. behind the ellipses at the end 1320current one will be inserted after the end of the subtree.
1287of a headline), then a headline like the current one will be inserted
1288after the end of the subtree.
1289@orgcmd{C-@key{RET},org-insert-heading-respect-content} 1321@orgcmd{C-@key{RET},org-insert-heading-respect-content}
1290Just like @kbd{M-@key{RET}}, except when adding a new heading below the 1322Just like @kbd{M-@key{RET}}, except when adding a new heading below the
1291current heading, the new heading is placed after the body instead of before 1323current heading, the new heading is placed after the body instead of before
@@ -1317,7 +1349,7 @@ level).
1317@orgcmd{M-S-@key{down},org-move-subtree-down} 1349@orgcmd{M-S-@key{down},org-move-subtree-down}
1318Move subtree down (swap with next subtree of same level). 1350Move subtree down (swap with next subtree of same level).
1319@orgcmd{C-c C-x C-w,org-cut-subtree} 1351@orgcmd{C-c C-x C-w,org-cut-subtree}
1320Kill subtree, i.e. remove it from buffer but save in kill ring. 1352Kill subtree, i.e.@: remove it from buffer but save in kill ring.
1321With a numeric prefix argument N, kill N sequential subtrees. 1353With a numeric prefix argument N, kill N sequential subtrees.
1322@orgcmd{C-c C-x M-w,org-copy-subtree} 1354@orgcmd{C-c C-x M-w,org-copy-subtree}
1323Copy subtree to kill ring. With a numeric prefix argument N, copy the N 1355Copy subtree to kill ring. With a numeric prefix argument N, copy the N
@@ -1362,6 +1394,8 @@ sorting will be case-sensitive. With two @kbd{C-u C-u} prefixes, duplicate
1362entries will also be removed. 1394entries will also be removed.
1363@orgcmd{C-x n s,org-narrow-to-subtree} 1395@orgcmd{C-x n s,org-narrow-to-subtree}
1364Narrow buffer to current subtree. 1396Narrow buffer to current subtree.
1397@orgcmd{C-x n b,org-narrow-to-block}
1398Narrow buffer to current block.
1365@orgcmd{C-x n w,widen} 1399@orgcmd{C-x n w,widen}
1366Widen buffer to remove narrowing. 1400Widen buffer to remove narrowing.
1367@orgcmd{C-c *,org-toggle-heading} 1401@orgcmd{C-c *,org-toggle-heading}
@@ -1413,7 +1447,7 @@ commands can be accessed through a dispatcher:
1413This prompts for an extra key to select a sparse-tree creating command. 1447This prompts for an extra key to select a sparse-tree creating command.
1414@orgcmd{C-c / r,org-occur} 1448@orgcmd{C-c / r,org-occur}
1415@vindex org-remove-highlights-with-change 1449@vindex org-remove-highlights-with-change
1416Occur. Prompts for a regexp and shows a sparse tree with all matches. If 1450Prompts for a regexp and shows a sparse tree with all matches. If
1417the match is in a headline, the headline is made visible. If the match is in 1451the match is in a headline, the headline is made visible. If the match is in
1418the body of an entry, headline and body are made visible. In order to 1452the body of an entry, headline and body are made visible. In order to
1419provide minimal context, also the full hierarchy of headlines above the match 1453provide minimal context, also the full hierarchy of headlines above the match
@@ -1423,8 +1457,13 @@ editing command@footnote{This depends on the option
1423@code{org-remove-highlights-with-change}}, or by pressing @kbd{C-c C-c}. 1457@code{org-remove-highlights-with-change}}, or by pressing @kbd{C-c C-c}.
1424When called with a @kbd{C-u} prefix argument, previous highlights are kept, 1458When called with a @kbd{C-u} prefix argument, previous highlights are kept,
1425so several calls to this command can be stacked. 1459so several calls to this command can be stacked.
1460@orgcmdkkc{M-g n,M-g M-n,next-error}
1461Jump to the next sparse tree match in this buffer.
1462@orgcmdkkc{M-g p,M-g M-p,previous-error}
1463Jump to the previous sparse tree match in this buffer.
1426@end table 1464@end table
1427 1465
1466
1428@noindent 1467@noindent
1429@vindex org-agenda-custom-commands 1468@vindex org-agenda-custom-commands
1430For frequently used sparse trees of specific search strings, you can 1469For frequently used sparse trees of specific search strings, you can
@@ -1472,44 +1511,47 @@ Org knows ordered lists, unordered lists, and description lists.
1472@emph{Unordered} list items start with @samp{-}, @samp{+}, or 1511@emph{Unordered} list items start with @samp{-}, @samp{+}, or
1473@samp{*}@footnote{When using @samp{*} as a bullet, lines must be indented or 1512@samp{*}@footnote{When using @samp{*} as a bullet, lines must be indented or
1474they will be seen as top-level headlines. Also, when you are hiding leading 1513they will be seen as top-level headlines. Also, when you are hiding leading
1475stars to get a clean outline view, plain list items starting with a star are 1514stars to get a clean outline view, plain list items starting with a star may
1476visually indistinguishable from true headlines. In short: even though 1515be hard to distinguish from true headlines. In short: even though @samp{*}
1477@samp{*} is supported, it may be better to not use it for plain list items.} 1516is supported, it may be better to not use it for plain list items.} as
1478as bullets. 1517bullets.
1479@item 1518@item
1480@vindex org-plain-list-ordered-item-terminator 1519@vindex org-plain-list-ordered-item-terminator
1520@vindex org-alphabetical-lists
1481@emph{Ordered} list items start with a numeral followed by either a period or 1521@emph{Ordered} list items start with a numeral followed by either a period or
1482a right parenthesis@footnote{You can filter out any of them by configuring 1522a right parenthesis@footnote{You can filter out any of them by configuring
1483@code{org-plain-list-ordered-item-terminator}.}, such as @samp{1.} or 1523@code{org-plain-list-ordered-item-terminator}.}, such as @samp{1.} or
1484@samp{1)}. If you want a list to start with a different value (e.g. 20), start 1524@samp{1)}@footnote{You can also get @samp{a.}, @samp{A.}, @samp{a)} and
1485the text of the item with @code{[@@20]}@footnote{If there's a checkbox in the 1525@samp{A)} by configuring @code{org-alphabetical-lists}. To minimize
1486item, the cookie must be put @emph{before} the checkbox.}. Those constructs 1526confusion with normal text, those are limited to one character only. Beyond
1487can be used in any item of the list in order to enforce a particular 1527that limit, bullets will automatically fallback to numbers.}. If you want a
1488numbering. 1528list to start with a different value (e.g.@: 20), start the text of the item
1529with @code{[@@20]}@footnote{If there's a checkbox in the item, the cookie
1530must be put @emph{before} the checkbox. If you have activated alphabetical
1531lists, you can also use counters like @code{[@@b]}.}. Those constructs can
1532be used in any item of the list in order to enforce a particular numbering.
1489@item 1533@item
1490@emph{Description} list items are unordered list items, and contain the 1534@emph{Description} list items are unordered list items, and contain the
1491separator @samp{ :: } to separate the description @emph{term} from the 1535separator @samp{ :: } to distinguish the description @emph{term} from the
1492description. 1536description.
1493@end itemize 1537@end itemize
1494 1538
1495Items belonging to the same list must have the same indentation on the first 1539Items belonging to the same list must have the same indentation on the first
1496line. In particular, if an ordered list reaches number @samp{10.}, then the 1540line. In particular, if an ordered list reaches number @samp{10.}, then the
14972--digit numbers must be written left-aligned with the other numbers in the 15412--digit numbers must be written left-aligned with the other numbers in the
1498list. 1542list. An item ends before the next line that is less or equally indented
1543than its bullet/number.
1499 1544
1500@vindex org-list-ending-method 1545@vindex org-list-ending-method
1501@vindex org-list-end-regexp 1546@vindex org-list-end-regexp
1502@vindex org-empty-line-terminates-plain-lists 1547@vindex org-empty-line-terminates-plain-lists
1503Two methods@footnote{To disable either of them, configure 1548Two methods@footnote{To disable either of them, configure
1504@code{org-list-ending-method}.} are provided to terminate lists. A list ends 1549@code{org-list-ending-method}.} are provided to terminate lists. A list ends
1505before the next line that is indented like the bullet/number or less, or it 1550whenever every item has ended, which means before any line less or equally
1506ends before two blank lines@footnote{See also 1551indented than items at top level. It also ends before two blank
1507@code{org-empty-line-terminates-plain-lists}.}. In both cases, all levels of 1552lines@footnote{See also @code{org-empty-line-terminates-plain-lists}.}. In
1508the list are closed@footnote{So you cannot have a sublist, some text and then 1553that case, all items are closed. For finer control, you can end lists with
1509another sublist while still in the same top-level list item. This used to be 1554any pattern set in @code{org-list-end-regexp}. Here is an example:
1510possible, but it was only supported in the HTML exporter and difficult to
1511manage with automatic indentation.}. For finer control, you can end lists
1512with any pattern set in @code{org-list-end-regexp}. Here is an example:
1513 1555
1514@example 1556@example
1515@group 1557@group
@@ -1520,8 +1562,8 @@ with any pattern set in @code{org-list-end-regexp}. Here is an example:
1520 + this was already my favorite scene in the book 1562 + this was already my favorite scene in the book
1521 + I really like Miranda Otto. 1563 + I really like Miranda Otto.
1522 3. Peter Jackson being shot by Legolas 1564 3. Peter Jackson being shot by Legolas
1523 He makes a really funny face when it happens.
1524 - on DVD only 1565 - on DVD only
1566 He makes a really funny face when it happens.
1525 But in the end, no individual scenes matter but the film as a whole. 1567 But in the end, no individual scenes matter but the film as a whole.
1526 Important actors in this film are: 1568 Important actors in this film are:
1527 - @b{Elijah Wood} :: He plays Frodo 1569 - @b{Elijah Wood} :: He plays Frodo
@@ -1536,13 +1578,15 @@ XEmacs, you should use Kyle E. Jones' @file{filladapt.el}. To turn this on,
1536put into @file{.emacs}: @code{(require 'filladapt)}}, and by exporting them 1578put into @file{.emacs}: @code{(require 'filladapt)}}, and by exporting them
1537properly (@pxref{Exporting}). Since indentation is what governs the 1579properly (@pxref{Exporting}). Since indentation is what governs the
1538structure of these lists, many structural constructs like @code{#+BEGIN_...} 1580structure of these lists, many structural constructs like @code{#+BEGIN_...}
1539blocks can be indented to signal that they should be considered as a list 1581blocks can be indented to signal that they belong to a particular item.
1540item.
1541 1582
1542@vindex org-list-demote-modify-bullet 1583@vindex org-list-demote-modify-bullet
1584@vindex org-list-indent-offset
1543If you find that using a different bullet for a sub-list (than that used for 1585If you find that using a different bullet for a sub-list (than that used for
1544the current list-level) improves readability, customize the variable 1586the current list-level) improves readability, customize the variable
1545@code{org-list-demote-modify-bullet}. 1587@code{org-list-demote-modify-bullet}. To get a greater difference of
1588indentation between items and theirs sub-items, customize
1589@code{org-list-indent-offset}.
1546 1590
1547@vindex org-list-automatic-rules 1591@vindex org-list-automatic-rules
1548The following commands act on items when the cursor is in the first line of 1592The following commands act on items when the cursor is in the first line of
@@ -1566,16 +1610,11 @@ headlines, however; the hierarchies remain completely separated.
1566@vindex org-list-automatic-rules 1610@vindex org-list-automatic-rules
1567Insert new item at current level. With a prefix argument, force a new 1611Insert new item at current level. With a prefix argument, force a new
1568heading (@pxref{Structure editing}). If this command is used in the middle 1612heading (@pxref{Structure editing}). If this command is used in the middle
1569of a line, the line is @emph{split} and the rest of the line becomes the new 1613of an item, that item is @emph{split} in two, and the second part becomes the
1570item@footnote{If you do not want the line to be split, customize the variable 1614new item@footnote{If you do not want the item to be split, customize the
1571@code{org-M-RET-may-split-line}.}. If this command is executed @emph{before 1615variable @code{org-M-RET-may-split-line}.}. If this command is executed
1572an item's body}, the new item is created @emph{before} the current item. If the 1616@emph{before item's body}, the new item is created @emph{before} the current
1573command is executed in the white space before the text that is part of an 1617one.
1574item but does not contain the bullet, a bullet is added to the current line.
1575
1576As a new item cannot be inserted in a structural construct (like an example
1577or source code block) within a list, Org will instead insert it right before
1578the structure, or return an error.
1579@kindex M-S-@key{RET} 1618@kindex M-S-@key{RET}
1580@item M-S-@key{RET} 1619@item M-S-@key{RET}
1581Insert a new item with a checkbox (@pxref{Checkboxes}). 1620Insert a new item with a checkbox (@pxref{Checkboxes}).
@@ -1589,17 +1628,21 @@ position.
1589@itemx S-@key{down} 1628@itemx S-@key{down}
1590@cindex shift-selection-mode 1629@cindex shift-selection-mode
1591@vindex org-support-shift-select 1630@vindex org-support-shift-select
1592Jump to the previous/next item in the current list, but only if 1631@vindex org-list-use-circular-motion
1632Jump to the previous/next item in the current list@footnote{If you want to
1633cycle around items that way, you may customize
1634@code{org-list-use-circular-motion}.}, but only if
1593@code{org-support-shift-select} is off. If not, you can still use paragraph 1635@code{org-support-shift-select} is off. If not, you can still use paragraph
1594jumping commands like @kbd{C-@key{up}} and @kbd{C-@key{down}} to quite 1636jumping commands like @kbd{C-@key{up}} and @kbd{C-@key{down}} to quite
1595similar effect. 1637similar effect.
1596@kindex M-S-@key{up} 1638@kindex M-@key{up}
1597@kindex M-S-@key{down} 1639@kindex M-@key{down}
1598@item M-S-@key{up} 1640@item M-@key{up}
1599@itemx M-S-@key{down} 1641@itemx M-@key{down}
1600Move the item including subitems up/down (swap with previous/next item 1642Move the item including subitems up/down@footnote{See
1601of same indentation). If the list is ordered, renumbering is 1643@code{org-liste-use-circular-motion} for a cyclic behavior.} (swap with
1602automatic. 1644previous/next item of same indentation). If the list is ordered, renumbering
1645is automatic.
1603@kindex M-@key{left} 1646@kindex M-@key{left}
1604@kindex M-@key{right} 1647@kindex M-@key{right}
1605@item M-@key{left} 1648@item M-@key{left}
@@ -1623,9 +1666,8 @@ influence on the text @emph{after} the list.
1623@kindex C-c C-c 1666@kindex C-c C-c
1624@item C-c C-c 1667@item C-c C-c
1625If there is a checkbox (@pxref{Checkboxes}) in the item line, toggle the 1668If there is a checkbox (@pxref{Checkboxes}) in the item line, toggle the
1626state of the checkbox. Also, makes sure that all the 1669state of the checkbox. In any case, verify bullets and indentation
1627items on this list level use the same bullet and that the numbering of list 1670consistency in the whole list.
1628items (if applicable) is correct.
1629@kindex C-c - 1671@kindex C-c -
1630@vindex org-plain-list-ordered-item-terminator 1672@vindex org-plain-list-ordered-item-terminator
1631@vindex org-list-automatic-rules 1673@vindex org-list-automatic-rules
@@ -1636,14 +1678,20 @@ depending on @code{org-plain-list-ordered-item-terminator}, the type of list,
1636and its position@footnote{See @code{bullet} rule in 1678and its position@footnote{See @code{bullet} rule in
1637@code{org-list-automatic-rules} for more information.}. With a numeric 1679@code{org-list-automatic-rules} for more information.}. With a numeric
1638prefix argument N, select the Nth bullet from this list. If there is an 1680prefix argument N, select the Nth bullet from this list. If there is an
1639active region when calling this, all lines will be converted to list items. 1681active region when calling this, selected text will be changed into an item.
1640If the first line already was a list item, any item markers will be removed 1682With a prefix argument, all lines will be converted to list items. If the
1641from the list. Finally, even without an active region, a normal line will be 1683first line already was a list item, any item marker will be removed from the
1684list. Finally, even without an active region, a normal line will be
1642converted into a list item. 1685converted into a list item.
1643@kindex C-c * 1686@kindex C-c *
1644@item C-c * 1687@item C-c *
1645Turn a plain list item into a headline (so that it becomes a subheading at 1688Turn a plain list item into a headline (so that it becomes a subheading at
1646its location). @xref{Structure editing}, for a detailed explanation. 1689its location). @xref{Structure editing}, for a detailed explanation.
1690@kindex C-c C-*
1691@item C-c C-*
1692Turn the whole plain list into a subtree of the current heading. Checkboxes
1693(@pxref{Checkboxes}) will become TODO (resp. DONE) keywords when unchecked
1694(resp. checked).
1647@kindex S-@key{left} 1695@kindex S-@key{left}
1648@kindex S-@key{right} 1696@kindex S-@key{right}
1649@item S-@key{left}/@key{right} 1697@item S-@key{left}/@key{right}
@@ -1675,7 +1723,7 @@ look like this:
1675** This is a headline 1723** This is a headline
1676 Still outside the drawer 1724 Still outside the drawer
1677 :DRAWERNAME: 1725 :DRAWERNAME:
1678 This is inside the drawer. 1726 This is inside the drawer.
1679 :END: 1727 :END:
1680 After the drawer. 1728 After the drawer.
1681@end example 1729@end example
@@ -1721,7 +1769,7 @@ or on a per-file basis by using
1721Org-mode supports the creation of footnotes. In contrast to the 1769Org-mode supports the creation of footnotes. In contrast to the
1722@file{footnote.el} package, Org-mode's footnotes are designed for work on a 1770@file{footnote.el} package, Org-mode's footnotes are designed for work on a
1723larger document, not only for one-off documents like emails. The basic 1771larger document, not only for one-off documents like emails. The basic
1724syntax is similar to the one used by @file{footnote.el}, i.e. a footnote is 1772syntax is similar to the one used by @file{footnote.el}, i.e.@: a footnote is
1725defined in a paragraph that is started by a footnote marker in square 1773defined in a paragraph that is started by a footnote marker in square
1726brackets in column 0, no indentation allowed. If you need a paragraph break 1774brackets in column 0, no indentation allowed. If you need a paragraph break
1727inside a footnote, use the @LaTeX{} idiom @samp{\par}. The footnote reference 1775inside a footnote, use the @LaTeX{} idiom @samp{\par}. The footnote reference
@@ -1798,7 +1846,7 @@ S @r{Short for first @code{r}, then @code{s} action.}
1798n @r{Normalize the footnotes by collecting all definitions (including} 1846n @r{Normalize the footnotes by collecting all definitions (including}
1799 @r{inline definitions) into a special section, and then numbering them} 1847 @r{inline definitions) into a special section, and then numbering them}
1800 @r{in sequence. The references will then also be numbers. This is} 1848 @r{in sequence. The references will then also be numbers. This is}
1801 @r{meant to be the final step before finishing a document (e.g. sending} 1849 @r{meant to be the final step before finishing a document (e.g.@: sending}
1802 @r{off an email). The exporters do this automatically, and so could} 1850 @r{off an email). The exporters do this automatically, and so could}
1803 @r{something like @code{message-send-hook}.} 1851 @r{something like @code{message-send-hook}.}
1804d @r{Delete the footnote at point, and all definitions of and references} 1852d @r{Delete the footnote at point, and all definitions of and references}
@@ -1831,11 +1879,11 @@ If you like the intuitive way the Org-mode structure editing and list
1831formatting works, you might want to use these commands in other modes like 1879formatting works, you might want to use these commands in other modes like
1832Text mode or Mail mode as well. The minor mode @code{orgstruct-mode} makes 1880Text mode or Mail mode as well. The minor mode @code{orgstruct-mode} makes
1833this possible. Toggle the mode with @kbd{M-x orgstruct-mode}, or 1881this possible. Toggle the mode with @kbd{M-x orgstruct-mode}, or
1834turn it on by default, for example in Mail mode, with one of: 1882turn it on by default, for example in Message mode, with one of:
1835 1883
1836@lisp 1884@lisp
1837(add-hook 'mail-mode-hook 'turn-on-orgstruct) 1885(add-hook 'message-mode-hook 'turn-on-orgstruct)
1838(add-hook 'mail-mode-hook 'turn-on-orgstruct++) 1886(add-hook 'message-mode-hook 'turn-on-orgstruct++)
1839@end lisp 1887@end lisp
1840 1888
1841When this mode is active and the cursor is on a line that looks to Org like a 1889When this mode is active and the cursor is on a line that looks to Org like a
@@ -1875,10 +1923,11 @@ calculator).
1875@section The built-in table editor 1923@section The built-in table editor
1876@cindex table editor, built-in 1924@cindex table editor, built-in
1877 1925
1878Org makes it easy to format tables in plain ASCII. Any line with 1926Org makes it easy to format tables in plain ASCII. Any line with @samp{|} as
1879@samp{|} as the first non-whitespace character is considered part of a 1927the first non-whitespace character is considered part of a table. @samp{|}
1880table. @samp{|} is also the column separator. A table might look like 1928is also the column separator@footnote{To insert a vertical bar into a table
1881this: 1929field, use @code{\vert} or, inside a word @code{abc\vert@{@}def}.}. A table
1930might look like this:
1882 1931
1883@example 1932@example
1884| Name | Phone | Age | 1933| Name | Phone | Age |
@@ -1919,7 +1968,7 @@ unpredictable for you, configure the variables
1919@table @kbd 1968@table @kbd
1920@tsubheading{Creation and conversion} 1969@tsubheading{Creation and conversion}
1921@orgcmd{C-c |,org-table-create-or-convert-from-region} 1970@orgcmd{C-c |,org-table-create-or-convert-from-region}
1922Convert the active region to table. If every line contains at least one 1971Convert the active region to table. If every line contains at least one
1923TAB character, the function assumes that the material is tab separated. 1972TAB character, the function assumes that the material is tab separated.
1924If every line contains a comma, comma-separated values (CSV) are assumed. 1973If every line contains a comma, comma-separated values (CSV) are assumed.
1925If not, lines are split at whitespace into fields. You can use a prefix 1974If not, lines are split at whitespace into fields. You can use a prefix
@@ -1928,7 +1977,7 @@ C-u} forces TAB, and a numeric argument N indicates that at least N
1928consecutive spaces, or alternatively a TAB will be the separator. 1977consecutive spaces, or alternatively a TAB will be the separator.
1929@* 1978@*
1930If there is no active region, this command creates an empty Org 1979If there is no active region, this command creates an empty Org
1931table. But it's easier just to start typing, like 1980table. But it is easier just to start typing, like
1932@kbd{|Name|Phone|Age @key{RET} |- @key{TAB}}. 1981@kbd{|Name|Phone|Age @key{RET} |- @key{TAB}}.
1933 1982
1934@tsubheading{Re-aligning and field motion} 1983@tsubheading{Re-aligning and field motion}
@@ -2043,7 +2092,10 @@ increment. This key is also used by shift-selection and related modes
2043Edit the current field in a separate window. This is useful for fields that 2092Edit the current field in a separate window. This is useful for fields that
2044are not fully visible (@pxref{Column width and alignment}). When called with 2093are not fully visible (@pxref{Column width and alignment}). When called with
2045a @kbd{C-u} prefix, just make the full field visible, so that it can be 2094a @kbd{C-u} prefix, just make the full field visible, so that it can be
2046edited in place. 2095edited in place. When called with two @kbd{C-u} prefixes, make the editor
2096window follow the cursor through the table and always show the current
2097field. The follow mode exits automatically when the cursor leaves the table,
2098or when you repeat this command with @kbd{C-u C-u C-c `}.
2047@c 2099@c
2048@item M-x org-table-import 2100@item M-x org-table-import
2049Import a file as a table. The table should be TAB or whitespace 2101Import a file as a table. The table should be TAB or whitespace
@@ -2187,10 +2239,10 @@ If you like the intuitive way the Org table editor works, you
2187might also want to use it in other modes like Text mode or Mail mode. 2239might also want to use it in other modes like Text mode or Mail mode.
2188The minor mode Orgtbl mode makes this possible. You can always toggle 2240The minor mode Orgtbl mode makes this possible. You can always toggle
2189the mode with @kbd{M-x orgtbl-mode}. To turn it on by default, for 2241the mode with @kbd{M-x orgtbl-mode}. To turn it on by default, for
2190example in mail mode, use 2242example in Message mode, use
2191 2243
2192@lisp 2244@lisp
2193(add-hook 'mail-mode-hook 'turn-on-orgtbl) 2245(add-hook 'message-mode-hook 'turn-on-orgtbl)
2194@end lisp 2246@end lisp
2195 2247
2196Furthermore, with some special setup, it is possible to maintain tables 2248Furthermore, with some special setup, it is possible to maintain tables
@@ -2219,7 +2271,8 @@ formula, moving these references by arrow keys
2219* References:: How to refer to another field or range 2271* References:: How to refer to another field or range
2220* Formula syntax for Calc:: Using Calc to compute stuff 2272* Formula syntax for Calc:: Using Calc to compute stuff
2221* Formula syntax for Lisp:: Writing formulas in Emacs Lisp 2273* Formula syntax for Lisp:: Writing formulas in Emacs Lisp
2222* Field formulas:: Formulas valid for a single field 2274* Durations and time values:: How to compute durations and time values
2275* Field and range formulas:: Formula for specific (ranges of) fields
2223* Column formulas:: Formulas valid for an entire column 2276* Column formulas:: Formulas valid for an entire column
2224* Editing and debugging formulas:: Fixing formulas 2277* Editing and debugging formulas:: Fixing formulas
2225* Updating the table:: Recomputing all dependent fields 2278* Updating the table:: Recomputing all dependent fields
@@ -2243,35 +2296,42 @@ field, or press @kbd{C-c @}} to toggle the display of a grid.
2243Formulas can reference the value of another field in two ways. Like in 2296Formulas can reference the value of another field in two ways. Like in
2244any other spreadsheet, you may reference fields with a letter/number 2297any other spreadsheet, you may reference fields with a letter/number
2245combination like @code{B3}, meaning the 2nd field in the 3rd row. 2298combination like @code{B3}, meaning the 2nd field in the 3rd row.
2246@c Such references are always fixed to that field, they don't change 2299@vindex org-table-use-standard-references
2247@c when you copy and paste a formula to a different field. So 2300However, Org prefers@footnote{Org will understand references typed by the
2248@c Org's @code{B3} behaves like @code{$B$3} in other spreadsheets. 2301user as @samp{B4}, but it will not use this syntax when offering a formula
2249 2302for editing. You can customize this behavior using the variable
2250@noindent 2303@code{org-table-use-standard-references}.} to use another, more general
2251Org also uses another, more general operator that looks like this: 2304representation that looks like this:
2252@example 2305@example
2253@@@var{row}$@var{column} 2306@@@var{row}$@var{column}
2254@end example 2307@end example
2255 2308
2256@noindent 2309Column specifications can be absolute like @code{$1},
2257Column references can be absolute like @samp{1}, @samp{2},...@samp{@var{N}}, 2310@code{$2},...@code{$@var{N}}, or relative to the current column (i.e.@: the
2258or relative to the current column like @samp{+1} or @samp{-2}. 2311column of the field which is being computed) like @code{$+1} or @code{$-2}.
2259 2312@code{$<} and @code{$>} are immutable references to the first and last
2260The row specification only counts data lines and ignores horizontal 2313column, respectively, and you can use @code{$>>>} to indicate the third
2261separator lines (hlines). You can use absolute row numbers 2314column from the right.
2262@samp{1}...@samp{@var{N}}, and row numbers relative to the current row like 2315
2263@samp{+3} or @samp{-1}. Or specify the row relative to one of the 2316The row specification only counts data lines and ignores horizontal separator
2264hlines: @samp{I} refers to the first hline@footnote{Note that only 2317lines (hlines). Like with columns, you can use absolute row numbers
2265hlines are counted that @emph{separate} table lines. If the table 2318@code{@@1}, @code{@@2},...@code{@@@var{N}}, and row numbers relative to the
2266starts with a hline above the header, it does not count.}, @samp{II} to 2319current row like @code{@@+3} or @code{@@-1}. @code{@@<} and @code{@@>} are
2267the second, etc@. @samp{-I} refers to the first such line above the 2320immutable references the first and last@footnote{For backward compatibility
2268current line, @samp{+I} to the first such line below the current line. 2321you can also use special names like @code{$LR5} and @code{$LR12} to refer in
2269You can also write @samp{III+2} which is the second data line after the 2322a stable way to the 5th and 12th field in the last row of the table.
2270third hline in the table. 2323However, this syntax is deprecated, it should not be used for new documents.
2271 2324Use @code{@@>$} instead.} row in the table, respectively. You may also
2272@samp{0} refers to the current row and column. Also, if you omit 2325specify the row relative to one of the hlines: @code{@@I} refers to the first
2273either the column or the row part of the reference, the current 2326hline, @code{@@II} to the second, etc@. @code{@@-I} refers to the first such
2274row/column is implied. 2327line above the current line, @code{@@+I} to the first such line below the
2328current line. You can also write @code{@@III+2} which is the second data line
2329after the third hline in the table.
2330
2331@code{@@0} and @code{$0} refer to the current row and column, respectively,
2332i.e. to the row/column for the field being computed. Also, if you omit
2333either the column or the row part of the reference, the current row/column is
2334implied.
2275 2335
2276Org's references with @emph{unsigned} numbers are fixed references 2336Org's references with @emph{unsigned} numbers are fixed references
2277in the sense that if you use the same reference in the formula for two 2337in the sense that if you use the same reference in the formula for two
@@ -2280,20 +2340,15 @@ Org's references with @emph{signed} numbers are floating
2280references because the same reference operator can reference different 2340references because the same reference operator can reference different
2281fields depending on the field being calculated by the formula. 2341fields depending on the field being calculated by the formula.
2282 2342
2283As a special case, references like @samp{$LR5} and @samp{$LR12} can be used
2284to refer in a stable way to the 5th and 12th field in the last row of the
2285table.
2286
2287Here are a few examples: 2343Here are a few examples:
2288 2344
2289@example 2345@example
2290@@2$3 @r{2nd row, 3rd column} 2346@@2$3 @r{2nd row, 3rd column (same as @code{C2})}
2291C2 @r{same as previous} 2347$5 @r{column 5 in the current row (same as @code{E&})}
2292$5 @r{column 5 in the current row}
2293E& @r{same as previous}
2294@@2 @r{current column, row 2} 2348@@2 @r{current column, row 2}
2295@@-1$-3 @r{the field one row up, three columns to the left} 2349@@-1$-3 @r{the field one row up, three columns to the left}
2296@@-I$2 @r{field just under hline above current row, column 2} 2350@@-I$2 @r{field just under hline above current row, column 2}
2351@@>$5 @r{field in the last row, in column 5}
2297@end example 2352@end example
2298 2353
2299@subsubheading Range references 2354@subsubheading Range references
@@ -2308,11 +2363,12 @@ format at least for the first field (i.e the reference must start with
2308@samp{@@} in order to be interpreted correctly). Examples: 2363@samp{@@} in order to be interpreted correctly). Examples:
2309 2364
2310@example 2365@example
2311$1..$3 @r{First three fields in the current row.} 2366$1..$3 @r{first three fields in the current row}
2312$P..$Q @r{Range, using column names (see under Advanced)} 2367$P..$Q @r{range, using column names (see under Advanced)}
2313@@2$1..@@4$3 @r{6 fields between these two fields.} 2368$<<<..$>> @r{start in third column, continue to the one but last}
2314A2..C4 @r{Same as above.} 2369@@2$1..@@4$3 @r{6 fields between these two fields (same as @code{A2..C4})}
2315@@-1$-2..@@-1 @r{3 numbers from the column to the left, 2 up to current row} 2370@@-1$-2..@@-1 @r{3 numbers from the column to the left, 2 up to current row}
2371@@I..II @r{between first and second hline, short for @code{@@I..@@II}}
2316@end example 2372@end example
2317 2373
2318@noindent Range references return a vector of values that can be fed 2374@noindent Range references return a vector of values that can be fed
@@ -2339,7 +2395,7 @@ $3 = remote(FOO, @@@@#$2) @r{copy column 2 from table FOO into}
2339@end example 2395@end example
2340 2396
2341@noindent For the second example, table FOO must have at least as many rows 2397@noindent For the second example, table FOO must have at least as many rows
2342as the current table. Inefficient@footnote{The computation time scales as 2398as the current table. Note that this is inefficient@footnote{The computation time scales as
2343O(N^2) because table FOO is parsed for each field to be copied.} for large 2399O(N^2) because table FOO is parsed for each field to be copied.} for large
2344number of rows. 2400number of rows.
2345 2401
@@ -2440,7 +2496,6 @@ n3 s3 e2 f4 @r{Normal, scientific, engineering, or fixed}
2440D R @r{angle modes: degrees, radians} 2496D R @r{angle modes: degrees, radians}
2441F S @r{fraction and symbolic modes} 2497F S @r{fraction and symbolic modes}
2442N @r{interpret all fields as numbers, use 0 for non-numbers} 2498N @r{interpret all fields as numbers, use 0 for non-numbers}
2443T @r{force text interpretation}
2444E @r{keep empty fields in ranges} 2499E @r{keep empty fields in ranges}
2445L @r{literal} 2500L @r{literal}
2446@end example 2501@end example
@@ -2474,10 +2529,13 @@ taylor($3,x=7,2) @r{Taylor series of $3, at x=7, second degree}
2474Calc also contains a complete set of logical operations. For example 2529Calc also contains a complete set of logical operations. For example
2475 2530
2476@example 2531@example
2477if($1<20,teen,string("")) @r{``teen'' if age $1 less than 20, else empty} 2532if($1<20,teen,string("")) @r{"teen" if age $1 less than 20, else empty}
2478@end example 2533@end example
2479 2534
2480@node Formula syntax for Lisp, Field formulas, Formula syntax for Calc, The spreadsheet 2535Note that you can also use two org-specific flags @code{T} and @code{t} for
2536durations computations @ref{Durations and time values}.
2537
2538@node Formula syntax for Lisp, Durations and time values, Formula syntax for Calc, The spreadsheet
2481@subsection Emacs Lisp forms as formulas 2539@subsection Emacs Lisp forms as formulas
2482@cindex Lisp forms, as table formulas 2540@cindex Lisp forms, as table formulas
2483 2541
@@ -2496,7 +2554,7 @@ you provide the @samp{L} flag, all fields will be interpolated literally,
2496without quotes. I.e., if you want a reference to be interpreted as a string 2554without quotes. I.e., if you want a reference to be interpreted as a string
2497by the Lisp form, enclose the reference operator itself in double-quotes, 2555by the Lisp form, enclose the reference operator itself in double-quotes,
2498like @code{"$3"}. Ranges are inserted as space-separated fields, so you can 2556like @code{"$3"}. Ranges are inserted as space-separated fields, so you can
2499+embed them in list or vector syntax. Here are a few examples---note how the 2557embed them in list or vector syntax. Here are a few examples---note how the
2500@samp{N} mode is used when we do computations in Lisp: 2558@samp{N} mode is used when we do computations in Lisp:
2501 2559
2502@example 2560@example
@@ -2508,31 +2566,64 @@ like @code{"$3"}. Ranges are inserted as space-separated fields, so you can
2508 '(apply '+ '($1..$4));N 2566 '(apply '+ '($1..$4));N
2509@end example 2567@end example
2510 2568
2511@node Field formulas, Column formulas, Formula syntax for Lisp, The spreadsheet 2569@node Durations and time values, Field and range formulas, Formula syntax for Lisp, The spreadsheet
2512@subsection Field formulas 2570@subsection Durations and time values
2571@cindex Duration, computing
2572@cindex Time, computing
2573@vindex org-table-duration-custom-format
2574
2575If you want to compute time values use the @code{T} flag, either in Calc
2576formulas or Elisp formulas:
2577
2578@example
2579@group
2580 | Task 1 | Task 2 | Total |
2581 |---------+----------+----------|
2582 | 2:12 | 1:47 | 03:59:00 |
2583 | 3:02:20 | -2:07:00 | 0.92 |
2584 #+TBLFM: @@2$3=$1+$2;T::@@3$3=$1+$2;t
2585@end group
2586@end example
2587
2588Input duration values must be of the form @code{[HH:MM[:SS]}, where seconds
2589are optional. With the @code{T} flag, computed durations will be displayed
2590as @code{[HH:MM:SS} (see the first formula above). With the @code{t} flag,
2591computed durations will be displayed according to the value of the variable
2592@code{org-table-duration-custom-format}, which defaults to @code{'hours} and
2593will display the result as a fraction of hours (see the second formula in the
2594example above).
2595
2596Negative duration values can be manipulated as well, and integers will be
2597considered as seconds in addition and subtraction.
2598
2599@node Field and range formulas, Column formulas, Durations and time values, The spreadsheet
2600@subsection Field and range formulas
2513@cindex field formula 2601@cindex field formula
2602@cindex range formula
2514@cindex formula, for individual table field 2603@cindex formula, for individual table field
2604@cindex formula, for range of fields
2515 2605
2516To assign a formula to a particular field, type it directly into the 2606To assign a formula to a particular field, type it directly into the field,
2517field, preceded by @samp{:=}, for example @samp{:=$1+$2}. When you 2607preceded by @samp{:=}, for example @samp{:=vsum(@@II..III)}. When you press
2518press @key{TAB} or @key{RET} or @kbd{C-c C-c} with the cursor still in 2608@key{TAB} or @key{RET} or @kbd{C-c C-c} with the cursor still in the field,
2519the field, the formula will be stored as the formula for this field, 2609the formula will be stored as the formula for this field, evaluated, and the
2520evaluated, and the current field replaced with the result. 2610current field will be replaced with the result.
2521 2611
2522@cindex #+TBLFM 2612@cindex #+TBLFM
2523Formulas are stored in a special line starting with @samp{#+TBLFM:} 2613Formulas are stored in a special line starting with @samp{#+TBLFM:} directly
2524directly below the table. If you type the equation in the 4th field of 2614below the table. If you type the equation in the 4th field of the 3rd data
2525the 3rd data line in the table, the formula will look like 2615line in the table, the formula will look like @samp{@@3$4=$1+$2}. When
2526@samp{@@3$4=$1+$2}. When inserting/deleting/swapping column and rows 2616inserting/deleting/swapping column and rows with the appropriate commands,
2527with the appropriate commands, @i{absolute references} (but not relative 2617@i{absolute references} (but not relative ones) in stored formulas are
2528ones) in stored formulas are modified in order to still reference the 2618modified in order to still reference the same field. To avoid this from
2529same field. Of course this is not true if you edit the table structure 2619happening, in particular in range references, anchor ranges at the table
2530with normal editing commands---then you must fix the equations yourself. 2620borders (using @code{@@<}, @code{@@>}, @code{$<}, @code{$>}), or at hlines
2531The left-hand side of a formula may also be a named field (@pxref{Advanced 2621using the @code{@@I} notation. Automatic adaptation of field references does
2532features}), or a last-row reference like @samp{$LR3}. 2622of cause not happen if you edit the table structure with normal editing
2533 2623commands---then you must fix the equations yourself.
2534Instead of typing an equation into the field, you may also use the 2624
2535following command 2625Instead of typing an equation into the field, you may also use the following
2626command
2536 2627
2537@table @kbd 2628@table @kbd
2538@orgcmd{C-u C-c =,org-table-eval-formula} 2629@orgcmd{C-u C-c =,org-table-eval-formula}
@@ -2541,17 +2632,38 @@ formula with default taken from the @samp{#+TBLFM:} line, applies
2541it to the current field, and stores it. 2632it to the current field, and stores it.
2542@end table 2633@end table
2543 2634
2544@node Column formulas, Editing and debugging formulas, Field formulas, The spreadsheet 2635The left-hand side of a formula can also be a special expression in order to
2636assign the formula to a number of different fields. There is no keyboard
2637shortcut to enter such range formulas. To add them, use the formula editor
2638(@pxref{Editing and debugging formulas}) or edit the @code{#+TBLFM:} line
2639directly.
2640
2641@table @code
2642@item $2=
2643Column formula, valid for the entire column. This is so common that Org
2644treats these formulas in a special way, see @ref{Column formulas}.
2645@item @@3=
2646Row formula, applies to all fields in the specified row. @code{@@>=} means
2647the last row.
2648@item @@1$2..@@4$3=
2649Range formula, applies to all fields in the given rectangular range. This
2650can also be used to assign a formula to some but not all fields in a row.
2651@item $name=
2652Named field, see @ref{Advanced features}.
2653@end table
2654
2655@node Column formulas, Editing and debugging formulas, Field and range formulas, The spreadsheet
2545@subsection Column formulas 2656@subsection Column formulas
2546@cindex column formula 2657@cindex column formula
2547@cindex formula, for table column 2658@cindex formula, for table column
2548 2659
2549Often in a table, the same formula should be used for all fields in a 2660When you assign a formula to a simple column reference like @code{$3=}, the
2550particular column. Instead of having to copy the formula to all fields 2661same formula will be used in all fields of that column, with the following
2551in that column, Org allows you to assign a single formula to an entire 2662very convenient exceptions: (i) If the table contains horizontal separator
2552column. If the table contains horizontal separator hlines, everything 2663hlines, everything before the first such line is considered part of the table
2553before the first such line is considered part of the table @emph{header} 2664@emph{header} and will not be modified by column formulas. (ii) Fields that
2554and will not be modified by column formulas. 2665already get a value from a field/range formula will be left alone by column
2666formulas. These conditions make column formulas very easy to use.
2555 2667
2556To assign a formula to a column, type it directly into any field in the 2668To assign a formula to a column, type it directly into any field in the
2557column, preceded by an equal sign, like @samp{=$1+$2}. When you press 2669column, preceded by an equal sign, like @samp{=$1+$2}. When you press
@@ -2560,9 +2672,9 @@ the formula will be stored as the formula for the current column, evaluated
2560and the current field replaced with the result. If the field contains only 2672and the current field replaced with the result. If the field contains only
2561@samp{=}, the previously stored formula for this column is used. For each 2673@samp{=}, the previously stored formula for this column is used. For each
2562column, Org will only remember the most recently used formula. In the 2674column, Org will only remember the most recently used formula. In the
2563@samp{#+TBLFM:} line, column formulas will look like @samp{$4=$1+$2}. The left-hand 2675@samp{#+TBLFM:} line, column formulas will look like @samp{$4=$1+$2}. The
2564side of a column formula cannot currently be the name of column, it 2676left-hand side of a column formula can not be the name of column, it must be
2565must be the numeric column reference. 2677the numeric column reference or @code{$>}.
2566 2678
2567Instead of typing an equation into the field, you may also use the 2679Instead of typing an equation into the field, you may also use the
2568following command: 2680following command:
@@ -2572,7 +2684,7 @@ following command:
2572Install a new formula for the current column and replace current field with 2684Install a new formula for the current column and replace current field with
2573the result of the formula. The command prompts for a formula, with default 2685the result of the formula. The command prompts for a formula, with default
2574taken from the @samp{#+TBLFM} line, applies it to the current field and 2686taken from the @samp{#+TBLFM} line, applies it to the current field and
2575stores it. With a numeric prefix argument(e.g. @kbd{C-5 C-c =}) the command 2687stores it. With a numeric prefix argument(e.g.@: @kbd{C-5 C-c =}) the command
2576will apply it to that many consecutive fields in the current column. 2688will apply it to that many consecutive fields in the current column.
2577@end table 2689@end table
2578 2690
@@ -2593,7 +2705,7 @@ if possible. If you prefer to only work with the internal format (like
2593@table @kbd 2705@table @kbd
2594@orgcmdkkc{C-c =,C-u C-c =,org-table-eval-formula} 2706@orgcmdkkc{C-c =,C-u C-c =,org-table-eval-formula}
2595Edit the formula associated with the current column/field in the 2707Edit the formula associated with the current column/field in the
2596minibuffer. See @ref{Column formulas}, and @ref{Field formulas}. 2708minibuffer. See @ref{Column formulas}, and @ref{Field and range formulas}.
2597@orgcmd{C-u C-u C-c =,org-table-eval-formula} 2709@orgcmd{C-u C-u C-c =,org-table-eval-formula}
2598Re-insert the active formula (either a 2710Re-insert the active formula (either a
2599field formula, or a column formula) into the current field, so that you 2711field formula, or a column formula) into the current field, so that you
@@ -2696,7 +2808,7 @@ following commands:
2696@table @kbd 2808@table @kbd
2697@orgcmd{C-c *,org-table-recalculate} 2809@orgcmd{C-c *,org-table-recalculate}
2698Recalculate the current row by first applying the stored column formulas 2810Recalculate the current row by first applying the stored column formulas
2699from left to right, and all field formulas in the current row. 2811from left to right, and all field/range formulas in the current row.
2700@c 2812@c
2701@kindex C-u C-c * 2813@kindex C-u C-c *
2702@item C-u C-c * 2814@item C-u C-c *
@@ -2724,6 +2836,7 @@ dependencies.
2724If you want the recalculation of fields to happen automatically, or if 2836If you want the recalculation of fields to happen automatically, or if
2725you want to be able to assign @i{names} to fields and columns, you need 2837you want to be able to assign @i{names} to fields and columns, you need
2726to reserve the first column of the table for special marking characters. 2838to reserve the first column of the table for special marking characters.
2839
2727@table @kbd 2840@table @kbd
2728@orgcmd{C-#,org-table-rotate-recalc-marks} 2841@orgcmd{C-#,org-table-rotate-recalc-marks}
2729Rotate the calculation mark in first column through the states @samp{ }, 2842Rotate the calculation mark in first column through the states @samp{ },
@@ -2849,7 +2962,7 @@ Further control over the labels, type, content, and appearance of plots can
2849be exercised through the @code{#+PLOT:} lines preceding a table. See below 2962be exercised through the @code{#+PLOT:} lines preceding a table. See below
2850for a complete list of Org-plot options. For more information and examples 2963for a complete list of Org-plot options. For more information and examples
2851see the Org-plot tutorial at 2964see the Org-plot tutorial at
2852@uref{http://orgmode.org/worg/org-tutorials/org-plot.php}. 2965@uref{http://orgmode.org/worg/org-tutorials/org-plot.html}.
2853 2966
2854@subsubheading Plot Options 2967@subsubheading Plot Options
2855 2968
@@ -2874,7 +2987,7 @@ Specify whether the plot will be @code{2d}, @code{3d}, or @code{grid}.
2874 2987
2875@item with 2988@item with
2876Specify a @code{with} option to be inserted for every col being plotted 2989Specify a @code{with} option to be inserted for every col being plotted
2877(e.g. @code{lines}, @code{points}, @code{boxes}, @code{impulses}, etc...). 2990(e.g.@: @code{lines}, @code{points}, @code{boxes}, @code{impulses}, etc...).
2878Defaults to @code{lines}. 2991Defaults to @code{lines}.
2879 2992
2880@item file 2993@item file
@@ -2976,7 +3089,7 @@ or with a mouse click (@pxref{Handling links}). Links to custom IDs will
2976point to the corresponding headline. The preferred match for a text link is 3089point to the corresponding headline. The preferred match for a text link is
2977a @i{dedicated target}: the same string in double angular brackets. Targets 3090a @i{dedicated target}: the same string in double angular brackets. Targets
2978may be located anywhere; sometimes it is convenient to put them into a 3091may be located anywhere; sometimes it is convenient to put them into a
2979comment line. For example 3092comment line. For example
2980 3093
2981@example 3094@example
2982# <<My Target>> 3095# <<My Target>>
@@ -3076,12 +3189,14 @@ gnus:group @r{Gnus group link}
3076gnus:group#id @r{Gnus article link} 3189gnus:group#id @r{Gnus article link}
3077bbdb:R.*Stallman @r{BBDB link (with regexp)} 3190bbdb:R.*Stallman @r{BBDB link (with regexp)}
3078irc:/irc.com/#emacs/bob @r{IRC link} 3191irc:/irc.com/#emacs/bob @r{IRC link}
3079info:org:External%20links @r{Info node link (with encoded space)} 3192info:org#External%20links @r{Info node link (with encoded space)}
3080shell:ls *.org @r{A shell command} 3193shell:ls *.org @r{A shell command}
3081elisp:org-agenda @r{Interactive Elisp command} 3194elisp:org-agenda @r{Interactive Elisp command}
3082elisp:(find-file-other-frame "Elisp.org") @r{Elisp form to evaluate} 3195elisp:(find-file-other-frame "Elisp.org") @r{Elisp form to evaluate}
3083@end example 3196@end example
3084 3197
3198For customizing Org to add new link types @ref{Adding hyperlink types}.
3199
3085A link should be enclosed in double brackets and may contain a 3200A link should be enclosed in double brackets and may contain a
3086descriptive text to be displayed instead of the URL (@pxref{Link 3201descriptive text to be displayed instead of the URL (@pxref{Link
3087format}), for example: 3202format}), for example:
@@ -3123,7 +3238,9 @@ buffer:
3123@b{Org-mode buffers}@* 3238@b{Org-mode buffers}@*
3124For Org files, if there is a @samp{<<target>>} at the cursor, the link points 3239For Org files, if there is a @samp{<<target>>} at the cursor, the link points
3125to the target. Otherwise it points to the current headline, which will also 3240to the target. Otherwise it points to the current headline, which will also
3126be the description. 3241be the description@footnote{If the headline contains a timestamp, it will be
3242removed from the link and result in a wrong link -- you should avoid putting
3243timestamp in the headline.}.
3127 3244
3128@vindex org-link-to-org-use-id 3245@vindex org-link-to-org-use-id
3129@cindex property, CUSTOM_ID 3246@cindex property, CUSTOM_ID
@@ -3261,7 +3378,7 @@ variable @code{org-display-internal-link-with-indirect-buffer}}.
3261@cindex @code{inlineimages}, STARTUP keyword 3378@cindex @code{inlineimages}, STARTUP keyword
3262@cindex @code{noinlineimages}, STARTUP keyword 3379@cindex @code{noinlineimages}, STARTUP keyword
3263Toggle the inline display of linked images. Normally this will only inline 3380Toggle the inline display of linked images. Normally this will only inline
3264images that have no description part in the link, i.e. images that will also 3381images that have no description part in the link, i.e.@: images that will also
3265be inlined during export. When called with a prefix argument, also display 3382be inlined during export. When called with a prefix argument, also display
3266images that do have a link description. You can ask for inline images to be 3383images that do have a link description. You can ask for inline images to be
3267displayed at startup by configuring the variable 3384displayed at startup by configuring the variable
@@ -3270,7 +3387,7 @@ displayed at startup by configuring the variable
3270@orgcmd{C-c %,org-mark-ring-push} 3387@orgcmd{C-c %,org-mark-ring-push}
3271@cindex mark ring 3388@cindex mark ring
3272Push the current position onto the mark ring, to be able to return 3389Push the current position onto the mark ring, to be able to return
3273easily. Commands following an internal link do this automatically. 3390easily. Commands following an internal link do this automatically.
3274@c 3391@c
3275@orgcmd{C-c &,org-mark-ring-goto} 3392@orgcmd{C-c &,org-mark-ring-goto}
3276@cindex links, returning to 3393@cindex links, returning to
@@ -3288,8 +3405,8 @@ to @kbd{C-n} and @kbd{C-p}
3288@lisp 3405@lisp
3289(add-hook 'org-load-hook 3406(add-hook 'org-load-hook
3290 (lambda () 3407 (lambda ()
3291 (define-key 'org-mode-map "\C-n" 'org-next-link) 3408 (define-key org-mode-map "\C-n" 'org-next-link)
3292 (define-key 'org-mode-map "\C-p" 'org-previous-link))) 3409 (define-key org-mode-map "\C-p" 'org-previous-link)))
3293@end lisp 3410@end lisp
3294@end table 3411@end table
3295 3412
@@ -3363,7 +3480,7 @@ can define them in the file with
3363@noindent 3480@noindent
3364In-buffer completion (@pxref{Completion}) can be used after @samp{[} to 3481In-buffer completion (@pxref{Completion}) can be used after @samp{[} to
3365complete link abbreviations. You may also define a function 3482complete link abbreviations. You may also define a function
3366@code{org-PREFIX-complete-link} that implements special (e.g. completion) 3483@code{org-PREFIX-complete-link} that implements special (e.g.@: completion)
3367support for inserting such a link with @kbd{C-c C-l}. Such a function should 3484support for inserting such a link with @kbd{C-c C-l}. Such a function should
3368not accept any arguments, and return the full link with prefix. 3485not accept any arguments, and return the full link with prefix.
3369 3486
@@ -3375,7 +3492,7 @@ not accept any arguments, and return the full link with prefix.
3375File links can contain additional information to make Emacs jump to a 3492File links can contain additional information to make Emacs jump to a
3376particular location in the file when following a link. This can be a 3493particular location in the file when following a link. This can be a
3377line number or a search option after a double@footnote{For backward 3494line number or a search option after a double@footnote{For backward
3378compatibility, line numbers can also follow a single colon.} colon. For 3495compatibility, line numbers can also follow a single colon.} colon. For
3379example, when the command @kbd{C-c l} creates a link (@pxref{Handling 3496example, when the command @kbd{C-c l} creates a link (@pxref{Handling
3380links}) to a file, it encodes the words in the current line as a search 3497links}) to a file, it encodes the words in the current line as a search
3381string that can be used to find this line back later when following the 3498string that can be used to find this line back later when following the
@@ -3517,7 +3634,7 @@ entire buffer, but shows all TODO items (with not-DONE state) and the
3517headings hierarchy above them. With a prefix argument (or by using @kbd{C-c 3634headings hierarchy above them. With a prefix argument (or by using @kbd{C-c
3518/ T}), search for a specific TODO. You will be prompted for the keyword, and 3635/ T}), search for a specific TODO. You will be prompted for the keyword, and
3519you can also give a list of keywords like @code{KWD1|KWD2|...} to list 3636you can also give a list of keywords like @code{KWD1|KWD2|...} to list
3520entries that match any one of these keywords. With numeric prefix argument 3637entries that match any one of these keywords. With a numeric prefix argument
3521N, show the tree for the Nth keyword in the variable 3638N, show the tree for the Nth keyword in the variable
3522@code{org-todo-keywords}. With two prefix arguments, find all TODO states, 3639@code{org-todo-keywords}. With two prefix arguments, find all TODO states,
3523both un-done and done. 3640both un-done and done.
@@ -3688,8 +3805,8 @@ key after each keyword, in parentheses. For example:
3688@end lisp 3805@end lisp
3689 3806
3690@vindex org-fast-tag-selection-include-todo 3807@vindex org-fast-tag-selection-include-todo
3691If you then press @code{C-c C-t} followed by the selection key, the entry 3808If you then press @kbd{C-c C-t} followed by the selection key, the entry
3692will be switched to this state. @key{SPC} can be used to remove any TODO 3809will be switched to this state. @kbd{SPC} can be used to remove any TODO
3693keyword from an entry.@footnote{Check also the variable 3810keyword from an entry.@footnote{Check also the variable
3694@code{org-fast-tag-selection-include-todo}, it allows you to change the TODO 3811@code{org-fast-tag-selection-include-todo}, it allows you to change the TODO
3695state through the tags interface (@pxref{Setting tags}), in case you like to 3812state through the tags interface (@pxref{Setting tags}), in case you like to
@@ -3796,7 +3913,7 @@ example:
3796 3913
3797* Parent 3914* Parent
3798 :PROPERTIES: 3915 :PROPERTIES:
3799 :ORDERED: t 3916 :ORDERED: t
3800 :END: 3917 :END:
3801** TODO a 3918** TODO a
3802** TODO b, needs to wait for (a) 3919** TODO b, needs to wait for (a)
@@ -3972,7 +4089,7 @@ called ``habits''. A habit has the following properties:
3972You have enabled the @code{habits} module by customizing the variable 4089You have enabled the @code{habits} module by customizing the variable
3973@code{org-modules}. 4090@code{org-modules}.
3974@item 4091@item
3975The habit is a TODO, with a TODO keyword representing an open state. 4092The habit is a TODO item, with a TODO keyword representing an open state.
3976@item 4093@item
3977The property @code{STYLE} is set to the value @code{habit}. 4094The property @code{STYLE} is set to the value @code{habit}.
3978@item 4095@item
@@ -3986,8 +4103,8 @@ syntax @samp{.+2d/3d}, which says that you want to do the task at least every
3986three days, but at most every two days. 4103three days, but at most every two days.
3987@item 4104@item
3988You must also have state logging for the @code{DONE} state enabled, in order 4105You must also have state logging for the @code{DONE} state enabled, in order
3989for historical data to be represented in the consistency graph. If it's not 4106for historical data to be represented in the consistency graph. If it is not
3990enabled it's not an error, but the consistency graphs will be largely 4107enabled it is not an error, but the consistency graphs will be largely
3991meaningless. 4108meaningless.
3992@end enumerate 4109@end enumerate
3993 4110
@@ -4045,7 +4162,7 @@ habits are displayed in the agenda.
4045@table @code 4162@table @code
4046@item org-habit-graph-column 4163@item org-habit-graph-column
4047The buffer column at which the consistency graph should be drawn. This will 4164The buffer column at which the consistency graph should be drawn. This will
4048overwrite any text in that column, so it's a good idea to keep your habits' 4165overwrite any text in that column, so it is a good idea to keep your habits'
4049titles brief and to the point. 4166titles brief and to the point.
4050@item org-habit-preceding-days 4167@item org-habit-preceding-days
4051The amount of history, in days before today, to appear in consistency graphs. 4168The amount of history, in days before today, to appear in consistency graphs.
@@ -4186,7 +4303,7 @@ large number of subtasks (@pxref{Checkboxes}).
4186 4303
4187@vindex org-list-automatic-rules 4304@vindex org-list-automatic-rules
4188Every item in a plain list@footnote{With the exception of description 4305Every item in a plain list@footnote{With the exception of description
4189lists. But you can allow it by modifying @code{org-list-automatic-rules} 4306lists. But you can allow it by modifying @code{org-list-automatic-rules}
4190accordingly.} (@pxref{Plain lists}) can be made into a checkbox by starting 4307accordingly.} (@pxref{Plain lists}) can be made into a checkbox by starting
4191it with the string @samp{[ ]}. This feature is similar to TODO items 4308it with the string @samp{[ ]}. This feature is similar to TODO items
4192(@pxref{TODO Items}), but is more lightweight. Checkboxes are not included 4309(@pxref{TODO Items}), but is more lightweight. Checkboxes are not included
@@ -4225,7 +4342,7 @@ be placed into a headline or into (the first line of) a plain list item.
4225Each cookie covers checkboxes of direct children structurally below the 4342Each cookie covers checkboxes of direct children structurally below the
4226headline/item on which the cookie appears@footnote{Set the variable 4343headline/item on which the cookie appears@footnote{Set the variable
4227@code{org-hierarchical-checkbox-statistics} if you want such cookies to 4344@code{org-hierarchical-checkbox-statistics} if you want such cookies to
4228represent the all checkboxes below the cookie, not just the direct 4345count all checkboxes below the cookie, not just those belonging to direct
4229children.}. You have to insert the cookie yourself by typing either 4346children.}. You have to insert the cookie yourself by typing either
4230@samp{[/]} or @samp{[%]}. With @samp{[/]} you get an @samp{n out of m} 4347@samp{[/]} or @samp{[%]}. With @samp{[/]} you get an @samp{n out of m}
4231result, as in the examples above. With @samp{[%]} you get information about 4348result, as in the examples above. With @samp{[%]} you get information about
@@ -4265,9 +4382,8 @@ this headline and the next (so @emph{not} the entire subtree).
4265If there is no active region, just toggle the checkbox at point. 4382If there is no active region, just toggle the checkbox at point.
4266@end itemize 4383@end itemize
4267@orgcmd{M-S-@key{RET},org-insert-todo-heading} 4384@orgcmd{M-S-@key{RET},org-insert-todo-heading}
4268Insert a new item with a checkbox. 4385Insert a new item with a checkbox. This works only if the cursor is already
4269This works only if the cursor is already in a plain list item 4386in a plain list item (@pxref{Plain lists}).
4270(@pxref{Plain lists}).
4271@orgcmd{C-c C-x o,org-toggle-ordered-property} 4387@orgcmd{C-c C-x o,org-toggle-ordered-property}
4272@vindex org-track-ordered-property-with-tag 4388@vindex org-track-ordered-property-with-tag
4273@cindex property, ORDERED 4389@cindex property, ORDERED
@@ -4283,8 +4399,7 @@ a @kbd{C-u} prefix, update the entire file. Checkbox statistic cookies are
4283updated automatically if you toggle checkboxes with @kbd{C-c C-c} and make 4399updated automatically if you toggle checkboxes with @kbd{C-c C-c} and make
4284new ones with @kbd{M-S-@key{RET}}. TODO statistics cookies update when 4400new ones with @kbd{M-S-@key{RET}}. TODO statistics cookies update when
4285changing TODO states. If you delete boxes/entries or add/change them by 4401changing TODO states. If you delete boxes/entries or add/change them by
4286hand, use this command to get things back into sync. Or simply toggle any 4402hand, use this command to get things back into sync.
4287entry twice (checkboxes with @kbd{C-c C-c}).
4288@end table 4403@end table
4289 4404
4290@node Tags, Properties and Columns, TODO Items, Top 4405@node Tags, Properties and Columns, TODO Items, Top
@@ -4386,7 +4501,7 @@ When the cursor is in a headline, this does the same as @kbd{C-c C-q}.
4386@end table 4501@end table
4387 4502
4388@vindex org-tag-alist 4503@vindex org-tag-alist
4389Org will support tag insertion based on a @emph{list of tags}. By 4504Org supports tag insertion based on a @emph{list of tags}. By
4390default this list is constructed dynamically, containing all tags 4505default this list is constructed dynamically, containing all tags
4391currently used in the buffer. You may also globally specify a hard list 4506currently used in the buffer. You may also globally specify a hard list
4392of tags with the variable @code{org-tag-alist}. Finally you can set 4507of tags with the variable @code{org-tag-alist}. Finally you can set
@@ -4498,6 +4613,8 @@ exclusive tags will turn off any other tags from that group.
4498@item @key{TAB} 4613@item @key{TAB}
4499Enter a tag in the minibuffer, even if the tag is not in the predefined 4614Enter a tag in the minibuffer, even if the tag is not in the predefined
4500list. You will be able to complete on all tags present in the buffer. 4615list. You will be able to complete on all tags present in the buffer.
4616You can also add several tags: just separate them with a comma.
4617
4501@kindex @key{SPC} 4618@kindex @key{SPC}
4502@item @key{SPC} 4619@item @key{SPC}
4503Clear all tags for this line. 4620Clear all tags for this line.
@@ -4548,7 +4665,7 @@ Once a system of tags has been set up, it can be used to collect related
4548information into special lists. 4665information into special lists.
4549 4666
4550@table @kbd 4667@table @kbd
4551@orgcmdkkc{C-c / m,C-c \,org-match-sparse-tree} 4668@orgcmdkkc{C-c / m,C-c \\,org-match-sparse-tree}
4552Create a sparse tree with all headlines matching a tags search. With a 4669Create a sparse tree with all headlines matching a tags search. With a
4553@kbd{C-u} prefix argument, ignore headlines that are not a TODO line. 4670@kbd{C-u} prefix argument, ignore headlines that are not a TODO line.
4554@orgcmd{C-c a m,org-tags-view} 4671@orgcmd{C-c a m,org-tags-view}
@@ -4655,7 +4772,7 @@ Org files.
4655The following commands help to work with properties: 4772The following commands help to work with properties:
4656 4773
4657@table @kbd 4774@table @kbd
4658@orgcmd{M-@key{TAB},org-complete} 4775@orgcmd{M-@key{TAB},pcomplete}
4659After an initial colon in a line, complete property keys. All keys used 4776After an initial colon in a line, complete property keys. All keys used
4660in the current file will be offered as possible completions. 4777in the current file will be offered as possible completions.
4661@orgcmd{C-c C-x p,org-set-property} 4778@orgcmd{C-c C-x p,org-set-property}
@@ -4686,11 +4803,11 @@ nearest column format definition.
4686@section Special properties 4803@section Special properties
4687@cindex properties, special 4804@cindex properties, special
4688 4805
4689Special properties provide an alternative access method to Org-mode 4806Special properties provide an alternative access method to Org-mode features,
4690features, like the TODO state or the priority of an entry, discussed in the 4807like the TODO state or the priority of an entry, discussed in the previous
4691previous chapters. This interface exists so that you can include 4808chapters. This interface exists so that you can include these states in a
4692these states in a column view (@pxref{Column view}), or to use them in 4809column view (@pxref{Column view}), or to use them in queries. The following
4693queries. The following property names are special and should not be 4810property names are special and (except for @code{:CATEGORY:}) should not be
4694used as keys in the properties drawer: 4811used as keys in the properties drawer:
4695 4812
4696@cindex property, special, TODO 4813@cindex property, special, TODO
@@ -4707,6 +4824,7 @@ used as keys in the properties drawer:
4707@cindex property, special, BLOCKED 4824@cindex property, special, BLOCKED
4708@c guessing that ITEM is needed in this area; also, should this list be sorted? 4825@c guessing that ITEM is needed in this area; also, should this list be sorted?
4709@cindex property, special, ITEM 4826@cindex property, special, ITEM
4827@cindex property, special, FILE
4710@example 4828@example
4711TODO @r{The TODO keyword of the entry.} 4829TODO @r{The TODO keyword of the entry.}
4712TAGS @r{The tags defined directly in the headline.} 4830TAGS @r{The tags defined directly in the headline.}
@@ -4719,9 +4837,10 @@ CLOSED @r{When was this entry closed?}
4719TIMESTAMP @r{The first keyword-less timestamp in the entry.} 4837TIMESTAMP @r{The first keyword-less timestamp in the entry.}
4720TIMESTAMP_IA @r{The first inactive timestamp in the entry.} 4838TIMESTAMP_IA @r{The first inactive timestamp in the entry.}
4721CLOCKSUM @r{The sum of CLOCK intervals in the subtree. @code{org-clock-sum}} 4839CLOCKSUM @r{The sum of CLOCK intervals in the subtree. @code{org-clock-sum}}
4722 @r{must be run first to compute the values.} 4840 @r{must be run first to compute the values in the current buffer.}
4723BLOCKED @r{"t" if task is currently blocked by children or siblings} 4841BLOCKED @r{"t" if task is currently blocked by children or siblings}
4724ITEM @r{The content of the entry.} 4842ITEM @r{The content of the entry.}
4843FILE @r{The filename the entry is located in.}
4725@end example 4844@end example
4726 4845
4727@node Property searches, Property inheritance, Special properties, Properties and Columns 4846@node Property searches, Property inheritance, Special properties, Properties and Columns
@@ -4886,7 +5005,7 @@ optional. The individual parts have the following meaning:
4886@var{property} @r{The property that should be edited in this column.} 5005@var{property} @r{The property that should be edited in this column.}
4887 @r{Special properties representing meta data are allowed here} 5006 @r{Special properties representing meta data are allowed here}
4888 @r{as well (@pxref{Special properties})} 5007 @r{as well (@pxref{Special properties})}
4889@var{title} @r{The header text for the column. If omitted, the property} 5008@var{title} @r{The header text for the column. If omitted, the property}
4890 @r{name is used.} 5009 @r{name is used.}
4891@{@var{summary-type}@} @r{The summary type. If specified, the column values for} 5010@{@var{summary-type}@} @r{The summary type. If specified, the column values for}
4892 @r{parent nodes are computed from the children.} 5011 @r{parent nodes are computed from the children.}
@@ -4912,7 +5031,7 @@ optional. The individual parts have the following meaning:
4912 5031
4913@noindent 5032@noindent
4914Be aware that you can only have one summary type for any property you 5033Be aware that you can only have one summary type for any property you
4915include. Subsequent columns referencing the same property will all display the 5034include. Subsequent columns referencing the same property will all display the
4916same summary information. 5035same summary information.
4917 5036
4918The @code{est+} summary type requires further explanation. It is used for 5037The @code{est+} summary type requires further explanation. It is used for
@@ -4923,12 +5042,12 @@ of estimating a particular task will take 5 days, you might estimate it as
4923average at 5.5 days, but the first represents a more predictable delivery. 5042average at 5.5 days, but the first represents a more predictable delivery.
4924 5043
4925When combining a set of such estimates, simply adding the lows and highs 5044When combining a set of such estimates, simply adding the lows and highs
4926produces an unrealistically wide result. Instead, @code{est+} adds the 5045produces an unrealistically wide result. Instead, @code{est+} adds the
4927statistical mean and variance of the sub-tasks, generating a final estimate 5046statistical mean and variance of the sub-tasks, generating a final estimate
4928from the sum. For example, suppose you had ten tasks, each of which was 5047from the sum. For example, suppose you had ten tasks, each of which was
4929estimated at 0.5 to 2 days of work. Straight addition produces an estimate 5048estimated at 0.5 to 2 days of work. Straight addition produces an estimate
4930of 5 to 20 days, representing what to expect if everything goes either 5049of 5 to 20 days, representing what to expect if everything goes either
4931extremely well or extremely poorly. In contrast, @code{est+} estimates the 5050extremely well or extremely poorly. In contrast, @code{est+} estimates the
4932full job more realistically, at 10-15 days. 5051full job more realistically, at 10-15 days.
4933 5052
4934Here is an example for a complete columns definition, along with allowed 5053Here is an example for a complete columns definition, along with allowed
@@ -4944,7 +5063,7 @@ values.
4944 5063
4945@noindent 5064@noindent
4946The first column, @samp{%25ITEM}, means the first 25 characters of the 5065The first column, @samp{%25ITEM}, means the first 25 characters of the
4947item itself, i.e. of the headline. You probably always should start the 5066item itself, i.e.@: of the headline. You probably always should start the
4948column definition with the @samp{ITEM} specifier. The other specifiers 5067column definition with the @samp{ITEM} specifier. The other specifiers
4949create columns @samp{Owner} with a list of names as allowed values, for 5068create columns @samp{Owner} with a list of names as allowed values, for
4950@samp{Status} with four different possible values, and for a checkbox 5069@samp{Status} with four different possible values, and for a checkbox
@@ -5170,13 +5289,23 @@ following will show up in the agenda every Wednesday:
5170@end example 5289@end example
5171 5290
5172@item Diary-style sexp entries 5291@item Diary-style sexp entries
5173For more complex date specifications, Org-mode supports using the 5292For more complex date specifications, Org-mode supports using the special
5174special sexp diary entries implemented in the Emacs calendar/diary 5293sexp diary entries implemented in the Emacs calendar/diary
5175package. For example 5294package@footnote{When working with the standard diary sexp functions, you
5295need to be very careful with the order of the arguments. That order depend
5296evilly on the variable @code{calendar-date-style} (or, for older Emacs
5297versions, @code{european-calendar-style}). For example, to specify a date
5298December 12, 2005, the call might look like @code{(diary-date 12 1 2005)} or
5299@code{(diary-date 1 12 2005)} or @code{(diary-date 2005 12 1)}, depending on
5300the settings. This has been the source of much confusion. Org-mode users
5301can resort to special versions of these functions like @code{org-date} or
5302@code{org-anniversary}. These work just like the corresponding @code{diary-}
5303functions, but with stable ISO order of arguments (year, month, day) wherever
5304applicable, independent of the value of @code{calendar-date-style}.}. For example
5176 5305
5177@example 5306@example
5178* The nerd meeting on every 2nd Thursday of the month 5307* The nerd meeting on every 2nd Thursday of the month
5179 <%%(diary-float t 4 2)> 5308 <%%(org-float t 4 2)>
5180@end example 5309@end example
5181 5310
5182@item Time/Date range 5311@item Time/Date range
@@ -5256,7 +5385,7 @@ like @samp{15:30-16:30}, modifying the first time will also shift the second,
5256shifting the time block with constant length. To change the length, modify 5385shifting the time block with constant length. To change the length, modify
5257the second time. Note that if the cursor is in a headline and not at a 5386the second time. Note that if the cursor is in a headline and not at a
5258timestamp, these same keys modify the priority of an item. 5387timestamp, these same keys modify the priority of an item.
5259(@pxref{Priorities}). The key bindings also conflict with shift-selection and 5388(@pxref{Priorities}). The key bindings also conflict with shift-selection and
5260related modes (@pxref{Conflicts}). 5389related modes (@pxref{Conflicts}).
5261@c 5390@c
5262@orgcmd{C-c C-y,org-evaluate-time-range} 5391@orgcmd{C-c C-y,org-evaluate-time-range}
@@ -5301,20 +5430,20 @@ various inputs will be interpreted, the items filled in by Org-mode are
5301in @b{bold}. 5430in @b{bold}.
5302 5431
5303@example 5432@example
53043-2-5 --> 2003-02-05 54333-2-5 @result{} 2003-02-05
53052/5/3 --> 2003-02-05 54342/5/3 @result{} 2003-02-05
530614 --> @b{2006}-@b{06}-14 543514 @result{} @b{2006}-@b{06}-14
530712 --> @b{2006}-@b{07}-12 543612 @result{} @b{2006}-@b{07}-12
53082/5 --> @b{2007}-02-05 54372/5 @result{} @b{2007}-02-05
5309Fri --> nearest Friday (default date or later) 5438Fri @result{} nearest Friday (default date or later)
5310sep 15 --> @b{2006}-09-15 5439sep 15 @result{} @b{2006}-09-15
5311feb 15 --> @b{2007}-02-15 5440feb 15 @result{} @b{2007}-02-15
5312sep 12 9 --> 2009-09-12 5441sep 12 9 @result{} 2009-09-12
531312:45 --> @b{2006}-@b{06}-@b{13} 12:45 544212:45 @result{} @b{2006}-@b{06}-@b{13} 12:45
531422 sept 0:34 --> @b{2006}-09-22 0:34 544322 sept 0:34 @result{} @b{2006}-09-22 0:34
5315w4 --> ISO week for of the current year @b{2006} 5444w4 @result{} ISO week for of the current year @b{2006}
53162012 w4 fri --> Friday of ISO week 4 in 2012 54452012 w4 fri @result{} Friday of ISO week 4 in 2012
53172012-w04-5 --> Same as above 54462012-w04-5 @result{} Same as above
5318@end example 5447@end example
5319 5448
5320Furthermore you can specify a relative date by giving, as the 5449Furthermore you can specify a relative date by giving, as the
@@ -5323,16 +5452,16 @@ letter ([dwmy]) to indicate change in days, weeks, months, or years. With a
5323single plus or minus, the date is always relative to today. With a 5452single plus or minus, the date is always relative to today. With a
5324double plus or minus, it is relative to the default date. If instead of 5453double plus or minus, it is relative to the default date. If instead of
5325a single letter, you use the abbreviation of day name, the date will be 5454a single letter, you use the abbreviation of day name, the date will be
5326the Nth such day. E.g. 5455the Nth such day, e.g.@:
5327 5456
5328@example 5457@example
5329+0 --> today 5458+0 @result{} today
5330. --> today 5459. @result{} today
5331+4d --> four days from today 5460+4d @result{} four days from today
5332+4 --> same as above 5461+4 @result{} same as above
5333+2w --> two weeks from today 5462+2w @result{} two weeks from today
5334++5 --> five days from default date 5463++5 @result{} five days from default date
5335+2tue --> second Tuesday from now. 5464+2tue @result{} second Tuesday from now.
5336@end example 5465@end example
5337 5466
5338@vindex parse-time-months 5467@vindex parse-time-months
@@ -5341,14 +5470,22 @@ The function understands English month and weekday abbreviations. If
5341you want to use unabbreviated names and/or other languages, configure 5470you want to use unabbreviated names and/or other languages, configure
5342the variables @code{parse-time-months} and @code{parse-time-weekdays}. 5471the variables @code{parse-time-months} and @code{parse-time-weekdays}.
5343 5472
5473@vindex org-read-date-force-compatible-dates
5474Not all dates can be represented in a given Emacs implementation. By default
5475Org mode forces dates into the compatibility range 1970--2037 which works on
5476all Emacs implementations. If you want to use dates outside of this range,
5477read the docstring of the variable
5478@code{org-read-date-force-compatible-dates}.
5479
5344You can specify a time range by giving start and end times or by giving a 5480You can specify a time range by giving start and end times or by giving a
5345start time and a duration (in HH:MM format). Use `-' or `-@{@}-' as the separator 5481start time and a duration (in HH:MM format). Use one or two dash(es) as the
5346in the former case and use '+' as the separator in the latter case. E.g. 5482separator in the former case and use '+' as the separator in the latter
5483case, e.g.@:
5347 5484
5348@example 5485@example
534911am-1:15pm --> 11:00-13:15 548611am-1:15pm @result{} 11:00-13:15
535011am--1:15pm --> same as above 548711am--1:15pm @result{} same as above
535111am+2:15 --> same as above 548811am+2:15 @result{} same as above
5352@end example 5489@end example
5353 5490
5354@cindex calendar, for selecting date 5491@cindex calendar, for selecting date
@@ -5479,7 +5616,7 @@ The headline will be listed under the given date@footnote{It will still
5479be listed on that date after it has been marked DONE. If you don't like 5616be listed on that date after it has been marked DONE. If you don't like
5480this, set the variable @code{org-agenda-skip-scheduled-if-done}.}. In 5617this, set the variable @code{org-agenda-skip-scheduled-if-done}.}. In
5481addition, a reminder that the scheduled date has passed will be present 5618addition, a reminder that the scheduled date has passed will be present
5482in the compilation for @emph{today}, until the entry is marked DONE, i.e. 5619in the compilation for @emph{today}, until the entry is marked DONE, i.e.@:
5483the task will automatically be forwarded until completed. 5620the task will automatically be forwarded until completed.
5484 5621
5485@example 5622@example
@@ -5502,7 +5639,7 @@ entries. Org-mode will issue early and late warnings based on the
5502assumption that the timestamp represents the @i{nearest instance} of 5639assumption that the timestamp represents the @i{nearest instance} of
5503the repeater. However, the use of diary sexp entries like 5640the repeater. However, the use of diary sexp entries like
5504@c 5641@c
5505@code{<%%(diary-float t 42)>} 5642@code{<%%(org-float t 42)>}
5506@c 5643@c
5507in scheduling and deadline timestamps is limited. Org-mode does not 5644in scheduling and deadline timestamps is limited. Org-mode does not
5508know enough about the internals of each sexp function to issue early and 5645know enough about the internals of each sexp function to issue early and
@@ -5517,29 +5654,30 @@ sexp entry matches.
5517@node Inserting deadline/schedule, Repeated tasks, Deadlines and scheduling, Deadlines and scheduling 5654@node Inserting deadline/schedule, Repeated tasks, Deadlines and scheduling, Deadlines and scheduling
5518@subsection Inserting deadlines or schedules 5655@subsection Inserting deadlines or schedules
5519 5656
5520The following commands allow you to quickly insert a deadline or to schedule 5657The following commands allow you to quickly insert@footnote{The @samp{SCHEDULED} and
5658@samp{DEADLINE} dates are inserted on the line right below the headline. Don't put
5659any text between this line and the headline.} a deadline or to schedule
5521an item: 5660an item:
5522 5661
5523@table @kbd 5662@table @kbd
5524@c 5663@c
5525@orgcmd{C-c C-d,org-deadline} 5664@orgcmd{C-c C-d,org-deadline}
5526Insert @samp{DEADLINE} keyword along with a stamp. The insertion will happen 5665Insert @samp{DEADLINE} keyword along with a stamp. The insertion will happen
5527in the line directly following the headline. When called with a prefix arg, 5666in the line directly following the headline. Any CLOSED timestamp will be
5528an existing deadline will be removed from the entry. Depending on the 5667removed. When called with a prefix arg, an existing deadline will be removed
5529variable @code{org-log-redeadline}@footnote{with corresponding 5668from the entry. Depending on the variable @code{org-log-redeadline}@footnote{with corresponding
5530@code{#+STARTUP} keywords @code{logredeadline}, @code{lognoteredeadline}, 5669@code{#+STARTUP} keywords @code{logredeadline}, @code{lognoteredeadline},
5531and @code{nologredeadline}}, a note will be taken when changing an existing 5670and @code{nologredeadline}}, a note will be taken when changing an existing
5532deadline. 5671deadline.
5533@c FIXME Any CLOSED timestamp will be removed.???????? 5672
5534@c
5535@orgcmd{C-c C-s,org-schedule} 5673@orgcmd{C-c C-s,org-schedule}
5536Insert @samp{SCHEDULED} keyword along with a stamp. The insertion will 5674Insert @samp{SCHEDULED} keyword along with a stamp. The insertion will
5537happen in the line directly following the headline. Any CLOSED timestamp 5675happen in the line directly following the headline. Any CLOSED timestamp
5538will be removed. When called with a prefix argument, remove the scheduling 5676will be removed. When called with a prefix argument, remove the scheduling
5539date from the entry. Depending on the variable 5677date from the entry. Depending on the variable
5540@code{org-log-reschedule}@footnote{with corresponding @code{#+STARTUP} 5678@code{org-log-reschedule}@footnote{with corresponding @code{#+STARTUP}
5541keywords @code{logredeadline}, @code{lognoteredeadline}, and 5679keywords @code{logreschedule}, @code{lognotereschedule}, and
5542@code{nologredeadline}}, a note will be taken when changing an existing 5680@code{nologreschedule}}, a note will be taken when changing an existing
5543scheduling time. 5681scheduling time.
5544@c 5682@c
5545@orgcmd{C-c C-x C-k,org-mark-entry-for-agenda-action} 5683@orgcmd{C-c C-x C-k,org-mark-entry-for-agenda-action}
@@ -5566,6 +5704,11 @@ Sparse tree for deadlines and scheduled items before a given date.
5566Sparse tree for deadlines and scheduled items after a given date. 5704Sparse tree for deadlines and scheduled items after a given date.
5567@end table 5705@end table
5568 5706
5707Note that @code{org-schedule} and @code{org-deadline} supports
5708setting the date by indicating a relative time: e.g. +1d will set
5709the date to the next day after today, and --1w will set the date
5710to the previous week before any current timestamp.
5711
5569@node Repeated tasks, , Inserting deadline/schedule, Deadlines and scheduling 5712@node Repeated tasks, , Inserting deadline/schedule, Deadlines and scheduling
5570@subsection Repeated tasks 5713@subsection Repeated tasks
5571@cindex tasks, repeated 5714@cindex tasks, repeated
@@ -5684,11 +5827,15 @@ what to do with it.
5684@table @kbd 5827@table @kbd
5685@orgcmd{C-c C-x C-i,org-clock-in} 5828@orgcmd{C-c C-x C-i,org-clock-in}
5686@vindex org-clock-into-drawer 5829@vindex org-clock-into-drawer
5830@cindex property, LOG_INTO_DRAWER
5687Start the clock on the current item (clock-in). This inserts the CLOCK 5831Start the clock on the current item (clock-in). This inserts the CLOCK
5688keyword together with a timestamp. If this is not the first clocking of 5832keyword together with a timestamp. If this is not the first clocking of
5689this item, the multiple CLOCK lines will be wrapped into a 5833this item, the multiple CLOCK lines will be wrapped into a
5690@code{:LOGBOOK:} drawer (see also the variable 5834@code{:LOGBOOK:} drawer (see also the variable
5691@code{org-clock-into-drawer}). When called with a @kbd{C-u} prefix argument, 5835@code{org-clock-into-drawer}). You can also overrule
5836the setting of this variable for a subtree by setting a
5837@code{CLOCK_INTO_DRAWER} or @code{LOG_INTO_DRAWER} property.
5838When called with a @kbd{C-u} prefix argument,
5692select the task from a list of recently clocked tasks. With two @kbd{C-u 5839select the task from a list of recently clocked tasks. With two @kbd{C-u
5693C-u} prefixes, clock into the task at point and mark it as the default task. 5840C-u} prefixes, clock into the task at point and mark it as the default task.
5694The default task will always be available when selecting a clocking task, 5841The default task will always be available when selecting a clocking task,
@@ -5730,6 +5877,9 @@ Update the effort estimate for the current clock task.
5730Recompute the time interval after changing one of the timestamps. This 5877Recompute the time interval after changing one of the timestamps. This
5731is only necessary if you edit the timestamps directly. If you change 5878is only necessary if you edit the timestamps directly. If you change
5732them with @kbd{S-@key{cursor}} keys, the update is automatic. 5879them with @kbd{S-@key{cursor}} keys, the update is automatic.
5880@orgcmd{C-S-@key{up/down},org-clock-timestamps-up/down}
5881On @code{CLOCK} log lines, increase/decrease both timestamps at the same
5882time so that duration keeps the same.
5733@orgcmd{C-c C-t,org-todo} 5883@orgcmd{C-c C-t,org-todo}
5734Changing the TODO state of an item to DONE automatically stops the clock 5884Changing the TODO state of an item to DONE automatically stops the clock
5735if it is running in this same item. 5885if it is running in this same item.
@@ -5741,12 +5891,12 @@ Jump to the headline of the currently clocked in task. With a @kbd{C-u}
5741prefix arg, select the target task from a list of recently clocked tasks. 5891prefix arg, select the target task from a list of recently clocked tasks.
5742@orgcmd{C-c C-x C-d,org-clock-display} 5892@orgcmd{C-c C-x C-d,org-clock-display}
5743@vindex org-remove-highlights-with-change 5893@vindex org-remove-highlights-with-change
5744Display time summaries for each subtree in the current buffer. This 5894Display time summaries for each subtree in the current buffer. This puts
5745puts overlays at the end of each headline, showing the total time 5895overlays at the end of each headline, showing the total time recorded under
5746recorded under that heading, including the time of any subheadings. You 5896that heading, including the time of any subheadings. You can use visibility
5747can use visibility cycling to study the tree, but the overlays disappear 5897cycling to study the tree, but the overlays disappear when you change the
5748when you change the buffer (see variable 5898buffer (see variable @code{org-remove-highlights-with-change}) or press
5749@code{org-remove-highlights-with-change}) or press @kbd{C-c C-c}. 5899@kbd{C-c C-c}.
5750@end table 5900@end table
5751 5901
5752The @kbd{l} key may be used in the timeline (@pxref{Timeline}) and in 5902The @kbd{l} key may be used in the timeline (@pxref{Timeline}) and in
@@ -5830,7 +5980,8 @@ be selected:
5830 @r{To use this, @code{:block} or @code{:tstart}, @code{:tend} are needed.} 5980 @r{To use this, @code{:block} or @code{:tstart}, @code{:tend} are needed.}
5831:stepskip0 @r{Do not show steps that have zero time.} 5981:stepskip0 @r{Do not show steps that have zero time.}
5832:fileskip0 @r{Do not show table sections from files which did not contribute.} 5982:fileskip0 @r{Do not show table sections from files which did not contribute.}
5833:tags @r{A tags match to select entries that should contribute}. 5983:tags @r{A tags match to select entries that should contribute. See}
5984 @r{@ref{Matching tags and properties} for the match syntax.}
5834@end example 5985@end example
5835 5986
5836Then there are options which determine the formatting of the table. There 5987Then there are options which determine the formatting of the table. There
@@ -5838,6 +5989,7 @@ options are interpreted by the function @code{org-clocktable-write-default},
5838but you can specify your own function using the @code{:formatter} parameter. 5989but you can specify your own function using the @code{:formatter} parameter.
5839@example 5990@example
5840:emphasize @r{When @code{t}, emphasize level one and level two items.} 5991:emphasize @r{When @code{t}, emphasize level one and level two items.}
5992:lang @r{Language@footnote{Language terms can be set through the variable @code{org-clock-clocktable-language-setup}.} to use for descriptive cells like "Task".}
5841:link @r{Link the item headlines in the table to their origins.} 5993:link @r{Link the item headlines in the table to their origins.}
5842:narrow @r{An integer to limit the width of the headline column in} 5994:narrow @r{An integer to limit the width of the headline column in}
5843 @r{the org table. If you write it like @samp{50!}, then the} 5995 @r{the org table. If you write it like @samp{50!}, then the}
@@ -5850,6 +6002,9 @@ but you can specify your own function using the @code{:formatter} parameter.
5850 @r{All are overwritten except if there is an explicit @code{:narrow}} 6002 @r{All are overwritten except if there is an explicit @code{:narrow}}
5851:timestamp @r{A timestamp for the entry, when available. Look for SCHEDULED,} 6003:timestamp @r{A timestamp for the entry, when available. Look for SCHEDULED,}
5852 @r{DEADLINE, TIMESTAMP and TIMESTAMP_IA, in this order.} 6004 @r{DEADLINE, TIMESTAMP and TIMESTAMP_IA, in this order.}
6005:properties @r{List of properties that should be shown in the table. Each}
6006 @r{property will get its own column.}
6007:inherit-props @r{When this flag is @code{t}, the values for @code{:properties} will be inherited.}
5853:formula @r{Content of a @code{#+TBLFM} line to be added and evaluated.} 6008:formula @r{Content of a @code{#+TBLFM} line to be added and evaluated.}
5854 @r{As a special case, @samp{:formula %} adds a column with % time.} 6009 @r{As a special case, @samp{:formula %} adds a column with % time.}
5855 @r{If you do not specify a formula here, any existing formula} 6010 @r{If you do not specify a formula here, any existing formula}
@@ -5945,7 +6100,7 @@ If you restart Emacs and clock into any task, Org will notice that you have a
5945dangling clock which was never clocked out from your last session. Using 6100dangling clock which was never clocked out from your last session. Using
5946that clock's starting time as the beginning of the unaccounted-for period, 6101that clock's starting time as the beginning of the unaccounted-for period,
5947Org will ask how you want to resolve that time. The logic and behavior is 6102Org will ask how you want to resolve that time. The logic and behavior is
5948identical to dealing with away time due to idleness; it's just happening due 6103identical to dealing with away time due to idleness; it is just happening due
5949to a recovery event rather than a set amount of idle time. 6104to a recovery event rather than a set amount of idle time.
5950 6105
5951You can also check all the files visited by your Org agenda for dangling 6106You can also check all the files visited by your Org agenda for dangling
@@ -5982,7 +6137,7 @@ together with clock sums (if you want to clock your time). For a specific
5982buffer you can use 6137buffer you can use
5983 6138
5984@example 6139@example
5985#+PROPERTY: Effort_ALL 0 0:10 0:30 1:00 2:00 3:00 4:00 5:00 6:00 7:00 8:00 6140#+PROPERTY: Effort_ALL 0 0:10 0:30 1:00 2:00 3:00 4:00 5:00 6:00 7:00
5986#+COLUMNS: %40ITEM(Task) %17Effort(Estimated Effort)@{:@} %CLOCKSUM 6141#+COLUMNS: %40ITEM(Task) %17Effort(Estimated Effort)@{:@} %CLOCKSUM
5987@end example 6142@end example
5988 6143
@@ -6061,7 +6216,7 @@ not started at exactly the right moment.
6061@kindex ; 6216@kindex ;
6062 6217
6063Calling @code{org-timer-set-timer} from an Org-mode buffer runs a countdown 6218Calling @code{org-timer-set-timer} from an Org-mode buffer runs a countdown
6064timer. Use @key{;} from agenda buffers, @key{C-c C-x ;} everwhere else. 6219timer. Use @kbd{;} from agenda buffers, @key{C-c C-x ;} everwhere else.
6065 6220
6066@code{org-timer-set-timer} prompts the user for a duration and displays a 6221@code{org-timer-set-timer} prompts the user for a duration and displays a
6067countdown timer in the modeline. @code{org-timer-default-timer} sets the 6222countdown timer in the modeline. @code{org-timer-default-timer} sets the
@@ -6083,7 +6238,7 @@ trees to an archive file keeps the system compact and fast.
6083* Capture:: Capturing new stuff 6238* Capture:: Capturing new stuff
6084* Attachments:: Add files to tasks 6239* Attachments:: Add files to tasks
6085* RSS Feeds:: Getting input from RSS feeds 6240* RSS Feeds:: Getting input from RSS feeds
6086* Protocols:: External (e.g. Browser) access to Emacs and Org 6241* Protocols:: External (e.g.@: Browser) access to Emacs and Org
6087* Refiling notes:: Moving a tree from one place to another 6242* Refiling notes:: Moving a tree from one place to another
6088* Archiving:: What to do with finished projects 6243* Archiving:: What to do with finished projects
6089@end menu 6244@end menu
@@ -6138,6 +6293,7 @@ suggestion.} for capturing new material.
6138@orgcmd{C-c c,org-capture} 6293@orgcmd{C-c c,org-capture}
6139Call the command @code{org-capture}. Note that this keybinding is global and 6294Call the command @code{org-capture}. Note that this keybinding is global and
6140not active by default - you need to install it. If you have templates 6295not active by default - you need to install it. If you have templates
6296@cindex date tree
6141defined @pxref{Capture templates}, it will offer these templates for 6297defined @pxref{Capture templates}, it will offer these templates for
6142selection or use a new Org outline node as the default template. It will 6298selection or use a new Org outline node as the default template. It will
6143insert the template into the target file and switch to an indirect buffer 6299insert the template into the target file and switch to an indirect buffer
@@ -6172,7 +6328,7 @@ prefix commands:
6172 6328
6173@table @kbd 6329@table @kbd
6174@orgkey{C-u C-c c} 6330@orgkey{C-u C-c c}
6175Visit the target location of a cpature template. You get to select the 6331Visit the target location of a capture template. You get to select the
6176template in the usual way. 6332template in the usual way.
6177@orgkey{C-u C-u C-c c} 6333@orgkey{C-u C-u C-c c}
6178Visit the last stored capture item in its buffer. 6334Visit the last stored capture item in its buffer.
@@ -6220,6 +6376,14 @@ extremely useful for deriving tasks from emails, for example. You fill in
6220the task definition, press @code{C-c C-c} and Org returns you to the same 6376the task definition, press @code{C-c C-c} and Org returns you to the same
6221place where you started the capture process. 6377place where you started the capture process.
6222 6378
6379To define special keys to capture to a particular template without going
6380through the interactive template selection, you can create your key binding
6381like this:
6382
6383@lisp
6384(define-key global-map "\C-cx"
6385 (lambda () (interactive) (org-capture nil "x")))
6386@end lisp
6223 6387
6224@menu 6388@menu
6225* Template elements:: What is needed for a complete template entry 6389* Template elements:: What is needed for a complete template entry
@@ -6230,14 +6394,14 @@ place where you started the capture process.
6230@subsubsection Template elements 6394@subsubsection Template elements
6231 6395
6232Now lets look at the elements of a template definition. Each entry in 6396Now lets look at the elements of a template definition. Each entry in
6233@code{org-capture-templates} is a list with the following items: 6397@code{org-capture-templates} is a list with the following items:
6234 6398
6235@table @var 6399@table @var
6236@item keys 6400@item keys
6237The keys that will select the template, as a string, characters 6401The keys that will select the template, as a string, characters
6238only, for example @code{"a"} for a template to be selected with a 6402only, for example @code{"a"} for a template to be selected with a
6239single key, or @code{"bt"} for selection with two keys. When using 6403single key, or @code{"bt"} for selection with two keys. When using
6240several keys, keys using the same prefix key must be sequential 6404several keys, keys using the same prefix key must be sequential
6241in the list and preceded by a 2-element entry explaining the 6405in the list and preceded by a 2-element entry explaining the
6242prefix key, for example 6406prefix key, for example
6243@example 6407@example
@@ -6254,9 +6418,8 @@ selection.
6254The type of entry, a symbol. Valid values are: 6418The type of entry, a symbol. Valid values are:
6255@table @code 6419@table @code
6256@item entry 6420@item entry
6257An Org-mode node, with a headline. Will be filed as the child of the 6421An Org-mode node, with a headline. Will be filed as the child of the target
6258target entry or as a top-level entry. The target file should be an Org-mode 6422entry or as a top-level entry. The target file should be an Org-mode file.
6259file.
6260@item item 6423@item item
6261A plain list item, placed in the first plain list at the target 6424A plain list item, placed in the first plain list at the target
6262location. Again the target file should be an Org file. 6425location. Again the target file should be an Org file.
@@ -6277,7 +6440,8 @@ Specification of where the captured item should be placed. In Org-mode
6277files, targets usually define a node. Entries will become children of this 6440files, targets usually define a node. Entries will become children of this
6278node. Other types will be added to the table or list in the body of this 6441node. Other types will be added to the table or list in the body of this
6279node. Most target specifications contain a file name. If that file name is 6442node. Most target specifications contain a file name. If that file name is
6280the empty string, it defaults to @code{org-default-notes-file}. 6443the empty string, it defaults to @code{org-default-notes-file}. A file can
6444also be given as a variable, function, or Emacs Lisp form.
6281 6445
6282Valid values are: 6446Valid values are:
6283@table @code 6447@table @code
@@ -6342,14 +6506,25 @@ before and after the new item. Default 0, only common other value is 1.
6342@item :clock-in 6506@item :clock-in
6343Start the clock in this item. 6507Start the clock in this item.
6344 6508
6509@item :clock-keep
6510Keep the clock running when filing the captured entry.
6511
6345@item :clock-resume 6512@item :clock-resume
6346If starting the capture interrupted a clock, restart that clock when finished 6513If starting the capture interrupted a clock, restart that clock when finished
6347with the capture. 6514with the capture. Note that @code{:clock-keep} has precedence over
6515@code{:clock-resume}. When setting both to @code{t}, the current clock will
6516run and the previous one will not be resumed.
6348 6517
6349@item :unnarrowed 6518@item :unnarrowed
6350Do not narrow the target buffer, simply show the full buffer. Default is to 6519Do not narrow the target buffer, simply show the full buffer. Default is to
6351narrow it so that you only see the new material. 6520narrow it so that you only see the new material.
6352 6521
6522@item :table-line-pos
6523Specification of the location in the table where the new line should be
6524inserted. It should be a string like @code{"II-3"} meaning that the new
6525line should become the third line before the second horizontal separator
6526line.
6527
6353@item :kill-buffer 6528@item :kill-buffer
6354If the target file was not yet visited when capture was invoked, kill the 6529If the target file was not yet visited when capture was invoked, kill the
6355buffer again after capture is completed. 6530buffer again after capture is completed.
@@ -6361,37 +6536,39 @@ buffer again after capture is completed.
6361 6536
6362In the template itself, special @kbd{%}-escapes@footnote{If you need one of 6537In the template itself, special @kbd{%}-escapes@footnote{If you need one of
6363these sequences literally, escape the @kbd{%} with a backslash.} allow 6538these sequences literally, escape the @kbd{%} with a backslash.} allow
6364dynamic insertion of content: 6539dynamic insertion of content. The templates are expanded in the order given here:
6365 6540
6366@comment SJE: should these sentences terminate in period?
6367@smallexample 6541@smallexample
6368%^@{@var{prompt}@} @r{prompt the user for a string and replace this sequence with it.} 6542%[@var{file}] @r{insert the contents of the file given by @var{file}.}
6369 @r{You may specify a default value and a completion table with} 6543%(@var{sexp}) @r{evaluate Elisp @var{sexp} and replace with the result.}
6370 @r{%^@{prompt|default|completion2|completion3...@}} 6544%<...> @r{the result of format-time-string on the ... format specification.}
6371 @r{The arrow keys access a prompt-specific history.} 6545%t @r{timestamp, date only.}
6372%a @r{annotation, normally the link created with @code{org-store-link}} 6546%T @r{timestamp with date and time.}
6373%A @r{like @code{%a}, but prompt for the description part} 6547%u, %U @r{like the above, but inactive timestamps.}
6548%a @r{annotation, normally the link created with @code{org-store-link}.}
6374%i @r{initial content, the region when capture is called while the} 6549%i @r{initial content, the region when capture is called while the}
6375 @r{region is active.} 6550 @r{region is active.}
6376 @r{The entire text will be indented like @code{%i} itself.} 6551 @r{The entire text will be indented like @code{%i} itself.}
6377%t @r{timestamp, date only} 6552%A @r{like @code{%a}, but prompt for the description part.}
6378%T @r{timestamp with date and time}
6379%u, %U @r{like the above, but inactive timestamps}
6380%^t @r{like @code{%t}, but prompt for date. Similarly @code{%^T}, @code{%^u}, @code{%^U}}
6381 @r{You may define a prompt like @code{%^@{Birthday@}t}}
6382%n @r{user name (taken from @code{user-full-name})}
6383%c @r{Current kill ring head.} 6553%c @r{Current kill ring head.}
6384%x @r{Content of the X clipboard.} 6554%x @r{Content of the X clipboard.}
6385%^C @r{Interactive selection of which kill or clip to use.} 6555%k @r{title of the currently clocked task.}
6386%^L @r{Like @code{%^C}, but insert as link.} 6556%K @r{link to the currently clocked task.}
6387%k @r{title of the currently clocked task} 6557%n @r{user name (taken from @code{user-full-name}).}
6388%K @r{link to the currently clocked task} 6558%f @r{file visited by current buffer when org-capture was called.}
6559%F @r{full path of the file or directory visited by current buffer.}
6560%:keyword @r{specific information for certain link types, see below.}
6389%^g @r{prompt for tags, with completion on tags in target file.} 6561%^g @r{prompt for tags, with completion on tags in target file.}
6390%^G @r{prompt for tags, with completion all tags in all agenda files.} 6562%^G @r{prompt for tags, with completion all tags in all agenda files.}
6391%^@{@var{prop}@}p @r{Prompt the user for a value for property @var{prop}} 6563%^t @r{like @code{%t}, but prompt for date. Similarly @code{%^T}, @code{%^u}, @code{%^U}.}
6392%:keyword @r{specific information for certain link types, see below} 6564 @r{You may define a prompt like @code{%^@{Birthday@}t}.}
6393%[@var{file}] @r{insert the contents of the file given by @var{file}} 6565%^C @r{Interactive selection of which kill or clip to use.}
6394%(@var{sexp}) @r{evaluate Elisp @var{sexp} and replace with the result} 6566%^L @r{Like @code{%^C}, but insert as link.}
6567%^@{@var{prop}@}p @r{Prompt the user for a value for property @var{prop}.}
6568%^@{@var{prompt}@} @r{prompt the user for a string and replace this sequence with it.}
6569 @r{You may specify a default value and a completion table with}
6570 @r{%^@{prompt|default|completion2|completion3...@}.}
6571 @r{The arrow keys access a prompt-specific history.}
6395@end smallexample 6572@end smallexample
6396 6573
6397@noindent 6574@noindent
@@ -6403,8 +6580,8 @@ similar way.}:
6403 6580
6404@vindex org-from-is-user-regexp 6581@vindex org-from-is-user-regexp
6405@smallexample 6582@smallexample
6406Link type | Available keywords 6583Link type | Available keywords
6407-------------------+---------------------------------------------- 6584------------------------+----------------------------------------------
6408bbdb | %:name %:company 6585bbdb | %:name %:company
6409irc | %:server %:port %:nick 6586irc | %:server %:port %:nick
6410vm, wl, mh, mew, rmail | %:type %:subject %:message-id 6587vm, wl, mh, mew, rmail | %:type %:subject %:message-id
@@ -6482,7 +6659,7 @@ Create a new attachment as an Emacs buffer.
6482Synchronize the current task with its attachment directory, in case you added 6659Synchronize the current task with its attachment directory, in case you added
6483attachments yourself. 6660attachments yourself.
6484 6661
6485@orgcmdtkc{p,C-c C-a o,org-attach-open} 6662@orgcmdtkc{o,C-c C-a o,org-attach-open}
6486@vindex org-file-apps 6663@vindex org-file-apps
6487Open current task's attachment. If there is more than one, prompt for a 6664Open current task's attachment. If there is more than one, prompt for a
6488file name first. Opening will follow the rules set by @code{org-file-apps}. 6665file name first. Opening will follow the rules set by @code{org-file-apps}.
@@ -6610,7 +6787,7 @@ create new nodes as new parents for refiling on the fly, check the
6610variable @code{org-refile-allow-creating-parent-nodes}. 6787variable @code{org-refile-allow-creating-parent-nodes}.
6611When the variable @code{org-log-refile}@footnote{with corresponding 6788When the variable @code{org-log-refile}@footnote{with corresponding
6612@code{#+STARTUP} keywords @code{logrefile}, @code{lognoterefile}, 6789@code{#+STARTUP} keywords @code{logrefile}, @code{lognoterefile},
6613and @code{nologrefile}} is set, a time stamp or a note will be 6790and @code{nologrefile}} is set, a timestamp or a note will be
6614recorded when an entry has been refiled. 6791recorded when an entry has been refiled.
6615@orgkey{C-u C-c C-w} 6792@orgkey{C-u C-c C-w}
6616Use the refile interface to jump to a heading. 6793Use the refile interface to jump to a heading.
@@ -6835,7 +7012,7 @@ The information to be shown is normally collected from all @emph{agenda
6835files}, the files listed in the variable 7012files}, the files listed in the variable
6836@code{org-agenda-files}@footnote{If the value of that variable is not a 7013@code{org-agenda-files}@footnote{If the value of that variable is not a
6837list, but a single file name, then the list of agenda files will be 7014list, but a single file name, then the list of agenda files will be
6838maintained in that external file.}. If a directory is part of this list, 7015maintained in that external file.}. If a directory is part of this list,
6839all files with the extension @file{.org} in this directory will be part 7016all files with the extension @file{.org} in this directory will be part
6840of the list. 7017of the list.
6841 7018
@@ -6848,7 +7025,7 @@ the easiest way to maintain it is through the following commands
6848 7025
6849@cindex files, adding to agenda list 7026@cindex files, adding to agenda list
6850@table @kbd 7027@table @kbd
6851@orgcmd{C-c [,org-agenda-to-front} 7028@orgcmd{C-c [,org-agenda-file-to-front}
6852Add current file to the list of agenda files. The file is added to 7029Add current file to the list of agenda files. The file is added to
6853the front of the list. If it was already in the list, it is moved to 7030the front of the list. If it was already in the list, it is moved to
6854the front. With a prefix argument, file is added/moved to the end. 7031the front. With a prefix argument, file is added/moved to the end.
@@ -6905,7 +7082,7 @@ Lift the restriction.
6905@cindex agenda dispatcher 7082@cindex agenda dispatcher
6906@cindex dispatching agenda commands 7083@cindex dispatching agenda commands
6907The views are created through a dispatcher, which should be bound to a 7084The views are created through a dispatcher, which should be bound to a
6908global key---for example @kbd{C-c a} (@pxref{Installation}). In the 7085global key---for example @kbd{C-c a} (@pxref{Activation}). In the
6909following we will assume that @kbd{C-c a} is indeed how the dispatcher 7086following we will assume that @kbd{C-c a} is indeed how the dispatcher
6910is accessed and list keyboard access to commands accordingly. After 7087is accessed and list keyboard access to commands accordingly. After
6911pressing @kbd{C-c a}, an additional letter is required to execute a 7088pressing @kbd{C-c a}, an additional letter is required to execute a
@@ -7030,7 +7207,7 @@ between calendar and agenda.
7030 7207
7031If you are using the diary only for sexp entries and holidays, it is 7208If you are using the diary only for sexp entries and holidays, it is
7032faster to not use the above setting, but instead to copy or even move 7209faster to not use the above setting, but instead to copy or even move
7033the entries into an Org file. Org-mode evaluates diary-style sexp 7210the entries into an Org file. Org-mode evaluates diary-style sexp
7034entries, and does it faster because there is no overhead for first 7211entries, and does it faster because there is no overhead for first
7035creating the diary display. Note that the sexp entries must start at 7212creating the diary display. Note that the sexp entries must start at
7036the left margin, no whitespace is allowed before them. For example, 7213the left margin, no whitespace is allowed before them. For example,
@@ -7042,8 +7219,8 @@ will be made in the agenda:
7042#+CATEGORY: Holiday 7219#+CATEGORY: Holiday
7043%%(org-calendar-holiday) ; special function for holiday names 7220%%(org-calendar-holiday) ; special function for holiday names
7044#+CATEGORY: Ann 7221#+CATEGORY: Ann
7045%%(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 7222%%(org-anniversary 1956 5 14)@footnote{@code{org-anniversary} is just like @code{diary-anniversary}, but the argument order is allways according to ISO and therefore independent of the value of @code{calendar-date-style}.} Arthur Dent is %d years old
7046%%(diary-anniversary 10 2 1869) Mahatma Gandhi would be %d years old 7223%%(org-anniversary 1869 10 2) Mahatma Gandhi would be %d years old
7047@end example 7224@end example
7048 7225
7049@subsubheading Anniversaries from BBDB 7226@subsubheading Anniversaries from BBDB
@@ -7066,14 +7243,15 @@ following to one your your agenda files:
7066 7243
7067You can then go ahead and define anniversaries for a BBDB record. Basically, 7244You can then go ahead and define anniversaries for a BBDB record. Basically,
7068you need to press @kbd{C-o anniversary @key{RET}} with the cursor in a BBDB 7245you need to press @kbd{C-o anniversary @key{RET}} with the cursor in a BBDB
7069record and then add the date in the format @code{YYYY-MM-DD}, followed by a 7246record and then add the date in the format @code{YYYY-MM-DD} or @code{MM-DD},
7070space and the class of the anniversary (@samp{birthday} or @samp{wedding}, or 7247followed by a space and the class of the anniversary (@samp{birthday} or
7071a format string). If you omit the class, it will default to @samp{birthday}. 7248@samp{wedding}, or a format string). If you omit the class, it will default to
7072Here are a few examples, the header for the file @file{org-bbdb.el} contains 7249@samp{birthday}. Here are a few examples, the header for the file
7073more detailed information. 7250@file{org-bbdb.el} contains more detailed information.
7074 7251
7075@example 7252@example
70761973-06-22 72531973-06-22
725406-22
70771955-08-02 wedding 72551955-08-02 wedding
70782008-04-14 %s released version 6.01 of org-mode, %d years ago 72562008-04-14 %s released version 6.01 of org-mode, %d years ago
7079@end example 7257@end example
@@ -7092,7 +7270,7 @@ Org can interact with Emacs appointments notification facility. To add all
7092the appointments of your agenda files, use the command 7270the appointments of your agenda files, use the command
7093@code{org-agenda-to-appt}. This command also lets you filter through the 7271@code{org-agenda-to-appt}. This command also lets you filter through the
7094list of your appointments and add only those belonging to a specific category 7272list of your appointments and add only those belonging to a specific category
7095or matching a regular expression. See the docstring for details. 7273or matching a regular expression. See the docstring for details.
7096 7274
7097@node Global TODO list, Matching tags and properties, Weekly/daily agenda, Built-in agenda views 7275@node Global TODO list, Matching tags and properties, Weekly/daily agenda, Built-in agenda views
7098@subsection The global TODO list 7276@subsection The global TODO list
@@ -7265,7 +7443,7 @@ brackets (like @samp{DEADLINE<="<2008-12-24 18:30>"}), both values are
7265assumed to be date/time specifications in the standard Org way, and the 7443assumed to be date/time specifications in the standard Org way, and the
7266comparison will be done accordingly. Special values that will be recognized 7444comparison will be done accordingly. Special values that will be recognized
7267are @code{"<now>"} for now (including time), and @code{"<today>"}, and 7445are @code{"<now>"} for now (including time), and @code{"<today>"}, and
7268@code{"<tomorrow>"} for these days at 0:00 hours, i.e. without a time 7446@code{"<tomorrow>"} for these days at 0:00 hours, i.e.@: without a time
7269specification. Also strings like @code{"<+5d>"} or @code{"<-2m>"} with units 7447specification. Also strings like @code{"<+5d>"} or @code{"<-2m>"} with units
7270@code{d}, @code{w}, @code{m}, and @code{y} for day, week, month, and year, 7448@code{d}, @code{w}, @code{m}, and @code{y} for day, week, month, and year,
7271respectively, can be used. 7449respectively, can be used.
@@ -7368,6 +7546,7 @@ the files listed in @code{org-agenda-text-search-extra-files}.
7368 7546
7369@node Stuck projects, , Search view, Built-in agenda views 7547@node Stuck projects, , Search view, Built-in agenda views
7370@subsection Stuck projects 7548@subsection Stuck projects
7549@pindex GTD, Getting Things Done
7371 7550
7372If you are following a system like David Allen's GTD to organize your 7551If you are following a system like David Allen's GTD to organize your
7373work, one of the ``duties'' you have is a regular review to make sure 7552work, one of the ``duties'' you have is a regular review to make sure
@@ -7418,12 +7597,14 @@ will still be searched for stuck projects.
7418@cindex presentation, of agenda items 7597@cindex presentation, of agenda items
7419 7598
7420@vindex org-agenda-prefix-format 7599@vindex org-agenda-prefix-format
7421Before displaying items in an agenda view, Org-mode visually prepares 7600@vindex org-agenda-tags-column
7422the items and sorts them. Each item occupies a single line. The line 7601Before displaying items in an agenda view, Org-mode visually prepares the
7423starts with a @emph{prefix} that contains the @emph{category} 7602items and sorts them. Each item occupies a single line. The line starts
7424(@pxref{Categories}) of the item and other important information. You can 7603with a @emph{prefix} that contains the @emph{category} (@pxref{Categories})
7425customize the prefix using the option @code{org-agenda-prefix-format}. 7604of the item and other important information. You can customize in which
7426The prefix is followed by a cleaned-up version of the outline headline 7605column tags will be displayed through @code{org-agenda-tags-column}. You can
7606also customize the prefix using the option @code{org-agenda-prefix-format}.
7607This prefix is followed by a cleaned-up version of the outline headline
7427associated with the item. 7608associated with the item.
7428 7609
7429@menu 7610@menu
@@ -7608,34 +7789,31 @@ will be followed without a selection prompt.
7608 7789
7609@tsubheading{Change display} 7790@tsubheading{Change display}
7610@cindex display changing, in agenda 7791@cindex display changing, in agenda
7792@kindex A
7793@item A
7794Interactively select another agenda view and append it to the current view.
7795@c
7611@kindex o 7796@kindex o
7612@item o 7797@item o
7613Delete other windows. 7798Delete other windows.
7614@c 7799@c
7615@c @kindex v d
7616@c @kindex d
7617@c @kindex v w
7618@c @kindex w
7619@c @kindex v m
7620@c @kindex v y
7621@c @item v d @ @r{or short} @ d
7622@c @itemx v w @ @r{or short} @ w
7623@c @itemx v m
7624@c @itemx v y
7625@orgcmdkskc{v d,d,org-aganda-day-view} 7800@orgcmdkskc{v d,d,org-aganda-day-view}
7626@xorgcmdkskc{v w,w,org-aganda-day-view} 7801@xorgcmdkskc{v w,w,org-aganda-day-view}
7627@xorgcmd{v m,org-agenda-month-view} 7802@xorgcmd{v m,org-agenda-month-view}
7628@xorgcmd{v y,org-agenda-month-year} 7803@xorgcmd{v y,org-agenda-month-year}
7629Switch to day/week/month/year view. When switching to day or week view, 7804@xorgcmd{v SPC,org-agenda-reset-view}
7630this setting becomes the default for subsequent agenda commands. Since 7805@vindex org-agenda-span
7631month and year views are slow to create, they do not become the default. 7806Switch to day/week/month/year view. When switching to day or week view, this
7632A numeric prefix argument may be used to jump directly to a specific day 7807setting becomes the default for subsequent agenda refreshes. Since month and
7633of the year, ISO week, month, or year, respectively. For example, 7808year views are slow to create, they do not become the default. A numeric
7634@kbd{32 d} jumps to February 1st, @kbd{9 w} to ISO week number 9. When 7809prefix argument may be used to jump directly to a specific day of the year,
7635setting day, week, or month view, a year may be encoded in the prefix 7810ISO week, month, or year, respectively. For example, @kbd{32 d} jumps to
7636argument as well. For example, @kbd{200712 w} will jump to week 12 in 7811February 1st, @kbd{9 w} to ISO week number 9. When setting day, week, or
76372007. If such a year specification has only one or two digits, it will 7812month view, a year may be encoded in the prefix argument as well. For
7638be mapped to the interval 1938-2037. 7813example, @kbd{200712 w} will jump to week 12 in 2007. If such a year
7814specification has only one or two digits, it will be mapped to the interval
78151938-2037. @kbd{v @key{SPC}} will reset to what is set in
7816@code{org-agenda-span}.
7639@c 7817@c
7640@orgcmd{f,org-agenda-later} 7818@orgcmd{f,org-agenda-later}
7641Go forward in time to display the following @code{org-agenda-current-span} days. 7819Go forward in time to display the following @code{org-agenda-current-span} days.
@@ -7688,10 +7866,19 @@ always show a table with the clocked times for the timespan and file scope
7688covered by the current agenda view. The initial setting for this mode in new 7866covered by the current agenda view. The initial setting for this mode in new
7689agenda buffers can be set with the variable 7867agenda buffers can be set with the variable
7690@code{org-agenda-start-with-clockreport-mode}. By using a prefix argument 7868@code{org-agenda-start-with-clockreport-mode}. By using a prefix argument
7691when toggling this mode (i.e. @kbd{C-u R}), the clock table will not show 7869when toggling this mode (i.e.@: @kbd{C-u R}), the clock table will not show
7692contributions from entries that are hidden by agenda filtering@footnote{Only 7870contributions from entries that are hidden by agenda filtering@footnote{Only
7693tags filtering will be respected here, effort filtering is ignored.}. 7871tags filtering will be respected here, effort filtering is ignored.}.
7694@c 7872@c
7873@orgkey{v c}
7874@vindex org-agenda-clock-consistency-checks
7875Show overlapping clock entries, clocking gaps, and other clocking problems in
7876the current agenda range. You can then visit clocking lines and fix them
7877manually. See the variable @code{org-agenda-clock-consistency-checks} for
7878information on how to customize the definition of what constituted a clocking
7879problem. To return to normal agenda display, press @kbd{l} to exit Logbook
7880mode.
7881@c
7695@orgcmdkskc{v E,E,org-agenda-entry-text-mode} 7882@orgcmdkskc{v E,E,org-agenda-entry-text-mode}
7696@vindex org-agenda-start-with-entry-text-mode 7883@vindex org-agenda-start-with-entry-text-mode
7697@vindex org-agenda-entry-text-maxlines 7884@vindex org-agenda-entry-text-maxlines
@@ -7707,13 +7894,13 @@ prefix argument will temporarily modify that number to the prefix value.
7707Toggle the time grid on and off. See also the variables 7894Toggle the time grid on and off. See also the variables
7708@code{org-agenda-use-time-grid} and @code{org-agenda-time-grid}. 7895@code{org-agenda-use-time-grid} and @code{org-agenda-time-grid}.
7709@c 7896@c
7710@orgcmd{r,org-agenda-rodo} 7897@orgcmd{r,org-agenda-redo}
7711Recreate the agenda buffer, for example to reflect the changes after 7898Recreate the agenda buffer, for example to reflect the changes after
7712modification of the timestamps of items with @kbd{S-@key{left}} and 7899modification of the timestamps of items with @kbd{S-@key{left}} and
7713@kbd{S-@key{right}}. When the buffer is the global TODO list, a prefix 7900@kbd{S-@key{right}}. When the buffer is the global TODO list, a prefix
7714argument is interpreted to create a selective list for a specific TODO 7901argument is interpreted to create a selective list for a specific TODO
7715keyword. 7902keyword.
7716@orgcmd{g,org-agenda-rodo} 7903@orgcmd{g,org-agenda-redo}
7717Same as @kbd{r}. 7904Same as @kbd{r}.
7718@c 7905@c
7719@orgcmdkskc{C-x C-s,s,org-save-all-org-buffers} 7906@orgcmdkskc{C-x C-s,s,org-save-all-org-buffers}
@@ -7806,7 +7993,7 @@ Internet, and outside of business hours, with something like this:
7806@end group 7993@end group
7807@end lisp 7994@end lisp
7808 7995
7809@orgcmd{\,org-agenda-filter-by-tag-refine} 7996@orgcmd{\\,org-agenda-filter-by-tag-refine}
7810Narrow the current agenda filter by an additional condition. When called with 7997Narrow the current agenda filter by an additional condition. When called with
7811prefix arg, remove the entries that @emph{do} have the tag, or that do match 7998prefix arg, remove the entries that @emph{do} have the tag, or that do match
7812the effort criterion. You can achieve the same effect by pressing @kbd{+} or 7999the effort criterion. You can achieve the same effect by pressing @kbd{+} or
@@ -7889,8 +8076,8 @@ agenda, change a tag for all headings in the region.
7889@kindex , 8076@kindex ,
7890@item , 8077@item ,
7891Set the priority for the current item (@command{org-agenda-priority}). 8078Set the priority for the current item (@command{org-agenda-priority}).
7892Org-mode prompts for the priority character. If you reply with @key{SPC}, the 8079Org-mode prompts for the priority character. If you reply with @key{SPC},
7893priority cookie is removed from the entry. 8080the priority cookie is removed from the entry.
7894@c 8081@c
7895@orgcmd{P,org-agenda-show-priority} 8082@orgcmd{P,org-agenda-show-priority}
7896Display weighted priority of current item. 8083Display weighted priority of current item.
@@ -7971,6 +8158,9 @@ Jump to the running clock in another window.
7971Mark the entry at point for bulk action. With prefix arg, mark that many 8158Mark the entry at point for bulk action. With prefix arg, mark that many
7972successive entries. 8159successive entries.
7973@c 8160@c
8161@orgcmd{%,org-agenda-bulk-mark-regexp}
8162Mark entries matching a regular expression for bulk action.
8163@c
7974@orgcmd{u,org-agenda-bulk-unmark} 8164@orgcmd{u,org-agenda-bulk-unmark}
7975Unmark entry for bulk action. 8165Unmark entry for bulk action.
7976@c 8166@c
@@ -7989,15 +8179,30 @@ $ @r{Archive all selected entries.}
7989A @r{Archive entries by moving them to their respective archive siblings.} 8179A @r{Archive entries by moving them to their respective archive siblings.}
7990t @r{Change TODO state. This prompts for a single TODO keyword and} 8180t @r{Change TODO state. This prompts for a single TODO keyword and}
7991 @r{changes the state of all selected entries, bypassing blocking and} 8181 @r{changes the state of all selected entries, bypassing blocking and}
7992 @r{suppressing logging notes (but not time stamps).} 8182 @r{suppressing logging notes (but not timestamps).}
7993+ @r{Add a tag to all selected entries.} 8183+ @r{Add a tag to all selected entries.}
7994- @r{Remove a tag from all selected entries.} 8184- @r{Remove a tag from all selected entries.}
7995s @r{Schedule all items to a new date. To shift existing schedule dates} 8185s @r{Schedule all items to a new date. To shift existing schedule dates}
7996 @r{by a fixed number of days, use something starting with double plus} 8186 @r{by a fixed number of days, use something starting with double plus}
7997 @r{at the prompt, for example @samp{++8d} or @samp{++2w}.} 8187 @r{at the prompt, for example @samp{++8d} or @samp{++2w}.}
7998S @r{Reschedule randomly by N days. N will be prompted for. With prefix} 8188S @r{Reschedule randomly into the coming N days. N will be prompted for.}
7999 @r{arg (@kbd{C-u B S}), scatter only accross weekdays.} 8189 @r{With prefix arg (@kbd{C-u B S}), scatter only across weekdays.}
8000d @r{Set deadline to a specific date.} 8190d @r{Set deadline to a specific date.}
8191f @r{Apply a function to marked entries.}
8192 @r{For example, the function below sets the CATEGORY property of the}
8193 @r{entries to web.}
8194 @r{(defun set-category ()}
8195 @r{ (interactive "P")}
8196 @r{ (let* ((marker (or (org-get-at-bol 'org-hd-marker)}
8197 @r{ (org-agenda-error)))}
8198 @r{ (buffer (marker-buffer marker)))}
8199 @r{ (with-current-buffer buffer}
8200 @r{ (save-excursion}
8201 @r{ (save-restriction}
8202 @r{ (widen)}
8203 @r{ (goto-char marker)}
8204 @r{ (org-back-to-heading t)}
8205 @r{ (org-set-property "CATEGORY" "web"))))))}
8001@end example 8206@end example
8002 8207
8003 8208
@@ -8274,7 +8479,7 @@ version of some agenda views to carry around. Org-mode can export custom
8274agenda views as plain text, HTML@footnote{You need to install Hrvoje Niksic's 8479agenda views as plain text, HTML@footnote{You need to install Hrvoje Niksic's
8275@file{htmlize.el}.}, Postscript, PDF@footnote{To create PDF output, the 8480@file{htmlize.el}.}, Postscript, PDF@footnote{To create PDF output, the
8276ghostscript @file{ps2pdf} utility must be installed on the system. Selecting 8481ghostscript @file{ps2pdf} utility must be installed on the system. Selecting
8277a PDF file with also create the postscript file.}, and iCalendar files. If 8482a PDF file will also create the postscript file.}, and iCalendar files. If
8278you want to do this only occasionally, use the command 8483you want to do this only occasionally, use the command
8279 8484
8280@table @kbd 8485@table @kbd
@@ -8430,7 +8635,7 @@ This causes the following issues:
8430Org needs to make a decision which @code{COLUMNS} format to use. Since the 8635Org needs to make a decision which @code{COLUMNS} format to use. Since the
8431entries in the agenda are collected from different files, and different files 8636entries in the agenda are collected from different files, and different files
8432may have different @code{COLUMNS} formats, this is a non-trivial problem. 8637may have different @code{COLUMNS} formats, this is a non-trivial problem.
8433Org first checks if the variable @code{org-overriding-columns-format} is 8638Org first checks if the variable @code{org-agenda-overriding-columns-format} is
8434currently set, and if so, takes the format from there. Otherwise it takes 8639currently set, and if so, takes the format from there. Otherwise it takes
8435the format associated with the first item in the agenda, or, if that item 8640the format associated with the first item in the agenda, or, if that item
8436does not have a specific format (defined in a property, or in its file), it 8641does not have a specific format (defined in a property, or in its file), it
@@ -8579,7 +8784,7 @@ If you still want to have some text before the first headline, use the
8579#+OPTIONS: skip:t 8784#+OPTIONS: skip:t
8580#+TEXT: This text will go before the *first* headline. 8785#+TEXT: This text will go before the *first* headline.
8581#+TEXT: [TABLE-OF-CONTENTS] 8786#+TEXT: [TABLE-OF-CONTENTS]
8582#+TEXT: This goes between the table of contents and the first headline 8787#+TEXT: This goes between the table of contents and the *first* headline
8583@end example 8788@end example
8584 8789
8585@node Lists, Paragraphs, Initial text, Structural markup elements 8790@node Lists, Paragraphs, Initial text, Structural markup elements
@@ -8638,9 +8843,9 @@ but not any simpler
8638@cindex footnotes, markup rules 8843@cindex footnotes, markup rules
8639@cindex @file{footnote.el} 8844@cindex @file{footnote.el}
8640 8845
8641Footnotes defined in the way described in @ref{Footnotes}, will be exported by 8846Footnotes defined in the way described in @ref{Footnotes}, will be exported
8642all backends. Org allows multiple references to the same note, and 8847by all backends. Org allows multiple references to the same note, and
8643different backends support this to varying degrees. 8848multiple footnotes side by side.
8644 8849
8645@node Emphasis and monospace, Horizontal rules, Footnote markup, Structural markup elements 8850@node Emphasis and monospace, Horizontal rules, Footnote markup, Structural markup elements
8646@subheading Emphasis and monospace 8851@subheading Emphasis and monospace
@@ -8659,8 +8864,8 @@ syntax; it is exported verbatim.
8659@node Horizontal rules, Comment lines, Emphasis and monospace, Structural markup elements 8864@node Horizontal rules, Comment lines, Emphasis and monospace, Structural markup elements
8660@subheading Horizontal rules 8865@subheading Horizontal rules
8661@cindex horizontal rules, markup rules 8866@cindex horizontal rules, markup rules
8662A line consisting of only dashes, and at least 5 of them, will be 8867A line consisting of only dashes, and at least 5 of them, will be exported as
8663exported as a horizontal line (@samp{<hr/>} in HTML). 8868a horizontal line (@samp{<hr/>} in HTML and @code{\hrule} in @LaTeX{}).
8664 8869
8665@node Comment lines, , Horizontal rules, Structural markup elements 8870@node Comment lines, , Horizontal rules, Structural markup elements
8666@subheading Comment lines 8871@subheading Comment lines
@@ -8669,7 +8874,7 @@ exported as a horizontal line (@samp{<hr/>} in HTML).
8669@cindex #+BEGIN_COMMENT 8874@cindex #+BEGIN_COMMENT
8670 8875
8671Lines starting with @samp{#} in column zero are treated as comments and will 8876Lines starting with @samp{#} in column zero are treated as comments and will
8672never be exported. If you want an indented line to be treated as a comment, 8877never be exported. If you want an indented line to be treated as a comment,
8673start it with @samp{#+ }. Also entire subtrees starting with the word 8878start it with @samp{#+ }. Also entire subtrees starting with the word
8674@samp{COMMENT} will never be exported. Finally, regions surrounded by 8879@samp{COMMENT} will never be exported. Finally, regions surrounded by
8675@samp{#+BEGIN_COMMENT} ... @samp{#+END_COMMENT} will not be exported. 8880@samp{#+BEGIN_COMMENT} ... @samp{#+END_COMMENT} will not be exported.
@@ -8701,6 +8906,11 @@ the object with @code{\ref@{tab:basic-data@}}:
8701 |-----|----| 8906 |-----|----|
8702@end example 8907@end example
8703 8908
8909Optionally, the caption can take the form:
8910@example
8911#+CAPTION: [Caption for list of figures]@{Caption for table (or link).@}
8912@end example
8913
8704@cindex inlined images, markup rules 8914@cindex inlined images, markup rules
8705Some backends (HTML, @LaTeX{}, and DocBook) allow you to directly include 8915Some backends (HTML, @LaTeX{}, and DocBook) allow you to directly include
8706images into the exported document. Org does this, if a link to an image 8916images into the exported document. Org does this, if a link to an image
@@ -8755,20 +8965,22 @@ look like the fontified Emacs buffer@footnote{This works automatically for
8755the HTML backend (it requires version 1.34 of the @file{htmlize.el} package, 8965the HTML backend (it requires version 1.34 of the @file{htmlize.el} package,
8756which is distributed with Org). Fontified code chunks in LaTeX can be 8966which is distributed with Org). Fontified code chunks in LaTeX can be
8757achieved using either the listings or the 8967achieved using either the listings or the
8758@url{http://code.google.com/p/minted, minted,} package. To use listings, turn 8968@url{http://code.google.com/p/minted, minted,} package. To use listings, turn
8759on the variable @code{org-export-latex-listings} and ensure that the listings 8969on the variable @code{org-export-latex-listings} and ensure that the listings
8760package is included by the LaTeX header (e.g. by configuring 8970package is included by the LaTeX header (e.g.@: by configuring
8761@code{org-export-latex-packages-alist}). See the listings documentation for 8971@code{org-export-latex-packages-alist}). See the listings documentation for
8762configuration options, including obtaining colored output. For minted it is 8972configuration options, including obtaining colored output. For minted it is
8763necessary to install the program @url{http://pygments.org, pygments}, in 8973necessary to install the program @url{http://pygments.org, pygments}, in
8764addition to setting @code{org-export-latex-minted}, ensuring that the minted 8974addition to setting @code{org-export-latex-minted}, ensuring that the minted
8765package is included by the LaTeX header, and ensuring that the 8975package is included by the LaTeX header, and ensuring that the
8766@code{-shell-escape} option is passed to @file{pdflatex} (see 8976@code{-shell-escape} option is passed to @file{pdflatex} (see
8767@code{org-latex-to-pdf-process}). See the documentation of the variables 8977@code{org-latex-to-pdf-process}). See the documentation of the variables
8768@code{org-export-latex-listings} and @code{org-export-latex-minted} for 8978@code{org-export-latex-listings} and @code{org-export-latex-minted} for
8769further details.}. This is done with the @samp{src} block, where you also 8979further details.}. This is done with the @samp{src} block, where you also
8770need to specify the name of the major mode that should be used to fontify the 8980need to specify the name of the major mode that should be used to fontify the
8771example: 8981example@footnote{Code in @samp{src} blocks may also be evaluated either
8982interactively or on export. See @pxref{Working With Source Code} for more
8983information on evaluating code blocks.}:
8772@cindex #+BEGIN_SRC 8984@cindex #+BEGIN_SRC
8773 8985
8774@example 8986@example
@@ -8784,7 +8996,7 @@ switch to the end of the @code{BEGIN} line, to get the lines of the example
8784numbered. If you use a @code{+n} switch, the numbering from the previous 8996numbered. If you use a @code{+n} switch, the numbering from the previous
8785numbered snippet will be continued in the current one. In literal examples, 8997numbered snippet will be continued in the current one. In literal examples,
8786Org will interpret strings like @samp{(ref:name)} as labels, and use them as 8998Org will interpret strings like @samp{(ref:name)} as labels, and use them as
8787targets for special hyperlinks like @code{[[(name)]]} (i.e. the reference name 8999targets for special hyperlinks like @code{[[(name)]]} (i.e.@: the reference name
8788enclosed in single parenthesis). In HTML, hovering the mouse over such a 9000enclosed in single parenthesis). In HTML, hovering the mouse over such a
8789link will remote-highlight the corresponding code line, which is kind of 9001link will remote-highlight the corresponding code line, which is kind of
8790cool. 9002cool.
@@ -8811,8 +9023,12 @@ If the syntax for the label format conflicts with the language syntax, use a
8811@code{-l} switch to change the format, for example @samp{#+BEGIN_SRC pascal 9023@code{-l} switch to change the format, for example @samp{#+BEGIN_SRC pascal
8812-n -r -l "((%s))"}. See also the variable @code{org-coderef-label-format}. 9024-n -r -l "((%s))"}. See also the variable @code{org-coderef-label-format}.
8813 9025
8814HTML export also allows examples to be published as text areas, @xref{Text 9026HTML export also allows examples to be published as text areas (@pxref{Text
8815areas in HTML export}. 9027areas in HTML export}).
9028
9029Because the @code{#+BEGIN_...} and @code{#+END_...} patterns need to be added
9030so often, shortcuts are provided using the Easy Templates facility
9031(@pxref{Easy Templates}).
8816 9032
8817@table @kbd 9033@table @kbd
8818@kindex C-c ' 9034@kindex C-c '
@@ -8851,7 +9067,7 @@ include your @file{.emacs} file, you could use:
8851#+INCLUDE: "~/.emacs" src emacs-lisp 9067#+INCLUDE: "~/.emacs" src emacs-lisp
8852@end example 9068@end example
8853@noindent 9069@noindent
8854The optional second and third parameter are the markup (e.g. @samp{quote}, 9070The optional second and third parameter are the markup (e.g.@: @samp{quote},
8855@samp{example}, or @samp{src}), and, if the markup is @samp{src}, the 9071@samp{example}, or @samp{src}), and, if the markup is @samp{src}, the
8856language for formatting the contents. The markup is optional; if it is not 9072language for formatting the contents. The markup is optional; if it is not
8857given, the text will be assumed to be in Org-mode format and will be 9073given, the text will be assumed to be in Org-mode format and will be
@@ -8866,6 +9082,17 @@ use
8866#+INCLUDE: "~/snippets/xx" :prefix1 " + " :prefix " " 9082#+INCLUDE: "~/snippets/xx" :prefix1 " + " :prefix " "
8867@end example 9083@end example
8868 9084
9085You can also include a portion of a file by specifying a lines range using
9086the @code{:lines} parameter. The line at the upper end of the range will not
9087be included. The start and/or the end of the range may be omitted to use the
9088obvious defaults.
9089
9090@example
9091#+INCLUDE: "~/.emacs" :lines "5-10" @r{Include lines 5 to 10, 10 excluded}
9092#+INCLUDE: "~/.emacs" :lines "-10" @r{Include lines 1 to 10, 10 excluded}
9093#+INCLUDE: "~/.emacs" :lines "10-" @r{Include lines from 10 to EOF}
9094@end example
9095
8869@table @kbd 9096@table @kbd
8870@kindex C-c ' 9097@kindex C-c '
8871@item C-c ' 9098@item C-c '
@@ -8925,7 +9152,7 @@ include scientific notes, which often require mathematical symbols and the
8925occasional formula. @LaTeX{}@footnote{@LaTeX{} is a macro system based on 9152occasional formula. @LaTeX{}@footnote{@LaTeX{} is a macro system based on
8926Donald E. Knuth's @TeX{} system. Many of the features described here as 9153Donald E. Knuth's @TeX{} system. Many of the features described here as
8927``@LaTeX{}'' are really from @TeX{}, but for simplicity I am blurring this 9154``@LaTeX{}'' are really from @TeX{}, but for simplicity I am blurring this
8928distinction.} is widely used to typeset scientific documents. Org-mode 9155distinction.} is widely used to typeset scientific documents. Org-mode
8929supports embedding @LaTeX{} code into its files, because many academics are 9156supports embedding @LaTeX{} code into its files, because many academics are
8930used to writing and reading @LaTeX{} source code, and because it can be 9157used to writing and reading @LaTeX{} source code, and because it can be
8931readily processed to produce pretty output for a number of export backends. 9158readily processed to produce pretty output for a number of export backends.
@@ -9038,7 +9265,7 @@ this regularly or on pages with significant page views, you should install
9038@file{MathJax} on your own 9265@file{MathJax} on your own
9039server in order to limit the load of our server.}. Finally, it can also 9266server in order to limit the load of our server.}. Finally, it can also
9040process the mathematical expressions into images@footnote{For this to work 9267process the mathematical expressions into images@footnote{For this to work
9041you need to be on a system with a working @LaTeX{} installation. You also 9268you need to be on a system with a working @LaTeX{} installation. You also
9042need the @file{dvipng} program, available at 9269need the @file{dvipng} program, available at
9043@url{http://sourceforge.net/projects/dvipng/}. The @LaTeX{} header that will 9270@url{http://sourceforge.net/projects/dvipng/}. The @LaTeX{} header that will
9044be used when processing a fragment can be configured with the variable 9271be used when processing a fragment can be configured with the variable
@@ -9118,7 +9345,7 @@ Remove the overlay preview images.
9118 9345
9119@vindex org-format-latex-options 9346@vindex org-format-latex-options
9120You can customize the variable @code{org-format-latex-options} to influence 9347You can customize the variable @code{org-format-latex-options} to influence
9121some aspects of the preview. In particular, the @code{:scale} (and for HTML 9348some aspects of the preview. In particular, the @code{:scale} (and for HTML
9122export, @code{:html-scale}) property can be used to adjust the size of the 9349export, @code{:html-scale}) property can be used to adjust the size of the
9123preview images. 9350preview images.
9124 9351
@@ -9191,14 +9418,16 @@ Org-mode documents can be exported into a variety of other formats. For
9191printing and sharing of notes, ASCII export produces a readable and simple 9418printing and sharing of notes, ASCII export produces a readable and simple
9192version of an Org file. HTML export allows you to publish a notes file on 9419version of an Org file. HTML export allows you to publish a notes file on
9193the web, while the XOXO format provides a solid base for exchange with a 9420the web, while the XOXO format provides a solid base for exchange with a
9194broad range of other applications. @LaTeX{} export lets you use Org-mode and 9421broad range of other applications. @LaTeX{} export lets you use Org-mode and
9195its structured editing functions to easily create @LaTeX{} files. DocBook 9422its structured editing functions to easily create @LaTeX{} files. DocBook
9196export makes it possible to convert Org files to many other formats using 9423export makes it possible to convert Org files to many other formats using
9197DocBook tools. For project management you can create gantt and resource 9424DocBook tools. OpenDocumentText export allows seamless colloboration across
9198charts by using TaskJuggler export. To incorporate entries with associated 9425organizational boundaries. For project management you can create gantt and
9199times like deadlines or appointments into a desktop calendar program like 9426resource charts by using TaskJuggler export. To incorporate entries with
9200iCal, Org-mode can also produce extracts in the iCalendar format. Currently 9427associated times like deadlines or appointments into a desktop calendar
9201Org-mode only supports export, not import of these different formats. 9428program like iCal, Org-mode can also produce extracts in the iCalendar
9429format. Currently Org-mode only supports export, not import of these
9430different formats.
9202 9431
9203Org supports export of selected regions when @code{transient-mark-mode} is 9432Org supports export of selected regions when @code{transient-mark-mode} is
9204enabled (default in Emacs 23). 9433enabled (default in Emacs 23).
@@ -9211,6 +9440,7 @@ enabled (default in Emacs 23).
9211* HTML export:: Exporting to HTML 9440* HTML export:: Exporting to HTML
9212* LaTeX and PDF export:: Exporting to @LaTeX{}, and processing to PDF 9441* LaTeX and PDF export:: Exporting to @LaTeX{}, and processing to PDF
9213* DocBook export:: Exporting to DocBook 9442* DocBook export:: Exporting to DocBook
9443* OpenDocumentText export:: Exporting to OpenDocumentText
9214* TaskJuggler export:: Exporting to TaskJuggler 9444* TaskJuggler export:: Exporting to TaskJuggler
9215* Freemind export:: Exporting to Freemind mind maps 9445* Freemind export:: Exporting to Freemind mind maps
9216* XOXO export:: Exporting to XOXO 9446* XOXO export:: Exporting to XOXO
@@ -9219,26 +9449,34 @@ enabled (default in Emacs 23).
9219 9449
9220@node Selective export, Export options, Exporting, Exporting 9450@node Selective export, Export options, Exporting, Exporting
9221@section Selective export 9451@section Selective export
9222@cindex export, selective by tags 9452@cindex export, selective by tags or TODO keyword
9223 9453
9224@vindex org-export-select-tags 9454@vindex org-export-select-tags
9225@vindex org-export-exclude-tags 9455@vindex org-export-exclude-tags
9456@cindex org-export-with-tasks
9226You may use tags to select the parts of a document that should be exported, 9457You may use tags to select the parts of a document that should be exported,
9227or to exclude parts from export. This behavior is governed by two variables: 9458or to exclude parts from export. This behavior is governed by two variables:
9228@code{org-export-select-tags} and @code{org-export-exclude-tags}. 9459@code{org-export-select-tags} and @code{org-export-exclude-tags}.
9229 9460
9230Org first checks if any of the @emph{select} tags is present in the buffer. 9461@enumerate
9231If yes, all trees that do not carry one of these tags will be excluded. If a 9462@item
9232selected tree is a subtree, the heading hierarchy above it will also be 9463Org first checks if any of the @emph{select} tags is present in the
9233selected for export, but not the text below those headings. 9464buffer. If yes, all trees that do not carry one of these tags will be
9465excluded. If a selected tree is a subtree, the heading hierarchy above it
9466will also be selected for export, but not the text below those headings.
9234 9467
9235@noindent 9468@item
9236If none of the select tags is found, the whole buffer will be selected for 9469If none of the select tags is found, the whole buffer will be selected for
9237export. 9470export.
9238 9471
9239@noindent 9472@item
9240Finally, all subtrees that are marked by any of the @emph{exclude} tags will 9473Finally, all subtrees that are marked by any of the @emph{exclude} tags will
9241be removed from the export buffer. 9474be removed from the export buffer.
9475@end enumerate
9476
9477The variable @code{org-export-with-tasks} can be configured to select which
9478kind of tasks should be included for export. See the docstring of the
9479variable for more information.
9242 9480
9243@node Export options, The export dispatcher, Selective export, Exporting 9481@node Export options, The export dispatcher, Selective export, Exporting
9244@section Export options 9482@section Export options
@@ -9284,13 +9522,13 @@ Insert template with export options, see example below.
9284#+AUTHOR: the author (default taken from @code{user-full-name}) 9522#+AUTHOR: the author (default taken from @code{user-full-name})
9285#+DATE: a date, fixed, or a format string for @code{format-time-string} 9523#+DATE: a date, fixed, or a format string for @code{format-time-string}
9286#+EMAIL: his/her email address (default from @code{user-mail-address}) 9524#+EMAIL: his/her email address (default from @code{user-mail-address})
9287#+DESCRIPTION: the page description, e.g. for the XHTML meta tag 9525#+DESCRIPTION: the page description, e.g.@: for the XHTML meta tag
9288#+KEYWORDS: the page keywords, e.g. for the XHTML meta tag 9526#+KEYWORDS: the page keywords, e.g.@: for the XHTML meta tag
9289#+LANGUAGE: language for HTML, e.g. @samp{en} (@code{org-export-default-language}) 9527#+LANGUAGE: language for HTML, e.g.@: @samp{en} (@code{org-export-default-language})
9290#+TEXT: Some descriptive text to be inserted at the beginning. 9528#+TEXT: Some descriptive text to be inserted at the beginning.
9291#+TEXT: Several lines may be given. 9529#+TEXT: Several lines may be given.
9292#+OPTIONS: H:2 num:t toc:t \n:nil @@:t ::t |:t ^:t f:t TeX:t ... 9530#+OPTIONS: H:2 num:t toc:t \n:nil @@:t ::t |:t ^:t f:t TeX:t ...
9293#+BIND: lisp-var lisp-val, e.g.: org-export-latex-low-levels itemize 9531#+BIND: lisp-var lisp-val, e.g.@:: org-export-latex-low-levels itemize
9294 @r{You need to confirm using these, or configure @code{org-export-allow-BIND}} 9532 @r{You need to confirm using these, or configure @code{org-export-allow-BIND}}
9295#+LINK_UP: the ``up'' link of an exported page 9533#+LINK_UP: the ``up'' link of an exported page
9296#+LINK_HOME: the ``home'' link of an exported page 9534#+LINK_HOME: the ``home'' link of an exported page
@@ -9319,6 +9557,11 @@ settings. Here you can:
9319@cindex @LaTeX{} fragments 9557@cindex @LaTeX{} fragments
9320@cindex author info, in export 9558@cindex author info, in export
9321@cindex time info, in export 9559@cindex time info, in export
9560@vindex org-export-plist-vars
9561@vindex org-export-author-info
9562@vindex org-export-creator-info
9563@vindex org-export-email-info
9564@vindex org-export-time-stamp-file
9322@example 9565@example
9323H: @r{set the number of headline levels for export} 9566H: @r{set the number of headline levels for export}
9324num: @r{turn on/off section-numbers} 9567num: @r{turn on/off section-numbers}
@@ -9333,6 +9576,8 @@ toc: @r{turn on/off table of contents, or set level limit (integer)}
9333-: @r{turn on/off conversion of special strings.} 9576-: @r{turn on/off conversion of special strings.}
9334f: @r{turn on/off footnotes like this[1].} 9577f: @r{turn on/off footnotes like this[1].}
9335todo: @r{turn on/off inclusion of TODO keywords into exported text} 9578todo: @r{turn on/off inclusion of TODO keywords into exported text}
9579tasks: @r{turn on/off inclusion of tasks (TODO items), can be nil to remove}
9580 @r{all tasks, @code{todo} to remove DONE tasks, or list of kwds to keep}
9336pri: @r{turn on/off priority cookies} 9581pri: @r{turn on/off priority cookies}
9337tags: @r{turn on/off inclusion of tags, may also be @code{not-in-toc}} 9582tags: @r{turn on/off inclusion of tags, may also be @code{not-in-toc}}
9338<: @r{turn on/off inclusion of any time/date stamps like DEADLINES} 9583<: @r{turn on/off inclusion of any time/date stamps like DEADLINES}
@@ -9348,11 +9593,13 @@ d: @r{turn on/off inclusion of drawers}
9348@end example 9593@end example
9349@noindent 9594@noindent
9350These options take effect in both the HTML and @LaTeX{} export, except for 9595These options take effect in both the HTML and @LaTeX{} export, except for
9351@code{TeX} and @code{LaTeX}, which are respectively @code{t} and @code{nil} 9596@code{TeX} and @code{LaTeX} options, which are respectively @code{t} and
9352for the @LaTeX{} export. The default values for these and many other options 9597@code{nil} for the @LaTeX{} export.
9353are given by a set of variables. For a list of such variables, the 9598
9354corresponding OPTIONS keys and also the publishing keys (@pxref{Project 9599The default values for these and many other options are given by a set of
9355alist}), see the constant @code{org-export-plist-vars}. 9600variables. For a list of such variables, the corresponding OPTIONS keys and
9601also the publishing keys (@pxref{Project alist}), see the constant
9602@code{org-export-plist-vars}.
9356 9603
9357When exporting only a single subtree by selecting it with @kbd{C-c @@} before 9604When exporting only a single subtree by selecting it with @kbd{C-c @@} before
9358calling an export command, the subtree can overrule some of the file's export 9605calling an export command, the subtree can overrule some of the file's export
@@ -9381,11 +9628,11 @@ separate Emacs process@footnote{To make this behavior the default, customize
9381the variable @code{org-export-run-in-background}.}. 9628the variable @code{org-export-run-in-background}.}.
9382@orgcmd{C-c C-e v,org-export-visible} 9629@orgcmd{C-c C-e v,org-export-visible}
9383Like @kbd{C-c C-e}, but only export the text that is currently visible 9630Like @kbd{C-c C-e}, but only export the text that is currently visible
9384(i.e. not hidden by outline visibility). 9631(i.e.@: not hidden by outline visibility).
9385@orgcmd{C-u C-u C-c C-e,org-export} 9632@orgcmd{C-u C-u C-c C-e,org-export}
9386@vindex org-export-run-in-background 9633@vindex org-export-run-in-background
9387Call the exporter, but reverse the setting of 9634Call the exporter, but reverse the setting of
9388@code{org-export-run-in-background}, i.e. request background processing if 9635@code{org-export-run-in-background}, i.e.@: request background processing if
9389not set, or force processing in the current Emacs process if set. 9636not set, or force processing in the current Emacs process if set.
9390@end table 9637@end table
9391 9638
@@ -9409,7 +9656,7 @@ Export as ASCII file. For an Org file, @file{myfile.org}, the ASCII file
9409will be @file{myfile.txt}. The file will be overwritten without 9656will be @file{myfile.txt}. The file will be overwritten without
9410warning. If there is an active region@footnote{This requires 9657warning. If there is an active region@footnote{This requires
9411@code{transient-mark-mode} be turned on.}, only the region will be 9658@code{transient-mark-mode} be turned on.}, only the region will be
9412exported. If the selected region is a single tree@footnote{To select the 9659exported. If the selected region is a single tree@footnote{To select the
9413current subtree, use @kbd{C-c @@}.}, the tree head will 9660current subtree, use @kbd{C-c @@}.}, the tree head will
9414become the document title. If the tree head entry has or inherits an 9661become the document title. If the tree head entry has or inherits an
9415@code{EXPORT_FILE_NAME} property, that name will be used for the 9662@code{EXPORT_FILE_NAME} property, that name will be used for the
@@ -9460,6 +9707,7 @@ language, but with additional support for tables.
9460 9707
9461@menu 9708@menu
9462* HTML Export commands:: How to invoke HTML export 9709* HTML Export commands:: How to invoke HTML export
9710* HTML preamble and postamble:: How to insert a preamble and a postamble
9463* Quoting HTML tags:: Using direct HTML in Org-mode 9711* Quoting HTML tags:: Using direct HTML in Org-mode
9464* Links in HTML export:: How links will be interpreted and formatted 9712* Links in HTML export:: How links will be interpreted and formatted
9465* Tables in HTML export:: How to modify the formatting of tables 9713* Tables in HTML export:: How to modify the formatting of tables
@@ -9470,7 +9718,7 @@ language, but with additional support for tables.
9470* JavaScript support:: Info and Folding in a web browser 9718* JavaScript support:: Info and Folding in a web browser
9471@end menu 9719@end menu
9472 9720
9473@node HTML Export commands, Quoting HTML tags, HTML export, HTML export 9721@node HTML Export commands, HTML preamble and postamble, HTML export, HTML export
9474@subsection HTML export commands 9722@subsection HTML export commands
9475 9723
9476@cindex region, active 9724@cindex region, active
@@ -9479,11 +9727,11 @@ language, but with additional support for tables.
9479@table @kbd 9727@table @kbd
9480@orgcmd{C-c C-e h,org-export-as-html} 9728@orgcmd{C-c C-e h,org-export-as-html}
9481@cindex property, EXPORT_FILE_NAME 9729@cindex property, EXPORT_FILE_NAME
9482Export as HTML file @file{myfile.html}. For an Org file @file{myfile.org}, 9730Export as HTML file. For an Org file @file{myfile.org},
9483the ASCII file will be @file{myfile.html}. The file will be overwritten 9731the HTML file will be @file{myfile.html}. The file will be overwritten
9484without warning. If there is an active region@footnote{This requires 9732without warning. If there is an active region@footnote{This requires
9485@code{transient-mark-mode} be turned on.}, only the region will be 9733@code{transient-mark-mode} be turned on.}, only the region will be
9486exported. If the selected region is a single tree@footnote{To select the 9734exported. If the selected region is a single tree@footnote{To select the
9487current subtree, use @kbd{C-c @@}.}, the tree head will become the document 9735current subtree, use @kbd{C-c @@}.}, the tree head will become the document
9488title. If the tree head entry has, or inherits, an @code{EXPORT_FILE_NAME} 9736title. If the tree head entry has, or inherits, an @code{EXPORT_FILE_NAME}
9489property, that name will be used for the export. 9737property, that name will be used for the export.
@@ -9519,7 +9767,43 @@ specify it with a numeric prefix argument. For example,
9519@noindent 9767@noindent
9520creates two levels of headings and does the rest as items. 9768creates two levels of headings and does the rest as items.
9521 9769
9522@node Quoting HTML tags, Links in HTML export, HTML Export commands, HTML export 9770
9771@node HTML preamble and postamble, Quoting HTML tags, HTML Export commands, HTML export
9772@subsection HTML preamble and postamble
9773@vindex org-export-html-preamble
9774@vindex org-export-html-postamble
9775@vindex org-export-html-preamble-format
9776@vindex org-export-html-postamble-format
9777@vindex org-export-html-validation-link
9778@vindex org-export-author-info
9779@vindex org-export-email-info
9780@vindex org-export-creator-info
9781@vindex org-export-time-stamp-file
9782
9783The HTML exporter lets you define a preamble and a postamble.
9784
9785The default value for @code{org-export-html-preamble} is @code{t}, which
9786means that the preamble is inserted depending on the relevant formatting
9787string in @code{org-export-html-preamble-format}.
9788
9789Setting @code{org-export-html-preamble} to a string will override the default
9790formatting string. Setting it to a function, will insert the output of the
9791function, which must be a string; such a function takes no argument but you
9792can check against the value of @code{opt-plist}, which contains the list of
9793publishing properties for the current file. Setting to @code{nil} will not
9794insert any preamble.
9795
9796The default value for @code{org-export-html-postamble} is @code{'auto}, which
9797means that the HTML exporter will look for the value of
9798@code{org-export-author-info}, @code{org-export-email-info},
9799@code{org-export-creator-info} and @code{org-export-time-stamp-file},
9800@code{org-export-html-validation-link} and build the postamble from these
9801values. Setting @code{org-export-html-postamble} to @code{t} will insert the
9802postamble from the relevant formatting string found in
9803@code{org-export-html-postamble-format}. Setting it to @code{nil} will not
9804insert any postamble.
9805
9806@node Quoting HTML tags, Links in HTML export, HTML preamble and postamble, HTML export
9523@subsection Quoting HTML tags 9807@subsection Quoting HTML tags
9524 9808
9525Plain @samp{<} and @samp{>} are always transformed to @samp{&lt;} and 9809Plain @samp{<} and @samp{>} are always transformed to @samp{&lt;} and
@@ -9624,7 +9908,7 @@ support text viewers and accessibility, and align it to the right.
9624@end example 9908@end example
9625 9909
9626@noindent 9910@noindent
9627and you could use @code{http} addresses just as well. 9911You could use @code{http} addresses just as well.
9628 9912
9629@node Math formatting in HTML export, Text areas in HTML export, Images in HTML export, HTML export 9913@node Math formatting in HTML export, Text areas in HTML export, Images in HTML export, HTML export
9630@subsection Math formatting in HTML export 9914@subsection Math formatting in HTML export
@@ -9704,7 +9988,7 @@ p.date @r{publishing date}
9704p.creator @r{creator info, about org-mode version} 9988p.creator @r{creator info, about org-mode version}
9705.title @r{document title} 9989.title @r{document title}
9706.todo @r{TODO keywords, all not-done states} 9990.todo @r{TODO keywords, all not-done states}
9707.done @r{the DONE keywords, all stated the count as done} 9991.done @r{the DONE keywords, all states that count as done}
9708.WAITING @r{each TODO keyword also uses a class named after itself} 9992.WAITING @r{each TODO keyword also uses a class named after itself}
9709.timestamp @r{timestamp} 9993.timestamp @r{timestamp}
9710.timestamp-kwd @r{keyword associated with a timestamp, like SCHEDULED} 9994.timestamp-kwd @r{keyword associated with a timestamp, like SCHEDULED}
@@ -9841,7 +10125,9 @@ compatible with xetex and possibly luatex. See the variables
9841@code{org-export-latex-packages-alist}.}, this backend is also used to 10125@code{org-export-latex-packages-alist}.}, this backend is also used to
9842produce PDF output. Since the @LaTeX{} output uses @file{hyperref} to 10126produce PDF output. Since the @LaTeX{} output uses @file{hyperref} to
9843implement links and cross references, the PDF output file will be fully 10127implement links and cross references, the PDF output file will be fully
9844linked. 10128linked. Beware of the fact that your @code{org} file has to be properly
10129structured in order to be correctly exported: respect the hierarchy of
10130sections.
9845 10131
9846@menu 10132@menu
9847* LaTeX/PDF export commands:: Which key invokes which commands 10133* LaTeX/PDF export commands:: Which key invokes which commands
@@ -9861,17 +10147,17 @@ linked.
9861@table @kbd 10147@table @kbd
9862@orgcmd{C-c C-e l,org-export-as-latex} 10148@orgcmd{C-c C-e l,org-export-as-latex}
9863@cindex property EXPORT_FILE_NAME 10149@cindex property EXPORT_FILE_NAME
9864Export as @LaTeX{} file @file{myfile.tex}. For an Org file 10150Export as @LaTeX{} file. For an Org file
9865@file{myfile.org}, the ASCII file will be @file{myfile.tex}. The file will 10151@file{myfile.org}, the @LaTeX{} file will be @file{myfile.tex}. The file will
9866be overwritten without warning. If there is an active region@footnote{This 10152be overwritten without warning. If there is an active region@footnote{This
9867requires @code{transient-mark-mode} be turned on.}, only the region will be 10153requires @code{transient-mark-mode} be turned on.}, only the region will be
9868exported. If the selected region is a single tree@footnote{To select the 10154exported. If the selected region is a single tree@footnote{To select the
9869current subtree, use @kbd{C-c @@}.}, the tree head will become the document 10155current subtree, use @kbd{C-c @@}.}, the tree head will become the document
9870title. If the tree head entry has or inherits an @code{EXPORT_FILE_NAME} 10156title. If the tree head entry has or inherits an @code{EXPORT_FILE_NAME}
9871property, that name will be used for the export. 10157property, that name will be used for the export.
9872@orgcmd{C-c C-e L,org-export-as-latex-to-buffer} 10158@orgcmd{C-c C-e L,org-export-as-latex-to-buffer}
9873Export to a temporary buffer. Do not create a file. 10159Export to a temporary buffer. Do not create a file.
9874@item C-c C-e v l/L 10160@item C-c C-e v l/L
9875Export only the visible part of the document. 10161Export only the visible part of the document.
9876@item M-x org-export-region-as-latex 10162@item M-x org-export-region-as-latex
9877Convert the region to @LaTeX{} under the assumption that it was Org-mode 10163Convert the region to @LaTeX{} under the assumption that it was Org-mode
@@ -9895,7 +10181,7 @@ convert them to a custom string depending on
9895@code{org-latex-low-levels}. 10181@code{org-latex-low-levels}.
9896 10182
9897If you want that transition to occur at a different level, specify it 10183If you want that transition to occur at a different level, specify it
9898with a numeric prefix argument. For example, 10184with a numeric prefix argument. For example,
9899 10185
9900@example 10186@example
9901@kbd{C-2 C-c C-e l} 10187@kbd{C-2 C-c C-e l}
@@ -9967,12 +10253,14 @@ All lines between these markers are exported literally
9967@subsection Tables in @LaTeX{} export 10253@subsection Tables in @LaTeX{} export
9968@cindex tables, in @LaTeX{} export 10254@cindex tables, in @LaTeX{} export
9969 10255
9970For @LaTeX{} export of a table, you can specify a label and a caption 10256For @LaTeX{} export of a table, you can specify a label, a caption and
9971(@pxref{Images and tables}). You can also use the @code{ATTR_LaTeX} line to 10257placement options (@pxref{Images and tables}). You can also use the
9972request a @code{longtable} environment for the table, so that it may span 10258@code{ATTR_LaTeX} line to request a @code{longtable} environment for the
9973several pages, or provide the @code{multicolumn} keyword that will make the 10259table, so that it may span several pages, or to change the default table
9974table span the page in a multicolumn environment (@code{table*} environment). 10260environment from @code{table} to @code{table*} or to change the default inner
9975Finally, you can set the alignment string: 10261tabular environment to @code{tabularx} or @code{tabulary}. Finally, you can
10262set the alignment string, and (with @code{tabularx} or @code{tabulary}) the
10263width:
9976 10264
9977@cindex #+CAPTION 10265@cindex #+CAPTION
9978@cindex #+LABEL 10266@cindex #+LABEL
@@ -9985,6 +10273,18 @@ Finally, you can set the alignment string:
9985| ..... | ..... | 10273| ..... | ..... |
9986@end example 10274@end example
9987 10275
10276or to specify a multicolumn table with @code{tabulary}
10277
10278@cindex #+CAPTION
10279@cindex #+LABEL
10280@cindex #+ATTR_LaTeX
10281@example
10282#+CAPTION: A wide table with tabulary
10283#+LABEL: tbl:wide
10284#+ATTR_LaTeX: table* tabulary width=\textwidth
10285| ..... | ..... |
10286| ..... | ..... |
10287@end example
9988 10288
9989@node Images in LaTeX export, Beamer class export, Tables in LaTeX export, LaTeX and PDF export 10289@node Images in LaTeX export, Beamer class export, Tables in LaTeX export, LaTeX and PDF export
9990@subsection Images in @LaTeX{} export 10290@subsection Images in @LaTeX{} export
@@ -9997,11 +10297,18 @@ output file resulting from @LaTeX{} processing. Org will use an
9997@code{\includegraphics} macro to insert the image. If you have specified a 10297@code{\includegraphics} macro to insert the image. If you have specified a
9998caption and/or a label as described in @ref{Images and tables}, the figure 10298caption and/or a label as described in @ref{Images and tables}, the figure
9999will be wrapped into a @code{figure} environment and thus become a floating 10299will be wrapped into a @code{figure} environment and thus become a floating
10000element. You can use an @code{#+ATTR_LaTeX:} line to specify the various 10300element. You can use an @code{#+ATTR_LaTeX:} line to specify various other
10001options that can be used in the optional argument of the 10301options. You can ask org to export an image as a float without specifying
10002@code{\includegraphics} macro. To modify the placement option of the 10302a label or a caption by using the keyword @code{float} in this line. Various
10003@code{figure} environment, add something like @samp{placement=[h!]} to the 10303optional arguments to the @code{\includegraphics} macro can also be specified
10004Attributes. 10304in this fashion. To modify the placement option of the floating environment,
10305add something like @samp{placement=[h!]} to the attributes. It is to be noted
10306this option can be used with tables as well@footnote{One can also take
10307advantage of this option to pass other, unrelated options into the figure or
10308table environment. For an example see the section ``Exporting org files'' in
10309@url{http://orgmode.org/worg/org-hacks.html}}. For example the
10310@code{#+ATTR_LaTeX:} line below is exported as the @code{figure} environment
10311below it.
10005 10312
10006If you would like to let text flow around the image, add the word @samp{wrap} 10313If you would like to let text flow around the image, add the word @samp{wrap}
10007to the @code{#+ATTR_LaTeX:} line, which will make the figure occupy the left 10314to the @code{#+ATTR_LaTeX:} line, which will make the figure occupy the left
@@ -10023,6 +10330,10 @@ for @code{\includegraphics} and @code{wrapfigure}.
10023[[./img/hst.png]] 10330[[./img/hst.png]]
10024@end example 10331@end example
10025 10332
10333If you wish to include an image which spans multiple columns in a page, you
10334can use the keyword @code{multicolumn} in the @code{#+ATTR_LaTeX} line. This
10335will export the image wrapped in a @code{figure*} environment.
10336
10026If you need references to a label created in this way, write 10337If you need references to a label created in this way, write
10027@samp{\ref@{fig:SED-HR4049@}} just like in @LaTeX{}. 10338@samp{\ref@{fig:SED-HR4049@}} just like in @LaTeX{}.
10028 10339
@@ -10153,7 +10464,7 @@ Here is a simple example Org document that is intended for beamer export.
10153 10464
10154For more information, see the documentation on Worg. 10465For more information, see the documentation on Worg.
10155 10466
10156@node DocBook export, TaskJuggler export, LaTeX and PDF export, Exporting 10467@node DocBook export, OpenDocumentText export, LaTeX and PDF export, Exporting
10157@section DocBook export 10468@section DocBook export
10158@cindex DocBook export 10469@cindex DocBook export
10159@cindex PDF export 10470@cindex PDF export
@@ -10255,7 +10566,7 @@ exported DocBook XML files invalid by not quoting DocBook code correctly.
10255@cindex DocBook recursive sections 10566@cindex DocBook recursive sections
10256 10567
10257DocBook exporter exports Org files as articles using the @code{article} 10568DocBook exporter exports Org files as articles using the @code{article}
10258element in DocBook. Recursive sections, i.e. @code{section} elements, are 10569element in DocBook. Recursive sections, i.e.@: @code{section} elements, are
10259used in exported articles. Top level headlines in Org files are exported as 10570used in exported articles. Top level headlines in Org files are exported as
10260top level sections, and lower level headlines are exported as nested 10571top level sections, and lower level headlines are exported as nested
10261sections. The entire structure of Org files will be exported completely, no 10572sections. The entire structure of Org files will be exported completely, no
@@ -10350,7 +10661,155 @@ special characters included in XHTML entities:
10350" 10661"
10351@end example 10662@end example
10352 10663
10353@node TaskJuggler export, Freemind export, DocBook export, Exporting 10664@c begin opendocument
10665
10666@node OpenDocumentText export, TaskJuggler export, DocBook export, Exporting
10667@section OpenDocumentText export
10668@cindex OpenDocumentText export
10669@cindex K, Jambunathan
10670
10671Org-mode 7.6 supports export to OpenDocumentText format using
10672@file{org-odt.el} module contributed by Jambunathan K. This module can be
10673enabled in one of the following ways based on your mode of installation.
10674
10675@enumerate
10676@item
10677If you have downloaded the Org from the Web, either as a distribution
10678@file{.zip} or @file{.tar} file, or as a Git archive, enable the @code{odt}
10679option in variable @code{org-modules}.
10680@item
10681If you are using Org that comes bundled with Emacs, then you can install the
10682OpenDocumentText exporter using the package manager. To do this, customize
10683the variable @code{package-archives} to include
10684@uref{http://orgmode.org/pkg/releases/} as one of the package archives.
10685@end enumerate
10686
10687@menu
10688* OpenDocumentText export commands::How to invoke OpenDocumentText export
10689* Applying Custom Styles:: How to apply custom styles to the output
10690* Converting to Other formats:: How to convert to formats like doc, docx etc
10691* Links in OpenDocumentText export:: How links will be interpreted and formatted
10692* Tables in OpenDocumentText export:: Tables are exported as HTML tables
10693* Images in OpenDocumentText export:: How to insert figures into DocBook output
10694* Additional Documentation:: Where to find more information
10695@end menu
10696
10697@node OpenDocumentText export commands, Applying Custom Styles, OpenDocumentText export, OpenDocumentText export
10698@subsection OpenDocumentText export commands
10699
10700@cindex region, active
10701@cindex active region
10702@cindex transient-mark-mode
10703@table @kbd
10704@orgcmd{C-c C-e o,org-export-as-odt}
10705@cindex property EXPORT_FILE_NAME
10706Export as OpenDocumentText file. For an Org file, @file{myfile.org}, the
10707OpenDocumentText file will be @file{myfile.odt}. The file will be
10708overwritten without warning. If there is an active region@footnote{This
10709requires @code{transient-mark-mode} to be turned on}, only the region will be
10710exported. If the selected region is a single tree@footnote{To select the
10711current subtree, use @kbd{C-c @@}.}, the tree head will become the document
10712title. If the tree head entry has, or inherits, an @code{EXPORT_FILE_NAME}
10713property, that name will be used for the export.
10714@orgcmd{C-c C-e O,org-export-as-odt-and-open}
10715Export as OpenDocumentText file and open the resulting file.
10716@end table
10717
10718@node Applying Custom Styles, Converting to Other formats, OpenDocumentText export commands, OpenDocumentText export
10719@subsection Applying Custom Styles
10720@cindex styles, custom
10721@cindex template, custom
10722
10723@vindex org-export-odt-styles-file
10724
10725OpenDocumentExporter ships with a custom @file{styles.xml} for formatting of
10726the exported file. To customize the output to suit your needs you can use
10727one of the following methods:
10728
10729@enumerate
10730@item
10731Customize the variable @code{org-export-odt-styles-file} to point to either a
10732@file{styles.xml} file, a OpenDocument Text Template file @code{.ott} or a
10733combination of Text or Template Document together with a set of member files.
10734Use the first two options if the styles.xml has no references to additional
10735set of files and use the last option if the @file{styles.xml} references
10736additional files like header and footer images.
10737@item
10738Use an external tool like unoconv to apply custom templates.
10739@end enumerate
10740
10741For best results, it is necessary that the style names used by
10742OpenDocumentText exporter match that used in the @file{styles.xml}.
10743
10744@node Converting to Other formats, Links in OpenDocumentText export, Applying Custom Styles, OpenDocumentText export
10745@subsection Converting to Other formats
10746
10747@cindex convert
10748@cindex doc, docx
10749
10750@vindex org-export-odt-styles-file
10751
10752Often times there is a need to convert OpenDocumentText files to other
10753formats like doc, docx or pdf. You can accomplish this by one of the
10754following methods:
10755
10756@table @kbd
10757@item M-x org-lparse
10758Export the outline first to one of the native formats (like OpenDocumentText)
10759and immediately post-process it to other formats using an external converter.
10760
10761@item M-x org-lparse-convert
10762Export an existing document to other formats using an external converter.
10763@end table
10764
10765You can choose the converter used for conversion by customizing the variable
10766@code{org-lparse-convert-process}.
10767
10768@node Links in OpenDocumentText export, Tables in OpenDocumentText export, Converting to Other formats, OpenDocumentText export
10769@subsection Links in OpenDocumentText export
10770@cindex tables, in DocBook export
10771
10772OpenDocumentExporter creates cross-references (aka bookmarks) for links that
10773are destined locally. It creates internet style links for all other links.
10774
10775@node Tables in OpenDocumentText export, Images in OpenDocumentText export, Links in OpenDocumentText export, OpenDocumentText export
10776@subsection Tables in OpenDocumentText export
10777@cindex tables, in DocBook export
10778
10779Export of @file{table.el} tables with row or column spanning is not
10780supported. Such tables are stripped from the exported document.
10781
10782@node Images in OpenDocumentText export, Additional Documentation, Tables in OpenDocumentText export, OpenDocumentText export
10783@subsection Images in OpenDocumentText export
10784@cindex images, embedding in OpenDocumentText
10785@cindex embedding images in OpenDocumentText
10786
10787OpenDocumentText exporter can embed images within the exported document. To
10788embed images, provide a link to the desired image file with no link
10789description. For example, the following links @samp{[[file:img.jpg]]} or
10790@samp{[[./img.jpg]]}, will result in embedding of @samp{img.jpg} in the
10791exported file.
10792
10793The exporter can also embed scaled and explicitly sized images within the
10794exported document. The markup of the scale and size specifications has not
10795been standardized yet and is hence conveniently skipped in this document.
10796
10797The exporter can also make an image the clickable part of a link. To create
10798clickable images, provide a link whose description is a link to an image
10799file. For example, the following link
10800@samp{[[http://orgmode.org][./img.jpg]]}, will result in a clickable image
10801that links to @uref{http://Orgmode.org} website.
10802
10803@node Additional Documentation, , Images in OpenDocumentText export, OpenDocumentText export
10804@subsection Additional documentation
10805
10806The OpenDocumentText exporter is still in development. For up to date
10807information, please follow Org mailing list @email{emacs-orgmode@@gnu.org}
10808closely.
10809
10810@c end opendocument
10811
10812@node TaskJuggler export, Freemind export, OpenDocumentText export, Exporting
10354@section TaskJuggler export 10813@section TaskJuggler export
10355@cindex TaskJuggler export 10814@cindex TaskJuggler export
10356@cindex Project management 10815@cindex Project management
@@ -10366,7 +10825,7 @@ nodes of a document or strictly follow the order of the nodes in the
10366document. 10825document.
10367 10826
10368Instead the TaskJuggler exporter looks for a tree that defines the tasks and 10827Instead the TaskJuggler exporter looks for a tree that defines the tasks and
10369a optionally tree that defines the resources for this project. It then 10828a optionally tree that defines the resources for this project. It then
10370creates a TaskJuggler file based on these trees and the attributes defined in 10829creates a TaskJuggler file based on these trees and the attributes defined in
10371all the nodes. 10830all the nodes.
10372 10831
@@ -10383,30 +10842,30 @@ Export as TaskJuggler file and then open the file with TaskJugglerUI.
10383@subsection Tasks 10842@subsection Tasks
10384 10843
10385@vindex org-export-taskjuggler-project-tag 10844@vindex org-export-taskjuggler-project-tag
10386Create your tasks as you usually do with Org-mode. Assign efforts to each 10845Create your tasks as you usually do with Org-mode. Assign efforts to each
10387task using properties (it's easiest to do this in the column view). You 10846task using properties (it is easiest to do this in the column view). You
10388should end up with something similar to the example by Peter Jones in 10847should end up with something similar to the example by Peter Jones in
10389@url{http://www.contextualdevelopment.com/static/artifacts/articles/2008/project-planning/project-planning.org}. 10848@url{http://www.contextualdevelopment.com/static/artifacts/articles/2008/project-planning/project-planning.org}.
10390Now mark the top node of your tasks with a tag named 10849Now mark the top node of your tasks with a tag named
10391@code{:taskjuggler_project:} (or whatever you customized 10850@code{:taskjuggler_project:} (or whatever you customized
10392@code{org-export-taskjuggler-project-tag} to). You are now ready to export 10851@code{org-export-taskjuggler-project-tag} to). You are now ready to export
10393the project plan with @kbd{C-c C-e J} which will export the project plan and 10852the project plan with @kbd{C-c C-e J} which will export the project plan and
10394open a gantt chart in TaskJugglerUI. 10853open a gantt chart in TaskJugglerUI.
10395 10854
10396@subsection Resources 10855@subsection Resources
10397 10856
10398@vindex org-export-taskjuggler-resource-tag 10857@vindex org-export-taskjuggler-resource-tag
10399Next you can define resources and assign those to work on specific tasks. You 10858Next you can define resources and assign those to work on specific tasks. You
10400can group your resources hierarchically. Tag the top node of the resources 10859can group your resources hierarchically. Tag the top node of the resources
10401with @code{:taskjuggler_resource:} (or whatever you customized 10860with @code{:taskjuggler_resource:} (or whatever you customized
10402@code{org-export-taskjuggler-resource-tag} to). You can optionally assign an 10861@code{org-export-taskjuggler-resource-tag} to). You can optionally assign an
10403identifier (named @samp{resource_id}) to the resources (using the standard 10862identifier (named @samp{resource_id}) to the resources (using the standard
10404Org properties commands, @pxref{Property syntax}) or you can let the exporter 10863Org properties commands, @pxref{Property syntax}) or you can let the exporter
10405generate identifiers automatically (the exporter picks the first word of the 10864generate identifiers automatically (the exporter picks the first word of the
10406headline as the identifier as long as it is unique---see the documentation of 10865headline as the identifier as long as it is unique---see the documentation of
10407@code{org-taskjuggler-get-unique-id}). Using that identifier you can then 10866@code{org-taskjuggler-get-unique-id}). Using that identifier you can then
10408allocate resources to tasks. This is again done with the @samp{allocate} 10867allocate resources to tasks. This is again done with the @samp{allocate}
10409property on the tasks. Do this in column view or when on the task type 10868property on the tasks. Do this in column view or when on the task type
10410@kbd{C-c C-x p allocate @key{RET} <resource_id> @key{RET}}. 10869@kbd{C-c C-x p allocate @key{RET} <resource_id> @key{RET}}.
10411 10870
10412Once the allocations are done you can again export to TaskJuggler and check 10871Once the allocations are done you can again export to TaskJuggler and check
@@ -10415,9 +10874,9 @@ time.
10415 10874
10416@subsection Export of properties 10875@subsection Export of properties
10417 10876
10418The exporter also takes TODO state information into consideration, i.e. if a 10877The exporter also takes TODO state information into consideration, i.e.@: if a
10419task is marked as done it will have the corresponding attribute in 10878task is marked as done it will have the corresponding attribute in
10420TaskJuggler (@samp{complete 100}). Also it will export any property on a task 10879TaskJuggler (@samp{complete 100}). Also it will export any property on a task
10421resource or resource node which is known to TaskJuggler, such as 10880resource or resource node which is known to TaskJuggler, such as
10422@samp{limits}, @samp{vacation}, @samp{shift}, @samp{booking}, 10881@samp{limits}, @samp{vacation}, @samp{shift}, @samp{booking},
10423@samp{efficiency}, @samp{journalentry}, @samp{rate} for resources or 10882@samp{efficiency}, @samp{journalentry}, @samp{rate} for resources or
@@ -10430,12 +10889,12 @@ resource or resource node which is known to TaskJuggler, such as
10430The exporter will handle dependencies that are defined in the tasks either 10889The exporter will handle dependencies that are defined in the tasks either
10431with the @samp{ORDERED} attribute (@pxref{TODO dependencies}), with the 10890with the @samp{ORDERED} attribute (@pxref{TODO dependencies}), with the
10432@samp{BLOCKER} attribute (see @file{org-depend.el}) or alternatively with a 10891@samp{BLOCKER} attribute (see @file{org-depend.el}) or alternatively with a
10433@samp{depends} attribute. Both the @samp{BLOCKER} and the @samp{depends} 10892@samp{depends} attribute. Both the @samp{BLOCKER} and the @samp{depends}
10434attribute can be either @samp{previous-sibling} or a reference to an 10893attribute can be either @samp{previous-sibling} or a reference to an
10435identifier (named @samp{task_id}) which is defined for another task in the 10894identifier (named @samp{task_id}) which is defined for another task in the
10436project. @samp{BLOCKER} and the @samp{depends} attribute can define multiple 10895project. @samp{BLOCKER} and the @samp{depends} attribute can define multiple
10437dependencies separated by either space or comma. You can also specify 10896dependencies separated by either space or comma. You can also specify
10438optional attributes on the dependency by simply appending it. The following 10897optional attributes on the dependency by simply appending it. The following
10439examples should illustrate this: 10898examples should illustrate this:
10440 10899
10441@example 10900@example
@@ -10451,15 +10910,15 @@ examples should illustrate this:
10451 :END: 10910 :END:
10452** Markup Guidelines 10911** Markup Guidelines
10453 :PROPERTIES: 10912 :PROPERTIES:
10454 :Effort: 2.0 10913 :Effort: 2d
10455 :END: 10914 :END:
10456** Workflow Guidelines 10915** Workflow Guidelines
10457 :PROPERTIES: 10916 :PROPERTIES:
10458 :Effort: 2.0 10917 :Effort: 2d
10459 :END: 10918 :END:
10460* Presentation 10919* Presentation
10461 :PROPERTIES: 10920 :PROPERTIES:
10462 :Effort: 2.0 10921 :Effort: 2d
10463 :BLOCKER: training_material @{ gapduration 1d @} preparation 10922 :BLOCKER: training_material @{ gapduration 1d @} preparation
10464 :END: 10923 :END:
10465@end example 10924@end example
@@ -10467,16 +10926,16 @@ examples should illustrate this:
10467@subsection Reports 10926@subsection Reports
10468 10927
10469@vindex org-export-taskjuggler-default-reports 10928@vindex org-export-taskjuggler-default-reports
10470TaskJuggler can produce many kinds of reports (e.g. gantt chart, resource 10929TaskJuggler can produce many kinds of reports (e.g.@: gantt chart, resource
10471allocation, etc). The user defines what kind of reports should be generated 10930allocation, etc). The user defines what kind of reports should be generated
10472for a project in the TaskJuggler file. The exporter will automatically insert 10931for a project in the TaskJuggler file. The exporter will automatically insert
10473some default reports in the file. These defaults are defined in 10932some default reports in the file. These defaults are defined in
10474@code{org-export-taskjuggler-default-reports}. They can be modified using 10933@code{org-export-taskjuggler-default-reports}. They can be modified using
10475customize along with a number of other options. For a more complete list, see 10934customize along with a number of other options. For a more complete list, see
10476@kbd{M-x customize-group @key{RET} org-export-taskjuggler @key{RET}}. 10935@kbd{M-x customize-group @key{RET} org-export-taskjuggler @key{RET}}.
10477 10936
10478For more information and examples see the Org-taskjuggler tutorial at 10937For more information and examples see the Org-taskjuggler tutorial at
10479@uref{http://orgmode.org/worg/org-tutorials/org-taskjuggler.php}. 10938@uref{http://orgmode.org/worg/org-tutorials/org-taskjuggler.html}.
10480 10939
10481@node Freemind export, XOXO export, TaskJuggler export, Exporting 10940@node Freemind export, XOXO export, TaskJuggler export, Exporting
10482@section Freemind export 10941@section Freemind export
@@ -10487,7 +10946,8 @@ The Freemind exporter was written by Lennart Borgman.
10487 10946
10488@table @kbd 10947@table @kbd
10489@orgcmd{C-c C-e m,org-export-as-freemind} 10948@orgcmd{C-c C-e m,org-export-as-freemind}
10490Export as Freemind mind map @file{myfile.mm}. 10949Export as Freemind mind map. For an Org file @file{myfile.org}, the Freemind
10950file will be @file{myfile.mm}.
10491@end table 10951@end table
10492 10952
10493@node XOXO export, iCalendar export, Freemind export, Exporting 10953@node XOXO export, iCalendar export, Freemind export, Exporting
@@ -10500,7 +10960,8 @@ does not interpret any additional Org-mode features.
10500 10960
10501@table @kbd 10961@table @kbd
10502@orgcmd{C-c C-e x,org-export-as-xoxo} 10962@orgcmd{C-c C-e x,org-export-as-xoxo}
10503Export as XOXO file @file{myfile.html}. 10963Export as XOXO file. For an Org file @file{myfile.org}, the XOXO file will be
10964@file{myfile.html}.
10504@orgkey{C-c C-e v x} 10965@orgkey{C-c C-e v x}
10505Export only the visible part of the document. 10966Export only the visible part of the document.
10506@end table 10967@end table
@@ -10607,7 +11068,7 @@ and many other properties of a project.
10607* Sources and destinations:: From here to there 11068* Sources and destinations:: From here to there
10608* Selecting files:: What files are part of the project? 11069* Selecting files:: What files are part of the project?
10609* Publishing action:: Setting the function doing the publishing 11070* Publishing action:: Setting the function doing the publishing
10610* Publishing options:: Tweaking HTML export 11071* Publishing options:: Tweaking HTML/@LaTeX{} export
10611* Publishing links:: Which links keep working after publishing? 11072* Publishing links:: Which links keep working after publishing?
10612* Sitemap:: Generating a list of all pages 11073* Sitemap:: Generating a list of all pages
10613* Generating an index:: An index that reaches across pages 11074* Generating an index:: An index that reaches across pages
@@ -10624,8 +11085,8 @@ variable, called @code{org-publish-project-alist}. Each element of the list
10624configures one project, and may be in one of the two following forms: 11085configures one project, and may be in one of the two following forms:
10625 11086
10626@lisp 11087@lisp
10627 ("project-name" :property value :property value ...) 11088 ("project-name" :property value :property value ...)
10628 @r{i.e. a well-formed property list with alternating keys and values} 11089 @r{i.e.@: a well-formed property list with alternating keys and values}
10629@r{or} 11090@r{or}
10630 ("project-name" :components ("project-name" "project-name" ...)) 11091 ("project-name" :components ("project-name" "project-name" ...))
10631 11092
@@ -10762,6 +11223,8 @@ respective variable for details.
10762@vindex org-export-with-drawers 11223@vindex org-export-with-drawers
10763@vindex org-export-with-tags 11224@vindex org-export-with-tags
10764@vindex org-export-with-todo-keywords 11225@vindex org-export-with-todo-keywords
11226@vindex org-export-with-tasks
11227@vindex org-export-with-done-tasks
10765@vindex org-export-with-priority 11228@vindex org-export-with-priority
10766@vindex org-export-with-TeX-macros 11229@vindex org-export-with-TeX-macros
10767@vindex org-export-with-LaTeX-fragments 11230@vindex org-export-with-LaTeX-fragments
@@ -10769,11 +11232,13 @@ respective variable for details.
10769@vindex org-export-with-fixed-width 11232@vindex org-export-with-fixed-width
10770@vindex org-export-with-timestamps 11233@vindex org-export-with-timestamps
10771@vindex org-export-author-info 11234@vindex org-export-author-info
10772@vindex org-export-email 11235@vindex org-export-email-info
10773@vindex org-export-creator-info 11236@vindex org-export-creator-info
11237@vindex org-export-time-stamp-file
10774@vindex org-export-with-tables 11238@vindex org-export-with-tables
10775@vindex org-export-highlight-first-table-line 11239@vindex org-export-highlight-first-table-line
10776@vindex org-export-html-style-include-default 11240@vindex org-export-html-style-include-default
11241@vindex org-export-html-style-include-scripts
10777@vindex org-export-html-style 11242@vindex org-export-html-style
10778@vindex org-export-html-style-extra 11243@vindex org-export-html-style-extra
10779@vindex org-export-html-link-org-files-as-html 11244@vindex org-export-html-link-org-files-as-html
@@ -10785,8 +11250,6 @@ respective variable for details.
10785@vindex org-export-publishing-directory 11250@vindex org-export-publishing-directory
10786@vindex org-export-html-preamble 11251@vindex org-export-html-preamble
10787@vindex org-export-html-postamble 11252@vindex org-export-html-postamble
10788@vindex org-export-html-auto-preamble
10789@vindex org-export-html-auto-postamble
10790@vindex user-full-name 11253@vindex user-full-name
10791@vindex user-mail-address 11254@vindex user-mail-address
10792@vindex org-export-select-tags 11255@vindex org-export-select-tags
@@ -10810,6 +11273,7 @@ respective variable for details.
10810@item @code{:drawers} @tab @code{org-export-with-drawers} 11273@item @code{:drawers} @tab @code{org-export-with-drawers}
10811@item @code{:tags} @tab @code{org-export-with-tags} 11274@item @code{:tags} @tab @code{org-export-with-tags}
10812@item @code{:todo-keywords} @tab @code{org-export-with-todo-keywords} 11275@item @code{:todo-keywords} @tab @code{org-export-with-todo-keywords}
11276@item @code{:tasks} @tab @code{org-export-with-tasks}
10813@item @code{:priority} @tab @code{org-export-with-priority} 11277@item @code{:priority} @tab @code{org-export-with-priority}
10814@item @code{:TeX-macros} @tab @code{org-export-with-TeX-macros} 11278@item @code{:TeX-macros} @tab @code{org-export-with-TeX-macros}
10815@item @code{:LaTeX-fragments} @tab @code{org-export-with-LaTeX-fragments} 11279@item @code{:LaTeX-fragments} @tab @code{org-export-with-LaTeX-fragments}
@@ -10817,28 +11281,27 @@ respective variable for details.
10817@item @code{:skip-before-1st-heading} @tab @code{org-export-skip-text-before-1st-heading} 11281@item @code{:skip-before-1st-heading} @tab @code{org-export-skip-text-before-1st-heading}
10818@item @code{:fixed-width} @tab @code{org-export-with-fixed-width} 11282@item @code{:fixed-width} @tab @code{org-export-with-fixed-width}
10819@item @code{:timestamps} @tab @code{org-export-with-timestamps} 11283@item @code{:timestamps} @tab @code{org-export-with-timestamps}
11284@item @code{:author} @tab @code{user-full-name}
11285@item @code{:email} @tab @code{user-mail-address} : @code{addr;addr;..}
10820@item @code{:author-info} @tab @code{org-export-author-info} 11286@item @code{:author-info} @tab @code{org-export-author-info}
10821@item @code{:email-info} @tab @code{org-export-email-info} 11287@item @code{:email-info} @tab @code{org-export-email-info}
10822@item @code{:creator-info} @tab @code{org-export-creator-info} 11288@item @code{:creator-info} @tab @code{org-export-creator-info}
10823@item @code{:tables} @tab @code{org-export-with-tables} 11289@item @code{:tables} @tab @code{org-export-with-tables}
10824@item @code{:table-auto-headline} @tab @code{org-export-highlight-first-table-line} 11290@item @code{:table-auto-headline} @tab @code{org-export-highlight-first-table-line}
10825@item @code{:style-include-default} @tab @code{org-export-html-style-include-default} 11291@item @code{:style-include-default} @tab @code{org-export-html-style-include-default}
11292@item @code{:style-include-scripts} @tab @code{org-export-html-style-include-scripts}
10826@item @code{:style} @tab @code{org-export-html-style} 11293@item @code{:style} @tab @code{org-export-html-style}
10827@item @code{:style-extra} @tab @code{org-export-html-style-extra} 11294@item @code{:style-extra} @tab @code{org-export-html-style-extra}
10828@item @code{:convert-org-links} @tab @code{org-export-html-link-org-files-as-html} 11295@item @code{:convert-org-links} @tab @code{org-export-html-link-org-files-as-html}
10829@item @code{:inline-images} @tab @code{org-export-html-inline-images} 11296@item @code{:inline-images} @tab @code{org-export-html-inline-images}
10830@item @code{:html-extension} @tab @code{org-export-html-extension} 11297@item @code{:html-extension} @tab @code{org-export-html-extension}
11298@item @code{:html-preamble} @tab @code{org-export-html-preamble}
11299@item @code{:html-postamble} @tab @code{org-export-html-postamble}
10831@item @code{:xml-declaration} @tab @code{org-export-html-xml-declaration} 11300@item @code{:xml-declaration} @tab @code{org-export-html-xml-declaration}
10832@item @code{:html-table-tag} @tab @code{org-export-html-table-tag} 11301@item @code{:html-table-tag} @tab @code{org-export-html-table-tag}
10833@item @code{:expand-quoted-html} @tab @code{org-export-html-expand} 11302@item @code{:expand-quoted-html} @tab @code{org-export-html-expand}
10834@item @code{:timestamp} @tab @code{org-export-html-with-timestamp} 11303@item @code{:timestamp} @tab @code{org-export-html-with-timestamp}
10835@item @code{:publishing-directory} @tab @code{org-export-publishing-directory} 11304@item @code{:publishing-directory} @tab @code{org-export-publishing-directory}
10836@item @code{:preamble} @tab @code{org-export-html-preamble}
10837@item @code{:postamble} @tab @code{org-export-html-postamble}
10838@item @code{:auto-preamble} @tab @code{org-export-html-auto-preamble}
10839@item @code{:auto-postamble} @tab @code{org-export-html-auto-postamble}
10840@item @code{:author} @tab @code{user-full-name}
10841@item @code{:email} @tab @code{user-mail-address} : @code{addr;addr;..}
10842@item @code{:select-tags} @tab @code{org-export-select-tags} 11305@item @code{:select-tags} @tab @code{org-export-select-tags}
10843@item @code{:exclude-tags} @tab @code{org-export-exclude-tags} 11306@item @code{:exclude-tags} @tab @code{org-export-exclude-tags}
10844@item @code{:latex-image-options} @tab @code{org-export-latex-image-default-option} 11307@item @code{:latex-image-options} @tab @code{org-export-latex-image-default-option}
@@ -10846,8 +11309,11 @@ respective variable for details.
10846 11309
10847Most of the @code{org-export-with-*} variables have the same effect in 11310Most of the @code{org-export-with-*} variables have the same effect in
10848both HTML and @LaTeX{} exporters, except for @code{:TeX-macros} and 11311both HTML and @LaTeX{} exporters, except for @code{:TeX-macros} and
10849@code{:LaTeX-fragments}, respectively @code{nil} and @code{t} in the 11312@code{:LaTeX-fragments} options, respectively @code{nil} and @code{t} in the
10850@LaTeX{} export. 11313@LaTeX{} export. See @code{org-export-plist-vars} to check this list of
11314options.
11315
11316
10851 11317
10852@vindex org-publish-project-alist 11318@vindex org-publish-project-alist
10853When a property is given a value in @code{org-publish-project-alist}, 11319When a property is given a value in @code{org-publish-project-alist},
@@ -10869,9 +11335,9 @@ to link to that, use an @code{http:} link instead of a @code{file:} link,
10869because @code{file:} links are converted to link to the corresponding 11335because @code{file:} links are converted to link to the corresponding
10870@file{html} file. 11336@file{html} file.
10871 11337
10872You may also link to related files, such as images. Provided you are careful 11338You may also link to related files, such as images. Provided you are careful
10873with relative file names, and provided you have also configured Org to upload 11339with relative file names, and provided you have also configured Org to upload
10874the related files, these links will work too. See @ref{Complex example}, for 11340the related files, these links will work too. See @ref{Complex example}, for
10875an example of this usage. 11341an example of this usage.
10876 11342
10877Sometimes an Org file to be published may contain links that are 11343Sometimes an Org file to be published may contain links that are
@@ -10905,11 +11371,11 @@ a map of files for a given project.
10905or @code{org-publish-all}. 11371or @code{org-publish-all}.
10906 11372
10907@item @code{:sitemap-filename} 11373@item @code{:sitemap-filename}
10908@tab Filename for output of sitemap. Defaults to @file{sitemap.org} (which 11374@tab Filename for output of sitemap. Defaults to @file{sitemap.org} (which
10909becomes @file{sitemap.html}). 11375becomes @file{sitemap.html}).
10910 11376
10911@item @code{:sitemap-title} 11377@item @code{:sitemap-title}
10912@tab Title of sitemap page. Defaults to name of file. 11378@tab Title of sitemap page. Defaults to name of file.
10913 11379
10914@item @code{:sitemap-function} 11380@item @code{:sitemap-function}
10915@tab Plug-in function to use for generation of the sitemap. 11381@tab Plug-in function to use for generation of the sitemap.
@@ -10921,13 +11387,35 @@ of links to all files in the project.
10921(default) or @code{last} to display folders first or last, 11387(default) or @code{last} to display folders first or last,
10922respectively. Any other value will mix files and folders. 11388respectively. Any other value will mix files and folders.
10923 11389
10924@item @code{:sitemap-alphabetically} 11390@item @code{:sitemap-sort-files}
10925@tab The site map is normally sorted alphabetically. Set this explicitly to 11391@tab How the files are sorted in the site map. Set this to
10926@code{nil} to turn off sorting. 11392@code{alphabetically} (default), @code{chronologically} or
11393@code{anti-chronologically}. @code{chronologically} sorts the files with
11394older date first while @code{anti-chronologically} sorts the files with newer
11395date first. @code{alphabetically} sorts the files alphabetically. The date of
11396a file is retrieved with @code{org-publish-find-date}.
10927 11397
10928@item @code{:sitemap-ignore-case} 11398@item @code{:sitemap-ignore-case}
10929@tab Should sorting be case-sensitive? Default @code{nil}. 11399@tab Should sorting be case-sensitive? Default @code{nil}.
10930 11400
11401@item @code{:sitemap-file-entry-format}
11402@tab With this option one can tell how a sitemap's entry is formated in the
11403sitemap. This is a format string with some escape sequences: @code{%t} stands
11404for the title of the file, @code{%a} stands for the author of the file and
11405@code{%d} stands for the date of the file. The date is retrieved with the
11406@code{org-publish-find-date} function and formated with
11407@code{org-publish-sitemap-date-format}. Default @code{%t}.
11408
11409@item @code{:sitemap-date-format}
11410@tab Format string for the @code{format-time-string} function that tells how
11411a sitemap entry's date is to be formated. This property bypasses
11412@code{org-publish-sitemap-date-format} which defaults to @code{%Y-%m-%d}.
11413
11414@item @code{:sitemap-sans-extension}
11415@tab When non-nil, remove filenames' extensions from the generated sitemap.
11416Useful to have cool URIs (see @uref{http://www.w3.org/Provider/Style/URI}).
11417Defaults to @code{nil}.
11418
10931@end multitable 11419@end multitable
10932 11420
10933@node Generating an index, , Sitemap, Configuration 11421@node Generating an index, , Sitemap, Configuration
@@ -10942,10 +11430,10 @@ Org-mode can generate an index across the files of a publishing project.
10942publish it as @file{theindex.html}. 11430publish it as @file{theindex.html}.
10943@end multitable 11431@end multitable
10944 11432
10945The file will be create when first publishing a project with the 11433The file will be created when first publishing a project with the
10946@code{:makeindex} set. The file only contains a statement @code{#+include: 11434@code{:makeindex} set. The file only contains a statement @code{#+include:
10947"theindex.inc"}. You can then built around this include statement by adding 11435"theindex.inc"}. You can then build around this include statement by adding
10948a title, style information etc. 11436a title, style information, etc.
10949 11437
10950@node Uploading files, Sample configuration, Configuration, Publishing 11438@node Uploading files, Sample configuration, Configuration, Publishing
10951@section Uploading files 11439@section Uploading files
@@ -11015,12 +11503,12 @@ directory on the local machine.
11015 11503
11016This more complicated example publishes an entire website, including 11504This more complicated example publishes an entire website, including
11017Org files converted to HTML, image files, Emacs Lisp source code, and 11505Org files converted to HTML, image files, Emacs Lisp source code, and
11018style sheets. The publishing directory is remote and private files are 11506style sheets. The publishing directory is remote and private files are
11019excluded. 11507excluded.
11020 11508
11021To ensure that links are preserved, care should be taken to replicate 11509To ensure that links are preserved, care should be taken to replicate
11022your directory structure on the web server, and to use relative file 11510your directory structure on the web server, and to use relative file
11023paths. For example, if your Org files are kept in @file{~/org} and your 11511paths. For example, if your Org files are kept in @file{~/org} and your
11024publishable images in @file{~/images}, you would link to an image with 11512publishable images in @file{~/images}, you would link to an image with
11025@c 11513@c
11026@example 11514@example
@@ -11028,7 +11516,7 @@ file:../images/myimage.png
11028@end example 11516@end example
11029@c 11517@c
11030On the web server, the relative path to the image should be the 11518On the web server, the relative path to the image should be the
11031same. You can accomplish this by setting up an "images" folder in the 11519same. You can accomplish this by setting up an "images" folder in the
11032right place on the web server, and publishing images to it. 11520right place on the web server, and publishing images to it.
11033 11521
11034@lisp 11522@lisp
@@ -11044,8 +11532,7 @@ right place on the web server, and publishing images to it.
11044 :table-of-contents nil 11532 :table-of-contents nil
11045 :style "<link rel=\"stylesheet\" 11533 :style "<link rel=\"stylesheet\"
11046 href=\"../other/mystyle.css\" type=\"text/css\"/>" 11534 href=\"../other/mystyle.css\" type=\"text/css\"/>"
11047 :auto-preamble t 11535 :html-preamble t)
11048 :auto-postamble nil)
11049 11536
11050 ("images" 11537 ("images"
11051 :base-directory "~/images/" 11538 :base-directory "~/images/"
@@ -11078,8 +11565,8 @@ Publish every project.
11078@end table 11565@end table
11079 11566
11080@vindex org-publish-use-timestamps-flag 11567@vindex org-publish-use-timestamps-flag
11081Org uses timestamps to track when a file has changed. The above functions 11568Org uses timestamps to track when a file has changed. The above functions
11082normally only publish changed files. You can override this and force 11569normally only publish changed files. You can override this and force
11083publishing of all files by giving a prefix argument to any of the commands 11570publishing of all files by giving a prefix argument to any of the commands
11084above, or by customizing the variable @code{org-publish-use-timestamps-flag}. 11571above, or by customizing the variable @code{org-publish-use-timestamps-flag}.
11085This may be necessary in particular if files include other files via 11572This may be necessary in particular if files include other files via
@@ -11095,7 +11582,7 @@ This may be necessary in particular if files include other files via
11095@cindex source code, working with 11582@cindex source code, working with
11096 11583
11097Source code can be included in Org-mode documents using a @samp{src} block, 11584Source code can be included in Org-mode documents using a @samp{src} block,
11098e.g. 11585e.g.@:
11099 11586
11100@example 11587@example
11101#+BEGIN_SRC emacs-lisp 11588#+BEGIN_SRC emacs-lisp
@@ -11107,7 +11594,8 @@ e.g.
11107 11594
11108Org-mode provides a number of features for working with live source code, 11595Org-mode provides a number of features for working with live source code,
11109including editing of code blocks in their native major-mode, evaluation of 11596including editing of code blocks in their native major-mode, evaluation of
11110code blocks, tangling of code blocks, and exporting code blocks and their 11597code blocks, converting code blocks into source files (known as @dfn{tangling}
11598in literate programming), and exporting code blocks and their
11111results in several formats. This functionality was contributed by Eric 11599results in several formats. This functionality was contributed by Eric
11112Schulte and Dan Davison, and was originally named Org-babel. 11600Schulte and Dan Davison, and was originally named Org-babel.
11113 11601
@@ -11145,7 +11633,8 @@ The structure of code blocks is as follows:
11145#+end_src 11633#+end_src
11146@end example 11634@end example
11147 11635
11148code blocks can also be embedded in text as so called inline code blocks as 11636Switches and header arguments are optional. Code can also be embedded in text
11637inline using
11149 11638
11150@example 11639@example
11151src_<language>@{<body>@} 11640src_<language>@{<body>@}
@@ -11163,16 +11652,18 @@ This name is associated with the code block. This is similar to the
11163@samp{#+tblname} lines that can be used to name tables in Org-mode files. 11652@samp{#+tblname} lines that can be used to name tables in Org-mode files.
11164Referencing the name of a code block makes it possible to evaluate the 11653Referencing the name of a code block makes it possible to evaluate the
11165block from other places in the file, other files, or from Org-mode table 11654block from other places in the file, other files, or from Org-mode table
11166formulas (see @ref{The spreadsheet}). 11655formulas (see @ref{The spreadsheet}). Names are assumed to be unique by
11656evaluation functions and the behavior of multiple blocks of the same name is
11657undefined.
11167@item <language> 11658@item <language>
11168The language of the code in the block. 11659The language of the code in the block.
11169@item <switches> 11660@item <switches>
11170Switches controlling exportation of the code block (see switches discussion in 11661Optional switches controlling exportation of the code block (see switches discussion in
11171@ref{Literal examples}) 11662@ref{Literal examples})
11172@item <header arguments> 11663@item <header arguments>
11173Optional header arguments control many aspects of evaluation, export and 11664Optional header arguments control many aspects of evaluation, export and
11174tangling of code blocks. See the @ref{Header arguments} 11665tangling of code blocks. See the @ref{Header arguments}.
11175section. Header arguments can also be set on a per-buffer or per-subtree 11666Header arguments can also be set on a per-buffer or per-subtree
11176basis using properties. 11667basis using properties.
11177@item <body> 11668@item <body>
11178The source code. 11669The source code.
@@ -11187,21 +11678,21 @@ The source code.
11187@cindex source code, editing 11678@cindex source code, editing
11188 11679
11189@kindex C-c ' 11680@kindex C-c '
11190Use @kbd{C-c '} to edit the current code block. This brings up 11681Use @kbd{C-c '} to edit the current code block. This brings up
11191a language major-mode edit buffer containing the body of the code 11682a language major-mode edit buffer containing the body of the code
11192block. Saving this buffer will write the new contents back to the Org 11683block. Saving this buffer will write the new contents back to the Org
11193buffer. Use @kbd{C-c '} again to exit. 11684buffer. Use @kbd{C-c '} again to exit.
11194 11685
11195The @code{org-src-mode} minor mode will be active in the edit buffer. The 11686The @code{org-src-mode} minor mode will be active in the edit buffer. The
11196following variables can be used to configure the behavior of the edit 11687following variables can be used to configure the behavior of the edit
11197buffer. See also the customization group @code{org-edit-structure} for 11688buffer. See also the customization group @code{org-edit-structure} for
11198further configuration options. 11689further configuration options.
11199 11690
11200@table @code 11691@table @code
11201@item org-src-lang-modes 11692@item org-src-lang-modes
11202If an Emacs major-mode named @code{<lang>-mode} exists, where 11693If an Emacs major-mode named @code{<lang>-mode} exists, where
11203@code{<lang>} is the language named in the header line of the code block, 11694@code{<lang>} is the language named in the header line of the code block,
11204then the edit buffer will be placed in that major-mode. This variable 11695then the edit buffer will be placed in that major-mode. This variable
11205can be used to map arbitrary language names to existing major modes. 11696can be used to map arbitrary language names to existing major modes.
11206@item org-src-window-setup 11697@item org-src-window-setup
11207Controls the way Emacs windows are rearranged when the edit buffer is created. 11698Controls the way Emacs windows are rearranged when the edit buffer is created.
@@ -11209,10 +11700,13 @@ Controls the way Emacs windows are rearranged when the edit buffer is created.
11209This variable is especially useful for tangling languages such as 11700This variable is especially useful for tangling languages such as
11210Python, in which whitespace indentation in the output is critical. 11701Python, in which whitespace indentation in the output is critical.
11211@item org-src-ask-before-returning-to-edit-buffer 11702@item org-src-ask-before-returning-to-edit-buffer
11212By default, Org will ask before returning to an open edit buffer. Set 11703By default, Org will ask before returning to an open edit buffer. Set this
11213this variable to nil to switch without asking. 11704variable to nil to switch without asking.
11214@end table 11705@end table
11215 11706
11707To turn on native code fontification in the @emph{Org} buffer, configure the
11708variable @code{org-src-fontify-natively}.
11709
11216@comment node-name, next, previous, up 11710@comment node-name, next, previous, up
11217@comment Exporting code blocks, Extracting source code, Editing source code, Working With Source Code 11711@comment Exporting code blocks, Extracting source code, Editing source code, Working With Source Code
11218 11712
@@ -11223,8 +11717,8 @@ this variable to nil to switch without asking.
11223 11717
11224It is possible to export the @emph{contents} of code blocks, the 11718It is possible to export the @emph{contents} of code blocks, the
11225@emph{results} of code block evaluation, @emph{neither}, or @emph{both}. For 11719@emph{results} of code block evaluation, @emph{neither}, or @emph{both}. For
11226most languages, the default exports the contents of code blocks. However, for 11720most languages, the default exports the contents of code blocks. However, for
11227some languages (e.g. @code{ditaa}) the default exports the results of code 11721some languages (e.g.@: @code{ditaa}) the default exports the results of code
11228block evaluation. For information on exporting code block bodies, see 11722block evaluation. For information on exporting code block bodies, see
11229@ref{Literal examples}. 11723@ref{Literal examples}.
11230 11724
@@ -11234,7 +11728,7 @@ behavior:
11234@subsubheading Header arguments: 11728@subsubheading Header arguments:
11235@table @code 11729@table @code
11236@item :exports code 11730@item :exports code
11237The default in most languages. The body of the code block is exported, as 11731The default in most languages. The body of the code block is exported, as
11238described in @ref{Literal examples}. 11732described in @ref{Literal examples}.
11239@item :exports results 11733@item :exports results
11240The code block will be evaluated and the results will be placed in the 11734The code block will be evaluated and the results will be placed in the
@@ -11259,6 +11753,7 @@ markup language for a wiki.
11259@comment Extracting source code, Evaluating code blocks, Exporting code blocks, Working With Source Code 11753@comment Extracting source code, Evaluating code blocks, Exporting code blocks, Working With Source Code
11260@node Extracting source code, Evaluating code blocks, Exporting code blocks, Working With Source Code 11754@node Extracting source code, Evaluating code blocks, Exporting code blocks, Working With Source Code
11261@section Extracting source code 11755@section Extracting source code
11756@cindex tangling
11262@cindex source code, extracting 11757@cindex source code, extracting
11263@cindex code block, extracting source code 11758@cindex code block, extracting source code
11264 11759
@@ -11273,7 +11768,7 @@ using @code{org-babel-expand-src-block} which can expand both variable and
11273@item :tangle no 11768@item :tangle no
11274The default. The code block is not included in the tangled output. 11769The default. The code block is not included in the tangled output.
11275@item :tangle yes 11770@item :tangle yes
11276Include the code block in the tangled output. The output file name is the 11771Include the code block in the tangled output. The output file name is the
11277name of the org file with the extension @samp{.org} replaced by the extension 11772name of the org file with the extension @samp{.org} replaced by the extension
11278for the block language. 11773for the block language.
11279@item :tangle filename 11774@item :tangle filename
@@ -11283,10 +11778,10 @@ Include the code block in the tangled output to file @samp{filename}.
11283@kindex C-c C-v t 11778@kindex C-c C-v t
11284@subsubheading Functions 11779@subsubheading Functions
11285@table @code 11780@table @code
11286@item org-babel-tangle 11781@item org-babel-tangle
11287Tangle the current file. Bound to @kbd{C-c C-v t}. 11782Tangle the current file. Bound to @kbd{C-c C-v t}.
11288@item org-babel-tangle-file 11783@item org-babel-tangle-file
11289Choose a file to tangle. Bound to @kbd{C-c C-v f}. 11784Choose a file to tangle. Bound to @kbd{C-c C-v f}.
11290@end table 11785@end table
11291 11786
11292@subsubheading Hooks 11787@subsubheading Hooks
@@ -11324,24 +11819,60 @@ It is also possible to evaluate named code blocks from anywhere in an
11324Org-mode buffer or an Org-mode table. @code{#+call} (or synonymously 11819Org-mode buffer or an Org-mode table. @code{#+call} (or synonymously
11325@code{#+function} or @code{#+lob}) lines can be used to remotely execute code 11820@code{#+function} or @code{#+lob}) lines can be used to remotely execute code
11326blocks located in the current Org-mode buffer or in the ``Library of Babel'' 11821blocks located in the current Org-mode buffer or in the ``Library of Babel''
11327(see @ref{Library of Babel}). These lines use the following syntax. 11822(see @ref{Library of Babel}). These lines use the following syntax to place
11823a call on a line by itself.
11328 11824
11329@example 11825@example
11330#+call: <name>(<arguments>) <header arguments> 11826#+call: <name>(<arguments>)
11331#+function: <name>(<arguments>) <header arguments> 11827#+call: <name>[<header args>](<arguments>) <header args>
11332#+lob: <name>(<arguments>) <header arguments> 11828@end example
11829
11830The following syntax can be used to place these calls within a block of
11831prose.
11832
11833@example
11834...prose... call_<name>(<arguments>) ...prose...
11835...prose... call_<name>[<header args>](<arguments>)[<header args>] ...prose...
11333@end example 11836@end example
11334 11837
11335@table @code 11838@table @code
11336@item <name> 11839@item <name>
11337The name of the code block to be evaluated. 11840The name of the code block to be evaluated.
11338@item <arguments> 11841@item <arguments>
11339Arguments specified in this section will be passed to the code block. 11842Arguments specified in this section will be passed to the code block. These
11340@item <header arguments> 11843arguments should relate to @code{:var} header arguments in the called code
11341Header arguments can be placed after the function invocation. See 11844block expressed using standard function call syntax. For example if the
11342@ref{Header arguments} for more information on header arguments. 11845original code block named @code{double} has the header argument @code{:var
11846n=2}, then the call line passing the number four to that block would be
11847written as @code{#+call: double(n=2)}.
11848@item <header args>
11849Header arguments can be placed either inside the call to the code block or at
11850the end of the line as shown below.
11851
11852@example
11853#+call: code_bloc_name[XXXX](arguments) YYYY
11854@end example
11855
11856Header arguments located in these two locations are treated differently.
11857
11858@table @code
11859@item XXXX
11860Those placed in the @code{XXXX} location are passed through and applied to
11861the code block being called. These header arguments affect how the code
11862block is evaluated, for example @code{[:results output]} will collect the
11863results from @code{STDOUT} of the called code block.
11864@item YYYY
11865Those placed in the @code{YYYY} location are applied to the call line and do
11866not affect the code block being called. These header arguments affect how
11867the results are incorporated into the Org-mode buffer when the call line is
11868evaluated, and how the call line is exported. For example @code{:results
11869org} at the end of the call line will insert the results of the call line
11870inside of an Org-mode block.
11343@end table 11871@end table
11344 11872
11873For more examples of passing header arguments to @code{#+call:} lines see
11874@ref{Header arguments in function calls}.
11875@end table
11345 11876
11346@node Library of Babel, Languages, Evaluating code blocks, Working With Source Code 11877@node Library of Babel, Languages, Evaluating code blocks, Working With Source Code
11347@section Library of Babel 11878@section Library of Babel
@@ -11374,19 +11905,24 @@ Code blocks in the following languages are supported.
11374 11905
11375@multitable @columnfractions 0.28 0.3 0.22 0.2 11906@multitable @columnfractions 0.28 0.3 0.22 0.2
11376@item @b{Language} @tab @b{Identifier} @tab @b{Language} @tab @b{Identifier} 11907@item @b{Language} @tab @b{Identifier} @tab @b{Language} @tab @b{Identifier}
11377@item Asymptote @tab asymptote @tab C @tab C 11908@item Asymptote @tab asymptote @tab Awk @tab awk
11909@item Emacs Calc @tab calc @tab C @tab C
11378@item C++ @tab C++ @tab Clojure @tab clojure 11910@item C++ @tab C++ @tab Clojure @tab clojure
11379@item CSS @tab css @tab ditaa @tab ditaa 11911@item CSS @tab css @tab ditaa @tab ditaa
11380@item Graphviz @tab dot @tab Emacs Lisp @tab emacs-lisp 11912@item Graphviz @tab dot @tab Emacs Lisp @tab emacs-lisp
11381@item gnuplot @tab gnuplot @tab Haskell @tab haskell 11913@item gnuplot @tab gnuplot @tab Haskell @tab haskell
11382@item LaTeX @tab latex @tab MATLAB @tab matlab 11914@item Java @tab java @tab @tab
11915@item Javascript @tab js @tab LaTeX @tab latex
11916@item Ledger @tab ledger @tab Lisp @tab lisp
11917@item Lilypond @tab lilypond @tab MATLAB @tab matlab
11383@item Mscgen @tab mscgen @tab Objective Caml @tab ocaml 11918@item Mscgen @tab mscgen @tab Objective Caml @tab ocaml
11384@item Octave @tab octave @tab Oz @tab oz 11919@item Octave @tab octave @tab Org-mode @tab org
11385@item Perl @tab perl @tab Python @tab python 11920@item Oz @tab oz @tab Perl @tab perl
11921@item Plantuml @tab plantuml @tab Python @tab python
11386@item R @tab R @tab Ruby @tab ruby 11922@item R @tab R @tab Ruby @tab ruby
11387@item Sass @tab sass @tab GNU Screen @tab screen 11923@item Sass @tab sass @tab Scheme @tab scheme
11388@item shell @tab sh @tab SQL @tab sql 11924@item GNU Screen @tab screen @tab shell @tab sh
11389@item SQLite @tab sqlite 11925@item SQL @tab sql @tab SQLite @tab sqlite
11390@end multitable 11926@end multitable
11391 11927
11392Language-specific documentation is available for some languages. If 11928Language-specific documentation is available for some languages. If
@@ -11515,7 +12051,7 @@ inserted into the buffer.
11515@subsubheading Header arguments in Org-mode properties 12051@subsubheading Header arguments in Org-mode properties
11516 12052
11517Header arguments are also read from Org-mode properties (see @ref{Property 12053Header arguments are also read from Org-mode properties (see @ref{Property
11518syntax}), which can be set on a buffer-wide or per-heading basis. An example 12054syntax}), which can be set on a buffer-wide or per-heading basis. An example
11519of setting a header argument for all code blocks in a buffer is 12055of setting a header argument for all code blocks in a buffer is
11520 12056
11521@example 12057@example
@@ -11568,17 +12104,54 @@ Similarly, it is possible to set header arguments for inline code blocks:
11568src_haskell[:exports both]@{fac 5@} 12104src_haskell[:exports both]@{fac 5@}
11569@end example 12105@end example
11570 12106
12107Code block header arguments can span multiple lines using =#+header:= or
12108=#+headers:= lines preceding a code block or nested in between the name and
12109body of a named code block.
12110
12111Multi-line header arguments on an un-named code block:
12112@example
12113 #+headers: :var data1=1
12114 #+begin_src emacs-lisp :var data2=2
12115 (message "data1:%S, data2:%S" data1 data2)
12116 #+end_src
12117
12118 #+results:
12119 : data1:1, data2:2
12120@end example
12121
12122Multi-line header arguments on a named code block:
12123@example
12124 #+source: named-block
12125 #+header: :var data=2
12126 #+begin_src emacs-lisp
12127 (message "data:%S" data)
12128 #+end_src
12129
12130 #+results: named-block
12131 : data:2
12132@end example
12133
11571@node Header arguments in function calls, , Code block specific header arguments, Using header arguments 12134@node Header arguments in function calls, , Code block specific header arguments, Using header arguments
11572@comment node-name, next, previous, up 12135@comment node-name, next, previous, up
11573@subsubheading Header arguments in function calls 12136@subsubheading Header arguments in function calls
11574 12137
11575At the most specific level, header arguments for ``Library of Babel'' or 12138At the most specific level, header arguments for ``Library of Babel'' or
11576function call lines can be set as shown below: 12139function call lines can be set as shown in the two examples below. For more
12140information on the structure of @code{#+call:} lines see @ref{Evaluating code
12141blocks}.
11577 12142
12143The following will apply the @code{:exports results} header argument to the
12144evaluation of the @code{#+call:} line.
11578@example 12145@example
11579#+call: factorial(n=5) :exports results 12146#+call: factorial(n=5) :exports results
11580@end example 12147@end example
11581 12148
12149The following will apply the @code{:session special} header argument to the
12150evaluation of the @code{factorial} code block.
12151@example
12152#+call: factorial[:session special](n=5)
12153@end example
12154
11582@node Specific header arguments, , Using header arguments, Header arguments 12155@node Specific header arguments, , Using header arguments, Header arguments
11583@subsection Specific header arguments 12156@subsection Specific header arguments
11584The following header arguments are defined: 12157The following header arguments are defined:
@@ -11592,13 +12165,19 @@ The following header arguments are defined:
11592 directory for code block execution 12165 directory for code block execution
11593* exports:: Export code and/or results 12166* exports:: Export code and/or results
11594* tangle:: Toggle tangling and specify file name 12167* tangle:: Toggle tangling and specify file name
12168* mkdirp:: Toggle creation of parent directories of target
12169 files during tangling
11595* comments:: Toggle insertion of comments in tangled 12170* comments:: Toggle insertion of comments in tangled
11596 code files 12171 code files
12172* padline:: Control insertion of padding lines in tangled
12173 code files
11597* no-expand:: Turn off variable assignment and noweb 12174* no-expand:: Turn off variable assignment and noweb
11598 expansion during tangling 12175 expansion during tangling
11599* session:: Preserve the state of code evaluation 12176* session:: Preserve the state of code evaluation
11600* noweb:: Toggle expansion of noweb references 12177* noweb:: Toggle expansion of noweb references
12178* noweb-ref:: Specify block's noweb reference resolution target
11601* cache:: Avoid re-evaluating unchanged code blocks 12179* cache:: Avoid re-evaluating unchanged code blocks
12180* sep:: Delimiter for writing tabular results outside Org
11602* hlines:: Handle horizontal lines in tables 12181* hlines:: Handle horizontal lines in tables
11603* colnames:: Handle column names in tables 12182* colnames:: Handle column names in tables
11604* rownames:: Handle row names in tables 12183* rownames:: Handle row names in tables
@@ -11606,14 +12185,18 @@ The following header arguments are defined:
11606* eval:: Limit evaluation of specific code blocks 12185* eval:: Limit evaluation of specific code blocks
11607@end menu 12186@end menu
11608 12187
12188Additional header arguments are defined on a language-specific basis, see
12189@ref{Languages}.
12190
11609@node var, results, Specific header arguments, Specific header arguments 12191@node var, results, Specific header arguments, Specific header arguments
11610@subsubsection @code{:var} 12192@subsubsection @code{:var}
11611The @code{:var} header argument is used to pass arguments to code blocks. 12193The @code{:var} header argument is used to pass arguments to code blocks.
11612The specifics of how arguments are included in a code block vary by language; 12194The specifics of how arguments are included in a code block vary by language;
11613these are addressed in the language-specific documentation. However, the 12195these are addressed in the language-specific documentation. However, the
11614syntax used to specify arguments is the same across all languages. The 12196syntax used to specify arguments is the same across all languages. The
11615values passed to arguments can be literal values, values from org-mode tables 12197values passed to arguments can be literal values, values from org-mode tables
11616and literal example blocks, or the results of other code blocks. 12198and literal example blocks, the results of other code blocks, or Emacs Lisp
12199code---see the ``Emacs Lisp evaluation of variables'' heading below.
11617 12200
11618These values can be indexed in a manner similar to arrays---see the 12201These values can be indexed in a manner similar to arrays---see the
11619``indexable variable values'' heading below. 12202``indexable variable values'' heading below.
@@ -11701,7 +12284,9 @@ following the source name.
11701It is possible to reference portions of variable values by ``indexing'' into 12284It is possible to reference portions of variable values by ``indexing'' into
11702the variables. Indexes are 0 based with negative values counting back from 12285the variables. Indexes are 0 based with negative values counting back from
11703the end. If an index is separated by @code{,}s then each subsequent section 12286the end. If an index is separated by @code{,}s then each subsequent section
11704will index into the next deepest nesting or dimension of the value. The 12287will index into the next deepest nesting or dimension of the value. Note
12288that this indexing occurs @emph{before} other table related header arguments
12289like @code{:hlines}, @code{:colnames} and @code{:rownames} are applied. The
11705following example assigns the last cell of the first row the table 12290following example assigns the last cell of the first row the table
11706@code{example-table} to the variable @code{data}: 12291@code{example-table} to the variable @code{data}:
11707 12292
@@ -11783,6 +12368,39 @@ another by commas, as shown in the following example.
11783| 11 | 14 | 17 | 12368| 11 | 14 | 17 |
11784@end example 12369@end example
11785 12370
12371@subsubheading Emacs Lisp evaluation of variables
12372
12373Emacs lisp code can be used to initialize variable values. When a variable
12374value starts with @code{(}, @code{[}, @code{'} or @code{`} it will be evaluated as
12375Emacs Lisp and the result of the evaluation will be assigned as the variable
12376value. The following example demonstrates use of this evaluation to reliably
12377pass the file-name of the org-mode buffer to a code block---note that
12378evaluation of header arguments is guaranteed to take place in the original
12379org-mode file, while there is no such guarantee for evaluation of the code
12380block body.
12381
12382@example
12383#+begin_src sh :var filename=(buffer-file-name) :exports both
12384 wc -w $filename
12385#+end_src
12386@end example
12387
12388Note that values read from tables and lists will not be evaluated as
12389Emacs Lisp, as shown in the following example.
12390
12391@example
12392#+results: table
12393| (a b c) |
12394
12395#+headers: :var data=table[0,0]
12396#+begin_src perl
12397 $data
12398#+end_src
12399
12400#+results:
12401: (a b c)
12402@end example
12403
11786@node results, file, var, Specific header arguments 12404@node results, file, var, Specific header arguments
11787@subsubsection @code{:results} 12405@subsubsection @code{:results}
11788 12406
@@ -11812,7 +12430,7 @@ This is the default. The result is the value of the last statement in the
11812code block. This header argument places the evaluation in functional 12430code block. This header argument places the evaluation in functional
11813mode. Note that in some languages, e.g., Python, use of this result type 12431mode. Note that in some languages, e.g., Python, use of this result type
11814requires that a @code{return} statement be included in the body of the source 12432requires that a @code{return} statement be included in the body of the source
11815code block. E.g., @code{:results value}. 12433code block. E.g., @code{:results value}.
11816@item @code{output} 12434@item @code{output}
11817The result is the collection of everything printed to STDOUT during the 12435The result is the collection of everything printed to STDOUT during the
11818execution of the code block. This header argument places the 12436execution of the code block. This header argument places the
@@ -11857,6 +12475,10 @@ E.g., @code{:results value code}.
11857The result is converted to pretty-printed code and is enclosed in a code 12475The result is converted to pretty-printed code and is enclosed in a code
11858block. This option currently supports Emacs Lisp, Python, and Ruby. E.g., 12476block. This option currently supports Emacs Lisp, Python, and Ruby. E.g.,
11859@code{:results value pp}. 12477@code{:results value pp}.
12478@item @code{wrap}
12479The result is wrapped in a @code{begin_result} block. This can be useful for
12480inserting @code{raw} or @code{org} syntax results in such a way that their
12481extend is known and they can be automatically removed or replaced.
11860@end itemize 12482@end itemize
11861 12483
11862@subsubheading Handling 12484@subsubheading Handling
@@ -11884,32 +12506,32 @@ inserted as with @code{replace}.
11884@node file, dir, results, Specific header arguments 12506@node file, dir, results, Specific header arguments
11885@subsubsection @code{:file} 12507@subsubsection @code{:file}
11886 12508
11887The header argument @code{:file} is used to specify a path for file output. 12509The header argument @code{:file} is used to specify an external file in which
11888An Org-mode style @code{file:} link is inserted into the buffer as the result 12510to save code block results. After code block evaluation an Org-mode style
11889(see @ref{Link format}). Common examples are graphical output from R, 12511@code{[[file:]]} link (see @ref{Link format}) to the file will be inserted
11890gnuplot, ditaa and LaTeX code blocks. 12512into the Org-mode buffer. Some languages including R, gnuplot, dot, and
11891 12513ditaa provide special handling of the @code{:file} header argument
11892Note that for some languages, including R, gnuplot, LaTeX and ditaa, 12514automatically wrapping the code block body in the boilerplate code required
11893graphical output is sent to the specified file without the file being 12515to save output to the specified file. This is often useful for saving
11894referenced explicitly in the code block. See the documentation for the 12516graphical output of a code block to the specified file.
11895individual languages for details. In contrast, general purpose languages such
11896as Python and Ruby require that the code explicitly create output
11897corresponding to the path indicated by @code{:file}.
11898 12517
12518The argument to @code{:file} should be either a string specifying the path to
12519a file, or a list of two strings in which case the first element of the list
12520should be the path to a file and the second a description for the link.
11899 12521
11900@node dir, exports, file, Specific header arguments 12522@node dir, exports, file, Specific header arguments
11901@subsubsection @code{:dir} and remote execution 12523@subsubsection @code{:dir} and remote execution
11902 12524
11903While the @code{:file} header argument can be used to specify the path to the 12525While the @code{:file} header argument can be used to specify the path to the
11904output file, @code{:dir} specifies the default directory during code block 12526output file, @code{:dir} specifies the default directory during code block
11905execution. If it is absent, then the directory associated with the current 12527execution. If it is absent, then the directory associated with the current
11906buffer is used. In other words, supplying @code{:dir path} temporarily has 12528buffer is used. In other words, supplying @code{:dir path} temporarily has
11907the same effect as changing the current directory with @kbd{M-x cd path}, and 12529the same effect as changing the current directory with @kbd{M-x cd path}, and
11908then not supplying @code{:dir}. Under the surface, @code{:dir} simply sets 12530then not supplying @code{:dir}. Under the surface, @code{:dir} simply sets
11909the value of the Emacs variable @code{default-directory}. 12531the value of the Emacs variable @code{default-directory}.
11910 12532
11911When using @code{:dir}, you should supply a relative path for file output 12533When using @code{:dir}, you should supply a relative path for file output
11912(e.g. @code{:file myfile.jpg} or @code{:file results/myfile.jpg}) in which 12534(e.g.@: @code{:file myfile.jpg} or @code{:file results/myfile.jpg}) in which
11913case that path will be interpreted relative to the default directory. 12535case that path will be interpreted relative to the default directory.
11914 12536
11915In other words, if you want your plot to go into a folder called @file{Work} 12537In other words, if you want your plot to go into a folder called @file{Work}
@@ -11923,7 +12545,7 @@ matplot(matrix(rnorm(100), 10), type="l")
11923 12545
11924@subsubheading Remote execution 12546@subsubheading Remote execution
11925A directory on a remote machine can be specified using tramp file syntax, in 12547A directory on a remote machine can be specified using tramp file syntax, in
11926which case the code will be evaluated on the remote machine. An example is 12548which case the code will be evaluated on the remote machine. An example is
11927 12549
11928@example 12550@example
11929#+begin_src R :file plot.png :dir /dand@@yakuba.princeton.edu: 12551#+begin_src R :file plot.png :dir /dand@@yakuba.princeton.edu:
@@ -11933,7 +12555,7 @@ plot(1:10, main=system("hostname", intern=TRUE))
11933 12555
11934Text results will be returned to the local Org-mode buffer as usual, and file 12556Text results will be returned to the local Org-mode buffer as usual, and file
11935output will be created on the remote machine with relative paths interpreted 12557output will be created on the remote machine with relative paths interpreted
11936relative to the remote directory. An Org-mode link to the remote file will be 12558relative to the remote directory. An Org-mode link to the remote file will be
11937created. 12559created.
11938 12560
11939So, in the above example a plot will be created on the remote machine, 12561So, in the above example a plot will be created on the remote machine,
@@ -11945,7 +12567,7 @@ and a link of the following form will be inserted in the org buffer:
11945 12567
11946Most of this functionality follows immediately from the fact that @code{:dir} 12568Most of this functionality follows immediately from the fact that @code{:dir}
11947sets the value of the Emacs variable @code{default-directory}, thanks to 12569sets the value of the Emacs variable @code{default-directory}, thanks to
11948tramp. Those using XEmacs, or GNU Emacs prior to version 23 may need to 12570tramp. Those using XEmacs, or GNU Emacs prior to version 23 may need to
11949install tramp separately in order for these features to work correctly. 12571install tramp separately in order for these features to work correctly.
11950 12572
11951@subsubheading Further points 12573@subsubheading Further points
@@ -11957,10 +12579,10 @@ determine the starting directory for a new session as expected, no attempt is
11957currently made to alter the directory associated with an existing session. 12579currently made to alter the directory associated with an existing session.
11958@item 12580@item
11959@code{:dir} should typically not be used to create files during export with 12581@code{:dir} should typically not be used to create files during export with
11960@code{:exports results} or @code{:exports both}. The reason is that, in order 12582@code{:exports results} or @code{:exports both}. The reason is that, in order
11961to retain portability of exported material between machines, during export 12583to retain portability of exported material between machines, during export
11962links inserted into the buffer will *not* be expanded against @code{default 12584links inserted into the buffer will *not* be expanded against @code{default
11963directory}. Therefore, if @code{default-directory} is altered using 12585directory}. Therefore, if @code{default-directory} is altered using
11964@code{:dir}, it is probable that the file will be created in a location to 12586@code{:dir}, it is probable that the file will be created in a location to
11965which the link does not point. 12587which the link does not point.
11966@end itemize 12588@end itemize
@@ -11976,16 +12598,16 @@ or LaTeX exports of the Org-mode file.
11976The default. The body of code is included into the exported file. E.g., 12598The default. The body of code is included into the exported file. E.g.,
11977@code{:exports code}. 12599@code{:exports code}.
11978@item @code{results} 12600@item @code{results}
11979The result of evaluating the code is included in the exported file. E.g., 12601The result of evaluating the code is included in the exported file. E.g.,
11980@code{:exports results}. 12602@code{:exports results}.
11981@item @code{both} 12603@item @code{both}
11982Both the code and results are included in the exported file. E.g., 12604Both the code and results are included in the exported file. E.g.,
11983@code{:exports both}. 12605@code{:exports both}.
11984@item @code{none} 12606@item @code{none}
11985Nothing is included in the exported file. E.g., @code{:exports none}. 12607Nothing is included in the exported file. E.g., @code{:exports none}.
11986@end itemize 12608@end itemize
11987 12609
11988@node tangle, comments, exports, Specific header arguments 12610@node tangle, mkdirp, exports, Specific header arguments
11989@subsubsection @code{:tangle} 12611@subsubsection @code{:tangle}
11990 12612
11991The @code{:tangle} header argument specifies whether or not the code 12613The @code{:tangle} header argument specifies whether or not the code
@@ -11993,19 +12615,26 @@ block should be included in tangled extraction of source code files.
11993 12615
11994@itemize @bullet 12616@itemize @bullet
11995@item @code{tangle} 12617@item @code{tangle}
11996The code block is exported to a source code file named after the 12618The code block is exported to a source code file named after the full path
11997basename (name w/o extension) of the Org-mode file. E.g., @code{:tangle 12619(including the directory) and file name (w/o extension) of the Org-mode file.
11998yes}. 12620E.g., @code{:tangle yes}.
11999@item @code{no} 12621@item @code{no}
12000The default. The code block is not exported to a source code file. 12622The default. The code block is not exported to a source code file.
12001E.g., @code{:tangle no}. 12623E.g., @code{:tangle no}.
12002@item other 12624@item other
12003Any other string passed to the @code{:tangle} header argument is interpreted 12625Any other string passed to the @code{:tangle} header argument is interpreted
12004as a file basename to which the block will be exported. E.g., @code{:tangle 12626as a path (directory and file name relative to the directory of the Org-mode
12005basename}. 12627file) to which the block will be exported. E.g., @code{:tangle path}.
12006@end itemize 12628@end itemize
12007 12629
12008@node comments, no-expand, tangle, Specific header arguments 12630@node mkdirp, comments, tangle, Specific header arguments
12631@subsubsection @code{:mkdirp}
12632
12633The @code{:mkdirp} header argument can be used to create parent directories
12634of tangled files when missing. This can be set to @code{yes} to enable
12635directory creation or to @code{no} to inhibit directory creation.
12636
12637@node comments, padline, mkdirp, Specific header arguments
12009@subsubsection @code{:comments} 12638@subsubsection @code{:comments}
12010By default code blocks are tangled to source-code files without any insertion 12639By default code blocks are tangled to source-code files without any insertion
12011of comments beyond those which may already exist in the body of the code 12640of comments beyond those which may already exist in the body of the code
@@ -12027,9 +12656,26 @@ The text is picked from the leading context of the tangled code and is
12027limited by the nearest headline or source block as the case may be. 12656limited by the nearest headline or source block as the case may be.
12028@item @code{both} 12657@item @code{both}
12029Turns on both the ``link'' and ``org'' comment options. 12658Turns on both the ``link'' and ``org'' comment options.
12659@item @code{noweb}
12660Turns on the ``link'' comment option, and additionally wraps expanded noweb
12661references in the code block body in link comments.
12030@end itemize 12662@end itemize
12031 12663
12032@node no-expand, session, comments, Specific header arguments 12664@node padline, no-expand, comments, Specific header arguments
12665@subsubsection @code{:padline}
12666Control in insertion of padding lines around code block bodies in tangled
12667code files. The default value is @code{yes} which results in insertion of
12668newlines before and after each tangled code block. The following arguments
12669are accepted.
12670
12671@itemize @bullet
12672@item @code{yes}
12673Insert newlines before and after each code block body in tangled code files.
12674@item @code{no}
12675Do not insert any newline padding in tangled output.
12676@end itemize
12677
12678@node no-expand, session, padline, Specific header arguments
12033@subsubsection @code{:no-expand} 12679@subsubsection @code{:no-expand}
12034 12680
12035By default, code blocks are expanded with @code{org-babel-expand-src-block} 12681By default, code blocks are expanded with @code{org-babel-expand-src-block}
@@ -12050,12 +12696,12 @@ A string passed to the @code{:session} header argument will give the session
12050a name. This makes it possible to run concurrent sessions for each 12696a name. This makes it possible to run concurrent sessions for each
12051interpreted language. 12697interpreted language.
12052 12698
12053@node noweb, cache, session, Specific header arguments 12699@node noweb, noweb-ref, session, Specific header arguments
12054@subsubsection @code{:noweb} 12700@subsubsection @code{:noweb}
12055 12701
12056The @code{:noweb} header argument controls expansion of ``noweb'' style (see 12702The @code{:noweb} header argument controls expansion of ``noweb'' style (see
12057@ref{Noweb reference syntax}) references in a code block. This header 12703@ref{Noweb reference syntax}) references in a code block. This header
12058argument can have one of three values: @code{yes} @code{no} or @code{tangle}. 12704argument can have one of three values: @code{yes}, @code{no}, or @code{tangle}.
12059 12705
12060@itemize @bullet 12706@itemize @bullet
12061@item @code{yes} 12707@item @code{yes}
@@ -12096,7 +12742,49 @@ Note that noweb replacement text that does not contain any newlines will not
12096be affected by this change, so it is still possible to use inline noweb 12742be affected by this change, so it is still possible to use inline noweb
12097references. 12743references.
12098 12744
12099@node cache, hlines, noweb, Specific header arguments 12745@node noweb-ref, cache, noweb, Specific header arguments
12746@subsubsection @code{:noweb-ref}
12747When expanding ``noweb'' style references the bodies of all code block with
12748@emph{either} a block name matching the reference name @emph{or} a
12749@code{:noweb-ref} header argument matching the reference name will be
12750concatenated together to form the replacement text.
12751
12752By setting this header argument at the sub-tree or file level, simple code
12753block concatenation may be achieved. For example, when tangling the
12754following Org-mode file, the bodies of code blocks will be concatenated into
12755the resulting pure code file.
12756
12757@example
12758 #+begin_src sh :tangle yes :noweb yes :shebang #!/bin/sh
12759 <<fullest-disk>>
12760 #+end_src
12761 * the mount point of the fullest disk
12762 :PROPERTIES:
12763 :noweb-ref: fullest-disk
12764 :END:
12765
12766 ** query all mounted disks
12767 #+begin_src sh
12768 df \
12769 #+end_src
12770
12771 ** strip the header row
12772 #+begin_src sh
12773 |sed '1d' \
12774 #+end_src
12775
12776 ** sort by the percent full
12777 #+begin_src sh
12778 |awk '@{print $5 " " $6@}'|sort -n |tail -1 \
12779 #+end_src
12780
12781 ** extract the mount point
12782 #+begin_src sh
12783 |awk '@{print $2@}'
12784 #+end_src
12785@end example
12786
12787@node cache, sep, noweb-ref, Specific header arguments
12100@subsubsection @code{:cache} 12788@subsubsection @code{:cache}
12101 12789
12102The @code{:cache} header argument controls the use of in-buffer caching of 12790The @code{:cache} header argument controls the use of in-buffer caching of
@@ -12116,7 +12804,44 @@ executions of the code block. If the code block has not
12116changed since the last time it was evaluated, it will not be re-evaluated. 12804changed since the last time it was evaluated, it will not be re-evaluated.
12117@end itemize 12805@end itemize
12118 12806
12119@node hlines, colnames, cache, Specific header arguments 12807Code block caches notice if the value of a variable argument
12808to the code block has changed. If this is the case, the cache is
12809invalidated and the code block is re-run. In the following example,
12810@code{caller} will not be re-run unless the results of @code{random} have
12811changed since it was last run.
12812
12813@example
12814 #+srcname: random
12815 #+begin_src R :cache yes
12816 runif(1)
12817 #+end_src
12818
12819 #+results[a2a72cd647ad44515fab62e144796432793d68e1]: random
12820 0.4659510825295
12821
12822 #+srcname: caller
12823 #+begin_src emacs-lisp :var x=random :cache yes
12824 x
12825 #+end_src
12826
12827 #+results[bec9c8724e397d5df3b696502df3ed7892fc4f5f]: caller
12828 0.254227238707244
12829@end example
12830
12831@node sep, hlines, cache, Specific header arguments
12832@subsubsection @code{:sep}
12833
12834The @code{:sep} header argument can be used to control the delimiter used
12835when writing tabular results out to files external to Org-mode. This is used
12836either when opening tabular results of a code block by calling the
12837@code{org-open-at-point} function bound to @kbd{C-c C-o} on the code block,
12838or when writing code block results to an external file (see @ref{file})
12839header argument.
12840
12841By default, when @code{:sep} is not specified output tables are tab
12842delimited.
12843
12844@node hlines, colnames, sep, Specific header arguments
12120@subsubsection @code{:hlines} 12845@subsubsection @code{:hlines}
12121 12846
12122Tables are frequently represented with one or more horizontal lines, or 12847Tables are frequently represented with one or more horizontal lines, or
@@ -12150,7 +12875,7 @@ default value yields the following results.
12150@end example 12875@end example
12151 12876
12152@item @code{yes} 12877@item @code{yes}
12153Leaves hlines in the table. Setting @code{:hlines yes} has this effect. 12878Leaves hlines in the table. Setting @code{:hlines yes} has this effect.
12154 12879
12155@example 12880@example
12156#+tblname: many-cols 12881#+tblname: many-cols
@@ -12206,12 +12931,15 @@ processing, then reapplied to the results.
12206| c* | 12931| c* |
12207@end example 12932@end example
12208 12933
12934Please note that column names are not removed before the table is indexed
12935using variable indexing @xref{var, Indexable variable values}.
12936
12209@item @code{no} 12937@item @code{no}
12210No column name pre-processing takes place 12938No column name pre-processing takes place
12211 12939
12212@item @code{yes} 12940@item @code{yes}
12213Column names are removed and reapplied as with @code{nil} even if the table 12941Column names are removed and reapplied as with @code{nil} even if the table
12214does not ``look like'' it has column names (i.e. the second row is not an 12942does not ``look like'' it has column names (i.e.@: the second row is not an
12215hline) 12943hline)
12216@end itemize 12944@end itemize
12217 12945
@@ -12243,13 +12971,17 @@ and is then reapplied to the results.
12243| one | 11 | 12 | 13 | 14 | 15 | 12971| one | 11 | 12 | 13 | 14 | 15 |
12244| two | 16 | 17 | 18 | 19 | 20 | 12972| two | 16 | 17 | 18 | 19 | 20 |
12245@end example 12973@end example
12974
12975Please note that row names are not removed before the table is indexed using
12976variable indexing @xref{var, Indexable variable values}.
12977
12246@end itemize 12978@end itemize
12247 12979
12248@node shebang, eval, rownames, Specific header arguments 12980@node shebang, eval, rownames, Specific header arguments
12249@subsubsection @code{:shebang} 12981@subsubsection @code{:shebang}
12250 12982
12251Setting the @code{:shebang} header argument to a string value 12983Setting the @code{:shebang} header argument to a string value
12252(e.g. @code{:shebang "#!/bin/bash"}) causes the string to be inserted as the 12984(e.g.@: @code{:shebang "#!/bin/bash"}) causes the string to be inserted as the
12253first line of any tangled file holding the code block, and the file 12985first line of any tangled file holding the code block, and the file
12254permissions of the tangled file are set to make it executable. 12986permissions of the tangled file are set to make it executable.
12255 12987
@@ -12263,6 +12995,10 @@ dangerous code blocks. @code{:eval query} will require a query for every
12263execution of a code block regardless of the value of the 12995execution of a code block regardless of the value of the
12264@code{org-confirm-babel-evaluate} variable. 12996@code{org-confirm-babel-evaluate} variable.
12265 12997
12998If this header argument is not set then evaluation is determined by the value
12999of the @code{org-confirm-babel-evaluate} variable see @ref{Code evaluation
13000security}.
13001
12266@node Results of evaluation, Noweb reference syntax, Header arguments, Working With Source Code 13002@node Results of evaluation, Noweb reference syntax, Header arguments, Working With Source Code
12267@section Results of evaluation 13003@section Results of evaluation
12268@cindex code block, results of evaluation 13004@cindex code block, results of evaluation
@@ -12270,7 +13006,8 @@ execution of a code block regardless of the value of the
12270 13006
12271The way in which results are handled depends on whether a session is invoked, 13007The way in which results are handled depends on whether a session is invoked,
12272as well as on whether @code{:results value} or @code{:results output} is 13008as well as on whether @code{:results value} or @code{:results output} is
12273used. The following table shows the possibilities: 13009used. The following table shows the table possibilities. For a full listing
13010of the possible results header arguments see @ref{results}.
12274 13011
12275@multitable @columnfractions 0.26 0.33 0.41 13012@multitable @columnfractions 0.26 0.33 0.41
12276@item @tab @b{Non-session} @tab @b{Session} 13013@item @tab @b{Non-session} @tab @b{Session}
@@ -12284,10 +13021,10 @@ vector of strings or numbers) when appropriate.
12284 13021
12285@subsection Non-session 13022@subsection Non-session
12286@subsubsection @code{:results value} 13023@subsubsection @code{:results value}
12287This is the default. Internally, the value is obtained by wrapping the code 13024This is the default. Internally, the value is obtained by wrapping the code
12288in a function definition in the external language, and evaluating that 13025in a function definition in the external language, and evaluating that
12289function. Therefore, code should be written as if it were the body of such a 13026function. Therefore, code should be written as if it were the body of such a
12290function. In particular, note that Python does not automatically return a 13027function. In particular, note that Python does not automatically return a
12291value from a function unless a @code{return} statement is present, and so a 13028value from a function unless a @code{return} statement is present, and so a
12292@samp{return} statement will usually be required in Python. 13029@samp{return} statement will usually be required in Python.
12293 13030
@@ -12296,25 +13033,33 @@ automatically wrapped in a function definition.
12296 13033
12297@subsubsection @code{:results output} 13034@subsubsection @code{:results output}
12298The code is passed to the interpreter as an external process, and the 13035The code is passed to the interpreter as an external process, and the
12299contents of the standard output stream are returned as text. (In certain 13036contents of the standard output stream are returned as text. (In certain
12300languages this also contains the error output stream; this is an area for 13037languages this also contains the error output stream; this is an area for
12301future work.) 13038future work.)
12302 13039
12303@subsection Session 13040@subsection Session
12304@subsubsection @code{:results value} 13041@subsubsection @code{:results value}
12305The code is passed to the interpreter running as an interactive Emacs 13042The code is passed to an interpreter running as an interactive Emacs inferior
12306inferior process. The result returned is the result of the last evaluation 13043process. Only languages which provide tools for interactive evaluation of
12307performed by the interpreter. (This is obtained in a language-specific 13044code have session support, so some language (e.g., C and ditaa) do not
12308manner: the value of the variable @code{_} in Python and Ruby, and the value 13045support the @code{:session} header argument, and in other languages (e.g.,
12309of @code{.Last.value} in R). 13046Python and Haskell) which have limitations on the code which may be entered
13047into interactive sessions, those limitations apply to the code in code blocks
13048using the @code{:session} header argument as well.
13049
13050Unless the @code{:results output} option is supplied (see below) the result
13051returned is the result of the last evaluation performed by the
13052interpreter. (This is obtained in a language-specific manner: the value of
13053the variable @code{_} in Python and Ruby, and the value of @code{.Last.value}
13054in R).
12310 13055
12311@subsubsection @code{:results output} 13056@subsubsection @code{:results output}
12312The code is passed to the interpreter running as an interactive Emacs 13057The code is passed to the interpreter running as an interactive Emacs
12313inferior process. The result returned is the concatenation of the sequence of 13058inferior process. The result returned is the concatenation of the sequence of
12314(text) output from the interactive interpreter. Notice that this is not 13059(text) output from the interactive interpreter. Notice that this is not
12315necessarily the same as what would be sent to @code{STDOUT} if the same code 13060necessarily the same as what would be sent to @code{STDOUT} if the same code
12316were passed to a non-interactive interpreter running as an external 13061were passed to a non-interactive interpreter running as an external
12317process. For example, compare the following two blocks: 13062process. For example, compare the following two blocks:
12318 13063
12319@example 13064@example
12320#+begin_src python :results output 13065#+begin_src python :results output
@@ -12343,7 +13088,7 @@ In non-session mode, the `2' is not printed and does not appear.
12343@end example 13088@end example
12344 13089
12345But in @code{:session} mode, the interactive interpreter receives input `2' 13090But in @code{:session} mode, the interactive interpreter receives input `2'
12346and prints out its value, `2'. (Indeed, the other print statements are 13091and prints out its value, `2'. (Indeed, the other print statements are
12347unnecessary here). 13092unnecessary here).
12348 13093
12349@node Noweb reference syntax, Key bindings and useful functions, Results of evaluation, Working With Source Code 13094@node Noweb reference syntax, Key bindings and useful functions, Results of evaluation, Working With Source Code
@@ -12384,13 +13129,13 @@ are active:
12384 13129
12385@multitable @columnfractions 0.25 0.75 13130@multitable @columnfractions 0.25 0.75
12386@kindex C-c C-c 13131@kindex C-c C-c
12387@item @kbd{C-c C-c} @tab org-babel-execute-src-block 13132@item @kbd{C-c C-c} @tab @code{org-babel-execute-src-block}
12388@kindex C-c C-o 13133@kindex C-c C-o
12389@item @kbd{C-c C-o} @tab org-babel-open-src-block-result 13134@item @kbd{C-c C-o} @tab @code{org-babel-open-src-block-result}
12390@kindex C-up 13135@kindex C-up
12391@item @kbd{C-@key{up}} @tab org-babel-load-in-session 13136@item @kbd{C-@key{up}} @tab @code{org-babel-load-in-session}
12392@kindex M-down 13137@kindex M-down
12393@item @kbd{M-@key{down}} @tab org-babel-pop-to-session 13138@item @kbd{M-@key{down}} @tab @code{org-babel-pop-to-session}
12394@end multitable 13139@end multitable
12395 13140
12396In an Org-mode buffer, the following key bindings are active: 13141In an Org-mode buffer, the following key bindings are active:
@@ -12398,46 +13143,46 @@ In an Org-mode buffer, the following key bindings are active:
12398@multitable @columnfractions 0.45 0.55 13143@multitable @columnfractions 0.45 0.55
12399@kindex C-c C-v a 13144@kindex C-c C-v a
12400@kindex C-c C-v C-a 13145@kindex C-c C-v C-a
12401@item @kbd{C-c C-v a} @ @ @r{or} @ @ @kbd{C-c C-v C-a} @tab org-babel-sha1-hash 13146@item @kbd{C-c C-v a} @ @ @r{or} @ @ @kbd{C-c C-v C-a} @tab @code{org-babel-sha1-hash}
12402@kindex C-c C-v b 13147@kindex C-c C-v b
12403@kindex C-c C-v C-b 13148@kindex C-c C-v C-b
12404@item @kbd{C-c C-v b} @ @ @r{or} @ @ @kbd{C-c C-v C-b} @tab org-babel-execute-buffer 13149@item @kbd{C-c C-v b} @ @ @r{or} @ @ @kbd{C-c C-v C-b} @tab @code{org-babel-execute-buffer}
12405@kindex C-c C-v f 13150@kindex C-c C-v f
12406@kindex C-c C-v C-f 13151@kindex C-c C-v C-f
12407@item @kbd{C-c C-v f} @ @ @r{or} @ @ @kbd{C-c C-v C-f} @tab org-babel-tangle-file 13152@item @kbd{C-c C-v f} @ @ @r{or} @ @ @kbd{C-c C-v C-f} @tab @code{org-babel-tangle-file}
12408@kindex C-c C-v g 13153@kindex C-c C-v g
12409@item @kbd{C-c C-v g} @tab org-babel-goto-named-source-block 13154@item @kbd{C-c C-v g} @tab @code{org-babel-goto-named-source-block}
12410@kindex C-c C-v h 13155@kindex C-c C-v h
12411@item @kbd{C-c C-v h} @tab org-babel-describe-bindings 13156@item @kbd{C-c C-v h} @tab @code{org-babel-describe-bindings}
12412@kindex C-c C-v l 13157@kindex C-c C-v l
12413@kindex C-c C-v C-l 13158@kindex C-c C-v C-l
12414@item @kbd{C-c C-v l} @ @ @r{or} @ @ @kbd{C-c C-v C-l} @tab org-babel-lob-ingest 13159@item @kbd{C-c C-v l} @ @ @r{or} @ @ @kbd{C-c C-v C-l} @tab @code{org-babel-lob-ingest}
12415@kindex C-c C-v p 13160@kindex C-c C-v p
12416@kindex C-c C-v C-p 13161@kindex C-c C-v C-p
12417@item @kbd{C-c C-v p} @ @ @r{or} @ @ @kbd{C-c C-v C-p} @tab org-babel-expand-src-block 13162@item @kbd{C-c C-v p} @ @ @r{or} @ @ @kbd{C-c C-v C-p} @tab @code{org-babel-expand-src-block}
12418@kindex C-c C-v s 13163@kindex C-c C-v s
12419@kindex C-c C-v C-s 13164@kindex C-c C-v C-s
12420@item @kbd{C-c C-v s} @ @ @r{or} @ @ @kbd{C-c C-v C-s} @tab org-babel-execute-subtree 13165@item @kbd{C-c C-v s} @ @ @r{or} @ @ @kbd{C-c C-v C-s} @tab @code{org-babel-execute-subtree}
12421@kindex C-c C-v t 13166@kindex C-c C-v t
12422@kindex C-c C-v C-t 13167@kindex C-c C-v C-t
12423@item @kbd{C-c C-v t} @ @ @r{or} @ @ @kbd{C-c C-v C-t} @tab org-babel-tangle 13168@item @kbd{C-c C-v t} @ @ @r{or} @ @ @kbd{C-c C-v C-t} @tab @code{org-babel-tangle}
12424@kindex C-c C-v z 13169@kindex C-c C-v z
12425@kindex C-c C-v C-z 13170@kindex C-c C-v C-z
12426@item @kbd{C-c C-v z} @ @ @r{or} @ @ @kbd{C-c C-v C-z} @tab org-babel-switch-to-session 13171@item @kbd{C-c C-v z} @ @ @r{or} @ @ @kbd{C-c C-v C-z} @tab @code{org-babel-switch-to-session}
12427@end multitable 13172@end multitable
12428 13173
12429@c When possible these keybindings were extended to work when the control key is 13174@c When possible these keybindings were extended to work when the control key is
12430@c kept pressed, resulting in the following additional keybindings. 13175@c kept pressed, resulting in the following additional keybindings.
12431 13176
12432@c @multitable @columnfractions 0.25 0.75 13177@c @multitable @columnfractions 0.25 0.75
12433@c @item @kbd{C-c C-v C-a} @tab org-babel-sha1-hash 13178@c @item @kbd{C-c C-v C-a} @tab @code{org-babel-sha1-hash}
12434@c @item @kbd{C-c C-v C-b} @tab org-babel-execute-buffer 13179@c @item @kbd{C-c C-v C-b} @tab @code{org-babel-execute-buffer}
12435@c @item @kbd{C-c C-v C-f} @tab org-babel-tangle-file 13180@c @item @kbd{C-c C-v C-f} @tab @code{org-babel-tangle-file}
12436@c @item @kbd{C-c C-v C-l} @tab org-babel-lob-ingest 13181@c @item @kbd{C-c C-v C-l} @tab @code{org-babel-lob-ingest}
12437@c @item @kbd{C-c C-v C-p} @tab org-babel-expand-src-block 13182@c @item @kbd{C-c C-v C-p} @tab @code{org-babel-expand-src-block}
12438@c @item @kbd{C-c C-v C-s} @tab org-babel-execute-subtree 13183@c @item @kbd{C-c C-v C-s} @tab @code{org-babel-execute-subtree}
12439@c @item @kbd{C-c C-v C-t} @tab org-babel-tangle 13184@c @item @kbd{C-c C-v C-t} @tab @code{org-babel-tangle}
12440@c @item @kbd{C-c C-v C-z} @tab org-babel-switch-to-session 13185@c @item @kbd{C-c C-v C-z} @tab @code{org-babel-switch-to-session}
12441@c @end multitable 13186@c @end multitable
12442 13187
12443@node Batch execution, , Key bindings and useful functions, Working With Source Code 13188@node Batch execution, , Key bindings and useful functions, Working With Source Code
@@ -12490,6 +13235,7 @@ emacs -Q --batch -l $ORGINSTALL \
12490* Clean view:: Getting rid of leading stars in the outline 13235* Clean view:: Getting rid of leading stars in the outline
12491* TTY keys:: Using Org on a tty 13236* TTY keys:: Using Org on a tty
12492* Interaction:: Other Emacs packages 13237* Interaction:: Other Emacs packages
13238* org-crypt.el:: Encrypting Org files
12493@end menu 13239@end menu
12494 13240
12495 13241
@@ -12549,7 +13295,7 @@ option keyword is already complete, pressing @kbd{M-@key{TAB}} again
12549will insert example settings for this keyword. 13295will insert example settings for this keyword.
12550@item 13296@item
12551In the line after @samp{#+STARTUP: }, complete startup keywords, 13297In the line after @samp{#+STARTUP: }, complete startup keywords,
12552i.e. valid keys for this line. 13298i.e.@: valid keys for this line.
12553@item 13299@item
12554Elsewhere, complete dictionary words using Ispell. 13300Elsewhere, complete dictionary words using Ispell.
12555@end itemize 13301@end itemize
@@ -12584,14 +13330,15 @@ The following template selectors are currently supported.
12584@item @kbd{H} @tab @code{#+html:} 13330@item @kbd{H} @tab @code{#+html:}
12585@item @kbd{a} @tab @code{#+begin_ascii ... #+end_ascii} 13331@item @kbd{a} @tab @code{#+begin_ascii ... #+end_ascii}
12586@item @kbd{A} @tab @code{#+ascii:} 13332@item @kbd{A} @tab @code{#+ascii:}
12587@item @kbd{i} @tab @code{#+include:} line 13333@item @kbd{i} @tab @code{#+index:} line
13334@item @kbd{I} @tab @code{#+include:} line
12588@end multitable 13335@end multitable
12589 13336
12590For example, on an empty line, typing "<e" and then pressing TAB, will expand 13337For example, on an empty line, typing "<e" and then pressing TAB, will expand
12591into a complete EXAMPLE template. 13338into a complete EXAMPLE template.
12592 13339
12593You can install additional templates by customizing the variable 13340You can install additional templates by customizing the variable
12594@code{org-structure-template-alist}. See the docstring of the variable for 13341@code{org-structure-template-alist}. See the docstring of the variable for
12595additional details. 13342additional details.
12596 13343
12597@node Speed keys, Code evaluation security, Easy Templates, Miscellaneous 13344@node Speed keys, Code evaluation security, Easy Templates, Miscellaneous
@@ -12601,7 +13348,7 @@ additional details.
12601@vindex org-speed-commands-user 13348@vindex org-speed-commands-user
12602 13349
12603Single keys can be made to execute commands when the cursor is at the 13350Single keys can be made to execute commands when the cursor is at the
12604beginning of a headline, i.e. before the first star. Configure the variable 13351beginning of a headline, i.e.@: before the first star. Configure the variable
12605@code{org-use-speed-commands} to activate this feature. There is a 13352@code{org-use-speed-commands} to activate this feature. There is a
12606pre-defined list of commands, and you can add more such commands using the 13353pre-defined list of commands, and you can add more such commands using the
12607variable @code{org-speed-commands-user}. Speed keys do not only speed up 13354variable @code{org-speed-commands-user}. Speed keys do not only speed up
@@ -12641,9 +13388,20 @@ Make sure you know what you are doing before customizing the variables
12641which take off the default security brakes. 13388which take off the default security brakes.
12642 13389
12643@defopt org-confirm-babel-evaluate 13390@defopt org-confirm-babel-evaluate
12644When set to t user is queried before code block evaluation 13391When t (the default), the user is asked before every code block evaluation.
13392When nil, the user is not asked. When set to a function, it is called with
13393two arguments (language and body of the code block) and should return t to
13394ask and nil not to ask.
12645@end defopt 13395@end defopt
12646 13396
13397For example, here is how to execute "ditaa" code (which is considered safe)
13398without asking:
13399@example
13400(defun my-org-confirm-babel-evaluate (lang body)
13401 (not (string= lang "ditaa"))) ; don't ask for ditaa
13402(setq org-confirm-babel-evaluate 'my-org-confirm-babel-evaluate)
13403@end example
13404
12647@item Following @code{shell} and @code{elisp} links 13405@item Following @code{shell} and @code{elisp} links
12648Org has two link types that can directly evaluate code (@pxref{External 13406Org has two link types that can directly evaluate code (@pxref{External
12649links}). These links can be problematic because the code to be evaluated is 13407links}). These links can be problematic because the code to be evaluated is
@@ -12739,7 +13497,7 @@ buffer, most useful for specifying the allowed values of a property.
12739@item #+SETUPFILE: file 13497@item #+SETUPFILE: file
12740This line defines a file that holds more in-buffer setup. Normally this is 13498This line defines a file that holds more in-buffer setup. Normally this is
12741entirely ignored. Only when the buffer is parsed for option-setting lines 13499entirely ignored. Only when the buffer is parsed for option-setting lines
12742(i.e. when starting Org-mode for a file, when pressing @kbd{C-c C-c} in a 13500(i.e.@: when starting Org-mode for a file, when pressing @kbd{C-c C-c} in a
12743settings line, or when exporting), then the contents of this file are parsed 13501settings line, or when exporting), then the contents of this file are parsed
12744as if they had been included in the buffer. In particular, the file can be 13502as if they had been included in the buffer. In particular, the file can be
12745any other Org-mode file with internal setup. You can visit the file the 13503any other Org-mode file with internal setup. You can visit the file the
@@ -12896,14 +13654,14 @@ fninline @r{define footnotes inline}
12896fnnoinline @r{define footnotes in separate section} 13654fnnoinline @r{define footnotes in separate section}
12897fnlocal @r{define footnotes near first reference, but not inline} 13655fnlocal @r{define footnotes near first reference, but not inline}
12898fnprompt @r{prompt for footnote labels} 13656fnprompt @r{prompt for footnote labels}
12899fnauto @r{create [fn:1]-like labels automatically (default)} 13657fnauto @r{create @code{[fn:1]}-like labels automatically (default)}
12900fnconfirm @r{offer automatic label for editing or confirmation} 13658fnconfirm @r{offer automatic label for editing or confirmation}
12901fnplain @r{create [1]-like labels automatically} 13659fnplain @r{create @code{[1]}-like labels automatically}
12902fnadjust @r{automatically renumber and sort footnotes} 13660fnadjust @r{automatically renumber and sort footnotes}
12903nofnadjust @r{do not renumber and sort automatically} 13661nofnadjust @r{do not renumber and sort automatically}
12904@end example 13662@end example
12905@cindex org-hide-block-startup 13663@cindex org-hide-block-startup
12906To hide blocks on startup, use these keywords. The corresponding variable is 13664To hide blocks on startup, use these keywords. The corresponding variable is
12907@code{org-hide-block-startup}. 13665@code{org-hide-block-startup}.
12908@cindex @code{hideblocks}, STARTUP keyword 13666@cindex @code{hideblocks}, STARTUP keyword
12909@cindex @code{nohideblocks}, STARTUP keyword 13667@cindex @code{nohideblocks}, STARTUP keyword
@@ -13155,7 +13913,7 @@ tty you would rather use @kbd{C-c .} to re-insert the timestamp.
13155@end multitable 13913@end multitable
13156 13914
13157 13915
13158@node Interaction, , TTY keys, Miscellaneous 13916@node Interaction, org-crypt.el, TTY keys, Miscellaneous
13159@section Interaction with other packages 13917@section Interaction with other packages
13160@cindex packages, interaction with other 13918@cindex packages, interaction with other
13161Org lives in the world of GNU Emacs and interacts in various ways 13919Org lives in the world of GNU Emacs and interacts in various ways
@@ -13179,7 +13937,7 @@ checks for the availability of Calc by looking for the function
13179@code{calc-eval} which will have been autoloaded during setup if Calc has 13937@code{calc-eval} which will have been autoloaded during setup if Calc has
13180been installed properly. As of Emacs 22, Calc is part of the Emacs 13938been installed properly. As of Emacs 22, Calc is part of the Emacs
13181distribution. Another possibility for interaction between the two 13939distribution. Another possibility for interaction between the two
13182packages is using Calc for embedded calculations. @xref{Embedded Mode, 13940packages is using Calc for embedded calculations. @xref{Embedded Mode,
13183, Embedded Mode, Calc, GNU Emacs Calc Manual}. 13941, Embedded Mode, Calc, GNU Emacs Calc Manual}.
13184@item @file{constants.el} by Carsten Dominik 13942@item @file{constants.el} by Carsten Dominik
13185@cindex @file{constants.el} 13943@cindex @file{constants.el}
@@ -13191,7 +13949,7 @@ constants in the variable @code{org-table-formula-constants}, install
13191the @file{constants} package which defines a large number of constants 13949the @file{constants} package which defines a large number of constants
13192and units, and lets you use unit prefixes like @samp{M} for 13950and units, and lets you use unit prefixes like @samp{M} for
13193@samp{Mega}, etc@. You will need version 2.0 of this package, available 13951@samp{Mega}, etc@. You will need version 2.0 of this package, available
13194at @url{http://www.astro.uva.nl/~dominik/Tools}. Org checks for 13952at @url{http://www.astro.uva.nl/~dominik/Tools}. Org checks for
13195the function @code{constants-get}, which has to be autoloaded in your 13953the function @code{constants-get}, which has to be autoloaded in your
13196setup. See the installation instructions in the file 13954setup. See the installation instructions in the file
13197@file{constants.el}. 13955@file{constants.el}.
@@ -13291,9 +14049,9 @@ Org will move the following key bindings in Org files, and in the agenda
13291buffer (but not during date selection). 14049buffer (but not during date selection).
13292 14050
13293@example 14051@example
13294S-UP -> M-p S-DOWN -> M-n 14052S-UP @result{} M-p S-DOWN @result{} M-n
13295S-LEFT -> M-- S-RIGHT -> M-+ 14053S-LEFT @result{} M-- S-RIGHT @result{} M-+
13296C-S-LEFT -> M-S-- C-S-RIGHT -> M-S-+ 14054C-S-LEFT @result{} M-S-- C-S-RIGHT @result{} M-S-+
13297@end example 14055@end example
13298 14056
13299@vindex org-disputed-keys 14057@vindex org-disputed-keys
@@ -13303,7 +14061,7 @@ to have other replacement keys, look at the variable
13303 14061
13304@item @file{yasnippet.el} 14062@item @file{yasnippet.el}
13305@cindex @file{yasnippet.el} 14063@cindex @file{yasnippet.el}
13306The way Org-mode binds the TAB key (binding to @code{[tab]} instead of 14064The way Org mode binds the TAB key (binding to @code{[tab]} instead of
13307@code{"\t"}) overrules YASnippet's access to this key. The following code 14065@code{"\t"}) overrules YASnippet's access to this key. The following code
13308fixed this problem: 14066fixed this problem:
13309 14067
@@ -13314,6 +14072,26 @@ fixed this problem:
13314 (define-key yas/keymap [tab] 'yas/next-field-group))) 14072 (define-key yas/keymap [tab] 'yas/next-field-group)))
13315@end lisp 14073@end lisp
13316 14074
14075The latest version of yasnippet doesn't play well with Org mode. If the
14076above code does not fix the conflict, start by defining the following
14077function:
14078
14079@lisp
14080(defun yas/org-very-safe-expand ()
14081 (let ((yas/fallback-behavior 'return-nil)) (yas/expand)))
14082@end lisp
14083
14084Then, tell Org mode what to do with the new function:
14085
14086@lisp
14087(add-hook 'org-mode-hook
14088 (lambda ()
14089 (make-variable-buffer-local 'yas/trigger-key)
14090 (setq yas/trigger-key [tab])
14091 (add-to-list 'org-tab-first-hook 'yas/org-very-safe-expand)
14092 (define-key yas/keymap [tab] 'yas/next-field)))
14093@end lisp
14094
13317@item @file{windmove.el} by Hovav Shacham 14095@item @file{windmove.el} by Hovav Shacham
13318@cindex @file{windmove.el} 14096@cindex @file{windmove.el}
13319This package also uses the @kbd{S-<cursor>} keys, so everything written 14097This package also uses the @kbd{S-<cursor>} keys, so everything written
@@ -13344,6 +14122,44 @@ another key for this command, or override the key in
13344 14122
13345@end table 14123@end table
13346 14124
14125@node org-crypt.el, , Interaction, Miscellaneous
14126@section org-crypt.el
14127@cindex @file{org-crypt.el}
14128@cindex @code{org-decrypt-entry}
14129
14130Org-crypt will encrypt the text of an entry, but not the headline, or
14131properties. Org-crypt uses the Emacs EasyPG library to encrypt and decrypt
14132files.
14133
14134Any text below a headline that has a @samp{:crypt:} tag will be automatically
14135be encrypted when the file is saved. If you want to use a different tag just
14136customize the @code{org-crypt-tag-matcher} setting.
14137
14138To use org-crypt it is suggested that you have the following in your
14139@file{.emacs}:
14140
14141@example
14142(require 'org-crypt)
14143(org-crypt-use-before-save-magic)
14144(setq org-tags-exclude-from-inheritance (quote ("crypt")))
14145
14146(setq org-crypt-key nil)
14147 ;; GPG key to use for encryption
14148 ;; Either the Key ID or set to nil to use symmetric encryption.
14149
14150(setq auto-save-default nil)
14151 ;; Auto-saving does not cooperate with org-crypt.el: so you need
14152 ;; to turn it off if you plan to use org-crypt.el quite often.
14153 ;; Otherwise, you'll get an (annoying) message each time you
14154 ;; start Org.
14155
14156 ;; To turn it off only locally, you can insert this:
14157 ;;
14158 ;; # -*- buffer-auto-save-file-name: nil; -*-
14159@end example
14160
14161Excluding the crypt tag from inheritance prevents already encrypted text
14162being encrypted again.
13347 14163
13348@node Hacking, MobileOrg, Miscellaneous, Top 14164@node Hacking, MobileOrg, Miscellaneous, Top
13349@appendix Hacking 14165@appendix Hacking
@@ -13487,7 +14303,7 @@ the link description when the link is later inserted into an Org
13487buffer with @kbd{C-c C-l}. 14303buffer with @kbd{C-c C-l}.
13488 14304
13489When it makes sense for your new link type, you may also define a function 14305When it makes sense for your new link type, you may also define a function
13490@code{org-PREFIX-complete-link} that implements special (e.g. completion) 14306@code{org-PREFIX-complete-link} that implements special (e.g.@: completion)
13491support for inserting such a link with @kbd{C-c C-l}. Such a function should 14307support for inserting such a link with @kbd{C-c C-l}. Such a function should
13492not accept any arguments, and return the full link with prefix. 14308not accept any arguments, and return the full link with prefix.
13493 14309
@@ -13526,7 +14342,8 @@ package, special contexts are lines that start with @code{#+R:} or
13526The function first checks if the cursor is in such a line. If that is the 14342The function first checks if the cursor is in such a line. If that is the
13527case, @code{org-R-apply} is called and the function returns @code{t} to 14343case, @code{org-R-apply} is called and the function returns @code{t} to
13528signal that action was taken, and @kbd{C-c C-c} will stop looking for other 14344signal that action was taken, and @kbd{C-c C-c} will stop looking for other
13529contexts. If the function finds it should do nothing locally, it returns @code{nil} so that other, similar functions can have a try. 14345contexts. If the function finds it should do nothing locally, it returns
14346@code{nil} so that other, similar functions can have a try.
13530 14347
13531 14348
13532@node Tables in arbitrary syntax, Dynamic blocks, Context-sensitive commands, Hacking 14349@node Tables in arbitrary syntax, Dynamic blocks, Context-sensitive commands, Hacking
@@ -13539,7 +14356,7 @@ Since Orgtbl mode can be used as a minor mode in arbitrary buffers, a
13539frequent feature request has been to make it work with native tables in 14356frequent feature request has been to make it work with native tables in
13540specific languages, for example @LaTeX{}. However, this is extremely 14357specific languages, for example @LaTeX{}. However, this is extremely
13541hard to do in a general way, would lead to a customization nightmare, 14358hard to do in a general way, would lead to a customization nightmare,
13542and would take away much of the simplicity of the Orgtbl-mode table 14359and would take away much of the simplicity of the Orgtbl mode table
13543editor. 14360editor.
13544 14361
13545This appendix describes a different approach. We keep the Orgtbl mode 14362This appendix describes a different approach. We keep the Orgtbl mode
@@ -13587,7 +14404,7 @@ example:
13587 14404
13588@noindent 14405@noindent
13589@code{table_name} is the reference name for the table that is also used 14406@code{table_name} is the reference name for the table that is also used
13590in the receiver lines. @code{translation_function} is the Lisp function 14407in the receiver lines. @code{translation_function} is the Lisp function
13591that does the translation. Furthermore, the line can contain a list of 14408that does the translation. Furthermore, the line can contain a list of
13592arguments (alternating key and value) at the end. The arguments will be 14409arguments (alternating key and value) at the end. The arguments will be
13593passed as a property list to the translation function for 14410passed as a property list to the translation function for
@@ -13690,7 +14507,7 @@ table inserted between the two marker lines.
13690Now let's assume you want to make the table header by hand, because you 14507Now let's assume you want to make the table header by hand, because you
13691want to control how columns are aligned, etc@. In this case we make sure 14508want to control how columns are aligned, etc@. In this case we make sure
13692that the table translator skips the first 2 lines of the source 14509that the table translator skips the first 2 lines of the source
13693table, and tell the command to work as a @i{splice}, i.e. to not produce 14510table, and tell the command to work as a @i{splice}, i.e.@: to not produce
13694header and footer commands of the target table: 14511header and footer commands of the target table:
13695 14512
13696@example 14513@example
@@ -13725,7 +14542,7 @@ tabular environment. Default is nil.
13725A format to be used to wrap each field, it should contain @code{%s} for the 14542A format to be used to wrap each field, it should contain @code{%s} for the
13726original field value. For example, to wrap each field value in dollars, 14543original field value. For example, to wrap each field value in dollars,
13727you could use @code{:fmt "$%s$"}. This may also be a property list with 14544you could use @code{:fmt "$%s$"}. This may also be a property list with
13728column numbers and formats. for example @code{:fmt (2 "$%s$" 4 "%s\\%%")}. 14545column numbers and formats, for example @code{:fmt (2 "$%s$" 4 "%s\\%%")}.
13729A function of one argument can be used in place of the strings; the 14546A function of one argument can be used in place of the strings; the
13730function must return a formatted string. 14547function must return a formatted string.
13731 14548
@@ -13773,7 +14590,7 @@ hands processing over to the generic translator. Here is the entire code:
13773 14590
13774As you can see, the properties passed into the function (variable 14591As you can see, the properties passed into the function (variable
13775@var{PARAMS}) are combined with the ones newly defined in the function 14592@var{PARAMS}) are combined with the ones newly defined in the function
13776(variable @var{PARAMS2}). The ones passed into the function (i.e. the 14593(variable @var{PARAMS2}). The ones passed into the function (i.e.@: the
13777ones set by the @samp{ORGTBL SEND} line) take precedence. So if you 14594ones set by the @samp{ORGTBL SEND} line) take precedence. So if you
13778would like to use the @LaTeX{} translator, but wanted the line endings to 14595would like to use the @LaTeX{} translator, but wanted the line endings to
13779be @samp{\\[2mm]} instead of the default @samp{\\}, you could just 14596be @samp{\\[2mm]} instead of the default @samp{\\}, you could just
@@ -13920,15 +14737,24 @@ example @code{before-save-hook}. @code{org-update-all-dblocks} is
13920written in a way such that it does nothing in buffers that are not in 14737written in a way such that it does nothing in buffers that are not in
13921@code{org-mode}. 14738@code{org-mode}.
13922 14739
14740You can narrow the current buffer to the current dynamic block (like any
14741other block) with @code{org-narrow-to-block}.
14742
13923@node Special agenda views, Extracting agenda information, Dynamic blocks, Hacking 14743@node Special agenda views, Extracting agenda information, Dynamic blocks, Hacking
13924@section Special agenda views 14744@section Special agenda views
13925@cindex agenda views, user-defined 14745@cindex agenda views, user-defined
13926 14746
14747@vindex org-agenda-skip-function
14748@vindex org-agenda-skip-function-global
13927Org provides a special hook that can be used to narrow down the selection 14749Org provides a special hook that can be used to narrow down the selection
13928made by these agenda views: @code{todo}, @code{alltodo}, @code{tags}, @code{tags-todo}, 14750made by these agenda views: @code{agenda}, @code{todo}, @code{alltodo},
13929@code{tags-tree}. You may specify a function that is used at each match to verify 14751@code{tags}, @code{tags-todo}, @code{tags-tree}. You may specify a function
13930if the match should indeed be part of the agenda view, and if not, how 14752that is used at each match to verify if the match should indeed be part of
13931much should be skipped. 14753the agenda view, and if not, how much should be skipped. You can specify a
14754global condition that will be applied to all agenda views, this condition
14755would be stored in the variable @code{org-agenda-skip-function-global}. More
14756commonly, such a definition is applied only to specific custom searches,
14757using @code{org-agenda-skip-function}.
13932 14758
13933Let's say you want to produce a list of projects that contain a WAITING 14759Let's say you want to produce a list of projects that contain a WAITING
13934tag anywhere in the project tree. Let's further assume that you have 14760tag anywhere in the project tree. Let's further assume that you have
@@ -14219,7 +15045,7 @@ does not need to preserve point. After evaluation, the cursor will be
14219moved to the end of the line (presumably of the headline of the 15045moved to the end of the line (presumably of the headline of the
14220processed entry) and search continues from there. Under some 15046processed entry) and search continues from there. Under some
14221circumstances, this may not produce the wanted results. For example, 15047circumstances, this may not produce the wanted results. For example,
14222if you have removed (e.g. archived) the current (sub)tree it could 15048if you have removed (e.g.@: archived) the current (sub)tree it could
14223mean that the next entry will be skipped entirely. In such cases, you 15049mean that the next entry will be skipped entirely. In such cases, you
14224can specify the position from where search should continue by making 15050can specify the position from where search should continue by making
14225FUNC set the variable `org-map-continue-from' to the desired buffer 15051FUNC set the variable `org-map-continue-from' to the desired buffer
@@ -14235,6 +15061,7 @@ SCOPE determines the scope of this command. It can be any of:
14235@example 15061@example
14236nil @r{the current buffer, respecting the restriction if any} 15062nil @r{the current buffer, respecting the restriction if any}
14237tree @r{the subtree started with the entry at point} 15063tree @r{the subtree started with the entry at point}
15064region @r{The entries within the active region, if any}
14238file @r{the current buffer, without restriction} 15065file @r{the current buffer, without restriction}
14239file-with-archives 15066file-with-archives
14240 @r{the current buffer, and any archives associated with it} 15067 @r{the current buffer, and any archives associated with it}
@@ -14355,7 +15182,7 @@ The easiest way to create that directory is to use a free
14355@uref{http://dropbox.com,Dropbox.com} account@footnote{If you cannot use 15182@uref{http://dropbox.com,Dropbox.com} account@footnote{If you cannot use
14356Dropbox, or if your version of MobileOrg does not support it, you can use a 15183Dropbox, or if your version of MobileOrg does not support it, you can use a
14357webdav server. For more information, check out the documentation of MobileOrg and also this 15184webdav server. For more information, check out the documentation of MobileOrg and also this
14358@uref{http://orgmode.org/worg/org-faq.php#mobileorg_webdav, FAQ entry}.}. 15185@uref{http://orgmode.org/worg/org-faq.html#mobileorg_webdav, FAQ entry}.}.
14359When MobileOrg first connects to your Dropbox, it will create a directory 15186When MobileOrg first connects to your Dropbox, it will create a directory
14360@i{MobileOrg} inside the Dropbox. After the directory has been created, tell 15187@i{MobileOrg} inside the Dropbox. After the directory has been created, tell
14361Emacs about it: 15188Emacs about it:
@@ -14373,7 +15200,7 @@ and to read captured notes from there.
14373This operation copies all files currently listed in @code{org-mobile-files} 15200This operation copies all files currently listed in @code{org-mobile-files}
14374to the directory @code{org-mobile-directory}. By default this list contains 15201to the directory @code{org-mobile-directory}. By default this list contains
14375all agenda files (as listed in @code{org-agenda-files}), but additional files 15202all agenda files (as listed in @code{org-agenda-files}), but additional files
14376can be included by customizing @code{org-mobiles-files}. File names will be 15203can be included by customizing @code{org-mobile-files}. File names will be
14377staged with paths relative to @code{org-directory}, so all files should be 15204staged with paths relative to @code{org-directory}, so all files should be
14378inside this directory. The push operation also creates a special Org file 15205inside this directory. The push operation also creates a special Org file
14379@file{agendas.org} with all custom agenda view defined by the 15206@file{agendas.org} with all custom agenda view defined by the
@@ -14703,6 +15530,8 @@ with links transformation to Org syntax.
14703@i{David O'Toole} wrote @file{org-publish.el} and drafted the manual 15530@i{David O'Toole} wrote @file{org-publish.el} and drafted the manual
14704chapter about publishing. 15531chapter about publishing.
14705@item 15532@item
15533@i{Jambunathan K} contributed the OpenDocumentText exporter.
15534@item
14706@i{Sebastien Vauban} reported many issues with LaTeX and BEAMER export and 15535@i{Sebastien Vauban} reported many issues with LaTeX and BEAMER export and
14707enabled source code highlighling in Gnus. 15536enabled source code highlighling in Gnus.
14708@item 15537@item
@@ -14729,6 +15558,7 @@ work on a tty.
14729@item 15558@item
14730@i{Piotr Zielinski} wrote @file{org-mouse.el}, proposed agenda blocks 15559@i{Piotr Zielinski} wrote @file{org-mouse.el}, proposed agenda blocks
14731and contributed various ideas and code snippets. 15560and contributed various ideas and code snippets.
15561@item
14732@end itemize 15562@end itemize
14733 15563
14734 15564
diff --git a/doc/misc/texinfo.tex b/doc/misc/texinfo.tex
index fd22fd68567..6f593d76639 100644
--- a/doc/misc/texinfo.tex
+++ b/doc/misc/texinfo.tex
@@ -3,7 +3,7 @@
3% Load plain if necessary, i.e., if running under initex. 3% Load plain if necessary, i.e., if running under initex.
4\expandafter\ifx\csname fmtname\endcsname\relax\input plain\fi 4\expandafter\ifx\csname fmtname\endcsname\relax\input plain\fi
5% 5%
6\def\texinfoversion{2011-05-23.16} 6\def\texinfoversion{2011-08-15.20}
7% 7%
8% Copyright 1985, 1986, 1988, 1990, 1991, 1992, 1993, 1994, 1995, 8% Copyright 1985, 1986, 1988, 1990, 1991, 1992, 1993, 1994, 1995,
9% 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 9% 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
@@ -9620,6 +9620,3 @@ directory should work if nowhere else does.}
9620 9620
9621@c vim:sw=2: 9621@c vim:sw=2:
9622 9622
9623@ignore
9624 arch-tag: e1b36e32-c96e-4135-a41a-0b2efa2ea115
9625@end ignore
diff --git a/doc/misc/trampver.texi b/doc/misc/trampver.texi
index 6a245f9c28d..31d3ac0204f 100644
--- a/doc/misc/trampver.texi
+++ b/doc/misc/trampver.texi
@@ -8,7 +8,7 @@
8@c In the Tramp CVS, the version number is auto-frobbed from 8@c In the Tramp CVS, the version number is auto-frobbed from
9@c configure.ac, so you should edit that file and run 9@c configure.ac, so you should edit that file and run
10@c "autoconf && ./configure" to change the version number. 10@c "autoconf && ./configure" to change the version number.
11@set trampver 2.2.2-pre 11@set trampver 2.2.3-pre
12 12
13@c Other flags from configuration 13@c Other flags from configuration
14@set instprefix /usr/local 14@set instprefix /usr/local