From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#50067: Context menus Date: Wed, 18 Aug 2021 21:39:55 +0300 Message-ID: <83pmua38ck.fsf@gnu.org> References: <74BC00E9-2509-47DA-9428-1523FF7F3B33@acm.org> <87v942pvcj.fsf@mail.linkov.net> <83zgte3asy.fsf@gnu.org> <87mtpepqzw.fsf@mail.linkov.net> <83sfz639lh.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="11601"; mail-complaints-to="usenet@ciao.gmane.io" Cc: alan@idiocy.org, mattiase@acm.org, homeros.misasa@gmail.com, tkk@misasa.okayama-u.ac.jp, larsi@gnus.org, 50067@debbugs.gnu.org To: juri@linkov.net, Stefan Monnier Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Aug 18 20:41:15 2021 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mGQV1-0002mo-IQ for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 18 Aug 2021 20:41:15 +0200 Original-Received: from localhost ([::1]:42984 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mGQUz-0000sw-FI for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 18 Aug 2021 14:41:13 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:51030) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mGQUo-0000sa-Fb for bug-gnu-emacs@gnu.org; Wed, 18 Aug 2021 14:41:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:46081) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mGQUo-0006j4-9I for bug-gnu-emacs@gnu.org; Wed, 18 Aug 2021 14:41:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mGQUn-0007JB-Sy for bug-gnu-emacs@gnu.org; Wed, 18 Aug 2021 14:41:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 18 Aug 2021 18:41:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 50067 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: fixed Original-Received: via spool by 50067-submit@debbugs.gnu.org id=B50067.162931202028039 (code B ref 50067); Wed, 18 Aug 2021 18:41:01 +0000 Original-Received: (at 50067) by debbugs.gnu.org; 18 Aug 2021 18:40:20 +0000 Original-Received: from localhost ([127.0.0.1]:57627 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mGQU4-0007I6-7J for submit@debbugs.gnu.org; Wed, 18 Aug 2021 14:40:20 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:34826) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mGQU2-0007Hq-7A for 50067@debbugs.gnu.org; Wed, 18 Aug 2021 14:40:15 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:33244) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mGQTr-0005vk-Jm; Wed, 18 Aug 2021 14:40:03 -0400 Original-Received: from 84.94.185.95.cable.012.net.il ([84.94.185.95]:4871 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mGQTq-0007vN-5d; Wed, 18 Aug 2021 14:40:02 -0400 In-Reply-To: <83sfz639lh.fsf@gnu.org> (message from Eli Zaretskii on Wed, 18 Aug 2021 21:12:58 +0300) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:212181 Archived-At: > Date: Wed, 18 Aug 2021 21:12:58 +0300 > From: Eli Zaretskii > Cc: alan@idiocy.org, mattiase@acm.org, homeros.misasa@gmail.com, > tkk@misasa.okayama-u.ac.jp, larsi@gnus.org, 50067@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.