aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard M. Stallman2005-12-12 05:08:20 +0000
committerRichard M. Stallman2005-12-12 05:08:20 +0000
commitde22da59fa83471af35e1f1e197bdc0e51f50bc6 (patch)
treedd3497880a73afc8390b917b9db2dd8bea5dcf1e
parentaa2d347837c3f55f8c6b96268169b502f5acd708 (diff)
downloademacs-de22da59fa83471af35e1f1e197bdc0e51f50bc6.tar.gz
emacs-de22da59fa83471af35e1f1e197bdc0e51f50bc6.zip
(Apropos): Rewrite. Talk about "apropos patterns".
(Help): Among the Apropos commands, describe only C-h a here.
-rw-r--r--man/help.texi159
1 files changed, 88 insertions, 71 deletions
diff --git a/man/help.texi b/man/help.texi
index 4da43fcb6ff..313a002dc28 100644
--- a/man/help.texi
+++ b/man/help.texi
@@ -44,21 +44,11 @@ it is best to start with an apropos command, then try searching the
44manual index, then finally look in the FAQ and the package keywords. 44manual index, then finally look in the FAQ and the package keywords.
45 45
46@table @kbd 46@table @kbd
47@item C-h a @var{topic} @key{RET} 47@item C-h a @var{topics} @key{RET}
48This searches for commands whose names match @var{topic}, which should 48This searches for commands whose names match @var{topics}, which
49be a list of words or a regular expression (@pxref{Regexps}). Browse 49should be a keyword, a list of keywords, or a regular expression
50the buffer that this command displays to find what you are looking 50(@pxref{Regexps}). This command displays a the matches in a new
51for. @xref{Apropos}. 51buffer. @xref{Apropos}.
52
53@item M-x apropos @key{RET} @var{topic} @key{RET}
54This works like @kbd{C-h a}, but it also searches for noninteractive
55functions and for variables. @xref{Apropos}.
56
57@item C-h d @var{topic} @key{RET}
58This searches the @emph{documentation strings} (the built-in short
59descriptions) of all variables and functions (not their names) for a
60match for @var{topic}, a list or words or a regular expression.
61@xref{Apropos}.
62 52
63@item C-h i d m emacs @key{RET} i @var{topic} @key{RET} 53@item C-h i d m emacs @key{RET} i @var{topic} @key{RET}
64This looks up @var{topic} in the indices of the Emacs on-line manual. 54This looks up @var{topic} in the indices of the Emacs on-line manual.
@@ -113,9 +103,9 @@ command.
113pre-written file of information. 103pre-written file of information.
114 104
115@table @kbd 105@table @kbd
116@item C-h a @var{topic} @key{RET} 106@item C-h a @var{topics} @key{RET}
117Display a list of commands whose names match word list or regexp @var{topic} 107Display a list of commands whose names match @var{topics}
118(@code{apropos-command}). 108(@code{apropos-command}; @pxref{Apropos}).
119@item C-h b 109@item C-h b
120Display a table of all key bindings in effect now, in this order: minor 110Display a table of all key bindings in effect now, in this order: minor
121mode bindings, major mode bindings, and global bindings 111mode bindings, major mode bindings, and global bindings
@@ -124,10 +114,9 @@ mode bindings, major mode bindings, and global bindings
124Show the name of the command that @var{key} runs 114Show the name of the command that @var{key} runs
125(@code{describe-key-briefly}). Here @kbd{c} stands for ``character.'' 115(@code{describe-key-briefly}). Here @kbd{c} stands for ``character.''
126For more extensive information on @var{key}, use @kbd{C-h k}. 116For more extensive information on @var{key}, use @kbd{C-h k}.
127@item C-h d @var{topic} @key{RET} 117@item C-h d @var{topics} @key{RET}
128Display a list of commands and variables whose documentation match 118Display a list of commands and variables whose documentation matches
129word list or regexp @var{topic} 119@var{topics} (@code{apropos-documentation}).
130(@code{apropos-documentation}).
131@item C-h e 120@item C-h e
132Display the @code{*Messages*} buffer 121Display the @code{*Messages*} buffer
133(@code{view-echo-area-messages}). 122(@code{view-echo-area-messages}).
@@ -274,35 +263,69 @@ editor, you need to read the source code.
274@node Apropos 263@node Apropos
275@section Apropos 264@section Apropos
276 265
266 A more sophisticated sort of question to ask is, ``What are the
267commands for working with files?'' The @dfn{apropos} commands ask
268such questions---they look for things whose names match an
269@dfn{apropos pattern}, which means either a word, a list of words, or
270a regular expression. Each apropos command displays a list of
271matching items in a special buffer.
272
273@table @kbd
274@item C-h a @var{pattern} @key{RET}
275Search for commands whose names match @var{pattern}.
276
277@item M-x apropos @key{RET} @var{pattern} @key{RET}
278Similar, but it searches for noninteractive functions and for
279variables, as well as commands.
280
281@item M-x apropos-variable @key{RET} @var{pattern} @key{RET}
282Similar, but it searches for variables only.
283
284@item M-x apropos-value @key{RET} @var{pattern} @key{RET}
285Similar, but it searches for variables based on their values, or
286functions based on their definitions.
287
288@item C-h d @var{pattern} @key{RET}
289Search the @emph{documentation strings} (the built-in short
290descriptions) of all variables and functions (not their names) for a
291match for @var{pattern}.
292@end table
293
277@kindex C-h a 294@kindex C-h a
278@findex apropos-command 295@findex apropos-command
279@cindex apropos 296@cindex apropos
280 A more sophisticated sort of question to ask is, ``What are the 297 To find the commands that work on files, type @kbd{C-h a file
281commands for working with files?'' To ask this question, type @kbd{C-h 298@key{RET}}. This displays a list of all command names that contain
282a file @key{RET}}, which displays a list of all command names that 299@samp{file}, including @code{copy-file}, @code{find-file}, and so on.
283contain @samp{file}, including @code{copy-file}, @code{find-file}, and 300With each command name appears a brief description of how to use the
284so on. With each command name appears a brief description of how to use 301command, and what keys you can currently invoke it with. For example,
285the command, and what keys you can currently invoke it with. For 302it would say that you can invoke @code{find-file} by typing @kbd{C-x
286example, it would say that you can invoke @code{find-file} by typing 303C-f}. The @kbd{a} in @kbd{C-h a} stands for ``Apropos''; @kbd{C-h a}
287@kbd{C-x C-f}. The @kbd{a} in @kbd{C-h a} stands for ``Apropos''; 304runs the command @code{apropos-command}. This command normally checks
288@kbd{C-h a} runs the command @code{apropos-command}. This command 305only commands (interactive functions); if you specify a prefix
289normally checks only commands (interactive functions); if you specify a 306argument, it checks noninteractive functions as well.
290prefix argument, it checks noninteractive functions as well. 307
291 308 If you want more information about a function definition, variable or
292 Because @kbd{C-h a} looks only for commands matching the string you 309symbol property listed in the Apropos buffer, you can click on it with
293specify, you may not find what you want on the first try. In that 310@kbd{Mouse-1} or @kbd{Mouse-2}, or move there and type @key{RET}.
294case, don't just give up. You can give Apropos a list of words to 311
295search for. When more than one word is specified, at least two of 312 @kbd{C-h a} with a single word can find too many matches. Don't
296those words must be present for an item to match. If you are looking 313just give up; you can give Apropos a list of words to search for.
297for commands to kill a chunk of text before point, try @kbd{C-h a kill 314When you specify more than one word in the apropos pattern, a name
298back behind before @key{RET}}. For even greater flexibility, you can 315must contain at least two of the words in order to match. Thus, if
299also supply a regular expression to Apropos (@pxref{Regexps}). 316you are looking for commands to kill a chunk of text before point, you
317could try @kbd{C-h a kill back backward behind before @key{RET}}.
318
319 For even greater flexibility, you can specify a regular expression
320(@pxref{Regexps}). An apropos pattern is interpreted as a regular
321expression if it contains any of the regular expression special
322characters, @samp{^$*+?.\[}.
300 323
301 Here is a set of arguments to give to @kbd{C-h a} that covers many 324 Here is a set of arguments to give to @kbd{C-h a} that covers many
302classes of Emacs commands, since there are strong conventions for naming 325classes of Emacs commands, since there are strong conventions for
303the standard Emacs commands. By giving you a feel for the naming 326naming the standard Emacs commands. By giving you a feel for the
304conventions, this set should also serve to aid you in developing a 327naming conventions, this set should also serve to aid you in
305technique for picking @code{apropos} strings. 328developing a technique for picking Apropos keywords.
306 329
307@quotation 330@quotation
308char, line, word, sentence, paragraph, region, page, sexp, list, defun, 331char, line, word, sentence, paragraph, region, page, sexp, list, defun,
@@ -312,31 +335,29 @@ mark, insert, yank, fill, indent, case, change, set, what, list, find,
312view, describe, default. 335view, describe, default.
313@end quotation 336@end quotation
314 337
338@findex apropos
339 To list all Lisp symbols that contain a match an Apropos pattern,
340not just the ones that are defined as commands, use the command
341@kbd{M-x apropos} instead of @kbd{C-h a}. This command does not check
342key bindings by default; specify a numeric argument if you want it to
343check them.
344
315@findex apropos-variable 345@findex apropos-variable
316 To list all user variables that match a word list or regexp, use the 346 To list user-customizable variables that match an apropos pattern,
317command @kbd{M-x apropos-variable}. By default, this command shows 347use the command @kbd{M-x apropos-variable}. If you specify a prefix
318only variables meant for user customization; if you specify a prefix
319argument, it checks all variables. 348argument, it checks all variables.
320 349
321@findex apropos
322 To list all Lisp symbols that contain a match for a word list or
323regexp, not just the ones that are defined as commands, use the
324command @kbd{M-x apropos} instead of @kbd{C-h a}. This command does
325not check key bindings by default; specify a numeric argument if you
326want it to check them.
327
328@kindex C-h d 350@kindex C-h d
329@findex apropos-documentation 351@findex apropos-documentation
330 The @code{apropos-documentation} command is like @code{apropos} except 352 The @code{apropos-documentation} command is like @code{apropos}
331that it searches documentation strings as well as symbol names for 353except that it searches documentation strings instead of symbol names
332matches for the specified topic, a word list or regular expression. 354for matches for the specified Apropos pattern.
333 355
334@findex apropos-value 356@findex apropos-value
335 The @code{apropos-value} command is like @code{apropos} except that it 357 The @code{apropos-value} command is like @code{apropos} except that
336searches symbols' values for matches for the specified word list or regular 358it searches variables' values for matches for the pattern. With a
337expression. This command does not check function definitions or 359prefix argument, it also checks symbols' function definitions and
338property lists by default; specify a numeric argument if you want it to 360property lists.
339check them.
340 361
341@vindex apropos-do-all 362@vindex apropos-do-all
342 If the variable @code{apropos-do-all} is non-@code{nil}, the commands 363 If the variable @code{apropos-do-all} is non-@code{nil}, the commands
@@ -351,13 +372,9 @@ most relevant ones first.
351 372
352@vindex apropos-documentation-sort-by-scores 373@vindex apropos-documentation-sort-by-scores
353 By default, Apropos lists the search results for 374 By default, Apropos lists the search results for
354 @code{apropos-documentation} in order of relevance. 375@code{apropos-documentation} in order of relevance of the match. If
355If the variable @code{apropos-documentation-sort-by-scores} is @code{nil}, 376the variable @code{apropos-documentation-sort-by-scores} is
356Apropos will list documentation in alphabetical order. 377@code{nil}, Apropos lists the symbosl found in alphabetical order.
357
358 If you want more information about a function definition, variable or
359symbol property listed in the Apropos buffer, you can click on it with
360@kbd{Mouse-1} or @kbd{Mouse-2}, or move there and type @key{RET}.
361 378
362@node Library Keywords 379@node Library Keywords
363@section Keyword Search for Lisp Libraries 380@section Keyword Search for Lisp Libraries