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 20:46:53 +0300 Message-ID: <83zgte3asy.fsf@gnu.org> References: <74BC00E9-2509-47DA-9428-1523FF7F3B33@acm.org> <87v942pvcj.fsf@mail.linkov.net> 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="29526"; 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 Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Aug 18 19:48:17 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 1mGPfl-0007Qf-0X for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 18 Aug 2021 19:48:17 +0200 Original-Received: from localhost ([::1]:38520 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mGPfj-0000rA-37 for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 18 Aug 2021 13:48:15 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:37732) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mGPfX-0000pE-Sk for bug-gnu-emacs@gnu.org; Wed, 18 Aug 2021 13:48:04 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:45985) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mGPfW-0002fg-Cx for bug-gnu-emacs@gnu.org; Wed, 18 Aug 2021 13:48:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mGPfW-0003n8-BZ for bug-gnu-emacs@gnu.org; Wed, 18 Aug 2021 13:48:02 -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 17:48:02 +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.162930883114517 (code B ref 50067); Wed, 18 Aug 2021 17:48:02 +0000 Original-Received: (at 50067) by debbugs.gnu.org; 18 Aug 2021 17:47:11 +0000 Original-Received: from localhost ([127.0.0.1]:57531 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mGPec-0003m0-SX for submit@debbugs.gnu.org; Wed, 18 Aug 2021 13:47:10 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:49406) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mGPeb-0003lI-Q7 for 50067@debbugs.gnu.org; Wed, 18 Aug 2021 13:47:06 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:59244) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mGPeQ-0001us-VZ; Wed, 18 Aug 2021 13:46:54 -0400 Original-Received: from 84.94.185.95.cable.012.net.il ([84.94.185.95]:1638 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 1mGPeQ-0008Er-IE; Wed, 18 Aug 2021 13:46:54 -0400 In-Reply-To: <87v942pvcj.fsf@mail.linkov.net> (message from Juri Linkov on Wed, 18 Aug 2021 19:42:12 +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:212169 Archived-At: > From: Juri Linkov > Date: Wed, 18 Aug 2021 19:42:12 +0300 > Cc: 50067@debbugs.gnu.org, Tak Kunihiro , > tkk@misasa.okayama-u.ac.jp, Lars Ingebrigtsen , > Alan Third > > > 2. The context menu contains the disabled entry "Context Menu" as some kind > > of title – that is very alien on macOS where context menus never have > > titles. I believe the same is true at least on Windows, and frankly, there > > should be no need to explicitly tell the user that what he or she is > > looking at is a context menu. I suggest we just drop the title on > > all platforms. > > > > Replacing (purecopy "Context Menu") by "" in `context-menu-entry` makes it > > go away, but then we get the new title "Select" from heavens knows where > > (menu.c, from the look of it). Apparently the Emacs menu system just wants > > a title; we should find a way to disable it in popup menus. > > After trying to remove it altogether, there is no title at all, > but maybe it's platform-dependent (I tested on GTK): > > diff --git a/lisp/mouse.el b/lisp/mouse.el > index 9b7d4c240f..5193994231 100644 > --- a/lisp/mouse.el > +++ b/lisp/mouse.el > @@ -304,7 +304,7 @@ context-menu-filter-function > (defun context-menu-map () > "Return composite menu map." > - (let ((menu (make-sparse-keymap "Context Menu"))) > + (let ((menu (make-sparse-keymap))) > (run-hook-wrapped 'context-menu-functions > (lambda (fun) > (setq menu (funcall fun menu)) 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 don't really understand the original complaint: we have similar captions on the menu shown by C-mouse-3 in the default configuration: do macOS users want those to be removed as well? If not, what is the difference?