]> code.delx.au - gnu-emacs/blobdiff - man/misc.texi
Version 2.0.21 released.
[gnu-emacs] / man / misc.texi
index df1ca152b6bf5db549b3fd9a29ee4baed7566f1b..ff82d04d7bea214fbdccb1b96fc44179063f1d68 100644 (file)
@@ -446,9 +446,8 @@ previous input lines in the buffer.  @xref{Faces}.
 prefix argument (e.g. @kbd{C-u M-x shell}), which will read a buffer
 name and create (or reuse) a subshell in that buffer.  You can also
 rename the @samp{*shell*} buffer using @kbd{M-x rename-uniquely}, then
-then create a new @samp{*shell*} buffer using plain @kbd{M-x shell}.
-All the subshells in different buffers run independently and in
-parallel.
+create a new @samp{*shell*} buffer using plain @kbd{M-x shell}.  All the
+subshells in different buffers run independently and in parallel.
 
 @vindex explicit-shell-file-name
 @cindex environment variables for subshells
@@ -744,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
@@ -776,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
@@ -960,6 +972,13 @@ directory stack if they are not already on it
 (@code{shell-pushd-dunique}).  The values you choose should match the
 underlying shell, of course.
 
+  If you want Shell mode to handle color output from shell commands,
+you can enable ANSI Color mode.  Here is how to do this:
+
+@example
+(add-hook 'shell-mode-hook 'ansi-color-for-comint-mode-on)
+@end example
+
 @node Terminal emulator
 @subsection Emacs Terminal Emulator
 @findex term
@@ -1012,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
 
@@ -1055,7 +1074,7 @@ displays the word @samp{page}.
 screenful of output since your last input, it pauses, displaying
 @samp{**MORE**} in the mode-line.  Type @key{SPC} to display the next
 screenful of output.  Type @kbd{?} to see your other options.  The
-interface is similar to the Unix @code{more} program.
+interface is similar to the @code{more} program.
 
 @node Remote Host
 @subsection Remote Host Shell
@@ -1473,13 +1492,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 @sc{ascii} and Latin-1
+@code{nil}, is appropriate for printing ASCII and Latin-1
 characters; a value of @code{non-latin-printer} is for printers which
-have the fonts for @sc{ascii}, Latin-1, Japanese, and Korean
+have the fonts for 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 @sc{ascii} and Latin-1
+instructs the printer to use built-in fonts for ASCII and Latin-1
 characters, and Intlfonts BDF fonts for the rest.
 
 @vindex bdf-directory-list
@@ -1644,7 +1663,6 @@ any time is called the buffer's @dfn{restriction}.
 paragraph by eliminating clutter.  It can also be used to restrict the
 range of operation of a replace command or repeating keyboard macro.
 
-@c WideCommands
 @table @kbd
 @item C-x n n
 Narrow down to between point and mark (@code{narrow-to-region}).
@@ -1970,11 +1988,11 @@ the order you choose.
 @cindex other editors
 @cindex EDT
 @cindex vi
-@cindex PC keybindings
+@cindex PC key bindings
 @cindex scrolling all windows
-@cindex PC selecion
-@cindex Motif keybindings
-@cindex Macintosh keybindings
+@cindex PC selection
+@cindex Motif key bindings
+@cindex Macintosh key bindings
 @cindex WordStar
 
   GNU Emacs can be programmed to emulate (more or less) most other
@@ -1989,7 +2007,7 @@ editors.  Standard facilities can emulate these:
 @cindex Brief emulation
 @cindex emulation of Brief
 @cindex mode, CRiSP
-You can turn on keybindings to emulate the CRiSP/Brief editor with
+You can turn on key bindings to emulate the CRiSP/Brief editor with
 @kbd{M-x crisp-mode}.  Note that this rebinds @kbd{M-x} to exit Emacs
 unless you change the user option @code{crisp-override-meta-x}.  You can
 also use the command @kbd{M-x scroll-all-mode} or set the user option
@@ -2024,12 +2042,12 @@ 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 keybindings
+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
 @kbd{next}, @kbd{prior}, @kbd{home} and @kbd{end} keys.  It does not
-provide the full set of CUA keybindings---the fundamental Emacs keys
+provide the full set of CUA key bindings---the fundamental Emacs keys
 @kbd{C-c}, @kbd{C-v} and @kbd{C-x} are not changed.
 
 The standard keys for moving around (@kbd{right}, @kbd{left},
@@ -2040,6 +2058,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.
@@ -2090,7 +2111,7 @@ not use it.
 @item WordStar (old wordprocessor)
 @findex wordstar-mode
 @kbd{M-x wordstar-mode} provides a major mode with WordStar-like
-keybindings.
+key bindings.
 @end table
 
 @node Hyperlinking, Dissociated Press, Emulation, Top
@@ -2293,7 +2314,7 @@ typing @kbd{C-g}.  The dissociation output remains in the
 buffer to another.  In order to produce plausible output rather than
 gibberish, it insists on a certain amount of overlap between the end of
 one run of consecutive words or characters and the start of the next.
-That is, if it has just printed out `president' and then decides to jump
+That is, if it has just output `president' and then decides to jump
 to a different point in the file, it might spot the `ent' in `pentagon'
 and continue from there, producing `presidentagon'.@footnote{This
 dissociword actually appeared during the Vietnam War, when it was very