GNU bug report logs - #50067
Context menus

Previous Next

Package: emacs;

Reported by: Juri Linkov <juri <at> linkov.net>

Date: Sun, 15 Aug 2021 08:52:01 UTC

Severity: normal

Tags: fixed

Fixed in version 28.0.50

Done: Juri Linkov <juri <at> linkov.net>

Bug is archived. No further changes may be made.

Full log


Message #57 received at 50067 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: juri <at> linkov.net, Stefan Monnier <monnier <at> iro.umontreal.ca>
Cc: alan <at> idiocy.org, mattiase <at> acm.org, homeros.misasa <at> gmail.com,
 tkk <at> misasa.okayama-u.ac.jp, larsi <at> gnus.org, 50067 <at> debbugs.gnu.org
Subject: Re: bug#50067: Context menus
Date: Wed, 18 Aug 2021 21:39:55 +0300
> Date: Wed, 18 Aug 2021 21:12:58 +0300
> From: Eli Zaretskii <eliz <at> gnu.org>
> Cc: alan <at> idiocy.org, mattiase <at> acm.org, homeros.misasa <at> gmail.com,
>  tkk <at> misasa.okayama-u.ac.jp, larsi <at> gnus.org, 50067 <at> debbugs.gnu.org
> 
> > > I see you already pushed this, but it's a bad idea: it makes ugly
> > > context menus on TTYs (and AFAIU also on non-toolkit X builds): these
> > > _require_ the menu name because they display a caption which looks bad
> > > with an empty name.
> > 
> > I guess the presence of the title should be platform-dependent.
> > For example, without a title it looks great on the GTK build.
> 
> What happens if the GTK build displays a TTY frame?  Isn't the menu
> definition global, and thus doesn't distinguish between frame types?

Come to think about it: aren't menu keymaps _required_ to have this
string?  The ELisp manual says:

   -- Function: make-sparse-keymap &optional prompt
       This function creates and returns a new sparse keymap with no
       entries.  (A sparse keymap is the kind of keymap you usually want.)
       The new keymap does not contain a char-table, unlike ‘make-keymap’,
       and does not bind any events.

	    (make-sparse-keymap)
		⇒ (keymap)

       If you specify PROMPT, that becomes the overall prompt string for
       the keymap.  You should specify this only for menu keymaps (*note
       Defining Menus::).  A keymap with an overall prompt string will
       always present a mouse menu or a keyboard menu if it is active for
       looking up the next input event.

Stefan, did we remove this requirement at some point, or is it still a
requirement?

If this is still needed (and it seems to be, at least on some frame
types), I guess it's the code which produces native menus that wants
not to have this caption (e.g., on macOS and GTK) -- that code should
ignore this string and not stuff it into the native menu widget.  But
internally the menu name should still be present in the Lisp data
structure.




This bug report was last modified 3 years and 171 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.