diff options
| author | Paul Eggert | 2011-09-03 16:03:38 -0700 |
|---|---|---|
| committer | Paul Eggert | 2011-09-03 16:03:38 -0700 |
| commit | b49e353d9d01adbe60bc5d0b1658b4ef978b0b06 (patch) | |
| tree | 9f2ffa6f7a6562abf661a4951012b488ad8b1ae7 /doc | |
| parent | 74b880cbc18bd0194c7b1fc44c4a983ee05adae2 (diff) | |
| parent | bc3200871917d5c54c8c4299a06bf8f8ba2ea02d (diff) | |
| download | emacs-b49e353d9d01adbe60bc5d0b1658b4ef978b0b06.tar.gz emacs-b49e353d9d01adbe60bc5d0b1658b4ef978b0b06.zip | |
Merge from trunk.
Diffstat (limited to 'doc')
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 @@ | |||
| 1 | 2011-08-29 Chong Yidong <cyd@stupidchicken.com> | ||
| 2 | |||
| 3 | * modes.texi (Choosing Modes): auto-mode-case-fold is now t. | ||
| 4 | |||
| 5 | 2011-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 | |||
| 11 | 2011-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 | |||
| 25 | 2011-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 | |||
| 30 | 2011-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 | |||
| 38 | 2011-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 | |||
| 55 | 2011-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 | |||
| 60 | 2011-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 | |||
| 1 | 2011-07-28 Eli Zaretskii <eliz@gnu.org> | 65 | 2011-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 | |||
| 285 | switch to some other buffer before using the command, in order for it | 285 | switch to some other buffer before using the command, in order for it |
| 286 | to make a different buffer.) | 286 | to 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 | ||
| 290 | File Ops}) except that it examines an already existing Emacs buffer. | ||
| 291 | View mode provides commands for scrolling through the buffer | ||
| 292 | conveniently 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 | ||
| 294 | previously displayed in the window. Alternatively, if you exit View | ||
| 295 | mode with @kbd{e}, the buffer and the value of point that resulted from | ||
| 296 | your 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} |
| 299 | can be used to copy text from one buffer to another. @xref{Accumulating | 289 | can be used to copy text from one buffer to another. @xref{Accumulating |
| 300 | Text}. | 290 | Text}. |
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 | |||
| 538 | days to be shown in the fancy diary buffer, set the variable | 538 | days 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 | ||
| 544 | commands for scrolling and searching the text. For example, @key{SPC} | ||
| 545 | and @key{DEL} scroll forward and backward, and @key{s} starts an | ||
| 546 | incremental 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 |
| 550 | actual diary buffer, and uses invisible text to hide entries that don't | 544 | actual 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 | |||
| 201 | be somewhat risky. | 201 | be 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 |
| 206 | when you delete a file in Dired, it is gone forever. However, you can | 206 | directories into the operating system's Trash, instead of deleting |
| 207 | tell Emacs to use the Trash for file deletion, by changing the | 207 | them outright. @xref{Misc File Ops}. |
| 208 | variable @code{delete-by-moving-to-trash} to @code{t}. @xref{Misc | ||
| 209 | File 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} |
| 647 | Change the mode (also called ``permission bits'') of the specified files | 645 | Change 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. | 647 | notation 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 | |||
| 300 | will continue to scroll the window, but never farther to the right | 303 | will continue to scroll the window, but never farther to the right |
| 301 | than the amount you previously set by @code{scroll-left}. | 304 | than 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, | ||
| 314 | making the rest temporarily inaccessible. The portion which you can | ||
| 315 | still get to is called the @dfn{accessible portion}. Canceling the | ||
| 316 | narrowing, which makes the entire buffer once again accessible, is | ||
| 317 | called @dfn{widening}. The bounds of narrowing in effect in a buffer | ||
| 318 | are called the buffer's @dfn{restriction}. | ||
| 319 | |||
| 320 | Narrowing can make it easier to concentrate on a single subroutine or | ||
| 321 | paragraph by eliminating clutter. It can also be used to limit the | ||
| 322 | range of operation of a replace command or repeating keyboard macro. | ||
| 323 | |||
| 324 | @table @kbd | ||
| 325 | @item C-x n n | ||
| 326 | Narrow down to between point and mark (@code{narrow-to-region}). | ||
| 327 | @item C-x n w | ||
| 328 | Widen to make the entire buffer accessible again (@code{widen}). | ||
| 329 | @item C-x n p | ||
| 330 | Narrow down to the current page (@code{narrow-to-page}). | ||
| 331 | @item C-x n d | ||
| 332 | Narrow 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 | ||
| 336 | to 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 | ||
| 338 | it in any way. However, it is not gone, and if you save the file all | ||
| 339 | the inaccessible text will be saved. The word @samp{Narrow} appears in | ||
| 340 | the 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}). | ||
| 345 | It sets the current buffer's restrictions so that the text in the current | ||
| 346 | region remains accessible, but all text before the region or after the | ||
| 347 | region 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 | ||
| 354 | down 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 | ||
| 356 | containing 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 | ||
| 364 | to 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 | ||
| 368 | this command asks for confirmation and gives you the option of enabling it; | ||
| 369 | if you enable the command, confirmation will no longer be required for | ||
| 370 | it. @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 | ||
| 378 | screenfuls. It provides commands for scrolling through the buffer | ||
| 379 | conveniently but not for changing it. Apart from the usual Emacs | ||
| 380 | cursor motion commands, you can type @key{SPC} to scroll forward one | ||
| 381 | windowful, @key{DEL} to scroll backward, and @kbd{s} to start an | ||
| 382 | incremental search. | ||
| 383 | |||
| 384 | Typing @kbd{q} disables View mode, and switches back to the buffer | ||
| 385 | and 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 | ||
| 391 | to it, and enables View mode. @kbd{M-x view-file} prompts for a file | ||
| 392 | and 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 | |||
| 187 | Advanced Features | 187 | Advanced 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 | ||
| 225 | Recovery from Problems | 218 | Recovery 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 | ||
| 581 | Filling Text | 578 | Filling 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 | ||
| 888 | Sending 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 | |||
| 898 | Mail 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 | |||
| 905 | Reading 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 | |||
| 929 | Summaries | ||
| 930 | |||
| 931 | * Rmail Make Summary:: Making various sorts of summaries. | ||
| 932 | * Rmail Summary Edit:: Manipulating messages from the summary. | ||
| 933 | |||
| 934 | Dired, the Directory Editor | 885 | Dired, 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 | ||
| 968 | Sending 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 | |||
| 978 | Mail 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 | |||
| 985 | Reading 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 | |||
| 1009 | Rmail Summaries | ||
| 1010 | |||
| 1011 | * Rmail Make Summary:: Making various sorts of summaries. | ||
| 1012 | * Rmail Summary Edit:: Manipulating messages from the summary. | ||
| 1013 | |||
| 1017 | Gnus | 1014 | Gnus |
| 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 | ||
| 1058 | Emacs 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 | |||
| 1061 | Customization | 1064 | Customization |
| 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 |
| 1273 | using the minibuffer, and deletes the directory if it is empty. If | 1273 | using the minibuffer, and deletes the directory if it is empty. If |
| 1274 | the directory is not empty, you will be asked whether you want to | 1274 | the directory is not empty, you will be asked whether you want to |
| 1275 | delete it recursively. On systems that have a ``Trash'' or ``Recycle | 1275 | delete it recursively. On systems that have a ``Trash'' (or ``Recycle |
| 1276 | Bin'' feature, you can make this command move the specified directory | 1276 | Bin'') feature, you can make this command move the specified directory |
| 1277 | to the Trash or Recycle Bin, instead of deleting it outright, by | 1277 | to the Trash instead of deleting it outright, by changing the variable |
| 1278 | changing 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. | 1279 | for 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. |
| 1504 | All operate on one file; they do not accept wildcard file names. | 1504 | All 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 | 1509 | deleting 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 | 1510 | Dired rather than @code{delete-file}. @xref{Dired Deletion}. |
| 1511 | screenfuls. It reads a file name argument using the minibuffer. After | 1511 | |
| 1512 | reading the file into an Emacs buffer, @code{view-file} displays the | 1512 | @cindex trash |
| 1513 | beginning. You can then type @key{SPC} to scroll forward one windowful, | 1513 | @cindex recycle bin |
| 1514 | or @key{DEL} to scroll backward. Various other commands are provided | 1514 | @kbd{M-x move-file-to-trash} moves a file into the system |
| 1515 | for 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 |
| 1516 | while viewing for a list of them. They are mostly the same as normal | 1516 | most operating systems; files that are moved into the Trash can be |
| 1517 | Emacs cursor motion commands. To exit from viewing, type @kbd{q}. | 1517 | brought back later if you change your mind. |
| 1518 | The commands for viewing are defined by a special minor mode called View | 1518 | |
| 1519 | mode. | 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 | 1521 | use the Trash (when it is available) for common deletion commands, |
| 1522 | in Emacs. @xref{Misc Buffer}. | 1522 | change the variable @code{delete-by-moving-to-trash} to @code{t}. |
| 1523 | This affects the commands @kbd{M-x delete-file} and @kbd{M-x | ||
| 1524 | delete-directory} (@pxref{Directories}), as well as the deletion | ||
| 1525 | commands in Dired (@pxref{Dired Deletion}). Supplying a prefix | ||
| 1526 | argument to @kbd{M-x delete-file} or @kbd{M-x delete-directory} makes | ||
| 1527 | them 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 | ||
| 1533 | named @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} | ||
| 1538 | and a destination @var{new}. If @var{new} is an existing directory, | ||
| 1539 | it creates a copy of the @var{old} directory and puts it in @var{new}. | ||
| 1540 | If @var{new} is not an existing directory, it copies all the contents | ||
| 1541 | of @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} | ||
| 1545 | using the minibuffer, then renames file @var{old} as @var{new}. If | ||
| 1546 | the file name @var{new} already exists, you must confirm with | ||
| 1547 | @kbd{yes} or renaming is not done; this is because renaming causes the | ||
| 1548 | old 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 | ||
| 1550 | and deleted. If the argument @var{new} is just a directory name, the | ||
| 1551 | real new name is in that directory, with the same non-directory | ||
| 1552 | component as @var{old}. For example, @kbd{M-x rename-file RET ~/foo | ||
| 1553 | RET /tmp RET} renames @file{~/foo} to @file{/tmp/foo}. The same rule | ||
| 1554 | applies to all the remaining commands in this section. All of them | ||
| 1555 | ask 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 | ||
| 1560 | file 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 | ||
| 1562 | same file system that the file is on. On MS-Windows, this command | ||
| 1563 | works only if the file resides in an NTFS file system. On MS-DOS, it | ||
| 1564 | works 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}, | ||
| 1570 | which points at @var{target}. The effect is that future attempts to | ||
| 1571 | open 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 | ||
| 1573 | the name @var{target} is nonexistent at that time. This command does | ||
| 1574 | not expand the argument @var{target}, so that it allows you to specify | ||
| 1575 | a relative name as the target of the link. Not all systems support | ||
| 1576 | symbolic links; on systems that don't support them, this command is | ||
| 1577 | not 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 |
| 1545 | as saving files; see @ref{Customize Save}. | 1600 | as 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} | ||
| 1551 | command in the shell. If you are deleting many files in one | ||
| 1552 | directory, 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 | ||
| 1559 | the Trash, and you can bring the file back from the Trash if you later | ||
| 1560 | change your mind. By default, Emacs does @emph{not} use the Trash for | ||
| 1561 | file deletion---when Emacs deletes a file, it is gone forever. You | ||
| 1562 | can tell Emacs to use the Trash by changing the variable | ||
| 1563 | @code{delete-by-moving-to-trash} to @code{t}. This applies to file | ||
| 1564 | deletion via @kbd{M-x delete-file}, as well as @kbd{M-x | ||
| 1565 | delete-directory} (@pxref{Directories}) and file deletion in Dired | ||
| 1566 | (@pxref{Dired Deletion}). In addition, you can explicitly move a file | ||
| 1567 | into 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 | ||
| 1571 | the 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 | ||
| 1573 | done; this is because renaming causes the old meaning of the name @var{new} | ||
| 1574 | to be lost. If @var{old} and @var{new} are on different file systems, the | ||
| 1575 | file @var{old} is copied and deleted. | ||
| 1576 | |||
| 1577 | If the argument @var{new} is just a directory name, the real new | ||
| 1578 | name 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} | ||
| 1580 | renames @file{~/foo} to @file{/tmp/foo}. The same rule applies to all | ||
| 1581 | the remaining commands in this section. All of them ask for | ||
| 1582 | confirmation 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 | ||
| 1587 | additional name to an existing file without removing its old name. | ||
| 1588 | The new name is created as a ``hard link'' to the existing file. | ||
| 1589 | The new name must belong on the same file system that the file is on. | ||
| 1590 | On MS-Windows, this command works only if the file resides in an NTFS | ||
| 1591 | file 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 | ||
| 1597 | named @var{new} with the same contents. @kbd{M-x copy-directory} does | ||
| 1598 | the same for directories, by recursive copying all files and | ||
| 1599 | subdirectories. | ||
| 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}, | ||
| 1605 | which points at @var{target}. The effect is that future attempts to | ||
| 1606 | open 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 | ||
| 1608 | the name @var{target} is nonexistent at that time. This command does | ||
| 1609 | not expand the argument @var{target}, so that it allows you to specify | ||
| 1610 | a relative name as the target of the link. | ||
| 1611 | |||
| 1612 | Not all systems support symbolic links; on systems that don't | ||
| 1613 | support 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 |
| 1671 | into its own buffer. You can edit it there, and if you save the | 1658 | into its own buffer. You can edit it there, and if you save the |
| 1672 | buffer, the edited version will replace the version in the Tar buffer. | 1659 | buffer, 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 |
| 1674 | the file and displays it in another window, so you could edit the file | 1661 | Mode}). @kbd{o} extracts the file and displays it in another window, |
| 1675 | and operate on the archive simultaneously. @kbd{d} marks a file for | 1662 | so you could edit the file and operate on the archive simultaneously. |
| 1676 | deletion 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 |
| 1677 | Dired. @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 |
| 1678 | renames a file within the archive. @kbd{g} reverts the buffer from | 1665 | archive to disk and @kbd{R} renames a file within the archive. |
| 1679 | the 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 |
| 1682 | bits, group, and owner, respectively. | 1669 | bits, 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 |
| 468 | have to click on the window to select it (the default for most modern | 468 | have to click on the window to select it (the default for most modern |
| 469 | window managers). You should change it to @code{t} if your window | 469 | window managers). You should change it to @code{t} if your window |
| 470 | manager selects and window and gives it focus anytime you move the | 470 | manager selects a window and gives it focus anytime you move the mouse |
| 471 | mouse onto the window. | 471 | onto 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 |
| 474 | a frame that raises, so this variable has no effect in the native | 474 | a frame that raises, so this variable has no effect in the native |
| 475 | MS-Windows build of Emacs. | 475 | MS-Windows build of Emacs. However, you may still wish to set this |
| 476 | variable to @code{t} to have Emacs automatically move the mouse | ||
| 477 | pointer 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. | |||
| 126 | Display the name and documentation of the command that @var{key} runs | 126 | Display 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 |
| 129 | Display a description of your last 300 keystrokes | 129 | Display 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 |
| 132 | Display documentation of the current major mode (@code{describe-mode}). | 132 | Display documentation of the current major mode (@code{describe-mode}). |
| 133 | @item C-h n | 133 | @item C-h n |
| 134 | Display news of recent Emacs changes (@code{view-emacs-news}). | 134 | Display news of recent Emacs changes (@code{view-emacs-news}). |
| 135 | @item C-h p | 135 | @item C-h p |
| 136 | Find packages by topic keyword (@code{finder-by-keyword}). For an | 136 | Find packages by topic keyword (@code{finder-by-keyword}). This lists |
| 137 | alternative interface to the same information, try the @code{info-finder} | 137 | packages using a package menu buffer (@pxref{Package Menu}); for an |
| 138 | command. | 138 | alternative interface to the same information, try the |
| 139 | @code{info-finder} command. | ||
| 140 | @item C-h P @var{package} @key{RET} | ||
| 141 | Display documentation about the package named @var{package} | ||
| 142 | (@code{describe-package}; @pxref{Packages}). | ||
| 139 | @item C-h r | 143 | @item C-h r |
| 140 | Display the Emacs manual in Info (@code{info-emacs-manual}). | 144 | Display 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 |
| 405 | Ops}), plus a few special commands of their own. | 409 | Mode}), 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 | |||
| 125 | Nonetheless, relative file name arguments are still interpreted based | 125 | Nonetheless, relative file name arguments are still interpreted based |
| 126 | on the same default directory. | 126 | on 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 | ||
| 130 | manual. | ||
| 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}). | |||
| 491 | Move to the next item in the minibuffer history | 495 | Move 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} |
| 494 | Move to an earlier item in the minibuffer history that | 498 | Move to an earlier item in the minibuffer history that |
| 495 | matches @var{regexp} (@code{previous-matching-history-element}). | 499 | matches @var{regexp} (@code{previous-matching-history-element}). |
| 496 | @item M-s @var{regexp} @key{RET} | 500 | @item M-s @var{regexp} @key{RET} |
| 497 | Move to a later item in the minibuffer history that matches | 501 | Move 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 | |||
| 10 | commands and shell subprocesses, using a single shared Emacs for | 10 | commands and shell subprocesses, using a single shared Emacs for |
| 11 | utilities that expect to run an editor as a subprocess, printing | 11 | utilities that expect to run an editor as a subprocess, printing |
| 12 | hardcopy, sorting text, narrowing display to part of the buffer, | 12 | hardcopy, sorting text, narrowing display to part of the buffer, |
| 13 | editing double-column files and binary files, saving an Emacs session | 13 | editing binary files, saving an Emacs session for later resumption, |
| 14 | for later resumption, following hyperlinks, browsing images, emulating | 14 | following hyperlinks, browsing images, emulating other editors, and |
| 15 | other editors, and various diversions and amusements. | 15 | various 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 | |||
| 36 | DocView mode (@code{doc-view-mode}) is a viewer for DVI, Postscript | ||
| 37 | (PS), PDF, OpenDocument, and Microsoft Office documents. It provides | ||
| 38 | features such as slicing, zooming, and searching inside documents. It | ||
| 39 | works 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 | ||
| 43 | Microsoft Office documents, the @code{unoconv} tool is needed.}, and | ||
| 44 | displaying 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 | ||
| 50 | files, Emacs automatically switches to DocView mode if possible | ||
| 51 | @footnote{The needed external tools for this document type have to be | ||
| 52 | available, emacs needs to run in a graphical frame, and PNG image | ||
| 53 | support has to be compiled into emacs. If any of these requirements | ||
| 54 | is not fulfilled, DocView falls back to an appropriate mode.}. When | ||
| 55 | you visit a Postscript file, Emacs switches to PS mode, a major mode | ||
| 56 | for editing Postscript files as text; however, it also enables DocView | ||
| 57 | minor mode, so you can type @kbd{C-c C-c} to view the document with | ||
| 58 | DocView. (PDF and DVI files, unlike Postscript files, are not usually | ||
| 59 | human-editable.) In either case, repeating @kbd{C-c C-c} | ||
| 60 | (@code{doc-view-toggle-display}) toggles between DocView and the file | ||
| 61 | text. | ||
| 62 | |||
| 63 | You can explicitly toggle DocView mode with the command @code{M-x | ||
| 64 | doc-view-mode}, and DocView minor mode with the command @code{M-x | ||
| 65 | doc-view-minor-mode}. | ||
| 66 | |||
| 67 | When DocView mode starts, it displays a welcome screen and begins | ||
| 68 | formatting the file, page by page. It displays the first page once | ||
| 69 | that 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, | ||
| 77 | set 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 | |||
| 93 | When in DocView mode, you can scroll the current page using the usual | ||
| 94 | Emacs movement keys: @kbd{C-p}, @kbd{C-n}, @kbd{C-b}, @kbd{C-f}, and | ||
| 95 | the arrow keys. | ||
| 96 | |||
| 97 | @vindex doc-view-continuous | ||
| 98 | By default, the line-motion keys @kbd{C-p} and @kbd{C-n} stop | ||
| 99 | scrolling at the beginning and end of the current page, respectively. | ||
| 100 | However, if you change the variable @code{doc-view-continuous} to a | ||
| 101 | non-@code{nil} value, then @kbd{C-p} displays the previous page if you | ||
| 102 | are already at the beginning of the current page, and @kbd{C-n} | ||
| 103 | displays 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 | ||
| 109 | page, 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 | ||
| 115 | convenient way to advance through the document. It scrolls within the | ||
| 116 | current page or advances to the next. @key{DEL} moves backwards in a | ||
| 117 | similar 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 | |||
| 130 | While in DocView mode, you can search the file's text for a regular | ||
| 131 | expression (@pxref{Regexps}). The interface for searching is inspired | ||
| 132 | by @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 | ||
| 139 | expression using a minibuffer, then echoes the number of matches found | ||
| 140 | within the document. You can move forward and back among the matches | ||
| 141 | by typing @kbd{C-s} and @kbd{C-r}. DocView mode has no way to show | ||
| 142 | the match inside the page image; instead, it displays a tooltip (at | ||
| 143 | the mouse position) listing all matching lines in the current page. | ||
| 144 | To 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 | ||
| 148 | argument; i.e., @kbd{C-u C-s} for a forward search or @kbd{C-u C-r} | ||
| 149 | for a backward search. | ||
| 150 | |||
| 151 | @node Slicing | ||
| 152 | @subsection Slicing | ||
| 153 | |||
| 154 | Documents often have wide margins for printing. They are annoying | ||
| 155 | when reading the document on the screen, because they use up screen | ||
| 156 | space 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} | ||
| 161 | of pages to display. A slice is a rectangle within the page area; | ||
| 162 | once you specify a slice in DocView, it applies to whichever page you | ||
| 163 | look 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 | ||
| 167 | and 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 | ||
| 171 | m} (@code{doc-view-set-slice-using-mouse}), where you use the mouse to | ||
| 172 | select 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 | ||
| 178 | including its entire margins. | ||
| 179 | |||
| 180 | @node Conversion | ||
| 181 | @subsection Conversion | ||
| 182 | |||
| 183 | @vindex doc-view-cache-directory | ||
| 184 | @findex doc-view-clear-cache | ||
| 185 | For efficiency, DocView caches the images produced by @command{gs}. | ||
| 186 | The name of this directory is given by the variable | ||
| 187 | @code{doc-view-cache-directory}. You can clear the cache directory by | ||
| 188 | typing @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 | ||
| 194 | process 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 | ||
| 197 | the 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 | ||
| 201 | size. 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! | 247 | DocView mode (@code{doc-view-mode}) is a viewer for DVI, Postscript |
| 419 | Gnus is powerful and customizable. Here are references to a few | 248 | (PS), PDF, OpenDocument, and Microsoft Office documents. It provides |
| 420 | @ifnottex | 249 | features such as slicing, zooming, and searching inside documents. It |
| 421 | additional topics: | 250 | works 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 | ||
| 254 | Microsoft Office documents, the @code{unoconv} tool is needed.}, and | ||
| 255 | displaying those images. | ||
| 422 | 256 | ||
| 423 | @end ifnottex | 257 | @findex doc-view-toggle-display |
| 424 | @iftex | 258 | @findex doc-view-toggle-display |
| 425 | additional topics in @cite{The Gnus Manual}: | 259 | @cindex doc-view-minor-mode |
| 260 | When you visit a document file with the exception of Postscript | ||
| 261 | files, Emacs automatically switches to DocView mode if possible | ||
| 262 | @footnote{The needed external tools for this document type have to be | ||
| 263 | available, emacs needs to run in a graphical frame, and PNG image | ||
| 264 | support has to be compiled into emacs. If any of these requirements | ||
| 265 | is not fulfilled, DocView falls back to an appropriate mode.}. When | ||
| 266 | you visit a Postscript file, Emacs switches to PS mode, a major mode | ||
| 267 | for editing Postscript files as text; however, it also enables DocView | ||
| 268 | minor mode, so you can type @kbd{C-c C-c} to view the document with | ||
| 269 | DocView. (PDF and DVI files, unlike Postscript files, are not usually | ||
| 270 | human-editable.) In either case, repeating @kbd{C-c C-c} | ||
| 271 | (@code{doc-view-toggle-display}) toggles between DocView and the file | ||
| 272 | text. | ||
| 426 | 273 | ||
| 427 | @itemize @bullet | 274 | You can explicitly toggle DocView mode with the command @code{M-x |
| 428 | @item | 275 | doc-view-mode}, and DocView minor mode with the command @code{M-x |
| 429 | Follow discussions on specific topics.@* | 276 | doc-view-minor-mode}. |
| 430 | See section ``Threading.'' | ||
| 431 | 277 | ||
| 432 | @item | 278 | When DocView mode starts, it displays a welcome screen and begins |
| 433 | Read digests. See section ``Document Groups.'' | 279 | formatting the file, page by page. It displays the first page once |
| 280 | that has been formatted. | ||
| 434 | 281 | ||
| 435 | @item | 282 | @findex doc-view-enlarge |
| 436 | Refer to and jump to the parent of the current article.@* | 283 | @findex doc-view-shrink |
| 437 | See 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, | ||
| 288 | set or customize the variable @code{doc-view-resolution}. | ||
| 438 | 289 | ||
| 439 | @item | 290 | To kill the DocView buffer, type @kbd{k} |
| 440 | Refer to articles by using Message-IDs included in the messages.@* | 291 | (@code{doc-view-kill-proc-and-buffer}). To bury it, type @kbd{q} |
| 441 | See section ``Article Keymap.'' | 292 | (@code{quit-window}). |
| 442 | 293 | ||
| 443 | @item | 294 | @menu |
| 444 | Save 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 |
| 447 | Have Gnus score articles according to various criteria, like author | 302 | @subsection Navigation |
| 448 | name, subject, or string in the body of the articles.@* | ||
| 449 | See section ``Scoring.'' | ||
| 450 | 303 | ||
| 451 | @item | 304 | When in DocView mode, you can scroll the current page using the usual |
| 452 | Send an article to a newsgroup.@* | 305 | Emacs movement keys: @kbd{C-p}, @kbd{C-n}, @kbd{C-b}, @kbd{C-f}, and |
| 453 | See section ``Composing Messages.'' | 306 | the arrow keys. |
| 454 | @end itemize | ||
| 455 | @end iftex | ||
| 456 | @ifnottex | ||
| 457 | @itemize @bullet | ||
| 458 | @item | ||
| 459 | Follow discussions on specific topics.@* | ||
| 460 | @xref{Threading, , Reading Based on Conversation Threads, | ||
| 461 | gnus, The Gnus Manual}. | ||
| 462 | 307 | ||
| 463 | @item | 308 | @vindex doc-view-continuous |
| 464 | Read digests. @xref{Document Groups, , , gnus, The Gnus Manual}. | 309 | By default, the line-motion keys @kbd{C-p} and @kbd{C-n} stop |
| 310 | scrolling at the beginning and end of the current page, respectively. | ||
| 311 | However, if you change the variable @code{doc-view-continuous} to a | ||
| 312 | non-@code{nil} value, then @kbd{C-p} displays the previous page if you | ||
| 313 | are already at the beginning of the current page, and @kbd{C-n} | ||
| 314 | displays the next page if you are at the end of the current page. | ||
| 465 | 315 | ||
| 466 | @item | 316 | @findex doc-view-next-page |
| 467 | Refer 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 | ||
| 320 | page, 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 |
| 471 | Refer 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 |
| 326 | convenient way to advance through the document. It scrolls within the | ||
| 327 | current page or advances to the next. @key{DEL} moves backwards in a | ||
| 328 | similar way (@code{doc-view-scroll-down-or-previous-page}). | ||
| 473 | 329 | ||
| 474 | @item | 330 | @findex doc-view-first-page |
| 475 | Save 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 |
| 478 | Have Gnus score articles according to various criteria, like author | 339 | @subsection Searching |
| 479 | name, subject, or string in the body of the articles.@* | ||
| 480 | @xref{Scoring, , , gnus, The Gnus Manual}. | ||
| 481 | 340 | ||
| 482 | @item | 341 | While in DocView mode, you can search the file's text for a regular |
| 483 | Send an article to a newsgroup.@* | 342 | expression (@pxref{Regexps}). The interface for searching is inspired |
| 484 | @xref{Composing Messages, , , gnus, The Gnus Manual}. | 343 | by @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 | ||
| 350 | expression using a minibuffer, then echoes the number of matches found | ||
| 351 | within the document. You can move forward and back among the matches | ||
| 352 | by typing @kbd{C-s} and @kbd{C-r}. DocView mode has no way to show | ||
| 353 | the match inside the page image; instead, it displays a tooltip (at | ||
| 354 | the mouse position) listing all matching lines in the current page. | ||
| 355 | To 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 | ||
| 359 | argument; i.e., @kbd{C-u C-s} for a forward search or @kbd{C-u C-r} | ||
| 360 | for a backward search. | ||
| 361 | |||
| 362 | @node Slicing | ||
| 363 | @subsection Slicing | ||
| 364 | |||
| 365 | Documents often have wide margins for printing. They are annoying | ||
| 366 | when reading the document on the screen, because they use up screen | ||
| 367 | space 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} | ||
| 372 | of pages to display. A slice is a rectangle within the page area; | ||
| 373 | once you specify a slice in DocView, it applies to whichever page you | ||
| 374 | look 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 | ||
| 378 | and 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 | ||
| 382 | m} (@code{doc-view-set-slice-using-mouse}), where you use the mouse to | ||
| 383 | select 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 | ||
| 389 | including its entire margins. | ||
| 390 | |||
| 391 | @node Conversion | ||
| 392 | @subsection Conversion | ||
| 393 | |||
| 394 | @vindex doc-view-cache-directory | ||
| 395 | @findex doc-view-clear-cache | ||
| 396 | For efficiency, DocView caches the images produced by @command{gs}. | ||
| 397 | The name of this directory is given by the variable | ||
| 398 | @code{doc-view-cache-directory}. You can clear the cache directory by | ||
| 399 | typing @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 | ||
| 405 | process 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 | ||
| 408 | the 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 | ||
| 412 | size. 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 |
| 1672 | networked file system such as NFS.) | 1597 | networked file system such as NFS.) |
| 1673 | 1598 | ||
| 1599 | @vindex server-port | ||
| 1600 | When the Emacs server is using TCP, the variable @code{server-port} | ||
| 1601 | determines 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 |
| 1676 | Let @command{emacsclient} exit immediately, instead of waiting until | 1606 | Let @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, |
| 1794 | either printing it or leaving it in another Emacs buffer. | 1724 | either 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}. | |||
| 1973 | described in the Lisp files @file{ps-print.el} and @file{ps-mule.el}. | 1903 | described 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 | |||
| 1999 | further information on the various options, use the @samp{Interface | 1929 | further information on the various options, use the @samp{Interface |
| 2000 | Help} button. | 1930 | Help} 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, | ||
| 2145 | making the rest temporarily inaccessible. The portion which you can | ||
| 2146 | still get to is called the @dfn{accessible portion}. Canceling the | ||
| 2147 | narrowing, which makes the entire buffer once again accessible, is | ||
| 2148 | called @dfn{widening}. The bounds of narrowing in effect in a buffer | ||
| 2149 | are called the buffer's @dfn{restriction}. | ||
| 2150 | |||
| 2151 | Narrowing can make it easier to concentrate on a single subroutine or | ||
| 2152 | paragraph by eliminating clutter. It can also be used to limit the | ||
| 2153 | range of operation of a replace command or repeating keyboard macro. | ||
| 2154 | |||
| 2155 | @table @kbd | ||
| 2156 | @item C-x n n | ||
| 2157 | Narrow down to between point and mark (@code{narrow-to-region}). | ||
| 2158 | @item C-x n w | ||
| 2159 | Widen to make the entire buffer accessible again (@code{widen}). | ||
| 2160 | @item C-x n p | ||
| 2161 | Narrow down to the current page (@code{narrow-to-page}). | ||
| 2162 | @item C-x n d | ||
| 2163 | Narrow 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 | ||
| 2167 | to 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 | ||
| 2169 | it in any way. However, it is not gone, and if you save the file all | ||
| 2170 | the inaccessible text will be saved. The word @samp{Narrow} appears in | ||
| 2171 | the 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}). | ||
| 2176 | It sets the current buffer's restrictions so that the text in the current | ||
| 2177 | region remains accessible, but all text before the region or after the | ||
| 2178 | region 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 | ||
| 2185 | down 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 | ||
| 2187 | containing 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 | ||
| 2195 | to 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 | ||
| 2199 | this command asks for confirmation and gives you the option of enabling it; | ||
| 2200 | if you enable the command, confirmation will no longer be required for | ||
| 2201 | it. @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 | ||
| 2210 | text. It uses two side-by-side windows, each showing its own | ||
| 2211 | buffer. | ||
| 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 | ||
| 2220 | Enter two-column mode with the current buffer on the left, and on the | ||
| 2221 | right, 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 | ||
| 2223 | exist, it starts out empty; the current buffer's contents are not | ||
| 2224 | changed. | ||
| 2225 | |||
| 2226 | This command is appropriate when the current buffer is empty or contains | ||
| 2227 | just 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 | ||
| 2233 | Split the current buffer, which contains two-column text, into two | ||
| 2234 | buffers, and display them side by side (@code{2C-split}). The current | ||
| 2235 | buffer becomes the left-hand buffer, but the text in the right-hand | ||
| 2236 | column is moved into the right-hand buffer. The current column | ||
| 2237 | specifies the split point. Splitting starts with the current line and | ||
| 2238 | continues to the end of the buffer. | ||
| 2239 | |||
| 2240 | This command is appropriate when you have a buffer that already contains | ||
| 2241 | two-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 | ||
| 2248 | Enter two-column mode using the current buffer as the left-hand buffer, | ||
| 2249 | and 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 |
| 2254 | is a string that appears on each line between the two columns. You can | ||
| 2255 | specify the width of the separator with a numeric argument to | ||
| 2256 | @kbd{@key{F2} s}; that many characters, before point, constitute the | ||
| 2257 | separator string. By default, the width is 1, so the column separator | ||
| 2258 | is the character before point. | ||
| 2259 | |||
| 2260 | When a line has the separator at the proper place, @kbd{@key{F2} s} | ||
| 2261 | puts the text after the separator into the right-hand buffer, and | ||
| 2262 | deletes the separator. Lines that don't have the column separator at | ||
| 2263 | the proper place remain unsplit; they stay in the left-hand buffer, and | ||
| 2264 | the right-hand buffer gets an empty line to correspond. (This is the | ||
| 2265 | way to write a line that ``spans both columns while in two-column | ||
| 2266 | mode'': write it in the left-hand buffer, and put an empty line in the | ||
| 2267 | right-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 | ||
| 2274 | corresponding positions. This is the easiest way to add a new line to | ||
| 2275 | the 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 | ||
| 2282 | text from the right-hand buffer as a second column in the other buffer. | ||
| 2283 | To 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, | ||
| 2289 | leaving each as it stands (@code{2C-dissociate}). If the other buffer, | ||
| 2290 | the 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 | |||
| 2738 | find the one you select (@code{ffap-menu}). | 2518 | find 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 |
| 357 | Windows, Emacs performs a single case-insensitive search through | 357 | performs a case-sensitive search through @code{auto-mode-alist}; if |
| 358 | @code{auto-mode-alist}. On other systems, Emacs normally performs a | 358 | this search fails, it performs a second case-insensitive search |
| 359 | single case-sensitive search through the alist. However, if you | 359 | through the alist. To suppress the second search, change the variable |
| 360 | change the variable @code{auto-mode-case-fold} to @code{t}, Emacs | 360 | @code{auto-mode-case-fold} to @code{nil}. On systems with |
| 361 | performs a second case-insensitive search if the first search fails. | 361 | case-insensitive file names, such as Microsoft Windows, Emacs performs |
| 362 | a 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 | |||
| 12 | Emacs includes a facility that lets you easily download and install | ||
| 13 | @dfn{packages} that implement additional features. Each package is a | ||
| 14 | separate Emacs Lisp program, sometimes including other components such | ||
| 15 | as an Info manual. | ||
| 16 | |||
| 17 | @kbd{M-x list-packages} brings up a buffer named @samp{*Packages*} | ||
| 18 | with a list of all packages. You can install or uninstall packages | ||
| 19 | via this buffer. @xref{Package Menu}. | ||
| 20 | |||
| 21 | @findex describe-package | ||
| 22 | The command @kbd{C-h P} (@code{describe-package}) prompts for the | ||
| 23 | name of a package, and displays a help buffer describing that | ||
| 24 | attributes of the package and the features that it implements. | ||
| 25 | |||
| 26 | By default, Emacs downloads packages from a @dfn{package archive} | ||
| 27 | maintained by the Emacs developers and hosted by the GNU project. | ||
| 28 | Optionally, you can also download packages from archives maintained by | ||
| 29 | third parties. @xref{Package Installation}. | ||
| 30 | |||
| 31 | For information about turning an Emacs Lisp program into an | ||
| 32 | installable package, @xref{Packaging,,,elisp, The Emacs Lisp Reference | ||
| 33 | Manual}. For information about finding third-party packages and other | ||
| 34 | Emacs Lisp extensions, @xref{Packages that do not come with | ||
| 35 | Emacs,,,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 | |||
| 49 | The command @kbd{M-x list-packages} brings up the @dfn{package menu}. | ||
| 50 | This is a buffer listing all the packages that Emacs knows about, one | ||
| 51 | on each line, with the following information: | ||
| 52 | |||
| 53 | @itemize @bullet | ||
| 54 | @item | ||
| 55 | The package name (e.g. @samp{auctex}). | ||
| 56 | |||
| 57 | @item | ||
| 58 | The package's version number (e.g. @samp{11.86}). | ||
| 59 | |||
| 60 | @item | ||
| 61 | The package's status---normally one of @samp{available} (can be | ||
| 62 | downloaded from the package archive), @samp{installed}, or | ||
| 63 | @samp{built-in} (included in Emacs by default). | ||
| 64 | |||
| 65 | In some instances, the status can be @samp{held}, @samp{disabled}, or | ||
| 66 | @samp{obsolete}. @xref{Package Installation}. | ||
| 67 | |||
| 68 | @item | ||
| 69 | A short description of the package. | ||
| 70 | @end itemize | ||
| 71 | |||
| 72 | @noindent | ||
| 73 | The @code{list-packages} command accesses the network, to retrieve the | ||
| 74 | list of available packages from the package archive server. If the | ||
| 75 | network is unavailable, it falls back on the most recently retrieved | ||
| 76 | list. | ||
| 77 | |||
| 78 | The following commands are available in the package menu: | ||
| 79 | |||
| 80 | @table @kbd | ||
| 81 | @item h | ||
| 82 | Print a short message summarizing how to use the package menu | ||
| 83 | (@code{package-menu-quick-help}). | ||
| 84 | |||
| 85 | @item ? | ||
| 86 | @itemx @key{RET} | ||
| 87 | Display a help buffer for the package on the current line | ||
| 88 | (@code{package-menu-describe-package}), similar to the help window | ||
| 89 | displayed by the @kbd{C-h P} command (@pxref{Packages}). | ||
| 90 | |||
| 91 | @item i | ||
| 92 | Mark 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 | ||
| 95 | line; typing @kbd{x} (see below) will download and install the | ||
| 96 | package. | ||
| 97 | |||
| 98 | @item d | ||
| 99 | Mark 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 | ||
| 102 | line; typing @kbd{x} (see below) will delete the package. | ||
| 103 | @xref{Package Files}, for information about what package deletion | ||
| 104 | entails. | ||
| 105 | |||
| 106 | @item u | ||
| 107 | Remove any installation or deletion mark previously added to the | ||
| 108 | current line by an @kbd{i} or @kbd{d} command. | ||
| 109 | |||
| 110 | @item x | ||
| 111 | Download and install all packages marked with @kbd{i}, and their | ||
| 112 | dependencies; also, delete all packages marked with @kbd{d} | ||
| 113 | (@code{package-menu-execute}). This also removes the marks. | ||
| 114 | |||
| 115 | @item r | ||
| 116 | Refresh the package list (@code{package-menu-refresh}). This also | ||
| 117 | retrieves the list of available packages from the package archive | ||
| 118 | again. | ||
| 119 | @end table | ||
| 120 | |||
| 121 | @noindent | ||
| 122 | For example, you can install a package by typing @kbd{i} on the line | ||
| 123 | listing 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 | ||
| 131 | package-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, | ||
| 136 | because it relies on functionality provided by them. When Emacs | ||
| 137 | installs such a package, it also automatically downloads and installs | ||
| 138 | any required package that is not already installed. (If a required | ||
| 139 | package is somehow unavailable, Emacs signals an error and stops | ||
| 140 | installation.) A package's requirements list is shown in its help | ||
| 141 | buffer. | ||
| 142 | |||
| 143 | @vindex package-archives | ||
| 144 | By default, packages are downloaded from a single package archive | ||
| 145 | maintained by the Emacs developers. This is controlled by the | ||
| 146 | variable @code{package-archives}, whose value is a list of package | ||
| 147 | archives known to Emacs. Each list element must have the form | ||
| 148 | @code{(@var{id} . @var{location})}, where @var{id} is the name of a | ||
| 149 | package archive and @var{location} is the @acronym{HTTP} address or | ||
| 150 | directory name of the package archive. You can alter this list if you | ||
| 151 | wish to use third party package archives---but do so at your own risk, | ||
| 152 | and use only third parties that you think you can trust! | ||
| 153 | |||
| 154 | Once a package is downloaded and installed, it takes effect in the | ||
| 155 | current Emacs session. What ``taking effect'' means depends on the | ||
| 156 | package; most packages just make some new commands available, while | ||
| 157 | others have more wide-ranging effects on the Emacs session. For such | ||
| 158 | information, 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 | ||
| 162 | happens at startup, after processing the init file (@pxref{Init | ||
| 163 | File}). As an exception, Emacs does not load packages at startup if | ||
| 164 | invoked 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 | ||
| 171 | can use the command @kbd{M-x package-initialize} to load your | ||
| 172 | packages. | ||
| 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 | ||
| 177 | of the form @code{(@var{name} @var{version})} tells Emacs to load | ||
| 178 | version @var{version} of the package named @var{name}. Here, | ||
| 179 | @var{version} should be a version string (corresponding to a specific | ||
| 180 | version of the package), or @code{t} (which means to load any | ||
| 181 | installed version), or @code{nil} (which means no version; this | ||
| 182 | ``disables'' the package, preventing it from being loaded). A list | ||
| 183 | element can also be the symbol @code{all}, which means to load the | ||
| 184 | latest installed version of any package not named by the other list | ||
| 185 | elements. 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} | ||
| 189 | package, plus any installed version of packages other than | ||
| 190 | @samp{muse}. Any other version of @samp{muse} that happens to be | ||
| 191 | installed will be ignored. The @samp{muse} package will be listed in | ||
| 192 | the 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 | ||
| 201 | single @dfn{package file}---either an Emacs Lisp source file, or a tar | ||
| 202 | file containing multiple Emacs Lisp source and other files. Package | ||
| 203 | files are automatically retrieved, processed, and disposed of by the | ||
| 204 | Emacs commands that install packages. Normally, you will not need to | ||
| 205 | deal directly with them, unless you are making a package | ||
| 206 | (@pxref{Packaging,,,elisp, The Emacs Lisp Reference Manual}). Should | ||
| 207 | you ever need to install a package directly from a package file, use | ||
| 208 | the 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 | ||
| 212 | subdirectory of @file{~/.emacs.d/elpa/} (you can change the name of | ||
| 213 | that directory by changing the variable @code{package-user-dir}). The | ||
| 214 | package subdirectory is named @file{@var{name}-@var{version}}, where | ||
| 215 | @var{name} is the package name and @var{version} is its version | ||
| 216 | string. | ||
| 217 | |||
| 218 | @cindex system-wide packages | ||
| 219 | @vindex package-directory-list | ||
| 220 | In addition to @code{package-user-dir}, Emacs looks for installed | ||
| 221 | packages in the directories listed in @code{package-directory-list}. | ||
| 222 | These directories are meant for system administrators to make Emacs | ||
| 223 | packages available system-wide; Emacs itself never installs packages | ||
| 224 | there. The package subdirectories for @code{package-directory-list} | ||
| 225 | are laid out in the same way as in @code{package-user-dir}. | ||
| 226 | |||
| 227 | Deleting a package (@pxref{Package Menu}) involves deleting the | ||
| 228 | corresponding package subdirectory. This only works for packages | ||
| 229 | installed in @code{package-user-dir}; if told to act on a package in a | ||
| 230 | system-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 | |||
| 124 | Picture}). | 124 | Picture}). |
| 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 | |||
| 188 | C-b} (@code{picture-motion-reverse}) moves in the opposite direction. | 188 | C-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 | |||
| 2837 | destination buffer. The default destination buffer is | 2838 | destination 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 |
| 2839 | specified. | 2840 | specified. |
| 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 | ||
| 2849 | text. It uses two side-by-side windows, each showing its own | ||
| 2850 | buffer. | ||
| 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 | ||
| 2859 | Enter two-column mode with the current buffer on the left, and on the | ||
| 2860 | right, 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 | ||
| 2862 | exist, it starts out empty; the current buffer's contents are not | ||
| 2863 | changed. | ||
| 2864 | |||
| 2865 | This command is appropriate when the current buffer is empty or contains | ||
| 2866 | just 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 | ||
| 2872 | Split the current buffer, which contains two-column text, into two | ||
| 2873 | buffers, and display them side by side (@code{2C-split}). The current | ||
| 2874 | buffer becomes the left-hand buffer, but the text in the right-hand | ||
| 2875 | column is moved into the right-hand buffer. The current column | ||
| 2876 | specifies the split point. Splitting starts with the current line and | ||
| 2877 | continues to the end of the buffer. | ||
| 2878 | |||
| 2879 | This command is appropriate when you have a buffer that already contains | ||
| 2880 | two-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 | ||
| 2887 | Enter two-column mode using the current buffer as the left-hand buffer, | ||
| 2888 | and 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 | ||
| 2893 | is a string that appears on each line between the two columns. You can | ||
| 2894 | specify the width of the separator with a numeric argument to | ||
| 2895 | @kbd{@key{F2} s}; that many characters, before point, constitute the | ||
| 2896 | separator string. By default, the width is 1, so the column separator | ||
| 2897 | is the character before point. | ||
| 2898 | |||
| 2899 | When a line has the separator at the proper place, @kbd{@key{F2} s} | ||
| 2900 | puts the text after the separator into the right-hand buffer, and | ||
| 2901 | deletes the separator. Lines that don't have the column separator at | ||
| 2902 | the proper place remain unsplit; they stay in the left-hand buffer, and | ||
| 2903 | the right-hand buffer gets an empty line to correspond. (This is the | ||
| 2904 | way to write a line that ``spans both columns while in two-column | ||
| 2905 | mode'': write it in the left-hand buffer, and put an empty line in the | ||
| 2906 | right-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 | ||
| 2913 | corresponding positions. This is the easiest way to add a new line to | ||
| 2914 | the 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 | ||
| 2921 | text from the right-hand buffer as a second column in the other buffer. | ||
| 2922 | To 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, | ||
| 2928 | leaving each as it stands (@code{2C-dissociate}). If the other buffer, | ||
| 2929 | the 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 @@ | |||
| 1 | 2011-08-30 Dani Moncayo <dmoncayo@gmail.com> (tiny change) | ||
| 2 | |||
| 3 | * lists.texi (Building Lists): Fix typo. | ||
| 4 | |||
| 5 | 2011-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 | |||
| 12 | 2011-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 | |||
| 19 | 2011-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 | |||
| 37 | 2011-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 | |||
| 44 | 2011-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 | |||
| 50 | 2011-08-23 Eli Zaretskii <eliz@gnu.org> | ||
| 51 | |||
| 52 | * nonascii.texi (Character Properties): Document the values for | ||
| 53 | unassigned codepoints. | ||
| 54 | |||
| 55 | 2011-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 | |||
| 68 | 2011-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 | |||
| 84 | 2011-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 | |||
| 90 | 2011-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 | |||
| 1 | 2011-07-28 Eli Zaretskii <eliz@gnu.org> | 95 | 2011-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 | ||
| 602 | This variable controls whether Lisp automatically displays a | ||
| 603 | backtrace buffer after every error that is not handled. A quit signal | ||
| 604 | counts as an error for this variable. If it is non-@code{nil} then a | ||
| 605 | backtrace is shown in a pop-up buffer named @samp{*Backtrace*} on every | ||
| 606 | error. If it is @code{nil}, then a backtrace is not shown. | ||
| 607 | |||
| 608 | When 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 | ||
| 610 | a backtrace is shown in one buffer, and the debugger is popped up in | ||
| 611 | another buffer with its own backtrace. | ||
| 612 | |||
| 613 | We consider this feature to be obsolete and superseded by the debugger | ||
| 614 | itself. | ||
| 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 |
| 368 | user about the progress it makes. This way the user can estimate | 368 | user about the progress it makes. This way the user can estimate |
| 369 | remaining time and clearly see that Emacs is busy working, not hung. | 369 | remaining time and clearly see that Emacs is busy working, not hung. |
| 370 | A 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: |
| 372 | reporting operation progress. Here is a working example that does | ||
| 373 | nothing 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 |
| 386 | This function creates and returns a @dfn{progress reporter}---an | 385 | This function creates and returns a progress reporter object, which |
| 387 | object you will use as an argument for all other functions listed | 386 | you will use as an argument for the other functions listed below. The |
| 388 | here. The idea is to precompute as much data as possible to make | 387 | idea is to precompute as much data as possible to make progress |
| 389 | progress reporting very fast. | 388 | reporting very fast. |
| 390 | 389 | ||
| 391 | When this progress reporter is subsequently used, it will display | 390 | When 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 | |||
| 394 | on a filename, for instance, use @code{format} before calling this | 393 | on a filename, for instance, use @code{format} before calling this |
| 395 | function. | 394 | function. |
| 396 | 395 | ||
| 397 | @var{min-value} and @var{max-value} arguments stand for starting and | 396 | The arguments @var{min-value} and @var{max-value} should be numbers |
| 398 | final states of your operation. For instance, if you scan a buffer, | 397 | standing for the starting and final states of the operation. For |
| 399 | they should be the results of @code{point-min} and @code{point-max} | 398 | instance, an operation that ``scans'' a buffer should set these to the |
| 400 | correspondingly. It is required that @var{max-value} is greater than | 399 | results 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}. |
| 402 | the operation has already been completed, then specify | 401 | |
| 403 | @var{current-value} argument. But normally you should omit it or set | 402 | Alternatively, you can set @var{min-value} and @var{max-value} to |
| 404 | it to @code{nil}---it will default to @var{min-value} then. | 403 | @code{nil}. In that case, the progress reporter does not report |
| 405 | 404 | process percentages; it instead displays a ``spinner'' that rotates a | |
| 406 | Remaining arguments control the rate of echo area updates. Progress | 405 | notch each time you update the progress reporter. |
| 407 | reporter will wait for at least @var{min-change} more percents of the | 406 | |
| 408 | operation to be completed before printing next message. | 407 | If @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 | 408 | argument @var{current-value} a numerical value specifying the initial |
| 410 | successive prints. It can be fractional. Depending on Emacs and | 409 | progress; if omitted, this defaults to @var{min-value}. |
| 411 | system capabilities, progress reporter may or may not respect this | 410 | |
| 412 | last argument or do it with varying precision. Default value for | 411 | The remaining arguments control the rate of echo area updates. The |
| 413 | @var{min-change} is 1 (one percent), for @var{min-time}---0.2 | 412 | progress reporter will wait for at least @var{min-change} more |
| 414 | (seconds.) | 413 | percents of the operation to be completed before printing next |
| 414 | message; the default is one percent. @var{min-time} specifies the | ||
| 415 | minimum time in seconds to pass between successive prints; the default | ||
| 416 | is 0.2 seconds. (On some operating systems, the progress reporter may | ||
| 417 | handle fractions of seconds with varying precision). | ||
| 415 | 418 | ||
| 416 | This function calls @code{progress-reporter-update}, so the first | 419 | This function calls @code{progress-reporter-update}, so the first |
| 417 | message is printed immediately. | 420 | message 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)} |
| 1456 | This property is used instead of @code{face} when the mouse is within | 1459 | This property is used instead of @code{face} when the mouse is within |
| 1457 | the range of the overlay. | 1460 | the range of the overlay. However, Emacs ignores all face attributes |
| 1461 | from this property that alter the text size (e.g. @code{:height}, | ||
| 1462 | @code{:weight}, and @code{:slant}). Those attributes are always the | ||
| 1463 | same 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 | |||
| 2681 | usually assign faces to around 400 to 600 characters at each call. | 2688 | usually 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 | |||
| 2694 | If your Emacs Lisp program needs to assign some faces to text, it is | ||
| 2695 | often a good idea to use certain existing faces or inherit from them, | ||
| 2696 | rather than defining entirely new faces. This way, if other users | ||
| 2697 | have customized the basic faces to give Emacs a certain look, your | ||
| 2698 | program will ``fit in'' without additional customization. | ||
| 2699 | |||
| 2700 | Some of the basic faces defined in Emacs are listed below. In | ||
| 2701 | addition to these, you might want to make use of the Font Lock faces | ||
| 2702 | for syntactic highlighting, if highlighting is not already handled by | ||
| 2703 | Font 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 | ||
| 2708 | The default face, whose attributes are all specified. All other faces | ||
| 2709 | implicitly inherit from it: any unspecified attribute defaults to the | ||
| 2710 | attribute 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 | ||
| 2718 | These have the attributes indicated by their names (e.g. @code{bold} | ||
| 2719 | has a bold @code{:weight} attribute), with all other attributes | ||
| 2720 | unspecified (and so given by @code{default}). | ||
| 2721 | |||
| 2722 | @item shadow | ||
| 2723 | For ``dimmed out'' text. For example, it is used for the ignored | ||
| 2724 | part of a filename in the minibuffer (@pxref{Minibuffer File,, | ||
| 2725 | Minibuffers for File Names, emacs, The GNU Emacs Manual}). | ||
| 2726 | |||
| 2727 | @item link | ||
| 2728 | @itemx link-visited | ||
| 2729 | For clickable text buttons that send the user to a different | ||
| 2730 | buffer or ``location''. | ||
| 2731 | |||
| 2732 | @item highlight | ||
| 2733 | For stretches of text that should temporarily stand out. For example, | ||
| 2734 | it is commonly assigned to the @code{mouse-face} property for cursor | ||
| 2735 | highlighting (@pxref{Special Properties}). | ||
| 2736 | |||
| 2737 | @item match | ||
| 2738 | For text matching a search command. | ||
| 2739 | |||
| 2740 | @item error | ||
| 2741 | @itemx warning | ||
| 2742 | @itemx success | ||
| 2743 | For text concerning errors, warnings, or successes. For example, | ||
| 2744 | these 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}). | |||
| 3791 | non-graphic terminals, but the other space properties in this section | 3854 | non-graphic terminals, but the other space properties in this section |
| 3792 | are not. | 3855 | are not. |
| 3793 | 3856 | ||
| 3857 | Note that space properties are treated as paragraph separators for | ||
| 3858 | the 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. | |||
| 5989 | for editing and displaying bidirectional text. | 6056 | for 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 | |||
| 6003 | a ``Full bidirectionality'' class implementation of the @acronym{UBA}. | 6071 | a ``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 |
| 6007 | whether text in the buffer is reordered for display. If its value is | 6075 | reordered for display. If its value is non-@code{nil}, Emacs reorders |
| 6008 | non-@code{nil}, Emacs reorders characters that have right-to-left | 6076 | characters that have right-to-left directionality when they are |
| 6009 | directionality when they are displayed. The default value is | 6077 | displayed. 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 |
| 6011 | Properties,,before-string}), display strings (@pxref{Overlay | 6079 | (@pxref{Overlay Properties,,display}), and @code{display} text |
| 6012 | Properties,,display}), and @code{display} text properties | 6080 | properties (@pxref{Display Property}) is also reordered for display if |
| 6013 | (@pxref{Display Property}) is also reordered if the buffer whose text | 6081 | the buffer whose text includes these strings is reordered. Turning |
| 6014 | includes these strings is reordered for display. Turning off | 6082 | off @code{bidi-display-reordering} for a buffer turns off reordering |
| 6015 | @code{bidi-display-reordering} for a buffer turns off reordering of | 6083 | of all the overlay and display strings in that buffer. |
| 6016 | all 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 |
| 6019 | displayed on the mode line (@pxref{Mode Line Format}) or header line | 6086 | displayed 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 | |||
| 6053 | covered by these properties is reordered together. Moreover, the | 6120 | covered by these properties is reordered together. Moreover, the |
| 6054 | bidirectional properties of the characters in this chunk of text are | 6121 | bidirectional properties of the characters in this chunk of text are |
| 6055 | ignored, and Emacs reorders them as if they were replaced with a | 6122 | ignored, and Emacs reorders them as if they were replaced with a |
| 6056 | single character @code{u+FFFC}, known as the @dfn{Object Replacement | 6123 | single character @code{U+FFFC}, known as the @dfn{Object Replacement |
| 6057 | Character}. This means that placing a display property over a portion | 6124 | Character}. This means that placing a display property over a portion |
| 6058 | of text may change the way that the surrounding text is reordered for | 6125 | of text may change the way that the surrounding text is reordered for |
| 6059 | display. To prevent this unexpected effect, always place such | 6126 | display. 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 | |||
| 6070 | margin. | 6137 | margin. |
| 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 |
| 6074 | based on the text at the beginning of the paragraph. The precise | 6141 | dynamically, based on the text at the beginning of the paragraph. The |
| 6075 | method of determining the base direction is specified by the | 6142 | precise 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 |
| 6077 | has an explicit directionality determines the base direction of the | 6144 | has an explicit directionality determines the base direction of the |
| 6078 | paragraph. However, sometimes a buffer may need to force a certain | 6145 | paragraph. However, sometimes a buffer may need to force a certain |
| @@ -6084,6 +6151,13 @@ dynamic determination of the base direction, and instead forces all | |||
| 6084 | paragraphs in the buffer to have the direction specified by its | 6151 | paragraphs in the buffer to have the direction specified by its |
| 6085 | buffer-local value. The value can be either @code{right-to-left} or | 6152 | buffer-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}. |
| 6154 | The default is @code{nil}. | ||
| 6155 | |||
| 6156 | @cindex @code{prog-mode}, and @code{bidi-paragraph-direction} | ||
| 6157 | Modes that are meant to display program source code should force a | ||
| 6158 | @code{left-to-right} paragraph direction. The easiest way of doing so | ||
| 6159 | is 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 | |||
| 6094 | buffer-local value of the variable @code{bidi-paragraph-direction} is | 6168 | buffer-local value of the variable @code{bidi-paragraph-direction} is |
| 6095 | non-@code{nil}, the returned value will be identical to that value; | 6169 | non-@code{nil}, the returned value will be identical to that value; |
| 6096 | otherwise, the returned value reflects the paragraph direction | 6170 | otherwise, the returned value reflects the paragraph direction |
| 6097 | determined dynamically by Emacs. | 6171 | determined dynamically by Emacs. For buffers whose value of |
| 6098 | @end defun | 6172 | @code{bidi-display-reordering} is @code{nil} as well as unibyte |
| 6173 | buffers, 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 | ||
| 6180 | unpleasant effects when two strings with bidirectional content are | ||
| 6181 | juxtaposed in a buffer, or otherwise programmatically concatenated | ||
| 6182 | into a string of text. A typical example is a buffer whose lines are | ||
| 6183 | actually sequences of items, or fields, separated by whitespace or | ||
| 6184 | punctuation characters. This is used in specialized modes such as | ||
| 6185 | Buffer-menu Mode or various email summary modes, like Rmail Summary | ||
| 6186 | Mode. Because these separator characters are @dfn{weak}, i.e.@: have | ||
| 6187 | no strong directionality, they take on the directionality of | ||
| 6188 | surrounding text. As result, a numeric field that follows a field | ||
| 6189 | with bidirectional content can be displayed @emph{to the left} of the | ||
| 6190 | preceding field, producing a jumbled display and messing up the | ||
| 6191 | expected layout. | ||
| 6192 | |||
| 6193 | To countermand this, we recommend that you use one of the following | ||
| 6194 | techniques for forcing correct order of fields on display: | ||
| 6195 | |||
| 6196 | @itemize @minus | ||
| 6197 | @item | ||
| 6198 | Append the special character @code{U+200E}, LEFT-TO-RIGHT MARK, or | ||
| 6199 | @acronym{LRM}, to the end of each field that may have bidirectional | ||
| 6200 | content, or prepend it to the beginning of the following field. The | ||
| 6201 | function @code{bidi-string-mark-left-to-right}, described below, comes | ||
| 6202 | in handy for this purpose. (In a right-to-left paragraph, use | ||
| 6203 | @code{U+200F}, RIGHT-TO-LEFT MARK, or @acronym{RLM}, instead.) This | ||
| 6204 | is one of the solutions recommended by | ||
| 6205 | @uref{http://www.unicode.org/reports/tr9/#Separators, the | ||
| 6206 | @acronym{UBA}}. | ||
| 6207 | |||
| 6208 | @item | ||
| 6209 | Include the tab character in the field separator. The tab character | ||
| 6210 | plays the role of @dfn{segment separator} in the @acronym{UBA} | ||
| 6211 | reordering, whose effect is to make each field a separate segment, and | ||
| 6212 | thus reorder them separately. | ||
| 6213 | |||
| 6214 | @cindex @code{space} display spec, and bidirectional text | ||
| 6215 | @item | ||
| 6216 | Separate fields with a @code{display} property or overlay with the | ||
| 6217 | property value of the form @code{(space . PROPS)} (@pxref{Specified | ||
| 6218 | Space}). This display specification is treated by Emacs as a | ||
| 6219 | @dfn{paragraph separator}; the text before and after the separator is | ||
| 6220 | reordered separately, which avoids the influence of any field on its | ||
| 6221 | neighboring fields. | ||
| 6222 | @end itemize | ||
| 6223 | |||
| 6224 | @defun bidi-string-mark-left-to-right string | ||
| 6225 | This subroutine returns its argument @var{string}, possibly modified, | ||
| 6226 | such that the result can be safely concatenated with another string, | ||
| 6227 | or juxtaposed with another string in a buffer, without disrupting the | ||
| 6228 | relative layout of this string and the next one on display. If the | ||
| 6229 | string returned by this function is displayed as part of a | ||
| 6230 | left-to-right paragraph, it will always appear on display to the left | ||
| 6231 | of the text that follows it. The function works by examining the | ||
| 6232 | characters of its argument, and if any of those characters could cause | ||
| 6233 | reordering on display, the function appends the @acronym{LRM} | ||
| 6234 | character 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 | ||
| 6239 | characters stored as their @code{bidi-class} property | ||
| 6240 | (@pxref{Character Properties}). Lisp programs can change these | ||
| 6241 | properties by calling the @code{put-char-code-property} function. | ||
| 6242 | However, doing this requires a thorough understanding of the | ||
| 6243 | @acronym{UBA}, and is therefore not recommended. Any changes to the | ||
| 6244 | bidirectional properties of a character have global effect: they | ||
| 6245 | affect all Emacs frames and windows. | ||
| 6246 | |||
| 6247 | Similarly, the @code{mirroring} property is used to display the | ||
| 6248 | appropriate mirrored character in the reordered text. Lisp programs | ||
| 6249 | can affect the mirrored display by changing this property. Again, any | ||
| 6250 | such 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 | ||
| 779 | Major Modes | 778 | Major 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 | ||
| 207 | This command visits @var{filename} using View mode, returning to the | ||
| 208 | previous buffer when you exit View mode. View mode is a minor mode that | ||
| 209 | provides commands to skim rapidly through the file, but does not let you | ||
| 210 | modify the text. Entering View mode runs the normal hook | ||
| 211 | @code{view-mode-hook}. @xref{Hooks}. | ||
| 212 | |||
| 213 | When @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 |
| 218 | If this variable is non-@code{nil}, then the various @code{find-file} | 207 | If this variable is non-@code{nil}, then the various @code{find-file} |
| 219 | commands check for wildcard characters and visit all the files that | 208 | commands 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 | |||
| 1529 | links. | 1518 | links. |
| 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 |
| 1534 | This command deletes the file @var{filename}, like the shell command | 1525 | This command deletes the file @var{filename}. If the file has |
| 1535 | @samp{rm @var{filename}}. If the file has multiple names, it continues | 1526 | multiple names, it continues to exist under the other names. If |
| 1536 | to exist under the other names. | 1527 | @var{filename} is a symbolic link, @code{delete-file} deletes only the |
| 1537 | 1528 | symbolic link and not its target (though it does follow symbolic links | |
| 1538 | A suitable kind of @code{file-error} error is signaled if the file does | 1529 | at all levels of parent directories). |
| 1539 | not exist, or is not deletable. (On Unix and GNU/Linux, a file is | 1530 | |
| 1540 | deletable if its directory is writable.) | 1531 | A suitable kind of @code{file-error} error is signaled if the file |
| 1541 | 1532 | does not exist, or is not deletable. (On Unix and GNU/Linux, a file | |
| 1542 | If @var{filename} is a symbolic link, @code{delete-file} does not | 1533 | is deletable if its directory is writable.) |
| 1543 | replace it with its target, but it does follow symbolic links at all | 1534 | |
| 1544 | levels of parent directories. | 1535 | If the optional argument @var{trash} is non-@code{nil} and the |
| 1536 | variable @code{delete-by-moving-to-trash} is non-@code{nil}, this | ||
| 1537 | command moves the file into the system Trash instead of deleting it. | ||
| 1538 | @xref{Misc File Ops,,Miscellaneous File Operations, emacs, The GNU | ||
| 1539 | Emacs Manual}. When called interactively, @var{trash} is @code{t} if | ||
| 1540 | no prefix argument is given, and @code{nil} otherwise. | ||
| 1545 | 1541 | ||
| 1546 | See also @code{delete-directory} in @ref{Create/Delete Dirs}. | 1542 | See 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 |
| 2511 | This command copies the directory named @var{dirname} to | 2507 | This 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 | |||
| 2515 | It always sets the file modes of the copied files to match the | 2511 | It always sets the file modes of the copied files to match the |
| 2516 | corresponding original file. | 2512 | corresponding original file. |
| 2517 | 2513 | ||
| 2518 | The third arg @var{keep-time} non-@code{nil} means to preserve the | 2514 | The third argument @var{keep-time} non-@code{nil} means to preserve the |
| 2519 | modification time of the copied files. A prefix arg makes | 2515 | modification 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 | ||
| 2522 | Noninteractively, the last argument @var{parents} says whether to | 2518 | The fourth argument @var{parents} says whether to |
| 2523 | create parent directories if they don't exist. Interactively, | 2519 | create parent directories if they don't exist. Interactively, |
| 2524 | this happens by default. | 2520 | this happens by default. |
| 2521 | |||
| 2522 | The fifth argument @var{copy-contents}, if non-@code{nil}, means to | ||
| 2523 | copy the contents of @var{dirname} directly into @var{newname} if the | ||
| 2524 | latter is an existing directory, instead of copying @var{dirname} into | ||
| 2525 | it 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 | ||
| 2528 | This command deletes the directory named @var{dirname}. The function | 2531 | This 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 |
| 2530 | must use @code{delete-directory} for them. If @var{recursive} is | 2533 | must 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 |
| 2535 | parent directories. | 2538 | parent directories. |
| 2539 | |||
| 2540 | If the optional argument @var{trash} is non-@code{nil} and the | ||
| 2541 | variable @code{delete-by-moving-to-trash} is non-@code{nil}, this | ||
| 2542 | command moves the file into the system Trash instead of deleting it. | ||
| 2543 | @xref{Misc File Ops,,Miscellaneous File Operations, emacs, The GNU | ||
| 2544 | Emacs Manual}. When called interactively, @var{trash} is @code{t} if | ||
| 2545 | no 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 | |||
| 695 | precise width by specifying that width as a negative integer. If both | 695 | precise width by specifying that width as a negative integer. If both |
| 696 | widths are negative, only the left fringe gets the specified width. | 696 | widths 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 |
| 700 | The number of lines to allocate at the top of the frame for a menu | 700 | The number of lines to allocate at the top of the frame for a menu |
| 701 | bar. The default is 1. A value of @code{nil} means don't display a | 701 | bar. The default is 1 if Menu Bar mode is enabled, and 0 otherwise. |
| 702 | menu bar. @xref{Menu Bar}. (The X toolkit and GTK allow at most one | 702 | @xref{Menu Bars,,,emacs, The GNU Emacs Manual}. |
| 703 | menu 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 |
| 707 | The number of lines to use for the tool bar. A value of @code{nil} | 706 | The number of lines to use for the tool bar. The default is 1 if Tool |
| 708 | means don't display a tool bar. (GTK and Nextstep allow at most one | 707 | Bar mode is enabled, and 0 otherwise. @xref{Tool Bars,,,emacs, The |
| 709 | tool bar line; they treat larger values as 1.) | 708 | GNU 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 |
| 713 | The position of the tool bar. Currently only for the GTK tool bar. | 712 | The position of the tool bar. Currently only for the GTK tool bar. |
| 714 | Value can be one of @code{top}, @code{bottom} @code{left}, @code{right}. | 713 | Value 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 | |||
| 48 | you it is normal. We try to make all hooks normal, as much as | 47 | you it is normal. We try to make all hooks normal, as much as |
| 49 | possible, so that you can use them in a uniform way. | 48 | possible, 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 |
| 52 | the @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 |
| 53 | This makes it easy for a user to customize the behavior of the mode, | 52 | makes it easy for a user to customize the behavior of the mode, by |
| 54 | by overriding the buffer-local variable assignments already made by | 53 | overriding the buffer-local variable assignments already made by the |
| 55 | the mode. Most minor mode functions also run a mode hook at the end. | 54 | mode. Most minor mode functions also run a mode hook at the end. But |
| 56 | But hooks are used in other contexts too. For example, the hook | 55 | hooks 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. | |||
| 78 | its value is just a single function, not a list of functions. | 77 | its 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. |
| 199 | Each buffer has only one major mode at a time. For each major mode | 199 | Each buffer has one major mode at a time. Every major mode is |
| 200 | there is a function to switch to that mode in the current buffer; its | 200 | associated with a @dfn{major mode command}, whose name should end in |
| 201 | name should end in @samp{-mode}. These functions work by setting | 201 | @samp{-mode}. This command takes care of switching to that mode in the |
| 202 | buffer-local variable bindings and other data associated with the | 202 | current buffer, by setting various buffer-local variables such as a |
| 203 | buffer, such as a local keymap. The effect lasts until you switch | 203 | local keymap. @xref{Major Mode Conventions}. |
| 204 | to another major mode in the same buffer. | 204 | |
| 205 | The least specialized major mode is called @dfn{Fundamental mode}, | ||
| 206 | which has no mode-specific definitions or variable settings. | ||
| 207 | |||
| 208 | @deffn Command fundamental-mode | ||
| 209 | This is the major mode command for Fundamental mode. Unlike other mode | ||
| 210 | commands, it does @emph{not} run any mode hooks (@pxref{Major Mode | ||
| 211 | Conventions}), 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 | ||
| 216 | an existing major mode. @xref{Derived Modes}. We recommend using | ||
| 217 | @code{define-derived-mode} even if the new mode is not an obvious | ||
| 218 | derivative of another mode, as it automatically enforces many coding | ||
| 219 | conventions for you. @xref{Basic Major Modes}, for common modes to | ||
| 220 | derive from. | ||
| 221 | |||
| 222 | The standard GNU Emacs Lisp directory tree contains the code for | ||
| 223 | several major modes, in files such as @file{text-mode.el}, | ||
| 224 | @file{texinfo.el}, @file{lisp-mode.el}, and @file{rmail.el}. You can | ||
| 225 | study these libraries to see how modes are written. | ||
| 226 | |||
| 227 | @defopt major-mode | ||
| 228 | The buffer-local value of this variable holds the symbol for the current | ||
| 229 | major mode. Its default value holds the default major mode for new | ||
| 230 | buffers. The standard default value is @code{fundamental-mode}. | ||
| 231 | |||
| 232 | If the default value is @code{nil}, then whenever Emacs creates a new | ||
| 233 | buffer via a command such as @kbd{C-x b} (@code{switch-to-buffer}), the | ||
| 234 | new buffer is put in the major mode of the previously current buffer. | ||
| 235 | As an exception, if the major mode of the previous buffer has a | ||
| 236 | @code{mode-class} symbol property with value @code{special}, the new | ||
| 237 | buffer 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}. | ||
| 224 | This mode has no mode-specific definitions or variable settings, so each | ||
| 225 | Emacs command behaves in its default manner, and each option is in its | ||
| 226 | default state. All other major modes redefine various keys and options. | ||
| 227 | For 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 | ||
| 232 | specialized editing task, creating a new major mode is usually a good | ||
| 233 | idea. In practice, writing a major mode is easy (in contrast to | ||
| 234 | writing a minor mode, which is often difficult). | ||
| 235 | |||
| 236 | If the new mode is similar to an old one, it is often unwise to | ||
| 237 | modify the old one to serve two purposes, since it may become harder | ||
| 238 | to use and maintain. Instead, copy and rename an existing major mode | ||
| 239 | definition and alter the copy---or use the @code{define-derived-mode} | ||
| 240 | macro to define a @dfn{derived mode} (@pxref{Derived Modes}). For | ||
| 241 | example, Rmail Edit mode is a major mode that is very similar to Text | ||
| 242 | mode except that it provides two additional commands. Its definition | ||
| 243 | is 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, | ||
| 246 | we recommend to use @code{define-derived-mode}, since it automatically | ||
| 247 | enforces the most important coding conventions for you. | ||
| 248 | |||
| 249 | For a very simple programming language major mode that handles | ||
| 250 | comments 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 | ||
| 254 | temporarily for a buffer, so it can be edited in a different way (with | ||
| 255 | ordinary Emacs commands rather than Rmail commands). In such cases, the | ||
| 256 | temporary major mode usually provides a command to switch back to the | ||
| 257 | buffer's usual mode (Rmail mode, in this case). You might be tempted to | ||
| 258 | present the temporary redefinitions inside a recursive edit and restore | ||
| 259 | the usual ones when the user exits; but this is a bad idea because it | ||
| 260 | constrains the user's options when it is done in more than one buffer: | ||
| 261 | recursive edits must be exited most-recently-entered first. Using an | ||
| 262 | alternative major mode avoids this limitation. @xref{Recursive | ||
| 263 | Editing}. | ||
| 264 | |||
| 265 | The standard GNU Emacs Lisp library directory tree contains the code | ||
| 266 | for 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 | ||
| 270 | are written. Text mode is perhaps the simplest major mode aside from | ||
| 271 | Fundamental 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 |
| 279 | including conventions for local keymap and syntax table initialization, | 259 | conventions, including conventions for local keymap and syntax table |
| 280 | global names, and hooks. Please follow these conventions when you | 260 | initialization, function and variable names, and hooks. |
| 281 | define a new major mode. (Fundamental mode is an exception to many | 261 | |
| 282 | of 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 |
| 283 | state of Emacs.) | 263 | many of these conventions automatically. @xref{Derived Modes}. Note |
| 264 | also that fundamental mode is an exception to many of these conventions, | ||
| 265 | because 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 |
| 286 | should aim for consistency in general with other Emacs major modes. | 268 | should aim for consistency in general with other Emacs major modes, as |
| 287 | This makes Emacs as a whole more coherent. It is impossible to list | 269 | this makes Emacs as a whole more coherent. It is impossible to list |
| 288 | here all the possible points where this issue might come up; if the | 270 | here all the possible points where this issue might come up; if the |
| 289 | Emacs developers point out an area where your major mode deviates from | 271 | Emacs developers point out an area where your major mode deviates from |
| 290 | the usual conventions, please make it compatible. | 272 | the usual conventions, please make it compatible. |
| 291 | 273 | ||
| 292 | @itemize @bullet | 274 | @itemize @bullet |
| 293 | @item | 275 | @item |
| 294 | Define a command whose name ends in @samp{-mode}, with no arguments, | 276 | Define a major mode command whose name ends in @samp{-mode}. When |
| 295 | that switches to the new mode in the current buffer. This command | 277 | called with no arguments, this command should switch to the new mode in |
| 296 | should set up the keymap, syntax table, and buffer-local variables in an | 278 | the current buffer by setting up the keymap, syntax table, and |
| 297 | existing buffer, without changing the buffer's contents. | 279 | buffer-local variables in an existing buffer. It should not change the |
| 280 | buffer's contents. | ||
| 298 | 281 | ||
| 299 | @item | 282 | @item |
| 300 | Write a documentation string for this command that describes the | 283 | Write a documentation string for this command that describes the special |
| 301 | special commands available in this mode. @kbd{C-h m} | 284 | commands available in this mode. @xref{Mode Help}. |
| 302 | (@code{describe-mode}) in your mode will display this string. | ||
| 303 | 285 | ||
| 304 | The documentation string may include the special documentation | 286 | The documentation string may include the special documentation |
| 305 | substrings, @samp{\[@var{command}]}, @samp{\@{@var{keymap}@}}, and | 287 | substrings, @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 |
| 307 | automatically to the user's own key bindings. @xref{Keys in | 289 | automatically to the user's own key bindings. @xref{Keys in |
| 308 | Documentation}. | 290 | Documentation}. |
| 309 | 291 | ||
| @@ -421,28 +403,7 @@ setting up a buffer-local value for the variable | |||
| 421 | 403 | ||
| 422 | @item | 404 | @item |
| 423 | Each face that the mode defines should, if possible, inherit from an | 405 | Each face that the mode defines should, if possible, inherit from an |
| 424 | existing Emacs face. This reduces the chance of conflicting with a | 406 | existing Emacs face. @xref{Basic Faces}, and @ref{Faces for Font Lock}. |
| 425 | user's face customizations. Useful faces include: | ||
| 426 | |||
| 427 | @table @asis | ||
| 428 | @item @code{highlight} | ||
| 429 | for stretches of text that should temporarily stand out. | ||
| 430 | |||
| 431 | @item @code{match} | ||
| 432 | for text matching a search command. | ||
| 433 | |||
| 434 | @item @code{link} and @code{link-visited} | ||
| 435 | for clickable text buttons that send the user to a different buffer or | ||
| 436 | ``location''. | ||
| 437 | |||
| 438 | @item @code{button} | ||
| 439 | for clickable text buttons that perform other actions. | ||
| 440 | |||
| 441 | @item @asis{Font Lock faces} | ||
| 442 | for other kinds of syntactic highlighting, if highlighting is not | ||
| 443 | handled 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 |
| 448 | The mode should specify how Imenu should find the definitions or | 409 | The 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 | |||
| 505 | value for @code{change-major-mode-hook} (@pxref{Creating Buffer-Local}). | 466 | value for @code{change-major-mode-hook} (@pxref{Creating Buffer-Local}). |
| 506 | 467 | ||
| 507 | @item | 468 | @item |
| 508 | If this mode is appropriate only for specially-prepared text, then the | 469 | If this mode is appropriate only for specially-prepared text produced by |
| 509 | major mode command symbol should have a property named @code{mode-class} | 470 | the mode itself (rather than by the user typing at the keyboard or by an |
| 510 | with value @code{special}, put on as follows: | 471 | external file), then the major mode command symbol should have a |
| 472 | property named @code{mode-class} with value @code{special}, put on as | ||
| 473 | follows: | ||
| 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 |
| 519 | This tells Emacs that new buffers created while the current buffer is | 482 | This tells Emacs that new buffers created while the current buffer is in |
| 520 | in Funny mode should not inherit Funny mode, in case the default value | 483 | Funny mode should not be put in Funny mode, even though the default |
| 521 | of @code{major-mode} is @code{nil}. Modes such as Dired, Rmail, | 484 | value of @code{major-mode} is @code{nil}. By default, the value of |
| 522 | and Buffer List use this feature. | 485 | @code{nil} for @code{major-mode} means to use the current buffer's major |
| 486 | mode when creating new buffers (@pxref{Auto Major Mode}), but with such | ||
| 487 | @code{special} modes, Fundamental mode is used instead. Modes such as | ||
| 488 | Dired, Rmail, and Buffer List use this feature. | ||
| 523 | 489 | ||
| 524 | The @code{define-derived-mode} macro automatically marks the derived | 490 | The @code{define-derived-mode} macro automatically marks the derived |
| 525 | mode as special if the parent mode is special. The special mode | 491 | mode as special if the parent mode is special. Special mode is a |
| 526 | @code{special-mode} provides a convenient parent for other special | 492 | convenient parent for such modes to inherit from; @xref{Basic Major |
| 527 | modes to inherit from; it sets @code{buffer-read-only} to @code{t}, | 493 | Modes}. |
| 528 | and does little else. | ||
| 529 | 494 | ||
| 530 | @item | 495 | @item |
| 531 | If you want to make the new mode the default for files with certain | 496 | If 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. | |||
| 559 | automatically selects a major mode for the new buffer when a file is | 524 | automatically selects a major mode for the new buffer when a file is |
| 560 | visited. It also processes local variables specified in the file text. | 525 | visited. 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 | ||
| 564 | in particular. Other major modes are defined in effect by comparison | ||
| 565 | with this one---their definitions say what to change, starting from | ||
| 566 | Fundamental mode. The @code{fundamental-mode} function does @emph{not} | ||
| 567 | run any mode hooks; you're not supposed to customize it. (If you want Emacs | ||
| 568 | to behave differently in Fundamental mode, change the @emph{global} | ||
| 569 | state of Emacs.) | ||
| 570 | @end deffn | ||
| 571 | |||
| 572 | @deffn Command normal-mode &optional find-file | 527 | @deffn Command normal-mode &optional find-file |
| 573 | This function establishes the proper major mode and buffer-local variable | 528 | This function establishes the proper major mode and buffer-local variable |
| 574 | bindings for the current buffer. First it calls @code{set-auto-mode} | 529 | bindings 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 |
| 597 | major mode function, so errors are caught and reported as a @samp{File | 552 | major mode command, so errors are caught and reported as a @samp{File |
| 598 | mode specification error}, followed by the original error message. | 553 | mode 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 |
| 604 | current buffer. It bases its decision (in order of precedence) on | 559 | current buffer. It bases its decision (in order of precedence) on the |
| 605 | the @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 |
| 606 | end of a file, on the @w{@samp{#!}} line (using | 561 | a file, on the @w{@samp{#!}} line (using @code{interpreter-mode-alist}), |
| 607 | @code{interpreter-mode-alist}), on the text at the beginning of the | 562 | on the text at the beginning of the buffer (using |
| 608 | buffer (using @code{magic-mode-alist}), and finally on the visited | 563 | @code{magic-mode-alist}), and finally on the visited file name (using |
| 609 | file name (using @code{auto-mode-alist}). @xref{Choosing Modes, , How | 564 | @code{auto-mode-alist}). @xref{Choosing Modes, , How Major Modes are |
| 610 | Major Modes are Chosen, emacs, The GNU Emacs Manual}. | 565 | Chosen, emacs, The GNU Emacs Manual}. If @code{enable-local-variables} |
| 611 | If @code{enable-local-variables} is @code{nil}, @code{set-auto-mode} | 566 | is @code{nil}, @code{set-auto-mode} does not check the @w{@samp{-*-}} |
| 612 | does not check the @w{@samp{-*-}} line, or near the end of the file, | 567 | line, or near the end of the file, for any mode tag. |
| 613 | for any mode tag. | ||
| 614 | 568 | ||
| 615 | If @var{keep-mode-if-same} is non-@code{nil}, this function does not | 569 | If @var{keep-mode-if-same} is non-@code{nil}, this function does not |
| 616 | call the mode command if the buffer is already in the proper major | 570 | call 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 | |||
| 619 | have set. | 573 | have set. |
| 620 | @end defun | 574 | @end defun |
| 621 | 575 | ||
| 622 | @defopt major-mode | ||
| 623 | The buffer-local value of this variable holds the major mode | ||
| 624 | currently active. The default value of this variable holds the | ||
| 625 | default major mode for new buffers. The standard default value is | ||
| 626 | @code{fundamental-mode}. | ||
| 627 | |||
| 628 | If the default value of @code{major-mode} is @code{nil}, Emacs uses | ||
| 629 | the (previously) current buffer's major mode as the default major mode | ||
| 630 | of a new buffer. However, if that major mode symbol has a @code{mode-class} | ||
| 631 | property with value @code{special}, then it is not used for new buffers; | ||
| 632 | Fundamental mode is used instead. The modes that have this property are | ||
| 633 | those such as Dired and Rmail that are useful only with text that has | ||
| 634 | been specially prepared. | ||
| 635 | @end defopt | ||
| 636 | |||
| 637 | @defun set-buffer-major-mode buffer | 576 | @defun set-buffer-major-mode buffer |
| 638 | This function sets the major mode of @var{buffer} to the default value of | 577 | This 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 |
| 744 | about major modes. It is normally called with @kbd{C-h m}. The | 683 | modes. 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}, | 684 | variable @code{major-mode} (@pxref{Major Modes}), which is why every |
| 746 | which is why every major mode function needs to set the | 685 | major mode command needs to set that variable. |
| 747 | @code{major-mode} variable. | ||
| 748 | 686 | ||
| 749 | @deffn Command describe-mode | 687 | @deffn Command describe-mode |
| 750 | This function displays the documentation of the current major mode. | 688 | This function displays the documentation of the current major mode. |
| 751 | 689 | ||
| 752 | The @code{describe-mode} function calls the @code{documentation} | 690 | The @code{describe-mode} function calls the @code{documentation} |
| 753 | function using the value of @code{major-mode} as an argument. Thus, it | 691 | function using the value of @code{major-mode} as an argument. Thus, it |
| 754 | displays the documentation string of the major mode function. | 692 | displays 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 | ||
| 759 | This buffer-local variable holds the symbol for the current buffer's | ||
| 760 | major mode. This symbol should have a function definition that is the | ||
| 761 | command to switch to that major mode. The @code{describe-mode} | ||
| 762 | function uses the documentation string of the function as the | ||
| 763 | documentation 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 |
| 771 | from an existing one using @code{define-derived-mode}. If there is no | 701 | existing one using @code{define-derived-mode}. If there is no closely |
| 772 | closely related mode, you can inherit from @code{text-mode}, | 702 | related 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}. | 704 | none 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{} |
| 777 | This macro defines @var{variant} as a major mode command, using | 708 | This 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 | ||
| 807 | This function returns non-@code{nil} if the current major mode is | ||
| 808 | derived 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 | ||
| 815 | major modes commonly derive from: Text mode, Prog mode, and Special | ||
| 816 | mode. While Text mode is useful in its own right (e.g. for editing | ||
| 817 | files ending in @file{.txt}), Prog mode and Special mode exist mainly to | ||
| 818 | let other modes derive from them. | ||
| 819 | |||
| 820 | @vindex prog-mode-hook | ||
| 821 | As far as possible, new major modes should be derived, either directly | ||
| 822 | or indirectly, from one of these three modes. One reason is that this | ||
| 823 | allows 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 | ||
| 828 | Text 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 | ||
| 832 | Manual}). | ||
| 833 | |||
| 834 | An 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 | ||
| 839 | Prog mode is a basic major mode for buffers containing programming | ||
| 840 | language source code. Most of the programming language major modes | ||
| 841 | built into Emacs are derived from it. | ||
| 842 | |||
| 843 | Prog 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 | ||
| 849 | Special mode is a basic major mode for buffers containing text that is | ||
| 850 | produced specially by Emacs, rather than from a file. Major modes | ||
| 851 | derived from Special mode are given a @code{mode-class} property of | ||
| 852 | @code{special} (@pxref{Major Mode Conventions}). | ||
| 853 | |||
| 854 | Special mode sets the buffer to read-only. Its keymap defines several | ||
| 855 | common 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 | |||
| 859 | An example of a major mode derived from Special mode is Buffer Menu | ||
| 860 | mode, which is used by the @samp{*Buffer List*} buffer. @xref{List | ||
| 861 | Buffers,,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 |
| 920 | the mode-independent normal hook @code{after-change-major-mode-hook}. | 909 | the mode-independent normal hook @code{after-change-major-mode-hook}. |
| 921 | It does this by calling @code{run-mode-hooks}. If the major mode is a | 910 | It does this by calling @code{run-mode-hooks}. If the major mode is a |
| 922 | derived mode, that is if it calls another major mode (the parent mode) | 911 | derived 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 |
| 963 | This is a normal hook run by @code{run-mode-hooks}. It is run at the | 952 | This is a normal hook run by @code{run-mode-hooks}. It is run at the |
| 964 | very end of every properly-written major mode function. | 953 | very 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 |
| 1193 | Lisp mode. | 1182 | mode. |
| 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}, |
| 2748 | and @code{java-font-lock-extra-types}, for example. | 2737 | and @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 |
| 2752 | or indirectly, except through their mode hooks. (Doing so would lead | 2741 | or indirectly, except through their mode hooks. (Doing so would lead to |
| 2753 | to incorrect behavior for some minor modes.) They should set up their | 2742 | incorrect behavior for some minor modes.) They should set up their |
| 2754 | rules for search-based fontification by setting | 2743 | rules 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 |
| 370 | names to make their use easier. | 370 | names 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 | ||
| 375 | Standard defines default values of properties for such codepoints; | ||
| 376 | they 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 |
| 373 | properties that Emacs knows about: | 379 | properties that Emacs knows about: |
| 374 | 380 | ||
| @@ -376,22 +382,31 @@ properties that Emacs knows about: | |||
| 376 | @item name | 382 | @item name |
| 377 | Corresponds to the @code{Name} Unicode property. The value is a | 383 | Corresponds to the @code{Name} Unicode property. The value is a |
| 378 | string consisting of upper-case Latin letters A to Z, digits, spaces, | 384 | string consisting of upper-case Latin letters A to Z, digits, spaces, |
| 379 | and hyphen @samp{-} characters. | 385 | and hyphen @samp{-} characters. For unassigned codepoints, the value |
| 386 | is an empty string. | ||
| 380 | 387 | ||
| 381 | @cindex unicode general category | 388 | @cindex unicode general category |
| 382 | @item general-category | 389 | @item general-category |
| 383 | Corresponds to the @code{General_Category} Unicode property. The | 390 | Corresponds to the @code{General_Category} Unicode property. The |
| 384 | value is a symbol whose name is a 2-letter abbreviation of the | 391 | value is a symbol whose name is a 2-letter abbreviation of the |
| 385 | character's classification. | 392 | character's classification. For unassigned codepoints, the value |
| 393 | is @code{Cn}. | ||
| 386 | 394 | ||
| 387 | @item canonical-combining-class | 395 | @item canonical-combining-class |
| 388 | Corresponds to the @code{Canonical_Combining_Class} Unicode property. | 396 | Corresponds to the @code{Canonical_Combining_Class} Unicode property. |
| 389 | The value is an integer number. | 397 | The value is an integer number. For unassigned codepoints, the value |
| 398 | is zero. | ||
| 390 | 399 | ||
| 400 | @cindex bidirectional class of characters | ||
| 391 | @item bidi-class | 401 | @item bidi-class |
| 392 | Corresponds to the Unicode @code{Bidi_Class} property. The value is a | 402 | Corresponds to the Unicode @code{Bidi_Class} property. The value is a |
| 393 | symbol whose name is the Unicode @dfn{directional type} of the | 403 | symbol whose name is the Unicode @dfn{directional type} of the |
| 394 | character. | 404 | character. Emacs uses this property when it reorders bidirectional |
| 405 | text for display (@pxref{Bidirectional Display}). For unassigned | ||
| 406 | codepoints, the value depends on the code blocks to which the | ||
| 407 | codepoint belongs: most unassigned codepoints get the value of | ||
| 408 | @code{L} (strong L), but some get values of @code{AL} (Arabic letter) | ||
| 409 | or @code{R} (strong R). | ||
| 395 | 410 | ||
| 396 | @item decomposition | 411 | @item decomposition |
| 397 | Corresponds to the Unicode @code{Decomposition_Type} and | 412 | Corresponds to the Unicode @code{Decomposition_Type} and |
| @@ -403,19 +418,22 @@ Note that the Unicode spec writes these tag names inside | |||
| 403 | brackets; e.g., Unicode specifies @samp{<small>} where Emacs uses | 418 | brackets; 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 |
| 406 | decomposition sequence of this character. | 421 | decomposition sequence of this character. For unassigned codepoints, |
| 422 | the value is the character itself. | ||
| 407 | 423 | ||
| 408 | @item decimal-digit-value | 424 | @item decimal-digit-value |
| 409 | Corresponds to the Unicode @code{Numeric_Value} property for | 425 | Corresponds to the Unicode @code{Numeric_Value} property for |
| 410 | characters whose @code{Numeric_Type} is @samp{Digit}. The value is an | 426 | characters whose @code{Numeric_Type} is @samp{Digit}. The value is an |
| 411 | integer number. | 427 | integer number. For unassigned codepoints, the value is @code{nil}, |
| 428 | which means @acronym{NaN}, or ``not-a-number''. | ||
| 412 | 429 | ||
| 413 | @item digit-value | 430 | @item digit-value |
| 414 | Corresponds to the Unicode @code{Numeric_Value} property for | 431 | Corresponds to the Unicode @code{Numeric_Value} property for |
| 415 | characters whose @code{Numeric_Type} is @samp{Decimal}. The value is | 432 | characters whose @code{Numeric_Type} is @samp{Decimal}. The value is |
| 416 | an integer number. Examples of such characters include compatibility | 433 | an integer number. Examples of such characters include compatibility |
| 417 | subscript and superscript digits, for which the value is the | 434 | subscript and superscript digits, for which the value is the |
| 418 | corresponding number. | 435 | corresponding number. For unassigned codepoints, the value is |
| 436 | @code{nil}, which means @acronym{NaN}. | ||
| 419 | 437 | ||
| 420 | @item numeric-value | 438 | @item numeric-value |
| 421 | Corresponds to the Unicode @code{Numeric_Value} property for | 439 | Corresponds to the Unicode @code{Numeric_Value} property for |
| @@ -424,33 +442,53 @@ this property is an integer or a floating-point number. Examples of | |||
| 424 | characters that have this property include fractions, subscripts, | 442 | characters that have this property include fractions, subscripts, |
| 425 | superscripts, Roman numerals, currency numerators, and encircled | 443 | superscripts, Roman numerals, currency numerators, and encircled |
| 426 | numbers. For example, the value of this property for the character | 444 | numbers. 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 |
| 446 | unassigned codepoints, the value is @code{nil}, which means | ||
| 447 | @acronym{NaN}. | ||
| 428 | 448 | ||
| 449 | @cindex mirroring of characters | ||
| 429 | @item mirrored | 450 | @item mirrored |
| 430 | Corresponds to the Unicode @code{Bidi_Mirrored} property. The value | 451 | Corresponds to the Unicode @code{Bidi_Mirrored} property. The value |
| 431 | of this property is a symbol, either @code{Y} or @code{N}. | 452 | of this property is a symbol, either @code{Y} or @code{N}. For |
| 453 | unassigned codepoints, the value is @code{N}. | ||
| 454 | |||
| 455 | @item mirroring | ||
| 456 | Corresponds to the Unicode @code{Bidi_Mirroring_Glyph} property. The | ||
| 457 | value of this property is a character whose glyph represents the | ||
| 458 | mirror image of the character's glyph, or @code{nil} if there's no | ||
| 459 | defined mirroring glyph. All the characters whose @code{mirrored} | ||
| 460 | property is @code{N} have @code{nil} as their @code{mirroring} | ||
| 461 | property; however, some characters whose @code{mirrored} property is | ||
| 462 | @code{Y} also have @code{nil} for @code{mirroring}, because no | ||
| 463 | appropriate characters exist with mirrored glyphs. Emacs uses this | ||
| 464 | property to display mirror images of characters when appropriate | ||
| 465 | (@pxref{Bidirectional Display}). For unassigned codepoints, the value | ||
| 466 | is @code{nil}. | ||
| 432 | 467 | ||
| 433 | @item old-name | 468 | @item old-name |
| 434 | Corresponds to the Unicode @code{Unicode_1_Name} property. The value | 469 | Corresponds to the Unicode @code{Unicode_1_Name} property. The value |
| 435 | is a string. | 470 | is a string. For unassigned codepoints, the value is an empty string. |
| 436 | 471 | ||
| 437 | @item iso-10646-comment | 472 | @item iso-10646-comment |
| 438 | Corresponds to the Unicode @code{ISO_Comment} property. The value is | 473 | Corresponds to the Unicode @code{ISO_Comment} property. The value is |
| 439 | a string. | 474 | a string. For unassigned codepoints, the value is an empty string. |
| 440 | 475 | ||
| 441 | @item uppercase | 476 | @item uppercase |
| 442 | Corresponds to the Unicode @code{Simple_Uppercase_Mapping} property. | 477 | Corresponds to the Unicode @code{Simple_Uppercase_Mapping} property. |
| 443 | The value of this property is a single character. | 478 | The value of this property is a single character. For unassigned |
| 479 | codepoints, the value is @code{nil}, which means the character itself. | ||
| 444 | 480 | ||
| 445 | @item lowercase | 481 | @item lowercase |
| 446 | Corresponds to the Unicode @code{Simple_Lowercase_Mapping} property. | 482 | Corresponds to the Unicode @code{Simple_Lowercase_Mapping} property. |
| 447 | The value of this property is a single character. | 483 | The value of this property is a single character. For unassigned |
| 484 | codepoints, the value is @code{nil}, which means the character itself. | ||
| 448 | 485 | ||
| 449 | @item titlecase | 486 | @item titlecase |
| 450 | Corresponds to the Unicode @code{Simple_Titlecase_Mapping} property. | 487 | Corresponds 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 |
| 452 | character of a word needs to be capitalized. The value of this | 489 | character of a word needs to be capitalized. The value of this |
| 453 | property is a single character. | 490 | property is a single character. For unassigned codepoints, the value |
| 491 | is @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 |
| 609 | Symbols}). To prevent interning, you can write @samp{#:} before the | 610 | printed representation, @samp{##} is the printed representation for an |
| 610 | name of the symbol. | 611 | interned symbol whose name is an empty string. Furthermore, |
| 612 | @samp{#:@var{foo}} is the printed representation for an uninterned | ||
| 613 | symbol whose name is @var{foo}. (Normally, the Lisp reader interns | ||
| 614 | all 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 | |||
| 544 | killing Emacs is @code{kill-emacs}. | 544 | killing Emacs is @code{kill-emacs}. |
| 545 | 545 | ||
| 546 | @deffn Command kill-emacs &optional exit-data | 546 | @deffn Command kill-emacs &optional exit-data |
| 547 | This command exits the Emacs process and kills it. | 547 | This command calls the hook @code{kill-emacs-hook}, then exits the |
| 548 | Emacs process and kills it. | ||
| 548 | 549 | ||
| 549 | If @var{exit-data} is an integer, then it is used as the exit status | 550 | If @var{exit-data} is an integer, that is used as the exit status of |
| 550 | of the Emacs process. (This is useful primarily in batch operation; see | 551 | the Emacs process. (This is useful primarily in batch operation; see |
| 551 | @ref{Batch Mode}.) | 552 | @ref{Batch Mode}.) |
| 552 | 553 | ||
| 553 | If @var{exit-data} is a string, its contents are stuffed into the | 554 | If @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 | |||
| 555 | input) can read them. | 556 | input) 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 |
| 559 | been saved, is lost when the Emacs process is killed. Because killing | 560 | @cindex SIGHUP |
| 560 | Emacs inadvertently can lose a lot of work, Emacs queries for | 561 | @cindex SIGINT |
| 561 | confirmation before actually terminating if you have buffers that need | 562 | @cindex operating system signal |
| 562 | saving 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 | 564 | higher-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 |
| 566 | Emacs Manual}. It is also called automatically if Emacs receives a | ||
| 567 | @code{SIGTERM} or @code{SIGHUP} operating system signal (e.g. when the | ||
| 568 | controlling 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 |
| 567 | After asking the standard questions, @code{save-buffers-kill-emacs} | 572 | This normal hook is run by @code{kill-emacs}, before it kills Emacs. |
| 568 | calls the functions in the list @code{kill-emacs-query-functions}, in | 573 | |
| 569 | order of appearance, with no arguments. These functions can ask for | 574 | Because @code{kill-emacs} can be called in situations where user |
| 570 | additional confirmation from the user. If any of them returns | 575 | interaction is impossible (e.g. when the terminal is disconnected), |
| 571 | @code{nil}, @code{save-buffers-kill-emacs} does not kill Emacs, and | 576 | functions on this hook should not attempt to interact with the user. |
| 572 | does not run the remaining functions in this hook. Calling | 577 | If 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, |
| 577 | This variable is a normal hook; once @code{save-buffers-kill-emacs} is | 582 | aside from files that have been saved, is lost. Because killing Emacs |
| 578 | finished with all file saving and confirmation, it calls | 583 | inadvertently 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 | 585 | you have buffers that need saving or subprocesses that are running. | |
| 581 | @code{kill-emacs} may be invoked directly (that is not via | 586 | It also runs the abnormal hook @code{kill-emacs-query-functions}: |
| 582 | @code{save-buffers-kill-emacs}) if the terminal is disconnected, or in | 587 | |
| 583 | similar situations where interaction with the user is not possible. | 588 | @defvar kill-emacs-query-functions |
| 584 | Thus, if your hook needs to interact with the user, put it on | 589 | When @code{save-buffers-kill-terminal} is killing Emacs, it calls the |
| 585 | @code{kill-emacs-query-functions}; if it needs to run regardless of | 590 | functions in this hook, after asking the standard questions and before |
| 586 | how Emacs is killed, put it on @code{kill-emacs-hook}. | 591 | calling @code{kill-emacs}. The functions are called in order of |
| 592 | appearance, with no arguments. Each function can ask for additional | ||
| 593 | confirmation from the user. If any of them returns @code{nil}, | ||
| 594 | @code{save-buffers-kill-emacs} does not kill Emacs, and does not run | ||
| 595 | the remaining functions in this hook. Calling @code{kill-emacs} | ||
| 596 | directly 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 | ||
| 1157 | This function returns the current time as a floating-point number of | ||
| 1158 | seconds since the epoch. The argument @var{time-value}, if given, | ||
| 1159 | specifies a time to convert instead of the current time. The argument | ||
| 1160 | should have the same form as for @code{current-time-string} (see | ||
| 1161 | above). 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 | ||
| 1165 | exact. 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 |
| 1147 | This function returns a list describing the time zone that the user is | 1169 | This function returns a list describing the time zone that the user is |
| 1148 | in. | 1170 | in. |
| @@ -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 | 1190 | The current time zone is determined by the @samp{TZ} environment |
| 1169 | This function specifies the local time zone according to @var{tz}. If | 1191 | variable. @xref{System Environment}. For example, you can tell Emacs |
| 1170 | @var{tz} is @code{nil}, that means to use an implementation-defined | 1192 | to use universal time with @code{(setenv "TZ" "UTC0")}. If @samp{TZ} |
| 1171 | default time zone. If @var{tz} is @code{t}, that means to use | 1193 | is not in the environment, Emacs uses a platform-dependent default |
| 1172 | Universal Time. Otherwise, @var{tz} should be a string specifying a | 1194 | time zone. |
| 1173 | time zone rule. | ||
| 1174 | @end defun | ||
| 1175 | |||
| 1176 | @defun float-time &optional time-value | ||
| 1177 | This function returns the current time as a floating-point number of | ||
| 1178 | seconds since the epoch. The argument @var{time-value}, if given, | ||
| 1179 | specifies a time to convert instead of the current time. The argument | ||
| 1180 | should have the same form as for @code{current-time-string} (see | ||
| 1181 | above). 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 | ||
| 1185 | exact. 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 |
| 718 | matches any character whose syntax is not @var{code}. | 718 | matches 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} |
| 721 | matches any character whose category is @var{c}. Here @var{c} is a | 722 | matches any character whose category is @var{c}. Here @var{c} is a |
| 722 | character that represents a category: thus, @samp{c} for Chinese | 723 | character that represents a category: thus, @samp{c} for Chinese |
| 723 | characters or @samp{g} for Greek characters in the standard category | 724 | characters or @samp{g} for Greek characters in the standard category |
| 724 | table. | 725 | table. You can see the list of all the currently defined categories |
| 726 | with @kbd{M-x describe-categories @key{RET}}. You can also define | ||
| 727 | your 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} |
| 727 | matches any character whose category is not @var{c}. | 731 | matches 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 |
| 1085 | This function defines a new category, with name @var{char} and | 1085 | This function defines a new category, with name @var{char} and |
| 1086 | documentation @var{docstring}, for the category table @var{table}. | 1086 | documentation @var{docstring}, for the category table @var{table}. |
| 1087 | |||
| 1088 | Here's an example of defining a new category for characters that have | ||
| 1089 | strong right-to-left directionality (@pxref{Bidirectional Display}) | ||
| 1090 | and 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 | |||
| 3015 | between the character and where the mouse is have the same | 3015 | between the character and where the mouse is have the same |
| 3016 | @code{mouse-face} property value. | 3016 | @code{mouse-face} property value. |
| 3017 | 3017 | ||
| 3018 | Emacs ignores all face attributes from the @code{mouse-face} property | ||
| 3019 | that alter the text size (e.g. @code{:height}, @code{:weight}, and | ||
| 3020 | @code{:slant}). Those attributes are always the same as for the | ||
| 3021 | unhighlighted text. | ||
| 3022 | |||
| 3018 | @item fontified | 3023 | @item fontified |
| 3019 | @kindex fontified @r{(text property)} | 3024 | @kindex fontified @r{(text property)} |
| 3020 | This property says whether the text is ready for display. If | 3025 | This 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 | ||
| 800 | Major Modes | 799 | Major 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 | ||
| 813 | Minor Modes | 812 | Minor 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 | ||
| 799 | Major Modes | 798 | Major 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 | ||
| 812 | Minor Modes | 811 | Minor 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 @@ | |||
| 1 | 2011-07-28 Bastien Guerry <bzg@gnu.org> | 1 | 2011-08-15 Suvayu Ali <fatkasuvayu+linux@gmail.com> (tiny change) |
| 2 | |||
| 3 | * org.texi (Images in LaTeX export): rewrite. | ||
| 4 | |||
| 5 | 2011-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 | ||
| 6 | 2011-07-28 Carsten Dominik <carsten.dominik@gmail.com> | 10 | 2011-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 | ||
| 10 | 2011-07-28 Bastien Guerry <bzg@gnu.org> | 14 | 2011-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 | ||
| 15 | 2011-07-28 Eric Schulte <schulte.eric@gmail.com> | 19 | 2011-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 | ||
| 19 | 2011-07-28 Bastien Guerry <bzg@gnu.org> | 23 | 2011-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 | ||
| 24 | 2011-07-28 Achim Gratz <stromeko@nexgo.de> | 28 | 2011-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 | ||
| 32 | 2011-07-28 Eric Schulte <schulte.eric@gmail.com> | 36 | 2011-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 | ||
| 37 | 2011-07-28 Eric Schulte <schulte.eric@gmail.com> | 41 | 2011-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 | ||
| 43 | 2011-07-28 Eric Schulte <schulte.eric@gmail.com> | 47 | 2011-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 | ||
| 47 | 2011-07-28 Eric Schulte <schulte.eric@gmail.com> | 51 | 2011-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 | ||
| 52 | 2011-07-28 Eric Schulte <schulte.eric@gmail.com> | 56 | 2011-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 | ||
| 57 | 2011-07-28 Christian Egli <christian.egli@sbszh.ch> | 61 | 2011-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 | ||
| 62 | 2011-07-28 David Maus <dmaus@ictsoc.de> | 66 | 2011-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 | ||
| 67 | 2011-07-28 Carsten Dominik <carsten.dominik@gmail.com> | 71 | 2011-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 | ||
| 72 | 2011-07-28 Carsten Dominik <carsten.dominik@gmail.com> | 76 | 2011-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 | ||
| 77 | 2011-07-28 Eric Schulte <schulte.eric@gmail.com> | 81 | 2011-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 | ||
| 82 | 2011-07-28 Manuel Giraud <manuel.giraud@univ-nantes.fr> | 86 | 2011-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 | ||
| 86 | 2011-07-28 Carsten Dominik <carsten.dominik@gmail.com> | 90 | 2011-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 | ||
| 91 | 2011-07-28 Robert P. Goldman <rpgoldman@real-time.com> | 95 | 2011-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 | ||
| 95 | 2011-07-28 Robert P. Goldman <rpgoldman@real-time.com> | 99 | 2011-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 | ||
| 100 | 2011-07-28 Carsten Dominik <carsten.dominik@gmail.com> | 104 | 2011-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 | ||
| 104 | 2011-07-28 Carsten Dominik <carsten.dominik@gmail.com> | 108 | 2011-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 | ||
| 108 | 2011-07-28 Carsten Dominik <carsten.dominik@gmail.com> | 112 | 2011-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 | ||
| 113 | 2011-07-28 Eric Schulte <schulte.eric@gmail.com> | 117 | 2011-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 | ||
| 118 | 2011-07-28 Puneeth Chaganti <punchagan@gmail.com> | 122 | 2011-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 | ||
| 123 | 2011-07-28 Carsten Dominik <carsten.dominik@gmail.com> | 127 | 2011-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 | ||
| 128 | 2011-07-28 Carsten Dominik <carsten.dominik@gmail.com> | 132 | 2011-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 | ||
| 133 | 2011-07-28 Carsten Dominik <carsten.dominik@gmail.com> | 137 | 2011-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 | ||
| 140 | 2011-07-28 Carsten Dominik <carsten.dominik@gmail.com> | 144 | 2011-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 | ||
| 144 | 2011-07-28 Eric Schulte <schulte.eric@gmail.com> | 148 | 2011-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 | ||
| 149 | 2011-07-28 Eric Schulte <schulte.eric@gmail.com> | 153 | 2011-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 | ||
| 154 | 2011-07-28 Eric Schulte <schulte.eric@gmail.com> | 158 | 2011-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 | ||
| 159 | 2011-07-28 Eric Schulte <schulte.eric@gmail.com> | 163 | 2011-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 | ||
| 166 | 2011-07-28 Eric Schulte <schulte.eric@gmail.com> | 170 | 2011-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 | ||
| 171 | 2011-07-28 Eric Schulte <schulte.eric@gmail.com> | 175 | 2011-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 | ||
| 176 | 2011-07-28 Bastien Guerry <bzg@gnu.org> | 180 | 2011-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 | ||
| 181 | 2011-07-28 Bastien Guerry <bzg@gnu.org> | 185 | 2011-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 | ||
| 186 | 2011-07-28 Eric Schulte <schulte.eric@gmail.com> | 190 | 2011-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 | ||
| 191 | 2011-07-28 Carsten Dominik <carsten.dominik@gmail.com> | 195 | 2011-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 | ||
| 196 | 2011-07-28 Eric Schulte <schulte.eric@gmail.com> | 200 | 2011-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 | ||
| 200 | 2011-07-28 Puneeth Chaganti <punchagan@gmail.com> | 204 | 2011-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 | ||
| 204 | 2011-07-28 Eric Schulte <schulte.eric@gmail.com> | 208 | 2011-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 | ||
| 209 | 2011-07-28 Eric Schulte <schulte.eric@gmail.com> | 213 | 2011-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 | ||
| 215 | 2011-07-28 Eric Schulte <schulte.eric@gmail.com> | 219 | 2011-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 | ||
| 222 | 2011-07-28 Eric Schulte <schulte.eric@gmail.com> | 226 | 2011-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 | ||
| 227 | 2011-07-28 Eric Schulte <schulte.eric@gmail.com> | 231 | 2011-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 | ||
| 232 | 2011-07-28 Eric Schulte <schulte.eric@gmail.com> | 236 | 2011-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 | ||
| 237 | 2011-07-28 David Maus <dmaus@ictsoc.de> | 241 | 2011-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 | ||
| 242 | 2011-07-28 Carsten Dominik <carsten.dominik@gmail.com> | 246 | 2011-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 | ||
| 247 | 2011-07-28 Tom Dye <tsd@tsdye.com> | 251 | 2011-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 | ||
| 251 | 2011-07-28 Tom Dye <tsd@tsdye.com> | 255 | 2011-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 | ||
| 256 | 2011-07-28 Eric Schulte <schulte.eric@gmail.com> | 260 | 2011-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 | ||
| 261 | 2011-07-28 Eric Schulte <schulte.eric@gmail.com> | 265 | 2011-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 | ||
| 270 | 2011-08-03 Michael Albinus <michael.albinus@gmx.de> | ||
| 271 | |||
| 272 | * trampver.texi: Update release number. | ||
| 273 | |||
| 274 | 2011-07-30 Michael Albinus <michael.albinus@gmx.de> | ||
| 275 | |||
| 276 | Sync with Tramp 2.2.2. | ||
| 277 | |||
| 278 | * trampver.texi: Update release number. | ||
| 279 | |||
| 266 | 2011-07-15 Lars Magne Ingebrigtsen <larsi@gnus.org> | 280 | 2011-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 | ||
| 291 | 2011-07-12 Lars Magne Ingebrigtsen <larsi@gnus.org> | ||
| 292 | |||
| 293 | * org.texi (Special agenda views): Fix double quoting (bug#3509). | ||
| 294 | |||
| 277 | 2010-07-10 Kevin Ryde <user42@zip.com.au> | 295 | 2010-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 | ||
| 282 | 2011-07-12 Lars Magne Ingebrigtsen <larsi@gnus.org> | ||
| 283 | |||
| 284 | * org.texi (Special agenda views): Fix double quoting (bug#3509). | ||
| 285 | |||
| 286 | 2011-07-07 Lars Magne Ingebrigtsen <larsi@gnus.org> | 300 | 2011-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 | |||
| 580 | HTML export | 582 | HTML 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 | ||
| 613 | OpenDocument 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 | |||
| 610 | Publishing | 623 | Publishing |
| 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 | ||
| 698 | Interaction with other packages | 718 | Interaction with other packages |
| 699 | 719 | ||
| @@ -769,7 +789,7 @@ create dynamic @i{agenda views}. | |||
| 769 | 789 | ||
| 770 | Org mode contains the Org Babel environment which allows you to work with | 790 | Org mode contains the Org Babel environment which allows you to work with |
| 771 | embedded source code blocks in a file, to facilitate code evaluation, | 791 | embedded source code blocks in a file, to facilitate code evaluation, |
| 772 | documentation, and tangling. | 792 | documentation, and literate programming techniques. |
| 773 | 793 | ||
| 774 | Org's automatic, context-sensitive table editor with spreadsheet | 794 | Org's automatic, context-sensitive table editor with spreadsheet |
| 775 | capabilities can be integrated into any major mode by activating the | 795 | capabilities can be integrated into any major mode by activating the |
| @@ -803,6 +823,11 @@ version of Org, as well as additional information, frequently asked | |||
| 803 | questions (FAQ), links to tutorials, etc@. This page is located at | 823 | questions (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 | ||
| 827 | The version 7.3 of this manual is available as a | ||
| 828 | @uref{http://www.network-theory.co.uk/org/manual/, paperback book from Network | ||
| 829 | Theory 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 |
| 815 | distribution or an XEmacs package, please skip this section and go directly | 840 | distribution or an XEmacs package, please skip this section and go directly |
| 816 | to @ref{Activation}.} | 841 | to @ref{Activation}. To see what version of Org (if any) is part of your |
| 842 | Emacs distribution, type @kbd{M-x load-library RET org} and then @kbd{M-x | ||
| 843 | org-version}.} | ||
| 817 | 844 | ||
| 818 | If you have downloaded Org from the Web, either as a distribution @file{.zip} | 845 | If you have downloaded Org from the Web, either as a distribution @file{.zip} |
| 819 | or @file{.tar} file, or as a Git archive, you must take the following steps | 846 | or @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 | ||
| 854 | Installing Info files is system dependent, because of differences in the | 881 | Installing 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 |
| 856 | correct directory and modifies the info directory file. In many other | 883 | files on most systems, please send a bug report if not@footnote{The output |
| 857 | systems, the files need to be copied to the correct directory separately, and | 884 | from install-info (if any) is also system dependent. In particular Debian |
| 858 | @file{install-info} then only modifies the directory file. Check your system | 885 | and its derivatives use two different versions of install-info and you may |
| 859 | documentation to find out which of the following commands you need: | 886 | see the message: |
| 887 | |||
| 888 | @example | ||
| 889 | This is not dpkg install-info anymore, but GNU install-info | ||
| 890 | See 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 |
| 862 | make install-info | 896 | make install-info |
| 863 | make install-info-debian | ||
| 864 | @end example | 897 | @end example |
| 865 | 898 | ||
| 866 | Then add the following line to @file{.emacs}. It is needed so that | 899 | Then 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 | ||
| 883 | Add the following lines to your @file{.emacs} file. The last three lines | 916 | To make sure files with extension @file{.org} use Org mode, add the following |
| 884 | define @emph{global} keys for the commands @command{org-store-link}, | 917 | line to your @file{.emacs} file. |
| 885 | @command{org-agenda}, and @command{org-iswitchb}---please choose suitable | ||
| 886 | keys 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 | ||
| 922 | default in Emacs@footnote{If you don't use font-lock globally, turn it on in | ||
| 923 | Org buffer with @code{(add-hook 'org-mode-hook 'turn-on-font-lock)}}. | ||
| 924 | |||
| 925 | The four Org commands @command{org-store-link}, @command{org-capture}, | ||
| 926 | @command{org-agenda}, and @command{org-iswitchb} should be accessible through | ||
| 927 | global keys (i.e.@: anywhere in Emacs, not just in Org buffers). Here are | ||
| 928 | suggested bindings for these keys, please modify the keys to your own | ||
| 929 | liking. | ||
| 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 | ||
| 896 | Furthermore, you must activate @code{font-lock-mode} in Org | ||
| 897 | buffers, because significant functionality depends on font-locking being | ||
| 898 | active. 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 |
| 906 | With this setup, all files with extension @samp{.org} will be put | 938 | With this setup, all files with extension @samp{.org} will be put |
| 907 | into Org-mode. As an alternative, make the first line of a file look | 939 | into 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 | |||
| 1183 | prefix argument N, go up to level N and then take that tree. If N is | 1215 | prefix argument N, go up to level N and then take that tree. If N is |
| 1184 | negative then go up that many levels. With a @kbd{C-u} prefix, do not remove | 1216 | negative then go up that many levels. With a @kbd{C-u} prefix, do not remove |
| 1185 | the previously used indirect buffer. | 1217 | the previously used indirect buffer. |
| 1218 | @orgcmd{C-c C-x v,org-copy-visible} | ||
| 1219 | Copy 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 | ||
| 1194 | When Emacs first visits an Org file, the global state is set to | 1228 | When Emacs first visits an Org file, the global state is set to |
| 1195 | OVERVIEW, i.e. only the top level headlines are visible. This can be | 1229 | OVERVIEW, i.e.@: only the top level headlines are visible. This can be |
| 1196 | configured through the variable @code{org-startup-folded}, or on a | 1230 | configured through the variable @code{org-startup-folded}, or on a |
| 1197 | per-file basis by adding one of the following lines anywhere in the | 1231 | per-file basis by adding one of the following lines anywhere in the |
| 1198 | buffer: | 1232 | buffer: |
| @@ -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} |
| 1215 | Switch back to the startup visibility of the buffer, i.e. whatever is | 1249 | Switch back to the startup visibility of the buffer, i.e.@: whatever is |
| 1216 | requested by startup options and @samp{VISIBILITY} properties in individual | 1250 | requested by startup options and @samp{VISIBILITY} properties in individual |
| 1217 | entries. | 1251 | entries. |
| 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 |
| 1276 | Insert new heading with same level as current. If the cursor is in a | 1310 | Insert new heading with same level as current. If the cursor is in a plain |
| 1277 | plain list item, a new item is created (@pxref{Plain lists}). To force | 1311 | list item, a new item is created (@pxref{Plain lists}). To force creation of |
| 1278 | creation of a new headline, use a prefix argument, or first press @key{RET} | 1312 | a new headline, use a prefix argument. When this command is used in the |
| 1279 | to get to the beginning of the next line. When this command is used in | 1313 | middle of a line, the line is split and the rest of the line becomes the new |
| 1280 | the middle of a line, the line is split and the rest of the line becomes | 1314 | headline@footnote{If you do not want the line to be split, customize the |
| 1281 | the new headline@footnote{If you do not want the line to be split, | 1315 | variable @code{org-M-RET-may-split-line}.}. If the command is used at the |
| 1282 | customize the variable @code{org-M-RET-may-split-line}.}. If the | 1316 | beginning of a headline, the new headline is created before the current line. |
| 1283 | command is used at the beginning of a headline, the new headline is | 1317 | If at the beginning of any other line, the content of that line is made the |
| 1284 | created before the current line. If at the beginning of any other line, | 1318 | new heading. If the command is used at the end of a folded subtree (i.e.@: |
| 1285 | the content of that line is made the new heading. If the command is | 1319 | behind the ellipses at the end of a headline), then a headline like the |
| 1286 | used at the end of a folded subtree (i.e. behind the ellipses at the end | 1320 | current one will be inserted after the end of the subtree. |
| 1287 | of a headline), then a headline like the current one will be inserted | ||
| 1288 | after 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} |
| 1290 | Just like @kbd{M-@key{RET}}, except when adding a new heading below the | 1322 | Just like @kbd{M-@key{RET}}, except when adding a new heading below the |
| 1291 | current heading, the new heading is placed after the body instead of before | 1323 | current 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} |
| 1318 | Move subtree down (swap with next subtree of same level). | 1350 | Move 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} |
| 1320 | Kill subtree, i.e. remove it from buffer but save in kill ring. | 1352 | Kill subtree, i.e.@: remove it from buffer but save in kill ring. |
| 1321 | With a numeric prefix argument N, kill N sequential subtrees. | 1353 | With 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} |
| 1323 | Copy subtree to kill ring. With a numeric prefix argument N, copy the N | 1355 | Copy 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 | |||
| 1362 | entries will also be removed. | 1394 | entries will also be removed. |
| 1363 | @orgcmd{C-x n s,org-narrow-to-subtree} | 1395 | @orgcmd{C-x n s,org-narrow-to-subtree} |
| 1364 | Narrow buffer to current subtree. | 1396 | Narrow buffer to current subtree. |
| 1397 | @orgcmd{C-x n b,org-narrow-to-block} | ||
| 1398 | Narrow buffer to current block. | ||
| 1365 | @orgcmd{C-x n w,widen} | 1399 | @orgcmd{C-x n w,widen} |
| 1366 | Widen buffer to remove narrowing. | 1400 | Widen 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: | |||
| 1413 | This prompts for an extra key to select a sparse-tree creating command. | 1447 | This 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 |
| 1416 | Occur. Prompts for a regexp and shows a sparse tree with all matches. If | 1450 | Prompts for a regexp and shows a sparse tree with all matches. If |
| 1417 | the match is in a headline, the headline is made visible. If the match is in | 1451 | the match is in a headline, the headline is made visible. If the match is in |
| 1418 | the body of an entry, headline and body are made visible. In order to | 1452 | the body of an entry, headline and body are made visible. In order to |
| 1419 | provide minimal context, also the full hierarchy of headlines above the match | 1453 | provide 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}. |
| 1424 | When called with a @kbd{C-u} prefix argument, previous highlights are kept, | 1458 | When called with a @kbd{C-u} prefix argument, previous highlights are kept, |
| 1425 | so several calls to this command can be stacked. | 1459 | so several calls to this command can be stacked. |
| 1460 | @orgcmdkkc{M-g n,M-g M-n,next-error} | ||
| 1461 | Jump to the next sparse tree match in this buffer. | ||
| 1462 | @orgcmdkkc{M-g p,M-g M-p,previous-error} | ||
| 1463 | Jump 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 |
| 1430 | For frequently used sparse trees of specific search strings, you can | 1469 | For 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 |
| 1474 | they will be seen as top-level headlines. Also, when you are hiding leading | 1513 | they will be seen as top-level headlines. Also, when you are hiding leading |
| 1475 | stars to get a clean outline view, plain list items starting with a star are | 1514 | stars to get a clean outline view, plain list items starting with a star may |
| 1476 | visually indistinguishable from true headlines. In short: even though | 1515 | be 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.} | 1516 | is supported, it may be better to not use it for plain list items.} as |
| 1478 | as bullets. | 1517 | bullets. |
| 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 |
| 1482 | a right parenthesis@footnote{You can filter out any of them by configuring | 1522 | a 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 |
| 1485 | the 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 |
| 1486 | item, the cookie must be put @emph{before} the checkbox.}. Those constructs | 1526 | confusion with normal text, those are limited to one character only. Beyond |
| 1487 | can be used in any item of the list in order to enforce a particular | 1527 | that limit, bullets will automatically fallback to numbers.}. If you want a |
| 1488 | numbering. | 1528 | list to start with a different value (e.g.@: 20), start the text of the item |
| 1529 | with @code{[@@20]}@footnote{If there's a checkbox in the item, the cookie | ||
| 1530 | must be put @emph{before} the checkbox. If you have activated alphabetical | ||
| 1531 | lists, you can also use counters like @code{[@@b]}.}. Those constructs can | ||
| 1532 | be 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 |
| 1491 | separator @samp{ :: } to separate the description @emph{term} from the | 1535 | separator @samp{ :: } to distinguish the description @emph{term} from the |
| 1492 | description. | 1536 | description. |
| 1493 | @end itemize | 1537 | @end itemize |
| 1494 | 1538 | ||
| 1495 | Items belonging to the same list must have the same indentation on the first | 1539 | Items belonging to the same list must have the same indentation on the first |
| 1496 | line. In particular, if an ordered list reaches number @samp{10.}, then the | 1540 | line. In particular, if an ordered list reaches number @samp{10.}, then the |
| 1497 | 2--digit numbers must be written left-aligned with the other numbers in the | 1541 | 2--digit numbers must be written left-aligned with the other numbers in the |
| 1498 | list. | 1542 | list. An item ends before the next line that is less or equally indented |
| 1543 | than 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 |
| 1503 | Two methods@footnote{To disable either of them, configure | 1548 | Two 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 |
| 1505 | before the next line that is indented like the bullet/number or less, or it | 1550 | whenever every item has ended, which means before any line less or equally |
| 1506 | ends before two blank lines@footnote{See also | 1551 | indented 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 | 1552 | lines@footnote{See also @code{org-empty-line-terminates-plain-lists}.}. In |
| 1508 | the list are closed@footnote{So you cannot have a sublist, some text and then | 1553 | that case, all items are closed. For finer control, you can end lists with |
| 1509 | another sublist while still in the same top-level list item. This used to be | 1554 | any pattern set in @code{org-list-end-regexp}. Here is an example: |
| 1510 | possible, but it was only supported in the HTML exporter and difficult to | ||
| 1511 | manage with automatic indentation.}. For finer control, you can end lists | ||
| 1512 | with 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, | |||
| 1536 | put into @file{.emacs}: @code{(require 'filladapt)}}, and by exporting them | 1578 | put into @file{.emacs}: @code{(require 'filladapt)}}, and by exporting them |
| 1537 | properly (@pxref{Exporting}). Since indentation is what governs the | 1579 | properly (@pxref{Exporting}). Since indentation is what governs the |
| 1538 | structure of these lists, many structural constructs like @code{#+BEGIN_...} | 1580 | structure of these lists, many structural constructs like @code{#+BEGIN_...} |
| 1539 | blocks can be indented to signal that they should be considered as a list | 1581 | blocks can be indented to signal that they belong to a particular item. |
| 1540 | item. | ||
| 1541 | 1582 | ||
| 1542 | @vindex org-list-demote-modify-bullet | 1583 | @vindex org-list-demote-modify-bullet |
| 1584 | @vindex org-list-indent-offset | ||
| 1543 | If you find that using a different bullet for a sub-list (than that used for | 1585 | If you find that using a different bullet for a sub-list (than that used for |
| 1544 | the current list-level) improves readability, customize the variable | 1586 | the 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 |
| 1588 | indentation 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 |
| 1548 | The following commands act on items when the cursor is in the first line of | 1592 | The 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 |
| 1567 | Insert new item at current level. With a prefix argument, force a new | 1611 | Insert new item at current level. With a prefix argument, force a new |
| 1568 | heading (@pxref{Structure editing}). If this command is used in the middle | 1612 | heading (@pxref{Structure editing}). If this command is used in the middle |
| 1569 | of a line, the line is @emph{split} and the rest of the line becomes the new | 1613 | of an item, that item is @emph{split} in two, and the second part becomes the |
| 1570 | item@footnote{If you do not want the line to be split, customize the variable | 1614 | new 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 | 1615 | variable @code{org-M-RET-may-split-line}.}. If this command is executed |
| 1572 | an 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 |
| 1573 | command is executed in the white space before the text that is part of an | 1617 | one. |
| 1574 | item but does not contain the bullet, a bullet is added to the current line. | ||
| 1575 | |||
| 1576 | As a new item cannot be inserted in a structural construct (like an example | ||
| 1577 | or source code block) within a list, Org will instead insert it right before | ||
| 1578 | the 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} |
| 1581 | Insert a new item with a checkbox (@pxref{Checkboxes}). | 1620 | Insert 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 |
| 1592 | Jump to the previous/next item in the current list, but only if | 1631 | @vindex org-list-use-circular-motion |
| 1632 | Jump to the previous/next item in the current list@footnote{If you want to | ||
| 1633 | cycle 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 |
| 1594 | jumping commands like @kbd{C-@key{up}} and @kbd{C-@key{down}} to quite | 1636 | jumping commands like @kbd{C-@key{up}} and @kbd{C-@key{down}} to quite |
| 1595 | similar effect. | 1637 | similar 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} |
| 1600 | Move the item including subitems up/down (swap with previous/next item | 1642 | Move the item including subitems up/down@footnote{See |
| 1601 | of same indentation). If the list is ordered, renumbering is | 1643 | @code{org-liste-use-circular-motion} for a cyclic behavior.} (swap with |
| 1602 | automatic. | 1644 | previous/next item of same indentation). If the list is ordered, renumbering |
| 1645 | is 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 |
| 1625 | If there is a checkbox (@pxref{Checkboxes}) in the item line, toggle the | 1668 | If there is a checkbox (@pxref{Checkboxes}) in the item line, toggle the |
| 1626 | state of the checkbox. Also, makes sure that all the | 1669 | state of the checkbox. In any case, verify bullets and indentation |
| 1627 | items on this list level use the same bullet and that the numbering of list | 1670 | consistency in the whole list. |
| 1628 | items (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, | |||
| 1636 | and its position@footnote{See @code{bullet} rule in | 1678 | and 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 |
| 1638 | prefix argument N, select the Nth bullet from this list. If there is an | 1680 | prefix argument N, select the Nth bullet from this list. If there is an |
| 1639 | active region when calling this, all lines will be converted to list items. | 1681 | active region when calling this, selected text will be changed into an item. |
| 1640 | If the first line already was a list item, any item markers will be removed | 1682 | With a prefix argument, all lines will be converted to list items. If the |
| 1641 | from the list. Finally, even without an active region, a normal line will be | 1683 | first line already was a list item, any item marker will be removed from the |
| 1684 | list. Finally, even without an active region, a normal line will be | ||
| 1642 | converted into a list item. | 1685 | converted into a list item. |
| 1643 | @kindex C-c * | 1686 | @kindex C-c * |
| 1644 | @item C-c * | 1687 | @item C-c * |
| 1645 | Turn a plain list item into a headline (so that it becomes a subheading at | 1688 | Turn a plain list item into a headline (so that it becomes a subheading at |
| 1646 | its location). @xref{Structure editing}, for a detailed explanation. | 1689 | its location). @xref{Structure editing}, for a detailed explanation. |
| 1690 | @kindex C-c C-* | ||
| 1691 | @item C-c C-* | ||
| 1692 | Turn 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 | |||
| 1721 | Org-mode supports the creation of footnotes. In contrast to the | 1769 | Org-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 |
| 1723 | larger document, not only for one-off documents like emails. The basic | 1771 | larger document, not only for one-off documents like emails. The basic |
| 1724 | syntax is similar to the one used by @file{footnote.el}, i.e. a footnote is | 1772 | syntax is similar to the one used by @file{footnote.el}, i.e.@: a footnote is |
| 1725 | defined in a paragraph that is started by a footnote marker in square | 1773 | defined in a paragraph that is started by a footnote marker in square |
| 1726 | brackets in column 0, no indentation allowed. If you need a paragraph break | 1774 | brackets in column 0, no indentation allowed. If you need a paragraph break |
| 1727 | inside a footnote, use the @LaTeX{} idiom @samp{\par}. The footnote reference | 1775 | inside 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.} | |||
| 1798 | n @r{Normalize the footnotes by collecting all definitions (including} | 1846 | n @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}.} |
| 1804 | d @r{Delete the footnote at point, and all definitions of and references} | 1852 | d @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 | |||
| 1831 | formatting works, you might want to use these commands in other modes like | 1879 | formatting works, you might want to use these commands in other modes like |
| 1832 | Text mode or Mail mode as well. The minor mode @code{orgstruct-mode} makes | 1880 | Text mode or Mail mode as well. The minor mode @code{orgstruct-mode} makes |
| 1833 | this possible. Toggle the mode with @kbd{M-x orgstruct-mode}, or | 1881 | this possible. Toggle the mode with @kbd{M-x orgstruct-mode}, or |
| 1834 | turn it on by default, for example in Mail mode, with one of: | 1882 | turn 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 | ||
| 1841 | When this mode is active and the cursor is on a line that looks to Org like a | 1889 | When 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 | ||
| 1878 | Org makes it easy to format tables in plain ASCII. Any line with | 1926 | Org 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 | 1927 | the first non-whitespace character is considered part of a table. @samp{|} |
| 1880 | table. @samp{|} is also the column separator. A table might look like | 1928 | is also the column separator@footnote{To insert a vertical bar into a table |
| 1881 | this: | 1929 | field, use @code{\vert} or, inside a word @code{abc\vert@{@}def}.}. A table |
| 1930 | might 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} |
| 1922 | Convert the active region to table. If every line contains at least one | 1971 | Convert the active region to table. If every line contains at least one |
| 1923 | TAB character, the function assumes that the material is tab separated. | 1972 | TAB character, the function assumes that the material is tab separated. |
| 1924 | If every line contains a comma, comma-separated values (CSV) are assumed. | 1973 | If every line contains a comma, comma-separated values (CSV) are assumed. |
| 1925 | If not, lines are split at whitespace into fields. You can use a prefix | 1974 | If 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 | |||
| 1928 | consecutive spaces, or alternatively a TAB will be the separator. | 1977 | consecutive spaces, or alternatively a TAB will be the separator. |
| 1929 | @* | 1978 | @* |
| 1930 | If there is no active region, this command creates an empty Org | 1979 | If there is no active region, this command creates an empty Org |
| 1931 | table. But it's easier just to start typing, like | 1980 | table. 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 | |||
| 2043 | Edit the current field in a separate window. This is useful for fields that | 2092 | Edit the current field in a separate window. This is useful for fields that |
| 2044 | are not fully visible (@pxref{Column width and alignment}). When called with | 2093 | are not fully visible (@pxref{Column width and alignment}). When called with |
| 2045 | a @kbd{C-u} prefix, just make the full field visible, so that it can be | 2094 | a @kbd{C-u} prefix, just make the full field visible, so that it can be |
| 2046 | edited in place. | 2095 | edited in place. When called with two @kbd{C-u} prefixes, make the editor |
| 2096 | window follow the cursor through the table and always show the current | ||
| 2097 | field. The follow mode exits automatically when the cursor leaves the table, | ||
| 2098 | or 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 |
| 2049 | Import a file as a table. The table should be TAB or whitespace | 2101 | Import 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 | |||
| 2187 | might also want to use it in other modes like Text mode or Mail mode. | 2239 | might also want to use it in other modes like Text mode or Mail mode. |
| 2188 | The minor mode Orgtbl mode makes this possible. You can always toggle | 2240 | The minor mode Orgtbl mode makes this possible. You can always toggle |
| 2189 | the mode with @kbd{M-x orgtbl-mode}. To turn it on by default, for | 2241 | the mode with @kbd{M-x orgtbl-mode}. To turn it on by default, for |
| 2190 | example in mail mode, use | 2242 | example 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 | ||
| 2196 | Furthermore, with some special setup, it is possible to maintain tables | 2248 | Furthermore, 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. | |||
| 2243 | Formulas can reference the value of another field in two ways. Like in | 2296 | Formulas can reference the value of another field in two ways. Like in |
| 2244 | any other spreadsheet, you may reference fields with a letter/number | 2297 | any other spreadsheet, you may reference fields with a letter/number |
| 2245 | combination like @code{B3}, meaning the 2nd field in the 3rd row. | 2298 | combination 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 | 2300 | However, Org prefers@footnote{Org will understand references typed by the |
| 2248 | @c Org's @code{B3} behaves like @code{$B$3} in other spreadsheets. | 2301 | user as @samp{B4}, but it will not use this syntax when offering a formula |
| 2249 | 2302 | for editing. You can customize this behavior using the variable | |
| 2250 | @noindent | 2303 | @code{org-table-use-standard-references}.} to use another, more general |
| 2251 | Org also uses another, more general operator that looks like this: | 2304 | representation 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 | 2309 | Column specifications can be absolute like @code{$1}, |
| 2257 | Column 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 |
| 2258 | or relative to the current column like @samp{+1} or @samp{-2}. | 2311 | column 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 | |
| 2260 | The row specification only counts data lines and ignores horizontal | 2313 | column, respectively, and you can use @code{$>>>} to indicate the third |
| 2261 | separator lines (hlines). You can use absolute row numbers | 2314 | column 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 | 2316 | The row specification only counts data lines and ignores horizontal separator |
| 2264 | hlines: @samp{I} refers to the first hline@footnote{Note that only | 2317 | lines (hlines). Like with columns, you can use absolute row numbers |
| 2265 | hlines are counted that @emph{separate} table lines. If the table | 2318 | @code{@@1}, @code{@@2},...@code{@@@var{N}}, and row numbers relative to the |
| 2266 | starts with a hline above the header, it does not count.}, @samp{II} to | 2319 | current row like @code{@@+3} or @code{@@-1}. @code{@@<} and @code{@@>} are |
| 2267 | the second, etc@. @samp{-I} refers to the first such line above the | 2320 | immutable references the first and last@footnote{For backward compatibility |
| 2268 | current line, @samp{+I} to the first such line below the current line. | 2321 | you can also use special names like @code{$LR5} and @code{$LR12} to refer in |
| 2269 | You can also write @samp{III+2} which is the second data line after the | 2322 | a stable way to the 5th and 12th field in the last row of the table. |
| 2270 | third hline in the table. | 2323 | However, this syntax is deprecated, it should not be used for new documents. |
| 2271 | 2324 | Use @code{@@>$} instead.} row in the table, respectively. You may also | |
| 2272 | @samp{0} refers to the current row and column. Also, if you omit | 2325 | specify the row relative to one of the hlines: @code{@@I} refers to the first |
| 2273 | either the column or the row part of the reference, the current | 2326 | hline, @code{@@II} to the second, etc@. @code{@@-I} refers to the first such |
| 2274 | row/column is implied. | 2327 | line above the current line, @code{@@+I} to the first such line below the |
| 2328 | current line. You can also write @code{@@III+2} which is the second data line | ||
| 2329 | after the third hline in the table. | ||
| 2330 | |||
| 2331 | @code{@@0} and @code{$0} refer to the current row and column, respectively, | ||
| 2332 | i.e. to the row/column for the field being computed. Also, if you omit | ||
| 2333 | either the column or the row part of the reference, the current row/column is | ||
| 2334 | implied. | ||
| 2275 | 2335 | ||
| 2276 | Org's references with @emph{unsigned} numbers are fixed references | 2336 | Org's references with @emph{unsigned} numbers are fixed references |
| 2277 | in the sense that if you use the same reference in the formula for two | 2337 | in 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 | |||
| 2280 | references because the same reference operator can reference different | 2340 | references because the same reference operator can reference different |
| 2281 | fields depending on the field being calculated by the formula. | 2341 | fields depending on the field being calculated by the formula. |
| 2282 | 2342 | ||
| 2283 | As a special case, references like @samp{$LR5} and @samp{$LR12} can be used | ||
| 2284 | to refer in a stable way to the 5th and 12th field in the last row of the | ||
| 2285 | table. | ||
| 2286 | |||
| 2287 | Here are a few examples: | 2343 | Here 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})} |
| 2291 | C2 @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} | ||
| 2293 | E& @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} |
| 2314 | A2..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 |
| 2342 | as the current table. Inefficient@footnote{The computation time scales as | 2398 | as the current table. Note that this is inefficient@footnote{The computation time scales as |
| 2343 | O(N^2) because table FOO is parsed for each field to be copied.} for large | 2399 | O(N^2) because table FOO is parsed for each field to be copied.} for large |
| 2344 | number of rows. | 2400 | number of rows. |
| 2345 | 2401 | ||
| @@ -2440,7 +2496,6 @@ n3 s3 e2 f4 @r{Normal, scientific, engineering, or fixed} | |||
| 2440 | D R @r{angle modes: degrees, radians} | 2496 | D R @r{angle modes: degrees, radians} |
| 2441 | F S @r{fraction and symbolic modes} | 2497 | F S @r{fraction and symbolic modes} |
| 2442 | N @r{interpret all fields as numbers, use 0 for non-numbers} | 2498 | N @r{interpret all fields as numbers, use 0 for non-numbers} |
| 2443 | T @r{force text interpretation} | ||
| 2444 | E @r{keep empty fields in ranges} | 2499 | E @r{keep empty fields in ranges} |
| 2445 | L @r{literal} | 2500 | L @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} | |||
| 2474 | Calc also contains a complete set of logical operations. For example | 2529 | Calc also contains a complete set of logical operations. For example |
| 2475 | 2530 | ||
| 2476 | @example | 2531 | @example |
| 2477 | if($1<20,teen,string("")) @r{``teen'' if age $1 less than 20, else empty} | 2532 | if($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 | 2535 | Note that you can also use two org-specific flags @code{T} and @code{t} for |
| 2536 | durations 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, | |||
| 2496 | without quotes. I.e., if you want a reference to be interpreted as a string | 2554 | without quotes. I.e., if you want a reference to be interpreted as a string |
| 2497 | by the Lisp form, enclose the reference operator itself in double-quotes, | 2555 | by the Lisp form, enclose the reference operator itself in double-quotes, |
| 2498 | like @code{"$3"}. Ranges are inserted as space-separated fields, so you can | 2556 | like @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 | 2557 | embed 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 | |||
| 2575 | If you want to compute time values use the @code{T} flag, either in Calc | ||
| 2576 | formulas 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 | |||
| 2588 | Input duration values must be of the form @code{[HH:MM[:SS]}, where seconds | ||
| 2589 | are optional. With the @code{T} flag, computed durations will be displayed | ||
| 2590 | as @code{[HH:MM:SS} (see the first formula above). With the @code{t} flag, | ||
| 2591 | computed durations will be displayed according to the value of the variable | ||
| 2592 | @code{org-table-duration-custom-format}, which defaults to @code{'hours} and | ||
| 2593 | will display the result as a fraction of hours (see the second formula in the | ||
| 2594 | example above). | ||
| 2595 | |||
| 2596 | Negative duration values can be manipulated as well, and integers will be | ||
| 2597 | considered 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 | ||
| 2516 | To assign a formula to a particular field, type it directly into the | 2606 | To assign a formula to a particular field, type it directly into the field, |
| 2517 | field, preceded by @samp{:=}, for example @samp{:=$1+$2}. When you | 2607 | preceded by @samp{:=}, for example @samp{:=vsum(@@II..III)}. When you press |
| 2518 | press @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, |
| 2519 | the field, the formula will be stored as the formula for this field, | 2609 | the formula will be stored as the formula for this field, evaluated, and the |
| 2520 | evaluated, and the current field replaced with the result. | 2610 | current field will be replaced with the result. |
| 2521 | 2611 | ||
| 2522 | @cindex #+TBLFM | 2612 | @cindex #+TBLFM |
| 2523 | Formulas are stored in a special line starting with @samp{#+TBLFM:} | 2613 | Formulas are stored in a special line starting with @samp{#+TBLFM:} directly |
| 2524 | directly below the table. If you type the equation in the 4th field of | 2614 | below the table. If you type the equation in the 4th field of the 3rd data |
| 2525 | the 3rd data line in the table, the formula will look like | 2615 | line 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 | 2616 | inserting/deleting/swapping column and rows with the appropriate commands, |
| 2527 | with the appropriate commands, @i{absolute references} (but not relative | 2617 | @i{absolute references} (but not relative ones) in stored formulas are |
| 2528 | ones) in stored formulas are modified in order to still reference the | 2618 | modified in order to still reference the same field. To avoid this from |
| 2529 | same field. Of course this is not true if you edit the table structure | 2619 | happening, in particular in range references, anchor ranges at the table |
| 2530 | with normal editing commands---then you must fix the equations yourself. | 2620 | borders (using @code{@@<}, @code{@@>}, @code{$<}, @code{$>}), or at hlines |
| 2531 | The left-hand side of a formula may also be a named field (@pxref{Advanced | 2621 | using the @code{@@I} notation. Automatic adaptation of field references does |
| 2532 | features}), or a last-row reference like @samp{$LR3}. | 2622 | of cause not happen if you edit the table structure with normal editing |
| 2533 | 2623 | commands---then you must fix the equations yourself. | |
| 2534 | Instead of typing an equation into the field, you may also use the | 2624 | |
| 2535 | following command | 2625 | Instead of typing an equation into the field, you may also use the following |
| 2626 | command | ||
| 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 | |||
| 2541 | it to the current field, and stores it. | 2632 | it 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 | 2635 | The left-hand side of a formula can also be a special expression in order to |
| 2636 | assign the formula to a number of different fields. There is no keyboard | ||
| 2637 | shortcut to enter such range formulas. To add them, use the formula editor | ||
| 2638 | (@pxref{Editing and debugging formulas}) or edit the @code{#+TBLFM:} line | ||
| 2639 | directly. | ||
| 2640 | |||
| 2641 | @table @code | ||
| 2642 | @item $2= | ||
| 2643 | Column formula, valid for the entire column. This is so common that Org | ||
| 2644 | treats these formulas in a special way, see @ref{Column formulas}. | ||
| 2645 | @item @@3= | ||
| 2646 | Row formula, applies to all fields in the specified row. @code{@@>=} means | ||
| 2647 | the last row. | ||
| 2648 | @item @@1$2..@@4$3= | ||
| 2649 | Range formula, applies to all fields in the given rectangular range. This | ||
| 2650 | can also be used to assign a formula to some but not all fields in a row. | ||
| 2651 | @item $name= | ||
| 2652 | Named 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 | ||
| 2549 | Often in a table, the same formula should be used for all fields in a | 2660 | When you assign a formula to a simple column reference like @code{$3=}, the |
| 2550 | particular column. Instead of having to copy the formula to all fields | 2661 | same formula will be used in all fields of that column, with the following |
| 2551 | in that column, Org allows you to assign a single formula to an entire | 2662 | very convenient exceptions: (i) If the table contains horizontal separator |
| 2552 | column. If the table contains horizontal separator hlines, everything | 2663 | hlines, everything before the first such line is considered part of the table |
| 2553 | before 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 |
| 2554 | and will not be modified by column formulas. | 2665 | already get a value from a field/range formula will be left alone by column |
| 2666 | formulas. These conditions make column formulas very easy to use. | ||
| 2555 | 2667 | ||
| 2556 | To assign a formula to a column, type it directly into any field in the | 2668 | To assign a formula to a column, type it directly into any field in the |
| 2557 | column, preceded by an equal sign, like @samp{=$1+$2}. When you press | 2669 | column, 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 | |||
| 2560 | and the current field replaced with the result. If the field contains only | 2672 | and 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 |
| 2562 | column, Org will only remember the most recently used formula. In the | 2674 | column, 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 |
| 2564 | side of a column formula cannot currently be the name of column, it | 2676 | left-hand side of a column formula can not be the name of column, it must be |
| 2565 | must be the numeric column reference. | 2677 | the numeric column reference or @code{$>}. |
| 2566 | 2678 | ||
| 2567 | Instead of typing an equation into the field, you may also use the | 2679 | Instead of typing an equation into the field, you may also use the |
| 2568 | following command: | 2680 | following command: |
| @@ -2572,7 +2684,7 @@ following command: | |||
| 2572 | Install a new formula for the current column and replace current field with | 2684 | Install a new formula for the current column and replace current field with |
| 2573 | the result of the formula. The command prompts for a formula, with default | 2685 | the result of the formula. The command prompts for a formula, with default |
| 2574 | taken from the @samp{#+TBLFM} line, applies it to the current field and | 2686 | taken from the @samp{#+TBLFM} line, applies it to the current field and |
| 2575 | stores it. With a numeric prefix argument(e.g. @kbd{C-5 C-c =}) the command | 2687 | stores it. With a numeric prefix argument(e.g.@: @kbd{C-5 C-c =}) the command |
| 2576 | will apply it to that many consecutive fields in the current column. | 2688 | will 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} |
| 2595 | Edit the formula associated with the current column/field in the | 2707 | Edit the formula associated with the current column/field in the |
| 2596 | minibuffer. See @ref{Column formulas}, and @ref{Field formulas}. | 2708 | minibuffer. 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} |
| 2598 | Re-insert the active formula (either a | 2710 | Re-insert the active formula (either a |
| 2599 | field formula, or a column formula) into the current field, so that you | 2711 | field 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} |
| 2698 | Recalculate the current row by first applying the stored column formulas | 2810 | Recalculate the current row by first applying the stored column formulas |
| 2699 | from left to right, and all field formulas in the current row. | 2811 | from 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. | |||
| 2724 | If you want the recalculation of fields to happen automatically, or if | 2836 | If you want the recalculation of fields to happen automatically, or if |
| 2725 | you want to be able to assign @i{names} to fields and columns, you need | 2837 | you want to be able to assign @i{names} to fields and columns, you need |
| 2726 | to reserve the first column of the table for special marking characters. | 2838 | to 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} |
| 2729 | Rotate the calculation mark in first column through the states @samp{ }, | 2842 | Rotate 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 | |||
| 2849 | be exercised through the @code{#+PLOT:} lines preceding a table. See below | 2962 | be exercised through the @code{#+PLOT:} lines preceding a table. See below |
| 2850 | for a complete list of Org-plot options. For more information and examples | 2963 | for a complete list of Org-plot options. For more information and examples |
| 2851 | see the Org-plot tutorial at | 2964 | see 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 |
| 2876 | Specify a @code{with} option to be inserted for every col being plotted | 2989 | Specify 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...). |
| 2878 | Defaults to @code{lines}. | 2991 | Defaults 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 | |||
| 2976 | point to the corresponding headline. The preferred match for a text link is | 3089 | point to the corresponding headline. The preferred match for a text link is |
| 2977 | a @i{dedicated target}: the same string in double angular brackets. Targets | 3090 | a @i{dedicated target}: the same string in double angular brackets. Targets |
| 2978 | may be located anywhere; sometimes it is convenient to put them into a | 3091 | may be located anywhere; sometimes it is convenient to put them into a |
| 2979 | comment line. For example | 3092 | comment 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} | |||
| 3076 | gnus:group#id @r{Gnus article link} | 3189 | gnus:group#id @r{Gnus article link} |
| 3077 | bbdb:R.*Stallman @r{BBDB link (with regexp)} | 3190 | bbdb:R.*Stallman @r{BBDB link (with regexp)} |
| 3078 | irc:/irc.com/#emacs/bob @r{IRC link} | 3191 | irc:/irc.com/#emacs/bob @r{IRC link} |
| 3079 | info:org:External%20links @r{Info node link (with encoded space)} | 3192 | info:org#External%20links @r{Info node link (with encoded space)} |
| 3080 | shell:ls *.org @r{A shell command} | 3193 | shell:ls *.org @r{A shell command} |
| 3081 | elisp:org-agenda @r{Interactive Elisp command} | 3194 | elisp:org-agenda @r{Interactive Elisp command} |
| 3082 | elisp:(find-file-other-frame "Elisp.org") @r{Elisp form to evaluate} | 3195 | elisp:(find-file-other-frame "Elisp.org") @r{Elisp form to evaluate} |
| 3083 | @end example | 3196 | @end example |
| 3084 | 3197 | ||
| 3198 | For customizing Org to add new link types @ref{Adding hyperlink types}. | ||
| 3199 | |||
| 3085 | A link should be enclosed in double brackets and may contain a | 3200 | A link should be enclosed in double brackets and may contain a |
| 3086 | descriptive text to be displayed instead of the URL (@pxref{Link | 3201 | descriptive text to be displayed instead of the URL (@pxref{Link |
| 3087 | format}), for example: | 3202 | format}), for example: |
| @@ -3123,7 +3238,9 @@ buffer: | |||
| 3123 | @b{Org-mode buffers}@* | 3238 | @b{Org-mode buffers}@* |
| 3124 | For Org files, if there is a @samp{<<target>>} at the cursor, the link points | 3239 | For Org files, if there is a @samp{<<target>>} at the cursor, the link points |
| 3125 | to the target. Otherwise it points to the current headline, which will also | 3240 | to the target. Otherwise it points to the current headline, which will also |
| 3126 | be the description. | 3241 | be the description@footnote{If the headline contains a timestamp, it will be |
| 3242 | removed from the link and result in a wrong link -- you should avoid putting | ||
| 3243 | timestamp 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 |
| 3263 | Toggle the inline display of linked images. Normally this will only inline | 3380 | Toggle the inline display of linked images. Normally this will only inline |
| 3264 | images that have no description part in the link, i.e. images that will also | 3381 | images that have no description part in the link, i.e.@: images that will also |
| 3265 | be inlined during export. When called with a prefix argument, also display | 3382 | be inlined during export. When called with a prefix argument, also display |
| 3266 | images that do have a link description. You can ask for inline images to be | 3383 | images that do have a link description. You can ask for inline images to be |
| 3267 | displayed at startup by configuring the variable | 3384 | displayed 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 |
| 3272 | Push the current position onto the mark ring, to be able to return | 3389 | Push the current position onto the mark ring, to be able to return |
| 3273 | easily. Commands following an internal link do this automatically. | 3390 | easily. 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 |
| 3364 | In-buffer completion (@pxref{Completion}) can be used after @samp{[} to | 3481 | In-buffer completion (@pxref{Completion}) can be used after @samp{[} to |
| 3365 | complete link abbreviations. You may also define a function | 3482 | complete 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) |
| 3367 | support for inserting such a link with @kbd{C-c C-l}. Such a function should | 3484 | support for inserting such a link with @kbd{C-c C-l}. Such a function should |
| 3368 | not accept any arguments, and return the full link with prefix. | 3485 | not 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. | |||
| 3375 | File links can contain additional information to make Emacs jump to a | 3492 | File links can contain additional information to make Emacs jump to a |
| 3376 | particular location in the file when following a link. This can be a | 3493 | particular location in the file when following a link. This can be a |
| 3377 | line number or a search option after a double@footnote{For backward | 3494 | line number or a search option after a double@footnote{For backward |
| 3378 | compatibility, line numbers can also follow a single colon.} colon. For | 3495 | compatibility, line numbers can also follow a single colon.} colon. For |
| 3379 | example, when the command @kbd{C-c l} creates a link (@pxref{Handling | 3496 | example, when the command @kbd{C-c l} creates a link (@pxref{Handling |
| 3380 | links}) to a file, it encodes the words in the current line as a search | 3497 | links}) to a file, it encodes the words in the current line as a search |
| 3381 | string that can be used to find this line back later when following the | 3498 | string 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 | |||
| 3517 | headings hierarchy above them. With a prefix argument (or by using @kbd{C-c | 3634 | headings 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 |
| 3519 | you can also give a list of keywords like @code{KWD1|KWD2|...} to list | 3636 | you can also give a list of keywords like @code{KWD1|KWD2|...} to list |
| 3520 | entries that match any one of these keywords. With numeric prefix argument | 3637 | entries that match any one of these keywords. With a numeric prefix argument |
| 3521 | N, show the tree for the Nth keyword in the variable | 3638 | N, 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, |
| 3523 | both un-done and done. | 3640 | both 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 |
| 3691 | If you then press @code{C-c C-t} followed by the selection key, the entry | 3808 | If you then press @kbd{C-c C-t} followed by the selection key, the entry |
| 3692 | will be switched to this state. @key{SPC} can be used to remove any TODO | 3809 | will be switched to this state. @kbd{SPC} can be used to remove any TODO |
| 3693 | keyword from an entry.@footnote{Check also the variable | 3810 | keyword 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 |
| 3695 | state through the tags interface (@pxref{Setting tags}), in case you like to | 3812 | state 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: | |||
| 3972 | You have enabled the @code{habits} module by customizing the variable | 4089 | You have enabled the @code{habits} module by customizing the variable |
| 3973 | @code{org-modules}. | 4090 | @code{org-modules}. |
| 3974 | @item | 4091 | @item |
| 3975 | The habit is a TODO, with a TODO keyword representing an open state. | 4092 | The habit is a TODO item, with a TODO keyword representing an open state. |
| 3976 | @item | 4093 | @item |
| 3977 | The property @code{STYLE} is set to the value @code{habit}. | 4094 | The 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 | |||
| 3986 | three days, but at most every two days. | 4103 | three days, but at most every two days. |
| 3987 | @item | 4104 | @item |
| 3988 | You must also have state logging for the @code{DONE} state enabled, in order | 4105 | You must also have state logging for the @code{DONE} state enabled, in order |
| 3989 | for historical data to be represented in the consistency graph. If it's not | 4106 | for historical data to be represented in the consistency graph. If it is not |
| 3990 | enabled it's not an error, but the consistency graphs will be largely | 4107 | enabled it is not an error, but the consistency graphs will be largely |
| 3991 | meaningless. | 4108 | meaningless. |
| 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 |
| 4047 | The buffer column at which the consistency graph should be drawn. This will | 4164 | The buffer column at which the consistency graph should be drawn. This will |
| 4048 | overwrite any text in that column, so it's a good idea to keep your habits' | 4165 | overwrite any text in that column, so it is a good idea to keep your habits' |
| 4049 | titles brief and to the point. | 4166 | titles brief and to the point. |
| 4050 | @item org-habit-preceding-days | 4167 | @item org-habit-preceding-days |
| 4051 | The amount of history, in days before today, to appear in consistency graphs. | 4168 | The 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 |
| 4188 | Every item in a plain list@footnote{With the exception of description | 4305 | Every item in a plain list@footnote{With the exception of description |
| 4189 | lists. But you can allow it by modifying @code{org-list-automatic-rules} | 4306 | lists. But you can allow it by modifying @code{org-list-automatic-rules} |
| 4190 | accordingly.} (@pxref{Plain lists}) can be made into a checkbox by starting | 4307 | accordingly.} (@pxref{Plain lists}) can be made into a checkbox by starting |
| 4191 | it with the string @samp{[ ]}. This feature is similar to TODO items | 4308 | it 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. | |||
| 4225 | Each cookie covers checkboxes of direct children structurally below the | 4342 | Each cookie covers checkboxes of direct children structurally below the |
| 4226 | headline/item on which the cookie appears@footnote{Set the variable | 4343 | headline/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 |
| 4228 | represent the all checkboxes below the cookie, not just the direct | 4345 | count all checkboxes below the cookie, not just those belonging to direct |
| 4229 | children.}. You have to insert the cookie yourself by typing either | 4346 | children.}. 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} |
| 4231 | result, as in the examples above. With @samp{[%]} you get information about | 4348 | result, 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). | |||
| 4265 | If there is no active region, just toggle the checkbox at point. | 4382 | If 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} |
| 4268 | Insert a new item with a checkbox. | 4385 | Insert a new item with a checkbox. This works only if the cursor is already |
| 4269 | This works only if the cursor is already in a plain list item | 4386 | in 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 | |||
| 4283 | updated automatically if you toggle checkboxes with @kbd{C-c C-c} and make | 4399 | updated automatically if you toggle checkboxes with @kbd{C-c C-c} and make |
| 4284 | new ones with @kbd{M-S-@key{RET}}. TODO statistics cookies update when | 4400 | new ones with @kbd{M-S-@key{RET}}. TODO statistics cookies update when |
| 4285 | changing TODO states. If you delete boxes/entries or add/change them by | 4401 | changing TODO states. If you delete boxes/entries or add/change them by |
| 4286 | hand, use this command to get things back into sync. Or simply toggle any | 4402 | hand, use this command to get things back into sync. |
| 4287 | entry 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 |
| 4389 | Org will support tag insertion based on a @emph{list of tags}. By | 4504 | Org supports tag insertion based on a @emph{list of tags}. By |
| 4390 | default this list is constructed dynamically, containing all tags | 4505 | default this list is constructed dynamically, containing all tags |
| 4391 | currently used in the buffer. You may also globally specify a hard list | 4506 | currently used in the buffer. You may also globally specify a hard list |
| 4392 | of tags with the variable @code{org-tag-alist}. Finally you can set | 4507 | of 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} |
| 4499 | Enter a tag in the minibuffer, even if the tag is not in the predefined | 4614 | Enter a tag in the minibuffer, even if the tag is not in the predefined |
| 4500 | list. You will be able to complete on all tags present in the buffer. | 4615 | list. You will be able to complete on all tags present in the buffer. |
| 4616 | You 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} |
| 4503 | Clear all tags for this line. | 4620 | Clear 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 | |||
| 4548 | information into special lists. | 4665 | information 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} |
| 4552 | Create a sparse tree with all headlines matching a tags search. With a | 4669 | Create 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. | |||
| 4655 | The following commands help to work with properties: | 4772 | The 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} |
| 4659 | After an initial colon in a line, complete property keys. All keys used | 4776 | After an initial colon in a line, complete property keys. All keys used |
| 4660 | in the current file will be offered as possible completions. | 4777 | in 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 | ||
| 4689 | Special properties provide an alternative access method to Org-mode | 4806 | Special properties provide an alternative access method to Org-mode features, |
| 4690 | features, like the TODO state or the priority of an entry, discussed in the | 4807 | like the TODO state or the priority of an entry, discussed in the previous |
| 4691 | previous chapters. This interface exists so that you can include | 4808 | chapters. This interface exists so that you can include these states in a |
| 4692 | these states in a column view (@pxref{Column view}), or to use them in | 4809 | column view (@pxref{Column view}), or to use them in queries. The following |
| 4693 | queries. The following property names are special and should not be | 4810 | property names are special and (except for @code{:CATEGORY:}) should not be |
| 4694 | used as keys in the properties drawer: | 4811 | used 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 |
| 4711 | TODO @r{The TODO keyword of the entry.} | 4829 | TODO @r{The TODO keyword of the entry.} |
| 4712 | TAGS @r{The tags defined directly in the headline.} | 4830 | TAGS @r{The tags defined directly in the headline.} |
| @@ -4719,9 +4837,10 @@ CLOSED @r{When was this entry closed?} | |||
| 4719 | TIMESTAMP @r{The first keyword-less timestamp in the entry.} | 4837 | TIMESTAMP @r{The first keyword-less timestamp in the entry.} |
| 4720 | TIMESTAMP_IA @r{The first inactive timestamp in the entry.} | 4838 | TIMESTAMP_IA @r{The first inactive timestamp in the entry.} |
| 4721 | CLOCKSUM @r{The sum of CLOCK intervals in the subtree. @code{org-clock-sum}} | 4839 | CLOCKSUM @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.} |
| 4723 | BLOCKED @r{"t" if task is currently blocked by children or siblings} | 4841 | BLOCKED @r{"t" if task is currently blocked by children or siblings} |
| 4724 | ITEM @r{The content of the entry.} | 4842 | ITEM @r{The content of the entry.} |
| 4843 | FILE @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 |
| 4914 | Be aware that you can only have one summary type for any property you | 5033 | Be aware that you can only have one summary type for any property you |
| 4915 | include. Subsequent columns referencing the same property will all display the | 5034 | include. Subsequent columns referencing the same property will all display the |
| 4916 | same summary information. | 5035 | same summary information. |
| 4917 | 5036 | ||
| 4918 | The @code{est+} summary type requires further explanation. It is used for | 5037 | The @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 | |||
| 4923 | average at 5.5 days, but the first represents a more predictable delivery. | 5042 | average at 5.5 days, but the first represents a more predictable delivery. |
| 4924 | 5043 | ||
| 4925 | When combining a set of such estimates, simply adding the lows and highs | 5044 | When combining a set of such estimates, simply adding the lows and highs |
| 4926 | produces an unrealistically wide result. Instead, @code{est+} adds the | 5045 | produces an unrealistically wide result. Instead, @code{est+} adds the |
| 4927 | statistical mean and variance of the sub-tasks, generating a final estimate | 5046 | statistical mean and variance of the sub-tasks, generating a final estimate |
| 4928 | from the sum. For example, suppose you had ten tasks, each of which was | 5047 | from the sum. For example, suppose you had ten tasks, each of which was |
| 4929 | estimated at 0.5 to 2 days of work. Straight addition produces an estimate | 5048 | estimated at 0.5 to 2 days of work. Straight addition produces an estimate |
| 4930 | of 5 to 20 days, representing what to expect if everything goes either | 5049 | of 5 to 20 days, representing what to expect if everything goes either |
| 4931 | extremely well or extremely poorly. In contrast, @code{est+} estimates the | 5050 | extremely well or extremely poorly. In contrast, @code{est+} estimates the |
| 4932 | full job more realistically, at 10-15 days. | 5051 | full job more realistically, at 10-15 days. |
| 4933 | 5052 | ||
| 4934 | Here is an example for a complete columns definition, along with allowed | 5053 | Here is an example for a complete columns definition, along with allowed |
| @@ -4944,7 +5063,7 @@ values. | |||
| 4944 | 5063 | ||
| 4945 | @noindent | 5064 | @noindent |
| 4946 | The first column, @samp{%25ITEM}, means the first 25 characters of the | 5065 | The first column, @samp{%25ITEM}, means the first 25 characters of the |
| 4947 | item itself, i.e. of the headline. You probably always should start the | 5066 | item itself, i.e.@: of the headline. You probably always should start the |
| 4948 | column definition with the @samp{ITEM} specifier. The other specifiers | 5067 | column definition with the @samp{ITEM} specifier. The other specifiers |
| 4949 | create columns @samp{Owner} with a list of names as allowed values, for | 5068 | create 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 |
| 5173 | For more complex date specifications, Org-mode supports using the | 5292 | For more complex date specifications, Org-mode supports using the special |
| 5174 | special sexp diary entries implemented in the Emacs calendar/diary | 5293 | sexp diary entries implemented in the Emacs calendar/diary |
| 5175 | package. For example | 5294 | package@footnote{When working with the standard diary sexp functions, you |
| 5295 | need to be very careful with the order of the arguments. That order depend | ||
| 5296 | evilly on the variable @code{calendar-date-style} (or, for older Emacs | ||
| 5297 | versions, @code{european-calendar-style}). For example, to specify a date | ||
| 5298 | December 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 | ||
| 5300 | the settings. This has been the source of much confusion. Org-mode users | ||
| 5301 | can resort to special versions of these functions like @code{org-date} or | ||
| 5302 | @code{org-anniversary}. These work just like the corresponding @code{diary-} | ||
| 5303 | functions, but with stable ISO order of arguments (year, month, day) wherever | ||
| 5304 | applicable, 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, | |||
| 5256 | shifting the time block with constant length. To change the length, modify | 5385 | shifting the time block with constant length. To change the length, modify |
| 5257 | the second time. Note that if the cursor is in a headline and not at a | 5386 | the second time. Note that if the cursor is in a headline and not at a |
| 5258 | timestamp, these same keys modify the priority of an item. | 5387 | timestamp, 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 |
| 5260 | related modes (@pxref{Conflicts}). | 5389 | related 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 | |||
| 5301 | in @b{bold}. | 5430 | in @b{bold}. |
| 5302 | 5431 | ||
| 5303 | @example | 5432 | @example |
| 5304 | 3-2-5 --> 2003-02-05 | 5433 | 3-2-5 @result{} 2003-02-05 |
| 5305 | 2/5/3 --> 2003-02-05 | 5434 | 2/5/3 @result{} 2003-02-05 |
| 5306 | 14 --> @b{2006}-@b{06}-14 | 5435 | 14 @result{} @b{2006}-@b{06}-14 |
| 5307 | 12 --> @b{2006}-@b{07}-12 | 5436 | 12 @result{} @b{2006}-@b{07}-12 |
| 5308 | 2/5 --> @b{2007}-02-05 | 5437 | 2/5 @result{} @b{2007}-02-05 |
| 5309 | Fri --> nearest Friday (default date or later) | 5438 | Fri @result{} nearest Friday (default date or later) |
| 5310 | sep 15 --> @b{2006}-09-15 | 5439 | sep 15 @result{} @b{2006}-09-15 |
| 5311 | feb 15 --> @b{2007}-02-15 | 5440 | feb 15 @result{} @b{2007}-02-15 |
| 5312 | sep 12 9 --> 2009-09-12 | 5441 | sep 12 9 @result{} 2009-09-12 |
| 5313 | 12:45 --> @b{2006}-@b{06}-@b{13} 12:45 | 5442 | 12:45 @result{} @b{2006}-@b{06}-@b{13} 12:45 |
| 5314 | 22 sept 0:34 --> @b{2006}-09-22 0:34 | 5443 | 22 sept 0:34 @result{} @b{2006}-09-22 0:34 |
| 5315 | w4 --> ISO week for of the current year @b{2006} | 5444 | w4 @result{} ISO week for of the current year @b{2006} |
| 5316 | 2012 w4 fri --> Friday of ISO week 4 in 2012 | 5445 | 2012 w4 fri @result{} Friday of ISO week 4 in 2012 |
| 5317 | 2012-w04-5 --> Same as above | 5446 | 2012-w04-5 @result{} Same as above |
| 5318 | @end example | 5447 | @end example |
| 5319 | 5448 | ||
| 5320 | Furthermore you can specify a relative date by giving, as the | 5449 | Furthermore 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 | |||
| 5323 | single plus or minus, the date is always relative to today. With a | 5452 | single plus or minus, the date is always relative to today. With a |
| 5324 | double plus or minus, it is relative to the default date. If instead of | 5453 | double plus or minus, it is relative to the default date. If instead of |
| 5325 | a single letter, you use the abbreviation of day name, the date will be | 5454 | a single letter, you use the abbreviation of day name, the date will be |
| 5326 | the Nth such day. E.g. | 5455 | the 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 | |||
| 5341 | you want to use unabbreviated names and/or other languages, configure | 5470 | you want to use unabbreviated names and/or other languages, configure |
| 5342 | the variables @code{parse-time-months} and @code{parse-time-weekdays}. | 5471 | the variables @code{parse-time-months} and @code{parse-time-weekdays}. |
| 5343 | 5472 | ||
| 5473 | @vindex org-read-date-force-compatible-dates | ||
| 5474 | Not all dates can be represented in a given Emacs implementation. By default | ||
| 5475 | Org mode forces dates into the compatibility range 1970--2037 which works on | ||
| 5476 | all Emacs implementations. If you want to use dates outside of this range, | ||
| 5477 | read the docstring of the variable | ||
| 5478 | @code{org-read-date-force-compatible-dates}. | ||
| 5479 | |||
| 5344 | You can specify a time range by giving start and end times or by giving a | 5480 | You can specify a time range by giving start and end times or by giving a |
| 5345 | start time and a duration (in HH:MM format). Use `-' or `-@{@}-' as the separator | 5481 | start time and a duration (in HH:MM format). Use one or two dash(es) as the |
| 5346 | in the former case and use '+' as the separator in the latter case. E.g. | 5482 | separator in the former case and use '+' as the separator in the latter |
| 5483 | case, e.g.@: | ||
| 5347 | 5484 | ||
| 5348 | @example | 5485 | @example |
| 5349 | 11am-1:15pm --> 11:00-13:15 | 5486 | 11am-1:15pm @result{} 11:00-13:15 |
| 5350 | 11am--1:15pm --> same as above | 5487 | 11am--1:15pm @result{} same as above |
| 5351 | 11am+2:15 --> same as above | 5488 | 11am+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 | |||
| 5479 | be listed on that date after it has been marked DONE. If you don't like | 5616 | be listed on that date after it has been marked DONE. If you don't like |
| 5480 | this, set the variable @code{org-agenda-skip-scheduled-if-done}.}. In | 5617 | this, set the variable @code{org-agenda-skip-scheduled-if-done}.}. In |
| 5481 | addition, a reminder that the scheduled date has passed will be present | 5618 | addition, a reminder that the scheduled date has passed will be present |
| 5482 | in the compilation for @emph{today}, until the entry is marked DONE, i.e. | 5619 | in the compilation for @emph{today}, until the entry is marked DONE, i.e.@: |
| 5483 | the task will automatically be forwarded until completed. | 5620 | the 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 | |||
| 5502 | assumption that the timestamp represents the @i{nearest instance} of | 5639 | assumption that the timestamp represents the @i{nearest instance} of |
| 5503 | the repeater. However, the use of diary sexp entries like | 5640 | the 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 |
| 5507 | in scheduling and deadline timestamps is limited. Org-mode does not | 5644 | in scheduling and deadline timestamps is limited. Org-mode does not |
| 5508 | know enough about the internals of each sexp function to issue early and | 5645 | know 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 | ||
| 5520 | The following commands allow you to quickly insert a deadline or to schedule | 5657 | The 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 | ||
| 5659 | any text between this line and the headline.} a deadline or to schedule | ||
| 5521 | an item: | 5660 | an 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} |
| 5526 | Insert @samp{DEADLINE} keyword along with a stamp. The insertion will happen | 5665 | Insert @samp{DEADLINE} keyword along with a stamp. The insertion will happen |
| 5527 | in the line directly following the headline. When called with a prefix arg, | 5666 | in the line directly following the headline. Any CLOSED timestamp will be |
| 5528 | an existing deadline will be removed from the entry. Depending on the | 5667 | removed. When called with a prefix arg, an existing deadline will be removed |
| 5529 | variable @code{org-log-redeadline}@footnote{with corresponding | 5668 | from 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}, |
| 5531 | and @code{nologredeadline}}, a note will be taken when changing an existing | 5670 | and @code{nologredeadline}}, a note will be taken when changing an existing |
| 5532 | deadline. | 5671 | deadline. |
| 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} |
| 5536 | Insert @samp{SCHEDULED} keyword along with a stamp. The insertion will | 5674 | Insert @samp{SCHEDULED} keyword along with a stamp. The insertion will |
| 5537 | happen in the line directly following the headline. Any CLOSED timestamp | 5675 | happen in the line directly following the headline. Any CLOSED timestamp |
| 5538 | will be removed. When called with a prefix argument, remove the scheduling | 5676 | will be removed. When called with a prefix argument, remove the scheduling |
| 5539 | date from the entry. Depending on the variable | 5677 | date 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} |
| 5541 | keywords @code{logredeadline}, @code{lognoteredeadline}, and | 5679 | keywords @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 |
| 5543 | scheduling time. | 5681 | scheduling 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. | |||
| 5566 | Sparse tree for deadlines and scheduled items after a given date. | 5704 | Sparse tree for deadlines and scheduled items after a given date. |
| 5567 | @end table | 5705 | @end table |
| 5568 | 5706 | ||
| 5707 | Note that @code{org-schedule} and @code{org-deadline} supports | ||
| 5708 | setting the date by indicating a relative time: e.g. +1d will set | ||
| 5709 | the date to the next day after today, and --1w will set the date | ||
| 5710 | to 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 | ||
| 5687 | Start the clock on the current item (clock-in). This inserts the CLOCK | 5831 | Start the clock on the current item (clock-in). This inserts the CLOCK |
| 5688 | keyword together with a timestamp. If this is not the first clocking of | 5832 | keyword together with a timestamp. If this is not the first clocking of |
| 5689 | this item, the multiple CLOCK lines will be wrapped into a | 5833 | this 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 |
| 5836 | the setting of this variable for a subtree by setting a | ||
| 5837 | @code{CLOCK_INTO_DRAWER} or @code{LOG_INTO_DRAWER} property. | ||
| 5838 | When called with a @kbd{C-u} prefix argument, | ||
| 5692 | select the task from a list of recently clocked tasks. With two @kbd{C-u | 5839 | select the task from a list of recently clocked tasks. With two @kbd{C-u |
| 5693 | C-u} prefixes, clock into the task at point and mark it as the default task. | 5840 | C-u} prefixes, clock into the task at point and mark it as the default task. |
| 5694 | The default task will always be available when selecting a clocking task, | 5841 | The default task will always be available when selecting a clocking task, |
| @@ -5730,6 +5877,9 @@ Update the effort estimate for the current clock task. | |||
| 5730 | Recompute the time interval after changing one of the timestamps. This | 5877 | Recompute the time interval after changing one of the timestamps. This |
| 5731 | is only necessary if you edit the timestamps directly. If you change | 5878 | is only necessary if you edit the timestamps directly. If you change |
| 5732 | them with @kbd{S-@key{cursor}} keys, the update is automatic. | 5879 | them with @kbd{S-@key{cursor}} keys, the update is automatic. |
| 5880 | @orgcmd{C-S-@key{up/down},org-clock-timestamps-up/down} | ||
| 5881 | On @code{CLOCK} log lines, increase/decrease both timestamps at the same | ||
| 5882 | time so that duration keeps the same. | ||
| 5733 | @orgcmd{C-c C-t,org-todo} | 5883 | @orgcmd{C-c C-t,org-todo} |
| 5734 | Changing the TODO state of an item to DONE automatically stops the clock | 5884 | Changing the TODO state of an item to DONE automatically stops the clock |
| 5735 | if it is running in this same item. | 5885 | if 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} | |||
| 5741 | prefix arg, select the target task from a list of recently clocked tasks. | 5891 | prefix 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 |
| 5744 | Display time summaries for each subtree in the current buffer. This | 5894 | Display time summaries for each subtree in the current buffer. This puts |
| 5745 | puts overlays at the end of each headline, showing the total time | 5895 | overlays at the end of each headline, showing the total time recorded under |
| 5746 | recorded under that heading, including the time of any subheadings. You | 5896 | that heading, including the time of any subheadings. You can use visibility |
| 5747 | can use visibility cycling to study the tree, but the overlays disappear | 5897 | cycling to study the tree, but the overlays disappear when you change the |
| 5748 | when you change the buffer (see variable | 5898 | buffer (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 | ||
| 5752 | The @kbd{l} key may be used in the timeline (@pxref{Timeline}) and in | 5902 | The @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 | ||
| 5836 | Then there are options which determine the formatting of the table. There | 5987 | Then 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}, | |||
| 5838 | but you can specify your own function using the @code{:formatter} parameter. | 5989 | but 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 | |||
| 5945 | dangling clock which was never clocked out from your last session. Using | 6100 | dangling clock which was never clocked out from your last session. Using |
| 5946 | that clock's starting time as the beginning of the unaccounted-for period, | 6101 | that clock's starting time as the beginning of the unaccounted-for period, |
| 5947 | Org will ask how you want to resolve that time. The logic and behavior is | 6102 | Org will ask how you want to resolve that time. The logic and behavior is |
| 5948 | identical to dealing with away time due to idleness; it's just happening due | 6103 | identical to dealing with away time due to idleness; it is just happening due |
| 5949 | to a recovery event rather than a set amount of idle time. | 6104 | to a recovery event rather than a set amount of idle time. |
| 5950 | 6105 | ||
| 5951 | You can also check all the files visited by your Org agenda for dangling | 6106 | You 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 | |||
| 5982 | buffer you can use | 6137 | buffer 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 | ||
| 6063 | Calling @code{org-timer-set-timer} from an Org-mode buffer runs a countdown | 6218 | Calling @code{org-timer-set-timer} from an Org-mode buffer runs a countdown |
| 6064 | timer. Use @key{;} from agenda buffers, @key{C-c C-x ;} everwhere else. | 6219 | timer. 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 |
| 6067 | countdown timer in the modeline. @code{org-timer-default-timer} sets the | 6222 | countdown 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} |
| 6139 | Call the command @code{org-capture}. Note that this keybinding is global and | 6294 | Call the command @code{org-capture}. Note that this keybinding is global and |
| 6140 | not active by default - you need to install it. If you have templates | 6295 | not active by default - you need to install it. If you have templates |
| 6296 | @cindex date tree | ||
| 6141 | defined @pxref{Capture templates}, it will offer these templates for | 6297 | defined @pxref{Capture templates}, it will offer these templates for |
| 6142 | selection or use a new Org outline node as the default template. It will | 6298 | selection or use a new Org outline node as the default template. It will |
| 6143 | insert the template into the target file and switch to an indirect buffer | 6299 | insert 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} |
| 6175 | Visit the target location of a cpature template. You get to select the | 6331 | Visit the target location of a capture template. You get to select the |
| 6176 | template in the usual way. | 6332 | template in the usual way. |
| 6177 | @orgkey{C-u C-u C-c c} | 6333 | @orgkey{C-u C-u C-c c} |
| 6178 | Visit the last stored capture item in its buffer. | 6334 | Visit the last stored capture item in its buffer. |
| @@ -6220,6 +6376,14 @@ extremely useful for deriving tasks from emails, for example. You fill in | |||
| 6220 | the task definition, press @code{C-c C-c} and Org returns you to the same | 6376 | the task definition, press @code{C-c C-c} and Org returns you to the same |
| 6221 | place where you started the capture process. | 6377 | place where you started the capture process. |
| 6222 | 6378 | ||
| 6379 | To define special keys to capture to a particular template without going | ||
| 6380 | through the interactive template selection, you can create your key binding | ||
| 6381 | like 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 | ||
| 6232 | Now lets look at the elements of a template definition. Each entry in | 6396 | Now 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 |
| 6237 | The keys that will select the template, as a string, characters | 6401 | The keys that will select the template, as a string, characters |
| 6238 | only, for example @code{"a"} for a template to be selected with a | 6402 | only, for example @code{"a"} for a template to be selected with a |
| 6239 | single key, or @code{"bt"} for selection with two keys. When using | 6403 | single key, or @code{"bt"} for selection with two keys. When using |
| 6240 | several keys, keys using the same prefix key must be sequential | 6404 | several keys, keys using the same prefix key must be sequential |
| 6241 | in the list and preceded by a 2-element entry explaining the | 6405 | in the list and preceded by a 2-element entry explaining the |
| 6242 | prefix key, for example | 6406 | prefix key, for example |
| 6243 | @example | 6407 | @example |
| @@ -6254,9 +6418,8 @@ selection. | |||
| 6254 | The type of entry, a symbol. Valid values are: | 6418 | The type of entry, a symbol. Valid values are: |
| 6255 | @table @code | 6419 | @table @code |
| 6256 | @item entry | 6420 | @item entry |
| 6257 | An Org-mode node, with a headline. Will be filed as the child of the | 6421 | An Org-mode node, with a headline. Will be filed as the child of the target |
| 6258 | target entry or as a top-level entry. The target file should be an Org-mode | 6422 | entry or as a top-level entry. The target file should be an Org-mode file. |
| 6259 | file. | ||
| 6260 | @item item | 6423 | @item item |
| 6261 | A plain list item, placed in the first plain list at the target | 6424 | A plain list item, placed in the first plain list at the target |
| 6262 | location. Again the target file should be an Org file. | 6425 | location. 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 | |||
| 6277 | files, targets usually define a node. Entries will become children of this | 6440 | files, targets usually define a node. Entries will become children of this |
| 6278 | node. Other types will be added to the table or list in the body of this | 6441 | node. Other types will be added to the table or list in the body of this |
| 6279 | node. Most target specifications contain a file name. If that file name is | 6442 | node. Most target specifications contain a file name. If that file name is |
| 6280 | the empty string, it defaults to @code{org-default-notes-file}. | 6443 | the empty string, it defaults to @code{org-default-notes-file}. A file can |
| 6444 | also be given as a variable, function, or Emacs Lisp form. | ||
| 6281 | 6445 | ||
| 6282 | Valid values are: | 6446 | Valid 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 |
| 6343 | Start the clock in this item. | 6507 | Start the clock in this item. |
| 6344 | 6508 | ||
| 6509 | @item :clock-keep | ||
| 6510 | Keep the clock running when filing the captured entry. | ||
| 6511 | |||
| 6345 | @item :clock-resume | 6512 | @item :clock-resume |
| 6346 | If starting the capture interrupted a clock, restart that clock when finished | 6513 | If starting the capture interrupted a clock, restart that clock when finished |
| 6347 | with the capture. | 6514 | with the capture. Note that @code{:clock-keep} has precedence over |
| 6515 | @code{:clock-resume}. When setting both to @code{t}, the current clock will | ||
| 6516 | run and the previous one will not be resumed. | ||
| 6348 | 6517 | ||
| 6349 | @item :unnarrowed | 6518 | @item :unnarrowed |
| 6350 | Do not narrow the target buffer, simply show the full buffer. Default is to | 6519 | Do not narrow the target buffer, simply show the full buffer. Default is to |
| 6351 | narrow it so that you only see the new material. | 6520 | narrow it so that you only see the new material. |
| 6352 | 6521 | ||
| 6522 | @item :table-line-pos | ||
| 6523 | Specification of the location in the table where the new line should be | ||
| 6524 | inserted. It should be a string like @code{"II-3"} meaning that the new | ||
| 6525 | line should become the third line before the second horizontal separator | ||
| 6526 | line. | ||
| 6527 | |||
| 6353 | @item :kill-buffer | 6528 | @item :kill-buffer |
| 6354 | If the target file was not yet visited when capture was invoked, kill the | 6529 | If the target file was not yet visited when capture was invoked, kill the |
| 6355 | buffer again after capture is completed. | 6530 | buffer again after capture is completed. |
| @@ -6361,37 +6536,39 @@ buffer again after capture is completed. | |||
| 6361 | 6536 | ||
| 6362 | In the template itself, special @kbd{%}-escapes@footnote{If you need one of | 6537 | In the template itself, special @kbd{%}-escapes@footnote{If you need one of |
| 6363 | these sequences literally, escape the @kbd{%} with a backslash.} allow | 6538 | these sequences literally, escape the @kbd{%} with a backslash.} allow |
| 6364 | dynamic insertion of content: | 6539 | dynamic 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 |
| 6406 | Link type | Available keywords | 6583 | Link type | Available keywords |
| 6407 | -------------------+---------------------------------------------- | 6584 | ------------------------+---------------------------------------------- |
| 6408 | bbdb | %:name %:company | 6585 | bbdb | %:name %:company |
| 6409 | irc | %:server %:port %:nick | 6586 | irc | %:server %:port %:nick |
| 6410 | vm, wl, mh, mew, rmail | %:type %:subject %:message-id | 6587 | vm, wl, mh, mew, rmail | %:type %:subject %:message-id |
| @@ -6482,7 +6659,7 @@ Create a new attachment as an Emacs buffer. | |||
| 6482 | Synchronize the current task with its attachment directory, in case you added | 6659 | Synchronize the current task with its attachment directory, in case you added |
| 6483 | attachments yourself. | 6660 | attachments 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 |
| 6487 | Open current task's attachment. If there is more than one, prompt for a | 6664 | Open current task's attachment. If there is more than one, prompt for a |
| 6488 | file name first. Opening will follow the rules set by @code{org-file-apps}. | 6665 | file 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 | |||
| 6610 | variable @code{org-refile-allow-creating-parent-nodes}. | 6787 | variable @code{org-refile-allow-creating-parent-nodes}. |
| 6611 | When the variable @code{org-log-refile}@footnote{with corresponding | 6788 | When 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}, |
| 6613 | and @code{nologrefile}} is set, a time stamp or a note will be | 6790 | and @code{nologrefile}} is set, a timestamp or a note will be |
| 6614 | recorded when an entry has been refiled. | 6791 | recorded when an entry has been refiled. |
| 6615 | @orgkey{C-u C-c C-w} | 6792 | @orgkey{C-u C-c C-w} |
| 6616 | Use the refile interface to jump to a heading. | 6793 | Use the refile interface to jump to a heading. |
| @@ -6835,7 +7012,7 @@ The information to be shown is normally collected from all @emph{agenda | |||
| 6835 | files}, the files listed in the variable | 7012 | files}, 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 |
| 6837 | list, but a single file name, then the list of agenda files will be | 7014 | list, but a single file name, then the list of agenda files will be |
| 6838 | maintained in that external file.}. If a directory is part of this list, | 7015 | maintained in that external file.}. If a directory is part of this list, |
| 6839 | all files with the extension @file{.org} in this directory will be part | 7016 | all files with the extension @file{.org} in this directory will be part |
| 6840 | of the list. | 7017 | of 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} |
| 6852 | Add current file to the list of agenda files. The file is added to | 7029 | Add current file to the list of agenda files. The file is added to |
| 6853 | the front of the list. If it was already in the list, it is moved to | 7030 | the front of the list. If it was already in the list, it is moved to |
| 6854 | the front. With a prefix argument, file is added/moved to the end. | 7031 | the 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 |
| 6907 | The views are created through a dispatcher, which should be bound to a | 7084 | The views are created through a dispatcher, which should be bound to a |
| 6908 | global key---for example @kbd{C-c a} (@pxref{Installation}). In the | 7085 | global key---for example @kbd{C-c a} (@pxref{Activation}). In the |
| 6909 | following we will assume that @kbd{C-c a} is indeed how the dispatcher | 7086 | following we will assume that @kbd{C-c a} is indeed how the dispatcher |
| 6910 | is accessed and list keyboard access to commands accordingly. After | 7087 | is accessed and list keyboard access to commands accordingly. After |
| 6911 | pressing @kbd{C-c a}, an additional letter is required to execute a | 7088 | pressing @kbd{C-c a}, an additional letter is required to execute a |
| @@ -7030,7 +7207,7 @@ between calendar and agenda. | |||
| 7030 | 7207 | ||
| 7031 | If you are using the diary only for sexp entries and holidays, it is | 7208 | If you are using the diary only for sexp entries and holidays, it is |
| 7032 | faster to not use the above setting, but instead to copy or even move | 7209 | faster to not use the above setting, but instead to copy or even move |
| 7033 | the entries into an Org file. Org-mode evaluates diary-style sexp | 7210 | the entries into an Org file. Org-mode evaluates diary-style sexp |
| 7034 | entries, and does it faster because there is no overhead for first | 7211 | entries, and does it faster because there is no overhead for first |
| 7035 | creating the diary display. Note that the sexp entries must start at | 7212 | creating the diary display. Note that the sexp entries must start at |
| 7036 | the left margin, no whitespace is allowed before them. For example, | 7213 | the 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 | ||
| 7067 | You can then go ahead and define anniversaries for a BBDB record. Basically, | 7244 | You can then go ahead and define anniversaries for a BBDB record. Basically, |
| 7068 | you need to press @kbd{C-o anniversary @key{RET}} with the cursor in a BBDB | 7245 | you need to press @kbd{C-o anniversary @key{RET}} with the cursor in a BBDB |
| 7069 | record and then add the date in the format @code{YYYY-MM-DD}, followed by a | 7246 | record and then add the date in the format @code{YYYY-MM-DD} or @code{MM-DD}, |
| 7070 | space and the class of the anniversary (@samp{birthday} or @samp{wedding}, or | 7247 | followed by a space and the class of the anniversary (@samp{birthday} or |
| 7071 | a 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 |
| 7072 | Here 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 |
| 7073 | more detailed information. | 7250 | @file{org-bbdb.el} contains more detailed information. |
| 7074 | 7251 | ||
| 7075 | @example | 7252 | @example |
| 7076 | 1973-06-22 | 7253 | 1973-06-22 |
| 7254 | 06-22 | ||
| 7077 | 1955-08-02 wedding | 7255 | 1955-08-02 wedding |
| 7078 | 2008-04-14 %s released version 6.01 of org-mode, %d years ago | 7256 | 2008-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 | |||
| 7092 | the appointments of your agenda files, use the command | 7270 | the 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 |
| 7094 | list of your appointments and add only those belonging to a specific category | 7272 | list of your appointments and add only those belonging to a specific category |
| 7095 | or matching a regular expression. See the docstring for details. | 7273 | or 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 | |||
| 7265 | assumed to be date/time specifications in the standard Org way, and the | 7443 | assumed to be date/time specifications in the standard Org way, and the |
| 7266 | comparison will be done accordingly. Special values that will be recognized | 7444 | comparison will be done accordingly. Special values that will be recognized |
| 7267 | are @code{"<now>"} for now (including time), and @code{"<today>"}, and | 7445 | are @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 |
| 7269 | specification. Also strings like @code{"<+5d>"} or @code{"<-2m>"} with units | 7447 | specification. 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, |
| 7271 | respectively, can be used. | 7449 | respectively, 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 | ||
| 7372 | If you are following a system like David Allen's GTD to organize your | 7551 | If you are following a system like David Allen's GTD to organize your |
| 7373 | work, one of the ``duties'' you have is a regular review to make sure | 7552 | work, 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 |
| 7421 | Before displaying items in an agenda view, Org-mode visually prepares | 7600 | @vindex org-agenda-tags-column |
| 7422 | the items and sorts them. Each item occupies a single line. The line | 7601 | Before displaying items in an agenda view, Org-mode visually prepares the |
| 7423 | starts with a @emph{prefix} that contains the @emph{category} | 7602 | items and sorts them. Each item occupies a single line. The line starts |
| 7424 | (@pxref{Categories}) of the item and other important information. You can | 7603 | with a @emph{prefix} that contains the @emph{category} (@pxref{Categories}) |
| 7425 | customize the prefix using the option @code{org-agenda-prefix-format}. | 7604 | of the item and other important information. You can customize in which |
| 7426 | The prefix is followed by a cleaned-up version of the outline headline | 7605 | column tags will be displayed through @code{org-agenda-tags-column}. You can |
| 7606 | also customize the prefix using the option @code{org-agenda-prefix-format}. | ||
| 7607 | This prefix is followed by a cleaned-up version of the outline headline | ||
| 7427 | associated with the item. | 7608 | associated 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 | ||
| 7794 | Interactively 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 |
| 7613 | Delete other windows. | 7798 | Delete 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} |
| 7629 | Switch to day/week/month/year view. When switching to day or week view, | 7804 | @xorgcmd{v SPC,org-agenda-reset-view} |
| 7630 | this setting becomes the default for subsequent agenda commands. Since | 7805 | @vindex org-agenda-span |
| 7631 | month and year views are slow to create, they do not become the default. | 7806 | Switch to day/week/month/year view. When switching to day or week view, this |
| 7632 | A numeric prefix argument may be used to jump directly to a specific day | 7807 | setting becomes the default for subsequent agenda refreshes. Since month and |
| 7633 | of the year, ISO week, month, or year, respectively. For example, | 7808 | year 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 | 7809 | prefix argument may be used to jump directly to a specific day of the year, |
| 7635 | setting day, week, or month view, a year may be encoded in the prefix | 7810 | ISO week, month, or year, respectively. For example, @kbd{32 d} jumps to |
| 7636 | argument as well. For example, @kbd{200712 w} will jump to week 12 in | 7811 | February 1st, @kbd{9 w} to ISO week number 9. When setting day, week, or |
| 7637 | 2007. If such a year specification has only one or two digits, it will | 7812 | month view, a year may be encoded in the prefix argument as well. For |
| 7638 | be mapped to the interval 1938-2037. | 7813 | example, @kbd{200712 w} will jump to week 12 in 2007. If such a year |
| 7814 | specification has only one or two digits, it will be mapped to the interval | ||
| 7815 | 1938-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} |
| 7641 | Go forward in time to display the following @code{org-agenda-current-span} days. | 7819 | Go 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 | |||
| 7688 | covered by the current agenda view. The initial setting for this mode in new | 7866 | covered by the current agenda view. The initial setting for this mode in new |
| 7689 | agenda buffers can be set with the variable | 7867 | agenda 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 |
| 7691 | when toggling this mode (i.e. @kbd{C-u R}), the clock table will not show | 7869 | when toggling this mode (i.e.@: @kbd{C-u R}), the clock table will not show |
| 7692 | contributions from entries that are hidden by agenda filtering@footnote{Only | 7870 | contributions from entries that are hidden by agenda filtering@footnote{Only |
| 7693 | tags filtering will be respected here, effort filtering is ignored.}. | 7871 | tags filtering will be respected here, effort filtering is ignored.}. |
| 7694 | @c | 7872 | @c |
| 7873 | @orgkey{v c} | ||
| 7874 | @vindex org-agenda-clock-consistency-checks | ||
| 7875 | Show overlapping clock entries, clocking gaps, and other clocking problems in | ||
| 7876 | the current agenda range. You can then visit clocking lines and fix them | ||
| 7877 | manually. See the variable @code{org-agenda-clock-consistency-checks} for | ||
| 7878 | information on how to customize the definition of what constituted a clocking | ||
| 7879 | problem. To return to normal agenda display, press @kbd{l} to exit Logbook | ||
| 7880 | mode. | ||
| 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. | |||
| 7707 | Toggle the time grid on and off. See also the variables | 7894 | Toggle 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} |
| 7711 | Recreate the agenda buffer, for example to reflect the changes after | 7898 | Recreate the agenda buffer, for example to reflect the changes after |
| 7712 | modification of the timestamps of items with @kbd{S-@key{left}} and | 7899 | modification 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 |
| 7714 | argument is interpreted to create a selective list for a specific TODO | 7901 | argument is interpreted to create a selective list for a specific TODO |
| 7715 | keyword. | 7902 | keyword. |
| 7716 | @orgcmd{g,org-agenda-rodo} | 7903 | @orgcmd{g,org-agenda-redo} |
| 7717 | Same as @kbd{r}. | 7904 | Same 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} |
| 7810 | Narrow the current agenda filter by an additional condition. When called with | 7997 | Narrow the current agenda filter by an additional condition. When called with |
| 7811 | prefix arg, remove the entries that @emph{do} have the tag, or that do match | 7998 | prefix arg, remove the entries that @emph{do} have the tag, or that do match |
| 7812 | the effort criterion. You can achieve the same effect by pressing @kbd{+} or | 7999 | the 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 , |
| 7891 | Set the priority for the current item (@command{org-agenda-priority}). | 8078 | Set the priority for the current item (@command{org-agenda-priority}). |
| 7892 | Org-mode prompts for the priority character. If you reply with @key{SPC}, the | 8079 | Org-mode prompts for the priority character. If you reply with @key{SPC}, |
| 7893 | priority cookie is removed from the entry. | 8080 | the 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} |
| 7896 | Display weighted priority of current item. | 8083 | Display weighted priority of current item. |
| @@ -7971,6 +8158,9 @@ Jump to the running clock in another window. | |||
| 7971 | Mark the entry at point for bulk action. With prefix arg, mark that many | 8158 | Mark the entry at point for bulk action. With prefix arg, mark that many |
| 7972 | successive entries. | 8159 | successive entries. |
| 7973 | @c | 8160 | @c |
| 8161 | @orgcmd{%,org-agenda-bulk-mark-regexp} | ||
| 8162 | Mark entries matching a regular expression for bulk action. | ||
| 8163 | @c | ||
| 7974 | @orgcmd{u,org-agenda-bulk-unmark} | 8164 | @orgcmd{u,org-agenda-bulk-unmark} |
| 7975 | Unmark entry for bulk action. | 8165 | Unmark entry for bulk action. |
| 7976 | @c | 8166 | @c |
| @@ -7989,15 +8179,30 @@ $ @r{Archive all selected entries.} | |||
| 7989 | A @r{Archive entries by moving them to their respective archive siblings.} | 8179 | A @r{Archive entries by moving them to their respective archive siblings.} |
| 7990 | t @r{Change TODO state. This prompts for a single TODO keyword and} | 8180 | t @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.} |
| 7995 | s @r{Schedule all items to a new date. To shift existing schedule dates} | 8185 | s @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}.} |
| 7998 | S @r{Reschedule randomly by N days. N will be prompted for. With prefix} | 8188 | S @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.} |
| 8000 | d @r{Set deadline to a specific date.} | 8190 | d @r{Set deadline to a specific date.} |
| 8191 | f @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 | |||
| 8274 | agenda views as plain text, HTML@footnote{You need to install Hrvoje Niksic's | 8479 | agenda 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 |
| 8276 | ghostscript @file{ps2pdf} utility must be installed on the system. Selecting | 8481 | ghostscript @file{ps2pdf} utility must be installed on the system. Selecting |
| 8277 | a PDF file with also create the postscript file.}, and iCalendar files. If | 8482 | a PDF file will also create the postscript file.}, and iCalendar files. If |
| 8278 | you want to do this only occasionally, use the command | 8483 | you 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: | |||
| 8430 | Org needs to make a decision which @code{COLUMNS} format to use. Since the | 8635 | Org needs to make a decision which @code{COLUMNS} format to use. Since the |
| 8431 | entries in the agenda are collected from different files, and different files | 8636 | entries in the agenda are collected from different files, and different files |
| 8432 | may have different @code{COLUMNS} formats, this is a non-trivial problem. | 8637 | may have different @code{COLUMNS} formats, this is a non-trivial problem. |
| 8433 | Org first checks if the variable @code{org-overriding-columns-format} is | 8638 | Org first checks if the variable @code{org-agenda-overriding-columns-format} is |
| 8434 | currently set, and if so, takes the format from there. Otherwise it takes | 8639 | currently set, and if so, takes the format from there. Otherwise it takes |
| 8435 | the format associated with the first item in the agenda, or, if that item | 8640 | the format associated with the first item in the agenda, or, if that item |
| 8436 | does not have a specific format (defined in a property, or in its file), it | 8641 | does 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 | ||
| 8641 | Footnotes defined in the way described in @ref{Footnotes}, will be exported by | 8846 | Footnotes defined in the way described in @ref{Footnotes}, will be exported |
| 8642 | all backends. Org allows multiple references to the same note, and | 8847 | by all backends. Org allows multiple references to the same note, and |
| 8643 | different backends support this to varying degrees. | 8848 | multiple 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 |
| 8662 | A line consisting of only dashes, and at least 5 of them, will be | 8867 | A line consisting of only dashes, and at least 5 of them, will be exported as |
| 8663 | exported as a horizontal line (@samp{<hr/>} in HTML). | 8868 | a 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 | ||
| 8671 | Lines starting with @samp{#} in column zero are treated as comments and will | 8876 | Lines starting with @samp{#} in column zero are treated as comments and will |
| 8672 | never be exported. If you want an indented line to be treated as a comment, | 8877 | never be exported. If you want an indented line to be treated as a comment, |
| 8673 | start it with @samp{#+ }. Also entire subtrees starting with the word | 8878 | start 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 | ||
| 8909 | Optionally, 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 |
| 8705 | Some backends (HTML, @LaTeX{}, and DocBook) allow you to directly include | 8915 | Some backends (HTML, @LaTeX{}, and DocBook) allow you to directly include |
| 8706 | images into the exported document. Org does this, if a link to an image | 8916 | images 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 | |||
| 8755 | the HTML backend (it requires version 1.34 of the @file{htmlize.el} package, | 8965 | the HTML backend (it requires version 1.34 of the @file{htmlize.el} package, |
| 8756 | which is distributed with Org). Fontified code chunks in LaTeX can be | 8966 | which is distributed with Org). Fontified code chunks in LaTeX can be |
| 8757 | achieved using either the listings or the | 8967 | achieved 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 |
| 8759 | on the variable @code{org-export-latex-listings} and ensure that the listings | 8969 | on the variable @code{org-export-latex-listings} and ensure that the listings |
| 8760 | package is included by the LaTeX header (e.g. by configuring | 8970 | package 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 |
| 8762 | configuration options, including obtaining colored output. For minted it is | 8972 | configuration options, including obtaining colored output. For minted it is |
| 8763 | necessary to install the program @url{http://pygments.org, pygments}, in | 8973 | necessary to install the program @url{http://pygments.org, pygments}, in |
| 8764 | addition to setting @code{org-export-latex-minted}, ensuring that the minted | 8974 | addition to setting @code{org-export-latex-minted}, ensuring that the minted |
| 8765 | package is included by the LaTeX header, and ensuring that the | 8975 | package 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 |
| 8769 | further details.}. This is done with the @samp{src} block, where you also | 8979 | further details.}. This is done with the @samp{src} block, where you also |
| 8770 | need to specify the name of the major mode that should be used to fontify the | 8980 | need to specify the name of the major mode that should be used to fontify the |
| 8771 | example: | 8981 | example@footnote{Code in @samp{src} blocks may also be evaluated either |
| 8982 | interactively or on export. See @pxref{Working With Source Code} for more | ||
| 8983 | information 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 | |||
| 8784 | numbered. If you use a @code{+n} switch, the numbering from the previous | 8996 | numbered. If you use a @code{+n} switch, the numbering from the previous |
| 8785 | numbered snippet will be continued in the current one. In literal examples, | 8997 | numbered snippet will be continued in the current one. In literal examples, |
| 8786 | Org will interpret strings like @samp{(ref:name)} as labels, and use them as | 8998 | Org will interpret strings like @samp{(ref:name)} as labels, and use them as |
| 8787 | targets for special hyperlinks like @code{[[(name)]]} (i.e. the reference name | 8999 | targets for special hyperlinks like @code{[[(name)]]} (i.e.@: the reference name |
| 8788 | enclosed in single parenthesis). In HTML, hovering the mouse over such a | 9000 | enclosed in single parenthesis). In HTML, hovering the mouse over such a |
| 8789 | link will remote-highlight the corresponding code line, which is kind of | 9001 | link will remote-highlight the corresponding code line, which is kind of |
| 8790 | cool. | 9002 | cool. |
| @@ -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 | ||
| 8814 | HTML export also allows examples to be published as text areas, @xref{Text | 9026 | HTML export also allows examples to be published as text areas (@pxref{Text |
| 8815 | areas in HTML export}. | 9027 | areas in HTML export}). |
| 9028 | |||
| 9029 | Because the @code{#+BEGIN_...} and @code{#+END_...} patterns need to be added | ||
| 9030 | so 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 |
| 8854 | The optional second and third parameter are the markup (e.g. @samp{quote}, | 9070 | The 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 |
| 8856 | language for formatting the contents. The markup is optional; if it is not | 9072 | language for formatting the contents. The markup is optional; if it is not |
| 8857 | given, the text will be assumed to be in Org-mode format and will be | 9073 | given, 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 | ||
| 9085 | You can also include a portion of a file by specifying a lines range using | ||
| 9086 | the @code{:lines} parameter. The line at the upper end of the range will not | ||
| 9087 | be included. The start and/or the end of the range may be omitted to use the | ||
| 9088 | obvious 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 | |||
| 8925 | occasional formula. @LaTeX{}@footnote{@LaTeX{} is a macro system based on | 9152 | occasional formula. @LaTeX{}@footnote{@LaTeX{} is a macro system based on |
| 8926 | Donald E. Knuth's @TeX{} system. Many of the features described here as | 9153 | Donald 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 |
| 8928 | distinction.} is widely used to typeset scientific documents. Org-mode | 9155 | distinction.} is widely used to typeset scientific documents. Org-mode |
| 8929 | supports embedding @LaTeX{} code into its files, because many academics are | 9156 | supports embedding @LaTeX{} code into its files, because many academics are |
| 8930 | used to writing and reading @LaTeX{} source code, and because it can be | 9157 | used to writing and reading @LaTeX{} source code, and because it can be |
| 8931 | readily processed to produce pretty output for a number of export backends. | 9158 | readily 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 |
| 9039 | server in order to limit the load of our server.}. Finally, it can also | 9266 | server in order to limit the load of our server.}. Finally, it can also |
| 9040 | process the mathematical expressions into images@footnote{For this to work | 9267 | process the mathematical expressions into images@footnote{For this to work |
| 9041 | you need to be on a system with a working @LaTeX{} installation. You also | 9268 | you need to be on a system with a working @LaTeX{} installation. You also |
| 9042 | need the @file{dvipng} program, available at | 9269 | need 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 |
| 9044 | be used when processing a fragment can be configured with the variable | 9271 | be 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 |
| 9120 | You can customize the variable @code{org-format-latex-options} to influence | 9347 | You can customize the variable @code{org-format-latex-options} to influence |
| 9121 | some aspects of the preview. In particular, the @code{:scale} (and for HTML | 9348 | some aspects of the preview. In particular, the @code{:scale} (and for HTML |
| 9122 | export, @code{:html-scale}) property can be used to adjust the size of the | 9349 | export, @code{:html-scale}) property can be used to adjust the size of the |
| 9123 | preview images. | 9350 | preview images. |
| 9124 | 9351 | ||
| @@ -9191,14 +9418,16 @@ Org-mode documents can be exported into a variety of other formats. For | |||
| 9191 | printing and sharing of notes, ASCII export produces a readable and simple | 9418 | printing and sharing of notes, ASCII export produces a readable and simple |
| 9192 | version of an Org file. HTML export allows you to publish a notes file on | 9419 | version of an Org file. HTML export allows you to publish a notes file on |
| 9193 | the web, while the XOXO format provides a solid base for exchange with a | 9420 | the web, while the XOXO format provides a solid base for exchange with a |
| 9194 | broad range of other applications. @LaTeX{} export lets you use Org-mode and | 9421 | broad range of other applications. @LaTeX{} export lets you use Org-mode and |
| 9195 | its structured editing functions to easily create @LaTeX{} files. DocBook | 9422 | its structured editing functions to easily create @LaTeX{} files. DocBook |
| 9196 | export makes it possible to convert Org files to many other formats using | 9423 | export makes it possible to convert Org files to many other formats using |
| 9197 | DocBook tools. For project management you can create gantt and resource | 9424 | DocBook tools. OpenDocumentText export allows seamless colloboration across |
| 9198 | charts by using TaskJuggler export. To incorporate entries with associated | 9425 | organizational boundaries. For project management you can create gantt and |
| 9199 | times like deadlines or appointments into a desktop calendar program like | 9426 | resource charts by using TaskJuggler export. To incorporate entries with |
| 9200 | iCal, Org-mode can also produce extracts in the iCalendar format. Currently | 9427 | associated times like deadlines or appointments into a desktop calendar |
| 9201 | Org-mode only supports export, not import of these different formats. | 9428 | program like iCal, Org-mode can also produce extracts in the iCalendar |
| 9429 | format. Currently Org-mode only supports export, not import of these | ||
| 9430 | different formats. | ||
| 9202 | 9431 | ||
| 9203 | Org supports export of selected regions when @code{transient-mark-mode} is | 9432 | Org supports export of selected regions when @code{transient-mark-mode} is |
| 9204 | enabled (default in Emacs 23). | 9433 | enabled (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 | ||
| 9226 | You may use tags to select the parts of a document that should be exported, | 9457 | You may use tags to select the parts of a document that should be exported, |
| 9227 | or to exclude parts from export. This behavior is governed by two variables: | 9458 | or 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 | ||
| 9230 | Org first checks if any of the @emph{select} tags is present in the buffer. | 9461 | @enumerate |
| 9231 | If yes, all trees that do not carry one of these tags will be excluded. If a | 9462 | @item |
| 9232 | selected tree is a subtree, the heading hierarchy above it will also be | 9463 | Org first checks if any of the @emph{select} tags is present in the |
| 9233 | selected for export, but not the text below those headings. | 9464 | buffer. If yes, all trees that do not carry one of these tags will be |
| 9465 | excluded. If a selected tree is a subtree, the heading hierarchy above it | ||
| 9466 | will also be selected for export, but not the text below those headings. | ||
| 9234 | 9467 | ||
| 9235 | @noindent | 9468 | @item |
| 9236 | If none of the select tags is found, the whole buffer will be selected for | 9469 | If none of the select tags is found, the whole buffer will be selected for |
| 9237 | export. | 9470 | export. |
| 9238 | 9471 | ||
| 9239 | @noindent | 9472 | @item |
| 9240 | Finally, all subtrees that are marked by any of the @emph{exclude} tags will | 9473 | Finally, all subtrees that are marked by any of the @emph{exclude} tags will |
| 9241 | be removed from the export buffer. | 9474 | be removed from the export buffer. |
| 9475 | @end enumerate | ||
| 9476 | |||
| 9477 | The variable @code{org-export-with-tasks} can be configured to select which | ||
| 9478 | kind of tasks should be included for export. See the docstring of the | ||
| 9479 | variable 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 |
| 9323 | H: @r{set the number of headline levels for export} | 9566 | H: @r{set the number of headline levels for export} |
| 9324 | num: @r{turn on/off section-numbers} | 9567 | num: @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.} |
| 9334 | f: @r{turn on/off footnotes like this[1].} | 9577 | f: @r{turn on/off footnotes like this[1].} |
| 9335 | todo: @r{turn on/off inclusion of TODO keywords into exported text} | 9578 | todo: @r{turn on/off inclusion of TODO keywords into exported text} |
| 9579 | tasks: @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} | ||
| 9336 | pri: @r{turn on/off priority cookies} | 9581 | pri: @r{turn on/off priority cookies} |
| 9337 | tags: @r{turn on/off inclusion of tags, may also be @code{not-in-toc}} | 9582 | tags: @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 |
| 9350 | These options take effect in both the HTML and @LaTeX{} export, except for | 9595 | These 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 |
| 9352 | for the @LaTeX{} export. The default values for these and many other options | 9597 | @code{nil} for the @LaTeX{} export. |
| 9353 | are given by a set of variables. For a list of such variables, the | 9598 | |
| 9354 | corresponding OPTIONS keys and also the publishing keys (@pxref{Project | 9599 | The default values for these and many other options are given by a set of |
| 9355 | alist}), see the constant @code{org-export-plist-vars}. | 9600 | variables. For a list of such variables, the corresponding OPTIONS keys and |
| 9601 | also the publishing keys (@pxref{Project alist}), see the constant | ||
| 9602 | @code{org-export-plist-vars}. | ||
| 9356 | 9603 | ||
| 9357 | When exporting only a single subtree by selecting it with @kbd{C-c @@} before | 9604 | When exporting only a single subtree by selecting it with @kbd{C-c @@} before |
| 9358 | calling an export command, the subtree can overrule some of the file's export | 9605 | calling 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 | |||
| 9381 | the variable @code{org-export-run-in-background}.}. | 9628 | the 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} |
| 9383 | Like @kbd{C-c C-e}, but only export the text that is currently visible | 9630 | Like @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 |
| 9387 | Call the exporter, but reverse the setting of | 9634 | Call 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 |
| 9389 | not set, or force processing in the current Emacs process if set. | 9636 | not 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 | |||
| 9409 | will be @file{myfile.txt}. The file will be overwritten without | 9656 | will be @file{myfile.txt}. The file will be overwritten without |
| 9410 | warning. If there is an active region@footnote{This requires | 9657 | warning. 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 |
| 9412 | exported. If the selected region is a single tree@footnote{To select the | 9659 | exported. If the selected region is a single tree@footnote{To select the |
| 9413 | current subtree, use @kbd{C-c @@}.}, the tree head will | 9660 | current subtree, use @kbd{C-c @@}.}, the tree head will |
| 9414 | become the document title. If the tree head entry has or inherits an | 9661 | become 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 |
| 9482 | Export as HTML file @file{myfile.html}. For an Org file @file{myfile.org}, | 9730 | Export as HTML file. For an Org file @file{myfile.org}, |
| 9483 | the ASCII file will be @file{myfile.html}. The file will be overwritten | 9731 | the HTML file will be @file{myfile.html}. The file will be overwritten |
| 9484 | without warning. If there is an active region@footnote{This requires | 9732 | without 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 |
| 9486 | exported. If the selected region is a single tree@footnote{To select the | 9734 | exported. If the selected region is a single tree@footnote{To select the |
| 9487 | current subtree, use @kbd{C-c @@}.}, the tree head will become the document | 9735 | current subtree, use @kbd{C-c @@}.}, the tree head will become the document |
| 9488 | title. If the tree head entry has, or inherits, an @code{EXPORT_FILE_NAME} | 9736 | title. If the tree head entry has, or inherits, an @code{EXPORT_FILE_NAME} |
| 9489 | property, that name will be used for the export. | 9737 | property, 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 |
| 9520 | creates two levels of headings and does the rest as items. | 9768 | creates 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 | |||
| 9783 | The HTML exporter lets you define a preamble and a postamble. | ||
| 9784 | |||
| 9785 | The default value for @code{org-export-html-preamble} is @code{t}, which | ||
| 9786 | means that the preamble is inserted depending on the relevant formatting | ||
| 9787 | string in @code{org-export-html-preamble-format}. | ||
| 9788 | |||
| 9789 | Setting @code{org-export-html-preamble} to a string will override the default | ||
| 9790 | formatting string. Setting it to a function, will insert the output of the | ||
| 9791 | function, which must be a string; such a function takes no argument but you | ||
| 9792 | can check against the value of @code{opt-plist}, which contains the list of | ||
| 9793 | publishing properties for the current file. Setting to @code{nil} will not | ||
| 9794 | insert any preamble. | ||
| 9795 | |||
| 9796 | The default value for @code{org-export-html-postamble} is @code{'auto}, which | ||
| 9797 | means 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 | ||
| 9801 | values. Setting @code{org-export-html-postamble} to @code{t} will insert the | ||
| 9802 | postamble from the relevant formatting string found in | ||
| 9803 | @code{org-export-html-postamble-format}. Setting it to @code{nil} will not | ||
| 9804 | insert 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 | ||
| 9525 | Plain @samp{<} and @samp{>} are always transformed to @samp{<} and | 9809 | Plain @samp{<} and @samp{>} are always transformed to @samp{<} 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 |
| 9627 | and you could use @code{http} addresses just as well. | 9911 | You 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} | |||
| 9704 | p.creator @r{creator info, about org-mode version} | 9988 | p.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 |
| 9842 | produce PDF output. Since the @LaTeX{} output uses @file{hyperref} to | 10126 | produce PDF output. Since the @LaTeX{} output uses @file{hyperref} to |
| 9843 | implement links and cross references, the PDF output file will be fully | 10127 | implement links and cross references, the PDF output file will be fully |
| 9844 | linked. | 10128 | linked. Beware of the fact that your @code{org} file has to be properly |
| 10129 | structured in order to be correctly exported: respect the hierarchy of | ||
| 10130 | sections. | ||
| 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 |
| 9864 | Export as @LaTeX{} file @file{myfile.tex}. For an Org file | 10150 | Export 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 |
| 9866 | be overwritten without warning. If there is an active region@footnote{This | 10152 | be overwritten without warning. If there is an active region@footnote{This |
| 9867 | requires @code{transient-mark-mode} be turned on.}, only the region will be | 10153 | requires @code{transient-mark-mode} be turned on.}, only the region will be |
| 9868 | exported. If the selected region is a single tree@footnote{To select the | 10154 | exported. If the selected region is a single tree@footnote{To select the |
| 9869 | current subtree, use @kbd{C-c @@}.}, the tree head will become the document | 10155 | current subtree, use @kbd{C-c @@}.}, the tree head will become the document |
| 9870 | title. If the tree head entry has or inherits an @code{EXPORT_FILE_NAME} | 10156 | title. If the tree head entry has or inherits an @code{EXPORT_FILE_NAME} |
| 9871 | property, that name will be used for the export. | 10157 | property, 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} |
| 9873 | Export to a temporary buffer. Do not create a file. | 10159 | Export 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 |
| 9875 | Export only the visible part of the document. | 10161 | Export 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 |
| 9877 | Convert the region to @LaTeX{} under the assumption that it was Org-mode | 10163 | Convert 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 | ||
| 9897 | If you want that transition to occur at a different level, specify it | 10183 | If you want that transition to occur at a different level, specify it |
| 9898 | with a numeric prefix argument. For example, | 10184 | with 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 | ||
| 9970 | For @LaTeX{} export of a table, you can specify a label and a caption | 10256 | For @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 | 10257 | placement options (@pxref{Images and tables}). You can also use the |
| 9972 | request 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 |
| 9973 | several pages, or provide the @code{multicolumn} keyword that will make the | 10259 | table, so that it may span several pages, or to change the default table |
| 9974 | table span the page in a multicolumn environment (@code{table*} environment). | 10260 | environment from @code{table} to @code{table*} or to change the default inner |
| 9975 | Finally, you can set the alignment string: | 10261 | tabular environment to @code{tabularx} or @code{tabulary}. Finally, you can |
| 10262 | set the alignment string, and (with @code{tabularx} or @code{tabulary}) the | ||
| 10263 | width: | ||
| 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 | ||
| 10276 | or 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 |
| 9998 | caption and/or a label as described in @ref{Images and tables}, the figure | 10298 | caption and/or a label as described in @ref{Images and tables}, the figure |
| 9999 | will be wrapped into a @code{figure} environment and thus become a floating | 10299 | will be wrapped into a @code{figure} environment and thus become a floating |
| 10000 | element. You can use an @code{#+ATTR_LaTeX:} line to specify the various | 10300 | element. You can use an @code{#+ATTR_LaTeX:} line to specify various other |
| 10001 | options that can be used in the optional argument of the | 10301 | options. You can ask org to export an image as a float without specifying |
| 10002 | @code{\includegraphics} macro. To modify the placement option of the | 10302 | a 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 | 10303 | optional arguments to the @code{\includegraphics} macro can also be specified |
| 10004 | Attributes. | 10304 | in this fashion. To modify the placement option of the floating environment, |
| 10305 | add something like @samp{placement=[h!]} to the attributes. It is to be noted | ||
| 10306 | this option can be used with tables as well@footnote{One can also take | ||
| 10307 | advantage of this option to pass other, unrelated options into the figure or | ||
| 10308 | table 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 | ||
| 10311 | below it. | ||
| 10005 | 10312 | ||
| 10006 | If you would like to let text flow around the image, add the word @samp{wrap} | 10313 | If you would like to let text flow around the image, add the word @samp{wrap} |
| 10007 | to the @code{#+ATTR_LaTeX:} line, which will make the figure occupy the left | 10314 | to 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 | ||
| 10333 | If you wish to include an image which spans multiple columns in a page, you | ||
| 10334 | can use the keyword @code{multicolumn} in the @code{#+ATTR_LaTeX} line. This | ||
| 10335 | will export the image wrapped in a @code{figure*} environment. | ||
| 10336 | |||
| 10026 | If you need references to a label created in this way, write | 10337 | If 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 | ||
| 10154 | For more information, see the documentation on Worg. | 10465 | For 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 | ||
| 10257 | DocBook exporter exports Org files as articles using the @code{article} | 10568 | DocBook exporter exports Org files as articles using the @code{article} |
| 10258 | element in DocBook. Recursive sections, i.e. @code{section} elements, are | 10569 | element in DocBook. Recursive sections, i.e.@: @code{section} elements, are |
| 10259 | used in exported articles. Top level headlines in Org files are exported as | 10570 | used in exported articles. Top level headlines in Org files are exported as |
| 10260 | top level sections, and lower level headlines are exported as nested | 10571 | top level sections, and lower level headlines are exported as nested |
| 10261 | sections. The entire structure of Org files will be exported completely, no | 10572 | sections. 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 | |||
| 10671 | Org-mode 7.6 supports export to OpenDocumentText format using | ||
| 10672 | @file{org-odt.el} module contributed by Jambunathan K. This module can be | ||
| 10673 | enabled in one of the following ways based on your mode of installation. | ||
| 10674 | |||
| 10675 | @enumerate | ||
| 10676 | @item | ||
| 10677 | If 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} | ||
| 10679 | option in variable @code{org-modules}. | ||
| 10680 | @item | ||
| 10681 | If you are using Org that comes bundled with Emacs, then you can install the | ||
| 10682 | OpenDocumentText exporter using the package manager. To do this, customize | ||
| 10683 | the 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 | ||
| 10706 | Export as OpenDocumentText file. For an Org file, @file{myfile.org}, the | ||
| 10707 | OpenDocumentText file will be @file{myfile.odt}. The file will be | ||
| 10708 | overwritten without warning. If there is an active region@footnote{This | ||
| 10709 | requires @code{transient-mark-mode} to be turned on}, only the region will be | ||
| 10710 | exported. If the selected region is a single tree@footnote{To select the | ||
| 10711 | current subtree, use @kbd{C-c @@}.}, the tree head will become the document | ||
| 10712 | title. If the tree head entry has, or inherits, an @code{EXPORT_FILE_NAME} | ||
| 10713 | property, that name will be used for the export. | ||
| 10714 | @orgcmd{C-c C-e O,org-export-as-odt-and-open} | ||
| 10715 | Export 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 | |||
| 10725 | OpenDocumentExporter ships with a custom @file{styles.xml} for formatting of | ||
| 10726 | the exported file. To customize the output to suit your needs you can use | ||
| 10727 | one of the following methods: | ||
| 10728 | |||
| 10729 | @enumerate | ||
| 10730 | @item | ||
| 10731 | Customize 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 | ||
| 10733 | combination of Text or Template Document together with a set of member files. | ||
| 10734 | Use the first two options if the styles.xml has no references to additional | ||
| 10735 | set of files and use the last option if the @file{styles.xml} references | ||
| 10736 | additional files like header and footer images. | ||
| 10737 | @item | ||
| 10738 | Use an external tool like unoconv to apply custom templates. | ||
| 10739 | @end enumerate | ||
| 10740 | |||
| 10741 | For best results, it is necessary that the style names used by | ||
| 10742 | OpenDocumentText 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 | |||
| 10752 | Often times there is a need to convert OpenDocumentText files to other | ||
| 10753 | formats like doc, docx or pdf. You can accomplish this by one of the | ||
| 10754 | following methods: | ||
| 10755 | |||
| 10756 | @table @kbd | ||
| 10757 | @item M-x org-lparse | ||
| 10758 | Export the outline first to one of the native formats (like OpenDocumentText) | ||
| 10759 | and immediately post-process it to other formats using an external converter. | ||
| 10760 | |||
| 10761 | @item M-x org-lparse-convert | ||
| 10762 | Export an existing document to other formats using an external converter. | ||
| 10763 | @end table | ||
| 10764 | |||
| 10765 | You 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 | |||
| 10772 | OpenDocumentExporter creates cross-references (aka bookmarks) for links that | ||
| 10773 | are 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 | |||
| 10779 | Export of @file{table.el} tables with row or column spanning is not | ||
| 10780 | supported. 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 | |||
| 10787 | OpenDocumentText exporter can embed images within the exported document. To | ||
| 10788 | embed images, provide a link to the desired image file with no link | ||
| 10789 | description. For example, the following links @samp{[[file:img.jpg]]} or | ||
| 10790 | @samp{[[./img.jpg]]}, will result in embedding of @samp{img.jpg} in the | ||
| 10791 | exported file. | ||
| 10792 | |||
| 10793 | The exporter can also embed scaled and explicitly sized images within the | ||
| 10794 | exported document. The markup of the scale and size specifications has not | ||
| 10795 | been standardized yet and is hence conveniently skipped in this document. | ||
| 10796 | |||
| 10797 | The exporter can also make an image the clickable part of a link. To create | ||
| 10798 | clickable images, provide a link whose description is a link to an image | ||
| 10799 | file. For example, the following link | ||
| 10800 | @samp{[[http://orgmode.org][./img.jpg]]}, will result in a clickable image | ||
| 10801 | that links to @uref{http://Orgmode.org} website. | ||
| 10802 | |||
| 10803 | @node Additional Documentation, , Images in OpenDocumentText export, OpenDocumentText export | ||
| 10804 | @subsection Additional documentation | ||
| 10805 | |||
| 10806 | The OpenDocumentText exporter is still in development. For up to date | ||
| 10807 | information, please follow Org mailing list @email{emacs-orgmode@@gnu.org} | ||
| 10808 | closely. | ||
| 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 | |||
| 10366 | document. | 10825 | document. |
| 10367 | 10826 | ||
| 10368 | Instead the TaskJuggler exporter looks for a tree that defines the tasks and | 10827 | Instead the TaskJuggler exporter looks for a tree that defines the tasks and |
| 10369 | a optionally tree that defines the resources for this project. It then | 10828 | a optionally tree that defines the resources for this project. It then |
| 10370 | creates a TaskJuggler file based on these trees and the attributes defined in | 10829 | creates a TaskJuggler file based on these trees and the attributes defined in |
| 10371 | all the nodes. | 10830 | all 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 |
| 10386 | Create your tasks as you usually do with Org-mode. Assign efforts to each | 10845 | Create your tasks as you usually do with Org-mode. Assign efforts to each |
| 10387 | task using properties (it's easiest to do this in the column view). You | 10846 | task using properties (it is easiest to do this in the column view). You |
| 10388 | should end up with something similar to the example by Peter Jones in | 10847 | should 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}. |
| 10390 | Now mark the top node of your tasks with a tag named | 10849 | Now 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 |
| 10393 | the project plan with @kbd{C-c C-e J} which will export the project plan and | 10852 | the project plan with @kbd{C-c C-e J} which will export the project plan and |
| 10394 | open a gantt chart in TaskJugglerUI. | 10853 | open 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 |
| 10399 | Next you can define resources and assign those to work on specific tasks. You | 10858 | Next you can define resources and assign those to work on specific tasks. You |
| 10400 | can group your resources hierarchically. Tag the top node of the resources | 10859 | can group your resources hierarchically. Tag the top node of the resources |
| 10401 | with @code{:taskjuggler_resource:} (or whatever you customized | 10860 | with @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 |
| 10403 | identifier (named @samp{resource_id}) to the resources (using the standard | 10862 | identifier (named @samp{resource_id}) to the resources (using the standard |
| 10404 | Org properties commands, @pxref{Property syntax}) or you can let the exporter | 10863 | Org properties commands, @pxref{Property syntax}) or you can let the exporter |
| 10405 | generate identifiers automatically (the exporter picks the first word of the | 10864 | generate identifiers automatically (the exporter picks the first word of the |
| 10406 | headline as the identifier as long as it is unique---see the documentation of | 10865 | headline 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 |
| 10408 | allocate resources to tasks. This is again done with the @samp{allocate} | 10867 | allocate resources to tasks. This is again done with the @samp{allocate} |
| 10409 | property on the tasks. Do this in column view or when on the task type | 10868 | property 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 | ||
| 10412 | Once the allocations are done you can again export to TaskJuggler and check | 10871 | Once 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 | ||
| 10418 | The exporter also takes TODO state information into consideration, i.e. if a | 10877 | The exporter also takes TODO state information into consideration, i.e.@: if a |
| 10419 | task is marked as done it will have the corresponding attribute in | 10878 | task is marked as done it will have the corresponding attribute in |
| 10420 | TaskJuggler (@samp{complete 100}). Also it will export any property on a task | 10879 | TaskJuggler (@samp{complete 100}). Also it will export any property on a task |
| 10421 | resource or resource node which is known to TaskJuggler, such as | 10880 | resource 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 | |||
| 10430 | The exporter will handle dependencies that are defined in the tasks either | 10889 | The exporter will handle dependencies that are defined in the tasks either |
| 10431 | with the @samp{ORDERED} attribute (@pxref{TODO dependencies}), with the | 10890 | with 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} |
| 10434 | attribute can be either @samp{previous-sibling} or a reference to an | 10893 | attribute can be either @samp{previous-sibling} or a reference to an |
| 10435 | identifier (named @samp{task_id}) which is defined for another task in the | 10894 | identifier (named @samp{task_id}) which is defined for another task in the |
| 10436 | project. @samp{BLOCKER} and the @samp{depends} attribute can define multiple | 10895 | project. @samp{BLOCKER} and the @samp{depends} attribute can define multiple |
| 10437 | dependencies separated by either space or comma. You can also specify | 10896 | dependencies separated by either space or comma. You can also specify |
| 10438 | optional attributes on the dependency by simply appending it. The following | 10897 | optional attributes on the dependency by simply appending it. The following |
| 10439 | examples should illustrate this: | 10898 | examples 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 |
| 10470 | TaskJuggler can produce many kinds of reports (e.g. gantt chart, resource | 10929 | TaskJuggler can produce many kinds of reports (e.g.@: gantt chart, resource |
| 10471 | allocation, etc). The user defines what kind of reports should be generated | 10930 | allocation, etc). The user defines what kind of reports should be generated |
| 10472 | for a project in the TaskJuggler file. The exporter will automatically insert | 10931 | for a project in the TaskJuggler file. The exporter will automatically insert |
| 10473 | some default reports in the file. These defaults are defined in | 10932 | some 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 |
| 10475 | customize along with a number of other options. For a more complete list, see | 10934 | customize 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 | ||
| 10478 | For more information and examples see the Org-taskjuggler tutorial at | 10937 | For 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} |
| 10490 | Export as Freemind mind map @file{myfile.mm}. | 10949 | Export as Freemind mind map. For an Org file @file{myfile.org}, the Freemind |
| 10950 | file 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} |
| 10503 | Export as XOXO file @file{myfile.html}. | 10963 | Export 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} |
| 10505 | Export only the visible part of the document. | 10966 | Export 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 | |||
| 10624 | configures one project, and may be in one of the two following forms: | 11085 | configures 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 | ||
| 10847 | Most of the @code{org-export-with-*} variables have the same effect in | 11310 | Most of the @code{org-export-with-*} variables have the same effect in |
| 10848 | both HTML and @LaTeX{} exporters, except for @code{:TeX-macros} and | 11311 | both 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 |
| 11314 | options. | ||
| 11315 | |||
| 11316 | |||
| 10851 | 11317 | ||
| 10852 | @vindex org-publish-project-alist | 11318 | @vindex org-publish-project-alist |
| 10853 | When a property is given a value in @code{org-publish-project-alist}, | 11319 | When 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, | |||
| 10869 | because @code{file:} links are converted to link to the corresponding | 11335 | because @code{file:} links are converted to link to the corresponding |
| 10870 | @file{html} file. | 11336 | @file{html} file. |
| 10871 | 11337 | ||
| 10872 | You may also link to related files, such as images. Provided you are careful | 11338 | You may also link to related files, such as images. Provided you are careful |
| 10873 | with relative file names, and provided you have also configured Org to upload | 11339 | with relative file names, and provided you have also configured Org to upload |
| 10874 | the related files, these links will work too. See @ref{Complex example}, for | 11340 | the related files, these links will work too. See @ref{Complex example}, for |
| 10875 | an example of this usage. | 11341 | an example of this usage. |
| 10876 | 11342 | ||
| 10877 | Sometimes an Org file to be published may contain links that are | 11343 | Sometimes an Org file to be published may contain links that are |
| @@ -10905,11 +11371,11 @@ a map of files for a given project. | |||
| 10905 | or @code{org-publish-all}. | 11371 | or @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 |
| 10909 | becomes @file{sitemap.html}). | 11375 | becomes @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, |
| 10922 | respectively. Any other value will mix files and folders. | 11388 | respectively. 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 | ||
| 11394 | older date first while @code{anti-chronologically} sorts the files with newer | ||
| 11395 | date first. @code{alphabetically} sorts the files alphabetically. The date of | ||
| 11396 | a 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 | ||
| 11403 | sitemap. This is a format string with some escape sequences: @code{%t} stands | ||
| 11404 | for 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 | ||
| 11411 | a 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. | ||
| 11416 | Useful to have cool URIs (see @uref{http://www.w3.org/Provider/Style/URI}). | ||
| 11417 | Defaults 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. | |||
| 10942 | publish it as @file{theindex.html}. | 11430 | publish it as @file{theindex.html}. |
| 10943 | @end multitable | 11431 | @end multitable |
| 10944 | 11432 | ||
| 10945 | The file will be create when first publishing a project with the | 11433 | The 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 |
| 10948 | a title, style information etc. | 11436 | a 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 | ||
| 11016 | This more complicated example publishes an entire website, including | 11504 | This more complicated example publishes an entire website, including |
| 11017 | Org files converted to HTML, image files, Emacs Lisp source code, and | 11505 | Org files converted to HTML, image files, Emacs Lisp source code, and |
| 11018 | style sheets. The publishing directory is remote and private files are | 11506 | style sheets. The publishing directory is remote and private files are |
| 11019 | excluded. | 11507 | excluded. |
| 11020 | 11508 | ||
| 11021 | To ensure that links are preserved, care should be taken to replicate | 11509 | To ensure that links are preserved, care should be taken to replicate |
| 11022 | your directory structure on the web server, and to use relative file | 11510 | your directory structure on the web server, and to use relative file |
| 11023 | paths. For example, if your Org files are kept in @file{~/org} and your | 11511 | paths. For example, if your Org files are kept in @file{~/org} and your |
| 11024 | publishable images in @file{~/images}, you would link to an image with | 11512 | publishable 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 |
| 11030 | On the web server, the relative path to the image should be the | 11518 | On the web server, the relative path to the image should be the |
| 11031 | same. You can accomplish this by setting up an "images" folder in the | 11519 | same. You can accomplish this by setting up an "images" folder in the |
| 11032 | right place on the web server, and publishing images to it. | 11520 | right 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 |
| 11081 | Org uses timestamps to track when a file has changed. The above functions | 11568 | Org uses timestamps to track when a file has changed. The above functions |
| 11082 | normally only publish changed files. You can override this and force | 11569 | normally only publish changed files. You can override this and force |
| 11083 | publishing of all files by giving a prefix argument to any of the commands | 11570 | publishing of all files by giving a prefix argument to any of the commands |
| 11084 | above, or by customizing the variable @code{org-publish-use-timestamps-flag}. | 11571 | above, or by customizing the variable @code{org-publish-use-timestamps-flag}. |
| 11085 | This may be necessary in particular if files include other files via | 11572 | This 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 | ||
| 11097 | Source code can be included in Org-mode documents using a @samp{src} block, | 11584 | Source code can be included in Org-mode documents using a @samp{src} block, |
| 11098 | e.g. | 11585 | e.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 | ||
| 11108 | Org-mode provides a number of features for working with live source code, | 11595 | Org-mode provides a number of features for working with live source code, |
| 11109 | including editing of code blocks in their native major-mode, evaluation of | 11596 | including editing of code blocks in their native major-mode, evaluation of |
| 11110 | code blocks, tangling of code blocks, and exporting code blocks and their | 11597 | code blocks, converting code blocks into source files (known as @dfn{tangling} |
| 11598 | in literate programming), and exporting code blocks and their | ||
| 11111 | results in several formats. This functionality was contributed by Eric | 11599 | results in several formats. This functionality was contributed by Eric |
| 11112 | Schulte and Dan Davison, and was originally named Org-babel. | 11600 | Schulte 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 | ||
| 11148 | code blocks can also be embedded in text as so called inline code blocks as | 11636 | Switches and header arguments are optional. Code can also be embedded in text |
| 11637 | inline using | ||
| 11149 | 11638 | ||
| 11150 | @example | 11639 | @example |
| 11151 | src_<language>@{<body>@} | 11640 | src_<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. |
| 11164 | Referencing the name of a code block makes it possible to evaluate the | 11653 | Referencing the name of a code block makes it possible to evaluate the |
| 11165 | block from other places in the file, other files, or from Org-mode table | 11654 | block from other places in the file, other files, or from Org-mode table |
| 11166 | formulas (see @ref{The spreadsheet}). | 11655 | formulas (see @ref{The spreadsheet}). Names are assumed to be unique by |
| 11656 | evaluation functions and the behavior of multiple blocks of the same name is | ||
| 11657 | undefined. | ||
| 11167 | @item <language> | 11658 | @item <language> |
| 11168 | The language of the code in the block. | 11659 | The language of the code in the block. |
| 11169 | @item <switches> | 11660 | @item <switches> |
| 11170 | Switches controlling exportation of the code block (see switches discussion in | 11661 | Optional 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> |
| 11173 | Optional header arguments control many aspects of evaluation, export and | 11664 | Optional header arguments control many aspects of evaluation, export and |
| 11174 | tangling of code blocks. See the @ref{Header arguments} | 11665 | tangling of code blocks. See the @ref{Header arguments}. |
| 11175 | section. Header arguments can also be set on a per-buffer or per-subtree | 11666 | Header arguments can also be set on a per-buffer or per-subtree |
| 11176 | basis using properties. | 11667 | basis using properties. |
| 11177 | @item <body> | 11668 | @item <body> |
| 11178 | The source code. | 11669 | The 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 ' |
| 11190 | Use @kbd{C-c '} to edit the current code block. This brings up | 11681 | Use @kbd{C-c '} to edit the current code block. This brings up |
| 11191 | a language major-mode edit buffer containing the body of the code | 11682 | a language major-mode edit buffer containing the body of the code |
| 11192 | block. Saving this buffer will write the new contents back to the Org | 11683 | block. Saving this buffer will write the new contents back to the Org |
| 11193 | buffer. Use @kbd{C-c '} again to exit. | 11684 | buffer. Use @kbd{C-c '} again to exit. |
| 11194 | 11685 | ||
| 11195 | The @code{org-src-mode} minor mode will be active in the edit buffer. The | 11686 | The @code{org-src-mode} minor mode will be active in the edit buffer. The |
| 11196 | following variables can be used to configure the behavior of the edit | 11687 | following variables can be used to configure the behavior of the edit |
| 11197 | buffer. See also the customization group @code{org-edit-structure} for | 11688 | buffer. See also the customization group @code{org-edit-structure} for |
| 11198 | further configuration options. | 11689 | further configuration options. |
| 11199 | 11690 | ||
| 11200 | @table @code | 11691 | @table @code |
| 11201 | @item org-src-lang-modes | 11692 | @item org-src-lang-modes |
| 11202 | If an Emacs major-mode named @code{<lang>-mode} exists, where | 11693 | If 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, |
| 11204 | then the edit buffer will be placed in that major-mode. This variable | 11695 | then the edit buffer will be placed in that major-mode. This variable |
| 11205 | can be used to map arbitrary language names to existing major modes. | 11696 | can be used to map arbitrary language names to existing major modes. |
| 11206 | @item org-src-window-setup | 11697 | @item org-src-window-setup |
| 11207 | Controls the way Emacs windows are rearranged when the edit buffer is created. | 11698 | Controls 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. | |||
| 11209 | This variable is especially useful for tangling languages such as | 11700 | This variable is especially useful for tangling languages such as |
| 11210 | Python, in which whitespace indentation in the output is critical. | 11701 | Python, 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 |
| 11212 | By default, Org will ask before returning to an open edit buffer. Set | 11703 | By default, Org will ask before returning to an open edit buffer. Set this |
| 11213 | this variable to nil to switch without asking. | 11704 | variable to nil to switch without asking. |
| 11214 | @end table | 11705 | @end table |
| 11215 | 11706 | ||
| 11707 | To turn on native code fontification in the @emph{Org} buffer, configure the | ||
| 11708 | variable @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 | ||
| 11224 | It is possible to export the @emph{contents} of code blocks, the | 11718 | It 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 |
| 11226 | most languages, the default exports the contents of code blocks. However, for | 11720 | most languages, the default exports the contents of code blocks. However, for |
| 11227 | some languages (e.g. @code{ditaa}) the default exports the results of code | 11721 | some languages (e.g.@: @code{ditaa}) the default exports the results of code |
| 11228 | block evaluation. For information on exporting code block bodies, see | 11722 | block 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 |
| 11237 | The default in most languages. The body of the code block is exported, as | 11731 | The default in most languages. The body of the code block is exported, as |
| 11238 | described in @ref{Literal examples}. | 11732 | described in @ref{Literal examples}. |
| 11239 | @item :exports results | 11733 | @item :exports results |
| 11240 | The code block will be evaluated and the results will be placed in the | 11734 | The 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 |
| 11274 | The default. The code block is not included in the tangled output. | 11769 | The default. The code block is not included in the tangled output. |
| 11275 | @item :tangle yes | 11770 | @item :tangle yes |
| 11276 | Include the code block in the tangled output. The output file name is the | 11771 | Include the code block in the tangled output. The output file name is the |
| 11277 | name of the org file with the extension @samp{.org} replaced by the extension | 11772 | name of the org file with the extension @samp{.org} replaced by the extension |
| 11278 | for the block language. | 11773 | for 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 |
| 11287 | Tangle the current file. Bound to @kbd{C-c C-v t}. | 11782 | Tangle the current file. Bound to @kbd{C-c C-v t}. |
| 11288 | @item org-babel-tangle-file | 11783 | @item org-babel-tangle-file |
| 11289 | Choose a file to tangle. Bound to @kbd{C-c C-v f}. | 11784 | Choose 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 | |||
| 11324 | Org-mode buffer or an Org-mode table. @code{#+call} (or synonymously | 11819 | Org-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 |
| 11326 | blocks located in the current Org-mode buffer or in the ``Library of Babel'' | 11821 | blocks 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 |
| 11823 | a 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 | |||
| 11830 | The following syntax can be used to place these calls within a block of | ||
| 11831 | prose. | ||
| 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> |
| 11337 | The name of the code block to be evaluated. | 11840 | The name of the code block to be evaluated. |
| 11338 | @item <arguments> | 11841 | @item <arguments> |
| 11339 | Arguments specified in this section will be passed to the code block. | 11842 | Arguments specified in this section will be passed to the code block. These |
| 11340 | @item <header arguments> | 11843 | arguments should relate to @code{:var} header arguments in the called code |
| 11341 | Header arguments can be placed after the function invocation. See | 11844 | block expressed using standard function call syntax. For example if the |
| 11342 | @ref{Header arguments} for more information on header arguments. | 11845 | original code block named @code{double} has the header argument @code{:var |
| 11846 | n=2}, then the call line passing the number four to that block would be | ||
| 11847 | written as @code{#+call: double(n=2)}. | ||
| 11848 | @item <header args> | ||
| 11849 | Header arguments can be placed either inside the call to the code block or at | ||
| 11850 | the end of the line as shown below. | ||
| 11851 | |||
| 11852 | @example | ||
| 11853 | #+call: code_bloc_name[XXXX](arguments) YYYY | ||
| 11854 | @end example | ||
| 11855 | |||
| 11856 | Header arguments located in these two locations are treated differently. | ||
| 11857 | |||
| 11858 | @table @code | ||
| 11859 | @item XXXX | ||
| 11860 | Those placed in the @code{XXXX} location are passed through and applied to | ||
| 11861 | the code block being called. These header arguments affect how the code | ||
| 11862 | block is evaluated, for example @code{[:results output]} will collect the | ||
| 11863 | results from @code{STDOUT} of the called code block. | ||
| 11864 | @item YYYY | ||
| 11865 | Those placed in the @code{YYYY} location are applied to the call line and do | ||
| 11866 | not affect the code block being called. These header arguments affect how | ||
| 11867 | the results are incorporated into the Org-mode buffer when the call line is | ||
| 11868 | evaluated, and how the call line is exported. For example @code{:results | ||
| 11869 | org} at the end of the call line will insert the results of the call line | ||
| 11870 | inside of an Org-mode block. | ||
| 11343 | @end table | 11871 | @end table |
| 11344 | 11872 | ||
| 11873 | For 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 | ||
| 11392 | Language-specific documentation is available for some languages. If | 11928 | Language-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 | ||
| 11517 | Header arguments are also read from Org-mode properties (see @ref{Property | 12053 | Header arguments are also read from Org-mode properties (see @ref{Property |
| 11518 | syntax}), which can be set on a buffer-wide or per-heading basis. An example | 12054 | syntax}), which can be set on a buffer-wide or per-heading basis. An example |
| 11519 | of setting a header argument for all code blocks in a buffer is | 12055 | of 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: | |||
| 11568 | src_haskell[:exports both]@{fac 5@} | 12104 | src_haskell[:exports both]@{fac 5@} |
| 11569 | @end example | 12105 | @end example |
| 11570 | 12106 | ||
| 12107 | Code block header arguments can span multiple lines using =#+header:= or | ||
| 12108 | =#+headers:= lines preceding a code block or nested in between the name and | ||
| 12109 | body of a named code block. | ||
| 12110 | |||
| 12111 | Multi-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 | |||
| 12122 | Multi-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 | ||
| 11575 | At the most specific level, header arguments for ``Library of Babel'' or | 12138 | At the most specific level, header arguments for ``Library of Babel'' or |
| 11576 | function call lines can be set as shown below: | 12139 | function call lines can be set as shown in the two examples below. For more |
| 12140 | information on the structure of @code{#+call:} lines see @ref{Evaluating code | ||
| 12141 | blocks}. | ||
| 11577 | 12142 | ||
| 12143 | The following will apply the @code{:exports results} header argument to the | ||
| 12144 | evaluation 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 | ||
| 12149 | The following will apply the @code{:session special} header argument to the | ||
| 12150 | evaluation 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 |
| 11584 | The following header arguments are defined: | 12157 | The 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 | ||
| 12188 | Additional 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} |
| 11611 | The @code{:var} header argument is used to pass arguments to code blocks. | 12193 | The @code{:var} header argument is used to pass arguments to code blocks. |
| 11612 | The specifics of how arguments are included in a code block vary by language; | 12194 | The specifics of how arguments are included in a code block vary by language; |
| 11613 | these are addressed in the language-specific documentation. However, the | 12195 | these are addressed in the language-specific documentation. However, the |
| 11614 | syntax used to specify arguments is the same across all languages. The | 12196 | syntax used to specify arguments is the same across all languages. The |
| 11615 | values passed to arguments can be literal values, values from org-mode tables | 12197 | values passed to arguments can be literal values, values from org-mode tables |
| 11616 | and literal example blocks, or the results of other code blocks. | 12198 | and literal example blocks, the results of other code blocks, or Emacs Lisp |
| 12199 | code---see the ``Emacs Lisp evaluation of variables'' heading below. | ||
| 11617 | 12200 | ||
| 11618 | These values can be indexed in a manner similar to arrays---see the | 12201 | These 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. | |||
| 11701 | It is possible to reference portions of variable values by ``indexing'' into | 12284 | It is possible to reference portions of variable values by ``indexing'' into |
| 11702 | the variables. Indexes are 0 based with negative values counting back from | 12285 | the variables. Indexes are 0 based with negative values counting back from |
| 11703 | the end. If an index is separated by @code{,}s then each subsequent section | 12286 | the end. If an index is separated by @code{,}s then each subsequent section |
| 11704 | will index into the next deepest nesting or dimension of the value. The | 12287 | will index into the next deepest nesting or dimension of the value. Note |
| 12288 | that this indexing occurs @emph{before} other table related header arguments | ||
| 12289 | like @code{:hlines}, @code{:colnames} and @code{:rownames} are applied. The | ||
| 11705 | following example assigns the last cell of the first row the table | 12290 | following 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 | |||
| 12373 | Emacs lisp code can be used to initialize variable values. When a variable | ||
| 12374 | value starts with @code{(}, @code{[}, @code{'} or @code{`} it will be evaluated as | ||
| 12375 | Emacs Lisp and the result of the evaluation will be assigned as the variable | ||
| 12376 | value. The following example demonstrates use of this evaluation to reliably | ||
| 12377 | pass the file-name of the org-mode buffer to a code block---note that | ||
| 12378 | evaluation of header arguments is guaranteed to take place in the original | ||
| 12379 | org-mode file, while there is no such guarantee for evaluation of the code | ||
| 12380 | block 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 | |||
| 12388 | Note that values read from tables and lists will not be evaluated as | ||
| 12389 | Emacs 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 | |||
| 11812 | code block. This header argument places the evaluation in functional | 12430 | code block. This header argument places the evaluation in functional |
| 11813 | mode. Note that in some languages, e.g., Python, use of this result type | 12431 | mode. Note that in some languages, e.g., Python, use of this result type |
| 11814 | requires that a @code{return} statement be included in the body of the source | 12432 | requires that a @code{return} statement be included in the body of the source |
| 11815 | code block. E.g., @code{:results value}. | 12433 | code block. E.g., @code{:results value}. |
| 11816 | @item @code{output} | 12434 | @item @code{output} |
| 11817 | The result is the collection of everything printed to STDOUT during the | 12435 | The result is the collection of everything printed to STDOUT during the |
| 11818 | execution of the code block. This header argument places the | 12436 | execution of the code block. This header argument places the |
| @@ -11857,6 +12475,10 @@ E.g., @code{:results value code}. | |||
| 11857 | The result is converted to pretty-printed code and is enclosed in a code | 12475 | The result is converted to pretty-printed code and is enclosed in a code |
| 11858 | block. This option currently supports Emacs Lisp, Python, and Ruby. E.g., | 12476 | block. 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} | ||
| 12479 | The result is wrapped in a @code{begin_result} block. This can be useful for | ||
| 12480 | inserting @code{raw} or @code{org} syntax results in such a way that their | ||
| 12481 | extend 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 | ||
| 11887 | The header argument @code{:file} is used to specify a path for file output. | 12509 | The header argument @code{:file} is used to specify an external file in which |
| 11888 | An Org-mode style @code{file:} link is inserted into the buffer as the result | 12510 | to 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 |
| 11890 | gnuplot, ditaa and LaTeX code blocks. | 12512 | into the Org-mode buffer. Some languages including R, gnuplot, dot, and |
| 11891 | 12513 | ditaa provide special handling of the @code{:file} header argument | |
| 11892 | Note that for some languages, including R, gnuplot, LaTeX and ditaa, | 12514 | automatically wrapping the code block body in the boilerplate code required |
| 11893 | graphical output is sent to the specified file without the file being | 12515 | to save output to the specified file. This is often useful for saving |
| 11894 | referenced explicitly in the code block. See the documentation for the | 12516 | graphical output of a code block to the specified file. |
| 11895 | individual languages for details. In contrast, general purpose languages such | ||
| 11896 | as Python and Ruby require that the code explicitly create output | ||
| 11897 | corresponding to the path indicated by @code{:file}. | ||
| 11898 | 12517 | ||
| 12518 | The argument to @code{:file} should be either a string specifying the path to | ||
| 12519 | a file, or a list of two strings in which case the first element of the list | ||
| 12520 | should 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 | ||
| 11903 | While the @code{:file} header argument can be used to specify the path to the | 12525 | While the @code{:file} header argument can be used to specify the path to the |
| 11904 | output file, @code{:dir} specifies the default directory during code block | 12526 | output file, @code{:dir} specifies the default directory during code block |
| 11905 | execution. If it is absent, then the directory associated with the current | 12527 | execution. If it is absent, then the directory associated with the current |
| 11906 | buffer is used. In other words, supplying @code{:dir path} temporarily has | 12528 | buffer is used. In other words, supplying @code{:dir path} temporarily has |
| 11907 | the same effect as changing the current directory with @kbd{M-x cd path}, and | 12529 | the same effect as changing the current directory with @kbd{M-x cd path}, and |
| 11908 | then not supplying @code{:dir}. Under the surface, @code{:dir} simply sets | 12530 | then not supplying @code{:dir}. Under the surface, @code{:dir} simply sets |
| 11909 | the value of the Emacs variable @code{default-directory}. | 12531 | the value of the Emacs variable @code{default-directory}. |
| 11910 | 12532 | ||
| 11911 | When using @code{:dir}, you should supply a relative path for file output | 12533 | When 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 |
| 11913 | case that path will be interpreted relative to the default directory. | 12535 | case that path will be interpreted relative to the default directory. |
| 11914 | 12536 | ||
| 11915 | In other words, if you want your plot to go into a folder called @file{Work} | 12537 | In 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 |
| 11925 | A directory on a remote machine can be specified using tramp file syntax, in | 12547 | A directory on a remote machine can be specified using tramp file syntax, in |
| 11926 | which case the code will be evaluated on the remote machine. An example is | 12548 | which 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 | ||
| 11934 | Text results will be returned to the local Org-mode buffer as usual, and file | 12556 | Text results will be returned to the local Org-mode buffer as usual, and file |
| 11935 | output will be created on the remote machine with relative paths interpreted | 12557 | output will be created on the remote machine with relative paths interpreted |
| 11936 | relative to the remote directory. An Org-mode link to the remote file will be | 12558 | relative to the remote directory. An Org-mode link to the remote file will be |
| 11937 | created. | 12559 | created. |
| 11938 | 12560 | ||
| 11939 | So, in the above example a plot will be created on the remote machine, | 12561 | So, 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 | ||
| 11946 | Most of this functionality follows immediately from the fact that @code{:dir} | 12568 | Most of this functionality follows immediately from the fact that @code{:dir} |
| 11947 | sets the value of the Emacs variable @code{default-directory}, thanks to | 12569 | sets the value of the Emacs variable @code{default-directory}, thanks to |
| 11948 | tramp. Those using XEmacs, or GNU Emacs prior to version 23 may need to | 12570 | tramp. Those using XEmacs, or GNU Emacs prior to version 23 may need to |
| 11949 | install tramp separately in order for these features to work correctly. | 12571 | install 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 | |||
| 11957 | currently made to alter the directory associated with an existing session. | 12579 | currently 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 |
| 11961 | to retain portability of exported material between machines, during export | 12583 | to retain portability of exported material between machines, during export |
| 11962 | links inserted into the buffer will *not* be expanded against @code{default | 12584 | links inserted into the buffer will *not* be expanded against @code{default |
| 11963 | directory}. Therefore, if @code{default-directory} is altered using | 12585 | directory}. 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 |
| 11965 | which the link does not point. | 12587 | which the link does not point. |
| 11966 | @end itemize | 12588 | @end itemize |
| @@ -11976,16 +12598,16 @@ or LaTeX exports of the Org-mode file. | |||
| 11976 | The default. The body of code is included into the exported file. E.g., | 12598 | The 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} |
| 11979 | The result of evaluating the code is included in the exported file. E.g., | 12601 | The 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} |
| 11982 | Both the code and results are included in the exported file. E.g., | 12604 | Both 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} |
| 11985 | Nothing is included in the exported file. E.g., @code{:exports none}. | 12607 | Nothing 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 | ||
| 11991 | The @code{:tangle} header argument specifies whether or not the code | 12613 | The @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} |
| 11996 | The code block is exported to a source code file named after the | 12618 | The code block is exported to a source code file named after the full path |
| 11997 | basename (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. |
| 11998 | yes}. | 12620 | E.g., @code{:tangle yes}. |
| 11999 | @item @code{no} | 12621 | @item @code{no} |
| 12000 | The default. The code block is not exported to a source code file. | 12622 | The default. The code block is not exported to a source code file. |
| 12001 | E.g., @code{:tangle no}. | 12623 | E.g., @code{:tangle no}. |
| 12002 | @item other | 12624 | @item other |
| 12003 | Any other string passed to the @code{:tangle} header argument is interpreted | 12625 | Any other string passed to the @code{:tangle} header argument is interpreted |
| 12004 | as a file basename to which the block will be exported. E.g., @code{:tangle | 12626 | as a path (directory and file name relative to the directory of the Org-mode |
| 12005 | basename}. | 12627 | file) 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 | |||
| 12633 | The @code{:mkdirp} header argument can be used to create parent directories | ||
| 12634 | of tangled files when missing. This can be set to @code{yes} to enable | ||
| 12635 | directory 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} |
| 12010 | By default code blocks are tangled to source-code files without any insertion | 12639 | By default code blocks are tangled to source-code files without any insertion |
| 12011 | of comments beyond those which may already exist in the body of the code | 12640 | of 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 | |||
| 12027 | limited by the nearest headline or source block as the case may be. | 12656 | limited by the nearest headline or source block as the case may be. |
| 12028 | @item @code{both} | 12657 | @item @code{both} |
| 12029 | Turns on both the ``link'' and ``org'' comment options. | 12658 | Turns on both the ``link'' and ``org'' comment options. |
| 12659 | @item @code{noweb} | ||
| 12660 | Turns on the ``link'' comment option, and additionally wraps expanded noweb | ||
| 12661 | references 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} | ||
| 12666 | Control in insertion of padding lines around code block bodies in tangled | ||
| 12667 | code files. The default value is @code{yes} which results in insertion of | ||
| 12668 | newlines before and after each tangled code block. The following arguments | ||
| 12669 | are accepted. | ||
| 12670 | |||
| 12671 | @itemize @bullet | ||
| 12672 | @item @code{yes} | ||
| 12673 | Insert newlines before and after each code block body in tangled code files. | ||
| 12674 | @item @code{no} | ||
| 12675 | Do 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 | ||
| 12035 | By default, code blocks are expanded with @code{org-babel-expand-src-block} | 12681 | By 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 | |||
| 12050 | a name. This makes it possible to run concurrent sessions for each | 12696 | a name. This makes it possible to run concurrent sessions for each |
| 12051 | interpreted language. | 12697 | interpreted 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 | ||
| 12056 | The @code{:noweb} header argument controls expansion of ``noweb'' style (see | 12702 | The @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 |
| 12058 | argument can have one of three values: @code{yes} @code{no} or @code{tangle}. | 12704 | argument 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 | |||
| 12096 | be affected by this change, so it is still possible to use inline noweb | 12742 | be affected by this change, so it is still possible to use inline noweb |
| 12097 | references. | 12743 | references. |
| 12098 | 12744 | ||
| 12099 | @node cache, hlines, noweb, Specific header arguments | 12745 | @node noweb-ref, cache, noweb, Specific header arguments |
| 12746 | @subsubsection @code{:noweb-ref} | ||
| 12747 | When 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 | ||
| 12750 | concatenated together to form the replacement text. | ||
| 12751 | |||
| 12752 | By setting this header argument at the sub-tree or file level, simple code | ||
| 12753 | block concatenation may be achieved. For example, when tangling the | ||
| 12754 | following Org-mode file, the bodies of code blocks will be concatenated into | ||
| 12755 | the 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 | ||
| 12102 | The @code{:cache} header argument controls the use of in-buffer caching of | 12790 | The @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 | |||
| 12116 | changed since the last time it was evaluated, it will not be re-evaluated. | 12804 | changed 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 | 12807 | Code block caches notice if the value of a variable argument |
| 12808 | to the code block has changed. If this is the case, the cache is | ||
| 12809 | invalidated 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 | ||
| 12811 | changed 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 | |||
| 12834 | The @code{:sep} header argument can be used to control the delimiter used | ||
| 12835 | when writing tabular results out to files external to Org-mode. This is used | ||
| 12836 | either 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, | ||
| 12838 | or when writing code block results to an external file (see @ref{file}) | ||
| 12839 | header argument. | ||
| 12840 | |||
| 12841 | By default, when @code{:sep} is not specified output tables are tab | ||
| 12842 | delimited. | ||
| 12843 | |||
| 12844 | @node hlines, colnames, sep, Specific header arguments | ||
| 12120 | @subsubsection @code{:hlines} | 12845 | @subsubsection @code{:hlines} |
| 12121 | 12846 | ||
| 12122 | Tables are frequently represented with one or more horizontal lines, or | 12847 | Tables 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} |
| 12153 | Leaves hlines in the table. Setting @code{:hlines yes} has this effect. | 12878 | Leaves 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 | ||
| 12934 | Please note that column names are not removed before the table is indexed | ||
| 12935 | using variable indexing @xref{var, Indexable variable values}. | ||
| 12936 | |||
| 12209 | @item @code{no} | 12937 | @item @code{no} |
| 12210 | No column name pre-processing takes place | 12938 | No column name pre-processing takes place |
| 12211 | 12939 | ||
| 12212 | @item @code{yes} | 12940 | @item @code{yes} |
| 12213 | Column names are removed and reapplied as with @code{nil} even if the table | 12941 | Column names are removed and reapplied as with @code{nil} even if the table |
| 12214 | does not ``look like'' it has column names (i.e. the second row is not an | 12942 | does not ``look like'' it has column names (i.e.@: the second row is not an |
| 12215 | hline) | 12943 | hline) |
| 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 | |||
| 12975 | Please note that row names are not removed before the table is indexed using | ||
| 12976 | variable 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 | ||
| 12251 | Setting the @code{:shebang} header argument to a string value | 12983 | Setting 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 |
| 12253 | first line of any tangled file holding the code block, and the file | 12985 | first line of any tangled file holding the code block, and the file |
| 12254 | permissions of the tangled file are set to make it executable. | 12986 | permissions 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 | |||
| 12263 | execution of a code block regardless of the value of the | 12995 | execution 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 | ||
| 12998 | If this header argument is not set then evaluation is determined by the value | ||
| 12999 | of the @code{org-confirm-babel-evaluate} variable see @ref{Code evaluation | ||
| 13000 | security}. | ||
| 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 | ||
| 12271 | The way in which results are handled depends on whether a session is invoked, | 13007 | The way in which results are handled depends on whether a session is invoked, |
| 12272 | as well as on whether @code{:results value} or @code{:results output} is | 13008 | as well as on whether @code{:results value} or @code{:results output} is |
| 12273 | used. The following table shows the possibilities: | 13009 | used. The following table shows the table possibilities. For a full listing |
| 13010 | of 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} |
| 12287 | This is the default. Internally, the value is obtained by wrapping the code | 13024 | This is the default. Internally, the value is obtained by wrapping the code |
| 12288 | in a function definition in the external language, and evaluating that | 13025 | in a function definition in the external language, and evaluating that |
| 12289 | function. Therefore, code should be written as if it were the body of such a | 13026 | function. Therefore, code should be written as if it were the body of such a |
| 12290 | function. In particular, note that Python does not automatically return a | 13027 | function. In particular, note that Python does not automatically return a |
| 12291 | value from a function unless a @code{return} statement is present, and so a | 13028 | value 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} |
| 12298 | The code is passed to the interpreter as an external process, and the | 13035 | The code is passed to the interpreter as an external process, and the |
| 12299 | contents of the standard output stream are returned as text. (In certain | 13036 | contents of the standard output stream are returned as text. (In certain |
| 12300 | languages this also contains the error output stream; this is an area for | 13037 | languages this also contains the error output stream; this is an area for |
| 12301 | future work.) | 13038 | future work.) |
| 12302 | 13039 | ||
| 12303 | @subsection Session | 13040 | @subsection Session |
| 12304 | @subsubsection @code{:results value} | 13041 | @subsubsection @code{:results value} |
| 12305 | The code is passed to the interpreter running as an interactive Emacs | 13042 | The code is passed to an interpreter running as an interactive Emacs inferior |
| 12306 | inferior process. The result returned is the result of the last evaluation | 13043 | process. Only languages which provide tools for interactive evaluation of |
| 12307 | performed by the interpreter. (This is obtained in a language-specific | 13044 | code have session support, so some language (e.g., C and ditaa) do not |
| 12308 | manner: the value of the variable @code{_} in Python and Ruby, and the value | 13045 | support the @code{:session} header argument, and in other languages (e.g., |
| 12309 | of @code{.Last.value} in R). | 13046 | Python and Haskell) which have limitations on the code which may be entered |
| 13047 | into interactive sessions, those limitations apply to the code in code blocks | ||
| 13048 | using the @code{:session} header argument as well. | ||
| 13049 | |||
| 13050 | Unless the @code{:results output} option is supplied (see below) the result | ||
| 13051 | returned is the result of the last evaluation performed by the | ||
| 13052 | interpreter. (This is obtained in a language-specific manner: the value of | ||
| 13053 | the variable @code{_} in Python and Ruby, and the value of @code{.Last.value} | ||
| 13054 | in R). | ||
| 12310 | 13055 | ||
| 12311 | @subsubsection @code{:results output} | 13056 | @subsubsection @code{:results output} |
| 12312 | The code is passed to the interpreter running as an interactive Emacs | 13057 | The code is passed to the interpreter running as an interactive Emacs |
| 12313 | inferior process. The result returned is the concatenation of the sequence of | 13058 | inferior 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 |
| 12315 | necessarily the same as what would be sent to @code{STDOUT} if the same code | 13060 | necessarily the same as what would be sent to @code{STDOUT} if the same code |
| 12316 | were passed to a non-interactive interpreter running as an external | 13061 | were passed to a non-interactive interpreter running as an external |
| 12317 | process. For example, compare the following two blocks: | 13062 | process. 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 | ||
| 12345 | But in @code{:session} mode, the interactive interpreter receives input `2' | 13090 | But in @code{:session} mode, the interactive interpreter receives input `2' |
| 12346 | and prints out its value, `2'. (Indeed, the other print statements are | 13091 | and prints out its value, `2'. (Indeed, the other print statements are |
| 12347 | unnecessary here). | 13092 | unnecessary 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 | ||
| 12396 | In an Org-mode buffer, the following key bindings are active: | 13141 | In 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 | |||
| 12549 | will insert example settings for this keyword. | 13295 | will insert example settings for this keyword. |
| 12550 | @item | 13296 | @item |
| 12551 | In the line after @samp{#+STARTUP: }, complete startup keywords, | 13297 | In the line after @samp{#+STARTUP: }, complete startup keywords, |
| 12552 | i.e. valid keys for this line. | 13298 | i.e.@: valid keys for this line. |
| 12553 | @item | 13299 | @item |
| 12554 | Elsewhere, complete dictionary words using Ispell. | 13300 | Elsewhere, 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 | ||
| 12590 | For example, on an empty line, typing "<e" and then pressing TAB, will expand | 13337 | For example, on an empty line, typing "<e" and then pressing TAB, will expand |
| 12591 | into a complete EXAMPLE template. | 13338 | into a complete EXAMPLE template. |
| 12592 | 13339 | ||
| 12593 | You can install additional templates by customizing the variable | 13340 | You 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 |
| 12595 | additional details. | 13342 | additional 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 | ||
| 12603 | Single keys can be made to execute commands when the cursor is at the | 13350 | Single keys can be made to execute commands when the cursor is at the |
| 12604 | beginning of a headline, i.e. before the first star. Configure the variable | 13351 | beginning 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 |
| 12606 | pre-defined list of commands, and you can add more such commands using the | 13353 | pre-defined list of commands, and you can add more such commands using the |
| 12607 | variable @code{org-speed-commands-user}. Speed keys do not only speed up | 13354 | variable @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 | |||
| 12641 | which take off the default security brakes. | 13388 | which take off the default security brakes. |
| 12642 | 13389 | ||
| 12643 | @defopt org-confirm-babel-evaluate | 13390 | @defopt org-confirm-babel-evaluate |
| 12644 | When set to t user is queried before code block evaluation | 13391 | When t (the default), the user is asked before every code block evaluation. |
| 13392 | When nil, the user is not asked. When set to a function, it is called with | ||
| 13393 | two arguments (language and body of the code block) and should return t to | ||
| 13394 | ask and nil not to ask. | ||
| 12645 | @end defopt | 13395 | @end defopt |
| 12646 | 13396 | ||
| 13397 | For example, here is how to execute "ditaa" code (which is considered safe) | ||
| 13398 | without 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 |
| 12648 | Org has two link types that can directly evaluate code (@pxref{External | 13406 | Org has two link types that can directly evaluate code (@pxref{External |
| 12649 | links}). These links can be problematic because the code to be evaluated is | 13407 | links}). 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 |
| 12740 | This line defines a file that holds more in-buffer setup. Normally this is | 13498 | This line defines a file that holds more in-buffer setup. Normally this is |
| 12741 | entirely ignored. Only when the buffer is parsed for option-setting lines | 13499 | entirely 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 |
| 12743 | settings line, or when exporting), then the contents of this file are parsed | 13501 | settings line, or when exporting), then the contents of this file are parsed |
| 12744 | as if they had been included in the buffer. In particular, the file can be | 13502 | as if they had been included in the buffer. In particular, the file can be |
| 12745 | any other Org-mode file with internal setup. You can visit the file the | 13503 | any other Org-mode file with internal setup. You can visit the file the |
| @@ -12896,14 +13654,14 @@ fninline @r{define footnotes inline} | |||
| 12896 | fnnoinline @r{define footnotes in separate section} | 13654 | fnnoinline @r{define footnotes in separate section} |
| 12897 | fnlocal @r{define footnotes near first reference, but not inline} | 13655 | fnlocal @r{define footnotes near first reference, but not inline} |
| 12898 | fnprompt @r{prompt for footnote labels} | 13656 | fnprompt @r{prompt for footnote labels} |
| 12899 | fnauto @r{create [fn:1]-like labels automatically (default)} | 13657 | fnauto @r{create @code{[fn:1]}-like labels automatically (default)} |
| 12900 | fnconfirm @r{offer automatic label for editing or confirmation} | 13658 | fnconfirm @r{offer automatic label for editing or confirmation} |
| 12901 | fnplain @r{create [1]-like labels automatically} | 13659 | fnplain @r{create @code{[1]}-like labels automatically} |
| 12902 | fnadjust @r{automatically renumber and sort footnotes} | 13660 | fnadjust @r{automatically renumber and sort footnotes} |
| 12903 | nofnadjust @r{do not renumber and sort automatically} | 13661 | nofnadjust @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 |
| 12906 | To hide blocks on startup, use these keywords. The corresponding variable is | 13664 | To 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 |
| 13161 | Org lives in the world of GNU Emacs and interacts in various ways | 13919 | Org 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 |
| 13180 | been installed properly. As of Emacs 22, Calc is part of the Emacs | 13938 | been installed properly. As of Emacs 22, Calc is part of the Emacs |
| 13181 | distribution. Another possibility for interaction between the two | 13939 | distribution. Another possibility for interaction between the two |
| 13182 | packages is using Calc for embedded calculations. @xref{Embedded Mode, | 13940 | packages 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 | |||
| 13191 | the @file{constants} package which defines a large number of constants | 13949 | the @file{constants} package which defines a large number of constants |
| 13192 | and units, and lets you use unit prefixes like @samp{M} for | 13950 | and 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 |
| 13194 | at @url{http://www.astro.uva.nl/~dominik/Tools}. Org checks for | 13952 | at @url{http://www.astro.uva.nl/~dominik/Tools}. Org checks for |
| 13195 | the function @code{constants-get}, which has to be autoloaded in your | 13953 | the function @code{constants-get}, which has to be autoloaded in your |
| 13196 | setup. See the installation instructions in the file | 13954 | setup. 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 | |||
| 13291 | buffer (but not during date selection). | 14049 | buffer (but not during date selection). |
| 13292 | 14050 | ||
| 13293 | @example | 14051 | @example |
| 13294 | S-UP -> M-p S-DOWN -> M-n | 14052 | S-UP @result{} M-p S-DOWN @result{} M-n |
| 13295 | S-LEFT -> M-- S-RIGHT -> M-+ | 14053 | S-LEFT @result{} M-- S-RIGHT @result{} M-+ |
| 13296 | C-S-LEFT -> M-S-- C-S-RIGHT -> M-S-+ | 14054 | C-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} |
| 13306 | The way Org-mode binds the TAB key (binding to @code{[tab]} instead of | 14064 | The 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 |
| 13308 | fixed this problem: | 14066 | fixed 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 | ||
| 14075 | The latest version of yasnippet doesn't play well with Org mode. If the | ||
| 14076 | above code does not fix the conflict, start by defining the following | ||
| 14077 | function: | ||
| 14078 | |||
| 14079 | @lisp | ||
| 14080 | (defun yas/org-very-safe-expand () | ||
| 14081 | (let ((yas/fallback-behavior 'return-nil)) (yas/expand))) | ||
| 14082 | @end lisp | ||
| 14083 | |||
| 14084 | Then, 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} |
| 13319 | This package also uses the @kbd{S-<cursor>} keys, so everything written | 14097 | This 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 | |||
| 14130 | Org-crypt will encrypt the text of an entry, but not the headline, or | ||
| 14131 | properties. Org-crypt uses the Emacs EasyPG library to encrypt and decrypt | ||
| 14132 | files. | ||
| 14133 | |||
| 14134 | Any text below a headline that has a @samp{:crypt:} tag will be automatically | ||
| 14135 | be encrypted when the file is saved. If you want to use a different tag just | ||
| 14136 | customize the @code{org-crypt-tag-matcher} setting. | ||
| 14137 | |||
| 14138 | To 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 | |||
| 14161 | Excluding the crypt tag from inheritance prevents already encrypted text | ||
| 14162 | being 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 | |||
| 13487 | buffer with @kbd{C-c C-l}. | 14303 | buffer with @kbd{C-c C-l}. |
| 13488 | 14304 | ||
| 13489 | When it makes sense for your new link type, you may also define a function | 14305 | When 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) |
| 13491 | support for inserting such a link with @kbd{C-c C-l}. Such a function should | 14307 | support for inserting such a link with @kbd{C-c C-l}. Such a function should |
| 13492 | not accept any arguments, and return the full link with prefix. | 14308 | not 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 | |||
| 13526 | The function first checks if the cursor is in such a line. If that is the | 14342 | The function first checks if the cursor is in such a line. If that is the |
| 13527 | case, @code{org-R-apply} is called and the function returns @code{t} to | 14343 | case, @code{org-R-apply} is called and the function returns @code{t} to |
| 13528 | signal that action was taken, and @kbd{C-c C-c} will stop looking for other | 14344 | signal that action was taken, and @kbd{C-c C-c} will stop looking for other |
| 13529 | contexts. If the function finds it should do nothing locally, it returns @code{nil} so that other, similar functions can have a try. | 14345 | contexts. 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 | |||
| 13539 | frequent feature request has been to make it work with native tables in | 14356 | frequent feature request has been to make it work with native tables in |
| 13540 | specific languages, for example @LaTeX{}. However, this is extremely | 14357 | specific languages, for example @LaTeX{}. However, this is extremely |
| 13541 | hard to do in a general way, would lead to a customization nightmare, | 14358 | hard to do in a general way, would lead to a customization nightmare, |
| 13542 | and would take away much of the simplicity of the Orgtbl-mode table | 14359 | and would take away much of the simplicity of the Orgtbl mode table |
| 13543 | editor. | 14360 | editor. |
| 13544 | 14361 | ||
| 13545 | This appendix describes a different approach. We keep the Orgtbl mode | 14362 | This 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 |
| 13590 | in the receiver lines. @code{translation_function} is the Lisp function | 14407 | in the receiver lines. @code{translation_function} is the Lisp function |
| 13591 | that does the translation. Furthermore, the line can contain a list of | 14408 | that does the translation. Furthermore, the line can contain a list of |
| 13592 | arguments (alternating key and value) at the end. The arguments will be | 14409 | arguments (alternating key and value) at the end. The arguments will be |
| 13593 | passed as a property list to the translation function for | 14410 | passed as a property list to the translation function for |
| @@ -13690,7 +14507,7 @@ table inserted between the two marker lines. | |||
| 13690 | Now let's assume you want to make the table header by hand, because you | 14507 | Now let's assume you want to make the table header by hand, because you |
| 13691 | want to control how columns are aligned, etc@. In this case we make sure | 14508 | want to control how columns are aligned, etc@. In this case we make sure |
| 13692 | that the table translator skips the first 2 lines of the source | 14509 | that the table translator skips the first 2 lines of the source |
| 13693 | table, and tell the command to work as a @i{splice}, i.e. to not produce | 14510 | table, and tell the command to work as a @i{splice}, i.e.@: to not produce |
| 13694 | header and footer commands of the target table: | 14511 | header and footer commands of the target table: |
| 13695 | 14512 | ||
| 13696 | @example | 14513 | @example |
| @@ -13725,7 +14542,7 @@ tabular environment. Default is nil. | |||
| 13725 | A format to be used to wrap each field, it should contain @code{%s} for the | 14542 | A format to be used to wrap each field, it should contain @code{%s} for the |
| 13726 | original field value. For example, to wrap each field value in dollars, | 14543 | original field value. For example, to wrap each field value in dollars, |
| 13727 | you could use @code{:fmt "$%s$"}. This may also be a property list with | 14544 | you could use @code{:fmt "$%s$"}. This may also be a property list with |
| 13728 | column numbers and formats. for example @code{:fmt (2 "$%s$" 4 "%s\\%%")}. | 14545 | column numbers and formats, for example @code{:fmt (2 "$%s$" 4 "%s\\%%")}. |
| 13729 | A function of one argument can be used in place of the strings; the | 14546 | A function of one argument can be used in place of the strings; the |
| 13730 | function must return a formatted string. | 14547 | function 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 | ||
| 13774 | As you can see, the properties passed into the function (variable | 14591 | As 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 |
| 13777 | ones set by the @samp{ORGTBL SEND} line) take precedence. So if you | 14594 | ones set by the @samp{ORGTBL SEND} line) take precedence. So if you |
| 13778 | would like to use the @LaTeX{} translator, but wanted the line endings to | 14595 | would like to use the @LaTeX{} translator, but wanted the line endings to |
| 13779 | be @samp{\\[2mm]} instead of the default @samp{\\}, you could just | 14596 | be @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 | |||
| 13920 | written in a way such that it does nothing in buffers that are not in | 14737 | written in a way such that it does nothing in buffers that are not in |
| 13921 | @code{org-mode}. | 14738 | @code{org-mode}. |
| 13922 | 14739 | ||
| 14740 | You can narrow the current buffer to the current dynamic block (like any | ||
| 14741 | other 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 | ||
| 13927 | Org provides a special hook that can be used to narrow down the selection | 14749 | Org provides a special hook that can be used to narrow down the selection |
| 13928 | made by these agenda views: @code{todo}, @code{alltodo}, @code{tags}, @code{tags-todo}, | 14750 | made 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 |
| 13930 | if the match should indeed be part of the agenda view, and if not, how | 14752 | that is used at each match to verify if the match should indeed be part of |
| 13931 | much should be skipped. | 14753 | the agenda view, and if not, how much should be skipped. You can specify a |
| 14754 | global condition that will be applied to all agenda views, this condition | ||
| 14755 | would be stored in the variable @code{org-agenda-skip-function-global}. More | ||
| 14756 | commonly, such a definition is applied only to specific custom searches, | ||
| 14757 | using @code{org-agenda-skip-function}. | ||
| 13932 | 14758 | ||
| 13933 | Let's say you want to produce a list of projects that contain a WAITING | 14759 | Let's say you want to produce a list of projects that contain a WAITING |
| 13934 | tag anywhere in the project tree. Let's further assume that you have | 14760 | tag 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 | |||
| 14219 | moved to the end of the line (presumably of the headline of the | 15045 | moved to the end of the line (presumably of the headline of the |
| 14220 | processed entry) and search continues from there. Under some | 15046 | processed entry) and search continues from there. Under some |
| 14221 | circumstances, this may not produce the wanted results. For example, | 15047 | circumstances, this may not produce the wanted results. For example, |
| 14222 | if you have removed (e.g. archived) the current (sub)tree it could | 15048 | if you have removed (e.g.@: archived) the current (sub)tree it could |
| 14223 | mean that the next entry will be skipped entirely. In such cases, you | 15049 | mean that the next entry will be skipped entirely. In such cases, you |
| 14224 | can specify the position from where search should continue by making | 15050 | can specify the position from where search should continue by making |
| 14225 | FUNC set the variable `org-map-continue-from' to the desired buffer | 15051 | FUNC 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 |
| 14236 | nil @r{the current buffer, respecting the restriction if any} | 15062 | nil @r{the current buffer, respecting the restriction if any} |
| 14237 | tree @r{the subtree started with the entry at point} | 15063 | tree @r{the subtree started with the entry at point} |
| 15064 | region @r{The entries within the active region, if any} | ||
| 14238 | file @r{the current buffer, without restriction} | 15065 | file @r{the current buffer, without restriction} |
| 14239 | file-with-archives | 15066 | file-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 |
| 14356 | Dropbox, or if your version of MobileOrg does not support it, you can use a | 15183 | Dropbox, or if your version of MobileOrg does not support it, you can use a |
| 14357 | webdav server. For more information, check out the documentation of MobileOrg and also this | 15184 | webdav 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}.}. |
| 14359 | When MobileOrg first connects to your Dropbox, it will create a directory | 15186 | When 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 |
| 14361 | Emacs about it: | 15188 | Emacs about it: |
| @@ -14373,7 +15200,7 @@ and to read captured notes from there. | |||
| 14373 | This operation copies all files currently listed in @code{org-mobile-files} | 15200 | This operation copies all files currently listed in @code{org-mobile-files} |
| 14374 | to the directory @code{org-mobile-directory}. By default this list contains | 15201 | to the directory @code{org-mobile-directory}. By default this list contains |
| 14375 | all agenda files (as listed in @code{org-agenda-files}), but additional files | 15202 | all agenda files (as listed in @code{org-agenda-files}), but additional files |
| 14376 | can be included by customizing @code{org-mobiles-files}. File names will be | 15203 | can be included by customizing @code{org-mobile-files}. File names will be |
| 14377 | staged with paths relative to @code{org-directory}, so all files should be | 15204 | staged with paths relative to @code{org-directory}, so all files should be |
| 14378 | inside this directory. The push operation also creates a special Org file | 15205 | inside 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 |
| 14704 | chapter about publishing. | 15531 | chapter 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 |
| 14707 | enabled source code highlighling in Gnus. | 15536 | enabled 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 |
| 14731 | and contributed various ideas and code snippets. | 15560 | and 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 |