GNU bug report logs -
#1525
prompt string for execute-extended-command not flexible
Previous Next
Reported by: xah lee <xah <at> xahlee.org>
Date: Tue, 9 Dec 2008 22:45:03 UTC
Severity: minor
Tags: notabug
Done: Lars Magne Ingebrigtsen <larsi <at> gnus.org>
Bug is archived. No further changes may be made.
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 1525 in the body.
You can then email your comments to 1525 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded to
bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>
:
bug#1525
; Package
emacs
.
Full text and
rfc822 format available.
Acknowledgement sent to
xah lee <xah <at> xahlee.org>
:
New bug report received and forwarded. Copy sent to
Emacs Bugs <bug-gnu-emacs <at> gnu.org>
.
Full text and
rfc822 format available.
Message #5 received at submit <at> emacsbugs.donarmstrong.com (full text, mbox):
The prompt string for execute-extended-command is “M-x ”, but that
is not correct if the command is bound to some other key by
customization.
Kevin Rodgers gave this explanation recently in “gnu.emacs.help”:
«
seber...@spawar.navy.mil wrote:
> When you type a command in Emacs you are greeted with the prompt "M-
> x". How change that prompt string?
Change this code in src/keyboard.c and recompile emacs:
/* This isn't strictly correct if execute-extended-command
is bound to anything else. Perhaps it should use
this_command_keys? */
strcat (buf, "M-x ");
--
Kevin Rodgers
»
So, possibly the promp can be changed to “Execute command ”.
Thanks.
Xah
∑ http://xahlee.org/
☄
Severity set to `minor' from `normal'
Request was from
Glenn Morris <rgm <at> gnu.org>
to
control <at> emacsbugs.donarmstrong.com
.
(Wed, 10 Dec 2008 02:30:04 GMT)
Full text and
rfc822 format available.
Information forwarded
to
owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org
:
bug#1525
; Package
emacs
.
(Sun, 10 Jul 2011 13:17:01 GMT)
Full text and
rfc822 format available.
Message #10 received at 1525 <at> debbugs.gnu.org (full text, mbox):
xah lee <xah <at> xahlee.org> writes:
> The prompt string for execute-extended-command is “M-x ”, but that is
> not correct if the command is bound to some other key by
> customization.
>
> Kevin Rodgers gave this explanation recently in “gnu.emacs.help”:
>
> «
> seber...@spawar.navy.mil wrote:
>> When you type a command in Emacs you are greeted with the prompt "M-
>> x". How change that prompt string?
>
> Change this code in src/keyboard.c and recompile emacs:
> /* This isn't strictly correct if execute-extended-command
> is bound to anything else. Perhaps it should use
> this_command_keys? */
> strcat (buf, "M-x ");
This is no longer done, but it's still not quite right.
If you do:
(local-set-key [(meta z)] 'execute-extended-command)
Then you still get "M-x" as the prompt if you do `M-z'.
The reason is that it looks up the command first, and then picks one of
the bindings as the description, with code that's kinda like this:
(key-description (car (where-is-internal 'execute-extended-command)))
Is there any reason it doesn't just use this_command_keys which
presumably would be more correct?
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog http://lars.ingebrigtsen.no/
Information forwarded
to
owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org
:
bug#1525
; Package
emacs
.
(Tue, 12 Jul 2011 03:21:01 GMT)
Full text and
rfc822 format available.
Message #13 received at 1525 <at> debbugs.gnu.org (full text, mbox):
Lars Magne Ingebrigtsen <larsi <at> gnus.org> writes:
> (local-set-key [(meta z)] 'execute-extended-command)
>
> Then you still get "M-x" as the prompt if you do `M-z'.
>
> The reason is that it looks up the command first, and then picks one of
> the bindings as the description, with code that's kinda like this:
>
> (key-description (car (where-is-internal 'execute-extended-command)))
>
> Is there any reason it doesn't just use this_command_keys which
> presumably would be more correct?
OTOH, you might get into a tricky situation if execute-extended-command
was launched by, say, a mouse event.
Information forwarded
to
owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org
:
bug#1525
; Package
emacs
.
(Tue, 12 Jul 2011 03:43:01 GMT)
Full text and
rfc822 format available.
Message #16 received at 1525 <at> debbugs.gnu.org (full text, mbox):
> (key-description (car (where-is-internal 'execute-extended-command)))
> Is there any reason it doesn't just use this_command_keys which
> presumably would be more correct?
Actually the problem is that it should never have said "M-x " but rather
"Run command: ". From this viewpoint, there's no need to use
this_command_keys: "M-x" is really only meant to be "the canonical
key-binding for this command", so (key-description (car
(where-is-internal 'execute-extended-command))) works as well.
Otherwise if someone happens to hit the "menu" key without realizing
that it's bound to execute-extended-command he might start wonder "OK
the menu bar says 'menu ' what do I do now?", whereas presumably with
"M-x " the user sees "oh that runs the same command as M-x, cool".
Stefan
Added tag(s) notabug.
Request was from
Lars Magne Ingebrigtsen <larsi <at> gnus.org>
to
control <at> debbugs.gnu.org
.
(Tue, 12 Jul 2011 08:52:02 GMT)
Full text and
rfc822 format available.
bug closed, send any further explanations to
1525 <at> debbugs.gnu.org and xah lee <xah <at> xahlee.org>
Request was from
Lars Magne Ingebrigtsen <larsi <at> gnus.org>
to
control <at> debbugs.gnu.org
.
(Tue, 12 Jul 2011 08:52:02 GMT)
Full text and
rfc822 format available.
Information forwarded
to
owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org
:
bug#1525
; Package
emacs
.
(Tue, 12 Jul 2011 08:53:01 GMT)
Full text and
rfc822 format available.
Message #23 received at 1525 <at> debbugs.gnu.org (full text, mbox):
Stefan Monnier <monnier <at> iro.umontreal.ca> writes:
> Actually the problem is that it should never have said "M-x " but rather
> "Run command: ". From this viewpoint, there's no need to use
> this_command_keys: "M-x" is really only meant to be "the canonical
> key-binding for this command", so (key-description (car
> (where-is-internal 'execute-extended-command))) works as well.
> Otherwise if someone happens to hit the "menu" key without realizing
> that it's bound to execute-extended-command he might start wonder "OK
> the menu bar says 'menu ' what do I do now?", whereas presumably with
> "M-x " the user sees "oh that runs the same command as M-x, cool".
Right. So I'm closing this report, since this isn't really a bug.
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog http://lars.ingebrigtsen.no/
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Tue, 09 Aug 2011 11:24:04 GMT)
Full text and
rfc822 format available.
This bug report was last modified 13 years and 320 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.