* doc/emacs/misc.texi: Small updates (no need to merge to trunk)
[bpt/emacs.git] / doc / emacs / misc.texi
index 1836c19..99bae87 100644 (file)
@@ -1,6 +1,6 @@
 @c This is part of the Emacs manual.
-@c Copyright (C) 1985-1987, 1993-1995, 1997, 2000-2012
-@c   Free Software Foundation, Inc.
+@c Copyright (C) 1985-1987, 1993-1995, 1997, 2000-2014 Free Software
+@c Foundation, Inc.
 @c See file emacs.texi for copying conditions.
 @iftex
 @chapter Miscellaneous Commands
@@ -9,10 +9,9 @@
 else: viewing ``document files'', reading Usenet news, running shell
 commands and shell subprocesses, using a single shared Emacs for
 utilities that expect to run an editor as a subprocess, printing
-hardcopy, sorting text, narrowing display to part of the buffer,
-editing binary files, saving an Emacs session for later resumption,
-following hyperlinks, browsing images, emulating other editors, and
-various diversions and amusements.
+hardcopy, sorting text, editing binary files, saving an Emacs session
+for later resumption, following hyperlinks, emulating other editors,
+and various diversions and amusements.
 
 @end iftex
 
@@ -53,7 +52,7 @@ commands.  The three most commonly-used Gnus buffers are the
 @dfn{group buffer}, the @dfn{summary buffer} and the @dfn{article
 buffer}.
 
-  The @dfn{group buffer} contains a list of article sources (e.g.@:
+  The @dfn{group buffer} contains a list of article sources (e.g.,
 newsgroups and email inboxes), which are collectively referred to as
 @dfn{groups}.  This is the first buffer Gnus displays when it starts
 up.  It normally displays only the groups to which you subscribe and
@@ -166,7 +165,7 @@ List zombie groups.
 @cindex unsubscribe groups
 @item u
 Toggle the subscription status of the group on the current line
-(i.e.@: turn a subscribed group into an unsubscribed group, or vice
+(i.e., turn a subscribed group into an unsubscribed group, or vice
 versa).  Invoking this on a killed or zombie group turns it into an
 unsubscribed group.
 
@@ -439,6 +438,18 @@ associated with the current buffer, type @kbd{K}
 (@code{doc-view-kill-proc-and-buffer}) kills the converter process and
 the DocView buffer.
 
+@node EWW
+@section Web Browsing with EWW
+
+@findex eww
+@findex eww-open-file
+  @dfn{EWW}, the Emacs Web Wowser, is a web browser package for Emacs.
+It allows browsing URLs within an Emacs buffer.  The command @kbd{M-x
+eww} will open a URL or search the web.  You can open a file
+using the command @kbd{M-x eww-open-file}.  You can use EWW as the
+web browser for @code{browse-url}, @pxref{Browse-URL}.  For full
+details, @pxref{Top, EWW,, eww, The Emacs Web Wowser Manual}.
+
 @node Shell
 @section Running Shell Commands from Emacs
 @cindex subshell
@@ -518,7 +529,7 @@ output is long).
 type @kbd{M-! gunzip foo.gz @key{RET}}.  That shell command normally
 creates the file @file{foo} and produces no terminal output.
 
-  A numeric argument to @code{shell-command}, e.g.@: @kbd{M-1 M-!},
+  A numeric argument to @code{shell-command}, e.g., @kbd{M-1 M-!},
 causes it to insert terminal output into the current buffer instead of
 a separate buffer.  It puts point before the output, and sets the mark
 after the output.  For instance, @kbd{M-1 M-! gunzip < foo.gz
@@ -599,7 +610,7 @@ the buffer and type the input, terminated by @key{RET}.
   While the subshell is waiting or running a command, you can switch
 windows or buffers and perform other editing in Emacs.  Emacs inserts
 the output from the subshell into the Shell buffer whenever it has
-time to process it (e.g.@: while waiting for keyboard input).
+time to process it (e.g., while waiting for keyboard input).
 
 @cindex @code{comint-highlight-input} face
 @cindex @code{comint-highlight-prompt} face
@@ -610,7 +621,7 @@ easier to distinguish input lines from the shell output.
 @xref{Faces}.
 
   To make multiple subshells, invoke @kbd{M-x shell} with a prefix
-argument (e.g. @kbd{C-u M-x shell}).  Then the command will read a
+argument (e.g., @kbd{C-u M-x shell}).  Then the command will read a
 buffer name, and create (or reuse) a subshell in that buffer.  You can
 also rename the @file{*shell*} buffer using @kbd{M-x rename-uniquely},
 then create a new @file{*shell*} buffer using plain @kbd{M-x shell}.
@@ -645,7 +656,7 @@ Coding}.
 @cindex @env{EMACS} environment variable
   Emacs sets the environment variable @env{INSIDE_EMACS} in the
 subshell to @samp{@var{version},comint}, where @var{version} is the
-Emacs version (e.g.@: @samp{24.1}).  Programs can check this variable
+Emacs version (e.g., @samp{24.1}).  Programs can check this variable
 to determine whether they are running inside an Emacs subshell.  (It
 also sets the @env{EMACS} environment variable to @code{t}, if that
 environment variable is not already defined.  However, this
@@ -677,20 +688,13 @@ in the shell buffer to submit the current line as input.
 @item @key{TAB}
 @kindex TAB @r{(Shell mode)}
 @findex completion-at-point
+@cindex shell completion
 Complete the command name or file name before point in the shell
 buffer (@code{completion-at-point}).  This uses the usual Emacs
 completion rules (@pxref{Completion}), with the completion
 alternatives being file names, environment variable names, the shell
 command history, and history references (@pxref{History References}).
-
-@vindex shell-completion-fignore
-@vindex comint-completion-fignore
-The variable @code{shell-completion-fignore} specifies a list of file
-name extensions to ignore in Shell mode completion.  The default
-setting is @code{nil}, but some users prefer @code{("~" "#" "%")} to
-ignore file names ending in @samp{~}, @samp{#} or @samp{%}.  Other
-related Comint modes use the variable @code{comint-completion-fignore}
-instead.
+For options controlling the completion, @pxref{Shell Options}.
 
 @item M-?
 @kindex M-? @r{(Shell mode)}
@@ -810,8 +814,8 @@ echoing.  This is useful when a shell command runs a program that asks
 for a password.
 
 Please note that Emacs will not echo passwords by default.  If you
-really want them to be echoed, evaluate the following Lisp
-expression:
+really want them to be echoed, evaluate (@pxref{Lisp Eval}) the
+following Lisp expression:
 
 @example
 (remove-hook 'comint-output-filter-functions
@@ -994,8 +998,8 @@ 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
+copies an individual argument from a previous command, like
+@kbd{@key{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}
@@ -1179,6 +1183,20 @@ the possible completions whenever completion is not exact.
 If you set @code{shell-completion-execonly} to @code{nil},
 it considers nonexecutable files as well.
 
+@vindex shell-completion-fignore
+@vindex comint-completion-fignore
+The variable @code{shell-completion-fignore} specifies a list of file
+name extensions to ignore in Shell mode completion.  The default
+setting is @code{nil}, but some users prefer @code{("~" "#" "%")} to
+ignore file names ending in @samp{~}, @samp{#} or @samp{%}.  Other
+related Comint modes use the variable @code{comint-completion-fignore}
+instead.
+
+@findex shell-dynamic-complete-command
+Some implementation details of the shell command completion may also be found
+in the lisp documentation of the @code{shell-dynamic-complete-command}
+function.
+
 @findex shell-pushd-tohome
 @findex shell-pushd-dextract
 @findex shell-pushd-dunique
@@ -1307,7 +1325,7 @@ mode-line.  Type @key{SPC} to display the next screenful of output, or
 @cindex Rlogin
 
   You can login to a remote computer, using whatever commands you
-would from a regular terminal (e.g.@: using the @code{telnet} or
+would from a regular terminal (e.g., using the @code{telnet} or
 @code{rlogin} commands), from a Term window.
 
   A program that asks you for a password will normally suppress
@@ -1531,7 +1549,7 @@ precedence.
 Create a new graphical @dfn{client frame}, instead of using an
 existing Emacs frame.  See below for the special behavior of @kbd{C-x
 C-c} in a client frame.  If Emacs cannot create a new graphical frame
-(e.g.@: if it cannot connect to the X server), it tries to create a
+(e.g., if it cannot connect to the X server), it tries to create a
 text terminal client frame, as though you had supplied the @samp{-t}
 option instead.
 
@@ -1542,9 +1560,9 @@ option, like the @samp{-t} option, creates a new frame in the server's
 current text terminal.  @xref{Windows Startup}.
 
 If you omit a filename argument while supplying the @samp{-c} option,
-the new frame displays the @file{*scratch*} buffer by default.  If
-@code{initial-buffer-choice} is a string (@pxref{Entering Emacs}), the
-new frame displays that file or directory instead.
+the new frame displays the @file{*scratch*} buffer by default.  This
+behavior can be customized using the variable
+@code{initial-buffer-choice} (@pxref{Entering Emacs}).
 
 @item -F @var{alist}
 @itemx --frame-parameters=@var{alist}
@@ -1630,7 +1648,7 @@ frame.  If you type @kbd{C-x C-c} (@code{save-buffers-kill-terminal})
 in a client frame, that command does not kill the Emacs session as it
 normally does (@pxref{Exiting}).  Instead, Emacs deletes the client
 frame; furthermore, if the client frame has an @command{emacsclient}
-waiting to regain control (i.e.@: if you did not supply the @samp{-n}
+waiting to regain control (i.e., if you did not supply the @samp{-n}
 option), Emacs deletes all other frames of the same client, and marks
 the client's server buffers as finished, as though you had typed
 @kbd{C-x #} in all of them.  If it so happens that there are no
@@ -1689,7 +1707,7 @@ for printing by calling the @command{lpr} program.  To change the
 printer program, customize the variable @code{lpr-command}.  To
 specify extra switches to give the printer program, customize the list
 variable @code{lpr-switches}.  Its value should be a list of option
-strings, each of which should start with @samp{-} (e.g.@: the option
+strings, each of which should start with @samp{-} (e.g., the option
 string @code{"-w80"} specifies a line width of 80 columns).  The
 default is the empty list, @code{nil}.
 
@@ -1899,11 +1917,11 @@ used.
 init file (@pxref{Init File}), followed by @code{(pr-update-menus)}.
 This function replaces the usual printing commands in the menu bar
 with a @samp{Printing} submenu that contains various printing options.
-You can also type @kbd{M-x pr-interface RET}; this creates a
+You can also type @kbd{M-x pr-interface @key{RET}}; this creates a
 @file{*Printing Interface*} buffer, similar to a customization buffer,
 where you can set the printing options.  After selecting what and how
 to print, you start the print job using the @samp{Print} button (click
-@kbd{mouse-2} on it, or move point over it and type @kbd{RET}).  For
+@kbd{Mouse-2} on it, or move point over it and type @key{RET}).  For
 further information on the various options, use the @samp{Interface
 Help} button.
 
@@ -1975,6 +1993,7 @@ Like @kbd{M-x sort-fields} except that the text within each line
 used for comparison comes from a fixed range of columns.  See below
 for an explanation.
 
+@findex reverse-region
 @item M-x reverse-region
 Reverse the order of the lines in the region.  This is useful for
 sorting into descending order by fields or columns, since those sort
@@ -2112,10 +2131,15 @@ hexl-@key{RET}} for details.
 @cindex reload files
 @cindex desktop
 
+@vindex desktop-restore-frames
    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.
+subsequent Emacs sessions reload the saved desktop.  By default,
+the desktop also tries to save the frame and window configuration.
+To disable this, set @code{desktop-restore-frames} to @code{nil}.
+(See that variable's documentation for some related options
+that you can customize to fine-tune this behavior.)
 
 @findex desktop-save
 @vindex desktop-save-mode
@@ -2130,6 +2154,12 @@ sessions, or add this line in your init file (@pxref{Init File}):
 (desktop-save-mode 1)
 @end example
 
+@vindex desktop-auto-save-timeout
+@noindent
+When @code{desktop-save-mode} is active and the desktop file exists,
+Emacs auto-saves it every @code{desktop-auto-save-timeout}
+seconds, if that is non-@code{nil} and non-zero.
+
 @findex desktop-change-dir
 @findex desktop-revert
 @vindex desktop-path
@@ -2180,7 +2210,7 @@ commands to perform arbitrary editing while in the middle of another
 Emacs command.  For example, when you type @kbd{C-r} inside of a
 @code{query-replace}, you enter a recursive edit in which you can change
 the current buffer.  On exiting from the recursive edit, you go back to
-the @code{query-replace}.
+the @code{query-replace}.  @xref{Query Replace}.
 
 @kindex C-M-c
 @findex exit-recursive-edit
@@ -2251,7 +2281,7 @@ the order you choose.
 @cindex Macintosh key bindings
 @cindex WordStar
 
-  GNU Emacs can be programmed to emulate (more or less) most other
+  GNU Emacs can be programmed to emulate (more or less) some other
 editors.  Standard facilities can emulate these:
 
 @table @asis
@@ -2404,7 +2434,7 @@ done by calling @code{browse-url} as a subroutine
 
   It can be useful to add @code{goto-address-mode} to mode hooks and
 hooks for displaying an incoming message
-(e.g.@: @code{rmail-show-message-hook} for Rmail, and
+(e.g., @code{rmail-show-message-hook} for Rmail, and
 @code{mh-show-mode-hook} for MH-E).  This is not needed for Gnus,
 which has a similar feature of its own.
 
@@ -2487,7 +2517,7 @@ find the one you select (@code{ffap-menu}).
 
 @findex animate-birthday-present
 @cindex animate
-  The @code{animate} package makes text dance (e.g.  @kbd{M-x
+  The @code{animate} package makes text dance (e.g., @kbd{M-x
 animate-birthday-present}).
 
 @findex blackbox