emacs-devel
[Top][All Lists]
Advanced

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

Re: Smarter M-x that filters on major-mode


From: Stefan Monnier
Subject: Re: Smarter M-x that filters on major-mode
Date: Wed, 10 Feb 2021 22:44:03 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

> It would indeed be very useful to provide a mechanism to exclude
> commands from M-x that are useless outside of their major mode.

Similarly, you may mark some commands so they're just never available to
`M-x`.  This could apply to some major and minor modes which are only
meant to be used "internally", or to commands which only work when
provided with a mouse event, or ...

That should be a very easy change to `execute-extended-command`.

> I've had a related idea to make `M-X' (a.k.a. `M-S-x') run a version of
> `M-x' that *includes* only commands that are specifically relevant to
> the current major mode.  This would be used when I specifically want to
> do something in my major mode, as opposed to looking at the gazillion
> different entry points for things like calendar, gnus, or tetris.

Yes, there's clearly a lot of room for improvement.
I moved that function to ELisp to make it easier to hack on it, and I'm
still hopeful that Someone™ will make use of it.


        Stefan




reply via email to

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