Subject: bug#52870: [External] : bug#52870: Is displaying <menu-bar> bindings in describe-function useful?

From: Drew Adams <[email-masked]>
Date: Wed, 29 Dec 2021 15:25:45 +0000

> For example, in Dired, I type `C-h f dired-do-chmod RET' and read:
> 
>     It is bound to M, <menu-bar> <operate> <Change Mode...>.

I don't see that in Emacs 22 through the latest
release (Emacs 27.2).  It was likely introduced
in Emacs 21.

Perhaps someone has changed it for Emacs 28/29?
If so, why?

This is what I see:

 It is bound to M, <menu-bar> <operate> <chmod>.
                                        ^^^^^^^

Why change the name of the (pseudo-)function
key to be that of a menu item (including `...'
no less)?  Then, if that menu-item name changes
are you going to change the name of the key,
and thus break code that refers to the previous
name?  (Apparently such breakage is already in
progress for Emacs 28/29, by replacing <chmod>.)

> Is the "<menu-bar> ..." part there very useful?  I personally find it
> confusing and distracting.  This is true even when I am specifically
> developing menus; I'd rather look at the menu definition and the
> resulting menu bar.

What is it that you're confused about?

Yes, it's useful.  It's important to show all of
the bindings.  Ignore it if it doesn't interest you.

> I would therefore like to suggest either:
> 
> a) Displaying nothing at all for such bindings.  The menu entries will
>    be shown in the menu itself, and that is enough.

No, it's not enough.

This is about help (`C-h...').  It's about seeing
the bindings together with the doc for the command.

>    In this case, we could have an option to revert to the old behavior.

The proposed "new" behavior has no reason to be
adopted (apart from your being confused and
distracted by it).  What's the need/purpose?
Just to remove helpful information that you're
not interested in?

Why do you suppose that that info was added to
this help output - for no reason?  Or just to
confuse and distract?

> b) Show it separately from other key bindings at the end,

Why?  These bindings are bindings, like the others.
They're neither more nor less important.  Why split
the locations?

And why wouldn't we want to show (all) the key
bindings up front.  For a command, showing key
bindings is super-helpful, succinct info.

>   maybe something like this:
> 
>   Probably introduced at or before Emacs version 24.3.
>   It can be invoked from the menu: "Operate" -> "Change Mode..."

Absolutely not.  It's not about the menu-item text.
It's about the _key sequence_: what Emacs itself
calls that sequence - how Emacs itself talks about
such keys.