* bug#17888: 24.4.50; key binding not shown in menu item for alias command
@ 2014-06-30 22:34 Drew Adams
2021-01-20 2:06 ` Lars Ingebrigtsen
0 siblings, 1 reply; 5+ messages in thread
From: Drew Adams @ 2014-06-30 22:34 UTC (permalink / raw)
To: 17888
emacs -Q
(defun foo () (interactive)(message "Foo"))
(global-set-key "\C-o" 'foo)
(defalias 'bar 'foo)
(define-key menu-bar-edit-menu [bar] '(menu-item "Do It" bar))
In the Edit menu, the key `C-o' is not shown next to item `Do It'.
Also:
(defun toto () (interactive)(message "Toto"))
(define-key menu-bar-edit-menu [toto] '(menu-item "To It" toto))
(defalias 'titi 'toto)
(global-set-key "\C-n" 'titi)
The binding `C-n' is not shown next to menu item `To It'.
Seems like a command alias should be treated like the aliased command
when it comes to showing key bindings in menus. That would help users.
In GNU Emacs 24.4.50.1 (i686-pc-mingw32)
of 2014-06-28 on ODIEONE
Bzr revision: 117431 rgm@gnu.org-20140628015517-eku6hj8mpgcvfnso
Windowing system distributor `Microsoft Corp.', version 6.1.7601
Configured using:
`configure --prefix=/c/Devel/emacs/snapshot/trunk
--enable-checking=yes,glyphs 'CFLAGS=-O0 -g3'
LDFLAGS=-Lc:/Devel/emacs/lib 'CPPFLAGS=-DGC_MCHECK=1
-Ic:/Devel/emacs/include''
^ permalink raw reply [flat|nested] 5+ messages in thread
* bug#17888: 24.4.50; key binding not shown in menu item for alias command
2014-06-30 22:34 bug#17888: 24.4.50; key binding not shown in menu item for alias command Drew Adams
@ 2021-01-20 2:06 ` Lars Ingebrigtsen
2021-01-20 15:10 ` Eli Zaretskii
0 siblings, 1 reply; 5+ messages in thread
From: Lars Ingebrigtsen @ 2021-01-20 2:06 UTC (permalink / raw)
To: Drew Adams; +Cc: 17888
Drew Adams <drew.adams@oracle.com> writes:
> (defun foo () (interactive)(message "Foo"))
> (global-set-key "\C-o" 'foo)
>
> (defalias 'bar 'foo)
> (define-key menu-bar-edit-menu [bar] '(menu-item "Do It" bar))
>
> In the Edit menu, the key `C-o' is not shown next to item `Do It'.
Is it supposed to? I'm not sure whether that would be surprising or
not. Does anybody have an opinion?
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
^ permalink raw reply [flat|nested] 5+ messages in thread
* bug#17888: 24.4.50; key binding not shown in menu item for alias command
2021-01-20 2:06 ` Lars Ingebrigtsen
@ 2021-01-20 15:10 ` Eli Zaretskii
2021-01-27 6:49 ` Lars Ingebrigtsen
0 siblings, 1 reply; 5+ messages in thread
From: Eli Zaretskii @ 2021-01-20 15:10 UTC (permalink / raw)
To: Lars Ingebrigtsen; +Cc: 17888
> From: Lars Ingebrigtsen <larsi@gnus.org>
> Date: Wed, 20 Jan 2021 03:06:07 +0100
> Cc: 17888@debbugs.gnu.org
>
> Drew Adams <drew.adams@oracle.com> writes:
>
> > (defun foo () (interactive)(message "Foo"))
> > (global-set-key "\C-o" 'foo)
> >
> > (defalias 'bar 'foo)
> > (define-key menu-bar-edit-menu [bar] '(menu-item "Do It" bar))
> >
> > In the Edit menu, the key `C-o' is not shown next to item `Do It'.
>
> Is it supposed to? I'm not sure whether that would be surprising or
> not. Does anybody have an opinion?
Indeed, it isn't clear at all that the expectations in this case are
correct.
^ permalink raw reply [flat|nested] 5+ messages in thread
* bug#17888: 24.4.50; key binding not shown in menu item for alias command
2021-01-20 15:10 ` Eli Zaretskii
@ 2021-01-27 6:49 ` Lars Ingebrigtsen
2021-01-27 16:31 ` bug#17888: [External] : " Drew Adams
0 siblings, 1 reply; 5+ messages in thread
From: Lars Ingebrigtsen @ 2021-01-27 6:49 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: 17888
Eli Zaretskii <eliz@gnu.org> writes:
> Indeed, it isn't clear at all that the expectations in this case are
> correct.
So I'm closing this bug report.
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
^ permalink raw reply [flat|nested] 5+ messages in thread
* bug#17888: [External] : Re: bug#17888: 24.4.50; key binding not shown in menu item for alias command
2021-01-27 6:49 ` Lars Ingebrigtsen
@ 2021-01-27 16:31 ` Drew Adams
0 siblings, 0 replies; 5+ messages in thread
From: Drew Adams @ 2021-01-27 16:31 UTC (permalink / raw)
To: Lars Ingebrigtsen, Eli Zaretskii; +Cc: 17888@debbugs.gnu.org
> > Indeed, it isn't clear at all that the expectations
> > in this case are correct.
To this user, at least, it's clearer that users
will expect the alias's key indication than that
they will expect no key indication.
More importantly, showing the key is more helpful
to users than not showing it. The key has the
same effect, for users, as using the menu item.
Consider also:
(defun foo () (interactive) (message "FOO"))
(global-set-key "\C-o" 'foo)
(defalias 'bar 'foo)
C-h w bar
bar is not on any key;
its alias foo is on C-o
That's nice, complete info. Both pieces of that
info are appropriate for such a Help command.
Presumably we tell users about the alias binding
to let them know that you can use `C-o' to, in
effect, invoke `bar'.
That's the info that's missing, for a menu item.
> So I'm closing this bug report.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2021-01-27 16:31 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-06-30 22:34 bug#17888: 24.4.50; key binding not shown in menu item for alias command Drew Adams
2021-01-20 2:06 ` Lars Ingebrigtsen
2021-01-20 15:10 ` Eli Zaretskii
2021-01-27 6:49 ` Lars Ingebrigtsen
2021-01-27 16:31 ` bug#17888: [External] : " Drew Adams
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).