Linux

  1. Home
  2. Computing & Technology
  3. Linux

Apropos

Emacs Documentation

By Juergen Haas, About.com

Apropos

A more sophisticated sort of question to ask is, "What are the commands for working with files?" To ask this question, type C-h a file <RET>, which displays a list of all command names that contain file, including copy-file, find-file, and so on. With each command name appears a brief description of how to use the command, and what keys you can currently invoke it with. For example, it would say that you can invoke find-file by typing C-x C-f. The a in C-h a stands for "Apropos"; C-h a runs the command apropos-command. This command normally checks only commands (interactive functions if you specify a prefix argument, it checks noninteractive functions as well. [p]Because [i]C-h a[/i] looks only for functions whose names contain the string you specify, you must use ingenuity in choosing the string. If you are looking for commands for killing backwards and [i]C-h a kill-backwards <RET>[/i] doesn't reveal any, don't give up. Try just [i]kill[/i], or just [i]backwards[/i], or just [i]back[/i]. Be persistent. Also note that you can use a regular expression as the argument, for more flexibility (see [link url=/od/emacs_doc/a/emacsdoc410.htm]Regexps[/link]). [p]Here is a set of arguments to give to [i]C-h a[/i] that covers many classes of Emacs commands, since there are strong conventions for naming the standard Emacs commands. By giving you a feel for the naming conventions, this set should also serve to aid you in developing a technique for picking [b]apropos[/b] strings. [b] char, line, word, sentence, paragraph, region, page, sexp, list, defun, rect, buffer, frame, window, face, file, dir, register, mode, beginning, end, forward, backward, next, previous, up, down, search, goto, kill, delete, mark, insert, yank, fill, indent, case, change, set, what, list, find, view, describe, default. [/blockquote] [p]To list all user variables that match a regexp, use the command [i]M-x apropos-variable[/i]. This command shows only user variables and customization options by default; if you specify a prefix argument, it checks all variables. [p]To list all Lisp symbols that contain a match for a regexp, not just the ones that are defined as commands, use the command [i]M-x apropos[/i] instead of [i]C-h a[/i]. This command does not check key bindings by default; specify a numeric argument if you want it to check them. [p]The [b]apropos-documentation[/b] command is like [b]apropos[/b] except that it searches documentation strings as well as symbol names for matches for the specified regular expression. [p]The [b]apropos-value[/b] command is like [b]apropos[/b] except that it searches symbols' values for matches for the specified regular expression. This command does not check function definitions or property lists by default; specify a numeric argument if you want it to check them. [p]If the variable [b]apropos-do-all[/b] is non-[b]nil[/b], the commands above all behave as if they had been given a prefix argument. [p]If you want more information about a function definition, variable or symbol property listed in the Apropos buffer, you can click on it with [i]Mouse-2[/i] or move there and type <RET>. [p] * [b][link url=/od/emacs_doc/a/emacs_doc_idx.htm]Emacs Manual Index[/link][/b] _z_linux_z_);

Explore Linux

About.com Special Features

Linux

  1. Home
  2. Computing & Technology
  3. Linux
  4. Linux Software
  5. Editors
  6. Emacs
  7. Emacs Documentation - Apropos

©2009 About.com, a part of The New York Times Company.

All rights reserved.