emacs-devel
[Top][All Lists]
Advanced

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

RE: [External] : Re: Current mode command discovery


From: Drew Adams
Subject: RE: [External] : Re: Current mode command discovery
Date: Sat, 20 Feb 2021 19:45:41 +0000

> ;; This isn't strictly correct if `execute-extended-command'
> ;; is bound to anything else (e.g. [menu]).
> ;; It could use (key-description (this-single-command-keys)),
> ;; but actually a prompt other than "M-x" would be confusing,
> ;; because "M-x" is a well-known prompt to read a command
> ;; and it serves as a shorthand for "Extended command: ".
> 
> Anybody got an opinion on what the best fix here would be?
> The obvious fix is to do what the comment says, which would
> also make this be more consistent if the user has rebound
> the command.

Opinion?  Sure.  Do what Icicles does (or similar):
use a prompt that _prompts what to enter_, instead of
just echoing the key sequence that invoked the command.

Just "M-x " as prompt doesn't even _look_ like it's
prompting - there's not even a colon (:), let alone
some indication of what you're being prompted to type.
That "prompt" looks like just a keystroke echo.

In Icicles there are two different commands (which is
what you're also doing now - you intend one command
for `M-x' and one for `M-S-x'):

1. `icicle-execute-extended-command' - `M-x'
   Like vanilla Emacs (but a multi-command etc.).

2. `icicle-command-abbrev' - `M-ESC C-x' (`ESC ESC C-x')
   Read command name or its abbreviation; read command
   args; invoke command.

Their prompts are:

1. "Execute command: "
2. "Command or abbrev: "

So instead of using "M-x " as prompt, use something
like "Execute command: ".



reply via email to

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