diff options
| author | Richard M. Stallman | 2005-12-12 05:08:20 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 2005-12-12 05:08:20 +0000 |
| commit | de22da59fa83471af35e1f1e197bdc0e51f50bc6 (patch) | |
| tree | dd3497880a73afc8390b917b9db2dd8bea5dcf1e | |
| parent | aa2d347837c3f55f8c6b96268169b502f5acd708 (diff) | |
| download | emacs-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.texi | 159 |
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 | |||
| 44 | manual index, then finally look in the FAQ and the package keywords. | 44 | manual 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} |
| 48 | This searches for commands whose names match @var{topic}, which should | 48 | This searches for commands whose names match @var{topics}, which |
| 49 | be a list of words or a regular expression (@pxref{Regexps}). Browse | 49 | should be a keyword, a list of keywords, or a regular expression |
| 50 | the buffer that this command displays to find what you are looking | 50 | (@pxref{Regexps}). This command displays a the matches in a new |
| 51 | for. @xref{Apropos}. | 51 | buffer. @xref{Apropos}. |
| 52 | |||
| 53 | @item M-x apropos @key{RET} @var{topic} @key{RET} | ||
| 54 | This works like @kbd{C-h a}, but it also searches for noninteractive | ||
| 55 | functions and for variables. @xref{Apropos}. | ||
| 56 | |||
| 57 | @item C-h d @var{topic} @key{RET} | ||
| 58 | This searches the @emph{documentation strings} (the built-in short | ||
| 59 | descriptions) of all variables and functions (not their names) for a | ||
| 60 | match 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} |
| 64 | This looks up @var{topic} in the indices of the Emacs on-line manual. | 54 | This looks up @var{topic} in the indices of the Emacs on-line manual. |
| @@ -113,9 +103,9 @@ command. | |||
| 113 | pre-written file of information. | 103 | pre-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} |
| 117 | Display a list of commands whose names match word list or regexp @var{topic} | 107 | Display 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 |
| 120 | Display a table of all key bindings in effect now, in this order: minor | 110 | Display a table of all key bindings in effect now, in this order: minor |
| 121 | mode bindings, major mode bindings, and global bindings | 111 | mode bindings, major mode bindings, and global bindings |
| @@ -124,10 +114,9 @@ mode bindings, major mode bindings, and global bindings | |||
| 124 | Show the name of the command that @var{key} runs | 114 | Show 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.'' |
| 126 | For more extensive information on @var{key}, use @kbd{C-h k}. | 116 | For 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} |
| 128 | Display a list of commands and variables whose documentation match | 118 | Display a list of commands and variables whose documentation matches |
| 129 | word 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 |
| 132 | Display the @code{*Messages*} buffer | 121 | Display 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 | ||
| 267 | commands for working with files?'' The @dfn{apropos} commands ask | ||
| 268 | such questions---they look for things whose names match an | ||
| 269 | @dfn{apropos pattern}, which means either a word, a list of words, or | ||
| 270 | a regular expression. Each apropos command displays a list of | ||
| 271 | matching items in a special buffer. | ||
| 272 | |||
| 273 | @table @kbd | ||
| 274 | @item C-h a @var{pattern} @key{RET} | ||
| 275 | Search for commands whose names match @var{pattern}. | ||
| 276 | |||
| 277 | @item M-x apropos @key{RET} @var{pattern} @key{RET} | ||
| 278 | Similar, but it searches for noninteractive functions and for | ||
| 279 | variables, as well as commands. | ||
| 280 | |||
| 281 | @item M-x apropos-variable @key{RET} @var{pattern} @key{RET} | ||
| 282 | Similar, but it searches for variables only. | ||
| 283 | |||
| 284 | @item M-x apropos-value @key{RET} @var{pattern} @key{RET} | ||
| 285 | Similar, but it searches for variables based on their values, or | ||
| 286 | functions based on their definitions. | ||
| 287 | |||
| 288 | @item C-h d @var{pattern} @key{RET} | ||
| 289 | Search the @emph{documentation strings} (the built-in short | ||
| 290 | descriptions) of all variables and functions (not their names) for a | ||
| 291 | match 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 |
| 281 | commands 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 |
| 282 | a 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. |
| 283 | contain @samp{file}, including @code{copy-file}, @code{find-file}, and | 300 | With each command name appears a brief description of how to use the |
| 284 | so on. With each command name appears a brief description of how to use | 301 | command, and what keys you can currently invoke it with. For example, |
| 285 | the command, and what keys you can currently invoke it with. For | 302 | it would say that you can invoke @code{find-file} by typing @kbd{C-x |
| 286 | example, it would say that you can invoke @code{find-file} by typing | 303 | C-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''; | 304 | runs the command @code{apropos-command}. This command normally checks |
| 288 | @kbd{C-h a} runs the command @code{apropos-command}. This command | 305 | only commands (interactive functions); if you specify a prefix |
| 289 | normally checks only commands (interactive functions); if you specify a | 306 | argument, it checks noninteractive functions as well. |
| 290 | prefix 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 | 309 | symbol property listed in the Apropos buffer, you can click on it with |
| 293 | specify, 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}. |
| 294 | case, don't just give up. You can give Apropos a list of words to | 311 | |
| 295 | search 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 |
| 296 | those words must be present for an item to match. If you are looking | 313 | just give up; you can give Apropos a list of words to search for. |
| 297 | for commands to kill a chunk of text before point, try @kbd{C-h a kill | 314 | When you specify more than one word in the apropos pattern, a name |
| 298 | back behind before @key{RET}}. For even greater flexibility, you can | 315 | must contain at least two of the words in order to match. Thus, if |
| 299 | also supply a regular expression to Apropos (@pxref{Regexps}). | 316 | you are looking for commands to kill a chunk of text before point, you |
| 317 | could 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 | ||
| 321 | expression if it contains any of the regular expression special | ||
| 322 | characters, @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 |
| 302 | classes of Emacs commands, since there are strong conventions for naming | 325 | classes of Emacs commands, since there are strong conventions for |
| 303 | the standard Emacs commands. By giving you a feel for the naming | 326 | naming the standard Emacs commands. By giving you a feel for the |
| 304 | conventions, this set should also serve to aid you in developing a | 327 | naming conventions, this set should also serve to aid you in |
| 305 | technique for picking @code{apropos} strings. | 328 | developing a technique for picking Apropos keywords. |
| 306 | 329 | ||
| 307 | @quotation | 330 | @quotation |
| 308 | char, line, word, sentence, paragraph, region, page, sexp, list, defun, | 331 | char, line, word, sentence, paragraph, region, page, sexp, list, defun, |
| @@ -312,31 +335,29 @@ mark, insert, yank, fill, indent, case, change, set, what, list, find, | |||
| 312 | view, describe, default. | 335 | view, 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, | ||
| 340 | not 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 | ||
| 342 | key bindings by default; specify a numeric argument if you want it to | ||
| 343 | check 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, |
| 317 | command @kbd{M-x apropos-variable}. By default, this command shows | 347 | use the command @kbd{M-x apropos-variable}. If you specify a prefix |
| 318 | only variables meant for user customization; if you specify a prefix | ||
| 319 | argument, it checks all variables. | 348 | argument, it checks all variables. |
| 320 | 349 | ||
| 321 | @findex apropos | ||
| 322 | To list all Lisp symbols that contain a match for a word list or | ||
| 323 | regexp, not just the ones that are defined as commands, use the | ||
| 324 | command @kbd{M-x apropos} instead of @kbd{C-h a}. This command does | ||
| 325 | not check key bindings by default; specify a numeric argument if you | ||
| 326 | want 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} |
| 331 | that it searches documentation strings as well as symbol names for | 353 | except that it searches documentation strings instead of symbol names |
| 332 | matches for the specified topic, a word list or regular expression. | 354 | for 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 |
| 336 | searches symbols' values for matches for the specified word list or regular | 358 | it searches variables' values for matches for the pattern. With a |
| 337 | expression. This command does not check function definitions or | 359 | prefix argument, it also checks symbols' function definitions and |
| 338 | property lists by default; specify a numeric argument if you want it to | 360 | property lists. |
| 339 | check 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 |
| 355 | If the variable @code{apropos-documentation-sort-by-scores} is @code{nil}, | 376 | the variable @code{apropos-documentation-sort-by-scores} is |
| 356 | Apropos 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 | ||
| 359 | symbol 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 |