Allow emacsclient to set parameters of new graphical frames (bug#5864)
[bpt/emacs.git] / doc / emacs / misc.texi
index 5c81f2a..f83ac38 100644 (file)
@@ -1,6 +1,6 @@
 @c This is part of the Emacs manual.
-@c Copyright (C) 1985, 1986, 1987, 1993, 1994, 1995, 1997, 2000, 2001,
-@c   2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
+@c Copyright (C) 1985-1987, 1993-1995, 1997, 2000-2011
+@c   Free Software Foundation, Inc.
 @c See file emacs.texi for copying conditions.
 @iftex
 @chapter Miscellaneous Commands
@@ -26,28 +26,39 @@ other editors, and various diversions and amusements.
 @cindex PDF file
 @cindex PS file
 @cindex Postscript file
+@cindex OpenDocument file
+@cindex Microsoft Office file
 @cindex DocView mode
 @cindex mode, DocView
 @cindex document viewer (DocView)
 @findex doc-view-mode
 
 DocView mode (@code{doc-view-mode}) is a viewer for DVI, Postscript
-(PS), and PDF documents.  It provides features such as slicing,
-zooming, and searching inside documents.  It works by converting the
-document to a set of images using the @command{gs} (GhostScript)
-command, and displaying those images.
+(PS), PDF, OpenDocument, and Microsoft Office documents.  It provides
+features such as slicing, zooming, and searching inside documents.  It
+works by converting the document to a set of images using the
+@command{gs} (GhostScript) command and other external tools
+@footnote{@code{gs} is a hard requirement.  For DVI files,
+@code{dvipdf} or @code{dvipdfm} is needed.  For OpenDocument and
+Microsoft Office documents, the @code{unoconv} tool is needed.}, and
+displaying those images.
 
 @findex doc-view-toggle-display
 @findex doc-view-toggle-display
 @cindex doc-view-minor-mode
-  When you visit a PDF or DVI file, Emacs automatically switches to
-DocView mode.  When you visit a Postscript file, Emacs switches to PS
-mode, a major mode for editing Postscript files as text; however, it
-also enables DocView minor mode, so you can type @kbd{C-c C-c} to view
-the document with DocView.  (PDF and DVI files, unlike Postscript
-files, are not usually human-editable.)  In either case, repeating
-@kbd{C-c C-c} (@code{doc-view-toggle-display}) toggles between DocView
-and the file text.
+  When you visit a document file with the exception of Postscript
+files, Emacs automatically switches to DocView mode if possible
+@footnote{The needed external tools for this document type have to be
+available, emacs needs to run in a graphical frame, and PNG image
+support has to be compiled into emacs.  If any of these requirements
+is not fulfilled, DocView falls back to an appropriate mode.}.  When
+you visit a Postscript file, Emacs switches to PS mode, a major mode
+for editing Postscript files as text; however, it also enables DocView
+minor mode, so you can type @kbd{C-c C-c} to view the document with
+DocView.  (PDF and DVI files, unlike Postscript files, are not usually
+human-editable.)  In either case, repeating @kbd{C-c C-c}
+(@code{doc-view-toggle-display}) toggles between DocView and the file
+text.
 
   You can explicitly toggle DocView mode with the command @code{M-x
 doc-view-mode}, and DocView minor mode with the command @code{M-x
@@ -70,10 +81,10 @@ set or customize the variable @code{doc-view-resolution}.
 (@code{quit-window}).
 
 @menu
-* Navigation:: Navigation inside DocView buffers.
-* Searching::  Searching inside documents.
-* Slicing::    Specifing which part of pages should be displayed.
-* Conversion:: Influencing and triggering converison.
+* Navigation::  Navigation inside DocView buffers.
+* Searching::   Searching inside documents.
+* Slicing::     Specifying which part of pages should be displayed.
+* Conversion::  Influencing and triggering conversion.
 @end menu
 
 @node Navigation
@@ -83,11 +94,20 @@ When in DocView mode, you can scroll the current page using the usual
 Emacs movement keys: @kbd{C-p}, @kbd{C-n}, @kbd{C-b}, @kbd{C-f}, and
 the arrow keys.
 
+@vindex doc-view-continuous
+  By default, the line-motion keys @kbd{C-p} and @kbd{C-n} stop
+scrolling at the beginning and end of the current page, respectively.
+However, if you change the variable @code{doc-view-continuous} to a
+non-@code{nil} value, then @kbd{C-p} displays the previous page if you
+are already at the beginning of the current page, and @kbd{C-n}
+displays the next page if you are at the end of the current page.
+
 @findex doc-view-next-page
 @findex doc-view-previous-page
-  To display the next page, type @kbd{n}, @key{next} or @kbd{C-x ]}
-(@code{doc-view-next-page}).  To display the previous page, type
-@kbd{p}, @key{prior} or @kbd{C-x [} (@code{doc-view-previous-page}).
+  You can also display the next page by typing @kbd{n}, @key{next} or
+@kbd{C-x ]} (@code{doc-view-next-page}).  To display the previous
+page, type @kbd{p}, @key{prior} or @kbd{C-x [}
+(@code{doc-view-previous-page}).
 
 @findex doc-view-scroll-up-or-next-page
 @findex doc-view-scroll-down-or-previous-page
@@ -188,13 +208,12 @@ size.  The current page is converted first.
 Gnus is an Emacs package primarily designed for reading and posting
 Usenet news.  It can also be used to read and respond to messages from a
 number of other sources---mail, remote directories, digests, and so on.
-
 Here we introduce Gnus and describe several basic features.
 @ifnottex
 For full details, see @ref{Top, Gnus,, gnus, The Gnus Manual}.
 @end ifnottex
 @iftex
-For full details on Gnus, type @kbd{M-x info} and then select the Gnus
+For full details on Gnus, type @kbd{C-h i} and then select the Gnus
 manual.
 @end iftex
 
@@ -202,9 +221,9 @@ manual.
 To start Gnus, type @kbd{M-x gnus @key{RET}}.
 
 @menu
-* Buffers of Gnus::    The group, summary, and article buffers.
-* Gnus Startup::       What you should know about starting Gnus.
-* Summary of Gnus::    A short description of the basic Gnus commands.
+* Buffers of Gnus::     The group, summary, and article buffers.
+* Gnus Startup::        What you should know about starting Gnus.
+* Summary of Gnus::     A short description of the basic Gnus commands.
 @end menu
 
 @node Buffers of Gnus
@@ -485,6 +504,9 @@ Run the shell command line @var{cmd} and display the output
 Run the shell command line @var{cmd} with region contents as input;
 optionally replace the region with the output
 (@code{shell-command-on-region}).
+@item M-& @var{cmd} @key{RET}
+Run the shell command line @var{cmd} asynchronously, and display the
+output (@code{async-shell-command}).
 @item M-x shell
 Run a subshell with input and output through an Emacs buffer.
 You can then give commands interactively.
@@ -542,6 +564,11 @@ command's exit status (0 means success), when it is called from a Lisp
 program.  You do not get any status information for an asynchronous
 command, since it hasn't finished yet when @code{shell-command} returns.
 
+  You can also type @kbd{M-&} (@code{async-shell-command}) to execute
+a shell command asynchronously.  This behaves exactly like calling
+@code{shell-command} with @samp{&}, except that you do not need to add
+the @samp{&} to the shell command line.
+
 @kindex M-|
 @findex shell-command-on-region
   @kbd{M-|} (@code{shell-command-on-region}) is like @kbd{M-!} but
@@ -564,8 +591,9 @@ the shell to use.  This variable is initialized based on your
 @env{SHELL} environment variable when Emacs is started.  If the file
 name is relative, Emacs searches the directories in the list
 @code{exec-path}; this list is initialized based on the environment
-variable @env{PATH} when Emacs is started.  Your @file{.emacs} file
-can override either or both of these default initializations.
+variable @env{PATH} when Emacs is started.  Your init file can
+override either or both of these default initializations (@pxref{Init
+File}).
 
   Both @kbd{M-!} and @kbd{M-|} wait for the shell command to complete,
 unless you end the command with @samp{&} to make it asynchronous.  To
@@ -594,13 +622,13 @@ before point in that buffer.
 @subsection Interactive Inferior Shell
 
 @findex shell
-  To run a subshell interactively, putting its typescript in an Emacs
-buffer, use @kbd{M-x shell}.  This creates (or reuses) a buffer named
-@samp{*shell*} and runs a subshell with input coming from and output going
-to that buffer.  That is to say, any ``terminal output'' from the subshell
-goes into the buffer, advancing point, and any ``terminal input'' for
-the subshell comes from text in the buffer.  To give input to the subshell,
-go to the end of the buffer and type the input, terminated by @key{RET}.
+  To run a subshell interactively, use @kbd{M-x shell}.  This creates
+(or reuses) a buffer named @samp{*shell*} and runs a subshell with
+input coming from and output going to that buffer.  That is to say,
+any ``terminal output'' from the subshell goes into the buffer,
+advancing point, and any ``terminal input'' for the subshell comes
+from text in the buffer.  To give input to the subshell, go to the end
+of the buffer and type the input, terminated by @key{RET}.
 
   Emacs does not wait for the subshell to do anything.  You can switch
 windows or buffers and edit them while the shell is waiting, or while it is
@@ -627,13 +655,14 @@ Subshells in different buffers run independently and in parallel.
 @cindex @env{ESHELL} environment variable
 @cindex @env{SHELL} environment variable
   The file name used to load the subshell is the value of the variable
-@code{explicit-shell-file-name}, if that is non-@code{nil}.  Otherwise,
-the environment variable @env{ESHELL} is used, or the environment
-variable @env{SHELL} if there is no @env{ESHELL}.  If the file name
-specified is relative, the directories in the list @code{exec-path} are
-searched; this list is initialized based on the environment variable
-@env{PATH} when Emacs is started.  Your @file{.emacs} file can override
-either or both of these default initializations.
+@code{explicit-shell-file-name}, if that is non-@code{nil}.
+Otherwise, the environment variable @env{ESHELL} is used, or the
+environment variable @env{SHELL} if there is no @env{ESHELL}.  If the
+file name specified is relative, the directories in the list
+@code{exec-path} are searched; this list is initialized based on the
+environment variable @env{PATH} when Emacs is started.  Your init file
+can override either or both of these default initializations.
+(@pxref{Init File}).
 
   Emacs sends the new shell the contents of the file
 @file{~/.emacs_@var{shellname}} as input, if it exists, where
@@ -767,8 +796,7 @@ pending in the shell buffer and not yet sent.
 @findex comint-delete-output
 Delete the last batch of output from a shell command
 (@code{comint-delete-output}).  This is useful if a shell command spews
-out lots of output that just gets in the way.  This command used to be
-called @code{comint-kill-output}.
+out lots of output that just gets in the way.
 
 @item C-c C-s
 @kindex C-c C-s @r{(Shell mode)}
@@ -947,12 +975,9 @@ Fetch the next earlier old shell command.
 Fetch the next later old shell command.
 
 @kindex M-r @r{(Shell mode)}
-@kindex M-s @r{(Shell mode)}
-@findex comint-previous-matching-input
-@findex comint-next-matching-input
-@item M-r @var{regexp} @key{RET}
-@itemx M-s @var{regexp} @key{RET}
-Search backwards or forwards for old shell commands that match @var{regexp}.
+@findex comint-history-isearch-backward-regexp
+@item M-r
+Begin an incremental regexp search of old shell commands.
 
 @item C-c C-x
 @kindex C-c C-x @r{(Shell mode)}
@@ -985,15 +1010,15 @@ successively more recent shell commands from the buffer.
 @kbd{C-@key{UP}} works like @kbd{M-p}, and @kbd{C-@key{DOWN}} like
 @kbd{M-n}.
 
-  The history search commands @kbd{M-r} and @kbd{M-s} read a regular
-expression and search through the history for a matching command.  Aside
-from the choice of which command to fetch, they work just like @kbd{M-p}
-and @kbd{M-n}.  If you enter an empty regexp, these commands reuse the
-same regexp used last time.
-
-  When you find the previous input you want, you can resubmit it by
-typing @key{RET}, or you can edit it first and then resubmit it if you
-wish.  Any partial input you were composing before navigating the
+  The history search command @kbd{M-r} begins an incremental regular
+expression search of previous shell commands.  After typing @kbd{M-r},
+start typing the desired string or regular expression; the last
+matching shell command will be displayed in the current line.
+Incremental search commands have their usual effects---for instance,
+@kbd{C-s} and @kbd{C-r} search forward and backward for the next match
+(@pxref{Incremental Search}).  When you find the desired input, type
+@key{RET} to terminate the search.  This puts the input in the command
+line.  Any partial input you were composing before navigating the
 history list is restored when you go to the beginning or end of the
 history ring.
 
@@ -1043,12 +1068,12 @@ Move point to the following prompt (@code{comint-next-prompt}).
 @kindex C-c RET @r{(Shell mode)}
 @findex comint-copy-old-input
 @item C-c @key{RET}
-Copy the input command which point is in, inserting the copy at the end
-of the buffer (@code{comint-copy-old-input}).  This is useful if you
-move point back to a previous command.  After you copy the command, you
-can submit the copy as input with @key{RET}.  If you wish, you can
-edit the copy before resubmitting it.  If you use this command on an
-output line, it copies that line to the end of the buffer.
+Copy the input command at point, inserting the copy at the end of the
+buffer (@code{comint-copy-old-input}).  This is useful if you move
+point back to a previous command.  After you copy the command, you can
+submit the copy as input with @key{RET}.  If you wish, you can edit
+the copy before resubmitting it.  If you use this command on an output
+line, it copies that line to the end of the buffer.
 
 @item Mouse-2
 If @code{comint-use-prompt-regexp} is @code{nil} (the default), copy
@@ -1201,21 +1226,14 @@ 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
 
-  To run a subshell in a terminal emulator, putting its typescript in
-an Emacs buffer, use @kbd{M-x term}.  This creates (or reuses) a
-buffer named @samp{*terminal*}, and runs a subshell with input coming
-from your keyboard, and output going to that buffer.
+  To run a subshell in a terminal emulator, use @kbd{M-x term}.  This
+creates (or reuses) a buffer named @samp{*terminal*}, and runs a
+subshell with input coming from your keyboard, and output going to
+that buffer.
 
   The terminal emulator uses Term mode, which has two input modes.  In
 line mode, Term basically acts like Shell mode; see @ref{Shell Mode}.
@@ -1238,7 +1256,7 @@ appearance of the window matches what it would be on a real terminal.
 You can actually run Emacs inside an Emacs Term window.
 
   You can use Term mode to communicate with a device connected to a
-serial port of your computer, see @ref{Serial Terminal}.
+serial port of your computer.  @xref{Serial Terminal}.
 
   The file name used to load the subshell is determined the same way
 as for Shell mode.  To make multiple terminal emulators, rename the
@@ -1477,6 +1495,15 @@ server-name @key{RET} foo @key{RET}} sets the server name to
 @samp{foo}.  The @code{emacsclient} program can specify a server by
 name, using the @samp{-s} option (@pxref{emacsclient Options}).
 
+@findex server-eval-at
+  If you have defined a server by a unique server name, you can
+connect to this server from other Emacs instances and evaluate forms
+on it by using the @code{server-eval-at} function.
+
+@code{(server-eval-at "foo" '(+ 1 2))} gives the result @code{3}, if
+there's a server with that name that is listening.  If not, an error
+will be signaled.
+
 @menu
 * Invoking emacsclient:: Connecting to the Emacs server.
 * emacsclient Options::  Emacs client startup options.
@@ -1497,19 +1524,21 @@ can then select that frame to begin editing.
 with an error message.  If the Emacs process has no existing
 frame---which can happen if it was started as a daemon (@pxref{Emacs
 Server})---then Emacs opens a frame on the terminal in which you
-called @command{emacsclient}, as though you had used the @samp{-t}
-option (@pxref{emacsclient Options}).
-
-  On a graphical display, switching to the Emacs server is
-straightforward---just select its (system-level) window.  If you are
-using a text-only terminal, there are two ways to switch between
-@command{emacsclient}'s shell and the Emacs server: (i) run the Emacs
-server and @command{emacsclient} on different virtual terminals, and
-switch to the Emacs server's virtual terminal after calling
-@command{emacsclient}; or (ii) call @command{emacsclient} from within
-the Emacs server itself, using Shell mode (@pxref{Interactive Shell})
-or Term mode (@pxref{Term Mode}); @code{emacsclient} blocks only the
-subshell under Emacs, and you can still use Emacs to edit the file.
+called @command{emacsclient}.
+
+  You can also force @command{emacsclient} to open a new frame on a
+graphical display, or on a text-only terminal, using the @samp{-c} and
+@samp{-t} options.  @xref{emacsclient Options}.
+
+  If you are running on a single text-only terminal, you can switch
+between @command{emacsclient}'s shell and the Emacs server using one
+of two methods: (i) run the Emacs server and @command{emacsclient} on
+different virtual terminals, and switch to the Emacs server's virtual
+terminal after calling @command{emacsclient}; or (ii) call
+@command{emacsclient} from within the Emacs server itself, using Shell
+mode (@pxref{Interactive Shell}) or Term mode (@pxref{Term Mode});
+@code{emacsclient} blocks only the subshell under Emacs, and you can
+still use Emacs to edit the file.
 
 @kindex C-x #
 @findex server-edit
@@ -1517,7 +1546,7 @@ subshell under Emacs, and you can still use Emacs to edit the file.
 @kbd{C-x #} (@code{server-edit}) in its buffer.  This saves the file
 and sends a message back to the @command{emacsclient} program, telling
 it to exit.  Programs that use @env{EDITOR} usually wait for the
-``editor''---in the case @command{emacsclient}---to exit before doing
+``editor''---in this case @command{emacsclient}---to exit before doing
 something else.
 
   You can also call @command{emacsclient} with multiple file name
@@ -1546,9 +1575,9 @@ with @kbd{C-x #}.  But @kbd{C-x #} is the way to tell
 @command{emacsclient} that you are finished.
 
 @vindex server-window
-  If you set the variable @code{server-window} to a window or a frame,
-@kbd{C-x #} always displays the next server buffer in that window or
-in that frame.
+  If you set the value of the variable @code{server-window} to a
+window or a frame, @kbd{C-x #} always displays the next server buffer
+in that window or in that frame.
 
 @node emacsclient Options
 @subsection @code{emacsclient} Options
@@ -1574,19 +1603,15 @@ listed below:
 @item -a @var{command}
 @itemx --alternate-editor=@var{command}
 Specify a command to run if @code{emacsclient} fails to contact Emacs.
-This is useful when running @code{emacsclient} in a script.  For
-example, the following setting for the @env{EDITOR} environment
-variable will always give you an editor, even if no Emacs server is
-running:
+This is useful when running @code{emacsclient} in a script.
 
-@example
-EDITOR="emacsclient --alternate-editor emacs +%d %s"
-@end example
+As a special exception, if @var{command} is the empty string, then
+@code{emacsclient} starts Emacs in daemon mode and then tries
+connecting again.
 
-@noindent
 @cindex @env{ALTERNATE_EDITOR} environment variable
-The environment variable @env{ALTERNATE_EDITOR} has the same effect,
-with the value of the @samp{--alternate-editor} option taking
+The environment variable @env{ALTERNATE_EDITOR} has the same effect as
+the @samp{-a} option.  If both are present, the latter takes
 precedence.
 
 @item -c
@@ -1598,6 +1623,11 @@ text-only terminal frame (@pxref{Frames}).  If you omit a filename
 argument while supplying the @samp{-c} option, the new frame displays
 the @samp{*scratch*} buffer (@pxref{Buffers}).
 
+@item -F
+@itemx --frame-parameters=@var{alist}
+Set the parameters for a newly-created graphical frame
+(@pxref{Frame Parameters}).
+
 @item -d @var{display}
 @itemx --display=@var{display}
 Tell Emacs to open the given files on the X display @var{display}
@@ -1648,6 +1678,11 @@ all server buffers are finished.  You can take as long as you like to
 edit the server buffers within Emacs, and they are @emph{not} killed
 when you type @kbd{C-x #} in them.
 
+@item -q
+@itemx --quiet
+Do not let @command{emacsclient} display messages about waiting for
+Emacs or connecting to remote server sockets.
+
 @item -s @var{server-name}
 @itemx --socket-name=@var{server-name}
 Connect to the Emacs server named @var{server-name}.  The server name
@@ -1686,8 +1721,14 @@ process, type @kbd{M-x kill-emacs}.
   Emacs provides commands for printing hard copies of either an entire
 buffer or just part of one, with or without page headers.  You can
 invoke the printing commands directly, as detailed in the following
-section, or using the @samp{File} menu on the menu bar.  See also the
-hardcopy commands of Dired (@pxref{Misc File Ops}) and the diary
+section, or using the @samp{File} menu on the menu bar.
+
+@findex htmlfontify-buffer
+  Aside from the commands described in this section, you can also
+``print'' an Emacs buffer to HTML with @kbd{M-x htmlfontify-buffer}.
+This command converts the current buffer to a HTML file, replacing
+Emacs faces with CSS-based markup.  In addition, see the hardcopy
+commands of Dired (@pxref{Misc File Ops}) and the diary
 (@pxref{Displaying the Diary}).
 
 @table @kbd
@@ -1736,7 +1777,7 @@ whether to supply @samp{-T} and @samp{-J} options (suitable for
 not compatible with @code{lpr}.
 
 @menu
-* PostScript::          Printing buffers or regions as PostScript.
+* PostScript::           Printing buffers or regions as PostScript.
 * PostScript Variables:: Customizing the PostScript printing commands.
 * Printing Package::     An optional advanced printing interface.
 @end menu
@@ -1759,15 +1800,17 @@ faces used in the text by means of PostScript features.
 Print hardcopy of the current region in PostScript form, showing the
 faces used in the text.
 @item M-x ps-spool-buffer
-Generate PostScript for the current buffer text.
+Generate and spool a PostScript image for the current buffer text.
 @item M-x ps-spool-region
-Generate PostScript for the current region.
+Generate and spool a PostScript image for the current region.
 @item M-x ps-spool-buffer-with-faces
-Generate PostScript for the current buffer, showing the faces used.
+Generate and spool a PostScript image for the current buffer, showing the faces used.
 @item M-x ps-spool-region-with-faces
-Generate PostScript for the current region, showing the faces used.
+Generate and spool a PostScript image for the current region, showing the faces used.
+@item M-x ps-despool
+Send the spooled PostScript to the printer.
 @item M-x handwrite
-Generates/prints PostScript for the current buffer as if handwritten.
+Generate/print PostScript for the current buffer as if handwritten.
 @end table
 
 @findex ps-print-region
@@ -1780,7 +1823,17 @@ command prints the entire buffer; the other, just the region.  The
 corresponding @samp{-with-faces} commands,
 @code{ps-print-buffer-with-faces} and @code{ps-print-region-with-faces},
 use PostScript features to show the faces (fonts and colors) in the text
-properties of the text being printed.
+properties of the text being printed.  The @samp{-with-faces} commands only
+work if they are used in a window system, so it has a way to determine color
+values.
+
+  Interactively, when you use a prefix argument (@kbd{C-u}), the command
+prompts the user for a file name, and saves the PostScript image in that file
+instead of sending it to the printer.
+
+  Noninteractively, the argument @var{filename} is treated as follows: if it is
+@code{nil}, send the image to the printer.  If @var{filename} is a string, save
+the PostScript image in a file with that name.
 
   If you are using a color display, you can print a buffer of program
 code with color highlighting by turning on Font-Lock mode in that
@@ -1790,10 +1843,24 @@ buffer, and using @code{ps-print-buffer-with-faces}.
 @findex ps-spool-buffer
 @findex ps-spool-region-with-faces
 @findex ps-spool-buffer-with-faces
-  The commands whose names have @samp{spool} instead of @samp{print}
+  The commands whose names have @samp{spool} instead of @samp{print},
 generate the PostScript output in an Emacs buffer instead of sending
 it to the printer.
 
+  Use the command @code{ps-despool} to send the spooled images to the printer.
+
+@findex ps-despool
+  This command sends the PostScript generated by  @samp{-spool-} commands (see
+commands above) to the printer.
+
+  Interactively, when you use a prefix argument (@kbd{C-u}), the command
+prompts the user for a file name, and saves the spooled PostScript image in
+that file instead of sending it to the printer.
+
+  Noninteractively, the argument @var{filename} is treated as follows: if it is
+@code{nil}, send the image to the printer.  If @var{filename} is a string, save
+the PostScript image in a file with that name.
+
 @findex handwrite
 @cindex handwriting
 @kbd{M-x handwrite} is more frivolous.  It generates a PostScript
@@ -1834,6 +1901,9 @@ with color information; on black-and-white printers, colors are emulated
 with shades of gray.  This might produce illegible output, even if your
 screen colors only use shades of gray.
 
+  Alternatively, you can set @code{ps-print-color-p} to @code{black-white} to
+print colors on black/white printers.
+
 @vindex ps-use-face-background
   By default, PostScript printing ignores the background colors of the
 faces, unless the variable @code{ps-use-face-background} is
@@ -2291,7 +2361,7 @@ desktop-save}.  You can also enable automatic saving of the desktop
 when you exit Emacs, and automatic restoration of the last saved
 desktop when Emacs starts: 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:
+sessions, or add this line in your init file (@pxref{Init File}):
 
 @example
 (desktop-save-mode 1)
@@ -2299,20 +2369,23 @@ sessions, or add this line in your @file{~/.emacs} file:
 
 @findex desktop-change-dir
 @findex desktop-revert
-  If you turn on @code{desktop-save-mode} in your @file{~/.emacs},
-then 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.
+@vindex desktop-path
+  If you turn on @code{desktop-save-mode} in your init file, then when
+Emacs starts, it looks for a saved desktop in the current directory.
+(More precisely, it looks in the directories specified by
+@var{desktop-path}, and uses the first desktop it finds.)
+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.  This turns off
 @code{desktop-save-mode} for the current session.  Starting Emacs with
 the @samp{--no-init-file} option also disables desktop reloading,
-since it bypasses the @file{.emacs} init file, where
-@code{desktop-save-mode} is usually turned on.
+since it bypasses the init file, where @code{desktop-save-mode} is
+usually turned on.
 
 @vindex desktop-restore-eager
   By default, all the buffers in the desktop are restored at one go.
@@ -2437,9 +2510,8 @@ also use the command @kbd{M-x scroll-all-mode} or set the variable
 @item EDT (DEC VMS editor)
 @findex edt-emulation-on
 @findex edt-emulation-off
-Turn on EDT emulation with the command @kbd{M-x edt-emulation-on},
-while @kbd{M-x edt-emulation-off} restores normal Emacs command
-bindings.
+Turn on EDT emulation @kbd{M-x edt-emulation-on}; use @kbd{M-x
+edt-emulation-off} to restore normal Emacs command bindings.
 
 Most of the EDT emulation commands are keypad keys, and most standard
 Emacs key bindings are still available.  The EDT emulation rebindings
@@ -2521,7 +2593,7 @@ fashion.
 
 @menu
 * Browse-URL::                  Following URLs.
-* Goto-address::                Activating URLs.
+* Goto Address mode::           Activating URLs.
 * FFAP::                        Finding files etc. at point.
 @end menu
 
@@ -2562,31 +2634,31 @@ 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
+@node Goto Address mode
 @subsection Activating URLs
-@findex goto-address
-@cindex Goto-address
+@findex goto-address-mode
+@cindex Goto Address mode
 @cindex URLs, activating
 
 @table @kbd
-@item M-x goto-address
+@item M-x goto-address-mode
 Activate URLs and e-mail addresses in the current buffer.
 @end table
 
   You can make URLs in the current buffer active with @kbd{M-x
-goto-address}.  This finds all the URLs in the buffer, and establishes
-bindings for @kbd{Mouse-2} and @kbd{C-c @key{RET}} on them.  After
-activation, if you click on a URL with @kbd{Mouse-2}, or move to a URL
-and type @kbd{C-c @key{RET}}, that will display the web page that the URL
-specifies.  For a @samp{mailto} URL, it sends mail instead, using your
-selected mail-composition method (@pxref{Mail Methods}).
-
-  It can be useful to add @code{goto-address} to mode hooks and the
-hooks used to display an incoming message.
-@code{rmail-show-message-hook} is the appropriate 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.
-
+goto-address-mode}.  This minor mode finds all the URLs in the buffer,
+highlights them, and turns them into @dfn{buttons}: if you click on a
+URL with @kbd{Mouse-1} or @kbd{Mouse-2} (@pxref{Mouse References}), or
+move to the URL and type @kbd{C-c @key{RET}}, that displays the web
+page that the URL specifies.  For a @samp{mailto} URL, it sends mail
+instead, using your selected mail-composition method (@pxref{Mail
+Methods}).
+
+  It can be useful to add @code{goto-address-mode} to mode hooks and
+the hooks used to display an incoming message (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.
 
 @node FFAP
 @subsection Finding Files and URLs at Point
@@ -2678,16 +2750,14 @@ typing @kbd{C-g}.  The dissociation output remains in the
 @samp{*Dissociation*} buffer for you to copy elsewhere if you wish.
 
 @cindex presidentagon
-  Dissociated Press operates by jumping at random from one point 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 output `president' and then decides to jump
-to a different point in the buffer, 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
-appropriate.  Bush has made it appropriate again.}  Long sample texts
-produce the best results.
+  Dissociated Press operates by jumping at random from one point 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 output `president' and then decides to
+jump to a different point in the buffer, it might spot the `ent' in
+`pentagon' and continue from there, producing `presidentagon'.  Long
+sample texts produce the best results.
 
 @cindex againformation
   A positive argument to @kbd{M-x dissociated-press} tells it to operate
@@ -2736,6 +2806,10 @@ bored, try an argument of 9.  Sit back and watch.
   If you want a little more personal involvement, try @kbd{M-x gomoku},
 which plays the game Go Moku with you.
 
+@findex bubbles
+  @kbd{M-x bubbles} is a game in which the object is to remove as many
+bubbles as you can in the smallest number of moves.
+
 @findex blackbox
 @findex mpuz
 @findex 5x5
@@ -2784,6 +2858,11 @@ bats.
 @kbd{M-x solitaire} plays a game of solitaire in which you jump pegs
 across other pegs.
 
+@findex animate-birthday-present
+@cindex animate
+The @code{animate} package makes text dance.  For an example, try
+@kbd{M-x animate-birthday-present}.
+
 @findex studlify-region
 @cindex StudlyCaps
 @kbd{M-x studlify-region} studlify-cases the region, producing
@@ -2813,7 +2892,3 @@ idle.
 @ifnottex
 @lowersections
 @end ifnottex
-
-@ignore
-   arch-tag: 8f094220-c0d5-4e9e-af7d-3e0da8187474
-@end ignore