7 Help
Emacs provides extensive help features accessible through a single
character, C-h. C-h is a prefix key that is used for
commands that display documentation. The characters that you can type after
C-h are called help options. One help option is C-h;
that is how you ask for help about using C-h. To cancel, type
C-g. The function key <F1> is equivalent to C-h.
C-h C-h (help-for-help
) displays a list of the possible
help options, each with a brief description. Before you type a help
option, you can use <SPC> or <DEL> to scroll through the list.
C-h or <F1> means “help” in various other contexts as
well. For example, in the middle of query-replace
, it describes
the options available for how to operate on the current match. After a
prefix key, it displays a list of the alternatives that can follow the
prefix key. (A few prefix keys don't support C-h, because they
define other meanings for it, but they all support <F1>.)
Most help buffers use a special major mode, Help mode, which lets you
scroll conveniently with <SPC> and <DEL>. It also offers
hyperlinks to further help regarding cross-referenced names, Info nodes,
customization buffers and the like. See Help Mode.
If you are looking for a certain feature, but don't know where
exactly it is documented, and aren't sure of the name of a
related command or option, we recommend trying these methods. Usually
it is best to start with an apropos command, then try searching the
manual index, then finally look in the FAQ and the package keywords.
- C-h a topic <RET>
- This searches for commands whose names match topic, which should
be a regular expression (see Regexps). Browse the buffer that this
command displays to find what you are looking for. See Apropos.
- M-x apropos <RET> topic <RET>
- This works like C-h a, but it also searches for user options and
other variables, in case the feature you are looking for is controlled
by an option, not a command. See Apropos.
- M-x apropos-documentation <RET> topic <RET>
- This searches the documentation strings (the built-in short
descriptions) of all variables and functions (not their names) for a
match for topic, a regular expression. See Apropos.
- C-h i d m emacs <RET> i topic <RET>
- This looks up topic in the indices of the Emacs on-line manual.
If there are several matches, Emacs displays the first one. You can then
press <,> to move to other matches, until you find what you are
looking for.
- C-h i d m emacs <RET> s topic <RET>
- Similar, but searches for topic (which can be a regular
expression) in the text of the manual rather than in its
indices.
- C-h F
- This brings up the Emacs FAQ, where you can use the usual search
commands (see Search) to find the information.
- C-h p
- Finally, you can try looking up a suitable package using keywords
pertinent to the feature you need. See Library Keywords.
To find the documentation of a key sequence or a menu item, type
C-h C-k and then type that key sequence or select the menu
item. This looks up the description of the command invoked by the key
or the menu in the appropriate manual (not necessarily the Emacs
manual). Likewise, use C-h C-f for reading documentation of a
command.
Here is a summary of the defined help commands.
- C-h a regexp <RET>
- Display a list of commands whose names match regexp
(
apropos-command
).
- C-h b
- Display a table of all key bindings in effect now, in this order: minor
mode bindings, major mode bindings, and global bindings
(
describe-bindings
).
- C-h c key
- Show the name of the command that key runs
(
describe-key-briefly
). Here c stands for “character.”
For more extensive information on key, use C-h k.
- C-h f function <RET>
- Display documentation on the Lisp function named function
(
describe-function
). Since commands are Lisp functions,
a command name may be used.
- C-h h
- Display the HELLO file, which shows examples of various character
sets.
- C-h i
- Run Info, the program for browsing documentation files (
info
).
The complete Emacs manual is available on-line in Info.
- C-h k key
- Display the name and documentation of the command that key runs
(
describe-key
).
- C-h l
- Display a description of the last 100 characters you typed
(
view-lossage
).
- C-h m
- Display documentation of the current major mode (
describe-mode
).
- C-h n
- Display documentation of Emacs changes, most recent first
(
view-emacs-news
).
- C-h P
- Display info on known problems with Emacs and possible workarounds
(
view-emacs-problems
).
- C-h p
- Find packages by topic keyword (
finder-by-keyword
).
- C-h s
- Display the current contents of the syntax table, plus an explanation of
what they mean (
describe-syntax
). See Syntax.
- C-h t
- Enter the Emacs interactive tutorial (
help-with-tutorial
).
- C-h v var <RET>
- Display the documentation of the Lisp variable var
(
describe-variable
).
- C-h w command <RET>
- Show which keys run the command named command (
where-is
).
- C-h C coding <RET>
- Describe coding system coding
(
describe-coding-system
).
- C-h C <RET>
- Describe the coding systems currently in use.
- C-h I method <RET>
- Describe an input method (
describe-input-method
).
- C-h L language-env <RET>
- Display information on the character sets, coding systems, and input
methods used for language environment language-env
(
describe-language-environment
).
- C-h C-c
- Display the copying conditions for GNU Emacs.
- C-h C-d
- Display information about getting new versions of GNU Emacs.
- C-h C-f function <RET>
- Enter Info and go to the node documenting the Emacs function function
(
Info-goto-emacs-command-node
).
- C-h C-k key
- Enter Info and go to the node where the key sequence key is
documented (
Info-goto-emacs-key-command-node
).
- C-h C-p
- Display information about the GNU Project.
- C-h <TAB> symbol <RET>
- Display the Info documentation on symbol symbol according to the
programming language you are editing (
info-lookup-symbol
).