Sync to HEAD
[bpt/emacs.git] / man / misc.texi
index 7441c7c..83c86a1 100644 (file)
@@ -47,7 +47,7 @@ To start Gnus, type @kbd{M-x gnus @key{RET}}.
 As opposed to most normal Emacs packages, Gnus uses a number of
 different buffers to display information and to receive commands.  The
 three buffers users spend most of their time in are the @dfn{group
-buffer}, the @dfn{summary buffer} and the @dfn{article buffer}.  
+buffer}, the @dfn{summary buffer} and the @dfn{article buffer}.
 
 The @dfn{group buffer} contains a list of groups.  This is the first
 buffer Gnus displays when it starts up.  It normally displays only the
@@ -161,7 +161,7 @@ In the group buffer, select the group on the line under the cursor
 and display the first unread article in that group.
 
 @need 1000
-In the summary buffer, 
+In the summary buffer,
 
 @itemize @bullet
 @item
@@ -291,7 +291,7 @@ Save articles. @xref{Saving Articles, , , gnus, The Gnus Manual}.
 @item
 Have Gnus score articles according to various criteria, like author
 name, subject, or string in the body of the articles.@*
-@xref{Scoring, , , gnus, The Gnus Manual}. 
+@xref{Scoring, , , gnus, The Gnus Manual}.
 
 @item
 Send an article to a newsgroup.@*
@@ -526,9 +526,9 @@ before point in the shell buffer
 @item C-d
 @kindex C-d @r{(Shell mode)}
 @findex comint-delchar-or-maybe-eof
-Either delete a character or send @sc{eof}
+Either delete a character or send @acronym{EOF}
 (@code{comint-delchar-or-maybe-eof}).  Typed at the end of the shell
-buffer, @kbd{C-d} sends @sc{eof} to the subshell.  Typed at any other
+buffer, @kbd{C-d} sends @acronym{EOF} to the subshell.  Typed at any other
 position in the buffer, @kbd{C-d} deletes a character as usual.
 
 @item C-c C-a
@@ -743,6 +743,10 @@ Search backwards or forwards for old shell commands that match @var{regexp}.
 @item C-c C-x @r{(Shell mode)}
 @findex comint-get-next-from-history
 Fetch the next subsequent command from the history.
+
+@item C-c . @r{(Shell mode)}
+@findex comint-input-previous-argument
+Fetch one argument from an old shell command.
 @end table
 
   Shell buffers provide a history of previously entered shell commands.  To
@@ -775,6 +779,15 @@ you just repeated.  Then type @key{RET} to reexecute this command.  You
 can reexecute several successive commands by typing @kbd{C-c C-x
 @key{RET}} over and over.
 
+  The command @kbd{C-c .}@: (@code{comint-input-previous-argument})
+copies an individual argument from a previous command, like @kbd{ESC
+.} in Bash.  The simplest use copies the last argument from the
+previous shell command.  With a prefix argument @var{n}, it copies the
+@var{n}th argument instead.  Repeating @kbd{C-c .} copies from an
+earlier shell command instead, always using the same value of @var{n}
+(don't give a prefix argument when you repeat the @kbd{C-c .}
+command).
+
   These commands get the text of previous shell commands from a special
 history list, not from the shell buffer itself.  Thus, editing the shell
 buffer, or even killing large parts of it, does not affect the history
@@ -908,13 +921,13 @@ to the bottom before inserting.
 
 @vindex comint-scroll-show-maximum-output
   If @code{comint-scroll-show-maximum-output} is non-@code{nil}, then
-scrolling due to the arrival of output tries to place the last line of
+arrival of output when point is at the end tries to place the last line of
 text at the bottom line of the window, so as to show as much useful
 text as possible.  (This mimics the scrolling behavior of many
 terminals.)  The default is @code{nil}.
 
-@vindex comint-scroll-to-bottom-on-output
-  By setting @code{comint-scroll-to-bottom-on-output}, you can opt for
+@vindex comint-move-point-for-output
+  By setting @code{comint-move-point-for-output}, you can opt for
 having point jump to the end of the buffer whenever output arrives---no
 matter where in the buffer point was before.  If the value is
 @code{this}, point jumps in the selected window.  If the value is
@@ -1018,14 +1031,14 @@ subshell, except for the Term escape character, normally @kbd{C-c}.
   To switch between line and char mode, use these commands:
 
 @table @kbd
-@kindex C-c C-k @r{(Term mode)}
+@kindex C-c C-j @r{(Term mode)}
 @findex term-char-mode
-@item C-c C-k
+@item C-c C-j
 Switch to line mode.  Do nothing if already in line mode.
 
-@kindex C-c C-j @r{(Term mode)}
+@kindex C-c C-k @r{(Term mode)}
 @findex term-line-mode
-@item C-c C-j
+@item C-c C-k
 Switch to char mode.  Do nothing if already in char mode.
 @end table
 
@@ -1287,6 +1300,16 @@ the value of the @samp{--alternate-editor} takes precedence.
 function which will communicate with a running Emacs server, or start
 one if none exists.
 
+If you use several displays, you can tell Emacs on which display to
+open the given files with the option @samp{--display=@var{DISPLAY}}.
+This can be used typically when connecting from home to an Emacs
+server running on your machine at your workplace.
+
+You can also use @code{emacsclient} to execute any piece of Emacs Lisp
+code, using the option @samp{--eval}.  When this option is given, the
+rest of the arguments is not taken as a list of files to visit but as
+a list of expressions to evaluate.
+
 @node Hardcopy, PostScript, Emacs Server, Top
 @section Hardcopy Output
 @cindex hardcopy
@@ -1479,13 +1502,13 @@ printable using the fonts built into your printer.  You can augment
 the fonts supplied with the printer with those from the GNU Intlfonts
 package, or you can instruct Emacs to use Intlfonts exclusively.  The
 variable @code{ps-multibyte-buffer} controls this: the default value,
-@code{nil}, is appropriate for printing ASCII and Latin-1
+@code{nil}, is appropriate for printing @acronym{ASCII} and Latin-1
 characters; a value of @code{non-latin-printer} is for printers which
-have the fonts for ASCII, Latin-1, Japanese, and Korean
+have the fonts for @acronym{ASCII}, Latin-1, Japanese, and Korean
 characters built into them.  A value of @code{bdf-font} arranges for
 the BDF fonts from the Intlfonts package to be used for @emph{all}
 characters.  Finally, a value of @code{bdf-font-except-latin}
-instructs the printer to use built-in fonts for ASCII and Latin-1
+instructs the printer to use built-in fonts for @acronym{ASCII} and Latin-1
 characters, and Intlfonts BDF fonts for the rest.
 
 @vindex bdf-directory-list
@@ -1508,7 +1531,7 @@ identify a @dfn{sort key} for each record, and then reorder the records
 into the order determined by the sort keys.  The records are ordered so
 that their keys are in alphabetical order, or, for numeric sorting, in
 numeric order.  In alphabetic sorting, all upper-case letters `A' through
-`Z' come before lower-case `a', in accord with the ASCII character
+`Z' come before lower-case `a', in accord with the @acronym{ASCII} character
 sequence.
 
   The various sort commands differ in how they divide the text into sort
@@ -1852,55 +1875,44 @@ hexl-@key{RET}} for details.
 @cindex reload files
 @cindex desktop
 
-  You can use the Desktop library to save the state of Emacs from one
-session to another.  Saving the state means that Emacs starts up with
-the same set of buffers, major modes, buffer positions, and so on that
-the previous Emacs session had.
+   Use the desktop library to save the state of Emacs from one session
+to another.  Once you save the Emacs @dfn{desktop}---the buffers,
+their file names, major modes, buffer positions, and so on---then
+subsequent Emacs sessions reload the saved desktop.
 
-@vindex desktop-enable
-  To use Desktop, you should use the Customization buffer (@pxref{Easy
-Customization}) to set @code{desktop-enable} to a non-@code{nil} value,
-or add these lines at the end of your @file{.emacs} file:
+@findex desktop-save
+@vindex desktop-save-mode
+  You can save the desktop manually with the command @kbd{M-x
+desktop-save}.  You can also enable automatical desktop saving when
+you exit Emacs: use the Customization buffer (@pxref{Easy
+Customization}) to set @code{desktop-save-mode} to @code{t} for future
+sessions, or add this line in your @file{~/.emacs} file:
 
 @example
-(desktop-load-default)
-(desktop-read)
+(desktop-save-mode 1)
 @end example
 
-@noindent
-@findex desktop-save
-The first time you save the state of the Emacs session, you must do it
-manually, with the command @kbd{M-x desktop-save}.  Once you have done
-that, exiting Emacs will save the state again---not only the present
-Emacs session, but also subsequent sessions.  You can also save the
-state at any time, without exiting Emacs, by typing @kbd{M-x
-desktop-save} again.
-
-  In order for Emacs to recover the state from a previous session, you
-must start it with the same current directory as you used when you
-started the previous session.  This is because @code{desktop-read} looks
-in the current directory for the file to read.  This means that you can
-have separate saved sessions in different directories; the directory in
-which you start Emacs will control which saved session to use.
-
-@vindex desktop-files-not-to-save
-  The variable @code{desktop-files-not-to-save} controls which files are
-excluded from state saving.  Its value is a regular expression that
-matches the files to exclude.  By default, remote (ftp-accessed) files
-are excluded; this is because visiting them again in the subsequent
-session would be slow.  If you want to include these files in state
-saving, set @code{desktop-files-not-to-save} to @code{"^$"}.
-@xref{Remote Files}.
-
-@vindex save-place
-@cindex Saveplace
-@findex toggle-save-place
-  The Saveplace library provides a simpler feature that records your
-position in each file when you kill its buffer (or kill Emacs), and
-jumps to the same position when you visit the file again (even in
-another Emacs session).  Use @kbd{M-x toggle-save-place} to turn on
-place-saving in a given file.  Customize the option @code{save-place}
-to turn it on for all files in each session.
+@findex desktop-change-dir
+@findex desktop-revert
+  When Emacs starts, it looks for a saved desktop in the current
+directory.  Thus, you can have separate saved desktops in different
+directories, and the starting directory determines which one Emacs
+reloads.  You can save the current desktop and reload one saved in
+another directory by typing @kbd{M-x desktop-change-dir}.  Typing
+@kbd{M-x desktop-revert} reverts to the desktop previously reloaded.
+
+  Specify the option @samp{--no-desktop} on the command line when you
+don't want it to reload any saved desktop.
+
+@findex desktop-clear
+@vindex desktop-globals-to-clear
+@vindex desktop-clear-preserve-buffers-regexp
+  Type @kbd{M-x desktop-clear} to empty the Emacs desktop.  This kills
+all buffers except for internal ones, and clears the global variables
+listed in @code{desktop-globals-to-clear}.  If you want this to
+preserve certain buffers, customize the variable
+@code{desktop-clear-preserve-buffers-regexp}, whose value is a regular
+expression matching the names of buffers not to kill.
 
 @node Recursive Edit, Emulation, Saving Emacs Sessions, Top
 @section Recursive Editing Levels
@@ -2029,7 +2041,7 @@ to beginning and end of buffer and @kbd{C-Escape} does
 @cindex PC Selection minor mode
 @cindex mode, PC selection
 @cindex selection, PC
-The command @kbd{M-x pc-selection-mode} enables a global minor mode
+The command @kbd{M-x pc-selection-mode} toggles a global minor mode
 that emulates the mark, copy, cut and paste commands of various other
 systems---an interface known as CUA.  It establishes the key bindings
 of PC mode, and also modifies the bindings of the cursor keys and the
@@ -2045,6 +2057,9 @@ the region over which they move.  The copy, cut and paste functions
 are available on @kbd{C-insert}, @kbd{S-delete} and @kbd{S-insert}
 respectively.
 
+Turning @code{pc-selection-mode} off restores the old key bindings of
+these keys.
+
 @cindex s-region package
 The @code{s-region} package provides similar, but less complete,
 facilities.
@@ -2157,9 +2172,10 @@ which you might like to bind to keys, such as
 @code{browse-url-browser-function}.  You can invoke actions dependent
 on the type of URL by defining @code{browse-url-browser-function} as
 an association list.  The package's commentary available via @kbd{C-h
-p} provides more information.  Packages with facilities for following
-URLs should always go through Browse-URL, so that the customization
-options for Browse-URL will affect all browsing in Emacs.
+p} under the @samp{hypermedia} keyword provides more information.
+Packages with facilities for following URLs should always go through
+Browse-URL, so that the customization options for Browse-URL will
+affect all browsing in Emacs.
 
 @node Goto-address
 @subsection Activating URLs
@@ -2206,14 +2222,14 @@ view it.
 
   This feature is useful for following references in mail or news
 buffers, @file{README} files, @file{MANIFEST} files, and so on.  The
-@samp{ffap} package's commentary available via @kbd{C-h p} and the
-@code{ffap} Custom group provide details.
+@samp{ffap} package's commentary available via @kbd{C-h p} under the
+@samp{files} keyword and the @code{ffap} Custom group provide details.
 
 @cindex FFAP minor mode
 @findex ffap-mode
-  You can turn on FFAP minor mode to make the following key bindings
-and to install hooks for using @code{ffap} in Rmail, Gnus and VM
-article buffers.
+  You can turn on FFAP minor mode by calling @code{ffap-bindings} to
+make the following key bindings and to install hooks for using
+@code{ffap} in Rmail, Gnus and VM article buffers.
 
 @table @kbd
 @item C-x C-f @var{filename} @key{RET}
@@ -2424,3 +2440,7 @@ Likewise, @kbd{M-x snake} provides an implementation of Snake.
 @findex zone
 The command @kbd{M-x zone} plays games with the display when Emacs is
 idle.
+
+@ignore
+   arch-tag: 8f094220-c0d5-4e9e-af7d-3e0da8187474
+@end ignore