[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

9. Running Commands by Name

The af commands that are used often or that must be quick to type are bound to keys--short sequences of characters--for convenient use. Other af commands that do not need to be brief are not bound to keys; to run them, you must refer to them by name.

A command name is, by convention, made up of one or more words, separated by hyphens; for example, af-version or list-commands. The use of English words makes the command name easier to remember than a key made up of obscure characters, even though it is more characters to type.

The way to run a command by name is to start with M-x, type the command name, and finish it with RET. M-x uses the minibuffer to read the command name. RET exits the minibuffer and runs the command. The string `M-x' appears at the beginning of the minibuffer as a prompt to remind you to enter the name of a command to be run. See section 7. The Minibuffer, for full information on the features of the minibuffer.

Note that next-line is the same command that you invoke with the key C-n. You can run any af command by name using M-x, whether or not any keys are bound to it.

If you type C-g while the command name is being read, you cancel the M-x command and get out of the minibuffer, ending up at top level.

To pass a numeric argument to the command you are invoking with M-x, specify the numeric argument before the M-x. M-x passes the argument along to the command it runs. The argument value appears in the prompt while the command name is being read.

Normally, when describing a command that is run by name, we omit the RET that is needed to terminate the name. Thus we might speak of M-x af-version rather than M-x af-version RET. We mention the RET only when there is a need to emphasise its presence, such as when we show the command together with following arguments.

M-x works by running the command execute-extended-command, which is responsible for reading the name of another command and invoking it.


[ << ] [ >> ]           [Top] [Contents] [Index] [ ? ]

This document was generated by Malc Arnold on August, 22 2002 using texi2html