emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Leaving out non-applicable commands on Mx


From: Spencer Boucher
Subject: Re: Leaving out non-applicable commands on Mx
Date: Fri, 08 Jan 2016 17:54:30 -0800


Smex (https://github.com/nonsequitur/smex/) has a similar function that limits to commands in the major mode (`smex-major-mode-commands`).
John Wiegley writes:

Óscar Fuentes <address@hidden> writes:

On the M-x prompt, the set of candidates is restricted to those that make sense given the current context. Leaving out functions that are specific to modes not enabled is a start. So if you are editing a C file and press `M-x g' almost all gnus* functions shall not be considered as candidates for completion.

This sounds like a feature that should evolve first as a separate package in ELPA, and after proving itself, be considered for core. But I sense ways in which this could go wrong: expecting to find a command, failing for some undiscovered reason X, and then the user believing no such command exists.
The M-x interface can be an improvement over both keybindings and the menu on terms of usability, given the correct methods, but having thousands of irrelevant candidates every time you invoke M-x is an inconvenience for that goal, not to say plain dumb.

Core Emacs behavior doesn't need to change to demonstrate this feature, does it? Write a new execute-extended-command and see if it works as well as you hope.


-- Spencer Boucher



reply via email to

[Prev in Thread] Current Thread [Next in Thread]