Emacs+ Execute Extended Command (Meta X)


Emacs+ Execute Extended Command (Alt-X) aka Meta X:  Reads a command name from the minibuffer (with completion & wildcards) and executes it.  The status area is used as the minibuffer.  Entering TAB or SPACE in the minibuffer displays the set of possible completions in a pop-up.  As with most minibuffer commands in Emacs+, a history ring buffer is available with Meta-X.

Command Selection - Command names follow the Emacs convention of words separated by hyphens (in the case of multiple commands with the same name - see Category below - a number is appended to make the name unique).  The set of commands available in a particular context is determined by:
  • the current editor
  • the selection state (for some commands)
  • the set of command categories in force
  • commands must have a handler and be enabled
  • commands must not have any required arguments
    (NB: Many useful editing commands obtain the selected text once the command is invoked, not as an argument.)
Not all commands that the Eclipse command service makes available at a given point necessarily have an effect.

Wildcards - Meta X provides simple wildcarding to assist in locating the desired command.  The wildcard characters are * and ? and have their usual meaning:
  • * any character zero or more times
  • ? any character once
Invoking completion on a string with wildcards will pop up the set of all matching commands and replace the minibuffer text with their initial substring (which may be the empty string).
For those so inclined, regular expressions are supported as well.

Mouse - The completions pop-up provides hover text for each command.  Double clicking on a command invokes it.

Emacs+ Executable Command Category Selection - In Eclipse, commands are associated with categories.  In the context of text editing some categories are more useful than others.  Meta X uses an initial set of Eclipse categories which is configurable on the preference page.  If you have loaded additional plugins that you want access to via Meta-X, be sure to include their category in your category set.  In cases where multiple categories provide commands with the same name, the unique identifier, along with any provided documentation, can be determined using the hover text or the via the command help.

To enable Meta-X execution of a named keyboard macro, the Emacs+ Keyboard Macros category must be present in this list.  If it is not, select New and add it from the interface.

Comments