[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Smarter M-x that filters on major-mode
From: |
Yuan Fu |
Subject: |
Re: Smarter M-x that filters on major-mode |
Date: |
Thu, 11 Feb 2021 00:02:54 -0500 |
> On Feb 10, 2021, at 10:44 PM, Stefan Monnier <monnier@iro.umontreal.ca> wrote:
>
>> 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
>
>
Another idea that I once had is that to make a special M-x such that it only
contains some selected commands, and as soon as there is only one candidate
left, it is immediately executed (without pressing RET). This is somewhat
between a keybinding and normal M-x.
Yuan
- Re: Experimentally unbind M-o on the trunk, (continued)
- RE: [External] : Re: Experimentally unbind M-o on the trunk, Drew Adams, 2021/02/10
- Re: Experimentally unbind M-o on the trunk, Jean Louis, 2021/02/11
- Re: Experimentally unbind M-o on the trunk, Matt Armstrong, 2021/02/10
- Re: Experimentally unbind M-o on the trunk, Lars Ingebrigtsen, 2021/02/10
- Smarter M-x that filters on major-mode, Stefan Kangas, 2021/02/10
- Re: Smarter M-x that filters on major-mode, Stefan Monnier, 2021/02/10
- Re: Smarter M-x that filters on major-mode,
Yuan Fu <=
- RE: [External] : Re: Smarter M-x that filters on major-mode, Drew Adams, 2021/02/11
- RE: [External] : Re: Smarter M-x that filters on major-mode, Drew Adams, 2021/02/11
- Re: Smarter M-x that filters on major-mode, Lars Ingebrigtsen, 2021/02/11
- Re: Smarter M-x that filters on major-mode, Lars Ingebrigtsen, 2021/02/11
- Re: Smarter M-x that filters on major-mode, Lars Ingebrigtsen, 2021/02/11
- Re: Smarter M-x that filters on major-mode, Eli Zaretskii, 2021/02/11
- Re: Smarter M-x that filters on major-mode, Lars Ingebrigtsen, 2021/02/11
- Re: Smarter M-x that filters on major-mode, Stefan Monnier, 2021/02/11
- Re: Smarter M-x that filters on major-mode, Lars Ingebrigtsen, 2021/02/11
- Re: Smarter M-x that filters on major-mode, Lars Ingebrigtsen, 2021/02/11