@c This is part of the Emacs manual.
-@c Copyright (C) 1985, 86, 87, 93, 94, 95, 1997 Free Software Foundation, Inc.
+@c Copyright (C) 1985, 86, 87, 93, 94, 95, 97, 2000
+@c Free Software Foundation, Inc.
@c See file emacs.texi for copying conditions.
@iftex
@chapter Miscellaneous Commands
@item M-x shell
Run a subshell with input and output through an Emacs buffer.
You can then give commands interactively.
+@item M-x term
+Run a subshell with input and output through an Emacs buffer.
+You can then give commands interactively.
+Full terminal emulation is available.
@end table
@menu
* Shell Mode:: Special Emacs commands used with permanent shell.
* History: Shell History. Repeating previous commands in a shell buffer.
* Options: Shell Options. Options for customizing Shell mode.
+* Terminal emulator:: An Emacs window as a terminal emulator.
+* Term Mode:: Special Emacs commands used in Term mode.
+* Paging in Term:: Paging in the terminal emulator.
* Remote Host:: Connecting to another computer.
@end menu
@vindex shell-file-name
@cindex environment
Both @kbd{M-!} and @kbd{M-|} use @code{shell-file-name} to specify the
-shell to use. This variable is initialized based on your @code{SHELL}
+shell to use. This variable is initialized based on your @env{SHELL}
environment variable when Emacs is started. If the file name does not
specify a directory, the directories in the list @code{exec-path} are
searched; this list is initialized based on the environment variable
-@code{PATH} when Emacs is started. Your @file{.emacs} file can override
+@env{PATH} when Emacs is started. Your @file{.emacs} file can override
either or both of these default initializations.@refill
Both @kbd{M-!} and @kbd{M-|} wait for the shell command to complete.
one, and so on. All the subshells run independently and in parallel.
@vindex explicit-shell-file-name
-@cindex @code{ESHELL} environment variable
-@cindex @code{SHELL} environment variable
+@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 @code{ESHELL} is used, or the environment
-variable @code{SHELL} if there is no @code{ESHELL}. If the file name
+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
-@code{PATH} when Emacs is started. Your @file{.emacs} file can override
+@env{PATH} when Emacs is started. Your @file{.emacs} file can override
either or both of these default initializations.
To specify a coding system for the shell, you can use the command
alternative and more aggressive method of tracking changes in the
current directory.
- Emacs defines the environment variable @code{EMACS} in the subshell,
+ Emacs defines the environment variable @env{EMACS} in the subshell,
with value @code{t}. A shell script can check this variable to
determine whether it has been run from an Emacs subshell.
(@code{shell-pushd-dunique}). The values you choose should match the
underlying shell, of course.
+@node Terminal emulator
+@subsection Interactive Inferior Shell with 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{*term*} and runs a subshell with input coming from your keyboard and
+output going to that buffer.
+
+All the normal keys that you type are sent without any interpretation
+by Emacs directly to the subshell, as ``terminal input''.
+Any ``echo'' of your input is the responsibility of the subshell.
+(The exception is the terminal escape character,
+which by default is @kbd{C-c}. @xref{Term Mode}.)
+Any ``terminal output'' from the subshell goes into the buffer,
+advancing point.
+
+ Some programs (such as Emacs itself) need to control the
+appearance on the terminal screen in detail. They do this by
+sending special control codes. The exact control
+codes needed vary from terminal to terminal, but nowadays
+most terminals and terminal emulators (including @code{xterm})
+understand the ANSI-standard (VT100-style) escape sequences.
+Term mode also understands these escape sequences,
+and for each control code does the appropriate thing
+to change the buffer so that the appearance of the window
+matches what it would be on a real terminal.
+Thus you can actually run Emacs inside an Emacs Term window!
+
+ 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 running a command. Output from the subshell waits until Emacs
+has time to process it; this happens whenever Emacs is waiting for
+keyboard input or for time to elapse.
+
+ To make multiple terminal emulators, rename the buffer @samp{*term*}
+to something different using @kbd{M-x rename-uniquely},
+just as with Shell mode.
+
+ The file name used to load the subshell is determined
+the same way as for Shell mode.
+
+Unlike Shell mode, Term mode does not track the current directory
+by examining your input. Instead, if you use a programmable
+shell, you can have it tell Term what the current directory is.
+This is done automatically by @code{bash} version 1.15 and later.
+
+@node Term Mode
+@subsection Term Mode
+@cindex Term mode
+@cindex mode, Term
+
+ Term uses Term mode, which has two input modes:
+In line mode, Term basically acts like Shell mode. @xref{Shell Mode}.
+In Char mode, each character is sent directly to the inferior 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)}
+@findex term-char-mode
+@item C-c C-k
+Switch to line mode. Do nothing if already in line mode.
+
+@kindex C-c C-j @r{(Term mode)}
+@findex term-line-mode
+@item C-c C-j
+Switch to char mode. Do nothing if already in char mode.
+@end table
+
+The following commands are only available in Char mode:
+@table @kbd
+@item C-c C-c
+Send a literal @key{C-c} to the sub-shell.
+
+@item C-c C-x
+A prefix command to access the global @key{C-x} commands conveniently.
+For example, @kbd{C-c C-x o} invokes the global binding of
+@kbd{C-x o}, which is normally @samp{other-window}.
+@end table
+
+@node Paging in Term
+@subsection Paging in the terminal emulator
+
+Term mode has a pager feature. When the pager is enabled,
+term mode will pause at the end of each screenful.
+
+@table @kbd
+@kindex C-c C-q @r{(Term mode)}
+@findex term-pager-toggle
+@item C-c C-q
+Toggles the pager feature: Disables the pager if it is enabled,
+and vice versa. This works in both line and char modes.
+If the pager enabled, the mode-line contains the word @samp{page}.
+@end table
+
+If the pager is enabled, and Term receives more than a screenful
+of output since your last input, Term will enter More break mode.
+This is indicated by @samp{**MORE**} in the mode-line.
+Type a @kbd{Space} to display the next screenful of output.
+Type @kbd{?} to see your other options. The interface is similar
+to the Unix @code{more} program.
+
@node Remote Host
@subsection Remote Host Shell
@cindex remote host
@cindex Telnet
@cindex Rlogin
- Emacs provides two commands for logging in to another computer
+ You can login to a remote computer, using whatever commands you
+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
+echoing of the password, so the password will not show up in the buffer.
+This will happen just as if you were using a real terminal, if
+the buffer is in char mode. If it is in line mode, the password
+will be temporarily visible, but will be erased when you hit return.
+(This happens automatically; there is no special password processing.)
+
+When you log in to a different machine, you need to specify the
+type of terminal your using. Terminal types @samp{ansi}
+or @samp{vt100} will work on most systems.
+
+@c If you are talking to a Bourne-compatible
+@c shell, and your system understands the @env{TERMCAP} variable,
+@c you can use the command @kbd{M-x shell-send-termcap}, which
+@c sends a string specifying the terminal type and size.
+@c (This command is also useful after the window has changed size.)
+
+@c You can of course run @samp{gdb} on that remote computer. One useful
+@c trick: If you invoke gdb with the @code{--fullname} option,
+@c it will send special commands to Emacs that will cause Emacs to
+@c pop up the source files you're debugging. This will work
+@c whether or not gdb is running on a different computer than Emacs,
+@c as long as Emacs can access the source files specified by gdb.
+
+You cannot log into to a remove comuter using the Shell mode.
+@c (This will change when Shell is re-written to use Term.)
+Instead, Emacs provides two commands for logging in to another computer
and communicating with it through an Emacs buffer.
@table @kbd
@pindex emacsclient
@cindex Emacs as a server
@cindex server, using Emacs as
-@cindex @code{EDITOR} environment variable
+@cindex @env{EDITOR} environment variable
Various programs such as @code{mail} can invoke your choice of editor
to edit a particular piece of text, such as a message that you are
sending. By convention, most of these programs use the environment
-variable @code{EDITOR} to specify which editor to run. If you set
-@code{EDITOR} to @samp{emacs}, they invoke Emacs---but in an
+variable @env{EDITOR} to specify which editor to run. If you set
+@env{EDITOR} to @samp{emacs}, they invoke Emacs---but in an
inconvenient fashion, by starting a new, separate Emacs process. This
is inconvenient because it takes time and because the new Emacs process
doesn't share the buffers in the existing Emacs process.
programs like @code{mail} by using the Emacs client and Emacs server
programs. Here is how.
-@cindex @code{TEXEDIT} environment variable
+@cindex @env{TEXEDIT} environment variable
First, the preparation. Within Emacs, call the function
@code{server-start}. (Your @file{.emacs} file can do this automatically
if you add the expression @code{(server-start)} to it.) Then, outside
-Emacs, set the @code{EDITOR} environment variable to @samp{emacsclient}.
+Emacs, set the @env{EDITOR} environment variable to @samp{emacsclient}.
(Note that some programs use a different environment variable; for
example, to make @TeX{} use @samp{emacsclient}, you should set the
-@code{TEXEDIT} environment variable to @samp{emacsclient +%d %s}.)
+@env{TEXEDIT} environment variable to @samp{emacsclient +%d %s}.)
@kindex C-x #
@findex server-edit
- Then, whenever any program invokes your specified @code{EDITOR}
+ Then, whenever any program invokes your specified @env{EDITOR}
program, the effect is to send a message to your principal Emacs telling
it to visit a file. (That's what the program @code{emacsclient} does.)
Emacs displays the buffer immediately and you can immediately begin
When you've finished editing that buffer, type @kbd{C-x #}
(@code{server-edit}). This saves the file and sends a message back to
the @code{emacsclient} program telling it to exit. The programs that
-use @code{EDITOR} wait for the ``editor'' (actually, @code{emacsclient})
+use @env{EDITOR} wait for the ``editor'' (actually, @code{emacsclient})
to exit. @kbd{C-x #} also checks for other pending external requests
to edit various files, and selects the next such file.
this sense; its value should be a regular expression that matches file
names that are temporary.
+@vindex server-kill-new-buffers
+ If the variable @code{server-kill-new-buffers} is set to non-nil,
+buffers which still have a client are killed when you are done with
+them, unless they were already present before Emacs Server visited
+them. This overrides the effect of the @code{server-temp-file-regexp}
+variable. By default, @code{server-kill-new-buffers} has a non-nil
+value; set it to nil if you want the old behavior governed by
+@code{server-temp-file-regexp}.
+
If you run @code{emacsclient} with the option @samp{--no-wait}, it
returns immediately without waiting for you to ``finish'' the buffer in
-Emacs.
+Emacs. Note that it this case, buffers for temporary files will not be
+killed automatically with the default value of
+@code{server-kill-new-buffers}, since those buffers will not have a
+client.
+
+ If you have forgotten to start Emacs, then the option
+@samp{--alternate-editor=@var{command}} may be useful. It specifies a
+command to run if @code{emacsclient} fails to contact Emacs. For
+example, the following setting for the @var{EDITOR} environment variable
+will always give an editor, even if Emacs is not running.
+
+@example
+EDITOR="emacsclient --alternate-editor vi +%d %s"
+@end example
+
+The environment variable @var{ALTERNATE_EDITOR} has the same effect, but
+the value of the @samp{--alternate-editor} takes precedence.
+
+@pindex emacs.bash
+Alternatively, the file @file{etc/emacs.bash} defines a function for
+@command{bash} which will use a running Emacs server or start one if
+none exists.
@menu
* Invoking emacsclient::
as you like to edit the files in Emacs.)
-@node Hardcopy, Postscript, Emacs Server, Top
+@node Hardcopy, PostScript, Emacs Server, Top
@section Hardcopy Output
@cindex hardcopy
@code{lpr-add-switches} should be @code{nil} if your printer program is
not compatible with @code{lpr}.
-@node Postscript, Postscript Variables, Hardcopy, Top
-@section Postscript Hardcopy
+@node PostScript, PostScript Variables, Hardcopy, Top
+@section PostScript Hardcopy
- These commands convert buffer contents to Postscript,
+ These commands convert buffer contents to PostScript,
either printing it or leaving it in another Emacs buffer.
@table @kbd
@item M-x ps-print-buffer
-Print hardcopy of the current buffer in Postscript form.
+Print hardcopy of the current buffer in PostScript form.
@item M-x ps-print-region
-Print hardcopy of the current region in Postscript form.
+Print hardcopy of the current region in PostScript form.
@item M-x ps-print-buffer-with-faces
-Print hardcopy of the current buffer in Postscript form, showing the
-faces used in the text by means of Postscript features.
+Print hardcopy of the current buffer in PostScript form, showing the
+faces used in the text by means of PostScript features.
@item M-x ps-print-region-with-faces
-Print hardcopy of the current region in Postscript form, showing the
+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 PostScript for the current buffer text.
@item M-x ps-spool-region
-Generate Postscript for the current region.
+Generate PostScript for the current region.
@item M-x ps-spool-buffer-with-faces
-Generate Postscript for the current buffer, showing the faces used.
+Generate PostScript 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 PostScript for the current region, showing the faces used.
+@item M-x handwrite
+Generates/prints PostScript for the current buffer as if handwritten.
@end table
@findex ps-print-region
@findex ps-print-buffer
@findex ps-print-region-with-faces
@findex ps-print-buffer-with-faces
- The Postscript commands, @code{ps-print-buffer} and
-@code{ps-print-region}, print buffer contents in Postscript form. One
+ The PostScript commands, @code{ps-print-buffer} and
+@code{ps-print-region}, print buffer contents in PostScript form. One
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
+use PostScript features to show the faces (fonts and colors) in the text
properties of the text being printed.
If you are using a color display, you can print a buffer of program
@findex ps-spool-region-with-faces
@findex ps-spool-buffer-with-faces
The commands whose names have @samp{spool} instead of @samp{print}
-generate the Postscript output in an Emacs buffer instead of sending
+generate the PostScript output in an Emacs buffer instead of sending
it to the printer.
+@findex handwrite
+@cindex handwriting
+@kbd{M-x handwrite} is more frivolous. It generates a PostScript
+rendition of the current buffer as a cursive handwritten document. It
+can be customized in group @code{handwrite}.
+
@ifinfo
The following section describes variables for customizing these commands.
@end ifinfo
-@node Postscript Variables, Sorting, Postscript, Top
-@section Variables for Postscript Hardcopy
+@node PostScript Variables, Sorting, PostScript, Top
+@section Variables for PostScript Hardcopy
@vindex ps-lpr-command
@vindex ps-lpr-switches
@vindex ps-printer-name
- All the Postscript hardcopy commands use the variables
+ All the PostScript hardcopy commands use the variables
@code{ps-lpr-command} and @code{ps-lpr-switches} to specify how to print
the output. @code{ps-lpr-command} specifies the command name to run,
@code{ps-lpr-switches} specifies command line options to use, and
Many other customization variables for these commands are defined and
described in the Lisp file @file{ps-print.el}.
-@node Sorting, Narrowing, Postscript Variables, Top
+@node Sorting, Narrowing, PostScript Variables, Top
@section Sorting Text
@cindex sorting
@findex sort-pages
@findex sort-fields
@findex sort-numeric-fields
+@vindex sort-numeric-base
@table @kbd
@item M-x sort-lines
Divide the region into lines, and sort by comparing the entire
Like @kbd{M-x sort-fields} except the specified field is converted
to an integer for each line, and the numbers are compared. @samp{10}
comes before @samp{2} when considered as text, but after it when
-considered as a number.
+considered as a number. By default, numbers are interpreted according
+to @code{sort-numeric-base}, but numbers beginning with @samp{0x} or
+@samp{0} are interpreted as hexadecimal and octal, respectively.
@item M-x sort-columns
Like @kbd{M-x sort-fields} except that the text within each line
@cindex Hexl mode
@cindex mode, Hexl
@cindex editing binary files
+@cindex hex editing
There is a special major mode for editing binary files: Hexl mode. To
use it, use @kbd{M-x hexl-find-file} instead of @kbd{C-x C-f} to visit
the file. This command converts the file's contents to hexadecimal and
invoked @code{hexl-mode}.
@end table
+@noindent
+Other Hexl commands let you insert strings (sequences) of binary bytes,
+move by short's or int's, etc.; type @kbd{C-h a hexl- RET} for details.
+
+
@node Saving Emacs Sessions, Recursive Edit, Editing Binary Files, Top
@section Saving Emacs Sessions
@cindex saving sessions
saving, set @code{desktop-files-not-to-save} to @code{"^$"}.
@xref{Remote Files}.
+@vindex save-place
+@cindex Saveplace
+@findex toggle-save-place
+There is a simpler mechanism provided by Saveplace library which 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.
+
@node Recursive Edit, Emulation, Saving Emacs Sessions, Top
@section Recursive Editing Levels
@cindex recursive editing level
approaches give you more flexibility to go back to unfinished tasks in
the order you choose.
-@node Emulation, Dissociated Press, Recursive Edit, Top
+@node Emulation, Hyperlinking, Recursive Edit, Top
@section Emulation
@cindex emulating other editors
@cindex other editors
@cindex EDT
@cindex vi
+@cindex CRiSP
+@cindex Brief
+@cindex PC keybindings
+@cindex scrolling all windows
+@cindex PC selecion
+@cindex Motif keybindings
+@cindex Macintosh keybindings
+@cindex WordStar
GNU Emacs can be programmed to emulate (more or less) most other
editors. Standard facilities can emulate these:
@table @asis
+@item CRiSP/Brief (PC editor)
+@findex crisp-mode
+@vindex crisp-override-meta-x
+@findex scroll-all-mode
+@cindex CRiSP mode
+@cindex Brief emulation
+@cindex mode, CRiSP
+You can turn on keybindings 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
+@code{crisp-load-scroll-all} to emulate CRiSP's scroll-all feature
+(scrolling all windows together).
+
@item EDT (DEC VMS editor)
@findex edt-emulation-on
@findex edt-emulation-off
are done in the global keymap, so there is no problem switching
buffers or major modes while in EDT emulation.
+@item `PC' bindings
+@findex pc-bindings-mode
+@cindex `PC' key bindings
+The command @kbd{M-x pc-bindings-mode} sets up certain key bindings for
+`PC compatibility'---what people are often used to on PCs---as follows:
+@kbd{Delete} and its variants) delete forward instead of backward,
+@kbd{C-Backspace} kills backward a word (as @kbd{C-Delete} normally
+would), @kbd{M-Backspace} does undo, @kbd{Home} and @kbd{End} move to
+beginning and end of line, @kbd{C-Home} and @kbd{C-End} move to
+beginning and end of buffer and @kbd{C-Escape} does @code{list-buffers}.
+
+@item PC Selection mode
+@findex pc-selection-mode
+@cindex PC Selection minor mode
+@cindex mode, PC selection
+@cindex selection, `PC'
+The command @kbd{M-x pc-selction-mode} turns on a global minor mode
+which emulates the mark, copy, cut and paste
+look-and-feel of Motif programs (which is the same as the Macintosh GUI
+and MS-Windows). It makes the keybindings 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 @kbd{C-c}, @kbd{C-v} and
+@kbd{C-x} are not rebound.
+
+The standard keys for moving around (@kbd{right}, @kbd{left}, @kbd{up},
+@kbd{down}, @kbd{home}, @kbd{end}, @kbd{prior}, @kbd{next}, called
+``move-keys'') will always de-activate the mark. Using @kbd{Shift}
+together with the ``move keys'' activates the region over which they
+move. The copy, cut and paste functions (as in many other programs)
+operate on the active region, bound to @kbd{C-insert}, @kbd{S-delete}
+and @kbd{S-insert} respectively.
+
+@cindex s-region package
+The @code{s-region} package provides similar, but less complete,
+facilities.
+
+@item TPU (DEC VMS editor)
+@findex tpu-edt-on
+@cindex TPU
+@kbd{M-x tpu-edt-on} turns on emulation of the TPU editor emulating EDT.
+
@item vi (Berkeley editor)
@findex viper-mode
Viper is the newest emulator for vi. It implements several levels of
not use it.
@inforef{Top, VIP, vip}, for full information.
+
+@item WordStar (old wordprocessor)
+@findex wordstar-mode
+@kbd{M-x wordstar-mode} provides a major mode with WordStar-like
+keybindings.
@end table
-@node Dissociated Press, Amusements, Emulation, Top
+@node Hyperlinking, Dissociated Press, Emulation, Top
+@section Hyperlinking and Navigation Features
+
+@cindex hyperlinking
+@cindex URLs
+@cindex navigation
+Various modes documented elsewhere have hypertext features whereby you
+can follow links, usually with @kbd{mouse-2} or @kbd{RET} on the text of
+the link. Info mode, Help mode and the Dired-like modes are examples.
+The Tags facility links between uses and definitions in source files,
+see @ref{Tags}. Imenu provides navigation amongst items indexed in the
+current buffer, see @ref{Imenu}. Info-lookup provides mode-specific
+lookup of definitions in Info indexes, see @ref{Documentation}.
+Speedbar maintains a frame in which links to files, and locations in
+files are displayed, see @ref{Speedbar}.
+
+Other non-mode-specific facilities described in this section enable
+following links from the current buffer in a context-sensitive fashion.
+
+@menu
+* Browse-URL:: Following URLs.
+* Goto-address:: Activating URLs.
+* FFAP:: Finding files etc. at point.
+* Find-func:: Finding function and variable definitions.
+@end menu
+
+@node Browse-URL
+@subsection Following URLs
+@cindex World Wide Web
+@cindex Web
+@findex browse-url
+@findex browse-url-at-point
+@findex browse-url-at-mouse
+@cindex Browse-URL
+@cindex URLs
+
+@table @kbd
+@item M-x browse-url @key{RET} @var{url} @key{ret}
+Load a URL into a Web browser.
+@end table
+
+The Browse-URL package provides facilities for following URLs specifying
+links on the World Wide Web. Usually this works by invoking a web
+browser but you can, for instance, arrange to invoke @code{compose-mail}
+from @samp{mailto:} URLs. Packages such as Gnus may make active links
+from URLs themselves. Otherwise you can use @kbd{M-x browse-url} to
+follow a link, defaulting to the URL at point. Other commands are
+available which you might like to bind to keys, such as
+@code{browse-url-at-point} and @code{browse-url-at-mouse}.
+
+@vindex browse-url-browser-function
+You can customize Browse-URL's behaviour via various options in the
+@code{browse-url} Customize group, particularly
+@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 use Browse-URL, so customizing options in the @code{browse-url}
+group should be sufficient to determine how they all work in that
+respect.
+
+@node Goto-address
+@subsection Activating URLs
+@findex goto-address
+@cindex Goto-address
+@cindex URLs, activating
+
+@table @kbd
+@item M-x goto-address
+Activate URLs and e-mail addresses in the current buffer.
+@end table
+
+You can arrange to activate URLs in any buffer with @kbd{M-x
+goto-address}. It may be useful to add @code{goto-address} to hooks
+invoked when buffers are displayed in particular modes.
+@code{rmail-show-message-hook} is the appropriate hook if you use Rmail,
+or @code{mh-show-mode-hook} if you use MH.
+
+@node FFAP
+@subsection Finding Files and URLs at Point
+@findex ffap
+@findex find-file-at-point
+@findex ffap
+@findex ffap-dired-at-point
+@findex ffap-next
+@findex ffap-menu
+@cindex FFAP
+@cindex URLs
+@cindex finding file at point
+
+@table @kbd
+@item M-x ffap @key{RET} @var{filename} @key{RET}
+Find @var{filename}, guessing a default from text around point.
+@item M-x ffap-next
+Search buffer for next file or URL, and run `ffap'. With single prefix
+arg, search backwards, with double arg wrap search forwards, with triple
+arg wrap search backwards.
+@item M-x ffap-menu
+Put up a menu of files and URLs mentioned in current buffer and try to
+fetch the selected one.
+@item M-x ffap-dired-at-point
+Start Dired, defaulting to file at point.
+@end table
+
+The command @kbd{M-x find-file-at-point} (or @kbd{M-x ffap}) can be used
+as a replacement for @kbd{M-x find-file}. With a prefix argument it
+behaves as @kbd{M-x find-file}. Otherwise it tries to guess a default
+file or URL from the text around point. In the case of a URL, it will
+invoke @code{browse-url} rather than finding a file. This is useful for
+following references in mail or news buffers, @file{README}s,
+@file{MANIFEST}s, and so on. The @samp{ffap} package's
+commentary available via @kbd{C-h p} 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.
+
+@table @kbd
+@item C-x C-f
+@kindex C-x C-f @r{(FFAP)}
+@kbd{find-file-at-point};
+@item C-x 4 f
+@kindex C-x 4 f @r{(FFAP)}
+@code{ffap-other-window}, analagous to @kbd{M-x find-file-other-window};
+@item C-x 5 f
+@kindex C-x 5 f @r{(FFAP)}
+@code{ffap-other-frame}, analagous to @kbd{M-x find-file-other-frame};
+@item C-x d
+@kindex C-x d @r{(FFAP)}
+@code{ffap-dired-at-point}, analogous to @kbd{M-x dired};
+@item S-mouse-3
+@kindex S-mouse-3 @r{(FFAP)}
+@code{ffap-at-mouse} finds the file guessed from text around the position
+of a mouse click;
+@item C-S-mouse-3
+@kindex C-S-mouse-3 @r{(FFAP)}
+@code{ffap-menu} puts up a selectable menu of files and URLs mentioned in
+the current buffer.
+@end table
+
+@node Find-func
+@subsection Finding Function and Variable Definitions
+@findex find-function
+@findex find-function-on-key
+@findex find-variable
+@cindex examples of Lisp functions
+@cindex Lisp examples
+@cindex Find-func
+@cindex Lisp definitions
+@cindex definitions, locating in sources
+@cindex tags
+
+@table @kbd
+@item M-x find-function @key{RET} @var{function} @key{RET}
+Find the definition of the @var{function} at point.
+@item M-x find-variable @key{RET} @var{variable} @key{RET}
+Find the definition of the @var{variable} at point.
+@item M-x find-function-on-key @var{key}
+Find the definition of the function that @var{key} invokes.
+@end table
+
+The Find-func package provides convenient facilities for finding the
+definitions of Emacs Lisp functions and variables. It has a somewhat
+similar function to the Tags facility (@pxref{Tags}) but uses Emacs's
+introspective facilities which maintain information about loaded
+libraries. In contrast to Tags, it only works for functions and
+variables with definitions which are already loaded but it relates to
+the code actually running and doesn't require maintaining tags files.
+
+You need to have the Lisp source (@samp{.el}) files available on your
+load path along with the compiled (@samp{.elc}) versions for this to
+work. You can use compressed source files if you turn on
+@code{auto-compression-mode}.
+
+The commands available include @kbd{M-x find-function} to find the
+definition of a named function, @kbd{find-function-on-key} to find the
+definition of the function bound to a key and @kbd{find-variable} to
+find a variable's definition. These only work for things defined in
+Lisp source files, not primitive functions or variables defined
+primitively in the Emacs layer implemented in C.
+
+Find-func is useful for finding examples of how to do things if you want
+to write an Emacs Lisp extension similar to some existing function.
+
+@node Dissociated Press, Amusements, Hyperlinking, Top
@section Dissociated Press
@findex dissociated-press
@findex hanoi
@findex yow
@findex gomoku
-@findex mpuz
@cindex tower of Hanoi
If you are a little bit bored, you can try @kbd{M-x hanoi}. If you are
@findex blackbox
@findex mpuz
+@findex 5x5
@cindex puzzles
- @kbd{M-x blackbox} and @kbd{M-x mpuz} are two kinds of puzzles.
+ @kbd{M-x blackbox}, @kbd{M-x mpuz} and @kbd{M-x 5x5} are kinds of puzzles.
@code{blackbox} challenges you to determine the location of objects
inside a box by tomography. @code{mpuz} displays a multiplication
puzzle with letters standing for digits in a code that you must
guess---to guess a value, type a letter and then the digit you think it
-stands for.
+stands for. The aim of @code{5x5} is to fill in all the squares.
+
+@findex decipher
+@cindex ciphers
+@cindex cryptanalysis
+@kbd{M-x decipher} helps you to cryptanalyze a buffer which is encrypted
+in a simple monoalphabetic substitution cipher.
@findex dunnet
@kbd{M-x dunnet} runs an adventure-style exploration game, which is
a bigger sort of puzzle.
+@findex lm
+@cindex landmark game
+@kbd{M-x lm} runs a relatively non-participatory game in which a robot
+attempts to maneuver towards a tree at the center of the window based on
+unique olfactory cues from each of the four directions.
+
+@findex life
+@cindex Life
+@kbd{M-x life} runs Conway's `Life' cellular automaton.
+
+@findex morse-region
+@findex unmorse-region
+@cindex Morse code
+@cindex --/---/.-./.../.
+@kbd{M-x morse-region} converts text in a region to Morse code and
+@kbd{M-x unmorse-region} converts it back. No cause for remorse.
+
+@findex pong
+@cindex Pong game
+@kbd{M-x pong} plays an implementation of the game Pong, bouncing the
+ball off opposing bats.
+
+@findex solitaire
+@cindex solitaire
+@kbd{M-x solitaire} plays a game of solitaire in which you jump pegs
+across other pegs.
+
+@findex studlify-region
+@cindex StudlyCaps
+@kbd{M-x studlify-region} studlify-cases the region, that is
+
+@example
+M-x stUdlIfY-RegioN stUdlIfY-CaSeS thE region.
+@end example
+
+@findex tetris
+@cindex Tetris
+@kbd{M-x tetris} runs an implementation of the well-known Tetris game.
+@findex snake
+@cindex Snake
+Likewise, @kbd{M-x snake} provides an implementation of Snake.
+
When you are frustrated, try the famous Eliza program. Just do
@kbd{M-x doctor}. End each input by typing @key{RET} twice.
@cindex Zippy
When you are feeling strange, type @kbd{M-x yow}.
+
+@findex zone
+The command @kbd{M-x zone} plays games with the display when Emacs is
+idle.