From: Drew Adams <drew.adams@oracle.com>
To: Noam Postavsky <npostavs@users.sourceforge.net>
Cc: 29399@debbugs.gnu.org
Subject: bug#29399: 26.0.90; `edit-kbd-macro' has bad prompt
Date: Wed, 22 Nov 2017 17:15:53 -0800 (PST) [thread overview]
Message-ID: <cdd4aa51-648c-404a-9aea-88e8bffa95c0@default> (raw)
In-Reply-To: <87y3mxzwb1.fsf@users.sourceforge.net>
> > It should use \\[execute-extended-command] and thus say:
> > "Keyboard macro to edit (C-x e, C-o, C-h l, or keys):"
>
> I'm not sure if this would help so much for the OP's case [1], which is
> more like:
>
> (defun my/execute-extended-command () ; actually `smex'[2] in OP's
> case
> (interactive)
> (call-interactively 'execute-extended-command))
> (global-set-key (kbd "M-x") 'my/execute-extended-command)
>
> With that kind of config, I get
> Keyboard macro to edit (C-x e, <execute>, C-h l, or keys):
Well, that's at least correct. ;-) The problem is that
there is no way to tell Emacs which binding to show.
I suppose you could use `set-advertised-calling-convention',
but a user shouldn't need to bother (or know about)
that, here.
This is a general Emacs gotcha/problem. It's not the
problem of this bug report.
Except for this, which I also said:
>> This prompt is anyway not clear. The command should
>> instead accept a key sequence that shows more complete
>> info/help, and the prompt should just mention that key
>> sequence.
That's the right thing to do. The prompt shouldn't
try to mention lots of keys. That's only good when
the command itself will actually read keys - it then
knows just which keys to mention: those it uses.
This command should mention only (at most) a help key
that it provides (would provide). Using that help key
(at that time - while prompted) would show whatever
help we want to show, including mentioning any keys
or commands, if appropriate.
Of course that help could itself fall into the problem
of showing a key such as `<execute>' or `<menu>'. But
as I said, that's a general problem.
It could choose to mention only command names, i.e.,
not use \\[...].
> I have no idea how to produce <execute> on my keyboard.
You probably cannot.
> Which ends up with this:
>
> "Keyboard macro to edit (C-x e, M-x execute-extended-command, C-h l,
> or keys):"
And that's as good as it could get. The command can
reasonably assume that you can use `execute-extended-command'
(which you can, I think, regardless of whether `M-x' is
bound to `smex'). The command cannot know that a user
always wants to use `smex' instead of `M-x'.
UNLESS the user (or `smex-mode' or whatever) actually
substitutes `smex' for `execute-extended-command' keys,
using remapping or using `substitute-key-definition'.
next prev parent reply other threads:[~2017-11-23 1:15 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-11-22 16:27 bug#29399: 26.0.90; `edit-kbd-macro' has bad prompt Drew Adams
2017-11-23 0:13 ` Noam Postavsky
2017-11-23 1:15 ` Drew Adams [this message]
2017-11-27 0:55 ` Noam Postavsky
2017-12-02 14:54 ` Noam Postavsky
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=cdd4aa51-648c-404a-9aea-88e8bffa95c0@default \
--to=drew.adams@oracle.com \
--cc=29399@debbugs.gnu.org \
--cc=npostavs@users.sourceforge.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).