[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: master 927b885 1/3: Disable filtering of commands in M-x completion
From: |
Juri Linkov |
Subject: |
Re: master 927b885 1/3: Disable filtering of commands in M-x completion |
Date: |
Wed, 17 Feb 2021 22:01:16 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (x86_64-pc-linux-gnu) |
> I think we should take one of the below actions:
>
> a) Add a key to show the unfiltered list of matches in `M-x'.
> (We could use any key, but how about just using `M-x M-x' to show the
> unfiltered list? It would affect recursive minibuffers, but we could
> just require a third `M-x' for that.)
>
> b) Add a new command, e.g. on `C-x x x', that always acts like the old
> `M-x'.
>
> c) Both.
Also maybe a key to toggle filtering in the already active completion
(and a key to toggle sorting).
> I have never understood why Emacs suggests commands for execution in a
> context where they will obviously fail. I think this is a glaring
> deficiency in our default UI -- you are proposed useless commands (that
> won't work there, will screw up your buffer, etc.). No longer doing
> that is in my view a big step forward for Emacs usability.
I have no problem with unrelated commands displayed by M-x,
but for the new option I'd like also to suggest to filter out
commands having "r" in their interactive specs - they signal
an error when the region is not active, so no need to show them.
Also filter out commands with "*" in read-only buffers.
> From the discussions we've had so far, it is my understanding that some
> like to use it for searching for and discovering commands. That is fine
> and valid, and reason for having an option to opt-out of this behavior.
> (I also think we should add a `describe-command' to try to better cover
> this use-case.)
`describe-command' is a very good idea for searching and discovering commands.
> Footnotes:
> [1] Some modes are prudent in saying:
>
> (unless (derived-p 'foo-mode) (user-error "Nope"))
>
> I think up until now this has often been the right and safe thing
> to do, but it has unfortunately been severely underused. Yet it
> still has the deficiency that the command will show up in 'M-x`,
> and it provides no fire-escape.
Isearch mode uses such idiom that when an internal command is called
when Isearch is not active, then it's activated before the command
is executed, with such a guard clause:
(unless isearch-mode (isearch-mode t))
- Re: master 927b885 1/3: Disable filtering of commands in M-x completion, Stefan Kangas, 2021/02/17
- Re: master 927b885 1/3: Disable filtering of commands in M-x completion, Eli Zaretskii, 2021/02/17
- RE: [External] : Re: master 927b885 1/3: Disable filtering of commands in M-x completion, Drew Adams, 2021/02/17
- Re: master 927b885 1/3: Disable filtering of commands in M-x completion,
Juri Linkov <=
- RE: [External] : Re: master 927b885 1/3: Disable filtering of commands in M-x completion, Drew Adams, 2021/02/17
- Re: [External] : Re: master 927b885 1/3: Disable filtering of commands in M-x completion, Juri Linkov, 2021/02/18
- RE: [External] : Re: master 927b885 1/3: Disable filtering of commands in M-x completion, Drew Adams, 2021/02/18
- Re: [External] : Re: master 927b885 1/3: Disable filtering of commands in M-x completion, Juri Linkov, 2021/02/18
- RE: [External] : Re: master 927b885 1/3: Disable filtering of commands in M-x completion, Drew Adams, 2021/02/18
- Re: [External] : Re: master 927b885 1/3: Disable filtering of commands in M-x completion, Juri Linkov, 2021/02/18
- RE: [External] : Re: master 927b885 1/3: Disable filtering of commands in M-x completion, Drew Adams, 2021/02/18
- Re: [External] : Re: master 927b885 1/3: Disable filtering of commands in M-x completion, Eli Zaretskii, 2021/02/18
- RE: [External] : Re: master 927b885 1/3: Disable filtering of commands in M-x completion, Drew Adams, 2021/02/18
- Re: [External] : Re: master 927b885 1/3: Disable filtering of commands in M-x completion, Eli Zaretskii, 2021/02/18