aboutsummaryrefslogtreecommitdiffstats
path: root/man
diff options
context:
space:
mode:
authorKaroly Lorentey2005-12-26 03:16:59 +0000
committerKaroly Lorentey2005-12-26 03:16:59 +0000
commitfeba0cd6405ebb80af743e2f978442d9c837bcd2 (patch)
tree1cb964aa641bee514d9cda2eafe27a0a97e65ad1 /man
parent30663b475e57197c9896a252e1d4ca31c579fa2b (diff)
parent7a32e81fb608282314e27db21a00138aaa91f29a (diff)
downloademacs-feba0cd6405ebb80af743e2f978442d9c837bcd2.tar.gz
emacs-feba0cd6405ebb80af743e2f978442d9c837bcd2.zip
Merged from miles@gnu.org--gnu-2005 (patch 677)
Patches applied: * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-677 Update from CVS git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-463
Diffstat (limited to 'man')
-rw-r--r--man/ChangeLog52
-rw-r--r--man/custom.texi34
-rw-r--r--man/faq.texi16
-rw-r--r--man/files.texi41
-rw-r--r--man/frames.texi2
-rw-r--r--man/help.texi6
-rw-r--r--man/org.texi196
-rw-r--r--man/programs.texi396
8 files changed, 418 insertions, 325 deletions
diff --git a/man/ChangeLog b/man/ChangeLog
index 490b4f5420e..2c68beb84a3 100644
--- a/man/ChangeLog
+++ b/man/ChangeLog
@@ -1,4 +1,44 @@
12005-12-12 Katsumi Yamaoka <yamaoka@jpl.org> 12005-12-20 Juri Linkov <juri@jurta.org>
2
3 * files.texi (VC Status): Put P and N near p and n.
4
52005-12-20 Carsten Dominik <dominik@science.uva.nl>
6
7 * org.texi: (Tags): Boolean logic documented.
8 (Agenda Views): Document custom commands.
9
102005-12-20 David Kastrup <dak@gnu.org>
11
12 * faq.texi (AUCTeX): Update version and mailing list info.
13
142005-12-19 Richard M. Stallman <rms@gnu.org>
15
16 * programs.texi (Electric C): Delete the info about newline control.
17 (Other C Commands): Minor cleanup.
18 (Left Margin Paren): Minor cleanup.
19
202005-12-19 Luc Teirlinck <teirllm@auburn.edu>
21
22 * custom.texi (Easy Customization): Add "Browsing Custom" to menu.
23 (Customization Groups): Delete text moved to "Browsing Custom".
24 (Browsing Custom): New node.
25 (Specific Customization): Clarify which commands only work for
26 loaded options.
27
282005-12-18 Bill Wohler <wohler@newt.com>
29
30 * frames.texi (Tool Bars): Shorten text of previous change.
31
322005-12-18 Aaron S. Hawley <Aaron.Hawley@uvm.edu>
33
34 * files.texi (VC Status): Document log-view mode.
35
362005-12-18 Bill Wohler <wohler@newt.com>
37
38 * frames.texi (Tool Bars): Mention that you can turn off tool bars
39 permanently via the customize interface.
40
412005-12-17 Katsumi Yamaoka <yamaoka@jpl.org>
2 42
3 * gnus.texi (MIME Commands): Mention addition of 43 * gnus.texi (MIME Commands): Mention addition of
4 multipart/alternative to gnus-buttonized-mime-types and add xref 44 multipart/alternative to gnus-buttonized-mime-types and add xref
@@ -10,7 +50,7 @@
10 50
112005-12-16 Carsten Dominik <dominik@science.uva.nl> 512005-12-16 Carsten Dominik <dominik@science.uva.nl>
12 52
13 * org.texi: (Tags): New section. 53 * org.texi (Tags): New section.
14 (Agenda Views): Chapter reorganized. 54 (Agenda Views): Chapter reorganized.
15 55
162005-12-16 Ralf Angeli <angeli@iwi.uni-sb.de> 562005-12-16 Ralf Angeli <angeli@iwi.uni-sb.de>
@@ -43,7 +83,7 @@
43 83
442005-12-12 Carsten Dominik <dominik@science.uva.nl> 842005-12-12 Carsten Dominik <dominik@science.uva.nl>
45 85
46 * org.texi: (Progress Logging): New section. 86 * org.texi (Progress Logging): New section.
47 87
482005-12-12 Richard M. Stallman <rms@gnu.org> 882005-12-12 Richard M. Stallman <rms@gnu.org>
49 89
@@ -355,7 +395,7 @@
355 * help.texi (Help Echo): By default, help echos are only shown on 395 * help.texi (Help Echo): By default, help echos are only shown on
356 mouse-over, not on point-over. 396 mouse-over, not on point-over.
357 397
3582005-11-04 J,bi(Br,bt(Bme Marant <jerome@marant.org> 3982005-11-04 J,Ai(Br,At(Bme Marant <jerome@marant.org>
359 399
360 * misc.texi (Shell Mode): Describe how to activate password echoing. 400 * misc.texi (Shell Mode): Describe how to activate password echoing.
361 401
@@ -4158,7 +4198,7 @@
4158 (../info/ses, ses.dvi): New targets. 4198 (../info/ses, ses.dvi): New targets.
4159 * ses.texi: New file. 4199 * ses.texi: New file.
4160 4200
41612002-09-06 Pavel Jan,Bm(Bk <Pavel@Janik.cz> 42012002-09-06 Pavel Jan,Am(Bk <Pavel@Janik.cz>
4162 4202
4163 * texinfo.tex: Update to texinfo 4.2. 4203 * texinfo.tex: Update to texinfo 4.2.
4164 4204
@@ -4166,7 +4206,7 @@
4166 4206
4167 * reftex.texi: Update to RefTeX 4.19. 4207 * reftex.texi: Update to RefTeX 4.19.
4168 4208
41692002-06-17 Kai Gro,b_(Bjohann <Kai.Grossjohann@CS.Uni-Dortmund.DE> 42092002-06-17 Kai Gro,A_(Bjohann <Kai.Grossjohann@CS.Uni-Dortmund.DE>
4170 4210
4171 * Makefile.in (INFO_TARGETS, DVI_TARGETS): Add Tramp. 4211 * Makefile.in (INFO_TARGETS, DVI_TARGETS): Add Tramp.
4172 (../info/tramp, tramp.dvi): New targets. 4212 (../info/tramp, tramp.dvi): New targets.
diff --git a/man/custom.texi b/man/custom.texi
index 7750efb04ad..c1442ca2f3c 100644
--- a/man/custom.texi
+++ b/man/custom.texi
@@ -206,6 +206,7 @@ the active fields and other features.
206 206
207@menu 207@menu
208* Groups: Customization Groups. How options are classified in a structure. 208* Groups: Customization Groups. How options are classified in a structure.
209* Browsing: Browsing Custom. Browsing and searching for options and faces.
209* Changing a Variable:: How to edit a value and set an option. 210* Changing a Variable:: How to edit a value and set an option.
210* Saving Customizations:: Specifying the file for saving customizations. 211* Saving Customizations:: Specifying the file for saving customizations.
211* Face Customization:: How to edit the attributes of a face. 212* Face Customization:: How to edit the attributes of a face.
@@ -275,9 +276,13 @@ Then you can use the customization buffer to set the options
275pertaining to that feature. You can also go straight to a particular 276pertaining to that feature. You can also go straight to a particular
276group by name, using the command @kbd{M-x customize-group}. 277group by name, using the command @kbd{M-x customize-group}.
277 278
279@node Browsing Custom
280@subsection Browsing and Searching for Options and Faces
278@findex customize-browse 281@findex customize-browse
279 You can view the structure of customization groups on a larger scale 282You can use @kbd{M-x customize} to browse the groups and options, but
280with @kbd{M-x customize-browse}. This command creates a special kind of 283often @kbd{M-x customize-browse} is a more efficient alternative.
284That is because it lets you view the structure of customization groups
285on a larger scale. This command creates a special kind of
281customization buffer which shows only the names of the groups (and 286customization buffer which shows only the names of the groups (and
282variables and faces), and their structure. 287variables and faces), and their structure.
283 288
@@ -291,6 +296,13 @@ that active field creates an ordinary customization buffer showing just
291that group and its contents, just that variable, or just that face. 296that group and its contents, just that variable, or just that face.
292This is the way to set values in it. 297This is the way to set values in it.
293 298
299 If you can guess part of the name of the options you are interested
300in, then sometimes @kbd{M-x customize-apropos} can be another useful
301way to search for options. However, unlike @code{customize} and
302@code{customize-browse}, @code{customize-apropos} can only find
303options that are loaded in the current Emacs session. @xref{Specific
304Customization,, Customizing Specific Items}.
305
294@node Changing a Variable 306@node Changing a Variable
295@subsection Changing a Variable 307@subsection Changing a Variable
296 308
@@ -627,7 +639,9 @@ buffer, and you know its name, you can use the command @kbd{M-x
627customize-variable} and specify the variable name. This sets up the 639customize-variable} and specify the variable name. This sets up the
628customization buffer with just one variable---the one that you asked 640customization buffer with just one variable---the one that you asked
629for. Editing, setting and saving the value work as described above, 641for. Editing, setting and saving the value work as described above,
630but only for the specified variable. 642but only for the specified variable. Minibuffer completion is very
643handy if you only know part of the name. However, it only finds
644options that have been loaded in the current Emacs session.
631 645
632@findex customize-face 646@findex customize-face
633 Likewise, you can modify a specific face, chosen by name, using 647 Likewise, you can modify a specific face, chosen by name, using
@@ -638,15 +652,16 @@ on the character after point.
638 You can also set up the customization buffer with a specific group, 652 You can also set up the customization buffer with a specific group,
639using @kbd{M-x customize-group}. The immediate contents of the chosen 653using @kbd{M-x customize-group}. The immediate contents of the chosen
640group, including user options, faces, and other groups, all appear 654group, including user options, faces, and other groups, all appear
641as well. However, these subgroups' own contents are not included. 655as well (even if not already loaded). However, the subgroups' own
656contents are not included.
642 657
643@findex customize-apropos 658@findex customize-apropos
644 To control more precisely what to customize, you can use @kbd{M-x 659 To control more precisely what to customize, you can use @kbd{M-x
645customize-apropos}. You specify a regular expression as argument; then 660customize-apropos}. You specify a regular expression as argument; then
646all options, faces and groups whose names match this regular expression 661all @emph{loaded} options, faces and groups whose names match this
647are set up in the customization buffer. If you specify an empty regular 662regular expression are set up in the customization buffer. If you
648expression, this includes @emph{all} groups, options and faces (but 663specify an empty regular expression, this includes @emph{all} groups,
649that takes a long time). 664options and faces (but that takes a long time).
650 665
651@findex customize-changed-options 666@findex customize-changed-options
652 When you upgrade to a new Emacs version, you might want to customize 667 When you upgrade to a new Emacs version, you might want to customize
@@ -654,7 +669,8 @@ new options and options whose meanings or default values have changed.
654To do this, use @kbd{M-x customize-changed-options} and specify a 669To do this, use @kbd{M-x customize-changed-options} and specify a
655previous Emacs version number using the minibuffer. It creates a 670previous Emacs version number using the minibuffer. It creates a
656customization buffer which shows all the options (and groups) whose 671customization buffer which shows all the options (and groups) whose
657definitions have been changed since the specified version. 672definitions have been changed since the specified version. (Not just
673those that are already loaded.)
658 674
659@findex customize-saved 675@findex customize-saved
660@findex customize-customized 676@findex customize-customized
diff --git a/man/faq.texi b/man/faq.texi
index b7f8311f58f..36564482cc7 100644
--- a/man/faq.texi
+++ b/man/faq.texi
@@ -3844,10 +3844,12 @@ better than the one distributed with Emacs:
3844AUC@TeX{} is a set of sophisticated major modes for @TeX{}, LaTeX, 3844AUC@TeX{} is a set of sophisticated major modes for @TeX{}, LaTeX,
3845ConTeXt, and Texinfo offering context-sensitive syntax highlighting, 3845ConTeXt, and Texinfo offering context-sensitive syntax highlighting,
3846indentation, formatting and folding, macro completion, @TeX{} shell 3846indentation, formatting and folding, macro completion, @TeX{} shell
3847functionality, and debugging. Some important supplemental packages are 3847functionality, and debugging. Be also sure to check out
3848described in @ref{Introduction, RefTeX, Introduction, reftex, Ref@TeX{} 3848@ref{Introduction, RefTeX, Introduction, reftex, Ref@TeX{} User Manual}.
3849User Manual}, and 3849Current versions of AUC@TeX{} include the
3850@uref{http://preview-latex.sourceforge.net,preview-latex}. 3850@uref{http://www.gnu.org/software/auctex/preview-latex,preview-latex}
3851package for WYSIWYG previews of various LaTeX constructs in the Emacs
3852source buffer.
3851 3853
3852@table @b 3854@table @b
3853 3855
@@ -3859,7 +3861,7 @@ User Manual}, and
3859@email{dak@@gnu.org, David Kastrup} 3861@email{dak@@gnu.org, David Kastrup}
3860 3862
3861@item Latest version 3863@item Latest version
386211.54 386411.82
3863 3865
3864@item Distribution 3866@item Distribution
3865@uref{ftp://ftp.gnu.org/pub/gnu/auctex/} 3867@uref{ftp://ftp.gnu.org/pub/gnu/auctex/}
@@ -3868,8 +3870,8 @@ User Manual}, and
3868@uref{http://www.gnu.org/software/auctex/} 3870@uref{http://www.gnu.org/software/auctex/}
3869 3871
3870@item Mailing list: 3872@item Mailing list:
3871Subscription requests to @email{auc-tex-subscribe@@sunsite.dk}@* 3873Subscription requests to @email{auctex-request@@gnu.org}@*
3872Submissions to @email{auc-tex@@sunsite.dk} 3874Submissions to @email{auctex@@gnu.org}
3873 3875
3874@end table 3876@end table
3875 3877
diff --git a/man/files.texi b/man/files.texi
index 860b346f91b..d599e576e94 100644
--- a/man/files.texi
+++ b/man/files.texi
@@ -1788,7 +1788,46 @@ Display version control state and change history.
1788 To view the detailed version control status and history of a file, 1788 To view the detailed version control status and history of a file,
1789type @kbd{C-x v l} (@code{vc-print-log}). It displays the history of 1789type @kbd{C-x v l} (@code{vc-print-log}). It displays the history of
1790changes to the current file, including the text of the log entries. The 1790changes to the current file, including the text of the log entries. The
1791output appears in a separate window. 1791output appears in a separate window. The point is centered at the
1792revision of the file that is currently being visited.
1793
1794From the change log buffer, the following keys are used to move
1795between the logs of revisions and files, to view past revisions, and
1796to view diffs:
1797
1798@table @kbd
1799@item p
1800Move to the previous revision-item in the buffer. (Revision entries in the log
1801buffer are usually in reverse-chronological order, so the previous
1802revision-item usually corresponds to a newer revision.) A numeric
1803prefix argument is a repeat count.
1804
1805@item n
1806Move to the next revision-item (which most often corresponds to the
1807previous revision of the file). A numeric prefix argument is a repeat
1808count.
1809
1810@item P
1811Move to the log of the previous file, when the logs of multiple files
1812are in the log buffer (@pxref{VC Dired Mode}). Otherwise, just move
1813to the beginning of the log. A numeric prefix argument is a repeat
1814count, so @kbd{C-u 10 P} would move backward 10 files.
1815
1816@item N
1817Move to the log of the next file, when the logs of multiple files are
1818in the log buffer (@pxref{VC Dired Mode}). It also takes a numeric
1819prefix argument as a repeat count.
1820
1821@item f
1822Visit the revision indicated at the current line, like typing @kbd{C-x
1823v ~} and specifying this revision's number (@pxref{Old Versions}).
1824
1825@item d
1826Display the diff (@pxref{Comparing Files}) between the revision
1827indicated at the current line and the next earlier revision. This is
1828useful to see what actually changed when the revision indicated on the
1829current line was committed.
1830@end table
1792 1831
1793@node VC Undo 1832@node VC Undo
1794@subsubsection Undoing Version Control Actions 1833@subsubsection Undoing Version Control Actions
diff --git a/man/frames.texi b/man/frames.texi
index daaa9599bf7..9d24f5ca90e 100644
--- a/man/frames.texi
+++ b/man/frames.texi
@@ -963,7 +963,7 @@ XPM icons if Emacs was built with XPM support. Otherwise, the tool
963bar uses monochrome icons (PBM or XBM format). 963bar uses monochrome icons (PBM or XBM format).
964 964
965 You can turn display of tool bars on or off with @kbd{M-x 965 You can turn display of tool bars on or off with @kbd{M-x
966tool-bar-mode}. 966tool-bar-mode} or by customizing the option @code{tool-bar-mode}.
967 967
968@node Dialog Boxes 968@node Dialog Boxes
969@section Using Dialog Boxes 969@section Using Dialog Boxes
diff --git a/man/help.texi b/man/help.texi
index 313a002dc28..747f51aaaa7 100644
--- a/man/help.texi
+++ b/man/help.texi
@@ -47,7 +47,7 @@ manual index, then finally look in the FAQ and the package keywords.
47@item C-h a @var{topics} @key{RET} 47@item C-h a @var{topics} @key{RET}
48This searches for commands whose names match @var{topics}, which 48This searches for commands whose names match @var{topics}, which
49should be a keyword, a list of keywords, or a regular expression 49should be a keyword, a list of keywords, or a regular expression
50(@pxref{Regexps}). This command displays a the matches in a new 50(@pxref{Regexps}). This command displays all the matches in a new
51buffer. @xref{Apropos}. 51buffer. @xref{Apropos}.
52 52
53@item C-h i d m emacs @key{RET} i @var{topic} @key{RET} 53@item C-h i d m emacs @key{RET} i @var{topic} @key{RET}
@@ -336,7 +336,7 @@ view, describe, default.
336@end quotation 336@end quotation
337 337
338@findex apropos 338@findex apropos
339 To list all Lisp symbols that contain a match an Apropos pattern, 339 To list all Lisp symbols that contain a match for an Apropos pattern,
340not just the ones that are defined as commands, use the command 340not just the ones that are defined as commands, use the command
341@kbd{M-x apropos} instead of @kbd{C-h a}. This command does not check 341@kbd{M-x apropos} instead of @kbd{C-h a}. This command does not check
342key bindings by default; specify a numeric argument if you want it to 342key bindings by default; specify a numeric argument if you want it to
@@ -374,7 +374,7 @@ most relevant ones first.
374 By default, Apropos lists the search results for 374 By default, Apropos lists the search results for
375@code{apropos-documentation} in order of relevance of the match. If 375@code{apropos-documentation} in order of relevance of the match. If
376the variable @code{apropos-documentation-sort-by-scores} is 376the variable @code{apropos-documentation-sort-by-scores} is
377@code{nil}, Apropos lists the symbosl found in alphabetical order. 377@code{nil}, Apropos lists the symbols found in alphabetical order.
378 378
379@node Library Keywords 379@node Library Keywords
380@section Keyword Search for Lisp Libraries 380@section Keyword Search for Lisp Libraries
diff --git a/man/org.texi b/man/org.texi
index 0477077d91f..5056119b3b2 100644
--- a/man/org.texi
+++ b/man/org.texi
@@ -4,7 +4,7 @@
4@setfilename ../info/org 4@setfilename ../info/org
5@settitle Org Mode Manual 5@settitle Org Mode Manual
6 6
7@set VERSION 4.00 7@set VERSION 4.01
8@set DATE December 2005 8@set DATE December 2005
9 9
10@dircategory Emacs 10@dircategory Emacs
@@ -229,7 +229,7 @@ ways, for example
229 229
230@example 230@example
231@r{@bullet{} as an outline extension with visibility cycling and structure editing} 231@r{@bullet{} as an outline extension with visibility cycling and structure editing}
232@r{@bullet{} as an ASCII system and table editor to take structured notes} 232@r{@bullet{} as an ASCII system and table editor for taking structured notes}
233@r{@bullet{} as an ASCII table editor with spreadsheet-like capabilities} 233@r{@bullet{} as an ASCII table editor with spreadsheet-like capabilities}
234@r{@bullet{} as a simple hypertext system, with HTML export} 234@r{@bullet{} as a simple hypertext system, with HTML export}
235@r{@bullet{} as a TODO list editor} 235@r{@bullet{} as a TODO list editor}
@@ -532,7 +532,7 @@ functionality.
532@node Archiving, Sparse trees, Structure editing, Document Structure 532@node Archiving, Sparse trees, Structure editing, Document Structure
533@section Archiving 533@section Archiving
534@cindex archiving 534@cindex archiving
535@cindex filing subtries 535@cindex filing subtrees
536 536
537When a project represented by a (sub)tree is finished, you may want 537When a project represented by a (sub)tree is finished, you may want
538to move the tree to an archive place, either in the same file under a 538to move the tree to an archive place, either in the same file under a
@@ -618,12 +618,24 @@ well. For example, in the list
618 618
619@example 619@example
620* Meeting with the French group :WORK: 620* Meeting with the French group :WORK:
621** Summary by Frank :BOSS: 621** Summary by Frank :BOSS:NOTES:
622*** TODO Prepare slides for him :ACTION: 622*** TODO Prepare slides for him :ACTION:
623@end example 623@end example
624@noindent 624@noindent
625the final heading will have the tags @samp{:WORK:}, @samp{:BOSS:}, and 625the final heading will have the tags @samp{:WORK:}, @samp{:BOSS:},
626@samp{:ACTION:}. 626@samp{:NOTES:}, and @samp{:ACTION:}. When executing tag searches and
627Org-mode finds that a certain headline matches the search criterion,
628it will not check any sublevel headline, assuming that these likely
629also match, and that the list of matches can become very long. You
630can influence inheritance and searching using the variables
631@code{org-use-tag-inheritance} and
632@code{org-tags-match-list-sublevels}.
633
634@kindex M-@key{TAB}
635Tags can simply be typed into the buffer. After a colon,
636@kbd{M-@key{TAB}} offers completion on all tags being used in the
637current buffer. There are also special commands for inserting tags,
638and for executing searches based on tags.
627 639
628@table @kbd 640@table @kbd
629@kindex C-c C-c 641@kindex C-c C-c
@@ -631,29 +643,33 @@ the final heading will have the tags @samp{:WORK:}, @samp{:BOSS:}, and
631@cindex completion, of tags 643@cindex completion, of tags
632Enter new tags for the current headline. The minibuffer will prompt 644Enter new tags for the current headline. The minibuffer will prompt
633for a list of tags and offer completion with respect to all other tags 645for a list of tags and offer completion with respect to all other tags
634used in the current buffer. After pressing @key{RET}, the tags will 646used in the current buffer. Several tags, separated by colons, may be
647specified at the prompt. After pressing @key{RET}, the tags will
635be inserted and aligned to @code{org-tags-column}. When called with a 648be inserted and aligned to @code{org-tags-column}. When called with a
636@kbd{C-u} prefix, align all tags in the current buffer to that column, 649@kbd{C-u} prefix, align all tags in the current buffer to that column,
637just to make things look nice. Tags can also be just typed into the 650just to make things look nice. TAGS are automatically realigned after
638buffer, with @kbd{M-@key{TAB}} support. 651promotion, demotion, and TODO state changes (@pxref{TODO basics}).
639@cindex M-@key{TAB}
640@item M-@key{TAB}
641Tags can also be typed directly into the buffer, using
642@kbd{M-@key{TAB}} completion.
643@kindex C-c \ 652@kindex C-c \
644@item C-c \ 653@item C-c \
645Create a sparse tree with all headlines matching a given set of tags. 654Create a sparse tree with all headlines matching a tags search.
646The command prompts for the tags to match. The criterion is just a
647list of tags separated by @samp{+} or @samp{-} for positive and
648negative selection. For example, @samp{+WORK-BOSS} would select all
649headlines that are tagged @samp{:WORK:}, but discard those also tagged
650@samp{:BOSS:}.
651@kindex C-c a m 655@kindex C-c a m
652@item C-c a m 656@item C-c a m
653Create a global list of tag matches from all agenda files. 657Create a global list of tag matches from all agenda files.
654@xref{Matching headline tags}. 658@xref{Matching headline tags}.
655@end table 659@end table
656 660
661A tags search string can use Boolean operators @samp{&} for AND and
662@samp{|} for OR. @samp{&} binds more strongly than
663@samp{|}. Parenthesis are currently no implemented. A tag may also be
664preceded by @samp{-}, to select against it, and @samp{+} is syntactic
665sugar for positive selection. The AND operator @samp{&} is optional
666when @samp{+} or @samp{-} is present. For example, @samp{+WORK-BOSS}
667would select all headlines that are tagged @samp{:WORK:}, but discard
668those also tagged @samp{:BOSS:}. The search string @samp{WORK|LAPTOP}
669selects all lines tagged @samp{:WORK:} or @samp{:LAPTOP:}. The string
670@samp{WORK|LAPTOP&NIGHT} requires that the @samp{:LAPTOP:} lines are
671also tagged @samp{NIGHT}.
672
657@node Plain Lists, , Tags, Document Structure 673@node Plain Lists, , Tags, Document Structure
658@section Plain Lists 674@section Plain Lists
659@cindex plain lists 675@cindex plain lists
@@ -692,7 +708,7 @@ My favorite scenes are (in this order)
692@end example 708@end example
693 709
694Org-mode supports these lists by tuning filling and wrapping commands 710Org-mode supports these lists by tuning filling and wrapping commands
695to correctly deal with them. Futhermore, the following commands act 711to correctly deal with them. Furthermore, the following commands act
696on items when the cursor is in the first line of an item (the line 712on items when the cursor is in the first line of an item (the line
697with the bullet or number). 713with the bullet or number).
698 714
@@ -1322,11 +1338,11 @@ links to other files, Usenet articles, emails and much more.
1322 1338
1323Similar to Wiki implementations, Org-mode interprets words spelled in 1339Similar to Wiki implementations, Org-mode interprets words spelled in
1324CamelCase (i.e. mixed case with at least one capital letter following 1340CamelCase (i.e. mixed case with at least one capital letter following
1325on a small letter inside the word) as links. While in Wiki 1341on a small letter inside the word) as links. While in Wiki these
1326implementations these links usually point to another file, in Org-mode 1342links usually point to another file, in Org-mode they point to a
1327they point to a target in the current file. Targets are CamelCased 1343target in the current file. Targets are CamelCased words in double
1328words in double angular brackets, and may be located anywhere, also in 1344angular brackets, and may be located anywhere, also in a comment line.
1329a comment line. For example 1345For example
1330@example 1346@example
1331# <<MyTarget>> 1347# <<MyTarget>>
1332@end example 1348@end example
@@ -2020,32 +2036,16 @@ Choose date in calendar (only if nothing typed into minibuffer).
2020@chapter Agenda Views 2036@chapter Agenda Views
2021@cindex agenda views 2037@cindex agenda views
2022 2038
2023@ignore 2039Org-mode can select items based of various criteria, and display them
2024We have already described three commands to filter important 2040in a separate buffer. The information to be shown is collected from
2025information in an org file into a sparse tree (@pxref{Sparse trees}): 2041all @emph{agenda files}, the files listed in the variable
2026 2042@code{org-agenda-files}. Thus even if you only work with a single
2027@cindex sparse trees 2043Org-mode file, this file must be put into that list@footnote{When
2028@itemize @bullet 2044using the dispatcher pressing @kbd{1} before selecting a command will
2029@item 2045actually limit the command to the current file, and ignore
2030The TODO tree, (@kbd{C-c C-v}), see @ref{TODO items}. 2046@code{org-agenda-files} until the next dispatcher command.}. You can
2031@item 2047customize @code{org-agenda-files}, but the easiest way to maintain it
2032The occur tree @kbd{C-c /}, see @ref{TODO items}. 2048is through the following commands
2033@item
2034Checking upcoming deadlines with @kbd{C-c C-w}, see @ref{Creating
2035timestamps}.
2036@end itemize
2037@noindent
2038@end ignore
2039
2040Org-mode can collect and sort selected items into a separate buffer.
2041The information to be listed is collected from all @emph{agenda
2042files}, the files listed in the variable @code{org-agenda-files}.
2043Thus even if you only work with a single Org-mode file, this file must
2044be put into that list@footnote{When using the dispatcher pressing
2045@kbd{1} before selecting a command will actually limit the command to
2046the current file, and ignore @code{org-agenda-files} until the next
2047dispatcher command.}. You can customize this variable, but the easiest
2048way to maintain it is through the following commands
2049 2049
2050@cindex files, adding to agenda list 2050@cindex files, adding to agenda list
2051@table @kbd 2051@table @kbd
@@ -2084,11 +2084,21 @@ buffer}. This buffer is read-only, but provides commands to visit the
2084corresponding locations in the original Org-mode files, and even to 2084corresponding locations in the original Org-mode files, and even to
2085edit these files remotely. 2085edit these files remotely.
2086 2086
2087@cindex custom agenda commands
2088@cindex agenda commands, custom
2087The views are created through a dispatcher that should be bound to a 2089The views are created through a dispatcher that should be bound to a
2088global key, for example @kbd{C-c a} (@pxref{Installation and 2090global key, for example @kbd{C-c a} (@pxref{Installation and
2089Activation}). In the following we will assume that @kbd{C-c a} is 2091Activation}). In the following we will assume that @kbd{C-c a} is
2090indeed how the dispatcher is accessed and list keyboard access to 2092indeed how the dispatcher is accessed and list keyboard access to
2091commands accordingly. 2093commands accordingly. The dispatcher offers a number of default
2094commands, for example to create a TODO list or a the calendar-like
2095agenda. You can also define a number of custom searches for tags and
2096specific TODO keywords through the variable
2097@code{org-agenda-custom-commands}.
2098@kindex C-c a C
2099These commands will be offered by the dispatcher just like the default
2100commands. If you press @kbd{C-c a C}, you will get a customization
2101buffer for this variable.
2092 2102
2093@menu 2103@menu
2094* Agenda:: Your weekly planner 2104* Agenda:: Your weekly planner
@@ -2230,7 +2240,7 @@ a prefix argument to this command to change the selected TODO keyword,
2230for example @kbd{3 r}. 2240for example @kbd{3 r}.
2231@end table 2241@end table
2232 2242
2233Remote editing of TDOD items means that you can change the state of a 2243Remote editing of TODO items means that you can change the state of a
2234TODO entry with a single key press. The commands available in the 2244TODO entry with a single key press. The commands available in the
2235TODO list are described in @ref{Agenda commands}. 2245TODO list are described in @ref{Agenda commands}.
2236 2246
@@ -2241,15 +2251,15 @@ TODO list are described in @ref{Agenda commands}.
2241 2251
2242If headlines in the agenda files are marked with @emph{tags} 2252If headlines in the agenda files are marked with @emph{tags}
2243(@pxref{Tags}), you can select headlines based on the tags that apply 2253(@pxref{Tags}), you can select headlines based on the tags that apply
2244to them and collect them into an ageenda buffer. 2254to them and collect them into an agenda buffer.
2245 2255
2246@table @kbd 2256@table @kbd
2247@kindex C-c a m 2257@kindex C-c a m
2248@item C-c a m 2258@item C-c a m
2249Produce a list of all headlines that match a given set of tags. The 2259Produce a list of all headlines that match a given set of tags. The
2250command prompts for a selection criterion, which is a simple list of 2260command prompts for a selection criterion, which is a boolean logic
2251TAGS with positive and negative selection, like 2261expression with tags, like @samp{+WORK+URGENT-WITHBOSS} or
2252@samp{+WORK+URGENT-WITHBOSS}. 2262@samp{WORK|HOME} (@pxref{Tags}).
2253@kindex C-c a M 2263@kindex C-c a M
2254@item C-c a M 2264@item C-c a M
2255Like @kbd{C-c a m}, but only select headlines that are also TODO 2265Like @kbd{C-c a m}, but only select headlines that are also TODO
@@ -2396,6 +2406,10 @@ Digit argument.
2396Change the TODO state of the item, both in the agenda and in the 2406Change the TODO state of the item, both in the agenda and in the
2397original org file. 2407original org file.
2398 2408
2409@kindex :
2410@item :
2411Set tags for the current headline.
2412
2399@kindex , 2413@kindex ,
2400@item , 2414@item ,
2401Set the priority for the current item. Org-mode prompts for the 2415Set the priority for the current item. Org-mode prompts for the
@@ -2900,7 +2914,7 @@ After @samp{\}, complete @TeX{} symbols supported by the exporter.
2900After @samp{*}, complete CamelCase versions of all headlines in the 2914After @samp{*}, complete CamelCase versions of all headlines in the
2901buffer. 2915buffer.
2902@item 2916@item
2903After @samp{:}, complete tags used elswhere in the buffer. 2917After @samp{:}, complete tags used elsewhere in the buffer.
2904@item 2918@item
2905After @samp{#+}, complete the special keywords like @samp{TYP_TODO} or 2919After @samp{#+}, complete the special keywords like @samp{TYP_TODO} or
2906@samp{OPTIONS} which set file-specific options for Org-mode. When the 2920@samp{OPTIONS} which set file-specific options for Org-mode. When the
@@ -2917,11 +2931,11 @@ Elsewhere, complete dictionary words using ispell.
2917@cindex options, for customization 2931@cindex options, for customization
2918@cindex variables, for customization 2932@cindex variables, for customization
2919 2933
2920There is a large number of variables which can be used to customize 2934There are more than 100 variables that can be used to customize
2921Org-mode. For the sake of compactness of the manual, we are not 2935Org-mode. For the sake of compactness of the manual, we are not
2922describing the variables here. For an overview of customization 2936describing the variables here. A structured overview of customization
2923variables, use @kbd{M-x org-customize}. Or select @code{Browse Org 2937variables is available with @kbd{M-x org-customize}. Or select
2924Group} from the @code{Org->Customization} menu. 2938@code{Browse Org Group} from the @code{Org->Customization} menu.
2925 2939
2926@node FAQ, Interaction, Customization, Miscellaneous 2940@node FAQ, Interaction, Customization, Miscellaneous
2927@section Frequently asked questions 2941@section Frequently asked questions
@@ -3167,59 +3181,63 @@ The exporters work well, but could be made more efficient.
3167 3181
3168Org-mode was written by Carsten Dominik, who still maintains it at the 3182Org-mode was written by Carsten Dominik, who still maintains it at the
3169Org-mode homepage @uref{http://www.astro.uva.nl/~dominik/Tools/org/}. 3183Org-mode homepage @uref{http://www.astro.uva.nl/~dominik/Tools/org/}.
3170The following people have helped the development along with ideas, 3184The following people (in alphabetic order) have helped the development
3171suggestions and patches. 3185along with ideas, suggestions and patches. Many thanks to all of you,
3186Org-mode would not be what it is without your input.
3172 3187
3173@itemize @bullet 3188@itemize @bullet
3174@item 3189@item
3175Matthias Rempe (Oelde) provided ideas, a patch introducing Windows 3190Pavel Chalmoviansky reported bugs and suggested improvements
3176NT/2000 support, and quality control. 3191related to the agenda treatment of items with specified time.
3177@item
3178Kevin Rogers contributed code to access VM files on remote hosts.
3179@item 3192@item
3180Juergen Vollmer contributed code generating the table of contents 3193Sacha Chua, the current maintainer of Planner, suggested to copy
3181in HTML output, and other export improvements. 3194linking code from Planner (I took code for RMAIL and Wanderlust).
3182@item 3195@item
3183Christian Egli converted the documentation into TeXInfo format and 3196Christian Egli converted the documentation into TeXInfo format and
3184patched basic CSS formatting support into the HTML exporter. He also 3197patched basic CSS formatting support into the HTML exporter. He also
3185inspired the agenda by showing me his plans for a multifile summary. 3198inspired the agenda by showing me his plans for a multifile summary.
3186@item 3199@item
3200Kai Grossjohann pointed out that a number of key bindings in Org-mode
3201conflict with other packages.
3202@item
3203Stefan Monnier provided a patch with lots of little fixes to keep the
3204Emacs-Lisp compiler happy.
3205@item
3206Tim O'Callaghan suggested in-file links, search options for
3207general file links, and TAGS.
3208@item
3209Oliver Oppitz made useful suggestions.
3210@item
3211Pete Phillips helped the development of the TAGS feature with beta
3212testing and suggestions.
3213@item
3214Matthias Rempe (Oelde) provided ideas, a patch introducing Windows
3215NT/2000 support, and quality control.
3216@item
3217Kevin Rogers contributed code to access VM files on remote hosts.
3218@item
3187Philip Rooke created the Org-mode reference card. He also helped with 3219Philip Rooke created the Org-mode reference card. He also helped with
3188beta testing and contributed a number of very useful ideas. 3220beta testing and contributed a number of very useful ideas.
3189@item 3221@item
3190Christian Schlauer proposed angular brackets around links, among other 3222Christian Schlauer proposed angular brackets around links, among other
3191things. 3223things.
3192@item 3224@item
3193David Wainberg suggested to implement an archiving mechanism and helped
3194testing.
3195@item
3196Linking to VM/BBDB/GNUS was inspired by Tom Shannon's 3225Linking to VM/BBDB/GNUS was inspired by Tom Shannon's
3197@file{organizer-mode.el}. 3226@file{organizer-mode.el}.
3198@item 3227@item
3199Scheduling TODO items was inspired by John Wiegley's @file{planner.el}. 3228Juergen Vollmer contributed code generating the table of contents
3229in HTML output, and other export improvements.
3200@item 3230@item
3201Sacha Chua, the current maintainer of Planner, suggested to copy 3231David Wainberg suggested to implement an archiving mechanism and helped
3202linking code from Planner (I took code for RMAIL and Wanderlust). 3232testing.
3203@item 3233@item
3204Oliver Oppitz made useful suggestions. 3234Scheduling TODO items was inspired by John Wiegley's @file{planner.el}.
3205@item 3235@item
3206Carsten Wimmer suggested some changes and helped fix a bug in linking 3236Carsten Wimmer suggested some changes and helped fix a bug in linking
3207to GNUS. 3237to GNUS.
3208@item
3209Pavel Chalmoviansky reported bugs and suggested improvements related
3210to the agenda treatment of items with specified time.
3211@item
3212Stefan Monnier provided a patch with lots of little fixes to keep the
3213Emacs-Lisp compiler happy.
3214@item
3215Kai Grossjohann pointed out that a number of key bindings in Org-mode
3216conflict with other packages.
3217@item 3238@item
3218Roland Winkler pointed out that additional keybindings are needed to 3239Roland Winkler pointed out that additional keybindings are needed to
3219use Org-mode on a tty. 3240use Org-mode on a tty.
3220@item
3221Tim O'Callaghan suggested in-file links, search options for
3222general file links, and TAGS.
3223@c @item 3241@c @item
3224@c Nic Ferrier and Christian Egli implemented XML export. 3242@c Nic Ferrier and Christian Egli implemented XML export.
3225@end itemize 3243@end itemize
diff --git a/man/programs.texi b/man/programs.texi
index 6444a3a6a47..e1806488150 100644
--- a/man/programs.texi
+++ b/man/programs.texi
@@ -128,17 +128,19 @@ place to set up customizations for that major mode. @xref{Hooks}.
128@node Defuns 128@node Defuns
129@section Top-Level Definitions, or Defuns 129@section Top-Level Definitions, or Defuns
130 130
131 In Emacs, a major definition at the top level in the buffer is 131 In Emacs, a major definition at the top level in the buffer,
132called a @dfn{defun}. The name comes from Lisp, but in Emacs we use 132something like a function, is called a @dfn{defun}. The name comes
133it for all languages. 133from Lisp, but in Emacs we use it for all languages.
134 134
135 In most programming language modes, Emacs assumes that a defun is 135 In many programming language modes, Emacs assumes that a defun is
136any pair of parentheses (or braces, if the language uses braces this 136any pair of parentheses (or braces, if the language uses braces this
137way) that starts at the left margin. For example, in C, the body of a 137way) that starts at the left margin. For example, in C, the body of a
138function definition is normally a defun, because the open-brace that 138function definition is a defun, usually recognized as an open-brace
139begins it is normally at the left margin. A variable's initializer 139that begins at the left margin@footnote{Alternatively, you can set up
140can also count as a defun, if the open-brace that begins the 140C Mode to recognize a defun at an opening brace at the outermost
141initializer is at the left margin. 141level. @xref{Movement Commands,,, ccmode, the CC Mode Manual}.}. A
142variable's initializer can also count as a defun, if the open-brace
143that begins the initializer is at the left margin.
142 144
143 However, some language modes provide their own code for recognizing 145 However, some language modes provide their own code for recognizing
144defuns in a way that suits the language syntax and conventions better. 146defuns in a way that suits the language syntax and conventions better.
@@ -156,14 +158,24 @@ defuns in a way that suits the language syntax and conventions better.
156 158
157@cindex open-parenthesis in leftmost column 159@cindex open-parenthesis in leftmost column
158@cindex ( in leftmost column 160@cindex ( in leftmost column
159 In most major modes, Emacs assumes that any opening delimiter found 161 Emacs assumes by default that any opening delimiter found at the
160at the left margin is the start of a top-level definition, or defun. 162left margin is the start of a top-level definition, or defun. You can
161Therefore, @strong{never put an opening delimiter at the left margin 163override this default by setting this user option:
162unless it should have that significance.} For instance, never put an 164
165@defvar open-paren-in-column-0-is-defun-start
166If this user option is set to @code{t} (the default), opening
167parentheses or braces at column zero always start defuns. When it's
168@code{nil}, defuns are found by searching for parens or braces at the
169outermost level. Some major modes, including C and related modes, set
170@code{open-paren-in-column-0-is-defun-start} buffer-locally to
171@code{nil}
172@end defvar
173
174 In modes where @code{open-paren-in-column-0-is-defun-start} is
175@code{t}, @strong{don't put an opening delimiter at the left margin
176unless it is a defun start}. For instance, never put an
163open-parenthesis at the left margin in a Lisp file unless it is the 177open-parenthesis at the left margin in a Lisp file unless it is the
164start of a top-level list. Never put an open-brace or other opening 178start of a top-level list.
165delimiter at the beginning of a line of C code unless it is at top
166level.
167 179
168 If you don't follow this convention, not only will you have trouble 180 If you don't follow this convention, not only will you have trouble
169when you explicitly use the commands for motion by defuns; other 181when you explicitly use the commands for motion by defuns; other
@@ -173,10 +185,10 @@ mode (@pxref{Font Lock}).
173 185
174 The most likely problem case is when you want an opening delimiter 186 The most likely problem case is when you want an opening delimiter
175at the start of a line inside a string. To avoid trouble, put an 187at the start of a line inside a string. To avoid trouble, put an
176escape character (@samp{\}, in C and Emacs Lisp, @samp{/} in some 188escape character (@samp{\}, in Emacs Lisp, @samp{/} in some other Lisp
177other Lisp dialects) before the opening delimiter. This will not 189dialects) before the opening delimiter. This will not affect the
178affect the contents of the string, but will prevent that opening 190contents of the string, but will prevent that opening delimiter from
179delimiter from starting a defun. Here's an example: 191starting a defun. Here's an example:
180 192
181@example 193@example
182 (insert "Foo: 194 (insert "Foo:
@@ -195,8 +207,9 @@ the beginning of the buffer, even for a small function. To speed up
195the operation, we changed Emacs to assume that any opening delimiter 207the operation, we changed Emacs to assume that any opening delimiter
196at the left margin is the start of a defun. This heuristic is nearly 208at the left margin is the start of a defun. This heuristic is nearly
197always right, and avoids the need to scan back to the beginning of the 209always right, and avoids the need to scan back to the beginning of the
198buffer. However, it mandates following the convention described 210buffer. However, now that modern computers are so powerful, this
199above. 211scanning is rarely slow enough to annoy, so we've provided a way to
212disable the heuristic.
200 213
201@node Moving by Defuns 214@node Moving by Defuns
202@subsection Moving by Defuns 215@subsection Moving by Defuns
@@ -399,13 +412,14 @@ behavior is convenient in cases where you have overridden the standard
399result of @key{TAB} because you find it unaesthetic for a particular 412result of @key{TAB} because you find it unaesthetic for a particular
400line. 413line.
401 414
402 Remember that an open-parenthesis, open-brace or other opening delimiter 415 By default, an open-parenthesis, open-brace or other opening
403at the left margin is assumed by Emacs (including the indentation routines) 416delimiter at the left margin is assumed by Emacs (including the
404to be the start of a function. Therefore, you must never have an opening 417indentation routines) to be the start of a function. This speeds up
405delimiter in column zero that is not the beginning of a function, not even 418indentation commands. If you will be editing text which contains
406inside a string. This restriction is vital for making the indentation 419opening delimiters in column zero that aren't the beginning of a
407commands fast; you must simply accept it. @xref{Left Margin Paren}, 420functions, even inside strings or comments, you must set
408for more information on this. 421@code{open-paren-in-column-0-is-defun-start}. @xref{Left Margin
422Paren}, for more information on this.
409 423
410 Normally, lines are indented with tabs and spaces. If you want Emacs 424 Normally, lines are indented with tabs and spaces. If you want Emacs
411to use spaces only, see @ref{Just Spaces}. 425to use spaces only, see @ref{Just Spaces}.
@@ -560,16 +574,16 @@ onto the indentation of the @dfn{anchor statement}.
560Select a predefined style @var{style} (@code{c-set-style}). 574Select a predefined style @var{style} (@code{c-set-style}).
561@end table 575@end table
562 576
563 A @dfn{style} is a named collection of customizations that can 577 A @dfn{style} is a named collection of customizations that can be
564be used in C mode and the related modes. Emacs comes with several 578used in C mode and the related modes. @ref{Styles,,, ccmode, The CC
579Mode Manual}, for a complete description. Emacs comes with several
565predefined styles, including @code{gnu}, @code{k&r}, @code{bsd}, 580predefined styles, including @code{gnu}, @code{k&r}, @code{bsd},
566@code{stroustrup}, @code{linux}, @code{python}, @code{java}, 581@code{stroustrup}, @code{linux}, @code{python}, @code{java},
567@code{whitesmith}, @code{ellemtel}, @code{cc-mode}, and @code{user}. 582@code{whitesmith}, @code{ellemtel}, and @code{awk}. Some of these
568Some of these styles are primarily intended for one language, but any 583styles are primarily intended for one language, but any of them can be
569of them can be used with any of the languages supported by these 584used with any of the languages supported by these modes. To find out
570modes. To find out what a style looks like, select it and reindent 585what a style looks like, select it and reindent some code, e.g., by
571some code, e.g., by typing @key{C-M-q} at the start of a function 586typing @key{C-M-q} at the start of a function definition.
572definition.
573 587
574@kindex C-c . @r{(C mode)} 588@kindex C-c . @r{(C mode)}
575@findex c-set-style 589@findex c-set-style
@@ -577,8 +591,8 @@ definition.
577.}. Specify a style name as an argument (case is not significant). 591.}. Specify a style name as an argument (case is not significant).
578This command affects the current buffer only, and it affects only 592This command affects the current buffer only, and it affects only
579future invocations of the indentation commands; it does not reindent 593future invocations of the indentation commands; it does not reindent
580the code in the buffer. To reindent the whole buffer in the new 594the code already in the buffer. To reindent the whole buffer in the
581style, you can type @kbd{C-x h C-M-\}. 595new style, you can type @kbd{C-x h C-M-\}.
582 596
583@vindex c-default-style 597@vindex c-default-style
584 You can also set the variable @code{c-default-style} to specify the 598 You can also set the variable @code{c-default-style} to specify the
@@ -589,23 +603,24 @@ example,
589 603
590@example 604@example
591(setq c-default-style 605(setq c-default-style
592 '((java-mode . "java") (other . "gnu"))) 606 '((java-mode . "java") (awk-mode . "awk") (other . "gnu")))
593@end example 607@end example
594 608
595@noindent 609@noindent
596specifies an explicit choice for Java mode, and the default @samp{gnu} 610specifies explicit choices for Java and AWK modes, and the default
597style for the other C-like modes. (These settings are actually the 611@samp{gnu} style for the other C-like modes. (These settings are
598defaults.) This variable takes effect when you select one of the 612actually the defaults.) This variable takes effect when you select
599C-like major modes; thus, if you specify a new default style for Java 613one of the C-like major modes; thus, if you specify a new default
600mode, you can make it take effect in an existing Java mode buffer by 614style for Java mode, you can make it take effect in an existing Java
601typing @kbd{M-x java-mode} there. 615mode buffer by typing @kbd{M-x java-mode} there.
602 616
603 The @code{gnu} style specifies the formatting recommended by the GNU 617 The @code{gnu} style specifies the formatting recommended by the GNU
604Project for C; it is the default, so as to encourage use of our 618Project for C; it is the default, so as to encourage use of our
605recommended style. 619recommended style.
606 620
607 @xref{Customizing Indentation,,, ccmode, the CC Mode Manual}, for 621 @xref{Indentation Engine Basics,,, ccmode, the CC Mode Manual}, and
608more information on customizing indentation for C and related modes, 622@ref{Customizing Indentation,,, ccmode, the CC Mode Manual}, for more
623information on customizing indentation for C and related modes,
609including how to override parts of an existing style and how to define 624including how to override parts of an existing style and how to define
610your own styles. 625your own styles.
611 626
@@ -708,11 +723,12 @@ would move over.
708 A somewhat random-sounding command which is nevertheless handy is 723 A somewhat random-sounding command which is nevertheless handy is
709@kbd{C-M-t} (@code{transpose-sexps}), which drags the previous 724@kbd{C-M-t} (@code{transpose-sexps}), which drags the previous
710balanced expression across the next one. An argument serves as a 725balanced expression across the next one. An argument serves as a
711repeat count, and a negative argument drags the previous balanced 726repeat count, moving the previous expression over that many following
712expression backwards across those before it (thus canceling out the 727ones. A negative argument drags the previous balanced expression
713effect of @kbd{C-M-t} with a positive argument). An argument of zero, 728backwards across those before it (thus canceling out the effect of
714rather than doing nothing, transposes the balanced expressions ending 729@kbd{C-M-t} with a positive argument). An argument of zero, rather
715at or after point and the mark. 730than doing nothing, transposes the balanced expressions ending at or
731after point and the mark.
716 732
717@kindex C-M-@@ 733@kindex C-M-@@
718@kindex C-M-@key{SPC} 734@kindex C-M-@key{SPC}
@@ -722,9 +738,9 @@ use @kbd{C-M-@@} (@code{mark-sexp}), which sets mark at the same place
722that @kbd{C-M-f} would move to. @kbd{C-M-@@} takes arguments like 738that @kbd{C-M-f} would move to. @kbd{C-M-@@} takes arguments like
723@kbd{C-M-f}. In particular, a negative argument is useful for putting 739@kbd{C-M-f}. In particular, a negative argument is useful for putting
724the mark at the beginning of the previous balanced expression. The 740the mark at the beginning of the previous balanced expression. The
725alias @kbd{C-M-@key{SPC}} is equivalent to @kbd{C-M-@@}. If you use 741alias @kbd{C-M-@key{SPC}} is equivalent to @kbd{C-M-@@}. When you
726this command repeatedly, or in Transient Mark mode whenever the mark 742repeat this command, or use it in Transient Mark mode when the mark is
727is active, it extends the region by one sexp each time. 743active, it extends the region by one sexp each time.
728 744
729 In languages that use infix operators, such as C, it is not possible 745 In languages that use infix operators, such as C, it is not possible
730to recognize all balanced expressions as such because there can be 746to recognize all balanced expressions as such because there can be
@@ -875,7 +891,7 @@ Set comment column (@code{comment-set-column}).
875@item @kbd{C-M-j} 891@item @kbd{C-M-j}
876@itemx @kbd{M-j} 892@itemx @kbd{M-j}
877Like @key{RET} followed by inserting and aligning a comment 893Like @key{RET} followed by inserting and aligning a comment
878(@code{comment-indent-new-line}). 894(@code{comment-indent-new-line}). @xref{Multi-Line Comments}.
879@item @kbd{M-x comment-region} 895@item @kbd{M-x comment-region}
880@itemx @kbd{C-c C-c} (in C-like modes) 896@itemx @kbd{C-c C-c} (in C-like modes)
881Add or remove comment delimiters on all the lines in the region. 897Add or remove comment delimiters on all the lines in the region.
@@ -948,8 +964,13 @@ and by not changing the indentation of a triple-semicolon comment at all.
948 (1+ x)) ; This line adds one. 964 (1+ x)) ; This line adds one.
949@end example 965@end example
950 966
951 In C code, a comment preceded on its line by nothing but whitespace 967 For C-like buffers, you can configure the exact effect of @kbd{M-;}
952is indented like a line of code. 968more flexibly than for most buffers by setting the user options
969@code{c-indent-comment-alist} and
970@code{c-indent-comments-syntactically-p}. For example, on a line
971ending in a closing brace, @kbd{M-;} puts the comment one space after
972the brace rather than at @code{comment-column}. For full details see
973@ref{Comment Commands,,, ccmode, The CC Mode Manual}.
953 974
954@node Multi-Line Comments 975@node Multi-Line Comments
955@subsection Multiple Lines of Comments 976@subsection Multiple Lines of Comments
@@ -958,23 +979,23 @@ is indented like a line of code.
958@kindex M-j 979@kindex M-j
959@cindex blank lines in programs 980@cindex blank lines in programs
960@findex comment-indent-new-line 981@findex comment-indent-new-line
982
961 If you are typing a comment and wish to continue it on another line, 983 If you are typing a comment and wish to continue it on another line,
962you can use the command @kbd{C-M-j} or @kbd{M-j} 984you can use the command @kbd{C-M-j} or @kbd{M-j}
963(@code{comment-indent-new-line}). This terminates the comment you are 985(@code{comment-indent-new-line}). If @code{comment-multi-line}
964typing, creates a new blank line afterward, and begins a new comment 986(@pxref{Options for Comments}) is non-@code{nil}, it moves to a new
965indented under the old one. When Auto Fill mode is on, going past the 987line within the comment. Otherwise it closes the comment and starts a
988new comment on a new line. When Auto Fill mode is on, going past the
966fill column while typing a comment causes the comment to be continued 989fill column while typing a comment causes the comment to be continued
967in just this fashion. If point is not at the end of the line when you 990in just this fashion.
968type the command, the text on the rest of the line becomes part of the
969new comment line.
970 991
971@kindex C-c C-c (C mode) 992@kindex C-c C-c (C mode)
972@findex comment-region 993@findex comment-region
973 To turn existing lines into comment lines, use the @kbd{M-x 994 To turn existing lines into comment lines, use the @kbd{M-x
974comment-region} command. It adds comment delimiters to the lines that start 995comment-region} command (or type @kbd{C-c C-c} in C-like buffers). It
975in the region, thus commenting them out. With a negative argument, it 996adds comment delimiters to the lines that start in the region, thus
976does the opposite---it deletes comment delimiters from the lines in the 997commenting them out. With a negative argument, it does the
977region. 998opposite---it deletes comment delimiters from the lines in the region.
978 999
979 With a positive argument, @code{comment-region} duplicates the last 1000 With a positive argument, @code{comment-region} duplicates the last
980character of the comment start sequence it adds; the argument specifies 1001character of the comment start sequence it adds; the argument specifies
@@ -985,6 +1006,11 @@ can also affect how the comment is indented. In Lisp, for proper
985indentation, you should use an argument of two or three, if between defuns; 1006indentation, you should use an argument of two or three, if between defuns;
986if within a defun, it must be three. 1007if within a defun, it must be three.
987 1008
1009 You can configure C Mode such that when you type a @samp{/} at the
1010start of a line in a multi-line block comment, this closes the
1011comment. Enable the @code{comment-close-slash} clean-up for this.
1012@xref{Clean-ups,,, ccmode, The CC Mode Manual}.
1013
988@node Options for Comments 1014@node Options for Comments
989@subsection Options Controlling Comments 1015@subsection Options Controlling Comments
990 1016
@@ -1038,13 +1064,13 @@ can hold the actual string to insert.
1038@vindex comment-multi-line 1064@vindex comment-multi-line
1039 The variable @code{comment-multi-line} controls how @kbd{C-M-j} 1065 The variable @code{comment-multi-line} controls how @kbd{C-M-j}
1040(@code{indent-new-comment-line}) behaves when used inside a comment. 1066(@code{indent-new-comment-line}) behaves when used inside a comment.
1041Specifically, when @code{comment-multi-line} is @code{nil} (the 1067Specifically, when @code{comment-multi-line} is @code{nil}, the
1042default value), the command inserts a comment terminator, begins a new 1068command inserts a comment terminator, begins a new line, and finally
1043line, and finally inserts a comment starter. Otherwise it does not 1069inserts a comment starter. Otherwise it does not insert the
1044insert the terminator and starter, so it effectively continues the 1070terminator and starter, so it effectively continues the current
1045current comment across multiple lines. In languages that allow 1071comment across multiple lines. In languages that allow multi-line
1046multi-line comments, the choice of value for this variable is a matter 1072comments, the choice of value for this variable is a matter of taste.
1047of taste. 1073The default for this variable depends on the major mode.
1048 1074
1049@vindex comment-indent-function 1075@vindex comment-indent-function
1050 The variable @code{comment-indent-function} should contain a function 1076 The variable @code{comment-indent-function} should contain a function
@@ -1510,11 +1536,13 @@ Move point to the end of the innermost C statement or sentence; like
1510 1536
1511@item M-x c-backward-into-nomenclature 1537@item M-x c-backward-into-nomenclature
1512@findex c-backward-into-nomenclature 1538@findex c-backward-into-nomenclature
1513Move point backward to beginning of a C++ nomenclature section or word. 1539Move point backward to beginning of a C++ nomenclature section or
1514With prefix argument @var{n}, move @var{n} times. If @var{n} is 1540word. With prefix argument @var{n}, move @var{n} times. If @var{n}
1515negative, move forward. C++ nomenclature means a symbol name in the 1541is negative, move forward. C++ nomenclature means a symbol name in
1516style of NamingSymbolsWithMixedCaseAndNoUnderlines; each capital letter 1542the style of NamingSymbolsWithMixedCaseAndNoUnderlines; each capital
1517begins a section or word. 1543letter begins a section or word. Rather than this command, you might
1544well prefer the newer ``Subword Mode'', which does the same thing
1545better. @xref{Other C Commands}.
1518 1546
1519In the GNU project, we recommend using underscores to separate words 1547In the GNU project, we recommend using underscores to separate words
1520within an identifier in C or C++, rather than using case distinctions. 1548within an identifier in C or C++, rather than using case distinctions.
@@ -1529,154 +1557,90 @@ With prefix argument @var{n}, move @var{n} times.
1529@subsection Electric C Characters 1557@subsection Electric C Characters
1530 1558
1531 In C mode and related modes, certain printing characters are 1559 In C mode and related modes, certain printing characters are
1532``electric''---in addition to inserting themselves, they also reindent 1560@dfn{electric}---in addition to inserting themselves, they also
1533the current line, and optionally also insert newlines. The 1561reindent the current line, and optionally also insert newlines. The
1534``electric'' characters are @kbd{@{}, @kbd{@}}, @kbd{:}, @kbd{#}, 1562``electric'' characters are @kbd{@{}, @kbd{@}}, @kbd{:}, @kbd{#},
1535@kbd{;}, @kbd{,}, @kbd{<}, @kbd{>}, @kbd{/}, @kbd{*}, @kbd{(}, and 1563@kbd{;}, @kbd{,}, @kbd{<}, @kbd{>}, @kbd{/}, @kbd{*}, @kbd{(}, and
1536@kbd{)}. 1564@kbd{)}.
1537 1565
1538 Electric characters insert newlines only when the @dfn{auto-newline} 1566 You might find electric indentation inconvenient if you are editing
1539feature is enabled (indicated by @samp{/a} in the mode line after the 1567chaotically indented code. If you are new to CC Mode, you might find
1540mode name). This feature is controlled by the variable 1568it disconcerting. You can toggle electric action with the command
1541@code{c-auto-newline}. You can turn this feature on or off with the 1569@kbd{C-c C-l}; when it is enabled, @samp{/l} appears in the mode line
1542command @kbd{C-c C-a}: 1570after the mode name:
1543 1571
1544@table @kbd 1572@table @kbd
1545@item C-c C-a 1573@item C-c C-l
1546@kindex C-c C-a @r{(C mode)} 1574@kindex C-c C-l @r{(C mode)}
1547@findex c-toggle-auto-state 1575@findex c-toggle-electric-state
1548Toggle the auto-newline feature (@code{c-toggle-auto-state}). With a 1576Toggle electric action (@code{c-toggle-electric-state}). With a
1549prefix argument, this command turns the auto-newline feature on if the 1577prefix argument, this command enables electric action if the argument
1550argument is positive, and off if it is negative. 1578is positive, disables it if it is negative.
1551@end table 1579@end table
1552 1580
1553 The colon character is electric because that is appropriate for a 1581 Electric characters insert newlines only when, in addition to the
1554single colon. But when you want to insert a double colon in C++, the 1582electric state, the @dfn{auto-newline} feature is enabled (indicated
1555electric behavior of colon is inconvenient. You can insert a double 1583by @samp{/la} in the mode line after the mode name). You can turn
1556colon with no reindentation or newlines by typing @kbd{C-c :}: 1584this feature on or off with the command @kbd{C-c C-a}:
1557 1585
1558@table @kbd 1586@table @kbd
1559@item C-c : 1587@item C-c C-a
1560@ifinfo 1588@kindex C-c C-a @r{(C mode)}
1561@c This uses ``colon'' instead of a literal `:' because Info cannot 1589@findex c-toggle-auto-newline
1562@c cope with a `:' in a menu 1590Toggle the auto-newline feature (@code{c-toggle-auto-newline}). With a
1563@kindex C-c @key{colon} @r{(C mode)} 1591prefix argument, this command turns the auto-newline feature on if the
1564@end ifinfo 1592argument is positive, and off if it is negative.
1565@ifnotinfo
1566@kindex C-c : @r{(C mode)}
1567@end ifnotinfo
1568@findex c-scope-operator
1569Insert a double colon scope operator at point, without reindenting the
1570line or adding any newlines (@code{c-scope-operator}).
1571@end table 1593@end table
1572 1594
1573@vindex c-electric-pound-behavior 1595 Usually the CC Mode style configures the exact circumstances in
1574 The electric @kbd{#} key reindents the line if it appears to be the 1596which Emacs inserts auto-newlines. You can also configure this
1575beginning of a preprocessor directive. This happens when the value of 1597directly. @xref{Custom Auto-newlines,,, ccmode, The CC Mode Manual}.
1576@code{c-electric-pound-behavior} is @code{(alignleft)}. You can turn
1577this feature off by setting @code{c-electric-pound-behavior} to
1578@code{nil}.
1579
1580@vindex c-hanging-braces-alist
1581 The variable @code{c-hanging-braces-alist} controls the insertion of
1582newlines before and after inserted braces. It is an association list
1583with elements of the following form: @code{(@var{syntactic-symbol}
1584. @var{nl-list})}. Most of the syntactic symbols that appear in
1585@code{c-offsets-alist} are meaningful here as well.
1586
1587 The list @var{nl-list} may contain either of the symbols
1588@code{before} or @code{after}, or both; or it may be @code{nil}. When a
1589brace is inserted, the syntactic context it defines is looked up in
1590@code{c-hanging-braces-alist}; if it is found, the @var{nl-list} is used
1591to determine where newlines are inserted: either before the brace,
1592after, or both. If not found, the default is to insert a newline both
1593before and after braces.
1594
1595@vindex c-hanging-colons-alist
1596 The variable @code{c-hanging-colons-alist} controls the insertion of
1597newlines before and after inserted colons. It is an association list
1598with elements of the following form: @code{(@var{syntactic-symbol}
1599. @var{nl-list})}. The list @var{nl-list} may contain either of the
1600symbols @code{before} or @code{after}, or both; or it may be @code{nil}.
1601
1602 When a colon is inserted, the syntactic symbol it defines is looked
1603up in this list, and if found, the @var{nl-list} is used to determine
1604where newlines are inserted: either before the brace, after, or both.
1605If the syntactic symbol is not found in this list, no newlines are
1606inserted.
1607
1608@vindex c-cleanup-list
1609 Electric characters can also delete newlines automatically when the
1610auto-newline feature is enabled. This feature makes auto-newline more
1611acceptable, by deleting the newlines in the most common cases where you
1612do not want them. Emacs can recognize several cases in which deleting a
1613newline might be desirable; by setting the variable
1614@code{c-cleanup-list}, you can specify @emph{which} of these cases that
1615should happen. The variable's value is a list of symbols, each
1616describing one case for possible deletion of a newline. Here are the
1617meaningful symbols, and their meanings:
1618
1619@table @code
1620@item brace-catch-brace
1621Clean up @samp{@} catch (@var{condition}) @{} constructs by placing the
1622entire construct on a single line. The clean-up occurs when you type
1623the @samp{@{}, if there is nothing between the braces aside from
1624@code{catch} and @var{condition}.
1625
1626@item brace-else-brace
1627Clean up @samp{@} else @{} constructs by placing the entire construct on
1628a single line. The clean-up occurs when you type the @samp{@{} after
1629the @code{else}, but only if there is nothing but white space between
1630the braces and the @code{else}.
1631
1632@item brace-elseif-brace
1633Clean up @samp{@} else if (@dots{}) @{} constructs by placing the entire
1634construct on a single line. The clean-up occurs when you type the
1635@samp{@{}, if there is nothing but white space between the @samp{@}} and
1636@samp{@{} aside from the keywords and the @code{if}-condition.
1637
1638@item empty-defun-braces
1639Clean up empty defun braces by placing the braces on the same
1640line. Clean-up occurs when you type the closing brace.
1641
1642@item defun-close-semi
1643Clean up the semicolon after a @code{struct} or similar type
1644declaration, by placing the semicolon on the same line as the closing
1645brace. Clean-up occurs when you type the semicolon.
1646
1647@item list-close-comma
1648Clean up commas following braces in array and aggregate
1649initializers. Clean-up occurs when you type the comma.
1650
1651@item scope-operator
1652Clean up double colons which may designate a C++ scope operator, by
1653placing the colons together. Clean-up occurs when you type the second
1654colon, but only when the two colons are separated by nothing but
1655whitespace.
1656@end table
1657 1598
1658@node Hungry Delete 1599@node Hungry Delete
1659@subsection Hungry Delete Feature in C 1600@subsection Hungry Delete Feature in C
1660@cindex hungry deletion (C Mode) 1601@cindex hungry deletion (C Mode)
1661 1602
1662 When the @dfn{hungry-delete} feature is enabled (indicated by 1603 If you want to delete an entire block of whitespace at point, you
1663@samp{/h} or @samp{/ah} in the mode line after the mode name), a single 1604can use @dfn{hungry deletion}. This deletes all the contiguous
1664@key{DEL} command deletes all preceding whitespace, not just one space. 1605whitespace either before point or after point in a single operation.
1665To turn this feature on or off, use @kbd{C-c C-d}: 1606@dfn{Whitespace} here includes tabs and newlines, but not comments or
1607preprocessor commands.
1666 1608
1667@table @kbd 1609@table @kbd
1610@item C-c C-@key{BS}
1611@itemx C-c @key{BS}
1612@findex c-hungry-backspace
1613@kindex C-c C-@key{BS} (C Mode)
1614@kindex C-c @key{BS} (C Mode)
1615@code{c-hungry-backspace}---Delete the entire block of whitespace
1616preceding point.
1617
1668@item C-c C-d 1618@item C-c C-d
1669@kindex C-c C-d @r{(C mode)} 1619@itemx C-c C-@key{DEL}
1670@findex c-toggle-hungry-state 1620@itemx C-c @key{DEL}
1671Toggle the hungry-delete feature (@code{c-toggle-hungry-state}). With a 1621@findex c-hungry-delete-forward
1672prefix argument, this command turns the hungry-delete feature on if the 1622@kindex C-c C-d (C Mode)
1673argument is positive, and off if it is negative. 1623@kindex C-c C-@key{DEL} (C Mode)
1624@kindex C-c @key{DEL} (C Mode)
1625@code{c-hungry-delete-forward}---Delete the entire block of whitespace
1626following point.
1627@end table
1674 1628
1675@item C-c C-t 1629 As an alternative to the above commands, you can enable @dfn{hungry
1676@kindex C-c C-t @r{(C mode)} 1630delete mode}. When this feature is enabled (indicated by @samp{/h} in
1677@findex c-toggle-auto-hungry-state 1631the mode line after the mode name), a single @key{BS} command deletes
1678Toggle the auto-newline and hungry-delete features, both at once 1632all preceding whitespace, not just one space, and a single @kbd{C-c
1679(@code{c-toggle-auto-hungry-state}). 1633C-d} (but @emph{not} @key{delete}) deletes all following whitespace.
1634
1635@table @kbd
1636@item M-x c-toggle-hungry-state
1637@findex c-toggle-hungry-state
1638Toggle the hungry-delete feature
1639(@code{c-toggle-hungry-state})@footnote{This command had the binding
1640@kbd{C-c C-d} in earlier versions of Emacs. @kbd{C-c C-d} is now
1641bound to @code{c-hungry-delete-forward}.}. With a prefix argument,
1642this command turns the hungry-delete feature on if the argument is
1643positive, and off if it is negative.
1680@end table 1644@end table
1681 1645
1682@vindex c-hungry-delete-key 1646@vindex c-hungry-delete-key
@@ -1687,6 +1651,16 @@ hungry-delete feature is enabled.
1687@subsection Other Commands for C Mode 1651@subsection Other Commands for C Mode
1688 1652
1689@table @kbd 1653@table @kbd
1654@item C-c C-w
1655@itemx M-x c-subword-mode
1656@findex c-subword-mode
1657Enable (or disable) @dfn{subword mode}. In subword mode, Emacs's word
1658commands then recognize upper case letters in
1659@samp{StudlyCapsIdentifiers} as word boundaries. This is indicated by
1660the flag @samp{/w} on the mode line after the mode name
1661(e.g. @samp{C/law}). You can even use @kbd{M-x c-subword-mode} in
1662non-CC Mode buffers.
1663
1690@item M-x c-context-line-break 1664@item M-x c-context-line-break
1691@findex c-context-line-break 1665@findex c-context-line-break
1692This command inserts a line break and indents the new line in a manner 1666This command inserts a line break and indents the new line in a manner
@@ -1697,9 +1671,13 @@ it's like @kbd{M-j} (@code{c-indent-new-comment-line}).
1697 1671
1698@code{c-context-line-break} isn't bound to a key by default, but it 1672@code{c-context-line-break} isn't bound to a key by default, but it
1699needs a binding to be useful. The following code will bind it to 1673needs a binding to be useful. The following code will bind it to
1700@kbd{C-j}. 1674@kbd{C-j}. We use @code{c-initialization-hook} here to make sure
1675the keymap is loaded before we try to change it.
1676
1701@example 1677@example
1702(define-key c-mode-base-map "\C-j" 'c-context-line-break) 1678(defun my-bind-clb ()
1679 (define-key c-mode-base-map "\C-j" 'c-context-line-break))
1680(add-hook 'c-initialization-hook 'my-bind-clb)
1703@end example 1681@end example
1704 1682
1705@item C-M-h 1683@item C-M-h