Subject: Re: bug#36525: M-x default when cursor on top of a M-x command in INFO

From: "Basil L. Contovounesios" <[email-masked]>
Date: Tue, 09 Jul 2019 13:24:16 +0100

積丹尼 Dan Jacobson <[email-masked]> writes:

>>>>>> "BLC" == Basil L Contovounesios <[email-masked]> writes:
>>> 2. Put the cursor on top of
>>> ‘M-x list-coding-systems’
>>> 
>>> 3. Hit M-x
>>> 
>>> Wouldn't it be great if we saw that it was now the default in the minibuffer?
>
> BLC> Try M-n.
> BLC> This runs next-history-element; see (info "(emacs) Minibuffer History").
>
> Ah ha...
> So how about instead of the user typing M-x M-n, he just types M-x for
> the exact same effect.
> Now all he has to do is either hit RET, or replace the text with what he
> wants instead.

Inserting text in the minibuffer is intrusive and discouraged;
see (info "(elisp) Initial Input").

Making M-x interpret empty input as the symbol at point changes
long-standing behaviour of a central feature and makes it easier to make
a mistake.  IMO typing M-n is not only good enough, but better, since it
works across all standard minibuffer reading functions.

You can always write a custom command to default to the command name at
point without needing to change M-x for everyone.

-- 
Basil