GNU bug report logs - #50067
Context menus

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: emacs; Reported by: Juri Linkov <juri@HIDDEN>; Keywords: fixed; Done: Juri Linkov <juri@HIDDEN>; Maintainer for emacs is bug-gnu-emacs@HIDDEN.

Message received at 50067 <at> debbugs.gnu.org:


Received: (at 50067) by debbugs.gnu.org; 20 Oct 2021 17:00:27 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Oct 20 13:00:27 2021
Received: from localhost ([127.0.0.1]:55364 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1mdEx1-00082E-87
	for submit <at> debbugs.gnu.org; Wed, 20 Oct 2021 13:00:27 -0400
Received: from relay7-d.mail.gandi.net ([217.70.183.200]:54187)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <juri@HIDDEN>) id 1mdEx0-0007v9-1A
 for 50067 <at> debbugs.gnu.org; Wed, 20 Oct 2021 13:00:26 -0400
Received: (Authenticated sender: juri@HIDDEN)
 by relay7-d.mail.gandi.net (Postfix) with ESMTPSA id 139732000B
 for <50067 <at> debbugs.gnu.org>; Wed, 20 Oct 2021 17:00:18 +0000 (UTC)
From: Juri Linkov <juri@HIDDEN>
To: 50067 <at> debbugs.gnu.org
Subject: Re: bug#50067: Context menus
References: <87pmufb3u0.fsf@HIDDEN>
Date: Wed, 20 Oct 2021 19:59:18 +0300
In-Reply-To: <87pmufb3u0.fsf@HIDDEN> (Juri Linkov's message of "Sun, 
 15 Aug 2021 11:48:55 +0300")
Message-ID: <875ytr1vkp.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (x86_64-pc-linux-gnu)
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="=-=-="
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 50067
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

--=-=-=
Content-Type: text/plain

Currently the option context-menu-global of context-menu-functions
doesn't take into account the variable menu-bar-final-items
to properly order the menu items.  This patch makes it possible
to order the items of global-map instead of menu-bar-current-active-maps
used in menu-bar-keymap by default:


--=-=-=
Content-Type: text/x-diff
Content-Disposition: inline; filename=menu-bar-keymap.patch

diff --git a/lisp/menu-bar.el b/lisp/menu-bar.el
index 980ba2fcd1..b6cc29720d 100644
--- a/lisp/menu-bar.el
+++ b/lisp/menu-bar.el
@@ -2713,9 +2713,11 @@ menu-bar-open-mouse
                        (cdr menu-bar-item-cons)
                      0))))
 
-(defun menu-bar-keymap ()
+(defun menu-bar-keymap (&optional keymap)
   "Return the current menu-bar keymap.
-
+It's possible to use the KEYMAP argument to override the default keymap
+that is the currently active maps.  For example, the argument KEYMAP
+could provide `global-map' where items are limited to the global map only.
 The ordering of the return value respects `menu-bar-final-items'."
   (let ((menu-bar '())
         (menu-end '()))
@@ -2729,7 +2731,7 @@ menu-bar-keymap
              ;; sorting.
              (push (cons pos menu-item) menu-end)
            (push menu-item menu-bar))))
-     (lookup-key (menu-bar-current-active-maps) [menu-bar]))
+     (lookup-key (or keymap (menu-bar-current-active-maps)) [menu-bar]))
     `(keymap ,@(nreverse menu-bar)
              ,@(mapcar #'cdr (sort menu-end
                                    (lambda (a b)
diff --git a/lisp/mouse.el b/lisp/mouse.el
index 3e00ca7ce1..6c97cc365f 100644
--- a/lisp/mouse.el
+++ b/lisp/mouse.el
@@ -364,7 +364,7 @@ context-menu-global
                 (when (consp binding)
                   (define-key-after menu (vector key)
                     (copy-sequence binding))))
-              (lookup-key global-map [menu-bar]))
+              (menu-bar-keymap global-map))
   menu)
 
 (defun context-menu-local (menu _click)

--=-=-=--




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#50067; Package emacs. Full text available.

Message received at 50067 <at> debbugs.gnu.org:


Received: (at 50067) by debbugs.gnu.org; 29 Sep 2021 07:20:42 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Sep 29 03:20:42 2021
Received: from localhost ([127.0.0.1]:47667 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1mVTtR-0000s8-U4
	for submit <at> debbugs.gnu.org; Wed, 29 Sep 2021 03:20:42 -0400
Received: from relay3-d.mail.gandi.net ([217.70.183.195]:35333)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <juri@HIDDEN>) id 1mVTtI-0000re-3g
 for 50067 <at> debbugs.gnu.org; Wed, 29 Sep 2021 03:20:32 -0400
Received: (Authenticated sender: juri@HIDDEN)
 by relay3-d.mail.gandi.net (Postfix) with ESMTPSA id B0C6760008;
 Wed, 29 Sep 2021 07:20:25 +0000 (UTC)
From: Juri Linkov <juri@HIDDEN>
To: Lars Ingebrigtsen <larsi@HIDDEN>
Subject: Re: bug#50067: Context menus
Organization: LINKOV.NET
References: <87pmufb3u0.fsf@HIDDEN> <877df211vs.fsf@HIDDEN>
 <87zgryggqw.fsf@HIDDEN> <87r1d8lelk.fsf@HIDDEN>
Date: Wed, 29 Sep 2021 10:00:10 +0300
In-Reply-To: <87r1d8lelk.fsf@HIDDEN> (Juri Linkov's message of "Tue, 
 28 Sep 2021 21:49:59 +0300")
Message-ID: <87k0izsw79.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (x86_64-pc-linux-gnu)
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 50067
Cc: 50067 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

>> I'm not sure I agree with those guidelines -- displaying the key
>> bindings increases the discoverability of those key bindings.
>
> For example, how to explain to the users why a keybinding
> is displayed for "Undo", but not for "Redo".
>
> Another question is why currently `C-x u' is displayed
> instead of the shorter `C-/' for "Undo".
>
> So maybe simpler just to disable keys only for "Undo"
> with ‘:keys ""’.  Or the other way around: to manually
> add some suggested keybinding to "Redo".

I think it would be better to rebind "Undo" from 'undo'
to 'undo-only'.  Since 'undo-only' has no keybinding,
it will not be displayed in the menu.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#50067; Package emacs. Full text available.

Message received at 50067 <at> debbugs.gnu.org:


Received: (at 50067) by debbugs.gnu.org; 28 Sep 2021 22:09:00 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Sep 28 18:09:00 2021
Received: from localhost ([127.0.0.1]:47235 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1mVLHX-0001kx-V6
	for submit <at> debbugs.gnu.org; Tue, 28 Sep 2021 18:09:00 -0400
Received: from mx0a-00069f02.pphosted.com ([205.220.165.32]:22206)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <drew.adams@HIDDEN>) id 1mVLHL-0001kf-DF
 for 50067 <at> debbugs.gnu.org; Tue, 28 Sep 2021 18:08:58 -0400
Received: from pps.filterd (m0246627.ppops.net [127.0.0.1])
 by mx0b-00069f02.pphosted.com (8.16.1.2/8.16.1.2) with SMTP id 18SL2kCR031120; 
 Tue, 28 Sep 2021 22:08:46 GMT
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com;
 h=from : to : cc :
 subject : date : message-id : references : in-reply-to : content-type :
 content-transfer-encoding : mime-version; s=corp-2021-07-09;
 bh=2Rg6EiUXxPSVxHAZ/Ia422Mfldu6YSDYrOlk28Hu/o0=;
 b=bf06C2tlw8RgzFavlDogCidbta26HCh/EdV/fcqJnn87A6raQhDIhpi17Nw2CFrcZMAW
 2MU0gXxlOkcXJdpPx8eBHgT4mT0OGegckMdgb7yUby0G/fIfLj1bGjv7BqHru6UQ39mT
 5wf/9PHwhiQZ4s0Wm7TxdATYPWRoNNaYDECfWG/YlbaVfHOZjd+LHWR3t8HQ4bCIGK3u
 UStirRFAlTARFyBx7IM5DD+FdZPg8787DW9tEwEbA5/lCP90/Rrgys1DBQBJkya6l0cS
 YsVyauO6B5QGtHPeeRD1roOlDg5muV41Dx9/R/VEjKLtzLL15EI3sKsJjg4lO9zGeMrh 9A== 
Received: from userp3020.oracle.com (userp3020.oracle.com [156.151.31.79])
 by mx0b-00069f02.pphosted.com with ESMTP id 3bbejen6n4-1
 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK);
 Tue, 28 Sep 2021 22:08:46 +0000
Received: from pps.filterd (userp3020.oracle.com [127.0.0.1])
 by userp3020.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 18SM08Xw103458;
 Tue, 28 Sep 2021 22:08:44 GMT
Received: from nam10-dm6-obe.outbound.protection.outlook.com
 (mail-dm6nam10lp2107.outbound.protection.outlook.com [104.47.58.107])
 by userp3020.oracle.com with ESMTP id 3bc3cd911x-1
 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK);
 Tue, 28 Sep 2021 22:08:44 +0000
ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none;
 b=Z+06GVbWfSIkMP6P100PWYa3Kd3JooNjTywfJ93UCj+m3Ch7YH2DUY1U4zGIvUrX5pmEKNw8me4YWHPpcIkB/16g8lDea68FCIgBvIsqfk13JIhg0QQO40bO3THlukXi6xP1QBo+rdlMABLOCFfiQhM4qAbB6z94BzSjjJD0pewG8Eia2zfzzmy7cZRxeAGIvmA62HWvXgJi9rHOC+Gm42LqPSATjqVlZtW5F8o+NJ+2KRMj0bZoFz4KFp3JVm3TqI1cLc9A/pGEf/QUEfr9yzh1lM/hx7cZm00hekJeFjRh5lBkiVT3IKmrAbnMrEwQLUmIT9jRiSlPtAxQWvhC0w==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; 
 s=arcselector9901;
 h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; 
 bh=2Rg6EiUXxPSVxHAZ/Ia422Mfldu6YSDYrOlk28Hu/o0=;
 b=fiJfp61v1FYBW867WZrUTeuGOkAAAPvNa6oxeWv1tvD1pUd1hovUoDwpSTMc9x1EYbDEtncoCgYJ2Sbj3h4jj6x00yKQPeivhy84G3BlNHvpMzl+KvGJ7mxp383JAooBwsZ2O12K5TJmjEihkGMEe8i9GJAtrii0okvNhO0nlmaSRG/2YpWdkpmm+7Mv+EAHGN00UgQRGTfGdPQjkLtKYNBNfS0eiQhZXH1eQkmlHGJThNQ4H2JmbLz+339z5q8yx5Xd2oW3a3IJo5o2NT9uLSdbUwki0huG9ktwTHpaLOL992i7JVOsZWdIj/WSyfEEQ/T43fyT0HedtYBzu/GPew==
ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass
 smtp.mailfrom=oracle.com; dmarc=pass action=none header.from=oracle.com;
 dkim=pass header.d=oracle.com; arc=none
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=oracle.onmicrosoft.com; s=selector2-oracle-onmicrosoft-com;
 h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck;
 bh=2Rg6EiUXxPSVxHAZ/Ia422Mfldu6YSDYrOlk28Hu/o0=;
 b=0H+a1Hnwns9hOxbZI9PuWiukgnZAyGzb052ul94nKfeP6r+uOUfNaZWHqZU2E+u+PIBv03cCRHtMRiPXC4oqwCKD2AzNnA1RpEyYjqsdAr6xIhTn3FN87Y7L1/TkxuX9YxZcV52xWzunYft8PxUG73ONBhMDTrG37kGdUQpU7RM=
Received: from SJ0PR10MB5488.namprd10.prod.outlook.com (2603:10b6:a03:37e::19)
 by SJ0PR10MB4656.namprd10.prod.outlook.com (2603:10b6:a03:2d1::20)
 with Microsoft SMTP Server (version=TLS1_2,
 cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4544.13; Tue, 28 Sep
 2021 22:08:42 +0000
Received: from SJ0PR10MB5488.namprd10.prod.outlook.com
 ([fe80::c0bc:7c3a:292f:8a82]) by SJ0PR10MB5488.namprd10.prod.outlook.com
 ([fe80::c0bc:7c3a:292f:8a82%9]) with mapi id 15.20.4544.021; Tue, 28 Sep 2021
 22:08:42 +0000
From: Drew Adams <drew.adams@HIDDEN>
To: Juri Linkov <juri@HIDDEN>, Lars Ingebrigtsen <larsi@HIDDEN>
Subject: RE: [External] : bug#50067: Context menus
Thread-Topic: [External] : bug#50067: Context menus
Thread-Index: AQHXtJvqhlIy+GxoT0STmxzPtmME8qu6AKtQ
Date: Tue, 28 Sep 2021 22:08:42 +0000
Message-ID: <SJ0PR10MB5488C36F76ADD44ED51A98A4F3A89@HIDDEN>
References: <87pmufb3u0.fsf@HIDDEN> <877df211vs.fsf@HIDDEN>
 <87zgryggqw.fsf@HIDDEN> <87r1d8lelk.fsf@HIDDEN>
In-Reply-To: <87r1d8lelk.fsf@HIDDEN>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach: 
X-MS-TNEF-Correlator: 
authentication-results: linkov.net; dkim=none (message not signed)
 header.d=none;linkov.net; dmarc=none action=none header.from=oracle.com;
x-ms-publictraffictype: Email
x-ms-office365-filtering-correlation-id: c3fc353e-28dd-4d42-3b1e-08d982cc886c
x-ms-traffictypediagnostic: SJ0PR10MB4656:
x-microsoft-antispam-prvs: <SJ0PR10MB4656679C1A9DFE6603C29DA3F3A89@HIDDEN>
x-ms-oob-tlc-oobclassifiers: OLM:6430;
x-ms-exchange-senderadcheck: 1
x-ms-exchange-antispam-relay: 0
x-microsoft-antispam: BCL:0;
x-microsoft-antispam-message-info: +LfVA9WjUZMJQ/5DLrt6RFNVFLENaJkJhcKyedwoNXLXtyySByXCa7DSzlhpPkYjKuSf9L5ClsM3DWqm/A1S8QGhkyOLciMyGZ8+YFUnUYmR7jNvsepHSsPmS1Cjs736EhwA+uF9B+Sxf8jirli6E0/Ev2AXvP2lA3ChsB/ezDHfkDaRvqAA58MdzUhw59XkvUzBySRLMcaxW/6AhFllasoguKp8KhwFivpBFCzL/ecZ58feoC3fsQEux60ZmEWO7TP8iPk4MspbcohQ2wrI/asGslN2vyin+2yw7P0tKfeu0vVhc6sbiGJdhjKiw6LKGNV7VYyGSTwRVgx9sLJK46hbLJnkHgJw6CWMwFrzsmCXSdlMGtOPcI+WOaeRyl0yYnubnZ9TDMFP/k/g+fT/qWP3x1kZyVy7eYo4lZJyd6YhUZcP1f553B6lgmgw7rLprm6nWZtY9iL0IiRU3+lYZQgP9s6hPLGYtf7Jtu9H7qbez/9dPsFXSBkSs+DN/GAMZf8tZaWczsdECSzcME9v4nhoCSns4zbjwTtb/N99zv7a6L+MVcm0LEZt6uISaSpqUK3VbnQi+Nxb0Q+//bIJY5LTZQu2TLHDzM9gFzjh/FQpRjAqR6di/wRMgkj+QbPEYvKX/3juJUR7/fziotGvRiQIXsjg2uAxRpoEg5OVS2eTwrmogVdD1QB7OmScajCYaXBx7zhY3gud88ZLUyAjvA==
x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:;
 IPV:NLI; SFV:NSPM; H:SJ0PR10MB5488.namprd10.prod.outlook.com; PTR:; CAT:NONE;
 SFS:(366004)(110136005)(8676002)(26005)(6506007)(4744005)(5660300002)(38070700005)(186003)(7696005)(71200400001)(55016002)(44832011)(66556008)(64756008)(316002)(86362001)(9686003)(76116006)(52536014)(4326008)(122000001)(33656002)(2906002)(8936002)(66476007)(66446008)(508600001)(66946007)(38100700002);
 DIR:OUT; SFP:1101; 
x-ms-exchange-antispam-messagedata-chunkcount: 1
x-ms-exchange-antispam-messagedata-0: =?utf-8?B?KzFKN3pReTRxWWVBSWtNZ05Ddy9zcG8vdDlHRXVVNzQ2NHJmdWFMaThkRy9a?=
 =?utf-8?B?dzJwYVRjRkV6cWp6ZmZSQU9PWjRVZFN2aE5CczlUeWVEa3hHMUVtRU9BakxU?=
 =?utf-8?B?b3prZWNaUWdPOVlqa0s0MjBtZUNSdEpVV2JpSGRoS0Q4SEJPam9lazZSbHZa?=
 =?utf-8?B?aUY0VDRHVkd5SVlLWjFpdkNYTHBPbmdVVXQySUFqc25NZE4zUzFhaituN0l1?=
 =?utf-8?B?ZHBna0RkV1QyUW1jTlo0cXFjNU8rWG1od1BvRWsya1NWVlZDQTFzODUzU3hQ?=
 =?utf-8?B?SXJvMnRadXNrZGt6WWNaRklYV2Nja3hRTDYxWnJGRHpjQjcyTHBURkprMXBV?=
 =?utf-8?B?K21UQkh4eXFydkgxVHRONUpWYmRUSDg1TFhtZWUwRDAwQy9MMnBLZDVTdVFw?=
 =?utf-8?B?a09kQU94RUhVa1VFSkttOW9kclc4bXZZcElXcjJ3clk1RkpITVBoT2ZtR214?=
 =?utf-8?B?YURQbkhsZi9LNDVJTCtmT1RxYzZSYXhrcERqelJLUDdnM2NHYlF5VVlNSGZw?=
 =?utf-8?B?NW52eVVJYjFzQkxGK3pnN0RvY1BaaThDelZRTXpyMUFIRk4zYWtwaGdtdzN3?=
 =?utf-8?B?ZzlSUUI0SkxzS3hucVg3ZXVIM2NaYlRoYkdUakxOQzhvbWFTbHJVZnlQRkxI?=
 =?utf-8?B?NXlRS0dSdzVGYmFtSzlKL1h6ZHozMUF3K1BkQlNmdDZXbkZnTkNWQVhMVWla?=
 =?utf-8?B?VVZqMERBeUxIWjZZbW1lVkt2Q2RZQkFZL0ZRMEZkaDRCMlB6ZHNTOTFjMTF4?=
 =?utf-8?B?NUhjczU5YjdJeER5OE5ZczJ2L2VLeGh3b0N1U3FEZ29WVlBGcytBNm9JNWtH?=
 =?utf-8?B?cG44Vjh4N0ZBM3kwelE5L1l2OUEydm4xcytmZ2pPT01sNU92bEtyQTNVb0d4?=
 =?utf-8?B?QWJBZkJpbVh4aE1raUlDVWVHS0FoaitsUlptdkFDRS9iSjZMbDJTalZXRmpw?=
 =?utf-8?B?NWVRcWlNUHNnSmErODJyMmpBMXU3dWNXSUdUWUVnaGFIY1hsMVl5NEM2MVdv?=
 =?utf-8?B?VU94WW1DMmtOcUlnT1JiZUVoT0RIUTJBR2hYbVV4SkIzb3FmbjRSOUU1Rmkr?=
 =?utf-8?B?eDJlZUF4YlJqcDVyK3poaWRSNTdXbDlGSnhkbldHU0ZBRFpGVHA4MWVlUWNE?=
 =?utf-8?B?VnhTR0pudUtmeDQxUXljM1FvRWZNQVJsNmw3ZWZLSzRGK0FCK1FtSkxQRXJm?=
 =?utf-8?B?eldFc1pLOTlKcHQvYlE1aU16SE9hK1FnT3J2eVdJQ2VPeXJ1VDZYRFQ5QXVH?=
 =?utf-8?B?SHFaWTN2L0RGdENRbi9DTFVKSFlPRlUwLzY4WWIwL3RBMWxkcHpWa0N5MXRz?=
 =?utf-8?B?V0J5WDBQQWNvU29YMW4za003NStTaGFEOEx4YW1IbExqT3BtL3o4elNyTU9l?=
 =?utf-8?B?YWwya1ZTR01HYTl1YkVKSko1NUl5b0svMWhxeklOU2c0VU43Z1prK1FrbkZo?=
 =?utf-8?B?QlhoVzdvVE5JWnZsY04xTFNoNkUyUzZZUzhTbzN2ckdEb3JBSXk5djVjZHdB?=
 =?utf-8?B?TVRKNWMvdGRnWHZHMS82U2FLNGpZeG1iMk95b3BkUFN1aGl4VkpsV08wamtR?=
 =?utf-8?B?dnBHMFNOTzYrN21BVms4KzBKZ0VNQUh6K3Y3cVVHa1RFV0hXN3NTRVBYTC83?=
 =?utf-8?B?QzB5UnZRRlpITy9VRmlBbDJ0TU15amxrc29tdjZyWGxOU0xjTGJSV2NJSUQy?=
 =?utf-8?B?YWxZZmZJanpDM3puVDRrTmJhanBwckY5djdRbGdCaVZUSlFhMW5TdXpTMTlk?=
 =?utf-8?Q?ToqHhX1aHsncyiU/q6TbQ0OYFbOnRCsF8sbQ1O8?=
x-ms-exchange-transport-forked: True
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: base64
MIME-Version: 1.0
X-OriginatorOrg: oracle.com
X-MS-Exchange-CrossTenant-AuthAs: Internal
X-MS-Exchange-CrossTenant-AuthSource: SJ0PR10MB5488.namprd10.prod.outlook.com
X-MS-Exchange-CrossTenant-Network-Message-Id: c3fc353e-28dd-4d42-3b1e-08d982cc886c
X-MS-Exchange-CrossTenant-originalarrivaltime: 28 Sep 2021 22:08:42.2493 (UTC)
X-MS-Exchange-CrossTenant-fromentityheader: Hosted
X-MS-Exchange-CrossTenant-id: 4e2c6054-71cb-48f1-bd6c-3a9705aca71b
X-MS-Exchange-CrossTenant-mailboxtype: HOSTED
X-MS-Exchange-CrossTenant-userprincipalname: GtkM36O60FULF6DVAC0NH0YyC1u0isNOs9oiCZtrWkDb6Un7sRm3DwhUhhXEUO55r1N3ZtKpy7Qwinci9NyrYg==
X-MS-Exchange-Transport-CrossTenantHeadersStamped: SJ0PR10MB4656
X-Proofpoint-Virus-Version: vendor=nai engine=6300 definitions=10121
 signatures=668683
X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 adultscore=0
 mlxscore=0 mlxlogscore=941
 phishscore=0 bulkscore=0 suspectscore=0 malwarescore=0 spamscore=0
 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2109230001
 definitions=main-2109280129
X-Proofpoint-GUID: pUJbTxu0ivdeA9QbYPQwNmLm19iSitWu
X-Proofpoint-ORIG-GUID: pUJbTxu0ivdeA9QbYPQwNmLm19iSitWu
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 50067
Cc: "50067 <at> debbugs.gnu.org" <50067 <at> debbugs.gnu.org>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

PiBGb3IgZXhhbXBsZSwgaG93IHRvIGV4cGxhaW4gdG8gdGhlIHVzZXJzIHdoeSBhIGtleWJpbmRp
bmcNCj4gaXMgZGlzcGxheWVkIGZvciAiVW5kbyIsIGJ1dCBub3QgZm9yICJSZWRvIi4NCg0KV2hl
biAmIHdoeSBkb2VzIHRoYXQgbmVlZCB0byBiZSBleHBsYWluZWQ/DQpJcyB0aGVyZSBhIG1pc3Np
bmcgYmluZGluZywgcGVyaGFwcz8NCg0KPiBBbm90aGVyIHF1ZXN0aW9uIGlzIHdoeSBjdXJyZW50
bHkgYEMteCB1JyBpcyBkaXNwbGF5ZWQNCj4gaW5zdGVhZCBvZiB0aGUgc2hvcnRlciBgQy0vJyBm
b3IgIlVuZG8iLg0KDQpUaGF0J3MgYW4gb3J0aG9nb25hbCBwcm9ibGVtLCB3aGljaCBpcyBub3QN
CnNwZWNpZmljIHRvIGNvbnRleHQgbWVudXMsIHJpZ2h0PyAgVGhhdCdzDQphIGdlbmVyYWwsIGxv
bmdzdGFuZGluZyBwcm9ibGVtLCBJSVVDLg0KDQo+IFNvIG1heWJlIHNpbXBsZXIganVzdCB0byBk
aXNhYmxlIGtleXMgb25seSBmb3IgIlVuZG8iDQo+IHdpdGgg4oCYOmtleXMgIiLigJkuICBPciB0
aGUgb3RoZXIgd2F5IGFyb3VuZDogdG8gbWFudWFsbHkNCj4gYWRkIHNvbWUgc3VnZ2VzdGVkIGtl
eWJpbmRpbmcgdG8gIlJlZG8iLg0KDQpJcyB0aGVyZSBhIHJlYXNvbiB3aHkgb25lIGhhcyBhbmQg
dGhlIG90aGVyDQpkb2Vzbid0IGhhdmUgYSBiaW5kaW5nPyAgRG9lcyBpdCBtYXR0ZXI/DQoNCkhv
dyBpcyB0aGlzIHJlbGF0ZWQgdG8gdGhlIGdlbmVyYWwgcXVlc3Rpb24NCm9mIHdoZXRoZXIgX2Nv
bnRleHQgbWVudV8gaXRlbXMgc2hvdWxkIGJlDQphYmxlIHRvIGhhdmUga2V5cyBsaXN0ZWQ/ICBE
b2Vzbid0IGFsbCB0aGF0DQp5b3Ugd3JvdGUgYXBwbHkgdG8gbWVudXMgZ2VuZXJhbGx5Pw0K




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#50067; Package emacs. Full text available.

Message received at 50067 <at> debbugs.gnu.org:


Received: (at 50067) by debbugs.gnu.org; 28 Sep 2021 19:31:59 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Sep 28 15:31:59 2021
Received: from localhost ([127.0.0.1]:47065 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1mVIpa-0006HG-W3
	for submit <at> debbugs.gnu.org; Tue, 28 Sep 2021 15:31:59 -0400
Received: from eggs.gnu.org ([209.51.188.92]:40276)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1mVIpZ-0006H3-Nu
 for 50067 <at> debbugs.gnu.org; Tue, 28 Sep 2021 15:31:58 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e]:56650)
 by eggs.gnu.org with esmtp (Exim 4.90_1)
 (envelope-from <eliz@HIDDEN>)
 id 1mVIpU-0001mV-4o; Tue, 28 Sep 2021 15:31:52 -0400
Received: from 84.94.185.95.cable.012.net.il ([84.94.185.95]:4473
 helo=home-c4e4a596f7)
 by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <eliz@HIDDEN>)
 id 1mVIpR-0003TE-P0; Tue, 28 Sep 2021 15:31:52 -0400
Date: Tue, 28 Sep 2021 22:31:40 +0300
Message-Id: <83wnn0ijj7.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Juri Linkov <juri@HIDDEN>
In-Reply-To: <87zgrwmtjv.fsf@HIDDEN> (message from Juri Linkov on
 Tue, 28 Sep 2021 21:54:40 +0300)
Subject: Re: bug#50067: Context menus
References: <87pmufb3u0.fsf@HIDDEN> <877df211vs.fsf@HIDDEN>
 <83k0j1lv2n.fsf@HIDDEN> <87zgrwmtjv.fsf@HIDDEN>
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 50067
Cc: 50067 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> From: Juri Linkov <juri@HIDDEN>
> Cc: 50067 <at> debbugs.gnu.org
> Date: Tue, 28 Sep 2021 21:54:40 +0300
> 
> >> Other programs don't show the keys in context menus.
> >> The Human Interface Guidelines say:
> >>
> >>   Show keyboard shortcuts in menu bar menus, not contextual menus.
> >>   Contextual menus are already shortcuts to task-specific commands;
> >>   it's redundant to display keyboard shortcuts too.
> >>
> >> This patch hides all keys from the context menus:
> >
> > Unconditionally? why??  Emacs always shows the keyboard bindings in
> > its menus, so why should we care what other apps do?  And why force
> > this on everyone?
> 
> The patch disables the keys conditionally by adding a new
> text property to the menu title.

I meant user's ability to request the display of key bindings in the
menu.  I hope you don't expect users to change text properties on menu
titles as the means to have that control.  There should be an option,
and frankly I don't understand why these menus should behave
differently from any other menu in Emacs that shows commands.





Information forwarded to bug-gnu-emacs@HIDDEN:
bug#50067; Package emacs. Full text available.

Message received at 50067 <at> debbugs.gnu.org:


Received: (at 50067) by debbugs.gnu.org; 28 Sep 2021 19:04:47 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Sep 28 15:04:47 2021
Received: from localhost ([127.0.0.1]:46999 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1mVIPH-0005YD-9f
	for submit <at> debbugs.gnu.org; Tue, 28 Sep 2021 15:04:47 -0400
Received: from relay11.mail.gandi.net ([217.70.178.231]:34239)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <juri@HIDDEN>) id 1mVIP3-0005XJ-Qz
 for 50067 <at> debbugs.gnu.org; Tue, 28 Sep 2021 15:04:34 -0400
Received: (Authenticated sender: juri@HIDDEN)
 by relay11.mail.gandi.net (Postfix) with ESMTPSA id 99733100002;
 Tue, 28 Sep 2021 19:04:26 +0000 (UTC)
From: Juri Linkov <juri@HIDDEN>
To: Lars Ingebrigtsen <larsi@HIDDEN>
Subject: Re: bug#50067: Context menus
Organization: LINKOV.NET
References: <87pmufb3u0.fsf@HIDDEN> <877df211vs.fsf@HIDDEN>
 <87zgryggqw.fsf@HIDDEN>
Date: Tue, 28 Sep 2021 21:49:59 +0300
In-Reply-To: <87zgryggqw.fsf@HIDDEN> (Lars Ingebrigtsen's message of "Mon,
 27 Sep 2021 17:50:15 +0200")
Message-ID: <87r1d8lelk.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (x86_64-pc-linux-gnu)
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 50067
Cc: 50067 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

>> Other programs don't show the keys in context menus.
>> The Human Interface Guidelines say:
>>
>>   Show keyboard shortcuts in menu bar menus, not contextual menus.
>>   Contextual menus are already shortcuts to task-specific commands;
>>   it's redundant to display keyboard shortcuts too.
>
> I'm not sure I agree with those guidelines -- displaying the key
> bindings increases the discoverability of those key bindings.

For example, how to explain to the users why a keybinding
is displayed for "Undo", but not for "Redo".

Another question is why currently `C-x u' is displayed
instead of the shorter `C-/' for "Undo".

So maybe simpler just to disable keys only for "Undo"
with ‘:keys ""’.  Or the other way around: to manually
add some suggested keybinding to "Redo".




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#50067; Package emacs. Full text available.

Message received at 50067 <at> debbugs.gnu.org:


Received: (at 50067) by debbugs.gnu.org; 28 Sep 2021 19:04:34 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Sep 28 15:04:34 2021
Received: from localhost ([127.0.0.1]:46996 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1mVIP3-0005Xe-VC
	for submit <at> debbugs.gnu.org; Tue, 28 Sep 2021 15:04:34 -0400
Received: from relay12.mail.gandi.net ([217.70.178.232]:60173)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <juri@HIDDEN>) id 1mVIP0-0005XA-BC
 for 50067 <at> debbugs.gnu.org; Tue, 28 Sep 2021 15:04:30 -0400
Received: (Authenticated sender: juri@HIDDEN)
 by relay12.mail.gandi.net (Postfix) with ESMTPSA id B1C3B20000C;
 Tue, 28 Sep 2021 19:04:23 +0000 (UTC)
From: Juri Linkov <juri@HIDDEN>
To: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#50067: Context menus
Organization: LINKOV.NET
References: <87pmufb3u0.fsf@HIDDEN> <877df211vs.fsf@HIDDEN>
 <83k0j1lv2n.fsf@HIDDEN>
Date: Tue, 28 Sep 2021 21:54:40 +0300
In-Reply-To: <83k0j1lv2n.fsf@HIDDEN> (Eli Zaretskii's message of "Mon, 27 Sep
 2021 21:41:52 +0300")
Message-ID: <87zgrwmtjv.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (x86_64-pc-linux-gnu)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 50067
Cc: 50067 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

>> Other programs don't show the keys in context menus.
>> The Human Interface Guidelines say:
>>
>>   Show keyboard shortcuts in menu bar menus, not contextual menus.
>>   Contextual menus are already shortcuts to task-specific commands;
>>   it's redundant to display keyboard shortcuts too.
>>
>> This patch hides all keys from the context menus:
>
> Unconditionally? why??  Emacs always shows the keyboard bindings in
> its menus, so why should we care what other apps do?  And why force
> this on everyone?

The patch disables the keys conditionally by adding a new
text property to the menu title.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#50067; Package emacs. Full text available.

Message received at 50067 <at> debbugs.gnu.org:


Received: (at 50067) by debbugs.gnu.org; 27 Sep 2021 18:41:54 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Sep 27 14:41:54 2021
Received: from localhost ([127.0.0.1]:42836 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1mUvZa-0000ue-Hm
	for submit <at> debbugs.gnu.org; Mon, 27 Sep 2021 14:41:54 -0400
Received: from eggs.gnu.org ([209.51.188.92]:41912)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1mUvZY-0000uD-Hk
 for 50067 <at> debbugs.gnu.org; Mon, 27 Sep 2021 14:41:53 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e]:38612)
 by eggs.gnu.org with esmtp (Exim 4.90_1)
 (envelope-from <eliz@HIDDEN>)
 id 1mUvZT-0001eX-AV; Mon, 27 Sep 2021 14:41:47 -0400
Received: from 84.94.185.95.cable.012.net.il ([84.94.185.95]:4193
 helo=home-c4e4a596f7)
 by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <eliz@HIDDEN>)
 id 1mUvZS-0007qg-MT; Mon, 27 Sep 2021 14:41:47 -0400
Date: Mon, 27 Sep 2021 21:41:52 +0300
Message-Id: <83k0j1lv2n.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Juri Linkov <juri@HIDDEN>
In-Reply-To: <877df211vs.fsf@HIDDEN> (message from Juri Linkov on
 Mon, 27 Sep 2021 18:30:23 +0300)
Subject: Re: bug#50067: Context menus
References: <87pmufb3u0.fsf@HIDDEN> <877df211vs.fsf@HIDDEN>
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 50067
Cc: 50067 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> From: Juri Linkov <juri@HIDDEN>
> Date: Mon, 27 Sep 2021 18:30:23 +0300
> 
> Other programs don't show the keys in context menus.
> The Human Interface Guidelines say:
> 
>   Show keyboard shortcuts in menu bar menus, not contextual menus.
>   Contextual menus are already shortcuts to task-specific commands;
>   it's redundant to display keyboard shortcuts too.
> 
> This patch hides all keys from the context menus:

Unconditionally? why??  Emacs always shows the keyboard bindings in
its menus, so why should we care what other apps do?  And why force
this on everyone?




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#50067; Package emacs. Full text available.

Message received at 50067 <at> debbugs.gnu.org:


Received: (at 50067) by debbugs.gnu.org; 27 Sep 2021 16:17:19 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Sep 27 12:17:19 2021
Received: from localhost ([127.0.0.1]:42632 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1mUtJe-0005AD-Pa
	for submit <at> debbugs.gnu.org; Mon, 27 Sep 2021 12:17:19 -0400
Received: from mx0b-00069f02.pphosted.com ([205.220.177.32]:35542)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <drew.adams@HIDDEN>) id 1mUtJc-0005A2-ES
 for 50067 <at> debbugs.gnu.org; Mon, 27 Sep 2021 12:17:17 -0400
Received: from pps.filterd (m0246630.ppops.net [127.0.0.1])
 by mx0b-00069f02.pphosted.com (8.16.1.2/8.16.1.2) with SMTP id 18RFvHbv020780; 
 Mon, 27 Sep 2021 16:17:15 GMT
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com;
 h=from : to : cc :
 subject : date : message-id : references : in-reply-to : content-type :
 content-transfer-encoding : mime-version; s=corp-2021-07-09;
 bh=rMsMk4l+vS2vtimDklPt/E05WUJt2UIXmPmT9JK9ElI=;
 b=o7jshDkGA3aRIsyTdiu6w0pYFFOQP1vrAHirzuj2onn3cG1YLc3mn81E91Q6ljbtsJmK
 9gPpCx8Y1wdYW4kfBUEe0ORNDwpPo7njfDIIKqx4Y/D8gcVrEwDVwbBR/dAgA1J5m4OQ
 3LczBHBzC7v4iJgEey5jan0M4DoAuOUIeQhVe91C0AiGyi90lrvIUt6ZyMXp8nx7fKtQ
 +Ge4qDXVQL9KfKnYVPHw37RWxAJUw88qyOSX2WrqcqJjdXMA//Tr+cKNH5b4nWuXlzuL
 UzIo9f7wTi05g7fsKMKUudI3dxBDvodMLYwID8i34OksvC+y7Ep5w02dhnOWafY8UdS9 jw== 
Received: from aserp3020.oracle.com (aserp3020.oracle.com [141.146.126.70])
 by mx0b-00069f02.pphosted.com with ESMTP id 3bbeu11mtr-1
 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK);
 Mon, 27 Sep 2021 16:17:15 +0000
Received: from pps.filterd (aserp3020.oracle.com [127.0.0.1])
 by aserp3020.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 18RGB8XE019858;
 Mon, 27 Sep 2021 16:17:14 GMT
Received: from nam10-mw2-obe.outbound.protection.outlook.com
 (mail-mw2nam10lp2108.outbound.protection.outlook.com [104.47.55.108])
 by aserp3020.oracle.com with ESMTP id 3b9x50n3nj-1
 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK);
 Mon, 27 Sep 2021 16:17:14 +0000
ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none;
 b=a4a7dwh6jr0s3RLZ71PK0JUPx6ovesg4B64UGoFdl1VGjZ+w4wzRRy3z/INqVjXKM8aRdVnYgyJ+m9LtBwD5bc3XQVphBytaAF2gbk5Y8UN/zirTzDe+I1mjcRHbAsw0y1CN70EiCDpWuQfA+kk931E2WMpBTFtX4PtOO2F6HvpQqc/cO5yWayCdzYzJmfUdVNE8D+socVhy64+KMACIj3s8coIZu8/299b+774/EE1g7X9DPHDEeebwplvsUn/lflPiqGaRFrj5r/ZFeZzK99Y/zO+8pni/mEm8VGRPHJ9k+wRDX/2o6eS354ZmSupiSEEJpfZ09SwAi+L2VwS1sw==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; 
 s=arcselector9901;
 h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; 
 bh=rMsMk4l+vS2vtimDklPt/E05WUJt2UIXmPmT9JK9ElI=;
 b=aR1BW76XbL6jsgQqf7dUHy5WHVOCHBKJtH6aC68sutYlYcpf1UrQJb9ygsqH4MFKaPmOcVSgLfoatfxI+pvdaviOK2P18Rim6Wk2MfDJfApHnXDEG45FjcW6/n1/YcH8v8dxb/zM7tEUSK8UYZkPLn2zdg75WD1KgxAk2PJwecRjpS7dV/x836rw7JMY19WiO65VDElo6f/hyKxQpWQuIQl0Ku2wGz205zjbhOXtaNY9AK4qP5WNyUv2rGE8OI262nJBR4pnXta8DHzvqT5GdOTZ7s5ntWwOZ/0XOHPe7cQlYHVWcZAsdeWlMOL3GKDb4Z+j3t0FbX4PGacsx5Re6A==
ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass
 smtp.mailfrom=oracle.com; dmarc=pass action=none header.from=oracle.com;
 dkim=pass header.d=oracle.com; arc=none
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=oracle.onmicrosoft.com; s=selector2-oracle-onmicrosoft-com;
 h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck;
 bh=rMsMk4l+vS2vtimDklPt/E05WUJt2UIXmPmT9JK9ElI=;
 b=OOo4gLxJlY3V3oJ9OgOGzTt4dSIT76o38tFl8n03XE98inF+eF/wlD5e6xkCHpXOtXe9yONzj+DVGSz9HepdXToBm2Bl1aooPNVgZm29mPisWDEsOok3yQaNuknAWNDF0fTo9HU281lnq3CyUvPsubP+scPciGhBqHGmBlwnZ8w=
Received: from SJ0PR10MB5488.namprd10.prod.outlook.com (2603:10b6:a03:37e::19)
 by SJ0PR10MB5661.namprd10.prod.outlook.com (2603:10b6:a03:3da::14)
 with Microsoft SMTP Server (version=TLS1_2,
 cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4544.13; Mon, 27 Sep
 2021 16:17:12 +0000
Received: from SJ0PR10MB5488.namprd10.prod.outlook.com
 ([fe80::c0bc:7c3a:292f:8a82]) by SJ0PR10MB5488.namprd10.prod.outlook.com
 ([fe80::c0bc:7c3a:292f:8a82%9]) with mapi id 15.20.4544.021; Mon, 27 Sep 2021
 16:17:11 +0000
From: Drew Adams <drew.adams@HIDDEN>
To: Lars Ingebrigtsen <larsi@HIDDEN>, Juri Linkov <juri@HIDDEN>
Subject: RE: [External] : bug#50067: Context menus
Thread-Topic: [External] : bug#50067: Context menus
Thread-Index: AQHXs7fRkwD2Q4rlzUy0oAzYYkS+Pau4DgFw
Date: Mon, 27 Sep 2021 16:17:11 +0000
Message-ID: <SJ0PR10MB548886ED4346BF949EAE2FA2F3A79@HIDDEN>
References: <87pmufb3u0.fsf@HIDDEN> <877df211vs.fsf@HIDDEN>
 <87zgryggqw.fsf@HIDDEN>
In-Reply-To: <87zgryggqw.fsf@HIDDEN>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach: 
X-MS-TNEF-Correlator: 
authentication-results: gnus.org; dkim=none (message not signed)
 header.d=none;gnus.org; dmarc=none action=none header.from=oracle.com;
x-ms-publictraffictype: Email
x-ms-office365-filtering-correlation-id: 3aa395c9-143e-4378-4bad-08d981d24319
x-ms-traffictypediagnostic: SJ0PR10MB5661:
x-microsoft-antispam-prvs: <SJ0PR10MB5661603137BB446681C01EB6F3A79@HIDDEN>
x-ms-oob-tlc-oobclassifiers: OLM:8882;
x-ms-exchange-senderadcheck: 1
x-ms-exchange-antispam-relay: 0
x-microsoft-antispam: BCL:0;
x-microsoft-antispam-message-info: Worc/lRbi+q/yhWUnPl6oCR/vvsoeWUqomzkG/pkJktCRuUedIRo5CThBXnnUIETinU3Z0wbtFayvp7w5O/c/yQJP/1kD2lAIipgd0dx3TiR6fwkqPOy863WFOixsKGpf8C4YHL2vKTYeZeNtstGHWmf8gMe+9mEaAWBvRVRtUgs2TdFLfgxYxElXvRH9XX7q7B2A74urdZVLM/n+ItXQjTSZNDTwXxC8RS8XcJ0pD3mBHOf2r71VYK/glRFw0EYQJ/1NY4gGYlCyftiN6CN8qVP0m3QI4kXFdzZ27Xn2EP9XL+6fZ4KI2pXnfOVq80TGE3Oi+RcxMx7E0gGiLHJ9VmQ7iGH0gLVpNCn6pzDKsJO5+bVEHJ3HJ56KXQh5eZFDLihr7EQsKdigeJ7zAdrWNmC5fkRQNZ5XfI7W+af03DHgF8xLSAgTwrkrqt/1xdkIdYURCxdeUazMPA1tAM7KzFV3NLKVbver+Y5TgKP+wV2P5fXnw959hQSEJfO+Jpw+qqMPAoBXvoIi6BLWCl61BLJO2zHQzT3PeGk461tkC5kNT+qWQAo+cKDO9q8ci/sVBE0Z4p8YrRQ13Xz1eh009+uoHVpRmpRyw9hKQc4fkQZXy4hPx6eV5LQ1IhDczNdh2IOgQsnH05+7Pgqpd6bTKn0pYVSkvhJdQfLp9Ay9CnJ14/2K/DjyHkSEQkIY/nZR41QFdJtMstvpU4DQvK+7w==
x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:;
 IPV:NLI; SFV:NSPM; H:SJ0PR10MB5488.namprd10.prod.outlook.com; PTR:; CAT:NONE;
 SFS:(366004)(86362001)(9686003)(66946007)(76116006)(52536014)(5660300002)(26005)(316002)(186003)(71200400001)(508600001)(55016002)(8936002)(44832011)(8676002)(38100700002)(110136005)(7696005)(66556008)(6506007)(4326008)(66476007)(64756008)(66446008)(4744005)(122000001)(38070700005)(33656002)(2906002);
 DIR:OUT; SFP:1101; 
x-ms-exchange-antispam-messagedata-chunkcount: 1
x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?G3G3pU3P59j0NJnN/Ef6OqlAU+mGAfVEZPqhseGnMiNrE4dToxPykzkCWcOe?=
 =?us-ascii?Q?RdAjfnxkA2GEWgM1MSmq3IKLVHF3Xt3Li7oulZhqWeahCQCTyOsx+OmMX05J?=
 =?us-ascii?Q?LYohSTIxKR5osdGvyL6/QK5UUfUC1VxaDrfor6VQuyHxv+URl8lkt+OzCLOK?=
 =?us-ascii?Q?PfUeZpwp+gFM5NJeVFHBteiyYu/cFUL4/TqeObFW4DKkgSyRQLmoiFDtwFZU?=
 =?us-ascii?Q?RfPmp/Pue7YawU48N7bOfmoZQoEmjhOamNbcLhPf5ZSdFhhF40k9yjlXc61L?=
 =?us-ascii?Q?0VJZg2nq0lxioxonIF28akzKDkEf4FskrZ7+a7jLB1x6bt/ObGbp2F9MpC4H?=
 =?us-ascii?Q?0GsujTeQ3MhjLP89q6O7EFaqu5LCrCYIDNuMGc+BEhn6dk1ccs45YDEvVJD/?=
 =?us-ascii?Q?40NyTsA2kxUSYQG1xOnZhkUeRoNb65nyBq5OpE03VkOHv4h9t50pxd6hCLre?=
 =?us-ascii?Q?jUBCSwQFH+AeMuXjOQBTMYXXPWFyZhr/TGqH5xDDEjm3DlK46bJFAtTZXc/O?=
 =?us-ascii?Q?ikdsHK7lP2/A++AanCIIS+dCU/huVdnyCBRZbur6cg5LuTQfLtMgjuViSQKr?=
 =?us-ascii?Q?EHRKt00NzzPHVD7/o2yiadnsFO3i09N/2NMPfK3U2xiWE2Y4uhjO5dI6fQl0?=
 =?us-ascii?Q?UqXTQ8teKcG78vQj2+MoE3u3dQZQuSSSVOLCwuaSbDUgdu1jG4vO8wX3fqyj?=
 =?us-ascii?Q?hZ522RUnpnMcmypntuQzY7HeZlpIPJMwQHCswNF0gZnJ29ugBWEyzmh2c8Xj?=
 =?us-ascii?Q?GOUwFkYXJXVK7gWj1FqFjRCYQDNq5baRFQFSDcnXaBnQlbmuMTNBcN7XH4vV?=
 =?us-ascii?Q?TxN3yfatOxj6aE8QZh0yQO4qM5YajLQP0yd2JBa+T9LASxQagdYWeJtyoDtv?=
 =?us-ascii?Q?wCUwzrbs2oqYDWMKLSa5hjR5wwXpnMRKHNoKSO8YgzXZuPNVOnO/il48nhyW?=
 =?us-ascii?Q?OpIqkgJH5sp/q0mU0h/HhxSsPj3lz9v5KVoC1jo1q2y5cbF2hY6zmvO5C7Y0?=
 =?us-ascii?Q?9Psc74o51iEMRC/0578Cmsp4Ycc5W5GkPExubTO006pJTr8srDYeodLAXVVB?=
 =?us-ascii?Q?1bnw0ElSLfR43evOEanm5R0x9t2KEu4TDrenFC4G4nlVVElT7JdKjb16uSBt?=
 =?us-ascii?Q?HOuNM6eIGdk47yfwNZ7c1yISUbHBUgjgj3933ifkEqk9DcRTSHRNkk2Idy24?=
 =?us-ascii?Q?EZS0YcnnO1kpi5WptN39fo191lm5wXo/15hYj8R93KlOal+nwCV5z2fJneSM?=
 =?us-ascii?Q?9MPpdCsTcHubvwbwxFKD85BByitBIvYkrnY6srd8IseXEAftxWzk3kRmSU5x?=
 =?us-ascii?Q?9prJSfl+41FCoImkhOVGKdqr?=
x-ms-exchange-transport-forked: True
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
MIME-Version: 1.0
X-OriginatorOrg: oracle.com
X-MS-Exchange-CrossTenant-AuthAs: Internal
X-MS-Exchange-CrossTenant-AuthSource: SJ0PR10MB5488.namprd10.prod.outlook.com
X-MS-Exchange-CrossTenant-Network-Message-Id: 3aa395c9-143e-4378-4bad-08d981d24319
X-MS-Exchange-CrossTenant-originalarrivaltime: 27 Sep 2021 16:17:11.7884 (UTC)
X-MS-Exchange-CrossTenant-fromentityheader: Hosted
X-MS-Exchange-CrossTenant-id: 4e2c6054-71cb-48f1-bd6c-3a9705aca71b
X-MS-Exchange-CrossTenant-mailboxtype: HOSTED
X-MS-Exchange-CrossTenant-userprincipalname: Q7lwpTfuZhfD0Vc1zQlCnXrv6tWpuuaYxyRrF4XWYUnvTDHIjnNMf9qlQjWrN6ZM+cp9MrwAiDLSUTK0s7NF1g==
X-MS-Exchange-Transport-CrossTenantHeadersStamped: SJ0PR10MB5661
X-Proofpoint-Virus-Version: vendor=nai engine=6300 definitions=10120
 signatures=668682
X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0
 phishscore=0 adultscore=0
 mlxscore=0 malwarescore=0 suspectscore=0 bulkscore=0 mlxlogscore=963
 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2109230001
 definitions=main-2109270111
X-Proofpoint-GUID: kh8dHgyhVrZJvk2k0AWEpXMccUVKNDXu
X-Proofpoint-ORIG-GUID: kh8dHgyhVrZJvk2k0AWEpXMccUVKNDXu
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 50067
Cc: "50067 <at> debbugs.gnu.org" <50067 <at> debbugs.gnu.org>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

> > Other programs don't show the keys in context menus.
> > The Human Interface Guidelines say:
> >
> >   Show keyboard shortcuts in menu bar menus, not contextual menus.
> >   Contextual menus are already shortcuts to task-specific commands;
> >   it's redundant to display keyboard shortcuts too.
>=20
> I'm not sure I agree with those guidelines -- displaying the key
> bindings increases the discoverability of those key bindings.  (Not
> using the mouse is more productive in the long term for most people.)

+1.

Provided, that is, that the (context) menu-item
is bound to exactly the same command as the key.
But if the key does something different from what
the item does (e.g. dependent on the context),
then omitting the key name can make sense.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#50067; Package emacs. Full text available.

Message received at 50067 <at> debbugs.gnu.org:


Received: (at 50067) by debbugs.gnu.org; 27 Sep 2021 15:50:27 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Sep 27 11:50:27 2021
Received: from localhost ([127.0.0.1]:42593 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1mUstf-0004Gg-8F
	for submit <at> debbugs.gnu.org; Mon, 27 Sep 2021 11:50:27 -0400
Received: from quimby.gnus.org ([95.216.78.240]:35240)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <larsi@HIDDEN>) id 1mUstd-0004GN-RE
 for 50067 <at> debbugs.gnu.org; Mon, 27 Sep 2021 11:50:26 -0400
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org;
 s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date:
 References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding:
 Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender:
 Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:
 List-Subscribe:List-Post:List-Owner:List-Archive;
 bh=2IlqdrUPZKBzRg8+hwDZ78dk+QQ41T+qGduZ25W7kOc=; b=Bxx3I27k1ntNg4F0CYC/idW9kd
 x9ojwRJyyC+B9IVkzXmSgIASpfqjCkMh9Z05N+7zpb/o3RQQz9883X2LrVgRZSLl3P1F8PMXifIcU
 tjUwBB1oBfui88VFkhC5x4FqO07mEABCgZLkOoyr5PCzIAonNVn7cYhosmxrc4WjFpQo=;
Received: from [84.212.220.105] (helo=elva)
 by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.92) (envelope-from <larsi@HIDDEN>)
 id 1mUstU-0008SR-P1; Mon, 27 Sep 2021 17:50:19 +0200
From: Lars Ingebrigtsen <larsi@HIDDEN>
To: Juri Linkov <juri@HIDDEN>
Subject: Re: bug#50067: Context menus
References: <87pmufb3u0.fsf@HIDDEN> <877df211vs.fsf@HIDDEN>
Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwAgMAAAAqbBEUAAAABGdBTUEAALGPC/xhBQAAACBj
 SFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAADFBMVEUpIyRXQkK2jXT/
 //8moIRuAAAAAWJLR0QDEQxM8gAAAAd0SU1FB+UJGw8xCMOPWsMAAAFjSURBVCjPTZK9bsIwEMfv
 IjsSmRgCKp7pkDxFItXMobIReGJIJeqnoEN3OlAVJiolFfgpe3bChxffz3f3vw8ZgE5cwf2gh6Kz
 OTyCv7EH/4iohx3QxfXqRFYaYKSUJph6wBXAgGCtfcrOiwLUuuqE/EM9ZGRRpcSDl8A9sI0XmKRU
 SBwWay+dKQritvV56Uj5QK0CxBW79Z/y4g6UIR7But01DKB17g7auO1tGCNX22AAA1y4w6lbAqcp
 rWuuO+DSmDP2EgwH8c+tB2nK9rZQNPoOIPimz3+TcsLyUw/maJe26YKUMPbs6s5TRbPjMn+/wsde
 ib7vSbTLVPJd+F2jwF3+lMw+3Z6IQDSxa7Ulz1he4gAUF5UzF53HF+tIEBlqPCEBCUasKpkCGwDZ
 fF9MILM6ePBLjeCZFOivMJi/8EIHSGT7exBFG0DIv9Zl0DjfQa5eG5fi2ToaPa9xOuMl1Wn/AQ24
 Y7feUWh8AAAAJXRFWHRkYXRlOmNyZWF0ZQAyMDIxLTA5LTI3VDE1OjQ5OjA3KzAwOjAw5XnD/gAA
 ACV0RVh0ZGF0ZTptb2RpZnkAMjAyMS0wOS0yN1QxNTo0OTowNyswMDowMJQke0IAAAAASUVORK5C
 YII=
X-Now-Playing: Neil Young's _Archives Vol. II (1): Everybody's Alone (1972 -
 1976)_: "L.A. (Story)"
Date: Mon, 27 Sep 2021 17:50:15 +0200
In-Reply-To: <877df211vs.fsf@HIDDEN> (Juri Linkov's message of "Mon, 
 27 Sep 2021 18:30:23 +0300")
Message-ID: <87zgryggqw.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org",
 has NOT identified this incoming email as spam.  The original
 message has been attached to this so you can view it or label
 similar future email.  If you have any questions, see
 @@CONTACT_ADDRESS@@ for details.
 Content preview: Juri Linkov <juri@HIDDEN> writes: > Other programs don't
 show the keys in context menus. > The Human Interface Guidelines say: > >
 Show keyboard shortcuts in menu bar menus, not contextual menus. > Contextual
 menus are already shortcu [...] 
 Content analysis details:   (-2.9 points, 5.0 required)
 pts rule name              description
 ---- ---------------------- --------------------------------------------------
 -1.0 ALL_TRUSTED            Passed through trusted hosts only via SMTP
 -1.9 BAYES_00               BODY: Bayes spam probability is 0 to 1%
 [score: 0.0000]
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 50067
Cc: 50067 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

Juri Linkov <juri@HIDDEN> writes:

> Other programs don't show the keys in context menus.
> The Human Interface Guidelines say:
>
>   Show keyboard shortcuts in menu bar menus, not contextual menus.
>   Contextual menus are already shortcuts to task-specific commands;
>   it's redundant to display keyboard shortcuts too.

I'm not sure I agree with those guidelines -- displaying the key
bindings increases the discoverability of those key bindings.  (Not
using the mouse is more productive in the long term for most people.)

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#50067; Package emacs. Full text available.

Message received at 50067 <at> debbugs.gnu.org:


Received: (at 50067) by debbugs.gnu.org; 27 Sep 2021 15:43:03 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Sep 27 11:43:03 2021
Received: from localhost ([127.0.0.1]:42443 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1mUsmV-0003r4-0k
	for submit <at> debbugs.gnu.org; Mon, 27 Sep 2021 11:43:03 -0400
Received: from relay5-d.mail.gandi.net ([217.70.183.197]:46787)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <juri@HIDDEN>) id 1mUsmS-0003py-KU
 for 50067 <at> debbugs.gnu.org; Mon, 27 Sep 2021 11:43:00 -0400
Received: (Authenticated sender: juri@HIDDEN)
 by relay5-d.mail.gandi.net (Postfix) with ESMTPSA id 95A1E1C000B
 for <50067 <at> debbugs.gnu.org>; Mon, 27 Sep 2021 15:42:54 +0000 (UTC)
From: Juri Linkov <juri@HIDDEN>
To: 50067 <at> debbugs.gnu.org
Subject: Re: bug#50067: Context menus
References: <87pmufb3u0.fsf@HIDDEN>
Date: Mon, 27 Sep 2021 18:33:15 +0300
In-Reply-To: <87pmufb3u0.fsf@HIDDEN> (Juri Linkov's message of "Sun, 
 15 Aug 2021 11:48:55 +0300")
Message-ID: <87mtnyyr5c.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (x86_64-pc-linux-gnu)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 50067
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

After typing 'C-h k', clicking mouse-3 on a function name,
then selecting e.g. "Describe Function", the Help buffer says

  <down-mouse-3> <describe-symbol> at that spot is undefined

This can be fixed by this patch:

diff --git a/lisp/help.el b/lisp/help.el
index 8f77167040..b794751eca 100644
--- a/lisp/help.el
+++ b/lisp/help.el
@@ -695,7 +695,7 @@ help--analyze-key
 	 (mouse-msg (if (or (memq 'click modifiers) (memq 'down modifiers)
 			    (memq 'drag modifiers))
                         " at that spot" ""))
-	 (defn (key-binding key t)))
+	 (defn (save-excursion (mouse-set-point event) (key-binding key t))))
     ;; Handle the case where we faked an entry in "Select and Paste" menu.
     (when (and (eq defn nil)
 	       (stringp (aref key (1- (length key))))
-- 




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#50067; Package emacs. Full text available.

Message received at 50067 <at> debbugs.gnu.org:


Received: (at 50067) by debbugs.gnu.org; 27 Sep 2021 15:43:03 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Sep 27 11:43:03 2021
Received: from localhost ([127.0.0.1]:42441 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1mUsmU-0003qt-Mg
	for submit <at> debbugs.gnu.org; Mon, 27 Sep 2021 11:43:02 -0400
Received: from relay5-d.mail.gandi.net ([217.70.183.197]:34903)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <juri@HIDDEN>) id 1mUsmQ-0003pk-86
 for 50067 <at> debbugs.gnu.org; Mon, 27 Sep 2021 11:42:59 -0400
Received: (Authenticated sender: juri@HIDDEN)
 by relay5-d.mail.gandi.net (Postfix) with ESMTPSA id 7D6511C000F
 for <50067 <at> debbugs.gnu.org>; Mon, 27 Sep 2021 15:42:50 +0000 (UTC)
From: Juri Linkov <juri@HIDDEN>
To: 50067 <at> debbugs.gnu.org
Subject: Re: bug#50067: Context menus
References: <87pmufb3u0.fsf@HIDDEN>
Date: Mon, 27 Sep 2021 18:30:23 +0300
In-Reply-To: <87pmufb3u0.fsf@HIDDEN> (Juri Linkov's message of "Sun, 
 15 Aug 2021 11:48:55 +0300")
Message-ID: <877df211vs.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (x86_64-pc-linux-gnu)
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="=-=-="
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 50067
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

--=-=-=
Content-Type: text/plain

Other programs don't show the keys in context menus.
The Human Interface Guidelines say:

  Show keyboard shortcuts in menu bar menus, not contextual menus.
  Contextual menus are already shortcuts to task-specific commands;
  it's redundant to display keyboard shortcuts too.

This patch hides all keys from the context menus:


--=-=-=
Content-Type: text/x-diff
Content-Disposition: inline; filename=inhibit-menu-keys.patch

diff --git a/lisp/mouse.el b/lisp/mouse.el
index 5f3db46516..2d9b1c8f0b 100644
--- a/lisp/mouse.el
+++ b/lisp/mouse.el
@@ -314,7 +314,9 @@ context-menu-map
 it overrides all functions from `context-menu-functions'.
 At the end, it's possible to modify the final menu by specifying
 the function `context-menu-filter-function'."
-  (let* ((menu (make-sparse-keymap (propertize "Context Menu" 'hide t)))
+  (let* ((menu (make-sparse-keymap (propertize "Context Menu"
+                                               'hide t
+                                               'no-keys t)))
          (click (or click last-input-event))
          (fun (mouse-posn-property (event-start click)
                                    'context-menu-function)))
diff --git a/src/keyboard.c b/src/keyboard.c
index 462b415c1d..8c90292137 100644
--- a/src/keyboard.c
+++ b/src/keyboard.c
@@ -7832,16 +7832,20 @@ parse_menu_item (Lisp_Object item, int inmenubar)
 		filter = item;
 	      else if (EQ (tem, QCkey_sequence))
 		{
-		  tem = XCAR (item);
-		  if (SYMBOLP (tem) || STRINGP (tem) || VECTORP (tem))
-		    /* Be GC protected. Set keyhint to item instead of tem.  */
-		    keyhint = item;
-		}
+		  if (!inhibit_menu_keys)
+		    {
+		      tem = XCAR (item);
+		      if (SYMBOLP (tem) || STRINGP (tem) || VECTORP (tem))
+			/* Be GC protected. Set keyhint to item instead of tem.  */
+			keyhint = item;
+		    }		}
 	      else if (EQ (tem, QCkeys))
 		{
-		  tem = XCAR (item);
-		  if (CONSP (tem) || STRINGP (tem))
-		    ASET (item_properties, ITEM_PROPERTY_KEYEQ, tem);
+		  if (!inhibit_menu_keys){
+		    tem = XCAR (item);
+		    if (CONSP (tem) || STRINGP (tem))
+		      ASET (item_properties, ITEM_PROPERTY_KEYEQ, tem);
+		  }
 		}
 	      else if (EQ (tem, QCbutton) && CONSP (XCAR (item)))
 		{
@@ -7916,6 +7920,7 @@ parse_menu_item (Lisp_Object item, int inmenubar)
   if (inmenubar > 0)
     return 1;
 
+  if (!inhibit_menu_keys)
   { /* This is a command.  See if there is an equivalent key binding.  */
     Lisp_Object keyeq = AREF (item_properties, ITEM_PROPERTY_KEYEQ);
     AUTO_STRING (space_space, "  ");
@@ -12495,6 +12500,11 @@ syms_of_keyboard (void)
                Vwhile_no_input_ignore_events,
                doc: /* Ignored events from while-no-input.  */);
 
+  DEFVAR_BOOL ("inhibit-menu-keys",
+               inhibit_menu_keys,
+               doc: /* If non-nil, inhibit menu keys.  */);
+  inhibit_menu_keys = false;
+
   pdumper_do_now_and_after_load (syms_of_keyboard_for_pdumper);
 }
 
diff --git a/src/menu.c b/src/menu.c
index 1aafa78c3c..e7e7ecca6a 100644
--- a/src/menu.c
+++ b/src/menu.c
@@ -1281,13 +1281,18 @@ x_popup_menu_1 (Lisp_Object position, Lisp_Object menu)
       /* We were given a keymap.  Extract menu info from the keymap.  */
       Lisp_Object prompt;
 
-      /* Extract the detailed info to make one pane.  */
-      keymap_panes (&menu, 1);
-
       /* Search for a string appearing directly as an element of the keymap.
 	 That string is the title of the menu.  */
       prompt = Fkeymap_prompt (keymap);
 
+      if (STRINGP (prompt)
+	  && SCHARS (prompt) > 0
+	  && !NILP (Fget_text_property (make_fixnum (0), Qno_keys, prompt)))
+      specbind (Qinhibit_menu_keys, Qt);
+
+      /* Extract the detailed info to make one pane.  */
+      keymap_panes (&menu, 1);
+
 #if defined (USE_GTK) || defined (HAVE_NS)
       if (STRINGP (prompt)
 	  && SCHARS (prompt) > 0
@@ -1583,6 +1588,8 @@ syms_of_menu (void)
   staticpro (&menu_items);
 
   DEFSYM (Qhide, "hide");
+  DEFSYM (Qno_keys, "no-keys");
+  DEFSYM (Qinhibit_menu_keys, "inhibit-menu-keys");
 
   defsubr (&Sx_popup_menu);
   defsubr (&Sx_popup_dialog);

--=-=-=--




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#50067; Package emacs. Full text available.

Message received at 50067 <at> debbugs.gnu.org:


Received: (at 50067) by debbugs.gnu.org; 5 Sep 2021 19:25:39 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Sep 05 15:25:39 2021
Received: from localhost ([127.0.0.1]:51056 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1mMxlr-0003ig-IH
	for submit <at> debbugs.gnu.org; Sun, 05 Sep 2021 15:25:39 -0400
Received: from mail-wm1-f42.google.com ([209.85.128.42]:43921)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <raaahh@HIDDEN>) id 1mMxlp-0003iP-5x
 for 50067 <at> debbugs.gnu.org; Sun, 05 Sep 2021 15:25:38 -0400
Received: by mail-wm1-f42.google.com with SMTP id
 o39-20020a05600c512700b002e74638b567so3304362wms.2
 for <50067 <at> debbugs.gnu.org>; Sun, 05 Sep 2021 12:25:37 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112;
 h=sender:subject:to:cc:references:from:message-id:date:user-agent
 :mime-version:in-reply-to:content-language:content-transfer-encoding;
 bh=P0Oj5KlFMeJ6puqzOVYBGnYG8zLZxBc3oi736CgXW5M=;
 b=Jx6PwKWKRlV/r5XNmEOc1/OZO+Le6xHBF6q9yOG/YatL6zzpqun5gyPhIDMRRxPEl+
 TPXLknikge26xwEpT36ikS9cMjse9z8yEJI3YKlnJDwr/Detcvv8qZ5mM2zXHa4f1AD1
 mKrcV8+HQalxT9eZGjN3VG+0u69MpkaJFcnDQAq8Jl7eS4w/Nm1EbYOLhGt9NMdr1GoL
 nCV55iw1Qg4F9eIH5yD07+9dilGChoDWuS4UycyJqGhFUbd2nK+8d6AelhtWPKBwnx22
 s4/dtXX6fHs5VfBWu064Q9ZRCXlP1tedPlyT3eQrWuHta/FbSwQWvI9y057p644ZyWTI
 iJkw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:sender:subject:to:cc:references:from:message-id
 :date:user-agent:mime-version:in-reply-to:content-language
 :content-transfer-encoding;
 bh=P0Oj5KlFMeJ6puqzOVYBGnYG8zLZxBc3oi736CgXW5M=;
 b=sJexCTuiubse08QBiSwkPrnUv4z5xUsLvaSzTToVyAQnaEKaDDlud/Ui+jOsbEywN1
 oaxzYw05mj6BJ2DhT2+ndIXcWtDoXDrnyein9DhPvtSe3xdiziREBUo9QeNXQH161iL9
 9RnVvCw9opYM80K+T01LFKXTh8TPQujZr31B/HnaCQLNNUYHzy8e/n2BhW81iNoOdHnm
 5Y4SY6HTzF5PmnDP3QANlf6Evob2wyayREDgAdoh+ga5iWMRoUBgFwehN7olJxbdAhGF
 gu72yy497mRQb92KTB9Zk93CowuFA+gbylhvldhEkzfIyvr5JS/+iXU9lSA7aZw4VCL4
 XSww==
X-Gm-Message-State: AOAM533VXUoVB0YepCpgowJBuOSOGzEEQnpRPDjGYGgqbFzQn3UcRaso
 iEYuCiBxcQyuGml+euEekbhQAJhRQZ4=
X-Google-Smtp-Source: ABdhPJxNh9jMm+gBzlZEta7jxVzbjMHGy8dC49Yg/c3DYCOOiz0iamgqXeNLMdLxfyEOaUe+YwsZ6g==
X-Received: by 2002:a05:600c:a05:: with SMTP id
 z5mr7925476wmp.73.1630869931419; 
 Sun, 05 Sep 2021 12:25:31 -0700 (PDT)
Received: from [192.168.0.6] ([46.251.119.176])
 by smtp.googlemail.com with ESMTPSA id c24sm5740259wrb.57.2021.09.05.12.25.30
 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128);
 Sun, 05 Sep 2021 12:25:31 -0700 (PDT)
Subject: Re: bug#50067: Context menus
To: Juri Linkov <juri@HIDDEN>
References: <83sfz639lh.fsf@HIDDEN> <83czq7youc.fsf@HIDDEN>
 <32ef6b91-107c-d7e5-b103-0ff062bf8ebd@HIDDEN> <83y28twahy.fsf@HIDDEN>
 <7af845e0-1f19-61fc-65e0-b23fac3927aa@HIDDEN> <83v93wx5ny.fsf@HIDDEN>
 <cd1ab4b2-1eb2-1259-98ff-828f0a79bb39@HIDDEN> <83r1ekwfrd.fsf@HIDDEN>
 <871r6ki6aw.fsf@HIDDEN>
 <b4f6c1fb-f322-4a59-55aa-f60932b996c9@HIDDEN> <838s0otl6b.fsf@HIDDEN>
 <0273902a-1f93-c643-da26-ab314d6d2db4@HIDDEN> <8335qvs8re.fsf@HIDDEN>
 <fa0e47a2-fafb-0c3b-b693-be1acca58c34@HIDDEN> <835yvnkuwb.fsf@HIDDEN>
 <87wno26qlo.fsf@HIDDEN>
 <d33f0cd5-7d8d-17af-d59c-6821793d397f@HIDDEN>
 <87fsupr1rv.fsf@HIDDEN>
 <3656c47f-49e2-1a90-ce2f-12b8899742aa@HIDDEN>
 <87czps95tt.fsf@HIDDEN>
 <e8ba3c02-92b1-5956-b7b3-ff6458c55423@HIDDEN>
 <87zgsrzadv.fsf@HIDDEN>
From: Dmitry Gutov <dgutov@HIDDEN>
Message-ID: <3abb6691-495d-cdc8-57da-d78a7d6adfaa@HIDDEN>
Date: Sun, 5 Sep 2021 22:25:29 +0300
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101
 Thunderbird/78.13.0
MIME-Version: 1.0
In-Reply-To: <87zgsrzadv.fsf@HIDDEN>
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Language: en-US
Content-Transfer-Encoding: 7bit
X-Spam-Score: 0.4 (/)
X-Debbugs-Envelope-To: 50067
Cc: alan@HIDDEN, mattiase@HIDDEN, homeros.misasa@HIDDEN,
 tkk@HIDDEN, larsi@HIDDEN, 50067 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.6 (/)

On 05.09.2021 11:37, Juri Linkov wrote:
> Thanks, one problem is that defcustoms have no '(const nil :tag'
> for the default value 'nil'.  I don't know what tag to use,
> maybe "No auto-jump".  There were other problems so that it was
> easier to just push the fix:)

Thanks! I really skipped on testing the Customize behavior.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#50067; Package emacs. Full text available.

Message received at 50067 <at> debbugs.gnu.org:


Received: (at 50067) by debbugs.gnu.org; 5 Sep 2021 08:37:56 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Sep 05 04:37:55 2021
Received: from localhost ([127.0.0.1]:49148 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1mMnf1-0001qH-Nc
	for submit <at> debbugs.gnu.org; Sun, 05 Sep 2021 04:37:55 -0400
Received: from relay6-d.mail.gandi.net ([217.70.183.198]:52003)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <juri@HIDDEN>) id 1mMnf0-0001pv-5C
 for 50067 <at> debbugs.gnu.org; Sun, 05 Sep 2021 04:37:54 -0400
Received: (Authenticated sender: juri@HIDDEN)
 by relay6-d.mail.gandi.net (Postfix) with ESMTPSA id C2997C0004;
 Sun,  5 Sep 2021 08:37:43 +0000 (UTC)
From: Juri Linkov <juri@HIDDEN>
To: Dmitry Gutov <dgutov@HIDDEN>
Subject: Re: bug#50067: Context menus
Organization: LINKOV.NET
References: <83sfz639lh.fsf@HIDDEN> <83czq7youc.fsf@HIDDEN>
 <32ef6b91-107c-d7e5-b103-0ff062bf8ebd@HIDDEN>
 <83y28twahy.fsf@HIDDEN>
 <7af845e0-1f19-61fc-65e0-b23fac3927aa@HIDDEN>
 <83v93wx5ny.fsf@HIDDEN>
 <cd1ab4b2-1eb2-1259-98ff-828f0a79bb39@HIDDEN>
 <83r1ekwfrd.fsf@HIDDEN> <871r6ki6aw.fsf@HIDDEN>
 <b4f6c1fb-f322-4a59-55aa-f60932b996c9@HIDDEN>
 <838s0otl6b.fsf@HIDDEN>
 <0273902a-1f93-c643-da26-ab314d6d2db4@HIDDEN>
 <8335qvs8re.fsf@HIDDEN>
 <fa0e47a2-fafb-0c3b-b693-be1acca58c34@HIDDEN>
 <835yvnkuwb.fsf@HIDDEN> <87wno26qlo.fsf@HIDDEN>
 <d33f0cd5-7d8d-17af-d59c-6821793d397f@HIDDEN>
 <87fsupr1rv.fsf@HIDDEN>
 <3656c47f-49e2-1a90-ce2f-12b8899742aa@HIDDEN>
 <87czps95tt.fsf@HIDDEN>
 <e8ba3c02-92b1-5956-b7b3-ff6458c55423@HIDDEN>
Date: Sun, 05 Sep 2021 11:37:00 +0300
In-Reply-To: <e8ba3c02-92b1-5956-b7b3-ff6458c55423@HIDDEN> (Dmitry Gutov's
 message of "Sun, 5 Sep 2021 03:55:43 +0300")
Message-ID: <87zgsrzadv.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (x86_64-pc-linux-gnu)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: 50067
Cc: alan@HIDDEN, mattiase@HIDDEN, homeros.misasa@HIDDEN,
 tkk@HIDDEN, larsi@HIDDEN, 50067 <at> debbugs.gnu.org,
 Eli Zaretskii <eliz@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

>>>   - xref-auto-jump-to-first-definition
>>>   - xref-auto-jump-to-first-<xref/item/match/result>. Or just
>>>     xref-auto-jump-to-first.
>> grep/compilation already supports the value 'jump' by non-nil
>> 'compilation-auto-jump-to-first-error', and the value 'move' when
>> 'compilation-scroll-output' is customized to 'first-error'.
>> But I think for xref still two separate options are needed
>> xref-auto-jump-to-first-definition for xref-find-definitions, and
>> xref-auto-jump-to-first-xref for other more grep-like xref commands.
>
> It's now in master: two variables, three methods of behavior for each.
>
> Let me know if you see any problems.

Thanks, one problem is that defcustoms have no '(const nil :tag'
for the default value 'nil'.  I don't know what tag to use,
maybe "No auto-jump".  There were other problems so that it was
easier to just push the fix :)




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#50067; Package emacs. Full text available.

Message received at 50067 <at> debbugs.gnu.org:


Received: (at 50067) by debbugs.gnu.org; 5 Sep 2021 00:55:53 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Sep 04 20:55:53 2021
Received: from localhost ([127.0.0.1]:48879 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1mMgRs-0000jy-Rd
	for submit <at> debbugs.gnu.org; Sat, 04 Sep 2021 20:55:53 -0400
Received: from mail-wr1-f49.google.com ([209.85.221.49]:39707)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <raaahh@HIDDEN>) id 1mMgRr-0000jm-SK
 for 50067 <at> debbugs.gnu.org; Sat, 04 Sep 2021 20:55:52 -0400
Received: by mail-wr1-f49.google.com with SMTP id z4so4148356wrr.6
 for <50067 <at> debbugs.gnu.org>; Sat, 04 Sep 2021 17:55:51 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112;
 h=sender:subject:to:cc:references:from:message-id:date:user-agent
 :mime-version:in-reply-to:content-language:content-transfer-encoding;
 bh=ka/KD+FOj/MkPKzvCeXVh8qaULqLcv89mM7nXGPh2yM=;
 b=CTE+xg93t6lELUcrAgTN6YSoGfqgw/75Bn/V7KZT70Hl3SsakyFx6m4PtK4DqRtNHY
 n9OcqKEO++hf6CHfh7YSZh77yNNIeRtKrejK/Ez+kBohxw8Mt/bkwg/9BFOSpIP4kmXf
 tQ37TgcHon4pITK8/1133aj5sspk4WZ6o2cHiMivwMW/4/EC4qdZbZ6ib/OisgYqEt26
 7Cp6pO6ndAXHFcK+e+4N79DOkgnYN3E0Ye116hVp3zp4suhDbqyDEr7sICCYePozHBL5
 pWMF0FzkUcxp0GL4q+eq4x8iO3GRBd+qlxgZgDnOiUgI0PVdqDG1ZJfGIuZ4+SWlB60l
 mO+A==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:sender:subject:to:cc:references:from:message-id
 :date:user-agent:mime-version:in-reply-to:content-language
 :content-transfer-encoding;
 bh=ka/KD+FOj/MkPKzvCeXVh8qaULqLcv89mM7nXGPh2yM=;
 b=VoPWrmF2qMNm8VngvW9SI+/Ike437ZfmYCwfuccfMFfxBIF0Ouy5a39F7HNdUHqx9V
 r4shIBTLrPmD91geMyyxwwxMds6TE3T8alxtJY+g9AEqHrSjiO4xwLl6wQvUycqHWAWC
 90o+xiOMVMPBWaxrVXI/vnDig5HwVo/QHBH56srqGWS7jbPWwMu1PrGwKAepUpM+f/Ai
 eIMz/mRMvqzeVMkzvGBLWXdgKqHT3d4/WLQ709k4BN9Ri1l1Ties3Ob21AZ8dIEM/XYo
 Q6vqLf7j3L0AUEHQtt6Ac9sPzY/O3/HieOmtzSJUaKl7zYk12Al81rn8ZcABXh1jOhaF
 zY/Q==
X-Gm-Message-State: AOAM530aSGgEmcKk3x/cuhknUftUenzm1+3RVVxzXSTJVzLE+HHkkUIQ
 qeWl2pf1RwI49A2bu2vxXPE3yW7B57o=
X-Google-Smtp-Source: ABdhPJwlil8vxHm2fp4ZO/vdRBAzdXcJ8Bu5Hq0mwvMy7TBCznVuIUNglZuhZXc1yJzGmtsh1822vw==
X-Received: by 2002:adf:d1c3:: with SMTP id b3mr5981375wrd.286.1630803345864; 
 Sat, 04 Sep 2021 17:55:45 -0700 (PDT)
Received: from [192.168.0.6] ([46.251.119.176])
 by smtp.googlemail.com with ESMTPSA id k16sm3565840wrx.87.2021.09.04.17.55.44
 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128);
 Sat, 04 Sep 2021 17:55:45 -0700 (PDT)
Subject: Re: bug#50067: Context menus
To: Juri Linkov <juri@HIDDEN>, Eli Zaretskii <eliz@HIDDEN>
References: <83sfz639lh.fsf@HIDDEN> <83eeanyrm5.fsf@HIDDEN>
 <4BC1074D-DE75-4303-8385-B70BAACFCDA0@HIDDEN> <83czq7youc.fsf@HIDDEN>
 <32ef6b91-107c-d7e5-b103-0ff062bf8ebd@HIDDEN> <83y28twahy.fsf@HIDDEN>
 <7af845e0-1f19-61fc-65e0-b23fac3927aa@HIDDEN> <83v93wx5ny.fsf@HIDDEN>
 <cd1ab4b2-1eb2-1259-98ff-828f0a79bb39@HIDDEN> <83r1ekwfrd.fsf@HIDDEN>
 <871r6ki6aw.fsf@HIDDEN>
 <b4f6c1fb-f322-4a59-55aa-f60932b996c9@HIDDEN> <838s0otl6b.fsf@HIDDEN>
 <0273902a-1f93-c643-da26-ab314d6d2db4@HIDDEN> <8335qvs8re.fsf@HIDDEN>
 <fa0e47a2-fafb-0c3b-b693-be1acca58c34@HIDDEN> <835yvnkuwb.fsf@HIDDEN>
 <87wno26qlo.fsf@HIDDEN>
 <d33f0cd5-7d8d-17af-d59c-6821793d397f@HIDDEN>
 <87fsupr1rv.fsf@HIDDEN>
 <3656c47f-49e2-1a90-ce2f-12b8899742aa@HIDDEN>
 <87czps95tt.fsf@HIDDEN>
From: Dmitry Gutov <dgutov@HIDDEN>
Message-ID: <e8ba3c02-92b1-5956-b7b3-ff6458c55423@HIDDEN>
Date: Sun, 5 Sep 2021 03:55:43 +0300
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101
 Thunderbird/78.13.0
MIME-Version: 1.0
In-Reply-To: <87czps95tt.fsf@HIDDEN>
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Language: en-US
Content-Transfer-Encoding: 7bit
X-Spam-Score: 0.4 (/)
X-Debbugs-Envelope-To: 50067
Cc: alan@HIDDEN, mattiase@HIDDEN, homeros.misasa@HIDDEN,
 tkk@HIDDEN, larsi@HIDDEN, 50067 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.6 (/)

On 01.09.2021 10:08, Juri Linkov wrote:
>>> so the new option could provide at least these choices:
>>> 1. 'jump': Jump to the first location by selecting its window;
>>> 2. 'show': Show the first item, but keep focus in the Xref window;
>>> 3. 'move': Move point to the first item in the Xref window
>>>      without showing it (maybe this should be the default behavior).
>>
>> We can do that. Do you expect to be using more than 1 of these values
>> yourself, or is it just for completeness?
> 
> A good indication that all values are needed is that I still can't decide
> which to use, so it would be possible to switch to another value when
> one of them does too much or too little.
> 
>> Regarding 3 as default, it makes a certain sense, but then you won't be
>> able to iterate through all locations with just 'n'. You'd have to press
>> 'C-o' and then 'n', 'n', 'n'...
> 
> I agree, it should not be the default.
> 
>>> To be able to add later a similar variable for xref-find-references,
>>> the new variable for xref-find-definitions could be named accordingly
>>> with a name that refers to xref-find-definitions, for example,
>>> xref-find-definitions-auto-jump.  Then later xref-find-references-auto-jump.
>>
>> I think the "other" variable would be called something with the word
>> "xrefs", not "references", and apply to other commands as well, such as
>> xref-find-apropos and project-find-regexp.
>>
>> So the proposed scheme would not quite work. Maybe like this instead?
>>
>>   - xref-auto-jump-to-first-definition
>>   - xref-auto-jump-to-first-<xref/item/match/result>. Or just
>>     xref-auto-jump-to-first.
> 
> grep/compilation already supports the value 'jump' by non-nil
> 'compilation-auto-jump-to-first-error', and the value 'move' when
> 'compilation-scroll-output' is customized to 'first-error'.
> 
> But I think for xref still two separate options are needed
> xref-auto-jump-to-first-definition for xref-find-definitions, and
> xref-auto-jump-to-first-xref for other more grep-like xref commands.

It's now in master: two variables, three methods of behavior for each.

Let me know if you see any problems.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#50067; Package emacs. Full text available.

Message received at 50067 <at> debbugs.gnu.org:


Received: (at 50067) by debbugs.gnu.org; 1 Sep 2021 19:03:24 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Sep 01 15:03:24 2021
Received: from localhost ([127.0.0.1]:39013 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1mLVW8-00089G-DB
	for submit <at> debbugs.gnu.org; Wed, 01 Sep 2021 15:03:24 -0400
Received: from mail-wr1-f46.google.com ([209.85.221.46]:39852)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <raaahh@HIDDEN>) id 1mLVW6-00088v-Q4
 for 50067 <at> debbugs.gnu.org; Wed, 01 Sep 2021 15:03:23 -0400
Received: by mail-wr1-f46.google.com with SMTP id z4so1136917wrr.6
 for <50067 <at> debbugs.gnu.org>; Wed, 01 Sep 2021 12:03:22 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112;
 h=sender:subject:to:cc:references:from:message-id:date:user-agent
 :mime-version:in-reply-to:content-language:content-transfer-encoding;
 bh=icV6W6ywvnLhIFEfjWLkBaokg58Klhg84jtdbNtIeNg=;
 b=af8Bw381lJ8wOLkMyP/pVMQn1SFA1N5aM88yWt+1AbE6vEIA8BZhFW2P/p1AibWnSy
 NjOaRUIS3zxPfoV5KXjD6t1dzvlAeNRSIJhuI6G2E4Vksc+OrC7JtwGpGHvKn4u9u21J
 V19is4zT9B+5SrDQkFqqSDsdPirmknd5kBziwn048ltMVEgYV6i4jLO/L3JFLvA6s6kD
 7bYAnb0SMpyyve1v/Smb4mAerd3va5HpDpQR4Ppt1lVrZ4Z4pak2ZLoljhiBNr0JnYUv
 p/Y/9khON6nN6bOfHjOTvaEQP3s6RxXH6zqB3W+kL9qH1WDlQ2pnc0VUW2zDDMC9bL7/
 u1vg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:sender:subject:to:cc:references:from:message-id
 :date:user-agent:mime-version:in-reply-to:content-language
 :content-transfer-encoding;
 bh=icV6W6ywvnLhIFEfjWLkBaokg58Klhg84jtdbNtIeNg=;
 b=H46GII3kZ6n5IbkEV1KGenbUDcRUYPXU0QD3PJ1KikqzcczEOipV28bb6P0UQfmM55
 /LZk1aVL0iuKihFH+FV3nhwtXQIGs+eYnXZwzkRYWOgr73+5qK8IF6qtslf7Yqi8PSXZ
 0aoxSqhCPXdYrv3udM9HTT2WnqFszb3T2RV3rz4O/pMg97Zveu2fIOxA5Y9mhWsYw+AD
 HPoQRK2gE181+mmXba/uqTKbY9zNcqSGXP3hcvrpzeuyDYx+IKtON6WtV2mZC4oMjJjc
 SgebpHHtm9C/PH9RNEMezX00aZq6zc5M7JWm1/gUm1Hi0uJdEDtNNPkXVYkNeZif++Hx
 BKyw==
X-Gm-Message-State: AOAM530kJoI1y9MGivguKwhTajW0b4LH5hq0bbkLq8UW/lWqpM9ctyMx
 jKjxq+IWgCLto+vLl7Fuk9WjGSO6r+o=
X-Google-Smtp-Source: ABdhPJxyqkq+opIijj1iIkKCt/OZ5p7o21JJNn6CiyZwh5xjxdJRiENpMOpF0mBSQUocJR10MugLVg==
X-Received: by 2002:adf:f4ca:: with SMTP id h10mr960350wrp.351.1630522996821; 
 Wed, 01 Sep 2021 12:03:16 -0700 (PDT)
Received: from [192.168.0.6] ([46.251.119.176])
 by smtp.googlemail.com with ESMTPSA id x18sm396869wmj.36.2021.09.01.12.03.14
 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128);
 Wed, 01 Sep 2021 12:03:16 -0700 (PDT)
Subject: Re: bug#50067: Context menus
To: Juri Linkov <juri@HIDDEN>
References: <83sfz639lh.fsf@HIDDEN> <83eeanyrm5.fsf@HIDDEN>
 <4BC1074D-DE75-4303-8385-B70BAACFCDA0@HIDDEN> <83czq7youc.fsf@HIDDEN>
 <32ef6b91-107c-d7e5-b103-0ff062bf8ebd@HIDDEN> <83y28twahy.fsf@HIDDEN>
 <7af845e0-1f19-61fc-65e0-b23fac3927aa@HIDDEN> <83v93wx5ny.fsf@HIDDEN>
 <cd1ab4b2-1eb2-1259-98ff-828f0a79bb39@HIDDEN> <83r1ekwfrd.fsf@HIDDEN>
 <871r6ki6aw.fsf@HIDDEN>
 <b4f6c1fb-f322-4a59-55aa-f60932b996c9@HIDDEN> <838s0otl6b.fsf@HIDDEN>
 <0273902a-1f93-c643-da26-ab314d6d2db4@HIDDEN> <8335qvs8re.fsf@HIDDEN>
 <fa0e47a2-fafb-0c3b-b693-be1acca58c34@HIDDEN> <835yvnkuwb.fsf@HIDDEN>
 <87wno26qlo.fsf@HIDDEN>
 <d33f0cd5-7d8d-17af-d59c-6821793d397f@HIDDEN>
 <87fsupr1rv.fsf@HIDDEN>
 <3656c47f-49e2-1a90-ce2f-12b8899742aa@HIDDEN>
 <87czps95tt.fsf@HIDDEN>
From: Dmitry Gutov <dgutov@HIDDEN>
Message-ID: <4e2b37da-eab1-5d23-80d3-629eab6092f9@HIDDEN>
Date: Wed, 1 Sep 2021 22:03:13 +0300
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101
 Thunderbird/78.11.0
MIME-Version: 1.0
In-Reply-To: <87czps95tt.fsf@HIDDEN>
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Language: en-US
Content-Transfer-Encoding: 7bit
X-Spam-Score: 0.4 (/)
X-Debbugs-Envelope-To: 50067
Cc: alan@HIDDEN, mattiase@HIDDEN, homeros.misasa@HIDDEN,
 tkk@HIDDEN, larsi@HIDDEN, 50067 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.6 (/)

On 01.09.2021 10:08, Juri Linkov wrote:
> BTW, I'm testing compilation errors/warnings on xref context menu,
> and it reposts this warning:
> 
>    prog-mode.el:60:12: Warning: the function `xref-backend-identifier-at-point'
>        is not known to be defined.
> 
> on this code:
> 
>    (defun prog-context-menu (menu)
>      (require 'xref)
>      (define-key-after menu [prog-separator] menu-bar-separator
>        'mark-whole-buffer)
>      (when (save-excursion
>              (mouse-set-point last-input-event)
>              (xref-backend-identifier-at-point
>               (xref-find-backend)))
>        (define-key-after menu [xref-find-def]
>          '(menu-item "Find Definition" xref-find-definitions-at-mouse
>                      :help "Find definition of identifier")
>          'prog-separator))
> 
> Maybe `xref-backend-identifier-at-point' should be autoloaded?

I don't know. What are the rules?

There is no risk to call it before xref.el is loaded because 
xref-find-backend itself is autoloaded.

But the lack of autoloading can cause byte-compilation warnings. They 
can be dealt with by other means too, though.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#50067; Package emacs. Full text available.

Message received at 50067 <at> debbugs.gnu.org:


Received: (at 50067) by debbugs.gnu.org; 1 Sep 2021 07:25:51 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Sep 01 03:25:51 2021
Received: from localhost ([127.0.0.1]:36058 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1mLKd4-0002vu-Q3
	for submit <at> debbugs.gnu.org; Wed, 01 Sep 2021 03:25:50 -0400
Received: from relay9-d.mail.gandi.net ([217.70.183.199]:43681)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <juri@HIDDEN>) id 1mLKd3-0002vU-JZ
 for 50067 <at> debbugs.gnu.org; Wed, 01 Sep 2021 03:25:50 -0400
Received: (Authenticated sender: juri@HIDDEN)
 by relay9-d.mail.gandi.net (Postfix) with ESMTPSA id EE957FF80E;
 Wed,  1 Sep 2021 07:25:38 +0000 (UTC)
From: Juri Linkov <juri@HIDDEN>
To: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#50067: Context menus
Organization: LINKOV.NET
References: <74BC00E9-2509-47DA-9428-1523FF7F3B33@HIDDEN>
 <87v942pvcj.fsf@HIDDEN>
 <F9F140FE-CB41-432E-BA96-6F1E49BEEB8F@HIDDEN>
 <004A628A-99CC-4C62-8AE2-921C4C38D42A@HIDDEN>
 <87h7fkh8z8.fsf@HIDDEN>
 <060413B6-E0EF-491D-986F-3988C255729F@HIDDEN>
 <87lf4tews5.fsf@HIDDEN>
 <00A9BE5A-D661-42AF-A65B-3B80C7428121@HIDDEN>
 <87wno1o5rn.fsf@HIDDEN> <835yvlsaoy.fsf@HIDDEN>
Date: Wed, 01 Sep 2021 10:12:54 +0300
In-Reply-To: <835yvlsaoy.fsf@HIDDEN> (Eli Zaretskii's message of "Tue, 31 Aug
 2021 21:58:37 +0300")
Message-ID: <87o89c7qtx.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (x86_64-pc-linux-gnu)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: 50067
Cc: 50067 <at> debbugs.gnu.org, mattiase@HIDDEN, alan@HIDDEN,
 tkk@HIDDEN, larsi@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

>> >>> ** no multiple horizontal lines
>> >>>
>> >>> Sometimes I see double lines on the context menu.  I think that there is
>> >>> no useful case to have double lines.  To allow only one horizontal line
>> >>> would look cool.
>> >>
>> >> Right, double separators should be removed.
>> >
>> > OK.
>>
>> This is not easy to do.  Because there are menu-items
>> that use the filter :visible, e.g.:
>
> Can I ask why do we need the separators in the context menus?  Why not
> remove them all, unconditionally?

The separators are of great help to provide visual cues for groups
of objects.  All menus on the menu-bar in Emacs use separators.
Anyway, this is implemented now:

diff --git a/lisp/mouse.el b/lisp/mouse.el
index 7d3ed9a0e4..8ac22a07c9 100644
--- a/lisp/mouse.el
+++ b/lisp/mouse.el
@@ -315,7 +315,14 @@ context-menu-map
                           (lambda (fun)
                             (setq menu (funcall fun menu))
                             nil))))
-    ;; TODO: remove double separators
+    ;; Remove double separators
+    (let ((l menu))
+      (while l
+        (when (and (equal (cdr-safe (car l)) menu-bar-separator)
+                   (equal (cdr-safe (cadr l)) menu-bar-separator))
+          (setcdr l (cddr l)))
+        (setq l (cdr l))))
+
     (when (functionp context-menu-filter-function)
       (setq menu (funcall context-menu-filter-function menu)))
     menu))




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#50067; Package emacs. Full text available.

Message received at 50067 <at> debbugs.gnu.org:


Received: (at 50067) by debbugs.gnu.org; 1 Sep 2021 07:25:44 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Sep 01 03:25:44 2021
Received: from localhost ([127.0.0.1]:36055 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1mLKcy-0002vb-Gx
	for submit <at> debbugs.gnu.org; Wed, 01 Sep 2021 03:25:44 -0400
Received: from relay12.mail.gandi.net ([217.70.178.232]:46351)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <juri@HIDDEN>) id 1mLKcw-0002vK-N4
 for 50067 <at> debbugs.gnu.org; Wed, 01 Sep 2021 03:25:43 -0400
Received: (Authenticated sender: juri@HIDDEN)
 by relay12.mail.gandi.net (Postfix) with ESMTPSA id F093D200013;
 Wed,  1 Sep 2021 07:25:32 +0000 (UTC)
From: Juri Linkov <juri@HIDDEN>
To: Dmitry Gutov <dgutov@HIDDEN>
Subject: Re: bug#50067: Context menus
Organization: LINKOV.NET
References: <83sfz639lh.fsf@HIDDEN> <83eeanyrm5.fsf@HIDDEN>
 <4BC1074D-DE75-4303-8385-B70BAACFCDA0@HIDDEN>
 <83czq7youc.fsf@HIDDEN>
 <32ef6b91-107c-d7e5-b103-0ff062bf8ebd@HIDDEN>
 <83y28twahy.fsf@HIDDEN>
 <7af845e0-1f19-61fc-65e0-b23fac3927aa@HIDDEN>
 <83v93wx5ny.fsf@HIDDEN>
 <cd1ab4b2-1eb2-1259-98ff-828f0a79bb39@HIDDEN>
 <83r1ekwfrd.fsf@HIDDEN> <871r6ki6aw.fsf@HIDDEN>
 <b4f6c1fb-f322-4a59-55aa-f60932b996c9@HIDDEN>
 <838s0otl6b.fsf@HIDDEN>
 <0273902a-1f93-c643-da26-ab314d6d2db4@HIDDEN>
 <8335qvs8re.fsf@HIDDEN>
 <fa0e47a2-fafb-0c3b-b693-be1acca58c34@HIDDEN>
 <835yvnkuwb.fsf@HIDDEN> <87wno26qlo.fsf@HIDDEN>
 <d33f0cd5-7d8d-17af-d59c-6821793d397f@HIDDEN>
 <87fsupr1rv.fsf@HIDDEN>
 <3656c47f-49e2-1a90-ce2f-12b8899742aa@HIDDEN>
Date: Wed, 01 Sep 2021 10:08:38 +0300
In-Reply-To: <3656c47f-49e2-1a90-ce2f-12b8899742aa@HIDDEN> (Dmitry Gutov's
 message of "Tue, 31 Aug 2021 23:23:43 +0300")
Message-ID: <87czps95tt.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (x86_64-pc-linux-gnu)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: 50067
Cc: alan@HIDDEN, mattiase@HIDDEN, homeros.misasa@HIDDEN,
 tkk@HIDDEN, larsi@HIDDEN, 50067 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

>> so the new option could provide at least these choices:
>> 1. 'jump': Jump to the first location by selecting its window;
>> 2. 'show': Show the first item, but keep focus in the Xref window;
>> 3. 'move': Move point to the first item in the Xref window
>>     without showing it (maybe this should be the default behavior).
>
> We can do that. Do you expect to be using more than 1 of these values
> yourself, or is it just for completeness?

A good indication that all values are needed is that I still can't decide
which to use, so it would be possible to switch to another value when
one of them does too much or too little.

> Regarding 3 as default, it makes a certain sense, but then you won't be
> able to iterate through all locations with just 'n'. You'd have to press
> 'C-o' and then 'n', 'n', 'n'...

I agree, it should not be the default.

>> To be able to add later a similar variable for xref-find-references,
>> the new variable for xref-find-definitions could be named accordingly
>> with a name that refers to xref-find-definitions, for example,
>> xref-find-definitions-auto-jump.  Then later xref-find-references-auto-jump.
>
> I think the "other" variable would be called something with the word
> "xrefs", not "references", and apply to other commands as well, such as
> xref-find-apropos and project-find-regexp.
>
> So the proposed scheme would not quite work. Maybe like this instead?
>
>  - xref-auto-jump-to-first-definition
>  - xref-auto-jump-to-first-<xref/item/match/result>. Or just
>    xref-auto-jump-to-first.

grep/compilation already supports the value 'jump' by non-nil
'compilation-auto-jump-to-first-error', and the value 'move' when
'compilation-scroll-output' is customized to 'first-error'.

But I think for xref still two separate options are needed
xref-auto-jump-to-first-definition for xref-find-definitions, and
xref-auto-jump-to-first-xref for other more grep-like xref commands.

BTW, I'm testing compilation errors/warnings on xref context menu,
and it reposts this warning:

  prog-mode.el:60:12: Warning: the function `xref-backend-identifier-at-point'
      is not known to be defined.

on this code:

  (defun prog-context-menu (menu)
    (require 'xref)
    (define-key-after menu [prog-separator] menu-bar-separator
      'mark-whole-buffer)
    (when (save-excursion
            (mouse-set-point last-input-event)
            (xref-backend-identifier-at-point
             (xref-find-backend)))
      (define-key-after menu [xref-find-def]
        '(menu-item "Find Definition" xref-find-definitions-at-mouse
                    :help "Find definition of identifier")
        'prog-separator))

Maybe `xref-backend-identifier-at-point' should be autoloaded?




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#50067; Package emacs. Full text available.

Message received at 50067 <at> debbugs.gnu.org:


Received: (at 50067) by debbugs.gnu.org; 31 Aug 2021 20:24:00 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Aug 31 16:24:00 2021
Received: from localhost ([127.0.0.1]:35502 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1mLAIW-0000fS-F3
	for submit <at> debbugs.gnu.org; Tue, 31 Aug 2021 16:24:00 -0400
Received: from mail-wr1-f49.google.com ([209.85.221.49]:46660)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <raaahh@HIDDEN>) id 1mLAIR-0000f5-Ot
 for 50067 <at> debbugs.gnu.org; Tue, 31 Aug 2021 16:23:55 -0400
Received: by mail-wr1-f49.google.com with SMTP id x6so965524wrv.13
 for <50067 <at> debbugs.gnu.org>; Tue, 31 Aug 2021 13:23:51 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
 h=sender:subject:to:cc:references:from:message-id:date:user-agent
 :mime-version:in-reply-to:content-language:content-transfer-encoding;
 bh=3RMOjh992Ieo7GoreYRGA4YtB0ljw6UmXNPxZ2Okj8Q=;
 b=P/ZqzNuD0n0GRIcMjhMrRmsLYvvXDNnR800OJ9X7sI2TiOqMHhJ1SgFVi0AaUp9nx6
 SyGOGZx0YHlx5Vwa69AJAsBhItoePvHgoXs43N//aqxoQ84Xio0gx4sAkVvUKJQC8NmG
 hGtthowsMa4ygvUBQAzjivuCEjRqp000c5SWidqCdD6Ez04Zq6Vo6hJ1VTIHG9E+egC3
 Yzh5I35FXoXWcADzqbuDWZvdyDZxQWT1cWlQgKrcC1IxkpH2hHnLlkKNijifJoK2ZYwe
 2F6I8xqKWsm/y7uFlqfnIf79Y9k6K1g2ZwFnUnM7Q6IjpcqoGhUl9l6D6VEI0D3qWT1p
 StlA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:sender:subject:to:cc:references:from:message-id
 :date:user-agent:mime-version:in-reply-to:content-language
 :content-transfer-encoding;
 bh=3RMOjh992Ieo7GoreYRGA4YtB0ljw6UmXNPxZ2Okj8Q=;
 b=cPLHJ1BPBjkD/kvBDI0D5zyhfJjMARaozBeCzaC01Da3N4pJBegEfinsnzHM+xtDLa
 ABuee/7mf2hp3MBrPf2NeZWBxh9wtau5quzU4gDQ5i100jyVf/3pQoSws2CnQZJIsq0G
 K2aQsSPM+SC9aRNVE/QwRDdw3H0005jXj3ENmLVtDm0JhVswrzgUUWAnf+uyM2h45XrI
 nRir8NgchBmVs1LV3MeUXt+v84JPc/oCbjvyayN1xOxgfCiC+lBiXz5HnrXXVsPCrnV3
 FUh/RBwfvBoxkqVeF6fh9rVRWn91GYoLCeDbRlIrk0Gc+E08psMc9x+ZGxkzSz4haLUK
 1mjw==
X-Gm-Message-State: AOAM531SCB6ADsooB9/HWy/Ol/KDIGfJ7UhhLBT7/nbigV8iQ+R/ZBYf
 pA0xJ2Ux1F+LwoQztJa/Ku0xwRvDIOs=
X-Google-Smtp-Source: ABdhPJznUM5lwoJU9PPDqijA8KrpEwJKkmZ7qPaEeBqxS7Sk1G5+Ixe86pKK7i/czNQPR7l9CjvD5w==
X-Received: by 2002:adf:b741:: with SMTP id n1mr31921777wre.120.1630441425666; 
 Tue, 31 Aug 2021 13:23:45 -0700 (PDT)
Received: from [192.168.0.6] ([46.251.119.176])
 by smtp.googlemail.com with ESMTPSA id c2sm19348026wrs.60.2021.08.31.13.23.44
 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128);
 Tue, 31 Aug 2021 13:23:45 -0700 (PDT)
Subject: Re: bug#50067: Context menus
To: Juri Linkov <juri@HIDDEN>
References: <83sfz639lh.fsf@HIDDEN> <YSDKlDe2TiP7G1Gw@HIDDEN>
 <56454B2B-0250-4BC6-BC26-E1C5579ACF49@HIDDEN> <83eeanyrm5.fsf@HIDDEN>
 <4BC1074D-DE75-4303-8385-B70BAACFCDA0@HIDDEN> <83czq7youc.fsf@HIDDEN>
 <32ef6b91-107c-d7e5-b103-0ff062bf8ebd@HIDDEN> <83y28twahy.fsf@HIDDEN>
 <7af845e0-1f19-61fc-65e0-b23fac3927aa@HIDDEN> <83v93wx5ny.fsf@HIDDEN>
 <cd1ab4b2-1eb2-1259-98ff-828f0a79bb39@HIDDEN> <83r1ekwfrd.fsf@HIDDEN>
 <871r6ki6aw.fsf@HIDDEN>
 <b4f6c1fb-f322-4a59-55aa-f60932b996c9@HIDDEN> <838s0otl6b.fsf@HIDDEN>
 <0273902a-1f93-c643-da26-ab314d6d2db4@HIDDEN> <8335qvs8re.fsf@HIDDEN>
 <fa0e47a2-fafb-0c3b-b693-be1acca58c34@HIDDEN> <835yvnkuwb.fsf@HIDDEN>
 <87wno26qlo.fsf@HIDDEN>
 <d33f0cd5-7d8d-17af-d59c-6821793d397f@HIDDEN>
 <87fsupr1rv.fsf@HIDDEN>
From: Dmitry Gutov <dgutov@HIDDEN>
Message-ID: <3656c47f-49e2-1a90-ce2f-12b8899742aa@HIDDEN>
Date: Tue, 31 Aug 2021 23:23:43 +0300
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101
 Thunderbird/78.11.0
MIME-Version: 1.0
In-Reply-To: <87fsupr1rv.fsf@HIDDEN>
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Language: en-US
Content-Transfer-Encoding: 7bit
X-Spam-Score: 0.4 (/)
X-Debbugs-Envelope-To: 50067
Cc: alan@HIDDEN, mattiase@HIDDEN, homeros.misasa@HIDDEN,
 tkk@HIDDEN, larsi@HIDDEN, 50067 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.6 (/)

On 31.08.2021 19:56, Juri Linkov wrote:
>>>>> All right. You still prefer the original patch, then?
>>>> Yes, the original patch satisfies my needs, AFAICT.  It would be good
>>>> to hear from Juri as well, though.
>>> Sorry, I can't find the original patch.  This bug#50067 collected
>>> so many different things, so it's now hard to find anything.
>>
>> Here it is: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=50067#183
> 
> Oh, I thought there were two patches: the patch above and also
> the original patch.  But it the above is the original patch,
> then I'd recommend to add more already discussed additions,
> so the new option could provide at least these choices:
> 
> 1. 'jump': Jump to the first location by selecting its window;
> 2. 'show': Show the first item, but keep focus in the Xref window;
> 3. 'move': Move point to the first item in the Xref window
>     without showing it (maybe this should be the default behavior).

We can do that. Do you expect to be using more than 1 of these values 
yourself, or is it just for completeness?

Regarding 3 as default, it makes a certain sense, but then you won't be 
able to iterate through all locations with just 'n'. You'd have to press 
'C-o' and then 'n', 'n', 'n'...

> To be able to add later a similar variable for xref-find-references,
> the new variable for xref-find-definitions could be named accordingly
> with a name that refers to xref-find-definitions, for example,
> xref-find-definitions-auto-jump.  Then later xref-find-references-auto-jump.

I think the "other" variable would be called something with the word 
"xrefs", not "references", and apply to other commands as well, such as 
xref-find-apropos and project-find-regexp.

So the proposed scheme would not quite work. Maybe like this instead?

  - xref-auto-jump-to-first-definition
  - xref-auto-jump-to-first-<xref/item/match/result>. Or just 
xref-auto-jump-to-first.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#50067; Package emacs. Full text available.

Message received at 50067 <at> debbugs.gnu.org:


Received: (at 50067) by debbugs.gnu.org; 31 Aug 2021 18:59:05 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Aug 31 14:59:05 2021
Received: from localhost ([127.0.0.1]:35395 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1mL8yL-0002XZ-6T
	for submit <at> debbugs.gnu.org; Tue, 31 Aug 2021 14:59:05 -0400
Received: from eggs.gnu.org ([209.51.188.92]:55088)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1mL8yF-0002XE-VT
 for 50067 <at> debbugs.gnu.org; Tue, 31 Aug 2021 14:59:00 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e]:49128)
 by eggs.gnu.org with esmtp (Exim 4.90_1)
 (envelope-from <eliz@HIDDEN>)
 id 1mL8y6-0007Qz-ED; Tue, 31 Aug 2021 14:58:46 -0400
Received: from 84.94.185.95.cable.012.net.il ([84.94.185.95]:1320
 helo=home-c4e4a596f7)
 by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <eliz@HIDDEN>)
 id 1mL8y5-0001r6-QQ; Tue, 31 Aug 2021 14:58:46 -0400
Date: Tue, 31 Aug 2021 21:58:37 +0300
Message-Id: <835yvlsaoy.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Juri Linkov <juri@HIDDEN>
In-Reply-To: <87wno1o5rn.fsf@HIDDEN> (message from Juri Linkov on
 Tue, 31 Aug 2021 20:43:36 +0300)
Subject: Re: bug#50067: Context menus
References: <74BC00E9-2509-47DA-9428-1523FF7F3B33@HIDDEN>
 <87v942pvcj.fsf@HIDDEN>
 <F9F140FE-CB41-432E-BA96-6F1E49BEEB8F@HIDDEN>
 <004A628A-99CC-4C62-8AE2-921C4C38D42A@HIDDEN>
 <87h7fkh8z8.fsf@HIDDEN>
 <060413B6-E0EF-491D-986F-3988C255729F@HIDDEN>
 <87lf4tews5.fsf@HIDDEN>
 <00A9BE5A-D661-42AF-A65B-3B80C7428121@HIDDEN>
 <87wno1o5rn.fsf@HIDDEN>
MIME-version: 1.0
Content-type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: 8bit
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 50067
Cc: 50067 <at> debbugs.gnu.org, mattiase@HIDDEN, alan@HIDDEN,
 tkk@HIDDEN, larsi@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> From: Juri Linkov <juri@HIDDEN>
> Cc: Alan Third <alan@HIDDEN>,  Mattias Engdegrd
>  <mattiase@HIDDEN>,
>   Lars Ingebrigtsen <larsi@HIDDEN>,  50067 <at> debbugs.gnu.org,  Eli
>  Zaretskii <eliz@HIDDEN>
> Date: Tue, 31 Aug 2021 20:43:36 +0300
> 
> >>> ** no multiple horizontal lines
> >>>
> >>> Sometimes I see double lines on the context menu.  I think that there is
> >>> no useful case to have double lines.  To allow only one horizontal line
> >>> would look cool.
> >>
> >> Right, double separators should be removed.
> >
> > OK.
> 
> This is not easy to do.  Because there are menu-items
> that use the filter :visible, e.g.:

Can I ask why do we need the separators in the context menus?  Why not
remove them all, unconditionally?





Information forwarded to bug-gnu-emacs@HIDDEN:
bug#50067; Package emacs. Full text available.

Message received at 50067 <at> debbugs.gnu.org:


Received: (at 50067) by debbugs.gnu.org; 31 Aug 2021 18:05:41 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Aug 31 14:05:40 2021
Received: from localhost ([127.0.0.1]:35352 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1mL88i-0001DK-I1
	for submit <at> debbugs.gnu.org; Tue, 31 Aug 2021 14:05:40 -0400
Received: from relay3-d.mail.gandi.net ([217.70.183.195]:34379)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <juri@HIDDEN>) id 1mL88d-0001Cq-11
 for 50067 <at> debbugs.gnu.org; Tue, 31 Aug 2021 14:05:36 -0400
Received: (Authenticated sender: juri@HIDDEN)
 by relay3-d.mail.gandi.net (Postfix) with ESMTPSA id C443F60002;
 Tue, 31 Aug 2021 18:05:25 +0000 (UTC)
From: Juri Linkov <juri@HIDDEN>
To: Tak Kunihiro <tkk@HIDDEN>
Subject: Re: bug#50067: Context menus
References: <74BC00E9-2509-47DA-9428-1523FF7F3B33@HIDDEN>
 <87v942pvcj.fsf@HIDDEN>
 <F9F140FE-CB41-432E-BA96-6F1E49BEEB8F@HIDDEN>
 <004A628A-99CC-4C62-8AE2-921C4C38D42A@HIDDEN>
 <87h7fkh8z8.fsf@HIDDEN>
 <060413B6-E0EF-491D-986F-3988C255729F@HIDDEN>
 <87lf4tews5.fsf@HIDDEN>
 <00A9BE5A-D661-42AF-A65B-3B80C7428121@HIDDEN>
Date: Tue, 31 Aug 2021 20:43:36 +0300
In-Reply-To: <00A9BE5A-D661-42AF-A65B-3B80C7428121@HIDDEN>
 (Tak Kunihiro's message of "Mon, 23 Aug 2021 12:11:27 +0900")
Message-ID: <87wno1o5rn.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (x86_64-pc-linux-gnu)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: 50067
Cc: Mattias =?iso-8859-1?Q?Engdeg=E5rd?= <mattiase@HIDDEN>,
 Alan Third <alan@HIDDEN>, 50067 <at> debbugs.gnu.org,
 Eli Zaretskii <eliz@HIDDEN>, Lars Ingebrigtsen <larsi@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

>>> ** no multiple horizontal lines
>>>
>>> Sometimes I see double lines on the context menu.  I think that there is
>>> no useful case to have double lines.  To allow only one horizontal line
>>> would look cool.
>>
>> Right, double separators should be removed.
>
> OK.

This is not easy to do.  Because there are menu-items
that use the filter :visible, e.g.:

  (defun prog-context-menu (menu)
    (require 'xref)
    (define-key-after menu [prog-separator] menu-bar-separator
      'mark-whole-buffer)
    (define-key-after menu [xref-find-def]
      '(menu-item "Find Definition" xref-find-definitions-at-mouse
                  :visible (save-excursion
                             (mouse-set-point last-input-event)
                             (xref-backend-identifier-at-point
                              (xref-find-backend)))
                  :help "Find definition of identifier")
      'prog-separator)

So it's not known whether the menu-item will be displayed
until the menu is displayed.  So there is no way to remove
a stray separator in the context-menu function that creates
the context menu.

Maybe such items should be rewritten to avoid the filter :visible,
e.g.:

  (defun prog-context-menu (menu)
    (require 'xref)
    (define-key-after menu [prog-separator] menu-bar-separator
      'mark-whole-buffer)
    (when (save-excursion
            (mouse-set-point last-input-event)
            (xref-backend-identifier-at-point
             (xref-find-backend)))
      (define-key-after menu [xref-find-def]
        '(menu-item "Find Definition" xref-find-definitions-at-mouse
                    :help "Find definition of identifier")
        'prog-separator))




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#50067; Package emacs. Full text available.

Message received at 50067 <at> debbugs.gnu.org:


Received: (at 50067) by debbugs.gnu.org; 31 Aug 2021 18:05:34 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Aug 31 14:05:34 2021
Received: from localhost ([127.0.0.1]:35348 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1mL88c-0001D1-AB
	for submit <at> debbugs.gnu.org; Tue, 31 Aug 2021 14:05:34 -0400
Received: from relay8-d.mail.gandi.net ([217.70.183.201]:47813)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <juri@HIDDEN>) id 1mL88X-0001Cf-Na
 for 50067 <at> debbugs.gnu.org; Tue, 31 Aug 2021 14:05:33 -0400
Received: (Authenticated sender: juri@HIDDEN)
 by relay8-d.mail.gandi.net (Postfix) with ESMTPSA id 09D9F1BF20D;
 Tue, 31 Aug 2021 18:05:19 +0000 (UTC)
From: Juri Linkov <juri@HIDDEN>
To: Tak Kunihiro <tkk@HIDDEN>
Subject: Re: bug#50067: Context menus
References: <74BC00E9-2509-47DA-9428-1523FF7F3B33@HIDDEN>
 <87v942pvcj.fsf@HIDDEN>
 <F9F140FE-CB41-432E-BA96-6F1E49BEEB8F@HIDDEN>
 <004A628A-99CC-4C62-8AE2-921C4C38D42A@HIDDEN>
 <87h7fkh8z8.fsf@HIDDEN>
 <060413B6-E0EF-491D-986F-3988C255729F@HIDDEN>
 <87lf4tews5.fsf@HIDDEN>
 <00A9BE5A-D661-42AF-A65B-3B80C7428121@HIDDEN>
 <87wnociu41.fsf@HIDDEN>
Date: Tue, 31 Aug 2021 20:37:54 +0300
In-Reply-To: <87wnociu41.fsf@HIDDEN> (Juri Linkov's message of "Mon, 
 23 Aug 2021 10:24:22 +0300")
Message-ID: <87y28hpktx.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (x86_64-pc-linux-gnu)
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: 50067
Cc: 50067 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

>>>> On paste when there is a region and delete-selection-mode is t, the
>>>> region should be replaced by the text.
>>>
>>> Please explain how the region should be replaced by the text,
>>> when mouse-yank-at-click or mouse-yank-primary is used
>>> to paste where the mouse is clicked.  Should it delete the region
>>> and paste where mouse is clicked on another part of the buffer?
>>> What if the mouse is clicked in another window?
>>
>> When there is a region and yank text by `C-y’, the text would
>> be replaced.
>>
>> I think when there is a region and point in on region, region
>> should be replaced by text.  No?
>
> mouse-yank-at-click is intended to paste where you click.
> So when there is a region, and you click mouse-3 at some other position
> where you want to paste, and select "Paste" from the context-menu,
> it's unclear what to do with the region.  It makes no sense
> to delete the region, when you paste at the clicked position
> outside of the region, but not on the region.
>
> Please see more in mouse-yank-at-click and mouse-yank-primary
> that contain such comment about the need to deactivate the region:
>
>   ;; Without this, confusing things happen upon e.g. inserting into
>   ;; the middle of an active region.
>   (when select-active-regions
>     (let (select-active-regions)
>       (deactivate-mark)))

But maybe still it should delete the region before yanking?
I suggest to try these settings:

  (put 'mouse-yank-primary 'delete-selection 'yank)
  (put 'mouse-yank-at-click 'delete-selection 'yank)
  (put 'menu-bar-select-yank 'delete-selection 'yank)

Then maybe they should be added to delsel.el.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#50067; Package emacs. Full text available.

Message received at 50067 <at> debbugs.gnu.org:


Received: (at 50067) by debbugs.gnu.org; 31 Aug 2021 16:59:29 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Aug 31 12:59:29 2021
Received: from localhost ([127.0.0.1]:35327 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1mL76b-00081d-Cv
	for submit <at> debbugs.gnu.org; Tue, 31 Aug 2021 12:59:29 -0400
Received: from relay1-d.mail.gandi.net ([217.70.183.193]:22915)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <juri@HIDDEN>) id 1mL76V-000819-Gw
 for 50067 <at> debbugs.gnu.org; Tue, 31 Aug 2021 12:59:23 -0400
Received: (Authenticated sender: juri@HIDDEN)
 by relay1-d.mail.gandi.net (Postfix) with ESMTPSA id B291A240006;
 Tue, 31 Aug 2021 16:59:09 +0000 (UTC)
From: Juri Linkov <juri@HIDDEN>
To: Dmitry Gutov <dgutov@HIDDEN>
Subject: Re: bug#50067: Context menus
Organization: LINKOV.NET
References: <83sfz639lh.fsf@HIDDEN> <YSDKlDe2TiP7G1Gw@HIDDEN>
 <56454B2B-0250-4BC6-BC26-E1C5579ACF49@HIDDEN>
 <83eeanyrm5.fsf@HIDDEN>
 <4BC1074D-DE75-4303-8385-B70BAACFCDA0@HIDDEN>
 <83czq7youc.fsf@HIDDEN>
 <32ef6b91-107c-d7e5-b103-0ff062bf8ebd@HIDDEN>
 <83y28twahy.fsf@HIDDEN>
 <7af845e0-1f19-61fc-65e0-b23fac3927aa@HIDDEN>
 <83v93wx5ny.fsf@HIDDEN>
 <cd1ab4b2-1eb2-1259-98ff-828f0a79bb39@HIDDEN>
 <83r1ekwfrd.fsf@HIDDEN> <871r6ki6aw.fsf@HIDDEN>
 <b4f6c1fb-f322-4a59-55aa-f60932b996c9@HIDDEN>
 <838s0otl6b.fsf@HIDDEN>
 <0273902a-1f93-c643-da26-ab314d6d2db4@HIDDEN>
 <8335qvs8re.fsf@HIDDEN>
 <fa0e47a2-fafb-0c3b-b693-be1acca58c34@HIDDEN>
 <835yvnkuwb.fsf@HIDDEN> <87wno26qlo.fsf@HIDDEN>
 <d33f0cd5-7d8d-17af-d59c-6821793d397f@HIDDEN>
Date: Tue, 31 Aug 2021 19:56:36 +0300
In-Reply-To: <d33f0cd5-7d8d-17af-d59c-6821793d397f@HIDDEN> (Dmitry Gutov's
 message of "Tue, 31 Aug 2021 15:24:50 +0300")
Message-ID: <87fsupr1rv.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (x86_64-pc-linux-gnu)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: 50067
Cc: alan@HIDDEN, mattiase@HIDDEN, homeros.misasa@HIDDEN,
 tkk@HIDDEN, larsi@HIDDEN, 50067 <at> debbugs.gnu.org,
 Eli Zaretskii <eliz@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

>>>> All right. You still prefer the original patch, then?
>>> Yes, the original patch satisfies my needs, AFAICT.  It would be good
>>> to hear from Juri as well, though.
>> Sorry, I can't find the original patch.  This bug#50067 collected
>> so many different things, so it's now hard to find anything.
>
> Here it is: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=50067#183

Oh, I thought there were two patches: the patch above and also
the original patch.  But it the above is the original patch,
then I'd recommend to add more already discussed additions,
so the new option could provide at least these choices:

1. 'jump': Jump to the first location by selecting its window;
2. 'show': Show the first item, but keep focus in the Xref window;
3. 'move': Move point to the first item in the Xref window
   without showing it (maybe this should be the default behavior).

To be able to add later a similar variable for xref-find-references,
the new variable for xref-find-definitions could be named accordingly
with a name that refers to xref-find-definitions, for example,
xref-find-definitions-auto-jump.  Then later xref-find-references-auto-jump.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#50067; Package emacs. Full text available.

Message received at 50067 <at> debbugs.gnu.org:


Received: (at 50067) by debbugs.gnu.org; 31 Aug 2021 12:25:04 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Aug 31 08:25:04 2021
Received: from localhost ([127.0.0.1]:33236 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1mL2p5-0000Di-Sl
	for submit <at> debbugs.gnu.org; Tue, 31 Aug 2021 08:25:04 -0400
Received: from mail-wr1-f53.google.com ([209.85.221.53]:40905)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <raaahh@HIDDEN>) id 1mL2p2-0000D5-CQ
 for 50067 <at> debbugs.gnu.org; Tue, 31 Aug 2021 08:25:02 -0400
Received: by mail-wr1-f53.google.com with SMTP id t15so21177032wrg.7
 for <50067 <at> debbugs.gnu.org>; Tue, 31 Aug 2021 05:25:00 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
 h=sender:subject:to:cc:references:from:message-id:date:user-agent
 :mime-version:in-reply-to:content-language:content-transfer-encoding;
 bh=TAAB1XWlPNHB6CyMJkgGpA5rnPIETrz5QVTM0XHN0nU=;
 b=iC7PI5VNUzS5OAM0yUlWKRqDfbbhMRbrv9e8lii9Sn8qENT5hMzGmV5iVuZUhfEee/
 6iy5grojPzvjxPGw6vlO5N6pzxlRQ3b7O8ZkIwlQ/JVGBW3HuzebB+bYOM0VqoacUyyt
 xN+e7VvU02xX86OepaEhVS1FvkDwB6oc87cZmu2VeNhvTN5P/YBNYR1wd9+rSJ1pTkHD
 FrjrDdsX0lfrj7Pu8UpFPb43mBLz49MMWb5rP0zuVEnx9I0ivQ2HTuLxXnCXjKlNP5hD
 c7Am1MimbcCZrDLs152t/RTJYQqQUPi2klUFeNy+YVZw9TkBJQjF0+jYRGx2Cpl6ZVyY
 sspA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:sender:subject:to:cc:references:from:message-id
 :date:user-agent:mime-version:in-reply-to:content-language
 :content-transfer-encoding;
 bh=TAAB1XWlPNHB6CyMJkgGpA5rnPIETrz5QVTM0XHN0nU=;
 b=MD5c/XqYnuw3H8xWpmaP1BzsqNVX2JdXYZ1xlS3g/druY2Fz9oNRSEFlICPAyao6bJ
 Vqf+XdSTZts4CEc74n2XsKP3yGmZ72EyxMeVpKvhCV6izq6xH0guRWZ3zqG+rwWQa3Zy
 WilOkY8f0MIYDlureJRy26EKwU/WI5Uem5pEOoObLzhf/4ylZKygyPThNAWaCMqtKVhz
 DZBaDC/bA7xTq7w9PQzyqQ5dWLP5towPDkgwStIfgGEE5mK9dhOeB7wYmF2EayBbX5Gh
 aJwT0n5/z1PXxlCCebNfpxNXwRV4D5qrB5nlO/JK5b6dXSaCTNDdIiEBl9p2f6K8eL+v
 nFug==
X-Gm-Message-State: AOAM531Vsiv4VWDGSmGbJn/JebnmxATclfqKAwXOQwYkShjtN/Pe9c9E
 HGYadho6kJ0n7hyy3QMSNr04ClFlxuI=
X-Google-Smtp-Source: ABdhPJwx3vZINSD6xY9TqkrFpwMTf4NcmfLjI3zvSaw4knakWw5XtW9RNb7fUC2HC/MZdUzQR0w9Hw==
X-Received: by 2002:adf:efc2:: with SMTP id i2mr31482266wrp.94.1630412694508; 
 Tue, 31 Aug 2021 05:24:54 -0700 (PDT)
Received: from [192.168.0.6] ([46.251.119.176])
 by smtp.googlemail.com with ESMTPSA id z2sm2453130wma.45.2021.08.31.05.24.51
 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128);
 Tue, 31 Aug 2021 05:24:53 -0700 (PDT)
Subject: Re: bug#50067: Context menus
To: Juri Linkov <juri@HIDDEN>, Eli Zaretskii <eliz@HIDDEN>
References: <83sfz639lh.fsf@HIDDEN> <83zgtcyp2k.fsf@HIDDEN>
 <E96971E5-818F-4FE6-B702-37F09EDBB073@HIDDEN> <YSDKlDe2TiP7G1Gw@HIDDEN>
 <56454B2B-0250-4BC6-BC26-E1C5579ACF49@HIDDEN> <83eeanyrm5.fsf@HIDDEN>
 <4BC1074D-DE75-4303-8385-B70BAACFCDA0@HIDDEN> <83czq7youc.fsf@HIDDEN>
 <32ef6b91-107c-d7e5-b103-0ff062bf8ebd@HIDDEN> <83y28twahy.fsf@HIDDEN>
 <7af845e0-1f19-61fc-65e0-b23fac3927aa@HIDDEN> <83v93wx5ny.fsf@HIDDEN>
 <cd1ab4b2-1eb2-1259-98ff-828f0a79bb39@HIDDEN> <83r1ekwfrd.fsf@HIDDEN>
 <871r6ki6aw.fsf@HIDDEN>
 <b4f6c1fb-f322-4a59-55aa-f60932b996c9@HIDDEN> <838s0otl6b.fsf@HIDDEN>
 <0273902a-1f93-c643-da26-ab314d6d2db4@HIDDEN> <8335qvs8re.fsf@HIDDEN>
 <fa0e47a2-fafb-0c3b-b693-be1acca58c34@HIDDEN> <835yvnkuwb.fsf@HIDDEN>
 <87wno26qlo.fsf@HIDDEN>
From: Dmitry Gutov <dgutov@HIDDEN>
Message-ID: <d33f0cd5-7d8d-17af-d59c-6821793d397f@HIDDEN>
Date: Tue, 31 Aug 2021 15:24:50 +0300
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101
 Thunderbird/78.11.0
MIME-Version: 1.0
In-Reply-To: <87wno26qlo.fsf@HIDDEN>
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Language: en-US
Content-Transfer-Encoding: 7bit
X-Spam-Score: 0.4 (/)
X-Debbugs-Envelope-To: 50067
Cc: alan@HIDDEN, mattiase@HIDDEN, homeros.misasa@HIDDEN,
 tkk@HIDDEN, larsi@HIDDEN, 50067 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.6 (/)

On 31.08.2021 10:05, Juri Linkov wrote:
>>> All right. You still prefer the original patch, then?
>> Yes, the original patch satisfies my needs, AFAICT.  It would be good
>> to hear from Juri as well, though.
> Sorry, I can't find the original patch.  This bug#50067 collected
> so many different things, so it's now hard to find anything.

Here it is: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=50067#183




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#50067; Package emacs. Full text available.

Message received at 50067 <at> debbugs.gnu.org:


Received: (at 50067) by debbugs.gnu.org; 31 Aug 2021 07:11:17 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Aug 31 03:11:17 2021
Received: from localhost ([127.0.0.1]:32788 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1mKxvR-0004pq-DP
	for submit <at> debbugs.gnu.org; Tue, 31 Aug 2021 03:11:17 -0400
Received: from relay4-d.mail.gandi.net ([217.70.183.196]:44423)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <juri@HIDDEN>) id 1mKxvO-0004pT-HG
 for 50067 <at> debbugs.gnu.org; Tue, 31 Aug 2021 03:11:16 -0400
Received: (Authenticated sender: juri@HIDDEN)
 by relay4-d.mail.gandi.net (Postfix) with ESMTPSA id 2308BE0005;
 Tue, 31 Aug 2021 07:11:03 +0000 (UTC)
From: Juri Linkov <juri@HIDDEN>
To: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#50067: Context menus
Organization: LINKOV.NET
References: <83sfz639lh.fsf@HIDDEN> <83zgtcyp2k.fsf@HIDDEN>
 <E96971E5-818F-4FE6-B702-37F09EDBB073@HIDDEN>
 <YSDKlDe2TiP7G1Gw@HIDDEN>
 <56454B2B-0250-4BC6-BC26-E1C5579ACF49@HIDDEN>
 <83eeanyrm5.fsf@HIDDEN>
 <4BC1074D-DE75-4303-8385-B70BAACFCDA0@HIDDEN>
 <83czq7youc.fsf@HIDDEN>
 <32ef6b91-107c-d7e5-b103-0ff062bf8ebd@HIDDEN>
 <83y28twahy.fsf@HIDDEN>
 <7af845e0-1f19-61fc-65e0-b23fac3927aa@HIDDEN>
 <83v93wx5ny.fsf@HIDDEN>
 <cd1ab4b2-1eb2-1259-98ff-828f0a79bb39@HIDDEN>
 <83r1ekwfrd.fsf@HIDDEN> <871r6ki6aw.fsf@HIDDEN>
 <b4f6c1fb-f322-4a59-55aa-f60932b996c9@HIDDEN>
 <838s0otl6b.fsf@HIDDEN>
 <0273902a-1f93-c643-da26-ab314d6d2db4@HIDDEN>
 <8335qvs8re.fsf@HIDDEN>
 <fa0e47a2-fafb-0c3b-b693-be1acca58c34@HIDDEN>
 <835yvnkuwb.fsf@HIDDEN>
Date: Tue, 31 Aug 2021 10:05:55 +0300
In-Reply-To: <835yvnkuwb.fsf@HIDDEN> (Eli Zaretskii's message of "Mon, 30 Aug
 2021 14:57:08 +0300")
Message-ID: <87wno26qlo.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (x86_64-pc-linux-gnu)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: 50067
Cc: alan@HIDDEN, mattiase@HIDDEN, homeros.misasa@HIDDEN,
 tkk@HIDDEN, Dmitry Gutov <dgutov@HIDDEN>, larsi@HIDDEN,
 50067 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

>> All right. You still prefer the original patch, then?
>
> Yes, the original patch satisfies my needs, AFAICT.  It would be good
> to hear from Juri as well, though.

Sorry, I can't find the original patch.  This bug#50067 collected
so many different things, so it's now hard to find anything.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#50067; Package emacs. Full text available.

Message received at 50067 <at> debbugs.gnu.org:


Received: (at 50067) by debbugs.gnu.org; 30 Aug 2021 11:57:40 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Aug 30 07:57:40 2021
Received: from localhost ([127.0.0.1]:58324 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1mKfux-000145-CO
	for submit <at> debbugs.gnu.org; Mon, 30 Aug 2021 07:57:40 -0400
Received: from eggs.gnu.org ([209.51.188.92]:58400)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1mKfuq-00013i-Sc
 for 50067 <at> debbugs.gnu.org; Mon, 30 Aug 2021 07:57:33 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e]:43166)
 by eggs.gnu.org with esmtp (Exim 4.90_1)
 (envelope-from <eliz@HIDDEN>)
 id 1mKfuf-0000cA-M7; Mon, 30 Aug 2021 07:57:17 -0400
Received: from 84.94.185.95.cable.012.net.il ([84.94.185.95]:3967
 helo=home-c4e4a596f7)
 by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <eliz@HIDDEN>)
 id 1mKfuf-0003gL-83; Mon, 30 Aug 2021 07:57:17 -0400
Date: Mon, 30 Aug 2021 14:57:08 +0300
Message-Id: <835yvnkuwb.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Dmitry Gutov <dgutov@HIDDEN>
In-Reply-To: <fa0e47a2-fafb-0c3b-b693-be1acca58c34@HIDDEN> (message from
 Dmitry Gutov on Mon, 30 Aug 2021 05:45:07 +0300)
Subject: Re: bug#50067: Context menus
References: <83sfz639lh.fsf@HIDDEN> <8735r6ppf0.fsf@HIDDEN>
 <83o89u37gh.fsf@HIDDEN> <87wnohx5zd.fsf@HIDDEN>
 <831r6p3lzc.fsf@HIDDEN> <87o89sh96g.fsf@HIDDEN>
 <837dgg1hdg.fsf@HIDDEN> <87mtpcf79p.fsf@HIDDEN>
 <83zgtcyp2k.fsf@HIDDEN> <E96971E5-818F-4FE6-B702-37F09EDBB073@HIDDEN>
 <YSDKlDe2TiP7G1Gw@HIDDEN> <56454B2B-0250-4BC6-BC26-E1C5579ACF49@HIDDEN>
 <83eeanyrm5.fsf@HIDDEN> <4BC1074D-DE75-4303-8385-B70BAACFCDA0@HIDDEN>
 <83czq7youc.fsf@HIDDEN> <32ef6b91-107c-d7e5-b103-0ff062bf8ebd@HIDDEN>
 <83y28twahy.fsf@HIDDEN> <7af845e0-1f19-61fc-65e0-b23fac3927aa@HIDDEN>
 <83v93wx5ny.fsf@HIDDEN> <cd1ab4b2-1eb2-1259-98ff-828f0a79bb39@HIDDEN>
 <83r1ekwfrd.fsf@HIDDEN> <871r6ki6aw.fsf@HIDDEN>
 <b4f6c1fb-f322-4a59-55aa-f60932b996c9@HIDDEN> <838s0otl6b.fsf@HIDDEN>
 <0273902a-1f93-c643-da26-ab314d6d2db4@HIDDEN> <8335qvs8re.fsf@HIDDEN>
 <fa0e47a2-fafb-0c3b-b693-be1acca58c34@HIDDEN>
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 50067
Cc: alan@HIDDEN, mattiase@HIDDEN, juri@HIDDEN,
 homeros.misasa@HIDDEN, tkk@HIDDEN, larsi@HIDDEN,
 50067 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> Cc: juri@HIDDEN, alan@HIDDEN, mattiase@HIDDEN,
>  homeros.misasa@HIDDEN, tkk@HIDDEN, larsi@HIDDEN,
>  50067 <at> debbugs.gnu.org
> From: Dmitry Gutov <dgutov@HIDDEN>
> Date: Mon, 30 Aug 2021 05:45:07 +0300
> 
> All right. You still prefer the original patch, then?

Yes, the original patch satisfies my needs, AFAICT.  It would be good
to hear from Juri as well, though.

Thanks.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#50067; Package emacs. Full text available.

Message received at 50067 <at> debbugs.gnu.org:


Received: (at 50067) by debbugs.gnu.org; 30 Aug 2021 02:45:24 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Aug 29 22:45:24 2021
Received: from localhost ([127.0.0.1]:57877 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1mKXIU-0007qJ-Kd
	for submit <at> debbugs.gnu.org; Sun, 29 Aug 2021 22:45:24 -0400
Received: from mail-wm1-f52.google.com ([209.85.128.52]:36454)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <raaahh@HIDDEN>) id 1mKXIS-0007q0-Aa
 for 50067 <at> debbugs.gnu.org; Sun, 29 Aug 2021 22:45:17 -0400
Received: by mail-wm1-f52.google.com with SMTP id
 79-20020a1c0452000000b002e6cf79e572so13633014wme.1
 for <50067 <at> debbugs.gnu.org>; Sun, 29 Aug 2021 19:45:16 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
 h=sender:subject:to:cc:references:from:message-id:date:user-agent
 :mime-version:in-reply-to:content-language:content-transfer-encoding;
 bh=QiqaxBQ5jI1Rwa2GX0HfPiuqyRbyaTOpEk9j148dXMM=;
 b=ZNjZZts+smp2z+SCJ+2E+zVGTE+NS93Vdrl4FzXrnodRU+XOI9EdTH4H0cOANkRp/u
 CT/GzSX0jaumk8PVKpNZyKfd0iqTRTnUfxY7yqm9Fw3g7MpE0XU/JNF8CmUWEu6kT6ja
 jf6zvpu/GncDyA3XVMzhK8mtj1KvcCBSoRClT8ah86XKK6xuAzZOQCRBUsxYxFDWkt0x
 n0f3Oa30CzAzdN5XNbR4gc5R+Uhu5VV2hT9LzNXTGk41MZhWDXVvyCRZYvvSgjgwGez6
 gKQ6U9rCotIIJaNfjhkc+aopoN0wVC1zn5p7rlJ3jPtWBCb96O5cwWe2LEVTTG4Jupwt
 n0pw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:sender:subject:to:cc:references:from:message-id
 :date:user-agent:mime-version:in-reply-to:content-language
 :content-transfer-encoding;
 bh=QiqaxBQ5jI1Rwa2GX0HfPiuqyRbyaTOpEk9j148dXMM=;
 b=n9//iezLdrmR3jOZKq0zkmOJhznZmy4UHytWW8L96QvfKxOf3to3AQxE390E0Af2Wx
 /zWOMw2JS8E7bE1cq3tnYujoYjpkFF3U1p5dq9/oU9koS/BQ1bev2yhJK041UYZ6qaId
 J3k099qsHwkdL4k9vzulUgEGMtzSsvsOAitVy7A9Nsn9fJsun1vVITuwbbLGZDp/wbUS
 gIcYZf8TIMaIabtcG4eAGi3BdGLR13F2PeHLhCrUH1gb0UdP0jq5fQRjJIwy/bwQIpfv
 IapVMTm2twFMwmaB4iNi6qnDe319XbdQroc3Inm+K5dZWpcFok/bpC2a8JPr1S7GV1B4
 GaKQ==
X-Gm-Message-State: AOAM532JY8qFeIJCbypLSu2lGwKz1sKSqecmXUxgmbLR+3CdrbPrpZdB
 50vRNqiXOzH75PVuyhk8YN3XEOdM4+A=
X-Google-Smtp-Source: ABdhPJxnSfzD6XJtWM9ZlwpQ+cXionF1KWyE+QHix+ESEMh+F6cXjKYIOnhtSGKxKFp94XsHb7+jFg==
X-Received: by 2002:a7b:c041:: with SMTP id u1mr19238785wmc.95.1630291510440; 
 Sun, 29 Aug 2021 19:45:10 -0700 (PDT)
Received: from [192.168.0.6] ([46.251.119.176])
 by smtp.googlemail.com with ESMTPSA id l21sm12110481wmh.31.2021.08.29.19.45.08
 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128);
 Sun, 29 Aug 2021 19:45:09 -0700 (PDT)
Subject: Re: bug#50067: Context menus
To: Eli Zaretskii <eliz@HIDDEN>
References: <83sfz639lh.fsf@HIDDEN> <8735r6ppf0.fsf@HIDDEN>
 <83o89u37gh.fsf@HIDDEN> <87wnohx5zd.fsf@HIDDEN>
 <831r6p3lzc.fsf@HIDDEN> <87o89sh96g.fsf@HIDDEN>
 <837dgg1hdg.fsf@HIDDEN> <87mtpcf79p.fsf@HIDDEN>
 <83zgtcyp2k.fsf@HIDDEN> <E96971E5-818F-4FE6-B702-37F09EDBB073@HIDDEN>
 <YSDKlDe2TiP7G1Gw@HIDDEN> <56454B2B-0250-4BC6-BC26-E1C5579ACF49@HIDDEN>
 <83eeanyrm5.fsf@HIDDEN> <4BC1074D-DE75-4303-8385-B70BAACFCDA0@HIDDEN>
 <83czq7youc.fsf@HIDDEN> <32ef6b91-107c-d7e5-b103-0ff062bf8ebd@HIDDEN>
 <83y28twahy.fsf@HIDDEN> <7af845e0-1f19-61fc-65e0-b23fac3927aa@HIDDEN>
 <83v93wx5ny.fsf@HIDDEN> <cd1ab4b2-1eb2-1259-98ff-828f0a79bb39@HIDDEN>
 <83r1ekwfrd.fsf@HIDDEN> <871r6ki6aw.fsf@HIDDEN>
 <b4f6c1fb-f322-4a59-55aa-f60932b996c9@HIDDEN> <838s0otl6b.fsf@HIDDEN>
 <0273902a-1f93-c643-da26-ab314d6d2db4@HIDDEN> <8335qvs8re.fsf@HIDDEN>
From: Dmitry Gutov <dgutov@HIDDEN>
Message-ID: <fa0e47a2-fafb-0c3b-b693-be1acca58c34@HIDDEN>
Date: Mon, 30 Aug 2021 05:45:07 +0300
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101
 Thunderbird/78.11.0
MIME-Version: 1.0
In-Reply-To: <8335qvs8re.fsf@HIDDEN>
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Language: en-US
Content-Transfer-Encoding: 7bit
X-Spam-Score: 0.4 (/)
X-Debbugs-Envelope-To: 50067
Cc: alan@HIDDEN, mattiase@HIDDEN, juri@HIDDEN,
 homeros.misasa@HIDDEN, tkk@HIDDEN, larsi@HIDDEN,
 50067 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.6 (/)

On 27.08.2021 09:26, Eli Zaretskii wrote:
>> Cc: juri@HIDDEN, alan@HIDDEN, mattiase@HIDDEN,
>>   homeros.misasa@HIDDEN, tkk@HIDDEN, larsi@HIDDEN,
>>   50067 <at> debbugs.gnu.org
>> From: Dmitry Gutov <dgutov@HIDDEN>
>> Date: Fri, 27 Aug 2021 00:05:39 +0300
>>
>> I think I remember now why it didn't make sense to me to have this
>> behavior OOTB: I think the main goal of the user who calls
>> xref-find-definitions is, usually, to pick one definition they wanted to
>> visit. Which also means having the xref buffer dismissed at the end.
> 
> That's one use case.  Another use case is when the candidates are all
> related to some issue the user is working on, and therefore leaving
> the xref buffer displayed for a long time is what they want.

Fair enough.

>> With the patch under discussion we automatically jump to the first
>> location. We can even iterate through locations with
>> next-error/previous-error (M-g M-n/M-g M-p). But to close
>> (quit/kill/etc) the list of locations, you have to switch back to its
>> window and press 'q'. Didn't that look like a bother to you?
> 
> No.  In my case, I just never bother to dismiss the xref buffer.  The
> window showing it is a small one, and sooner or later the xref buffer
> gets replaced by *Help* or ChangeLog or one of the other buffers I
> display at the bottom of the frame.

I see.

This does not correspond to my usage and expectations, but, fingers 
crossed, this addition will satisfy the needs of other former users of 
'find-tag' as well.

>> Here's how it could look instead:
>>
>> 1. When you press M-., the first location is "shown", but not jumped to.
>> The focus remains on the Xref window, with point on its first item (the
>> arrow beside it is visible, like you wanted). Location is visible in the
>> other window, and we can either visit it and dismiss the Xref buffer
>> (with 'C-u RET'), simply visit it with 'RET', or look at the other
>> locations with 'n'/'p'.
> 
> This AFAIU corresponds to the situation where the user is not certain
> which of the candidates is the one he/she wants.  I don't see how it
> fundamentally differs from the original patch, since "M-g M-n" (or
> "C-x `", which is what I use) isn't less convenient than 'n' followed
> by "C-x o".  It might be more convenient to those who like to dismiss
> the xref buffer, but (a) I'm not one of them, and (b) one can dismiss
> it without going into it with "C-x 4 C-o".

All right. You still prefer the original patch, then?

>>>> 1. Does the new behavior work okay window management-wise (it does
>>>> occupy +1 window, after all)?
>>>
>>> Not sure I understand the question: we pop up an additional window
>>> when there are more than one candidate even without this option, so
>>> why do you say "+1 window"?  Maybe you had some recipe in mind that I
>>> didn't try?
>>
>> It's "+1 window" compared to how 'find-tag' worked/works, which I assume
>> is the target.
> 
> No, I think xref is actually an improvement in this department,
> because it shows the list of candidates instead of letting the user
> guess how many are there.

Cool.

>>>> 2. Should this setting also extend to other commands like
>>>> xref-find-references?
>>>
>>> Not necessarily.  Perhaps xref-auto-jump-to-first-definition should be
>>> tri-state, to allow users to request the same with
>>> xref-find-references as well?
>>
>> Sure. Or we can have two variables, especially if we end up cramming
>> different variations of behavior into them.
>>
>> We can do a lot of things. What would help, is better knowledge about
>> what people *want* to do.
> 
> If we don't want to take a guess, I'd suggest leaving the option as it
> is, affecting only xref-find-definitions, and extend it to other
> commands as user requests arrive.

All right.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#50067; Package emacs. Full text available.

Message received at 50067 <at> debbugs.gnu.org:


Received: (at 50067) by debbugs.gnu.org; 28 Aug 2021 19:17:24 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Aug 28 15:17:24 2021
Received: from localhost ([127.0.0.1]:55019 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1mK3pR-00068B-Hm
	for submit <at> debbugs.gnu.org; Sat, 28 Aug 2021 15:17:24 -0400
Received: from relay4-d.mail.gandi.net ([217.70.183.196]:57147)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <juri@HIDDEN>) id 1mK3pN-00067u-Kg
 for 50067 <at> debbugs.gnu.org; Sat, 28 Aug 2021 15:17:19 -0400
Received: (Authenticated sender: juri@HIDDEN)
 by relay4-d.mail.gandi.net (Postfix) with ESMTPSA id 15422E0004;
 Sat, 28 Aug 2021 19:17:08 +0000 (UTC)
From: Juri Linkov <juri@HIDDEN>
To: Naoya Yamashita <conao3@HIDDEN>
Subject: Re: bug#50067: Context menus
Organization: LINKOV.NET
References: <CAEPcJa=mGs-=jfLsB9B9gVUdCn4fGA=1n4NWbjea+k4vj3RGKQ@HIDDEN>
Date: Sat, 28 Aug 2021 21:50:15 +0300
In-Reply-To: <CAEPcJa=mGs-=jfLsB9B9gVUdCn4fGA=1n4NWbjea+k4vj3RGKQ@HIDDEN>
 (Naoya Yamashita's message of "Sat, 28 Aug 2021 18:08:39 +0900")
Message-ID: <87eeado13s.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (x86_64-pc-linux-gnu)
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="=-=-="
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: 50067
Cc: 50067 <at> debbugs.gnu.org, tkk@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

--=-=-=
Content-Type: text/plain

> Hi.  I'm one of the users of Emacs-jp.  Tak introduced us to this
> thread and it got me interested, I'm sending this Email.  This
> mail thread is huge and I haven't read all of it, so I'm sorry if
> I misread the context.
>
> I've created a context menu for ispell (referencing `context-menu-ffap`).
> You may find some inspiration from this.
>
>     (defun context-menu-ispell (menu)
>       "Ispell at point menu."
>       (when t ;; (ffap-guess-file-name-at-point)
>         (define-key menu [ispell-separator] menu-bar-separator)
>         (define-key menu [ispell-at-mouse]
>           '(menu-item "Check spelling of word" ispell-word
>                       :help "Check spelling of word under or before the cursor.")))
>       menu)

Thanks for the suggestion.  I think such menus should be added to their
respective packages.  context-menu-ispell could be added to ispell.el
(when flyspell is unavailable).

Then dictionary.el could provide own context menu too:


--=-=-=
Content-Type: text/x-diff
Content-Disposition: inline; filename=context-menu-dictionary.patch

diff --git a/lisp/net/dictionary.el b/lisp/net/dictionary.el
index f33cbaf112..7a84f9978f 100644
--- a/lisp/net/dictionary.el
+++ b/lisp/net/dictionary.el
@@ -1368,5 +1368,27 @@ global-dictionary-tooltip-mode
                     (if on #'dictionary-tooltip-track-mouse #'ignore))
     on))
 
+(defun dictionary-search-word-at-mouse (event)
+  (interactive "e")
+  (let ((word (save-window-excursion
+		(save-excursion
+		  (mouse-set-point event)
+		  (current-word)))))
+    (selected-window)
+    (dictionary-search word)))
+
+(defun context-menu-dictionary (menu)
+  "Dictionary word at point menu."
+  (save-excursion
+    (mouse-set-point last-input-event)
+    (when (thing-at-point 'word)
+      (define-key menu [dictionary-separator] menu-bar-separator)
+      (define-key menu [dictionary-search-word-at-mouse]
+        '(menu-item "Dictionary Search" dictionary-search-word-at-mouse
+                    :help "Search the word at mouse click in dictionary"))))
+  menu)
+
+(add-hook 'context-menu-functions 'context-menu-dictionary 15)
+
 (provide 'dictionary)
 ;;; dictionary.el ends here

--=-=-=--




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#50067; Package emacs. Full text available.

Message received at 50067 <at> debbugs.gnu.org:


Received: (at 50067) by debbugs.gnu.org; 28 Aug 2021 09:08:35 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Aug 28 05:08:35 2021
Received: from localhost ([127.0.0.1]:53381 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1mJuKI-0000PR-UV
	for submit <at> debbugs.gnu.org; Sat, 28 Aug 2021 05:08:35 -0400
Received: from mail-pg1-f182.google.com ([209.85.215.182]:36418)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <conao3@HIDDEN>) id 1mJuKF-0000PC-9R
 for 50067 <at> debbugs.gnu.org; Sat, 28 Aug 2021 05:08:33 -0400
Received: by mail-pg1-f182.google.com with SMTP id t1so8307915pgv.3
 for <50067 <at> debbugs.gnu.org>; Sat, 28 Aug 2021 02:08:31 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
 h=mime-version:from:date:message-id:subject:to:cc;
 bh=QWpnY35pZWL4qboAh0XN1Crpwawe1IZRHUob4ypBcWQ=;
 b=VN/YAQZ6RE5p2pq608EC4VsWvaq+vlFzzRy2WqiED948hWHktvzUxm0pIzspuw26lK
 pp7nCqlqYFA1ZLvwRmP4pycOOVGLagMSZCSnqMvI0mXVtCK0K6kgD23+iZsy0hDlyP7Z
 +LkUfA4MQy9/X4zx1EiERfB03gjKguVlbx2RwUXMy8z6pk+WcMzWPJIkmSpVUpMHQsgf
 NHWNSMIFm58vCpv2baHlNBf4FviCpS97bPL0e5KASJEKiOlxWYt3Wm5K6doLEhNtbIKw
 uikMIX56XlNP2n77j7NhSd8LxbmLB8pECzbzetdb9M9KshdwUZ3+qpHdMexvyPsSisxu
 ypYA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:mime-version:from:date:message-id:subject:to:cc;
 bh=QWpnY35pZWL4qboAh0XN1Crpwawe1IZRHUob4ypBcWQ=;
 b=qXU89Z6zyn8MZtCoMRRS33HT68gMUzuth/ETIJEFzTqi5wf0g0cFLrJFvY8oJq5ZLs
 e+eW4i8F3Yg8x72V5iZKKygzgDk2lcm12TEubVB7UxE7E0k8apeXaudEX5QVqg5H7BvB
 5/52x5BdnBXqmxKRzXHL3uiWpD4Oh6L3LVynHjw7CdDVkhfkgMhlB58rsNmZi84cdOxI
 uZtPNPbBQKks9FSYtvE0O5P87vn7rjUmh6I1hlXyMNkogPn4Hms6PAAdpPHjEiSGKGCt
 rul+G5SoqJGI9Kg5gZH9kyd35z1dNcuBW/0vdARX4AIoc3XzgN7q+wF/PDY/ueAzKr40
 rROw==
X-Gm-Message-State: AOAM531YQQ1Ue1hgQl/yVw4JQLWrcZMXNicf4R/w1eLuM3V5FqeC0k1G
 wdooGOwiDOdhm5HR4GmcZXDsM+olcLgkVk84+Sc=
X-Google-Smtp-Source: ABdhPJzAI4+Er85jHlH+A/6nlqlADrEiN+MYsRCJZXUq++4a2mrwngLkQL9tHcj/C3f0wJhpk3LczdDfOzqy6AnN7Qs=
X-Received: by 2002:a62:1593:0:b0:3f1:d6c7:9cca with SMTP id
 141-20020a621593000000b003f1d6c79ccamr13169304pfv.39.1630141705227; Sat, 28
 Aug 2021 02:08:25 -0700 (PDT)
MIME-Version: 1.0
From: Naoya Yamashita <conao3@HIDDEN>
Date: Sat, 28 Aug 2021 18:08:39 +0900
Message-ID: <CAEPcJa=mGs-=jfLsB9B9gVUdCn4fGA=1n4NWbjea+k4vj3RGKQ@HIDDEN>
Subject: Re: bug#50067: Context menus
To: tkk@HIDDEN
Content-Type: multipart/alternative; boundary="0000000000004610e605ca9af1eb"
X-Spam-Score: 0.2 (/)
X-Debbugs-Envelope-To: 50067
Cc: 50067 <at> debbugs.gnu.org, juri@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.8 (/)

--0000000000004610e605ca9af1eb
Content-Type: text/plain; charset="UTF-8"

Hi.  I'm one of the users of Emacs-jp.  Tak introduced us to this
thread and it got me interested, I'm sending this Email.  This
mail thread is huge and I haven't read all of it, so I'm sorry if
I misread the context.

I've created a context menu for ispell (referencing `context-menu-ffap`).
You may find some inspiration from this.

    (defun context-menu-ispell (menu)
      "Ispell at point menu."
      (when t ;; (ffap-guess-file-name-at-point)
        (define-key menu [ispell-separator] menu-bar-separator)
        (define-key menu [ispell-at-mouse]
          '(menu-item "Check spelling of word" ispell-word
                      :help "Check spelling of word under or before the
cursor.")))
      menu)

Regards,
Naoya.

--0000000000004610e605ca9af1eb
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr">Hi.=C2=A0 I&#39;m one of the users of Emacs-jp.=C2=A0 Tak =
introduced us to this<br>thread and it got me interested, I&#39;m sending t=
his Email.=C2=A0 This<br>mail thread is huge and I haven&#39;t read all of =
it, so I&#39;m sorry if<br>I misread the context.<br><br>I&#39;ve created a=
 context menu for ispell (referencing `context-menu-ffap`).<br>You may find=
 some inspiration from this.<br><br>=C2=A0 =C2=A0 (defun context-menu-ispel=
l (menu)<br>=C2=A0 =C2=A0 =C2=A0 &quot;Ispell at point menu.&quot;<br>=C2=
=A0 =C2=A0 =C2=A0 (when t ;; (ffap-guess-file-name-at-point)<br>=C2=A0 =C2=
=A0 =C2=A0 =C2=A0 (define-key menu [ispell-separator] menu-bar-separator)<b=
r>=C2=A0 =C2=A0 =C2=A0 =C2=A0 (define-key menu [ispell-at-mouse]<br>=C2=A0 =
=C2=A0 =C2=A0 =C2=A0 =C2=A0 &#39;(menu-item &quot;Check spelling of word&qu=
ot; ispell-word<br>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =
=C2=A0 =C2=A0 =C2=A0 :help &quot;Check spelling of word under or before the=
 cursor.&quot;)))<br>=C2=A0 =C2=A0 =C2=A0 menu)<div><br></div><div>Regards,=
<br></div><div>Naoya.</div><div><br></div></div>

--0000000000004610e605ca9af1eb--




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#50067; Package emacs. Full text available.

Message received at 50067 <at> debbugs.gnu.org:


Received: (at 50067) by debbugs.gnu.org; 28 Aug 2021 05:18:39 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Aug 28 01:18:38 2021
Received: from localhost ([127.0.0.1]:53272 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1mJqjm-0007FR-PX
	for submit <at> debbugs.gnu.org; Sat, 28 Aug 2021 01:18:38 -0400
Received: from mail-pf1-f178.google.com ([209.85.210.178]:39534)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <homeros.misasa@HIDDEN>) id 1mJqjh-0007F1-UU
 for 50067 <at> debbugs.gnu.org; Sat, 28 Aug 2021 01:18:38 -0400
Received: by mail-pf1-f178.google.com with SMTP id e16so7105850pfc.6
 for <50067 <at> debbugs.gnu.org>; Fri, 27 Aug 2021 22:18:33 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
 h=from:to:cc:cc:subject:references:date:in-reply-to:message-id
 :user-agent:mime-version;
 bh=Mrw5JlR4T4mPpDGBaYfnaygIzag2oqcqvOstwdCMR8M=;
 b=bVfsbpMYkJul/wrIbcHYb5oVAsFaDtWKpdXBNdcvrWww6l+eAvFL6u6AN9tjrlYNcD
 IZq761wG5BzPPkcgErCvO020gVLfna1KL1xFV6BrcpbWIH6t8sl6tLbmgpNEPUe6WjO4
 FG2tW7xL/yNtwCD9xC6L9hKHPYQB8yFFOvOzvL8xXfLSlOPFMVBEyyPFc72j7+1RPSpc
 YyZFaZU47cGXsUl1CD6r92Efyb8Gq+8Lb6o71KFGi9CX8/2Mmr8uO5FI+Y6WNkX8S2k2
 9vhyXmN1LFgOWc88lL5v6MQUPDH0Dt8RImncEpQK90QsF1/0h0qcCKlyP+JcCnXrt67u
 eRwg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:from:to:cc:cc:subject:references:date
 :in-reply-to:message-id:user-agent:mime-version;
 bh=Mrw5JlR4T4mPpDGBaYfnaygIzag2oqcqvOstwdCMR8M=;
 b=AobpgSKHy2+uromX9oc/btP9BaqnwFGADkD0R18v0iTjkQqp1zWrCHyc4N0MV5cIiS
 w8bAhZR/60fb830SZrBtuGKt/kDohbnMeGZ+C9rRUKGksl4W/SgiNGHhyNXUeO1JMvii
 W4owae/HEYYz53msy1aLNzW75cCwMb7wEXN9E7vLwyAATzoAu8rcOEUb8aU1WYp+q8gh
 n9270GAefZ7VOinqzanE2GeP/6ioMS37zNR0fcfMK+Q5Vad2w9t2Wf6ThPNPyD6KSx/7
 tC7wqgD5JeHHXVu5+XynfE2bTTbxMzl2KNdeu5k4HU2WErFoQpqrGwcwljqM4sUxZbai
 pzOw==
X-Gm-Message-State: AOAM533So0XWdpEPx3dlecaGKiWEUyDN87QHrVQqqsyj9Rxk3sPatfmF
 L9ezy2a51zBQD5QJHY437MscBRvKmtQ=
X-Google-Smtp-Source: ABdhPJzd49QV4nmcA5Xu6Soz3nWYSICLQeRaeGowLDsJDUJJguXkbT216gSmjIE0WnptKlY3DNw0/w==
X-Received: by 2002:a63:a4a:: with SMTP id z10mr10824549pgk.329.1630127908022; 
 Fri, 27 Aug 2021 22:18:28 -0700 (PDT)
Received: from DreamMini2019.local ([150.46.201.82])
 by smtp.gmail.com with ESMTPSA id o2sm8861073pgu.76.2021.08.27.22.18.26
 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
 Fri, 27 Aug 2021 22:18:27 -0700 (PDT)
From: Tak Kunihiro <homeros.misasa@HIDDEN>
X-Google-Original-From: Tak Kunihiro <tkk@HIDDEN>
To: Juri Linkov <juri@HIDDEN>
Subject: Re: bug#50067: Context menus
References: <87wnociu41.fsf@HIDDEN>
 <20210824.191259.1858282353329289005.tkk@HIDDEN>
 <877dgalpsr.fsf@HIDDEN>
 <20210825.084329.2103284747365062473.tkk@HIDDEN>
 <87v93ts9jd.fsf@HIDDEN> <87a6l47mxr.fsf@HIDDEN>
 <87h7fb76c4.fsf@HIDDEN>
Date: Sat, 28 Aug 2021 14:18:24 +0900
In-Reply-To: <87h7fb76c4.fsf@HIDDEN> (Juri Linkov's message of "Fri, 
 27 Aug 2021 09:24:43 +0300")
Message-ID: <m1r1eep2ov.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (darwin)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: 50067
Cc: 50067 <at> debbugs.gnu.org, tkk@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

>> I invite you or anyone else to refactor 'flyspell-correct-word' and
>> related functions to return a keymap menu where every menu item
>> is bound to a function that calls flyspell-do-correct with an argument
>> that is a correct word.
>
> Any help is appreciated to create a menu keymap from misspelled words.

OK.  I understand the task.  I will try.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#50067; Package emacs. Full text available.

Message received at 50067 <at> debbugs.gnu.org:


Received: (at 50067) by debbugs.gnu.org; 27 Aug 2021 06:27:25 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Aug 27 02:27:25 2021
Received: from localhost ([127.0.0.1]:51103 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1mJVKh-00048v-5C
	for submit <at> debbugs.gnu.org; Fri, 27 Aug 2021 02:27:25 -0400
Received: from eggs.gnu.org ([209.51.188.92]:56662)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1mJVKf-00048i-8I
 for 50067 <at> debbugs.gnu.org; Fri, 27 Aug 2021 02:27:17 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e]:40358)
 by eggs.gnu.org with esmtp (Exim 4.90_1)
 (envelope-from <eliz@HIDDEN>)
 id 1mJVKU-0004BH-Hx; Fri, 27 Aug 2021 02:27:06 -0400
Received: from 84.94.185.95.cable.012.net.il ([84.94.185.95]:1032
 helo=home-c4e4a596f7)
 by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <eliz@HIDDEN>)
 id 1mJVKT-0003iK-3Q; Fri, 27 Aug 2021 02:27:06 -0400
Date: Fri, 27 Aug 2021 09:26:45 +0300
Message-Id: <8335qvs8re.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Dmitry Gutov <dgutov@HIDDEN>
In-Reply-To: <0273902a-1f93-c643-da26-ab314d6d2db4@HIDDEN> (message from
 Dmitry Gutov on Fri, 27 Aug 2021 00:05:39 +0300)
Subject: Re: bug#50067: Context menus
References: <83sfz639lh.fsf@HIDDEN> <8735r6ppf0.fsf@HIDDEN>
 <83o89u37gh.fsf@HIDDEN> <87wnohx5zd.fsf@HIDDEN>
 <831r6p3lzc.fsf@HIDDEN> <87o89sh96g.fsf@HIDDEN>
 <837dgg1hdg.fsf@HIDDEN> <87mtpcf79p.fsf@HIDDEN>
 <83zgtcyp2k.fsf@HIDDEN> <E96971E5-818F-4FE6-B702-37F09EDBB073@HIDDEN>
 <YSDKlDe2TiP7G1Gw@HIDDEN> <56454B2B-0250-4BC6-BC26-E1C5579ACF49@HIDDEN>
 <83eeanyrm5.fsf@HIDDEN> <4BC1074D-DE75-4303-8385-B70BAACFCDA0@HIDDEN>
 <83czq7youc.fsf@HIDDEN> <32ef6b91-107c-d7e5-b103-0ff062bf8ebd@HIDDEN>
 <83y28twahy.fsf@HIDDEN> <7af845e0-1f19-61fc-65e0-b23fac3927aa@HIDDEN>
 <83v93wx5ny.fsf@HIDDEN> <cd1ab4b2-1eb2-1259-98ff-828f0a79bb39@HIDDEN>
 <83r1ekwfrd.fsf@HIDDEN> <871r6ki6aw.fsf@HIDDEN>
 <b4f6c1fb-f322-4a59-55aa-f60932b996c9@HIDDEN> <838s0otl6b.fsf@HIDDEN>
 <0273902a-1f93-c643-da26-ab314d6d2db4@HIDDEN>
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 50067
Cc: alan@HIDDEN, mattiase@HIDDEN, juri@HIDDEN,
 homeros.misasa@HIDDEN, tkk@HIDDEN, larsi@HIDDEN,
 50067 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

> Cc: juri@HIDDEN, alan@HIDDEN, mattiase@HIDDEN,
>  homeros.misasa@HIDDEN, tkk@HIDDEN, larsi@HIDDEN,
>  50067 <at> debbugs.gnu.org
> From: Dmitry Gutov <dgutov@HIDDEN>
> Date: Fri, 27 Aug 2021 00:05:39 +0300
> 
> I think I remember now why it didn't make sense to me to have this 
> behavior OOTB: I think the main goal of the user who calls 
> xref-find-definitions is, usually, to pick one definition they wanted to 
> visit. Which also means having the xref buffer dismissed at the end.

That's one use case.  Another use case is when the candidates are all
related to some issue the user is working on, and therefore leaving
the xref buffer displayed for a long time is what they want.

> With the patch under discussion we automatically jump to the first 
> location. We can even iterate through locations with 
> next-error/previous-error (M-g M-n/M-g M-p). But to close 
> (quit/kill/etc) the list of locations, you have to switch back to its 
> window and press 'q'. Didn't that look like a bother to you?

No.  In my case, I just never bother to dismiss the xref buffer.  The
window showing it is a small one, and sooner or later the xref buffer
gets replaced by *Help* or ChangeLog or one of the other buffers I
display at the bottom of the frame.

> Here's how it could look instead:
> 
> 1. When you press M-., the first location is "shown", but not jumped to. 
> The focus remains on the Xref window, with point on its first item (the 
> arrow beside it is visible, like you wanted). Location is visible in the 
> other window, and we can either visit it and dismiss the Xref buffer 
> (with 'C-u RET'), simply visit it with 'RET', or look at the other 
> locations with 'n'/'p'.

This AFAIU corresponds to the situation where the user is not certain
which of the candidates is the one he/she wants.  I don't see how it
fundamentally differs from the original patch, since "M-g M-n" (or
"C-x `", which is what I use) isn't less convenient than 'n' followed
by "C-x o".  It might be more convenient to those who like to dismiss
the xref buffer, but (a) I'm not one of them, and (b) one can dismiss
it without going into it with "C-x 4 C-o".

> And you could also use a "transient" show-definitions-function like:
> 
> (setq xref-show-definitions-function
>        #'xref-show-definitions-buffer-at-bottom)
> 
> Then you'd only need to press RET in the results buffer to jump and 
> dismiss the results buffer.

Do a lot of people really like to dismiss the xref buffer?

In any case, I think questions about this aspect are better answered
by someone who does like to dismiss the buffer, because the issue
simply doesn't bother me enough to give you any useful input.

> 2. Simply have point move to the first location in the list (rather than 
> remain on the group name). From there, the user can press 'C-o' to show 
> the location without visiting, or 'RET', or 'C-u RET' like described 
> above. I understand this does not fit your prior workflows, but it does 
> require the least number of button presses in the scenario "go to the 
> first location and dismiss the Xref buffer", especially in combination 
> with the (setq xref-show-definitions-function ...) form above.

That's just a minor change in what we have now.  I don't object to
such a change, not even by default, but it isn't what we were
discussing until now.

> >> 1. Does the new behavior work okay window management-wise (it does
> >> occupy +1 window, after all)?
> > 
> > Not sure I understand the question: we pop up an additional window
> > when there are more than one candidate even without this option, so
> > why do you say "+1 window"?  Maybe you had some recipe in mind that I
> > didn't try?
> 
> It's "+1 window" compared to how 'find-tag' worked/works, which I assume 
> is the target.

No, I think xref is actually an improvement in this department,
because it shows the list of candidates instead of letting the user
guess how many are there.

> >> 2. Should this setting also extend to other commands like
> >> xref-find-references?
> > 
> > Not necessarily.  Perhaps xref-auto-jump-to-first-definition should be
> > tri-state, to allow users to request the same with
> > xref-find-references as well?
> 
> Sure. Or we can have two variables, especially if we end up cramming 
> different variations of behavior into them.
> 
> We can do a lot of things. What would help, is better knowledge about 
> what people *want* to do.

If we don't want to take a guess, I'd suggest leaving the option as it
is, affecting only xref-find-definitions, and extend it to other
commands as user requests arrive.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#50067; Package emacs. Full text available.

Message received at 50067 <at> debbugs.gnu.org:


Received: (at 50067) by debbugs.gnu.org; 27 Aug 2021 06:25:29 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Aug 27 02:25:29 2021
Received: from localhost ([127.0.0.1]:51099 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1mJVIu-00046C-Rt
	for submit <at> debbugs.gnu.org; Fri, 27 Aug 2021 02:25:28 -0400
Received: from relay2-d.mail.gandi.net ([217.70.183.194]:42885)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <juri@HIDDEN>) id 1mJVIs-00045z-II
 for 50067 <at> debbugs.gnu.org; Fri, 27 Aug 2021 02:25:27 -0400
Received: (Authenticated sender: juri@HIDDEN)
 by relay2-d.mail.gandi.net (Postfix) with ESMTPSA id A6C0640008;
 Fri, 27 Aug 2021 06:25:18 +0000 (UTC)
From: Juri Linkov <juri@HIDDEN>
To: Tak Kunihiro <tkk@HIDDEN>
Subject: Re: bug#50067: Context menus
Organization: LINKOV.NET
References: <87wnociu41.fsf@HIDDEN>
 <20210824.191259.1858282353329289005.tkk@HIDDEN>
 <877dgalpsr.fsf@HIDDEN>
 <20210825.084329.2103284747365062473.tkk@HIDDEN>
 <87v93ts9jd.fsf@HIDDEN> <87a6l47mxr.fsf@HIDDEN>
Date: Fri, 27 Aug 2021 09:24:43 +0300
In-Reply-To: <87a6l47mxr.fsf@HIDDEN> (Juri Linkov's message of "Thu, 26
 Aug 2021 09:13:10 +0300")
Message-ID: <87h7fb76c4.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (x86_64-pc-linux-gnu)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: 50067
Cc: 50067 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

> Here is the first step that adds support for overlay-local context-menu,
> and removes the recently added 'flyspell-use-mouse-3-for-menu'.
> But 'flyspell-context-menu' still returns 'flyspell-correct-word'.

Now pushed.

> I invite you or anyone else to refactor 'flyspell-correct-word' and
> related functions to return a keymap menu where every menu item
> is bound to a function that calls flyspell-do-correct with an argument
> that is a correct word.

Any help is appreciated to create a menu keymap from misspelled words.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#50067; Package emacs. Full text available.

Message received at 50067 <at> debbugs.gnu.org:


Received: (at 50067) by debbugs.gnu.org; 27 Aug 2021 06:24:04 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Aug 27 02:24:04 2021
Received: from localhost ([127.0.0.1]:51092 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1mJVHK-000435-4m
	for submit <at> debbugs.gnu.org; Fri, 27 Aug 2021 02:24:04 -0400
Received: from relay11.mail.gandi.net ([217.70.178.231]:57785)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <juri@HIDDEN>) id 1mJVHH-00042T-O6
 for 50067 <at> debbugs.gnu.org; Fri, 27 Aug 2021 02:23:48 -0400
Received: (Authenticated sender: juri@HIDDEN)
 by relay11.mail.gandi.net (Postfix) with ESMTPSA id B2C06100004
 for <50067 <at> debbugs.gnu.org>; Fri, 27 Aug 2021 06:23:40 +0000 (UTC)
From: Juri Linkov <juri@HIDDEN>
To: 50067 <at> debbugs.gnu.org
Subject: Re: bug#50067: Context menus
Organization: LINKOV.NET
References: <83sfz639lh.fsf@HIDDEN> <837dgg1hdg.fsf@HIDDEN>
 <87mtpcf79p.fsf@HIDDEN> <83zgtcyp2k.fsf@HIDDEN>
 <E96971E5-818F-4FE6-B702-37F09EDBB073@HIDDEN>
 <YSDKlDe2TiP7G1Gw@HIDDEN>
 <56454B2B-0250-4BC6-BC26-E1C5579ACF49@HIDDEN>
 <83eeanyrm5.fsf@HIDDEN>
 <4BC1074D-DE75-4303-8385-B70BAACFCDA0@HIDDEN>
 <83czq7youc.fsf@HIDDEN>
 <32ef6b91-107c-d7e5-b103-0ff062bf8ebd@HIDDEN>
 <83y28twahy.fsf@HIDDEN>
 <7af845e0-1f19-61fc-65e0-b23fac3927aa@HIDDEN>
 <83v93wx5ny.fsf@HIDDEN>
 <cd1ab4b2-1eb2-1259-98ff-828f0a79bb39@HIDDEN>
 <83r1ekwfrd.fsf@HIDDEN> <871r6ki6aw.fsf@HIDDEN>
 <b4f6c1fb-f322-4a59-55aa-f60932b996c9@HIDDEN>
 <838s0otl6b.fsf@HIDDEN>
 <0273902a-1f93-c643-da26-ab314d6d2db4@HIDDEN>
 <9ae8b63d-75df-8ea2-fd90-f932fea39afb@HIDDEN>
Date: Fri, 27 Aug 2021 09:13:42 +0300
In-Reply-To: <9ae8b63d-75df-8ea2-fd90-f932fea39afb@HIDDEN> (Dmitry Gutov's
 message of "Fri, 27 Aug 2021 00:07:37 +0300")
Message-ID: <87ilzra2rd.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (x86_64-pc-linux-gnu)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: 50067
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

I clicked mouse-3 on the Flymake mode-line indicator expecting a context menu,
but mouse-3 abruptly closed the current buffer.  This can be fixed by such patch:

diff --git a/lisp/progmodes/flymake.el b/lisp/progmodes/flymake.el
index 77a807f21a..cc12fce04a 100644
--- a/lisp/progmodes/flymake.el
+++ b/lisp/progmodes/flymake.el
@@ -1256,6 +1256,8 @@ flymake--mode-line-title
     ,(let ((map (make-sparse-keymap)))
        (define-key map [mode-line down-mouse-1]
          flymake-menu)
+       (define-key map [mode-line down-mouse-3]
+         flymake-menu)
        (define-key map [mode-line mouse-2]
          (lambda ()
            (interactive)




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#50067; Package emacs. Full text available.

Message received at 50067 <at> debbugs.gnu.org:


Received: (at 50067) by debbugs.gnu.org; 26 Aug 2021 21:07:48 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Aug 26 17:07:47 2021
Received: from localhost ([127.0.0.1]:50625 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1mJMbD-0000ac-Q9
	for submit <at> debbugs.gnu.org; Thu, 26 Aug 2021 17:07:47 -0400
Received: from mail-wr1-f44.google.com ([209.85.221.44]:43542)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <raaahh@HIDDEN>) id 1mJMbC-0000aP-BR
 for 50067 <at> debbugs.gnu.org; Thu, 26 Aug 2021 17:07:46 -0400
Received: by mail-wr1-f44.google.com with SMTP id b6so7078348wrh.10
 for <50067 <at> debbugs.gnu.org>; Thu, 26 Aug 2021 14:07:46 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
 h=sender:subject:from:to:cc:references:message-id:date:user-agent
 :mime-version:in-reply-to:content-language:content-transfer-encoding;
 bh=eFOq6NUfJ3jD0BAF55kDXcGHtwo+XTURdVX8Y5PVjDU=;
 b=k8lE0zga323eIQtiyn0ZkDF/O7Inr6T1wUtIH0YkRZG2ApiEeJX7m9j6SzOR5SmKR3
 YYdA0192pDVJJoDXAN6/ke8ikOfEa5jxCJQbTU2zWJZtxlAuVJ3+On7+GdHsqQHfyl9I
 uiBB6o30Wk+2f6uHOCK8bDzc67HwfvCJyoQcphkDY4U9mu8zkwUYVcofmZgKKMlTIVAL
 cDcTSabZrHt8b5BJQ49fe3BvCfYddiabtukUIaW/C+/92+hb5nQYnTO3M6t4UZAaHjPt
 V5YkeItWBK5nI1+1MwBpY3ufWien4j9BzGd15JLhXVJ76jotSwMeAn2EaMZ6lmDDlC80
 LaUQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:sender:subject:from:to:cc:references:message-id
 :date:user-agent:mime-version:in-reply-to:content-language
 :content-transfer-encoding;
 bh=eFOq6NUfJ3jD0BAF55kDXcGHtwo+XTURdVX8Y5PVjDU=;
 b=oS7X9kxvzucAtp6Kf2gyyJmHP0HMHAzADU7tYFiF/u3nocPSCDXsZ3QLhyr5VQvqGG
 dLkoOV+EjT250tvA2WFm83dm2m7Bn6sEx8E8WlvqC3wSGiHBbraRrm28WPgZnmDSN9u/
 HWWkI/BfBnlwfOJRu2Mq1fdNkt1cM/gmJl7Z8si5WE9dGbjnO0dYhjWU67jbWgma/hBX
 bXd4o8+yGCo/h3UBBsEcaJHK5pJKZ2OKqLrnbQb3cEos4gA8NXkM87aYA49bKXG9uG1s
 zBgYym3pmv2rLaZ3S1yzZghDsGmF9D2UD68SoPVfeGbel/xn3ut42YtSrmPe7gaA5Ths
 pzZQ==
X-Gm-Message-State: AOAM533/Bkv8Kg2cmoTgywdHpSySbQXbrFwEiWHdTJK2gBB74gqBewBJ
 fq8eykJsUKQ7jv2Wvm0K/qjd1y+/O1k=
X-Google-Smtp-Source: ABdhPJwU9oa8N4fgW5mFIrksH+A2wUXCvf3rVykmhRpCOYs4eD+cHWmNCSoIYGDcH3M0Uk1VVX+qZw==
X-Received: by 2002:adf:ea4f:: with SMTP id j15mr6209127wrn.421.1630012060624; 
 Thu, 26 Aug 2021 14:07:40 -0700 (PDT)
Received: from [192.168.0.6] ([46.251.119.176])
 by smtp.googlemail.com with ESMTPSA id l2sm10549762wmi.1.2021.08.26.14.07.38
 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128);
 Thu, 26 Aug 2021 14:07:40 -0700 (PDT)
Subject: Re: bug#50067: Context menus
From: Dmitry Gutov <dgutov@HIDDEN>
To: Eli Zaretskii <eliz@HIDDEN>
References: <83sfz639lh.fsf@HIDDEN> <8735r6ppf0.fsf@HIDDEN>
 <83o89u37gh.fsf@HIDDEN> <87wnohx5zd.fsf@HIDDEN>
 <831r6p3lzc.fsf@HIDDEN> <87o89sh96g.fsf@HIDDEN>
 <837dgg1hdg.fsf@HIDDEN> <87mtpcf79p.fsf@HIDDEN>
 <83zgtcyp2k.fsf@HIDDEN> <E96971E5-818F-4FE6-B702-37F09EDBB073@HIDDEN>
 <YSDKlDe2TiP7G1Gw@HIDDEN> <56454B2B-0250-4BC6-BC26-E1C5579ACF49@HIDDEN>
 <83eeanyrm5.fsf@HIDDEN> <4BC1074D-DE75-4303-8385-B70BAACFCDA0@HIDDEN>
 <83czq7youc.fsf@HIDDEN> <32ef6b91-107c-d7e5-b103-0ff062bf8ebd@HIDDEN>
 <83y28twahy.fsf@HIDDEN> <7af845e0-1f19-61fc-65e0-b23fac3927aa@HIDDEN>
 <83v93wx5ny.fsf@HIDDEN> <cd1ab4b2-1eb2-1259-98ff-828f0a79bb39@HIDDEN>
 <83r1ekwfrd.fsf@HIDDEN> <871r6ki6aw.fsf@HIDDEN>
 <b4f6c1fb-f322-4a59-55aa-f60932b996c9@HIDDEN> <838s0otl6b.fsf@HIDDEN>
 <0273902a-1f93-c643-da26-ab314d6d2db4@HIDDEN>
Message-ID: <9ae8b63d-75df-8ea2-fd90-f932fea39afb@HIDDEN>
Date: Fri, 27 Aug 2021 00:07:37 +0300
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101
 Thunderbird/78.11.0
MIME-Version: 1.0
In-Reply-To: <0273902a-1f93-c643-da26-ab314d6d2db4@HIDDEN>
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Language: en-US
Content-Transfer-Encoding: 8bit
X-Spam-Score: 0.4 (/)
X-Debbugs-Envelope-To: 50067
Cc: alan@HIDDEN, mattiase@HIDDEN, juri@HIDDEN,
 homeros.misasa@HIDDEN, tkk@HIDDEN, larsi@HIDDEN,
 50067 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.6 (/)

On 27.08.2021 00:05, Dmitry Gutov wrote:
> +  (xref-next-line-no-show)
> +  (xref-goto-xref))
> 
> for
> 
> +  (xref-next-line)

Sorry, missed extra paren:

+  (xref-next-line))




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#50067; Package emacs. Full text available.

Message received at 50067 <at> debbugs.gnu.org:


Received: (at 50067) by debbugs.gnu.org; 26 Aug 2021 21:05:55 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Aug 26 17:05:55 2021
Received: from localhost ([127.0.0.1]:50618 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1mJMZJ-0000XS-OS
	for submit <at> debbugs.gnu.org; Thu, 26 Aug 2021 17:05:54 -0400
Received: from mail-wm1-f49.google.com ([209.85.128.49]:43663)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <raaahh@HIDDEN>) id 1mJMZH-0000XD-UI
 for 50067 <at> debbugs.gnu.org; Thu, 26 Aug 2021 17:05:48 -0400
Received: by mail-wm1-f49.google.com with SMTP id
 o39-20020a05600c512700b002e74638b567so3008916wms.2
 for <50067 <at> debbugs.gnu.org>; Thu, 26 Aug 2021 14:05:47 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
 h=sender:subject:to:cc:references:from:message-id:date:user-agent
 :mime-version:in-reply-to:content-language:content-transfer-encoding;
 bh=ZoBHAjvXHQYO9xcrFSPDdqr2rcvjdgUe/xmPs2/eurI=;
 b=L5pIx1N4xOnnlgra58YXFEUrETN8XUcRCV5oNtKcU6GSRelt1LpzaTS6uKpwrYvg9l
 G06m4p3z6AxHJ4WUI6Yr2QEIpKz7dzm5GB+WWFeXQQYN5CslurBq1rYYKB8g3RCEFhKU
 JxxugSGqberwK1hDYeWaJIYtCPQmYEoc7nFL1R+pCaZXKEglzKB8jAr7tV9DWlAGV0Iq
 uSLcL6nwgFOGTLKXwAM2E1IzXjIovd0djGtrTUqWvti357ooMdprQgjbtVmpn7abpidB
 jqzT0N0Ga2uZxrQWPCKeJtA9MYyb6lwr1pfTq5oYRVnv53svxroS2WBjjsrFjRSf1ddQ
 dBdw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:sender:subject:to:cc:references:from:message-id
 :date:user-agent:mime-version:in-reply-to:content-language
 :content-transfer-encoding;
 bh=ZoBHAjvXHQYO9xcrFSPDdqr2rcvjdgUe/xmPs2/eurI=;
 b=EGZLF1r0MgAk+1OU2CTC4pb01tSIHHiwnj5yORR/xCRjumrYkD9CrGW6zYMTx7cL7E
 MQIS7MUxrnXBbU8VwPenspf+LqQpK/PPEevtYl9DSgl8CZSfH62g5bgbKuBpq8T51qmz
 RBSfC6QMybxhnQfipggUDjEdVoCySR/p2LlZLwY8STOES1u/Gr3TxFLbWnc0drHDpoVb
 wp41Zq5tTl1WDczdybrc+e8AYRg1SP5kicuvkpBq8tudRCrusCgqpOWGAcHGU1LECSQH
 DQuo+kx8gfyHgCiAy2DXDdUuixJg32VQlJAl6MyX+sYijfJ1vuaMgi6kEAoGR5am0N1z
 kiEg==
X-Gm-Message-State: AOAM531bi3ZbHvLp62Fmi6ZOvsXmIJFtoVKlbqWoTGALJhiLZAVOW/bg
 AS1safoyA5Gx9Oo9goJeVlXLsqr0MWk=
X-Google-Smtp-Source: ABdhPJycwaPAf2u7LXvF/XwRru+dKQZmeKQXg3YO8JmFMeVmhO7zt26cFYeAmGJgIHTAcg/SsAZVRQ==
X-Received: by 2002:a7b:cc07:: with SMTP id f7mr7961369wmh.145.1630011942059; 
 Thu, 26 Aug 2021 14:05:42 -0700 (PDT)
Received: from [192.168.0.6] ([46.251.119.176])
 by smtp.googlemail.com with ESMTPSA id s17sm9490625wmj.12.2021.08.26.14.05.40
 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128);
 Thu, 26 Aug 2021 14:05:41 -0700 (PDT)
Subject: Re: bug#50067: Context menus
To: Eli Zaretskii <eliz@HIDDEN>
References: <83sfz639lh.fsf@HIDDEN> <8735r6ppf0.fsf@HIDDEN>
 <83o89u37gh.fsf@HIDDEN> <87wnohx5zd.fsf@HIDDEN>
 <831r6p3lzc.fsf@HIDDEN> <87o89sh96g.fsf@HIDDEN>
 <837dgg1hdg.fsf@HIDDEN> <87mtpcf79p.fsf@HIDDEN>
 <83zgtcyp2k.fsf@HIDDEN> <E96971E5-818F-4FE6-B702-37F09EDBB073@HIDDEN>
 <YSDKlDe2TiP7G1Gw@HIDDEN> <56454B2B-0250-4BC6-BC26-E1C5579ACF49@HIDDEN>
 <83eeanyrm5.fsf@HIDDEN> <4BC1074D-DE75-4303-8385-B70BAACFCDA0@HIDDEN>
 <83czq7youc.fsf@HIDDEN> <32ef6b91-107c-d7e5-b103-0ff062bf8ebd@HIDDEN>
 <83y28twahy.fsf@HIDDEN> <7af845e0-1f19-61fc-65e0-b23fac3927aa@HIDDEN>
 <83v93wx5ny.fsf@HIDDEN> <cd1ab4b2-1eb2-1259-98ff-828f0a79bb39@HIDDEN>
 <83r1ekwfrd.fsf@HIDDEN> <871r6ki6aw.fsf@HIDDEN>
 <b4f6c1fb-f322-4a59-55aa-f60932b996c9@HIDDEN> <838s0otl6b.fsf@HIDDEN>
From: Dmitry Gutov <dgutov@HIDDEN>
Message-ID: <0273902a-1f93-c643-da26-ab314d6d2db4@HIDDEN>
Date: Fri, 27 Aug 2021 00:05:39 +0300
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101
 Thunderbird/78.11.0
MIME-Version: 1.0
In-Reply-To: <838s0otl6b.fsf@HIDDEN>
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Language: en-US
Content-Transfer-Encoding: 7bit
X-Spam-Score: 0.4 (/)
X-Debbugs-Envelope-To: 50067
Cc: alan@HIDDEN, mattiase@HIDDEN, juri@HIDDEN,
 homeros.misasa@HIDDEN, tkk@HIDDEN, larsi@HIDDEN,
 50067 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.6 (/)

On 26.08.2021 16:01, Eli Zaretskii wrote:
>> Cc: alan@HIDDEN, mattiase@HIDDEN, homeros.misasa@HIDDEN,
>>   tkk@HIDDEN, larsi@HIDDEN, 50067 <at> debbugs.gnu.org
>> From: Dmitry Gutov <dgutov@HIDDEN>
>> Date: Tue, 24 Aug 2021 20:59:40 +0300
>>
>>>> An option to display the first match right away will be most
>>>> appreciated, thanks.
>>> Like compilation-auto-jump-to-first-error.
>>
>> So we even have a precedent, very good.
>>
>> Could you both check out the attached patch?
>>
>> Together with (setq xref-auto-jump-to-first-definition t)
> 
> Thanks, this looks very handy, I will definitely use it.

Very good. Let's now discuss a couple of minor alterations. We can 
always go back to this patch if we don't decide on anything better.

I think I remember now why it didn't make sense to me to have this 
behavior OOTB: I think the main goal of the user who calls 
xref-find-definitions is, usually, to pick one definition they wanted to 
visit. Which also means having the xref buffer dismissed at the end.

With the patch under discussion we automatically jump to the first 
location. We can even iterate through locations with 
next-error/previous-error (M-g M-n/M-g M-p). But to close 
(quit/kill/etc) the list of locations, you have to switch back to its 
window and press 'q'. Didn't that look like a bother to you?

Here's how it could look instead:

1. When you press M-., the first location is "shown", but not jumped to. 
The focus remains on the Xref window, with point on its first item (the 
arrow beside it is visible, like you wanted). Location is visible in the 
other window, and we can either visit it and dismiss the Xref buffer 
(with 'C-u RET'), simply visit it with 'RET', or look at the other 
locations with 'n'/'p'.

For this to work, the patch will need to change xref--auto-jump-first, 
swapping

+  (xref-next-line-no-show)
+  (xref-goto-xref))

for

+  (xref-next-line)

The new option's name would probably be different too.

And you could also use a "transient" show-definitions-function like:

(setq xref-show-definitions-function
       #'xref-show-definitions-buffer-at-bottom)

Then you'd only need to press RET in the results buffer to jump and 
dismiss the results buffer.

2. Simply have point move to the first location in the list (rather than 
remain on the group name). From there, the user can press 'C-o' to show 
the location without visiting, or 'RET', or 'C-u RET' like described 
above. I understand this does not fit your prior workflows, but it does 
require the least number of button presses in the scenario "go to the 
first location and dismiss the Xref buffer", especially in combination 
with the (setq xref-show-definitions-function ...) form above.

>> Questions for feedback:
>>
>> 1. Does the new behavior work okay window management-wise (it does
>> occupy +1 window, after all)?
> 
> Not sure I understand the question: we pop up an additional window
> when there are more than one candidate even without this option, so
> why do you say "+1 window"?  Maybe you had some recipe in mind that I
> didn't try?

It's "+1 window" compared to how 'find-tag' worked/works, which I assume 
is the target.

So it's still not the same behavior.

>> 2. Should this setting also extend to other commands like
>> xref-find-references?
> 
> Not necessarily.  Perhaps xref-auto-jump-to-first-definition should be
> tri-state, to allow users to request the same with
> xref-find-references as well?

Sure. Or we can have two variables, especially if we end up cramming 
different variations of behavior into them.

We can do a lot of things. What would help, is better knowledge about 
what people *want* to do.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#50067; Package emacs. Full text available.

Message received at 50067 <at> debbugs.gnu.org:


Received: (at 50067) by debbugs.gnu.org; 26 Aug 2021 13:01:44 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Aug 26 09:01:44 2021
Received: from localhost ([127.0.0.1]:48568 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1mJF0l-0008Hi-Be
	for submit <at> debbugs.gnu.org; Thu, 26 Aug 2021 09:01:44 -0400
Received: from eggs.gnu.org ([209.51.188.92]:58468)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1mJF0k-0008HT-29
 for 50067 <at> debbugs.gnu.org; Thu, 26 Aug 2021 09:01:38 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e]:33022)
 by eggs.gnu.org with esmtp (Exim 4.90_1)
 (envelope-from <eliz@HIDDEN>)
 id 1mJF0U-00023f-TF; Thu, 26 Aug 2021 09:01:22 -0400
Received: from 84.94.185.95.cable.012.net.il ([84.94.185.95]:4360
 helo=home-c4e4a596f7)
 by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <eliz@HIDDEN>)
 id 1mJF0T-0000MR-Kp; Thu, 26 Aug 2021 09:01:22 -0400
Date: Thu, 26 Aug 2021 16:01:00 +0300
Message-Id: <838s0otl6b.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Dmitry Gutov <dgutov@HIDDEN>
In-Reply-To: <b4f6c1fb-f322-4a59-55aa-f60932b996c9@HIDDEN> (message from
 Dmitry Gutov on Tue, 24 Aug 2021 20:59:40 +0300)
Subject: Re: bug#50067: Context menus
References: <83sfz639lh.fsf@HIDDEN> <8735r6ppf0.fsf@HIDDEN>
 <83o89u37gh.fsf@HIDDEN> <87wnohx5zd.fsf@HIDDEN>
 <831r6p3lzc.fsf@HIDDEN> <87o89sh96g.fsf@HIDDEN>
 <837dgg1hdg.fsf@HIDDEN> <87mtpcf79p.fsf@HIDDEN>
 <83zgtcyp2k.fsf@HIDDEN> <E96971E5-818F-4FE6-B702-37F09EDBB073@HIDDEN>
 <YSDKlDe2TiP7G1Gw@HIDDEN> <56454B2B-0250-4BC6-BC26-E1C5579ACF49@HIDDEN>
 <83eeanyrm5.fsf@HIDDEN> <4BC1074D-DE75-4303-8385-B70BAACFCDA0@HIDDEN>
 <83czq7youc.fsf@HIDDEN> <32ef6b91-107c-d7e5-b103-0ff062bf8ebd@HIDDEN>
 <83y28twahy.fsf@HIDDEN> <7af845e0-1f19-61fc-65e0-b23fac3927aa@HIDDEN>
 <83v93wx5ny.fsf@HIDDEN> <cd1ab4b2-1eb2-1259-98ff-828f0a79bb39@HIDDEN>
 <83r1ekwfrd.fsf@HIDDEN> <871r6ki6aw.fsf@HIDDEN>
 <b4f6c1fb-f322-4a59-55aa-f60932b996c9@HIDDEN>
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 50067
Cc: alan@HIDDEN, mattiase@HIDDEN, juri@HIDDEN,
 homeros.misasa@HIDDEN, tkk@HIDDEN, larsi@HIDDEN,
 50067 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

> Cc: alan@HIDDEN, mattiase@HIDDEN, homeros.misasa@HIDDEN,
>  tkk@HIDDEN, larsi@HIDDEN, 50067 <at> debbugs.gnu.org
> From: Dmitry Gutov <dgutov@HIDDEN>
> Date: Tue, 24 Aug 2021 20:59:40 +0300
> 
> >> An option to display the first match right away will be most
> >> appreciated, thanks.
> > Like compilation-auto-jump-to-first-error.
> 
> So we even have a precedent, very good.
> 
> Could you both check out the attached patch?
> 
> Together with (setq xref-auto-jump-to-first-definition t)

Thanks, this looks very handy, I will definitely use it.

> Questions for feedback:
> 
> 1. Does the new behavior work okay window management-wise (it does 
> occupy +1 window, after all)?

Not sure I understand the question: we pop up an additional window
when there are more than one candidate even without this option, so
why do you say "+1 window"?  Maybe you had some recipe in mind that I
didn't try?

> 2. Should this setting also extend to other commands like 
> xref-find-references?

Not necessarily.  Perhaps xref-auto-jump-to-first-definition should be
tri-state, to allow users to request the same with
xref-find-references as well?




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#50067; Package emacs. Full text available.

Message received at 50067 <at> debbugs.gnu.org:


Received: (at 50067) by debbugs.gnu.org; 26 Aug 2021 06:18:36 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Aug 26 02:18:36 2021
Received: from localhost ([127.0.0.1]:48187 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1mJ8ih-0008JL-Te
	for submit <at> debbugs.gnu.org; Thu, 26 Aug 2021 02:18:36 -0400
Received: from relay10.mail.gandi.net ([217.70.178.230]:58509)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <juri@HIDDEN>) id 1mJ8if-0008J6-IB
 for 50067 <at> debbugs.gnu.org; Thu, 26 Aug 2021 02:18:34 -0400
Received: (Authenticated sender: juri@HIDDEN)
 by relay10.mail.gandi.net (Postfix) with ESMTPSA id 4C08224000A;
 Thu, 26 Aug 2021 06:18:20 +0000 (UTC)
From: Juri Linkov <juri@HIDDEN>
To: Tak Kunihiro <tkk@HIDDEN>
Subject: Re: bug#50067: Context menus
References: <87wnociu41.fsf@HIDDEN>
 <20210824.191259.1858282353329289005.tkk@HIDDEN>
 <877dgalpsr.fsf@HIDDEN>
 <20210825.084329.2103284747365062473.tkk@HIDDEN>
 <87v93ts9jd.fsf@HIDDEN>
Date: Thu, 26 Aug 2021 09:13:10 +0300
In-Reply-To: <87v93ts9jd.fsf@HIDDEN> (Juri Linkov's message of "Wed, 
 25 Aug 2021 20:45:20 +0300")
Message-ID: <87a6l47mxr.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (x86_64-pc-linux-gnu)
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="=-=-="
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: 50067
Cc: 50067 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

--=-=-=
Content-Type: text/plain

>> * flyspell menu
>>
>> It is handy to show 'flyspell-correct-word when click on typo word.
>> However, menu is embedded inside of pre existing
>> 'flyspell-correct-word and it is hard to collect menu.  Since
>> popup-menu interface can accept both menu and function with `e', it's
>> good to utilize 'flyspell-correct-word.
>>
>> How about something like below to interrupt evaluation of
>> context-menu-functions in the middle when one of
>> context-menu-functions returns symbol instead of menu?
>
> Thanks, adapting flyspell to use the context menu is our next priority.
> But it seems interrupting evaluation is too hackish solution, and it still
> uses x-popup-menu.  Would it be possible for flyspell to put its context
> function to the end of context-menu-functions, and then replace all
> previously added menus with own menu that contains word corrections?

Here is the first step that adds support for overlay-local context-menu,
and removes the recently added 'flyspell-use-mouse-3-for-menu'.
But 'flyspell-context-menu' still returns 'flyspell-correct-word'.

I invite you or anyone else to refactor 'flyspell-correct-word' and
related functions to return a keymap menu where every menu item
is bound to a function that calls flyspell-do-correct with an argument
that is a correct word.


--=-=-=
Content-Type: text/x-diff
Content-Disposition: inline; filename=flyspell-context-menu.patch

diff --git a/doc/emacs/fixit.texi b/doc/emacs/fixit.texi
index b558ebc3fd..85cdbff5fa 100644
--- a/doc/emacs/fixit.texi
+++ b/doc/emacs/fixit.texi
@@ -462,10 +462,9 @@ Spelling
   When Flyspell mode highlights a word as misspelled, you can click on
 it with @kbd{mouse-2} (@code{flyspell-correct-word}) to display a menu
 of possible corrections and actions.  If you want this menu on
-@kbd{mouse-3} instead, customize the variable
-@code{flyspell-use-mouse-3-for-menu}.  In addition, @kbd{C-.} or
-@kbd{@key{ESC}-@key{TAB}} (@code{flyspell-auto-correct-word}) will
-propose various successive corrections for the word at point, and
+@kbd{mouse-3} instead, enable @code{context-menu-mode}.  In addition,
+@kbd{C-.} or @kbd{@key{ESC}-@key{TAB}} (@code{flyspell-auto-correct-word})
+will propose various successive corrections for the word at point, and
 @w{@kbd{C-c $}} (@code{flyspell-correct-word-before-point}) will pop
 up a menu of possible corrections.  Of course, you can always correct
 the misspelled word by editing it manually in any way you like.
diff --git a/etc/NEWS b/etc/NEWS
index 04e482364a..a6d9b3a8b8 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -2889,8 +2893,7 @@ like 'flymake-mode-line-error-counter',
 When Flyspell mode highlights a word as misspelled, you can click on
 it to display a menu of possible corrections and actions.  You can now
 easily bind this menu to 'down-mouse-3' (usually the right mouse button)
-instead of 'mouse-2' (the default) by customizing the new user option
-'flyspell-use-mouse-3-for-menu'.
+instead of 'mouse-2' (the default) by enabling 'context-menu-mode'.
 
 ---
 *** The current dictionary is now displayed in the minor mode lighter.
diff --git a/lisp/mouse.el b/lisp/mouse.el
index d137419e02..f52fb3f6ba 100644
--- a/lisp/mouse.el
+++ b/lisp/mouse.el
@@ -307,10 +307,15 @@ context-menu-filter-function
 (defun context-menu-map ()
   "Return composite menu map."
   (let ((menu (make-sparse-keymap (propertize "Context Menu" 'hide t))))
-    (run-hook-wrapped 'context-menu-functions
-                      (lambda (fun)
-                        (setq menu (funcall fun menu))
-                        nil))
+    (let ((fun (mouse-posn-property (event-start last-input-event)
+                                    'context-menu-function)))
+      (if (functionp fun)
+          (setq menu (funcall fun menu))
+        (run-hook-wrapped 'context-menu-functions
+                          (lambda (fun)
+                            (setq menu (funcall fun menu))
+                            nil))))
+    ;; TODO: remove double separators
     (when (functionp context-menu-filter-function)
       (setq menu (funcall context-menu-filter-function menu)))
     menu))
diff --git a/lisp/textmodes/flyspell.el b/lisp/textmodes/flyspell.el
index 836d889a1c..c05be9655f 100644
--- a/lisp/textmodes/flyspell.el
+++ b/lisp/textmodes/flyspell.el
@@ -442,22 +442,6 @@ flyspell-mode-map
     map)
   "Minor mode keymap for Flyspell mode--for the whole buffer.")
 
-;; correct on mouse 3
-(defun flyspell--set-use-mouse-3-for-menu (var value)
-  (set-default var value)
-  (if value
-      (progn (define-key flyspell-mouse-map [mouse-2] nil)
-             (define-key flyspell-mouse-map [down-mouse-3] 'flyspell-correct-word))
-    (define-key flyspell-mouse-map [mouse-2] 'flyspell-correct-word)
-    (define-key flyspell-mouse-map [down-mouse-3] nil)))
-
-(defcustom flyspell-use-mouse-3-for-menu nil
-  "Non-nil means to bind `mouse-3' to `flyspell-correct-word'.
-If this is set, also unbind `mouse-2'."
-  :type 'boolean
-  :set 'flyspell--set-use-mouse-3-for-menu
-  :version "28.1")
-
 ;; dash character machinery
 (defvar-local flyspell-consider-dash-as-word-delimiter-flag nil
   "Non-nil means that the `-' char is considered as a word delimiter.")
@@ -486,6 +470,10 @@ flyspell-duplicate
 
 (defvar flyspell-overlay nil)
 
+(defun flyspell-context-menu (_menu)
+  "Context menu for `context-menu-mode'."
+  'flyspell-correct-word)
+
 ;;*---------------------------------------------------------------------*/
 ;;*    flyspell-mode ...                                                */
 ;;*---------------------------------------------------------------------*/
@@ -537,10 +525,7 @@ flyspell-mode
   :group 'flyspell
   (if flyspell-mode
       (condition-case err
-          (progn
-            (when flyspell-use-mouse-3-for-menu
-              (flyspell--set-use-mouse-3-for-menu 'flyspell-use-mouse-3-for-menu t))
-            (flyspell-mode-on (called-interactively-p 'interactive)))
+	  (flyspell-mode-on (called-interactively-p 'interactive))
 	(error (message "Error enabling Flyspell mode:\n%s" (cdr err))
 	       (flyspell-mode -1)))
     (flyspell-mode-off)))
@@ -656,8 +641,7 @@ flyspell-mode-on
            show-msg)
       (let* ((binding (where-is-internal 'flyspell-auto-correct-word
                                          nil 'non-ascii))
-             (mouse-button (if flyspell-use-mouse-3-for-menu
-                               "Mouse-3" "Mouse-2")))
+             (mouse-button (if context-menu-mode "Mouse-3" "Mouse-2")))
         (message (format-message
                   "Welcome to Flyspell. Use %s to correct words."
                   (if binding
@@ -1820,13 +1804,15 @@ make-flyspell-overlay
     (overlay-put overlay 'mouse-face mouse-face)
     (overlay-put overlay 'flyspell-overlay t)
     (overlay-put overlay 'evaporate t)
-    (overlay-put overlay 'help-echo (concat (if flyspell-use-mouse-3-for-menu
-                                                "mouse-3"
-                                              "mouse-2") ": correct word at point"))
-    ;; If misspelled text has a 'keymap' property, let that remain in
-    ;; effect for the bindings that flyspell-mouse-map doesn't override.
-    (set-keymap-parent flyspell-mouse-map (get-char-property beg 'keymap))
-    (overlay-put overlay 'keymap flyspell-mouse-map)
+    (overlay-put overlay 'help-echo
+                 (concat (if context-menu-mode "mouse-3" "mouse-2")
+                         ": correct word at point"))
+    (if context-menu-mode
+        (overlay-put overlay 'context-menu-function 'flyspell-context-menu)
+      ;; If misspelled text has a 'keymap' property, let that remain in
+      ;; effect for the bindings that flyspell-mouse-map doesn't override.
+      (set-keymap-parent flyspell-mouse-map (get-char-property beg 'keymap))
+      (overlay-put overlay 'keymap flyspell-mouse-map))
     (when (eq face 'flyspell-incorrect)
       (and (stringp flyspell-before-incorrect-word-string)
            (overlay-put overlay 'before-string

--=-=-=--




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#50067; Package emacs. Full text available.

Message received at 50067 <at> debbugs.gnu.org:


Received: (at 50067) by debbugs.gnu.org; 25 Aug 2021 17:48:52 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Aug 25 13:48:52 2021
Received: from localhost ([127.0.0.1]:47562 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1mIx1A-0002HU-L5
	for submit <at> debbugs.gnu.org; Wed, 25 Aug 2021 13:48:52 -0400
Received: from relay8-d.mail.gandi.net ([217.70.183.201]:60819)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <juri@HIDDEN>) id 1mIx16-0002HE-OK
 for 50067 <at> debbugs.gnu.org; Wed, 25 Aug 2021 13:48:51 -0400
Received: (Authenticated sender: juri@HIDDEN)
 by relay8-d.mail.gandi.net (Postfix) with ESMTPSA id A59341BF208;
 Wed, 25 Aug 2021 17:48:39 +0000 (UTC)
From: Juri Linkov <juri@HIDDEN>
To: Tak Kunihiro <tkk@HIDDEN>
Subject: Re: bug#50067: Context menus
Organization: LINKOV.NET
References: <87wnociu41.fsf@HIDDEN>
 <20210824.191259.1858282353329289005.tkk@HIDDEN>
 <877dgalpsr.fsf@HIDDEN>
 <20210825.084329.2103284747365062473.tkk@HIDDEN>
Date: Wed, 25 Aug 2021 20:45:20 +0300
In-Reply-To: <20210825.084329.2103284747365062473.tkk@HIDDEN>
 (Tak Kunihiro's message of "Wed, 25 Aug 2021 08:43:29 +0900 (JST)")
Message-ID: <87v93ts9jd.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (x86_64-pc-linux-gnu)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: 50067
Cc: 50067 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

> * flyspell menu
>
> It is handy to show 'flyspell-correct-word when click on typo word.
> However, menu is embedded inside of pre existing
> 'flyspell-correct-word and it is hard to collect menu.  Since
> popup-menu interface can accept both menu and function with `e', it's
> good to utilize 'flyspell-correct-word.
>
> How about something like below to interrupt evaluation of
> context-menu-functions in the middle when one of
> context-menu-functions returns symbol instead of menu?

Thanks, adapting flyspell to use the context menu is our next priority.
But it seems interrupting evaluation is too hackish solution, and it still
uses x-popup-menu.  Would it be possible for flyspell to put its context
function to the end of context-menu-functions, and then replace all
previously added menus with own menu that contains word corrections?




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#50067; Package emacs. Full text available.

Message received at 50067 <at> debbugs.gnu.org:


Received: (at 50067) by debbugs.gnu.org; 25 Aug 2021 16:00:40 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Aug 25 12:00:39 2021
Received: from localhost ([127.0.0.1]:47394 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1mIvKM-0003hA-P2
	for submit <at> debbugs.gnu.org; Wed, 25 Aug 2021 12:00:39 -0400
Received: from eggs.gnu.org ([209.51.188.92]:46134)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1mIvKL-0003gy-93
 for 50067 <at> debbugs.gnu.org; Wed, 25 Aug 2021 12:00:34 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e]:52052)
 by eggs.gnu.org with esmtp (Exim 4.90_1)
 (envelope-from <eliz@HIDDEN>)
 id 1mIvKA-0003KS-Ft; Wed, 25 Aug 2021 12:00:22 -0400
Received: from 84.94.185.95.cable.012.net.il ([84.94.185.95]:2546
 helo=home-c4e4a596f7)
 by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <eliz@HIDDEN>)
 id 1mIvJs-0004k1-J8; Wed, 25 Aug 2021 12:00:10 -0400
Date: Wed, 25 Aug 2021 18:59:59 +0300
Message-Id: <83a6l5v7k0.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Dmitry Gutov <dgutov@HIDDEN>
In-Reply-To: <66ea2142-4855-e7a2-aa3d-f48283404e03@HIDDEN> (message from
 Dmitry Gutov on Wed, 25 Aug 2021 17:15:28 +0300)
Subject: Re: bug#50067: Context menus
References: <83sfz639lh.fsf@HIDDEN> <8735r6ppf0.fsf@HIDDEN>
 <83o89u37gh.fsf@HIDDEN> <87wnohx5zd.fsf@HIDDEN>
 <831r6p3lzc.fsf@HIDDEN> <87o89sh96g.fsf@HIDDEN>
 <837dgg1hdg.fsf@HIDDEN> <87mtpcf79p.fsf@HIDDEN>
 <83zgtcyp2k.fsf@HIDDEN> <E96971E5-818F-4FE6-B702-37F09EDBB073@HIDDEN>
 <YSDKlDe2TiP7G1Gw@HIDDEN> <56454B2B-0250-4BC6-BC26-E1C5579ACF49@HIDDEN>
 <83eeanyrm5.fsf@HIDDEN> <4BC1074D-DE75-4303-8385-B70BAACFCDA0@HIDDEN>
 <83czq7youc.fsf@HIDDEN> <32ef6b91-107c-d7e5-b103-0ff062bf8ebd@HIDDEN>
 <83y28twahy.fsf@HIDDEN> <7af845e0-1f19-61fc-65e0-b23fac3927aa@HIDDEN>
 <83v93wx5ny.fsf@HIDDEN> <cd1ab4b2-1eb2-1259-98ff-828f0a79bb39@HIDDEN>
 <83r1ekwfrd.fsf@HIDDEN> <871r6ki6aw.fsf@HIDDEN>
 <b4f6c1fb-f322-4a59-55aa-f60932b996c9@HIDDEN>
 <66ea2142-4855-e7a2-aa3d-f48283404e03@HIDDEN>
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 50067
Cc: alan@HIDDEN, mattiase@HIDDEN, juri@HIDDEN,
 homeros.misasa@HIDDEN, tkk@HIDDEN, larsi@HIDDEN,
 50067 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> From: Dmitry Gutov <dgutov@HIDDEN>
> Cc: alan@HIDDEN, mattiase@HIDDEN, homeros.misasa@HIDDEN,
>  tkk@HIDDEN, larsi@HIDDEN, 50067 <at> debbugs.gnu.org
> Date: Wed, 25 Aug 2021 17:15:28 +0300
> 
> On 24.08.2021 20:59, Dmitry Gutov wrote:
> > 
> > Together with (setq xref-auto-jump-to-first-definition t)
> > 
> > Questions for feedback:
> > 
> > 1. Does the new behavior work okay window management-wise (it does 
> > occupy +1 window, after all)?
> > 
> > 2. Should this setting also extend to other commands like 
> > xref-find-references? Asking for personal preferences here.
> 
> Eli?

Sorry, I didn't yet have time to try this; will do tomorrow.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#50067; Package emacs. Full text available.

Message received at 50067 <at> debbugs.gnu.org:


Received: (at 50067) by debbugs.gnu.org; 25 Aug 2021 14:15:41 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Aug 25 10:15:41 2021
Received: from localhost ([127.0.0.1]:47254 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1mItgr-00032b-In
	for submit <at> debbugs.gnu.org; Wed, 25 Aug 2021 10:15:41 -0400
Received: from mail-wm1-f42.google.com ([209.85.128.42]:39670)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <raaahh@HIDDEN>) id 1mItgo-00032M-J6
 for 50067 <at> debbugs.gnu.org; Wed, 25 Aug 2021 10:15:40 -0400
Received: by mail-wm1-f42.google.com with SMTP id
 f9-20020a05600c1549b029025b0f5d8c6cso4407691wmg.4
 for <50067 <at> debbugs.gnu.org>; Wed, 25 Aug 2021 07:15:38 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
 h=sender:subject:from:to:cc:references:message-id:date:user-agent
 :mime-version:in-reply-to:content-language:content-transfer-encoding;
 bh=h14tt5ezkl2fws0rZlj03nax5RTb5SnI1/m8V40C8r8=;
 b=rWbHH8F4ut58Ky02S8itH4Nv4M17qH3kHUjyQejUePzIyw9H1LIX4k9Piv8OUG5KSU
 tLdrZJyjx91O4aJOXb1UQu628GsGaAilrZFFAMd2EnfDSvA7oCgNKy1TrrNsp+qBJS4d
 wPgk++r4fJJmyW4eCi+GFWa3HZDtRSXQmWGUE/fGLYiucbz3ka+8jacFJhDzJ3aW2lSO
 6eyXlZNRh6D02JOKqn3MAY5KNRUB8Iy7v9u6qMpJ5BORF2hNFF7Uue8wnM7FqxlP5uTl
 TqbGdzuTkft9RbFQWug67Lb7eAvcMU8/bNfQDcmqRtz2GCsXmKCIqH6ZjZllJ4sJ6+2g
 HJ0g==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:sender:subject:from:to:cc:references:message-id
 :date:user-agent:mime-version:in-reply-to:content-language
 :content-transfer-encoding;
 bh=h14tt5ezkl2fws0rZlj03nax5RTb5SnI1/m8V40C8r8=;
 b=MqQ6ICAZqMIBxWR6GJhFAseBid/EOf6NCj4H9FsOalw46v9Yarql5ILLKSn29QRUyx
 42HH47PmX8IlE2da5/zb0z2zmpqpPSsHjre1tSk0Uwvnpy6RpVt16/KaoetJgrqbQSXI
 chvDLNRSdlQq3bO+nmkP+lI65A/octJcSr3iOr+HF7M8ucya4Y8nBl9cgmC3SbwI0Iuu
 QvI49RVfilAp5OoKXEHy+/MwCtkag2x3E64/bxQx51gv59OJpVkbRc2x73TwsjJbpwGj
 1pERyx2qvvqWDjYHni0TpuWN+wVp9DG1IUgstOy6Ki/YkM+aSJ2Wj3BSUPw6Hs1dqF8t
 1N0g==
X-Gm-Message-State: AOAM533Qv6ENpQWq2+eK/nPxqo+H7sVclh2AmGs/HjAEJFEkvuZX5aWr
 oxl/SLaqAacqr4rcookl1m307/hx5Zk=
X-Google-Smtp-Source: ABdhPJwkOAcIdqEYZIu5RqA42+c2//lsIrq4yZvmD5aXhmb3obZU9R4FZpOlR3bIYFGIyTTPfx9qEw==
X-Received: by 2002:a05:600c:414f:: with SMTP id
 h15mr9634614wmm.66.1629900932591; 
 Wed, 25 Aug 2021 07:15:32 -0700 (PDT)
Received: from [192.168.0.6] ([46.251.119.176])
 by smtp.googlemail.com with ESMTPSA id e2sm20016wrq.56.2021.08.25.07.15.29
 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128);
 Wed, 25 Aug 2021 07:15:31 -0700 (PDT)
Subject: Re: bug#50067: Context menus
From: Dmitry Gutov <dgutov@HIDDEN>
To: Juri Linkov <juri@HIDDEN>, Eli Zaretskii <eliz@HIDDEN>
References: <83sfz639lh.fsf@HIDDEN> <8735r6ppf0.fsf@HIDDEN>
 <83o89u37gh.fsf@HIDDEN> <87wnohx5zd.fsf@HIDDEN>
 <831r6p3lzc.fsf@HIDDEN> <87o89sh96g.fsf@HIDDEN>
 <837dgg1hdg.fsf@HIDDEN> <87mtpcf79p.fsf@HIDDEN>
 <83zgtcyp2k.fsf@HIDDEN> <E96971E5-818F-4FE6-B702-37F09EDBB073@HIDDEN>
 <YSDKlDe2TiP7G1Gw@HIDDEN> <56454B2B-0250-4BC6-BC26-E1C5579ACF49@HIDDEN>
 <83eeanyrm5.fsf@HIDDEN> <4BC1074D-DE75-4303-8385-B70BAACFCDA0@HIDDEN>
 <83czq7youc.fsf@HIDDEN> <32ef6b91-107c-d7e5-b103-0ff062bf8ebd@HIDDEN>
 <83y28twahy.fsf@HIDDEN> <7af845e0-1f19-61fc-65e0-b23fac3927aa@HIDDEN>
 <83v93wx5ny.fsf@HIDDEN> <cd1ab4b2-1eb2-1259-98ff-828f0a79bb39@HIDDEN>
 <83r1ekwfrd.fsf@HIDDEN> <871r6ki6aw.fsf@HIDDEN>
 <b4f6c1fb-f322-4a59-55aa-f60932b996c9@HIDDEN>
Message-ID: <66ea2142-4855-e7a2-aa3d-f48283404e03@HIDDEN>
Date: Wed, 25 Aug 2021 17:15:28 +0300
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101
 Thunderbird/78.11.0
MIME-Version: 1.0
In-Reply-To: <b4f6c1fb-f322-4a59-55aa-f60932b996c9@HIDDEN>
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Language: en-US
Content-Transfer-Encoding: 7bit
X-Spam-Score: 0.4 (/)
X-Debbugs-Envelope-To: 50067
Cc: alan@HIDDEN, mattiase@HIDDEN, homeros.misasa@HIDDEN,
 tkk@HIDDEN, larsi@HIDDEN, 50067 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.6 (/)

On 24.08.2021 20:59, Dmitry Gutov wrote:
> 
> Together with (setq xref-auto-jump-to-first-definition t)
> 
> Questions for feedback:
> 
> 1. Does the new behavior work okay window management-wise (it does 
> occupy +1 window, after all)?
> 
> 2. Should this setting also extend to other commands like 
> xref-find-references? Asking for personal preferences here.

Eli?




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#50067; Package emacs. Full text available.

Message received at 50067 <at> debbugs.gnu.org:


Received: (at 50067) by debbugs.gnu.org; 24 Aug 2021 23:43:49 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Aug 24 19:43:49 2021
Received: from localhost ([127.0.0.1]:45363 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1mIg57-0000Ij-3b
	for submit <at> debbugs.gnu.org; Tue, 24 Aug 2021 19:43:49 -0400
Received: from mx0a-00602c01.pphosted.com ([205.220.162.67]:27052)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <prvs=9870e68d8a=tkk@HIDDEN>)
 id 1mIg53-0000IZ-5s
 for 50067 <at> debbugs.gnu.org; Tue, 24 Aug 2021 19:43:48 -0400
Received: from pps.filterd (m0238148.ppops.net [127.0.0.1])
 by mx0a-00602c01.pphosted.com (8.16.1.2/8.16.1.2) with SMTP id 17OKvSXe025354; 
 Wed, 25 Aug 2021 08:43:39 +0900
Received: from mlsec.cc.okayama-u.ac.jp (mlsec.cc.okayama-u.ac.jp
 [150.46.12.254])
 by mx0a-00602c01.pphosted.com with ESMTP id 3amfqjsajq-1
 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT);
 Wed, 25 Aug 2021 08:43:38 +0900
Received: from jlsv301.okayama-u.ac.jp (unknown [150.46.12.5]) by
 mlsec.cc.okayama-u.ac.jp with smtp
 id 20f6_48dc_2a6edbab_f127_4f61_bf5d_d41f054cd3f1;
 Wed, 25 Aug 2021 08:43:30 +0900
Received: from localhost (vesta.misasa.okayama-u.ac.jp [150.46.48.154])
 by jlsv301.okayama-u.ac.jp (Postfix) with ESMTPSA id 355607600CA;
 Wed, 25 Aug 2021 08:43:31 +0900 (JST)
Date: Wed, 25 Aug 2021 08:43:29 +0900 (JST)
Message-Id: <20210825.084329.2103284747365062473.tkk@HIDDEN>
To: juri@HIDDEN
Subject: Re: bug#50067: Context menus
From: Tak Kunihiro <tkk@HIDDEN>
In-Reply-To: <877dgalpsr.fsf@HIDDEN>
References: <87wnociu41.fsf@HIDDEN>
 <20210824.191259.1858282353329289005.tkk@HIDDEN>
 <877dgalpsr.fsf@HIDDEN>
X-Mailer: Mew version 6.8 on Emacs 26.3
Mime-Version: 1.0
Content-Type: Text/Plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-NAI-Spam-Flag: NO
X-NAI-Spam-Threshold: 11
X-NAI-Spam-Score: 0
X-NAI-Spam-Rules: 4 Rules triggered
 EDT_SA_AU_PASS=0, EDT_SA_DN_PASS=0, EDT_SA_TS_PASS=0, RV6963=0
X-NAI-Spam-Version: 2.3.0.9418 : core <6963> : inlines <7226> : streams
 <1899767> : uri <3310827>
X-Proofpoint-ORIG-GUID: JnCrwFzVTSCpVt_60DkVWFXZTJvilkox
X-Proofpoint-GUID: JnCrwFzVTSCpVt_60DkVWFXZTJvilkox
X-Proofpoint-Virus-Version: vendor=nai engine=6300 definitions=10086
 signatures=668682
X-Proofpoint-Spam-Details: rule=outbound_spam_notspam policy=outbound_spam
 score=0 phishscore=0
 impostorscore=0 malwarescore=0 priorityscore=1501 mlxlogscore=999
 adultscore=0 lowpriorityscore=0 clxscore=1015 mlxscore=0 spamscore=0
 bulkscore=0 suspectscore=0 classifier=spam adjust=0 reason=mlx scancount=1
 engine=8.12.0-2107140000 definitions=main-2108240147
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 50067
Cc: mattiase@HIDDEN, alan@HIDDEN, 50067 <at> debbugs.gnu.org, larsi@HIDDEN,
 tkk@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

* flyspell menu

It is handy to show 'flyspell-correct-word when click on typo word.
However, menu is embedded inside of pre existing
'flyspell-correct-word and it is hard to collect menu.  Since
popup-menu interface can accept both menu and function with `e', it's
good to utilize 'flyspell-correct-word.

How about something like below to interrupt evaluation of
context-menu-functions in the middle when one of
context-menu-functions returns symbol instead of menu?

diff --git a/lisp/mouse.el b/lisp/mouse.el
index 6332d9fcec..23f0dda3e8 100644
--- a/lisp/mouse.el
+++ b/lisp/mouse.el
@@ -308,7 +308,7 @@ context-menu-map
     (run-hook-wrapped 'context-menu-functions
                       (lambda (fun)
                         (setq menu (funcall fun menu))
-                        nil))
+                        (not (keymapp menu))))
     (when (functionp context-menu-filter-function)
       (setq menu (funcall context-menu-filter-function menu)))
     menu))

Then function something below will pop word choices.

(defun context-menu-spell (menu)
  "Return 'flyspell-correct-word when word under mouse click is incorrect."
  (let ((faces-at-point (mapcar (lambda (xxx) (overlay-get xxx 'face))
                                (overlays-at (posn-point (event-start last-input-event))))))
    (if (or (member 'flyspell-incorrect faces-at-point)
            (member 'flyspell-duplicate faces-at-point))
        #'flyspell-correct-word
      menu)))

(setq context-menu-functions '(context-menu-spell ;; flyspell
                               context-menu-undo
                               context-menu-region
                               context-menu-local
                               context-menu-minor))




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#50067; Package emacs. Full text available.

Message received at 50067 <at> debbugs.gnu.org:


Received: (at 50067) by debbugs.gnu.org; 24 Aug 2021 17:59:52 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Aug 24 13:59:52 2021
Received: from localhost ([127.0.0.1]:45149 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1mIaiG-0004IC-1z
	for submit <at> debbugs.gnu.org; Tue, 24 Aug 2021 13:59:52 -0400
Received: from mail-wr1-f50.google.com ([209.85.221.50]:43871)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <raaahh@HIDDEN>) id 1mIaiD-0004Hv-Lc
 for 50067 <at> debbugs.gnu.org; Tue, 24 Aug 2021 13:59:50 -0400
Received: by mail-wr1-f50.google.com with SMTP id z9so32491558wrh.10
 for <50067 <at> debbugs.gnu.org>; Tue, 24 Aug 2021 10:59:49 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
 h=sender:subject:to:cc:references:from:message-id:date:user-agent
 :mime-version:in-reply-to:content-language;
 bh=EhZ2SPDHce6H4Ye8wzeRpMx2FVhxeEdFa1K8/4ZmlqQ=;
 b=SlhOj6Xu1QrIRRm/P4lnYMQti6Vof0IqN/AGQLc/ur8W1ll09Kz/u5JjBq0QThj/pM
 pMgvjECaPFpzKBozG0w6Y/GdlcPNpGHJNmHnVzsQXgIEXRitKJxI2Qk4f9BS/1N+khC0
 g+LBVW56xZrM1GOKE6Ikpdavrr3qDlsynnJSWdcmLHAVJtbGPB+Jr/jCdZC3qQ6+red1
 kvCLAlxQ5LPx8zk9v+eEltaClfKU9GswSuJRmRbdNWO6rkbSnfTqlg/O+JR0/sc1QWig
 Kh7sxrH+Ghil2mrKS48oq7M3Cadxd0HbqGUNXtJ8PHva5Gn6z+MReFPeKYkT6YnP1FWy
 3Lug==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:sender:subject:to:cc:references:from:message-id
 :date:user-agent:mime-version:in-reply-to:content-language;
 bh=EhZ2SPDHce6H4Ye8wzeRpMx2FVhxeEdFa1K8/4ZmlqQ=;
 b=bS79I5dGymwgNRVTfxAlBw3GzQX8n9auD/NegojKug9Gavvx7/QywteRQEB860v6CM
 uUWy2Bu2kfFNsYXEmTBZxWB/jmpgaTysm4KddZYlJmNMM9QEXndHIZ5yYNoFBtzf9IcF
 RDEEyfmd/RY+6t2yO7g1/lvU8a7K70ryrI37TmN1d3K5Bz7LHSDKFIpfeWYAvXvutCWQ
 uAe4Vv1V9O1cZ/UNTAbjzAXeLrpXfe7VU8oHNP2g5Im2O+I4zX6VIB5yMjVAjjBH5rg8
 vwXiBbSFEhAZi6hZWnlDL9ZdgO7v3V/8x4uyDS3XU1lkjNmsShe0P9gCrtiZKxdrZC0v
 JFSA==
X-Gm-Message-State: AOAM533xT6LMiVk2kJv3jfzw7QHmOuSPAYzEI0XLYmfrRZR++ZAOfqaa
 QoZlogfGamMF7vKPyHBZxeFinvZGbHA=
X-Google-Smtp-Source: ABdhPJw6PFEltgzxaR5Uxv97IbF9XqOebrC+2kUXVslPq/zr99RoA5v3xV/QtDNbA1/IRg8O1U8PnQ==
X-Received: by 2002:a5d:5305:: with SMTP id e5mr21027504wrv.243.1629827983150; 
 Tue, 24 Aug 2021 10:59:43 -0700 (PDT)
Received: from [192.168.0.6] ([46.251.119.176])
 by smtp.googlemail.com with ESMTPSA id l2sm3008997wme.28.2021.08.24.10.59.41
 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128);
 Tue, 24 Aug 2021 10:59:42 -0700 (PDT)
Subject: Re: bug#50067: Context menus
To: Juri Linkov <juri@HIDDEN>, Eli Zaretskii <eliz@HIDDEN>
References: <83sfz639lh.fsf@HIDDEN> <8735r6ppf0.fsf@HIDDEN>
 <83o89u37gh.fsf@HIDDEN> <87wnohx5zd.fsf@HIDDEN>
 <831r6p3lzc.fsf@HIDDEN> <87o89sh96g.fsf@HIDDEN>
 <837dgg1hdg.fsf@HIDDEN> <87mtpcf79p.fsf@HIDDEN>
 <83zgtcyp2k.fsf@HIDDEN> <E96971E5-818F-4FE6-B702-37F09EDBB073@HIDDEN>
 <YSDKlDe2TiP7G1Gw@HIDDEN> <56454B2B-0250-4BC6-BC26-E1C5579ACF49@HIDDEN>
 <83eeanyrm5.fsf@HIDDEN> <4BC1074D-DE75-4303-8385-B70BAACFCDA0@HIDDEN>
 <83czq7youc.fsf@HIDDEN> <32ef6b91-107c-d7e5-b103-0ff062bf8ebd@HIDDEN>
 <83y28twahy.fsf@HIDDEN> <7af845e0-1f19-61fc-65e0-b23fac3927aa@HIDDEN>
 <83v93wx5ny.fsf@HIDDEN> <cd1ab4b2-1eb2-1259-98ff-828f0a79bb39@HIDDEN>
 <83r1ekwfrd.fsf@HIDDEN> <871r6ki6aw.fsf@HIDDEN>
From: Dmitry Gutov <dgutov@HIDDEN>
Message-ID: <b4f6c1fb-f322-4a59-55aa-f60932b996c9@HIDDEN>
Date: Tue, 24 Aug 2021 20:59:40 +0300
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101
 Thunderbird/78.11.0
MIME-Version: 1.0
In-Reply-To: <871r6ki6aw.fsf@HIDDEN>
Content-Type: multipart/mixed; boundary="------------731E6E4EEEFB597FE81CAC05"
Content-Language: en-US
X-Spam-Score: 0.4 (/)
X-Debbugs-Envelope-To: 50067
Cc: alan@HIDDEN, mattiase@HIDDEN, homeros.misasa@HIDDEN,
 tkk@HIDDEN, larsi@HIDDEN, 50067 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.6 (/)

This is a multi-part message in MIME format.
--------------731E6E4EEEFB597FE81CAC05
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 7bit

On 23.08.2021 19:02, Juri Linkov wrote:
>>> We could add an option, at the very least.
>> An option to display the first match right away will be most
>> appreciated, thanks.
> Like compilation-auto-jump-to-first-error.

So we even have a precedent, very good.

Could you both check out the attached patch?

Together with (setq xref-auto-jump-to-first-definition t)

Questions for feedback:

1. Does the new behavior work okay window management-wise (it does 
occupy +1 window, after all)?

2. Should this setting also extend to other commands like 
xref-find-references? Asking for personal preferences here.

--------------731E6E4EEEFB597FE81CAC05
Content-Type: text/x-patch; charset=UTF-8;
 name="xref-auto-jump-to-first-definition.diff"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
 filename="xref-auto-jump-to-first-definition.diff"

diff --git a/lisp/progmodes/xref.el b/lisp/progmodes/xref.el
index d004a0c32c..ca055a36af 100644
--- a/lisp/progmodes/xref.el
+++ b/lisp/progmodes/xref.el
@@ -416,6 +416,12 @@ xref-after-update-hook
   :version "28.1"
   :package-version '(xref . "1.0.4"))
 
+(defcustom xref-auto-jump-to-first-definition nil
+  "If non-nil, `xref-find-definitions' always jumps to the first result."
+  :type 'boolean
+  :version "28.1"
+  :package-version '(xref . "1.2.0"))
+
 (defvar xref--marker-ring (make-ring xref-marker-ring-length)
   "Ring of markers to implement the marker stack.")
 
@@ -1060,19 +1066,30 @@ xref-revert-buffer
            (error-message-string err)
            'face 'error)))))))
 
+(defun xref--auto-jump-first (buf)
+  (select-window (get-buffer-window buf))
+  (goto-char (point-min))
+  (xref-next-line-no-show)
+  (xref-goto-xref))
+
 (defun xref-show-definitions-buffer (fetcher alist)
   "Show the definitions list in a regular window.
 
 When only one definition found, jump to it right away instead."
-  (let ((xrefs (funcall fetcher)))
+  (let ((xrefs (funcall fetcher))
+        buf)
     (cond
      ((not (cdr xrefs))
       (xref-pop-to-location (car xrefs)
                             (assoc-default 'display-action alist)))
      (t
-      (xref--show-xref-buffer fetcher
-                              (cons (cons 'fetched-xrefs xrefs)
-                                    alist))))))
+      (setq buf
+            (xref--show-xref-buffer fetcher
+                                    (cons (cons 'fetched-xrefs xrefs)
+                                          alist)))
+      (when (assoc-default 'auto-jump alist)
+        (xref--auto-jump-first buf))
+      buf))))
 
 (define-obsolete-function-alias
   'xref--show-defs-buffer #'xref-show-definitions-buffer "28.1")
@@ -1088,7 +1105,8 @@ xref-show-definitions-buffer-at-bottom
          ;; XXX: Make percentage customizable maybe?
          (max-height (/ (window-height) 2))
          (size-fun (lambda (window)
-                     (fit-window-to-buffer window max-height))))
+                     (fit-window-to-buffer window max-height)))
+         buf)
     (cond
      ((not (cdr xrefs))
       (xref-pop-to-location (car xrefs)
@@ -1101,7 +1119,10 @@ xref-show-definitions-buffer-at-bottom
         (pop-to-buffer (current-buffer)
                        `(display-buffer-in-direction . ((direction . below)
                                                         (window-height . ,size-fun))))
-        (current-buffer))))))
+        (setq buf (current-buffer)))
+      (when (assoc-default 'auto-jump alist)
+        (xref--auto-jump-first buf))
+      buf))))
 
 (define-obsolete-function-alias 'xref--show-defs-buffer-at-bottom
   #'xref-show-definitions-buffer-at-bottom "28.1")
@@ -1236,7 +1257,8 @@ xref--show-defs
   (xref--push-markers)
   (funcall xref-show-definitions-function xrefs
            `((window . ,(selected-window))
-             (display-action . ,display-action))))
+             (display-action . ,display-action)
+             (auto-jump . ,xref-auto-jump-to-first-definition))))
 
 (defun xref--push-markers ()
   (unless (region-active-p) (push-mark nil t))

--------------731E6E4EEEFB597FE81CAC05--




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#50067; Package emacs. Full text available.

Message received at 50067 <at> debbugs.gnu.org:


Received: (at 50067) by debbugs.gnu.org; 24 Aug 2021 17:25:42 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Aug 24 13:25:42 2021
Received: from localhost ([127.0.0.1]:45109 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1mIaBB-0003Rq-SE
	for submit <at> debbugs.gnu.org; Tue, 24 Aug 2021 13:25:42 -0400
Received: from relay6-d.mail.gandi.net ([217.70.183.198]:58051)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <juri@HIDDEN>) id 1mIaB9-0003Ra-Ca
 for 50067 <at> debbugs.gnu.org; Tue, 24 Aug 2021 13:25:40 -0400
Received: (Authenticated sender: juri@HIDDEN)
 by relay6-d.mail.gandi.net (Postfix) with ESMTPSA id 17523C0006;
 Tue, 24 Aug 2021 17:25:27 +0000 (UTC)
From: Juri Linkov <juri@HIDDEN>
To: Tak Kunihiro <tkk@HIDDEN>
Subject: Re: bug#50067: Context menus
Organization: LINKOV.NET
References: <87lf4tews5.fsf@HIDDEN>
 <00A9BE5A-D661-42AF-A65B-3B80C7428121@HIDDEN>
 <87wnociu41.fsf@HIDDEN>
 <20210824.191259.1858282353329289005.tkk@HIDDEN>
Date: Tue, 24 Aug 2021 20:23:48 +0300
In-Reply-To: <20210824.191259.1858282353329289005.tkk@HIDDEN>
 (Tak Kunihiro's message of "Tue, 24 Aug 2021 19:12:59 +0900 (JST)")
Message-ID: <877dgalpsr.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (x86_64-pc-linux-gnu)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: 50067
Cc: mattiase@HIDDEN, alan@HIDDEN, 50067 <at> debbugs.gnu.org, larsi@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

> I started to understand the system.
> A plug-in to list frames would be something like this.
> I think it is good to have interface to basic utilities such for
> recentf and bookmarks.
>
> (defun context-menu-frame (menu)

There are endless possibilities in creating various submenus.
So the default set of submenus is limited only to already existing menus:

context-menu-toolbar copied from the tool-bar
context-menu-global copied from the global menu-bar
context-menu-local copied from the local menu-bar
context-menu-minor copied from the minor-modes menu-bar
context-menu-vc copied from the vc menu
context-menu-undo copied from the Edit menu
context-menu-region copied from the Edit menu

So if you can find an existing menu, it could be added.
But I can't find the existing menu with a list of frames.
There are only the existing menu with a list of buffers
like you proposed (mouse-buffer-menu-map) from [C-down-mouse-1],
but better to use (mouse-buffer-menu-keymap),
so now context-menu-buffers is added to the default list.

The remaining existing menu is 'mouse-appearance-menu' bound to
[S-down-mouse-1].  I don't know if it's significant enough
to be added to the default list?

Also you proposed a good idea to have a frame menu when
right clicking on the title bar.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#50067; Package emacs. Full text available.

Message received at 50067 <at> debbugs.gnu.org:


Received: (at 50067) by debbugs.gnu.org; 24 Aug 2021 10:13:28 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Aug 24 06:13:28 2021
Received: from localhost ([127.0.0.1]:43314 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1mITQu-0001yL-Kt
	for submit <at> debbugs.gnu.org; Tue, 24 Aug 2021 06:13:28 -0400
Received: from mx0a-00602c01.pphosted.com ([205.220.162.67]:54290)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <prvs=9870e68d8a=tkk@HIDDEN>)
 id 1mITQp-0001y7-NY
 for 50067 <at> debbugs.gnu.org; Tue, 24 Aug 2021 06:13:27 -0400
Received: from pps.filterd (m0238148.ppops.net [127.0.0.1])
 by mx0a-00602c01.pphosted.com (8.16.1.2/8.16.1.2) with SMTP id 17NLq9em020720; 
 Tue, 24 Aug 2021 19:13:09 +0900
Received: from mlsec.cc.okayama-u.ac.jp (mlsec.cc.okayama-u.ac.jp
 [150.46.12.254])
 by mx0a-00602c01.pphosted.com with ESMTP id 3amfqjruqk-1
 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT);
 Tue, 24 Aug 2021 19:13:09 +0900
Received: from jlsv301.okayama-u.ac.jp (unknown [150.46.12.5]) by
 mlsec.cc.okayama-u.ac.jp with smtp
 id 66b6_38da_1cbcafff_7825_4b36_a13a_62884b81feb1;
 Tue, 24 Aug 2021 19:13:00 +0900
Received: from localhost (vesta.misasa.okayama-u.ac.jp [150.46.48.154])
 by jlsv301.okayama-u.ac.jp (Postfix) with ESMTPSA id DA0017600C8;
 Tue, 24 Aug 2021 19:13:00 +0900 (JST)
Date: Tue, 24 Aug 2021 19:12:59 +0900 (JST)
Message-Id: <20210824.191259.1858282353329289005.tkk@HIDDEN>
To: juri@HIDDEN
Subject: Re: bug#50067: Context menus
From: Tak Kunihiro <tkk@HIDDEN>
In-Reply-To: <87wnociu41.fsf@HIDDEN>
References: <87lf4tews5.fsf@HIDDEN>
 <00A9BE5A-D661-42AF-A65B-3B80C7428121@HIDDEN>
 <87wnociu41.fsf@HIDDEN>
X-Mailer: Mew version 6.8 on Emacs 26.3
Mime-Version: 1.0
Content-Type: Text/Plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-NAI-Spam-Flag: NO
X-NAI-Spam-Threshold: 11
X-NAI-Spam-Score: 0
X-NAI-Spam-Rules: 4 Rules triggered
 EDT_SA_AU_PASS=0, EDT_SA_DN_PASS=0, EDT_SA_TS_PASS=0, RV6963=0
X-NAI-Spam-Version: 2.3.0.9418 : core <6963> : inlines <7226> : streams
 <1899714> : uri <3310564>
X-Proofpoint-ORIG-GUID: P8jjqr1mKDn2E5QMs4HzyPe5D4v7ZsQ7
X-Proofpoint-GUID: P8jjqr1mKDn2E5QMs4HzyPe5D4v7ZsQ7
X-Proofpoint-Virus-Version: vendor=nai engine=6300 definitions=10085
 signatures=668682
X-Proofpoint-Spam-Details: rule=outbound_spam_notspam policy=outbound_spam
 score=0 phishscore=0
 impostorscore=0 malwarescore=0 priorityscore=1501 mlxlogscore=841
 adultscore=0 lowpriorityscore=0 clxscore=1015 mlxscore=0 spamscore=0
 bulkscore=0 suspectscore=0 classifier=spam adjust=0 reason=mlx scancount=1
 engine=8.12.0-2107140000 definitions=main-2108240068
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 50067
Cc: mattiase@HIDDEN, alan@HIDDEN, 50067 <at> debbugs.gnu.org, larsi@HIDDEN,
 tkk@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

I started to understand the system.
A plug-in to list frames would be something like this.
I think it is good to have interface to basic utilities such for
recentf and bookmarks.

(defun context-menu-frame (menu)
  "Add MENU a list of frames."
  (let (frame-map)
    (dolist (frame (visible-frame-list))
      (let ((nickname (cdr (assoc 'name (frame-parameters frame))))
            (cmd `(lambda nil (interactive) (funcall 'menu-bar-select-frame ,frame))))
        (push (vector nickname cmd :active (not (equal frame (selected-frame)))) frame-map)))
    (push ["--" ignore] frame-map)
    (push ["New" make-frame-command] frame-map)
    (setq frame-map (reverse frame-map))
    (push "Frames" frame-map)
    (easy-menu-add-item menu nil frame-map)
    menu))




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#50067; Package emacs. Full text available.

Message received at 50067 <at> debbugs.gnu.org:


Received: (at 50067) by debbugs.gnu.org; 23 Aug 2021 16:07:16 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Aug 23 12:07:16 2021
Received: from localhost ([127.0.0.1]:42452 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1mICTf-0008QN-Rx
	for submit <at> debbugs.gnu.org; Mon, 23 Aug 2021 12:07:16 -0400
Received: from relay9-d.mail.gandi.net ([217.70.183.199]:51555)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <juri@HIDDEN>) id 1mICTa-0008Ph-EP
 for 50067 <at> debbugs.gnu.org; Mon, 23 Aug 2021 12:07:11 -0400
Received: (Authenticated sender: juri@HIDDEN)
 by relay9-d.mail.gandi.net (Postfix) with ESMTPSA id 1CC24FF803;
 Mon, 23 Aug 2021 16:06:54 +0000 (UTC)
From: Juri Linkov <juri@HIDDEN>
To: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#50067: Context menus
Organization: LINKOV.NET
References: <83sfz639lh.fsf@HIDDEN> <8735r6ppf0.fsf@HIDDEN>
 <83o89u37gh.fsf@HIDDEN> <87wnohx5zd.fsf@HIDDEN>
 <831r6p3lzc.fsf@HIDDEN> <87o89sh96g.fsf@HIDDEN>
 <837dgg1hdg.fsf@HIDDEN> <87mtpcf79p.fsf@HIDDEN>
 <83zgtcyp2k.fsf@HIDDEN>
 <E96971E5-818F-4FE6-B702-37F09EDBB073@HIDDEN>
 <YSDKlDe2TiP7G1Gw@HIDDEN>
 <56454B2B-0250-4BC6-BC26-E1C5579ACF49@HIDDEN>
 <83eeanyrm5.fsf@HIDDEN>
 <4BC1074D-DE75-4303-8385-B70BAACFCDA0@HIDDEN>
 <83czq7youc.fsf@HIDDEN>
 <32ef6b91-107c-d7e5-b103-0ff062bf8ebd@HIDDEN>
 <83y28twahy.fsf@HIDDEN>
 <7af845e0-1f19-61fc-65e0-b23fac3927aa@HIDDEN>
 <83v93wx5ny.fsf@HIDDEN>
 <cd1ab4b2-1eb2-1259-98ff-828f0a79bb39@HIDDEN>
 <83r1ekwfrd.fsf@HIDDEN>
Date: Mon, 23 Aug 2021 19:02:19 +0300
In-Reply-To: <83r1ekwfrd.fsf@HIDDEN> (Eli Zaretskii's message of "Mon, 23 Aug
 2021 14:40:38 +0300")
Message-ID: <871r6ki6aw.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (x86_64-pc-linux-gnu)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: 50067
Cc: alan@HIDDEN, mattiase@HIDDEN, homeros.misasa@HIDDEN,
 tkk@HIDDEN, Dmitry Gutov <dgutov@HIDDEN>, larsi@HIDDEN,
 50067 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

>> We could add an option, at the very least.
>
> An option to display the first match right away will be most
> appreciated, thanks.

Like compilation-auto-jump-to-first-error.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#50067; Package emacs. Full text available.

Message received at 50067 <at> debbugs.gnu.org:


Received: (at 50067) by debbugs.gnu.org; 23 Aug 2021 11:41:11 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Aug 23 07:41:10 2021
Received: from localhost ([127.0.0.1]:40625 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1mI8K8-0005Nd-W3
	for submit <at> debbugs.gnu.org; Mon, 23 Aug 2021 07:41:10 -0400
Received: from eggs.gnu.org ([209.51.188.92]:46996)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1mI8K2-0005My-Vc
 for 50067 <at> debbugs.gnu.org; Mon, 23 Aug 2021 07:41:03 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e]:45840)
 by eggs.gnu.org with esmtp (Exim 4.90_1)
 (envelope-from <eliz@HIDDEN>)
 id 1mI8Jr-0006LB-Gb; Mon, 23 Aug 2021 07:40:47 -0400
Received: from 84.94.185.95.cable.012.net.il ([84.94.185.95]:4293
 helo=home-c4e4a596f7)
 by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <eliz@HIDDEN>)
 id 1mI8Jq-0002Qj-W8; Mon, 23 Aug 2021 07:40:47 -0400
Date: Mon, 23 Aug 2021 14:40:38 +0300
Message-Id: <83r1ekwfrd.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Dmitry Gutov <dgutov@HIDDEN>
In-Reply-To: <cd1ab4b2-1eb2-1259-98ff-828f0a79bb39@HIDDEN> (message from
 Dmitry Gutov on Mon, 23 Aug 2021 14:18:56 +0300)
Subject: Re: bug#50067: Context menus
References: <83sfz639lh.fsf@HIDDEN> <8735r6ppf0.fsf@HIDDEN>
 <83o89u37gh.fsf@HIDDEN> <87wnohx5zd.fsf@HIDDEN>
 <831r6p3lzc.fsf@HIDDEN> <87o89sh96g.fsf@HIDDEN>
 <837dgg1hdg.fsf@HIDDEN> <87mtpcf79p.fsf@HIDDEN>
 <83zgtcyp2k.fsf@HIDDEN> <E96971E5-818F-4FE6-B702-37F09EDBB073@HIDDEN>
 <YSDKlDe2TiP7G1Gw@HIDDEN> <56454B2B-0250-4BC6-BC26-E1C5579ACF49@HIDDEN>
 <83eeanyrm5.fsf@HIDDEN> <4BC1074D-DE75-4303-8385-B70BAACFCDA0@HIDDEN>
 <83czq7youc.fsf@HIDDEN> <32ef6b91-107c-d7e5-b103-0ff062bf8ebd@HIDDEN>
 <83y28twahy.fsf@HIDDEN> <7af845e0-1f19-61fc-65e0-b23fac3927aa@HIDDEN>
 <83v93wx5ny.fsf@HIDDEN> <cd1ab4b2-1eb2-1259-98ff-828f0a79bb39@HIDDEN>
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 50067
Cc: alan@HIDDEN, mattiase@HIDDEN, juri@HIDDEN,
 homeros.misasa@HIDDEN, tkk@HIDDEN, larsi@HIDDEN,
 50067 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> Cc: alan@HIDDEN, mattiase@HIDDEN, juri@HIDDEN,
>  homeros.misasa@HIDDEN, tkk@HIDDEN, larsi@HIDDEN,
>  50067 <at> debbugs.gnu.org
> From: Dmitry Gutov <dgutov@HIDDEN>
> Date: Mon, 23 Aug 2021 14:18:56 +0300
> 
> On 23.08.2021 05:21, Eli Zaretskii wrote:
> > Yes.  But that ship has sailed long ago.
> 
> Only if the chief maintainer thinks that the UI must be frozen in time.
> 
> We could add an option, at the very least.

An option to display the first match right away will be most
appreciated, thanks.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#50067; Package emacs. Full text available.

Message received at 50067 <at> debbugs.gnu.org:


Received: (at 50067) by debbugs.gnu.org; 23 Aug 2021 11:19:15 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Aug 23 07:19:15 2021
Received: from localhost ([127.0.0.1]:40619 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1mI7yw-0002jF-Vh
	for submit <at> debbugs.gnu.org; Mon, 23 Aug 2021 07:19:15 -0400
Received: from mail-wm1-f52.google.com ([209.85.128.52]:45905)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <raaahh@HIDDEN>) id 1mI7yr-0002ih-2c
 for 50067 <at> debbugs.gnu.org; Mon, 23 Aug 2021 07:19:09 -0400
Received: by mail-wm1-f52.google.com with SMTP id
 j17-20020a05600c1c1100b002e754875260so653627wms.4
 for <50067 <at> debbugs.gnu.org>; Mon, 23 Aug 2021 04:19:05 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
 h=sender:subject:to:cc:references:from:message-id:date:user-agent
 :mime-version:in-reply-to:content-language:content-transfer-encoding;
 bh=IglXhXuzNBprvyoji8+6xzkb4XA9zEVWwxAwkr8+PKs=;
 b=EWxWMhdUkgA0SPOLZwxv2PF0bYXeaJhWhV9ewDSDyxh6leZZ2FIecBTj8r77yNp44H
 fFM/GrFDjySX4QpEMq+WAL/AV6dzusbWeFeFUxf5VpaNNNWU6hFzzIf7HGvJfKe0rOwq
 gfJT3LtCN2jsg2KV7YgEvf5Rmzev68cXWTzWSrvizrIrNliQ8Z8llod4E5TIbvAi8j/M
 52jy+1Vw/gxQ9Y0ZZmT++HXW5c/fNaLZ5mBuCl8Wuu+wzEQKCXk8J/rwZMWl+X1l7q0L
 16VT6JMTZ7UT6Qqy1FuuoJ2DGO52/Nm+zoJIQtEElnfc3wL+g/8zOZOs1dOF1d0sxpwr
 aTsA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:sender:subject:to:cc:references:from:message-id
 :date:user-agent:mime-version:in-reply-to:content-language
 :content-transfer-encoding;
 bh=IglXhXuzNBprvyoji8+6xzkb4XA9zEVWwxAwkr8+PKs=;
 b=b6VJBxwt24P10eSzQdyRwY21ckn144GuNz1QKvJtaR0UqoWQkm/WGx/tZeIxT50BV0
 b6kF+41yOWQ1lh/QDFwv2IB2rfiI87QLWgExbcdF2T/Ee+9/jXChmdyYuh/jPdhRXCVg
 H/FLiVDImHjB8rOKOq5Ff/BfZWeMLBFvhxWdNsiRh0ayjpQVjU9bo3VWN9GY31zZOoqF
 MtSci4cHq3pN8FGGOntfOjM83khFXyTCwZbUU/OncXVMdOJR057KOqGjQ/Ra1xwwn5xZ
 48OeFTc2mVHmtMiGjwdyZ8jlR2tyAYve/DGoHbZ8VTKhDYpfLXn1QMJcRRFB7WIIOESa
 jTSA==
X-Gm-Message-State: AOAM5313L2MRrm8wFmWHUOHzF2uj8IMCsAxe6zEaXlwx4b1wLo1FEqwq
 L9MkdJeCOg6MyX6XAq+fLn+tYV74bkY=
X-Google-Smtp-Source: ABdhPJz3Se4nrDZWER4K8ALKCp4Acg3hJ0Iyf6P9j0O022mvdl7D3CH5zYjYa15ZTPZMRUXFv2rdTA==
X-Received: by 2002:a05:600c:350b:: with SMTP id
 h11mr15810705wmq.123.1629717539228; 
 Mon, 23 Aug 2021 04:18:59 -0700 (PDT)
Received: from [192.168.0.6] ([46.251.119.176])
 by smtp.googlemail.com with ESMTPSA id k1sm15387310wrz.61.2021.08.23.04.18.57
 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128);
 Mon, 23 Aug 2021 04:18:58 -0700 (PDT)
Subject: Re: bug#50067: Context menus
To: Eli Zaretskii <eliz@HIDDEN>
References: <83sfz639lh.fsf@HIDDEN> <8735r6ppf0.fsf@HIDDEN>
 <83o89u37gh.fsf@HIDDEN> <87wnohx5zd.fsf@HIDDEN>
 <831r6p3lzc.fsf@HIDDEN> <87o89sh96g.fsf@HIDDEN>
 <837dgg1hdg.fsf@HIDDEN> <87mtpcf79p.fsf@HIDDEN>
 <83zgtcyp2k.fsf@HIDDEN> <E96971E5-818F-4FE6-B702-37F09EDBB073@HIDDEN>
 <YSDKlDe2TiP7G1Gw@HIDDEN> <56454B2B-0250-4BC6-BC26-E1C5579ACF49@HIDDEN>
 <83eeanyrm5.fsf@HIDDEN> <4BC1074D-DE75-4303-8385-B70BAACFCDA0@HIDDEN>
 <83czq7youc.fsf@HIDDEN> <32ef6b91-107c-d7e5-b103-0ff062bf8ebd@HIDDEN>
 <83y28twahy.fsf@HIDDEN> <7af845e0-1f19-61fc-65e0-b23fac3927aa@HIDDEN>
 <83v93wx5ny.fsf@HIDDEN>
From: Dmitry Gutov <dgutov@HIDDEN>
Message-ID: <cd1ab4b2-1eb2-1259-98ff-828f0a79bb39@HIDDEN>
Date: Mon, 23 Aug 2021 14:18:56 +0300
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101
 Thunderbird/78.11.0
MIME-Version: 1.0
In-Reply-To: <83v93wx5ny.fsf@HIDDEN>
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Language: en-US
Content-Transfer-Encoding: 7bit
X-Spam-Score: 0.4 (/)
X-Debbugs-Envelope-To: 50067
Cc: alan@HIDDEN, mattiase@HIDDEN, juri@HIDDEN,
 homeros.misasa@HIDDEN, tkk@HIDDEN, larsi@HIDDEN,
 50067 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.6 (/)

On 23.08.2021 05:21, Eli Zaretskii wrote:
> Yes.  But that ship has sailed long ago.

Only if the chief maintainer thinks that the UI must be frozen in time.

We could add an option, at the very least.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#50067; Package emacs. Full text available.

Message received at 50067 <at> debbugs.gnu.org:


Received: (at 50067) by debbugs.gnu.org; 23 Aug 2021 07:38:08 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Aug 23 03:38:08 2021
Received: from localhost ([127.0.0.1]:40440 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1mI4X2-0003To-3s
	for submit <at> debbugs.gnu.org; Mon, 23 Aug 2021 03:38:08 -0400
Received: from relay10.mail.gandi.net ([217.70.178.230]:42127)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <juri@HIDDEN>) id 1mI4Wz-0003T7-A4
 for 50067 <at> debbugs.gnu.org; Mon, 23 Aug 2021 03:38:05 -0400
Received: (Authenticated sender: juri@HIDDEN)
 by relay10.mail.gandi.net (Postfix) with ESMTPSA id EB561240012;
 Mon, 23 Aug 2021 07:37:56 +0000 (UTC)
From: Juri Linkov <juri@HIDDEN>
To: Tak Kunihiro <tkk@HIDDEN>
Subject: Re: bug#50067: Context menus
Organization: LINKOV.NET
References: <74BC00E9-2509-47DA-9428-1523FF7F3B33@HIDDEN>
 <87v942pvcj.fsf@HIDDEN>
 <F9F140FE-CB41-432E-BA96-6F1E49BEEB8F@HIDDEN>
 <004A628A-99CC-4C62-8AE2-921C4C38D42A@HIDDEN>
 <87h7fkh8z8.fsf@HIDDEN>
 <060413B6-E0EF-491D-986F-3988C255729F@HIDDEN>
 <87lf4tews5.fsf@HIDDEN>
 <00A9BE5A-D661-42AF-A65B-3B80C7428121@HIDDEN>
Date: Mon, 23 Aug 2021 10:24:22 +0300
In-Reply-To: <00A9BE5A-D661-42AF-A65B-3B80C7428121@HIDDEN>
 (Tak Kunihiro's message of "Mon, 23 Aug 2021 12:11:27 +0900")
Message-ID: <87wnociu41.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (x86_64-pc-linux-gnu)
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: 50067
Cc: Mattias =?iso-8859-1?Q?Engdeg=E5rd?= <mattiase@HIDDEN>,
 Alan Third <alan@HIDDEN>, 50067 <at> debbugs.gnu.org,
 Lars Ingebrigtsen <larsi@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

>> I tried to implement this, but soon found that long-left-click is unusable,
>> because such artificial delay is a hassle - no one would have
>> patience to wait even half a second until the menu finally appears.
>> But this could be implemented anyway when users will demand this.
>
> I think this is useful especially on laptop computer with Mac.
> As inferred on other posts laptop computer with Mac does not have
> mouse-3.  However, it is possible that I’m the only one.

Recently Mattias bound C-mouse-1 to use instead of mouse-3 on Mac.

> `ffap-at-mouse’ will open a file under pointer on `this window’.
> Randomly I want to open it by `other frame’.
> It’s good if I can choose open the file on `this window’ or `other frame’.
> Is there a way to detect meta key pressed when select one of menu items?

There is no way to detect meta key.  But you can create a new command
to open in a new frame, and add this command to the menu.  Or use
the existing `ffap-other-frame'.

>>> It is handy to have buffer menu when right click mode bar.
>
> This suggestion may be unrelated to context-menu.
> On mode bar, both mouse-1 and mouse-3 switches buffer. 
> I think mouse-3 should show something like (mouse-buffer-menu-map).

Yes, this would be useful.

>>> On paste when there is a region and delete-selection-mode is t, the
>>> region should be replaced by the text.
>> 
>> Please explain how the region should be replaced by the text,
>> when mouse-yank-at-click or mouse-yank-primary is used
>> to paste where the mouse is clicked.  Should it delete the region
>> and paste where mouse is clicked on another part of the buffer?
>> What if the mouse is clicked in another window?
>
> When there is a region and yank text by `C-y’, the text would
> be replaced.
>
> I think when there is a region and point in on region, region
> should be replaced by text.  No?

mouse-yank-at-click is intended to paste where you click.
So when there is a region, and you click mouse-3 at some other position
where you want to paste, and select "Paste" from the context-menu,
it's unclear what to do with the region.  It makes no sense
to delete the region, when you paste at the clicked position
outside of the region, but not on the region.

Please see more in mouse-yank-at-click and mouse-yank-primary
that contain such comment about the need to deactivate the region:

  ;; Without this, confusing things happen upon e.g. inserting into
  ;; the middle of an active region.
  (when select-active-regions
    (let (select-active-regions)
      (deactivate-mark)))

>>> I cannot figure out how to include pre-existing menu such for
>>> (mouse-buffer-menu-map).

Actually, the right function to use is (mouse-buffer-menu-keymap)
instead of (mouse-buffer-menu-map).

> I cannot find guid line how the menu should be created.
> Do you know where to look?

Good documentation is in (info "(elisp) Defining Menus").




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#50067; Package emacs. Full text available.

Message received at 50067 <at> debbugs.gnu.org:


Received: (at 50067) by debbugs.gnu.org; 23 Aug 2021 03:11:53 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Aug 22 23:11:52 2021
Received: from localhost ([127.0.0.1]:40175 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1mI0NL-00051B-Uz
	for submit <at> debbugs.gnu.org; Sun, 22 Aug 2021 23:11:52 -0400
Received: from mx0a-00602c01.pphosted.com ([205.220.162.67]:49530)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <prvs=986968a3b7=tkk@HIDDEN>)
 id 1mI0NG-000510-Mr
 for 50067 <at> debbugs.gnu.org; Sun, 22 Aug 2021 23:11:50 -0400
Received: from pps.filterd (m0238149.ppops.net [127.0.0.1])
 by mx0a-00602c01.pphosted.com (8.16.1.2/8.16.1.2) with SMTP id 17MKvumJ021966; 
 Mon, 23 Aug 2021 12:11:34 +0900
Received: from mlsec.cc.okayama-u.ac.jp (mlsec.cc.okayama-u.ac.jp
 [150.46.12.254])
 by mx0a-00602c01.pphosted.com with ESMTP id 3akkp20mur-1
 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT);
 Mon, 23 Aug 2021 12:11:34 +0900
Received: from jlsv301.okayama-u.ac.jp (unknown [150.46.12.5]) by
 mlsec.cc.okayama-u.ac.jp with smtp
 id 6d8c_1d53_0132e028_2b18_487c_a8e1_a91c7295b669;
 Mon, 23 Aug 2021 12:11:27 +0900
Received: from smtpclient.apple (unknown [172.24.1.212])
 by jlsv301.okayama-u.ac.jp (Postfix) with ESMTPSA id 341F4760414;
 Mon, 23 Aug 2021 12:11:28 +0900 (JST)
Content-Type: text/plain;
	charset=utf-8
Mime-Version: 1.0 (Mac OS X Mail 14.0 \(3654.120.0.1.13\))
Subject: Re: bug#50067: Context menus
From: Tak Kunihiro <tkk@HIDDEN>
In-Reply-To: <87lf4tews5.fsf@HIDDEN>
Date: Mon, 23 Aug 2021 12:11:27 +0900
Content-Transfer-Encoding: quoted-printable
Message-Id: <00A9BE5A-D661-42AF-A65B-3B80C7428121@HIDDEN>
References: <74BC00E9-2509-47DA-9428-1523FF7F3B33@HIDDEN>
 <87v942pvcj.fsf@HIDDEN>
 <F9F140FE-CB41-432E-BA96-6F1E49BEEB8F@HIDDEN>
 <004A628A-99CC-4C62-8AE2-921C4C38D42A@HIDDEN>
 <87h7fkh8z8.fsf@HIDDEN>
 <060413B6-E0EF-491D-986F-3988C255729F@HIDDEN>
 <87lf4tews5.fsf@HIDDEN>
To: Juri Linkov <juri@HIDDEN>
X-Mailer: Apple Mail (2.3654.120.0.1.13)
X-NAI-Spam-Flag: NO
X-NAI-Spam-Level: 
X-NAI-Spam-Threshold: 11
X-NAI-Spam-Score: 0.1
X-NAI-Spam-Rules: 5 Rules triggered
 GME_TWTRE=0.1, EDT_SA_AU_PASS=0, EDT_SA_DN_PASS=0, EDT_SA_TS_PASS=0, 
 RV6962=0
X-NAI-Spam-Version: 2.3.0.9418 : core <6962> : inlines <7226> : streams
 <1899591> : uri <3309952>
X-Proofpoint-GUID: Xvj9abkIVU0StjrvE0yGINzMI2AZzIUw
X-Proofpoint-ORIG-GUID: Xvj9abkIVU0StjrvE0yGINzMI2AZzIUw
X-Proofpoint-Virus-Version: vendor=nai engine=6300 definitions=10084
 signatures=668682
X-Proofpoint-Spam-Details: rule=outbound_spam_notspam policy=outbound_spam
 score=0 spamscore=0
 clxscore=1015 bulkscore=0 suspectscore=0 phishscore=0 impostorscore=0
 adultscore=0 priorityscore=1501 malwarescore=0 lowpriorityscore=0
 mlxlogscore=999 mlxscore=0 classifier=spam adjust=0 reason=mlx scancount=1
 engine=8.12.0-2107140000 definitions=main-2108230018
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 50067
Cc: Alan Third <alan@HIDDEN>,
 =?utf-8?Q?Mattias_Engdeg=C3=A5rd?= <mattiase@HIDDEN>,
 =?utf-8?B?5Zu95bqD5Y2T5Lmf?= <tkk@HIDDEN>,
 Lars Ingebrigtsen <larsi@HIDDEN>, 50067 <at> debbugs.gnu.org,
 Eli Zaretskii <eliz@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

>> I suggest to assign [drag-mouse-3] as well, as shown below.
>>=20
>> (define-key map [mouse-3] context-menu-entry)
>> (define-key map [drag-mouse-3] context-menu-entry)
>=20
> There is no need to bind [drag-mouse-3] because [down-mouse-3] is =
bound.

I confirmed. I took the suggestion back.

>> On Mac, I suggest to assign [C-double-mouse-1] as well as shown =
below.
>>=20
>> (define-key map [C-down-mouse-1] #'ignore)
>> (define-key map [C-mouse-1] context-menu-entry)
>> (define-key map [C-double-mouse-1] context-menu-entry)
>> (define-key map [C-triple-mouse-1] context-menu-entry)
>> (define-key map [C-drag-mouse-1] context-menu-entry)
>=20
> I leave this for the users of Mac to decide what would be better on =
Mac.

I agree.  User can bind it later too.

>> * Error detection system
>>=20
>> It is good if the context-menu system is ready for
>> an error that occurs on one of context-menu-functions.
>> For now, when there is error, Emacs only tells
>> `<mouse-3> is undefined'.
>=20
> I agree, a better error reporting would be nice.  Patches welcome.

This is something I wanted to have for a long time.  I do not have
idea where to start. I hope someone works on this using this =
opportunity.

>> * Long click system
>>=20
>> It=E2=80=99s time to discuss long-left-click also as trigger to
>> show context menu.
>>=20
>> https://lists.gnu.org/archive/html/emacs-devel/2017-11/msg00267.html
>> https://lists.gnu.org/archive/html/emacs-devel/2020-09/msg01277.html
>=20
> I tried to implement this, but soon found that long-left-click is =
unusable,
> because such artificial delay is a hassle - no one would have
> patience to wait even half a second until the menu finally appears.
> But this could be implemented anyway when users will demand this.

I think this is useful especially on laptop computer with Mac.
As inferred on other posts laptop computer with Mac does not have
mouse-3.  However, it is possible that I=E2=80=99m the only one.

>> * Open by other frame
>>=20
>> File would be opened by this window. Sometimes I want to open it by
>> other frame.  It is good if which window to open, is selectable after
>> showing context-menu. I do not know how to do so.
>=20
> Sorry, I don't understand what menu do you mean, maybe in Dired mode?

`ffap-at-mouse=E2=80=99 will open a file under pointer on `this =
window=E2=80=99.
Randomly I want to open it by `other frame=E2=80=99.
It=E2=80=99s good if I can choose open the file on `this window=E2=80=99 =
or `other frame=E2=80=99.
Is there a way to detect meta key pressed when select one of menu items?

>> * Details
>>=20
>> It is handy to have buffer menu when right click mode bar.
>=20
> I don't see where buffer-menu-open currently is used on the mode-line.
>> (define-key map [remap buffer-menu-open] context-menu-entry)
>=20
> This gives the error "void-variable map".


This suggestion may be unrelated to context-menu.
On mode bar, both mouse-1 and mouse-3 switches buffer.=20
I think mouse-3 should show something like (mouse-buffer-menu-map).

>> Also it is handy to have frame menu when right click title bar.
>=20
> I think this is a good idea.
>=20
>> I do not know how to do so.
>=20
> I do not know how to do this for the frame title bar.
> But currently I'm doing this for the tab bar.

OK.

>> Also it is nice to show word candidates by ispell when click a word.
>=20
> Maybe like flyspell-mode?

I have an idea. Possibly, send patch in the future.

>> ** context-menu-region
>>=20
>> All commands belong to `Edit' in menu bar.
>> I think `context-menu-edit' sounds better.
>=20
> I already tried to use your idea to name it `context-menu-edit'.
> But the problem is that other functions like context-menu-undo are =
also
> related to editing.  OTOH, some items in context-menu-region don't do
> editing such as "Select All" is not editing, "Copy" is not editing, =
etc.
>=20

>> Isn't it better to use `menu-bar-edit-menu' as a source rather than
>> create a menu from scratch?
>=20
> I already tried this idea but this menu is already available
> in the global menu that already can be enabled by adding
> context-menu-global to context-menu-functions.
> But maybe `context-menu-edit' could be added as well
> from `menu-bar-edit-menu'.


OK.  I only wanted to suggest reducing maintenance cost.

>=20
>> On paste when there is a region and delete-selection-mode is t, the
>> region should be replaced by the text.
>=20
> Please explain how the region should be replaced by the text,
> when mouse-yank-at-click or mouse-yank-primary is used
> to paste where the mouse is clicked.  Should it delete the region
> and paste where mouse is clicked on another part of the buffer?
> What if the mouse is clicked in another window?

When there is a region and yank text by `C-y=E2=80=99, the text would
be replaced.

I think when there is a region and point in on region, region
should be replaced by text.  No?

>> ** no multiple horizontal lines
>>=20
>> Sometimes I see double lines on the context menu.  I think that there =
is
>> no useful case to have double lines.  To allow only one horizontal =
line
>> would look cool.
>=20
> Right, double separators should be removed.

OK.

>> ** reuse existing menu
>>=20
>> I cannot figure out how to include pre-existing menu such for
>> (mouse-buffer-menu-map).  To lean how to manipulate menu is not easy.
>> It's nice to have an example something like below (does not work).
>>=20
>>  (defun context-menu-buffer (menu)
>>  "Add a buffer menu entry to MENU."
>>    (let ((map (mouse-buffer-menu-map)))
>>      (define-key-after menu [buffer] map))
>>    menu)
>=20
> Adding the existing menu is not easy.  There are some examples in
> context-menu-global, context-menu-local, context-menu-minor.

OK.  I did not know it is not easy.
I cannot find guid line how the menu should be created.
Do you know where to look?







Information forwarded to bug-gnu-emacs@HIDDEN:
bug#50067; Package emacs. Full text available.

Message received at 50067 <at> debbugs.gnu.org:


Received: (at 50067) by debbugs.gnu.org; 23 Aug 2021 02:21:38 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Aug 22 22:21:38 2021
Received: from localhost ([127.0.0.1]:40149 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1mHzad-0003nf-WB
	for submit <at> debbugs.gnu.org; Sun, 22 Aug 2021 22:21:38 -0400
Received: from eggs.gnu.org ([209.51.188.92]:42856)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1mHzaa-0003nQ-VE
 for 50067 <at> debbugs.gnu.org; Sun, 22 Aug 2021 22:21:30 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e]:34468)
 by eggs.gnu.org with esmtp (Exim 4.90_1)
 (envelope-from <eliz@HIDDEN>)
 id 1mHzaO-0005o5-MD; Sun, 22 Aug 2021 22:21:16 -0400
Received: from 84.94.185.95.cable.012.net.il ([84.94.185.95]:1999
 helo=home-c4e4a596f7)
 by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <eliz@HIDDEN>)
 id 1mHzaO-0006dA-9A; Sun, 22 Aug 2021 22:21:16 -0400
Date: Mon, 23 Aug 2021 05:21:05 +0300
Message-Id: <83v93wx5ny.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Dmitry Gutov <dgutov@HIDDEN>
In-Reply-To: <7af845e0-1f19-61fc-65e0-b23fac3927aa@HIDDEN> (message from
 Dmitry Gutov on Sun, 22 Aug 2021 22:54:57 +0300)
Subject: Re: bug#50067: Context menus
References: <83sfz639lh.fsf@HIDDEN> <8735r6ppf0.fsf@HIDDEN>
 <83o89u37gh.fsf@HIDDEN> <87wnohx5zd.fsf@HIDDEN>
 <831r6p3lzc.fsf@HIDDEN> <87o89sh96g.fsf@HIDDEN>
 <837dgg1hdg.fsf@HIDDEN> <87mtpcf79p.fsf@HIDDEN>
 <83zgtcyp2k.fsf@HIDDEN> <E96971E5-818F-4FE6-B702-37F09EDBB073@HIDDEN>
 <YSDKlDe2TiP7G1Gw@HIDDEN> <56454B2B-0250-4BC6-BC26-E1C5579ACF49@HIDDEN>
 <83eeanyrm5.fsf@HIDDEN> <4BC1074D-DE75-4303-8385-B70BAACFCDA0@HIDDEN>
 <83czq7youc.fsf@HIDDEN> <32ef6b91-107c-d7e5-b103-0ff062bf8ebd@HIDDEN>
 <83y28twahy.fsf@HIDDEN> <7af845e0-1f19-61fc-65e0-b23fac3927aa@HIDDEN>
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 50067
Cc: alan@HIDDEN, mattiase@HIDDEN, juri@HIDDEN,
 homeros.misasa@HIDDEN, tkk@HIDDEN, larsi@HIDDEN,
 50067 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> Cc: alan@HIDDEN, mattiase@HIDDEN, juri@HIDDEN,
>  homeros.misasa@HIDDEN, tkk@HIDDEN, larsi@HIDDEN,
>  50067 <at> debbugs.gnu.org
> From: Dmitry Gutov <dgutov@HIDDEN>
> Date: Sun, 22 Aug 2021 22:54:57 +0300
> 
> On 22.08.2021 22:22, Eli Zaretskii wrote:
> > That's not exactly the same, because with M-. I already asked to show
> > me a definition.  Anyway, not worth an argument.
> 
> Perhaps your complaint is instead about no definition being shown, even 
> though you feel like you already asked Emacs to show one (which the 
> fileloop UI does).

Yes.  But that ship has sailed long ago.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#50067; Package emacs. Full text available.

Message received at 50067 <at> debbugs.gnu.org:


Received: (at 50067) by debbugs.gnu.org; 22 Aug 2021 19:55:11 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Aug 22 15:55:10 2021
Received: from localhost ([127.0.0.1]:39823 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1mHtYk-0000Uv-PR
	for submit <at> debbugs.gnu.org; Sun, 22 Aug 2021 15:55:10 -0400
Received: from mail-wr1-f46.google.com ([209.85.221.46]:39931)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <raaahh@HIDDEN>) id 1mHtYg-0000UF-9F
 for 50067 <at> debbugs.gnu.org; Sun, 22 Aug 2021 15:55:09 -0400
Received: by mail-wr1-f46.google.com with SMTP id z4so7316185wrr.6
 for <50067 <at> debbugs.gnu.org>; Sun, 22 Aug 2021 12:55:06 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
 h=sender:subject:to:cc:references:from:message-id:date:user-agent
 :mime-version:in-reply-to:content-language:content-transfer-encoding;
 bh=D/9ILPSpyWhxqUnyH0NH5E+FmmWSqX9K4KBgaBdtZU4=;
 b=qNU3+670jvBsX03t/zQequaUsWxnSh4AWAlaPb/C1ZN0nUOmh6FGZKOkwv1adjEfQM
 0pPoXhB8ss0MC/2dqrCBEmFB6NvvkLbo6GzaizRAzxZdzGPc4h7UnfDxQd/ntMpCtWQf
 txf5wyJYLs+mAaUizfSxnceJNwstvvTiSiVoqfrw+TF9Td/CcLSKrd70ml25w0xahj4t
 1nez5tvEHngYqll2GeBrecs2VOiXLG0b73ZzHVBBGlbsc66ywpIcdJfCeoVWDkf42b2o
 YY6b+wvi0sMFhPwoIonkGpWIPyAfpWfaD7ExPkTpla7h/wJULDXu1uaH8eYpsqTt6BbP
 Xi1w==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:sender:subject:to:cc:references:from:message-id
 :date:user-agent:mime-version:in-reply-to:content-language
 :content-transfer-encoding;
 bh=D/9ILPSpyWhxqUnyH0NH5E+FmmWSqX9K4KBgaBdtZU4=;
 b=Dx9XWpgHqHNiUAHWSfqgQT6g1Z5IqgycpC/HA/equgl+Gnc5HPMOtf5luDBDlGqZoh
 J6I+s8HKt87ZJBXaXA/aE9ucPjil1sS7wf6VVYZ53lLbwhh+WYS/RsI4YJXiVlAZ4HRH
 dUMF+qZ0oex+tp01QNwtVfK1rJjiPGBLeF+Rz+vn0eh9wFtP7D0L6o9m4Iy6Svr/eluN
 7n0B+IfDqKt3ihU2CDo+xd4Y2wn1txF3IDz99DqJIx/bkYHe7IIbEcWD3UWdUrBp3ZOF
 pAntXu2jqO/OskLCH87rPgFJEhFlpNGWWQAwf9wR6eC7R5XrfTndvAj1REls82d42GUR
 Ra4w==
X-Gm-Message-State: AOAM533RPgeozZ4inbgjxmVy09Lk4I6xQWuvtFkl0hHf1z6JiqTwRwgd
 XM1s32/ccmgnJ7mz8aeaHJnKZNBt/S0=
X-Google-Smtp-Source: ABdhPJz7OSg8T/4sHJyd0+TdvrNdFIwnmRmzM21timfqeuRUJT33SPXgt3NeeI2SUwq7178d6Ud1Dg==
X-Received: by 2002:a5d:6052:: with SMTP id j18mr10088823wrt.348.1629662100273; 
 Sun, 22 Aug 2021 12:55:00 -0700 (PDT)
Received: from [192.168.0.6] ([46.251.119.176])
 by smtp.googlemail.com with ESMTPSA id 11sm7386828wmi.15.2021.08.22.12.54.58
 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128);
 Sun, 22 Aug 2021 12:54:59 -0700 (PDT)
Subject: Re: bug#50067: Context menus
To: Eli Zaretskii <eliz@HIDDEN>
References: <83sfz639lh.fsf@HIDDEN> <8735r6ppf0.fsf@HIDDEN>
 <83o89u37gh.fsf@HIDDEN> <87wnohx5zd.fsf@HIDDEN>
 <831r6p3lzc.fsf@HIDDEN> <87o89sh96g.fsf@HIDDEN>
 <837dgg1hdg.fsf@HIDDEN> <87mtpcf79p.fsf@HIDDEN>
 <83zgtcyp2k.fsf@HIDDEN> <E96971E5-818F-4FE6-B702-37F09EDBB073@HIDDEN>
 <YSDKlDe2TiP7G1Gw@HIDDEN> <56454B2B-0250-4BC6-BC26-E1C5579ACF49@HIDDEN>
 <83eeanyrm5.fsf@HIDDEN> <4BC1074D-DE75-4303-8385-B70BAACFCDA0@HIDDEN>
 <83czq7youc.fsf@HIDDEN> <32ef6b91-107c-d7e5-b103-0ff062bf8ebd@HIDDEN>
 <83y28twahy.fsf@HIDDEN>
From: Dmitry Gutov <dgutov@HIDDEN>
Message-ID: <7af845e0-1f19-61fc-65e0-b23fac3927aa@HIDDEN>
Date: Sun, 22 Aug 2021 22:54:57 +0300
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101
 Thunderbird/78.11.0
MIME-Version: 1.0
In-Reply-To: <83y28twahy.fsf@HIDDEN>
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Language: en-US
Content-Transfer-Encoding: 7bit
X-Spam-Score: 0.4 (/)
X-Debbugs-Envelope-To: 50067
Cc: alan@HIDDEN, mattiase@HIDDEN, juri@HIDDEN,
 homeros.misasa@HIDDEN, tkk@HIDDEN, larsi@HIDDEN,
 50067 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.6 (/)

On 22.08.2021 22:22, Eli Zaretskii wrote:
> That's not exactly the same, because with M-. I already asked to show
> me a definition.  Anyway, not worth an argument.

Perhaps your complaint is instead about no definition being shown, even 
though you feel like you already asked Emacs to show one (which the 
fileloop UI does).




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#50067; Package emacs. Full text available.

Message received at 50067 <at> debbugs.gnu.org:


Received: (at 50067) by debbugs.gnu.org; 22 Aug 2021 19:22:37 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Aug 22 15:22:37 2021
Received: from localhost ([127.0.0.1]:39813 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1mHt3A-0008C9-FC
	for submit <at> debbugs.gnu.org; Sun, 22 Aug 2021 15:22:37 -0400
Received: from eggs.gnu.org ([209.51.188.92]:50192)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1mHt35-0008Bu-96
 for 50067 <at> debbugs.gnu.org; Sun, 22 Aug 2021 15:22:31 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e]:54334)
 by eggs.gnu.org with esmtp (Exim 4.90_1)
 (envelope-from <eliz@HIDDEN>)
 id 1mHt2v-00047u-AH; Sun, 22 Aug 2021 15:22:17 -0400
Received: from 84.94.185.95.cable.012.net.il ([84.94.185.95]:4273
 helo=home-c4e4a596f7)
 by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <eliz@HIDDEN>)
 id 1mHt2u-0000y3-PA; Sun, 22 Aug 2021 15:22:17 -0400
Date: Sun, 22 Aug 2021 22:22:01 +0300
Message-Id: <83y28twahy.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Dmitry Gutov <dgutov@HIDDEN>
In-Reply-To: <32ef6b91-107c-d7e5-b103-0ff062bf8ebd@HIDDEN> (message from
 Dmitry Gutov on Sun, 22 Aug 2021 22:11:03 +0300)
Subject: Re: bug#50067: Context menus
References: <83sfz639lh.fsf@HIDDEN> <8735r6ppf0.fsf@HIDDEN>
 <83o89u37gh.fsf@HIDDEN> <87wnohx5zd.fsf@HIDDEN>
 <831r6p3lzc.fsf@HIDDEN> <87o89sh96g.fsf@HIDDEN>
 <837dgg1hdg.fsf@HIDDEN> <87mtpcf79p.fsf@HIDDEN>
 <83zgtcyp2k.fsf@HIDDEN> <E96971E5-818F-4FE6-B702-37F09EDBB073@HIDDEN>
 <YSDKlDe2TiP7G1Gw@HIDDEN> <56454B2B-0250-4BC6-BC26-E1C5579ACF49@HIDDEN>
 <83eeanyrm5.fsf@HIDDEN> <4BC1074D-DE75-4303-8385-B70BAACFCDA0@HIDDEN>
 <83czq7youc.fsf@HIDDEN> <32ef6b91-107c-d7e5-b103-0ff062bf8ebd@HIDDEN>
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 50067
Cc: alan@HIDDEN, mattiase@HIDDEN, juri@HIDDEN,
 homeros.misasa@HIDDEN, tkk@HIDDEN, larsi@HIDDEN,
 50067 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

> Cc: alan@HIDDEN, juri@HIDDEN, homeros.misasa@HIDDEN,
>  tkk@HIDDEN, larsi@HIDDEN, 50067 <at> debbugs.gnu.org
> From: Dmitry Gutov <dgutov@HIDDEN>
> Date: Sun, 22 Aug 2021 22:11:03 +0300
> 
> On 21.08.2021 15:16, Eli Zaretskii wrote:
> >>> I think it may be confusing that the arrow doesn't appear immediately
> >>> after M-., only when you switch from the XREF buffer.
> >> I don't quite follow -- M-. typically doesn't create an*xref*  buffer at all; when it does, it does not follow any of the matches found therein.
> > Oh, so it's only appearing when the tag is shown?  Confusing... but I
> > guess we will have to live with that.
> > 
> 
> What is confusing?

What I described.

> We do the same in Grep and Compilation.

That's not exactly the same, because with M-. I already asked to show
me a definition.  Anyway, not worth an argument.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#50067; Package emacs. Full text available.

Message received at 50067 <at> debbugs.gnu.org:


Received: (at 50067) by debbugs.gnu.org; 22 Aug 2021 19:11:15 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Aug 22 15:11:14 2021
Received: from localhost ([127.0.0.1]:39800 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1mHssE-0007vi-PD
	for submit <at> debbugs.gnu.org; Sun, 22 Aug 2021 15:11:14 -0400
Received: from mail-wr1-f49.google.com ([209.85.221.49]:33560)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <raaahh@HIDDEN>) id 1mHssB-0007vS-MT
 for 50067 <at> debbugs.gnu.org; Sun, 22 Aug 2021 15:11:13 -0400
Received: by mail-wr1-f49.google.com with SMTP id d26so2482755wrc.0
 for <50067 <at> debbugs.gnu.org>; Sun, 22 Aug 2021 12:11:11 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
 h=sender:subject:to:cc:references:from:message-id:date:user-agent
 :mime-version:in-reply-to:content-language:content-transfer-encoding;
 bh=qM5N0606yNOU6FzeVmdNBWSxJCwFZHY2qrtr6vki24c=;
 b=MJyzY4o4Qxba57QKA1uSY+f23+h1ExoQNIksCjNotTsP7LvvmPVAG01i9cqsCXHWnB
 z9q29gXmHrhRut0sxNXVBJBZu77pJkFxU6Ylr9TzfmE+igHiSh2ZT4L7FlCuejtW+h2p
 esoOdcenzqNPtRSazN/NrXSZXcHPdQIm/Xb4X3N7vfiQ9ybcKmNeYorY0WssPjA0d3Uz
 5IhLPFvjVu7VeLDSeDM0ehJRc0PLJhrr+tAdOvrGWOxPJVf4yAam571Du0VV0XBTCX+z
 qvZGahLnxghIKREYAyFwwjy5EWJPHIFwMs2H7oi1TGQoE254PyaXY55cxLGCbHVP4ZTN
 qgFw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:sender:subject:to:cc:references:from:message-id
 :date:user-agent:mime-version:in-reply-to:content-language
 :content-transfer-encoding;
 bh=qM5N0606yNOU6FzeVmdNBWSxJCwFZHY2qrtr6vki24c=;
 b=uP3AnfqPPB8yoFiQoGVTpYtx/Hccg848NjPzkdJNyaHJvtkShnxF5TgnaCY6OTnnrk
 ygpmdZoAlXVJFNYn+Fkq1lMzYjuWEaKXs9jau//f2+gqQuaVsT4DlCVZQWXWbUYj5Cx2
 Ur2XGkqSPvpOtRVRe0O8W9b36lIojkkaz5npTZuSH1tMV5hwX+w7KUWJbbIQC5Zsry+b
 np9H0jS6edDix8PaM1Wv2FR+a8WuVMe2UzdbSm9oi/hAILVh+1qigblgqR4C+OUjWFid
 Kmy4p0k6YGYbrMCx8FIxarpNPJZYP5XK6JBFaSAiImX2uvlFVEmQ4ClkooOh1gsl4vRi
 Dqnw==
X-Gm-Message-State: AOAM530trfhnRqZNd8i/MZUzaWbZzXH4J5+/sF9FmzTFFSA3iDxp7xH4
 XlftHYu6oaIavG3NFq4VEyecwh6cpck=
X-Google-Smtp-Source: ABdhPJwg84X+bxrw15RjhjQ2w5Z5uxjCRXFtrMNecdlz5vaJcWqnN4SBYxgchfpsRNneCKts3F7uOA==
X-Received: by 2002:a05:6000:186:: with SMTP id
 p6mr2002010wrx.210.1629659465815; 
 Sun, 22 Aug 2021 12:11:05 -0700 (PDT)
Received: from [192.168.0.6] ([46.251.119.176])
 by smtp.googlemail.com with ESMTPSA id e11sm12718972wrm.80.2021.08.22.12.11.04
 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128);
 Sun, 22 Aug 2021 12:11:05 -0700 (PDT)
Subject: Re: bug#50067: Context menus
To: Eli Zaretskii <eliz@HIDDEN>, =?UTF-8?Q?Mattias_Engdeg=c3=a5rd?=
 <mattiase@HIDDEN>
References: <83sfz639lh.fsf@HIDDEN> <8735r6ppf0.fsf@HIDDEN>
 <83o89u37gh.fsf@HIDDEN> <87wnohx5zd.fsf@HIDDEN>
 <831r6p3lzc.fsf@HIDDEN> <87o89sh96g.fsf@HIDDEN>
 <837dgg1hdg.fsf@HIDDEN> <87mtpcf79p.fsf@HIDDEN>
 <83zgtcyp2k.fsf@HIDDEN> <E96971E5-818F-4FE6-B702-37F09EDBB073@HIDDEN>
 <YSDKlDe2TiP7G1Gw@HIDDEN> <56454B2B-0250-4BC6-BC26-E1C5579ACF49@HIDDEN>
 <83eeanyrm5.fsf@HIDDEN> <4BC1074D-DE75-4303-8385-B70BAACFCDA0@HIDDEN>
 <83czq7youc.fsf@HIDDEN>
From: Dmitry Gutov <dgutov@HIDDEN>
Message-ID: <32ef6b91-107c-d7e5-b103-0ff062bf8ebd@HIDDEN>
Date: Sun, 22 Aug 2021 22:11:03 +0300
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101
 Thunderbird/78.11.0
MIME-Version: 1.0
In-Reply-To: <83czq7youc.fsf@HIDDEN>
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Language: en-US
Content-Transfer-Encoding: 7bit
X-Spam-Score: 0.4 (/)
X-Debbugs-Envelope-To: 50067
Cc: alan@HIDDEN, juri@HIDDEN, homeros.misasa@HIDDEN,
 tkk@HIDDEN, larsi@HIDDEN, 50067 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.6 (/)

On 21.08.2021 15:16, Eli Zaretskii wrote:
>>> I think it may be confusing that the arrow doesn't appear immediately
>>> after M-., only when you switch from the XREF buffer.
>> I don't quite follow -- M-. typically doesn't create an*xref*  buffer at all; when it does, it does not follow any of the matches found therein.
> Oh, so it's only appearing when the tag is shown?  Confusing... but I
> guess we will have to live with that.
> 

What is confusing? We do the same in Grep and Compilation.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#50067; Package emacs. Full text available.

Message received at 50067 <at> debbugs.gnu.org:


Received: (at 50067) by debbugs.gnu.org; 22 Aug 2021 08:47:23 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Aug 22 04:47:23 2021
Received: from localhost ([127.0.0.1]:38167 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1mHj8V-0000ba-4n
	for submit <at> debbugs.gnu.org; Sun, 22 Aug 2021 04:47:23 -0400
Received: from relay5-d.mail.gandi.net ([217.70.183.197]:52165)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <juri@HIDDEN>) id 1mHj8T-0000bM-PX
 for 50067 <at> debbugs.gnu.org; Sun, 22 Aug 2021 04:47:22 -0400
Received: (Authenticated sender: juri@HIDDEN)
 by relay5-d.mail.gandi.net (Postfix) with ESMTPSA id 6FBA11C0003;
 Sun, 22 Aug 2021 08:47:11 +0000 (UTC)
From: Juri Linkov <juri@HIDDEN>
To: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#50067: Context menus
Organization: LINKOV.NET
References: <74BC00E9-2509-47DA-9428-1523FF7F3B33@HIDDEN>
 <87v942pvcj.fsf@HIDDEN> <83zgte3asy.fsf@HIDDEN>
 <87mtpepqzw.fsf@HIDDEN> <83sfz639lh.fsf@HIDDEN>
 <8735r6ppf0.fsf@HIDDEN> <83o89u37gh.fsf@HIDDEN>
 <87wnohx5zd.fsf@HIDDEN> <831r6p3lzc.fsf@HIDDEN>
 <87o89sh96g.fsf@HIDDEN> <837dgg1hdg.fsf@HIDDEN>
 <87mtpcf79p.fsf@HIDDEN> <83zgtcyp2k.fsf@HIDDEN>
Date: Sun, 22 Aug 2021 11:46:53 +0300
In-Reply-To: <83zgtcyp2k.fsf@HIDDEN> (Eli Zaretskii's message of "Fri, 20 Aug
 2021 20:59:47 +0300")
Message-ID: <87h7fhdfya.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (x86_64-pc-linux-gnu)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 50067
Cc: alan@HIDDEN, mattiase@HIDDEN, homeros.misasa@HIDDEN,
 tkk@HIDDEN, larsi@HIDDEN, 50067 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

>> >> Using a text property would be a good solution.  Should then
>> >> the NS-specific "Select" title be removed in menu.c
>> >> when the title has a special text property?
>> >
>> > I'm not sure I understand what is the NS-specific "Select" title.  Can
>> > you point me to the relevant code?
>> 
>> I meant such patch:
>
> OK, but where in that patch is the NS-specific "Select" title that
> should be removed?

Mattias pushed the NS-specific patch, and I pushed the text property handling.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#50067; Package emacs. Full text available.

Message received at 50067 <at> debbugs.gnu.org:


Received: (at 50067) by debbugs.gnu.org; 22 Aug 2021 08:39:38 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Aug 22 04:39:38 2021
Received: from localhost ([127.0.0.1]:38160 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1mHj10-0000Pf-5f
	for submit <at> debbugs.gnu.org; Sun, 22 Aug 2021 04:39:38 -0400
Received: from relay9-d.mail.gandi.net ([217.70.183.199]:60219)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <juri@HIDDEN>) id 1mHj0y-0000PS-FH
 for 50067 <at> debbugs.gnu.org; Sun, 22 Aug 2021 04:39:37 -0400
Received: (Authenticated sender: juri@HIDDEN)
 by relay9-d.mail.gandi.net (Postfix) with ESMTPSA id 586BEFF804;
 Sun, 22 Aug 2021 08:39:25 +0000 (UTC)
From: Juri Linkov <juri@HIDDEN>
To: Tak Kunihiro <tkk@HIDDEN>
Subject: Re: bug#50067: Context menus
Organization: LINKOV.NET
References: <74BC00E9-2509-47DA-9428-1523FF7F3B33@HIDDEN>
 <87v942pvcj.fsf@HIDDEN>
 <F9F140FE-CB41-432E-BA96-6F1E49BEEB8F@HIDDEN>
 <004A628A-99CC-4C62-8AE2-921C4C38D42A@HIDDEN>
 <87h7fkh8z8.fsf@HIDDEN>
 <060413B6-E0EF-491D-986F-3988C255729F@HIDDEN>
Date: Sun, 22 Aug 2021 11:28:02 +0300
In-Reply-To: <060413B6-E0EF-491D-986F-3988C255729F@HIDDEN>
 (Tak Kunihiro's message of "Sat, 21 Aug 2021 13:43:53 +0900")
Message-ID: <87lf4tews5.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (x86_64-pc-linux-gnu)
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 50067
Cc: Mattias =?iso-8859-1?Q?Engdeg=E5rd?= <mattiase@HIDDEN>,
 Tak Kunihiro <homeros.misasa@HIDDEN>, 50067 <at> debbugs.gnu.org,
 Lars Ingebrigtsen <larsi@HIDDEN>, Alan Third <alan@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

> I’m new to 28 and it will take a while to adopt to it.
> I’m sending comments so far.

Thanks for the comments.

> * Binding
>
> I suggest to assign [drag-mouse-3] as well, as shown below.
>
> (define-key map [mouse-3] context-menu-entry)
> (define-key map [drag-mouse-3] context-menu-entry)

There is no need to bind [drag-mouse-3] because [down-mouse-3] is bound.

> On Mac, I suggest to assign [C-double-mouse-1] as well as shown below.
>
> (define-key map [C-down-mouse-1] #'ignore)
> (define-key map [C-mouse-1] context-menu-entry)
> (define-key map [C-double-mouse-1] context-menu-entry)
> (define-key map [C-triple-mouse-1] context-menu-entry)
> (define-key map [C-drag-mouse-1] context-menu-entry)

I leave this for the users of Mac to decide what would be better on Mac.

> * Error detection system
>
> It is good if the context-menu system is ready for
> an error that occurs on one of context-menu-functions.
> For now, when there is error, Emacs only tells
> `<mouse-3> is undefined'.

I agree, a better error reporting would be nice.  Patches welcome.

> * Long click system
>
> It’s time to discuss long-left-click also as trigger to
> show context menu.
>
> https://lists.gnu.org/archive/html/emacs-devel/2017-11/msg00267.html
> https://lists.gnu.org/archive/html/emacs-devel/2020-09/msg01277.html

I tried to implement this, but soon found that long-left-click is unusable,
because such artificial delay is a hassle - no one would have
patience to wait even half a second until the menu finally appears.
But this could be implemented anyway when users will demand this.

> * Open by other frame
>
> File would be opened by this window. Sometimes I want to open it by
> other frame.  It is good if which window to open, is selectable after
> showing context-menu. I do not know how to do so.

Sorry, I don't understand what menu do you mean, maybe in Dired mode?

> * Details
>
> It is handy to have buffer menu when right click mode bar.

I don't see where buffer-menu-open currently is used on the mode-line.

> (define-key map [remap buffer-menu-open] context-menu-entry)

This gives the error "void-variable map".

> Also it is handy to have frame menu when right click title bar.

I think this is a good idea.

> I do not know how to do so.

I do not know how to do this for the frame title bar.
But currently I'm doing this for the tab bar.

> Also it is nice to show word candidates by ispell when click a word.

Maybe like flyspell-mode?

> ** context-menu-region
>
> All commands belong to `Edit' in menu bar.
> I think `context-menu-edit' sounds better.

I already tried to use your idea to name it `context-menu-edit'.
But the problem is that other functions like context-menu-undo are also
related to editing.  OTOH, some items in context-menu-region don't do
editing such as "Select All" is not editing, "Copy" is not editing, etc.

> Isn't it better to use `menu-bar-edit-menu' as a source rather than
> create a menu from scratch?

I already tried this idea but this menu is already available
in the global menu that already can be enabled by adding
context-menu-global to context-menu-functions.
But maybe `context-menu-edit' could be added as well
from `menu-bar-edit-menu'.

> On paste when there is a region and delete-selection-mode is t, the
> region should be replaced by the text.

Please explain how the region should be replaced by the text,
when mouse-yank-at-click or mouse-yank-primary is used
to paste where the mouse is clicked.  Should it delete the region
and paste where mouse is clicked on another part of the buffer?
What if the mouse is clicked in another window?

> ** no multiple horizontal lines
>
> Sometimes I see double lines on the context menu.  I think that there is
> no useful case to have double lines.  To allow only one horizontal line
> would look cool.

Right, double separators should be removed.

> ** reuse existing menu
>
> I cannot figure out how to include pre-existing menu such for
> (mouse-buffer-menu-map).  To lean how to manipulate menu is not easy.
> It's nice to have an example something like below (does not work).
>
>   (defun context-menu-buffer (menu)
>   "Add a buffer menu entry to MENU."
>     (let ((map (mouse-buffer-menu-map)))
>       (define-key-after menu [buffer] map))
>     menu)

Adding the existing menu is not easy.  There are some examples in
context-menu-global, context-menu-local, context-menu-minor.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#50067; Package emacs. Full text available.

Message received at 50067 <at> debbugs.gnu.org:


Received: (at 50067) by debbugs.gnu.org; 21 Aug 2021 12:17:37 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Aug 21 08:17:37 2021
Received: from localhost ([127.0.0.1]:35966 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1mHPwK-0008As-0K
	for submit <at> debbugs.gnu.org; Sat, 21 Aug 2021 08:17:37 -0400
Received: from eggs.gnu.org ([209.51.188.92]:36292)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1mHPwE-0008Ab-U3
 for 50067 <at> debbugs.gnu.org; Sat, 21 Aug 2021 08:17:30 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e]:43648)
 by eggs.gnu.org with esmtp (Exim 4.90_1)
 (envelope-from <eliz@HIDDEN>)
 id 1mHPw3-0001bf-Bt; Sat, 21 Aug 2021 08:17:15 -0400
Received: from 84.94.185.95.cable.012.net.il ([84.94.185.95]:3914
 helo=home-c4e4a596f7)
 by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <eliz@HIDDEN>)
 id 1mHPw2-0005qe-R3; Sat, 21 Aug 2021 08:17:15 -0400
Date: Sat, 21 Aug 2021 15:16:59 +0300
Message-Id: <83czq7youc.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Mattias =?utf-8?Q?Engdeg=C3=A5rd?= <mattiase@HIDDEN>
In-Reply-To: <4BC1074D-DE75-4303-8385-B70BAACFCDA0@HIDDEN> (message from
 Mattias =?utf-8?Q?Engdeg=C3=A5rd?= on Sat, 21 Aug 2021 13:45:08 +0200)
Subject: Re: bug#50067: Context menus
References: <83sfz639lh.fsf@HIDDEN> <8735r6ppf0.fsf@HIDDEN>
 <83o89u37gh.fsf@HIDDEN> <87wnohx5zd.fsf@HIDDEN>
 <831r6p3lzc.fsf@HIDDEN> <87o89sh96g.fsf@HIDDEN>
 <837dgg1hdg.fsf@HIDDEN> <87mtpcf79p.fsf@HIDDEN>
 <83zgtcyp2k.fsf@HIDDEN> <E96971E5-818F-4FE6-B702-37F09EDBB073@HIDDEN>
 <YSDKlDe2TiP7G1Gw@HIDDEN> <56454B2B-0250-4BC6-BC26-E1C5579ACF49@HIDDEN>
 <83eeanyrm5.fsf@HIDDEN> <4BC1074D-DE75-4303-8385-B70BAACFCDA0@HIDDEN>
MIME-version: 1.0
Content-type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 50067
Cc: alan@HIDDEN, juri@HIDDEN, homeros.misasa@HIDDEN,
 tkk@HIDDEN, larsi@HIDDEN, 50067 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

> From: Mattias Engdegård <mattiase@HIDDEN>
> Date: Sat, 21 Aug 2021 13:45:08 +0200
> Cc: alan@HIDDEN, juri@HIDDEN, 50067 <at> debbugs.gnu.org,
>         homeros.misasa@HIDDEN, tkk@HIDDEN, larsi@HIDDEN
> 
> 21 aug. 2021 kl. 13.17 skrev Eli Zaretskii <eliz@HIDDEN>:
> 
> > I think it may be confusing that the arrow doesn't appear immediately
> > after M-., only when you switch from the XREF buffer.
> 
> I don't quite follow -- M-. typically doesn't create an *xref* buffer at all; when it does, it does not follow any of the matches found therein.

Oh, so it's only appearing when the tag is shown?  Confusing... but I
guess we will have to live with that.

> The arrow indicates the latest match reference that has been followed to its target, in the same way as in compile, grep and occur buffers. In neither of these buffers the arrow appears immediately.

Got it.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#50067; Package emacs. Full text available.

Message received at 50067 <at> debbugs.gnu.org:


Received: (at 50067) by debbugs.gnu.org; 21 Aug 2021 11:45:30 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Aug 21 07:45:30 2021
Received: from localhost ([127.0.0.1]:35934 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1mHPRG-0007JX-4W
	for submit <at> debbugs.gnu.org; Sat, 21 Aug 2021 07:45:30 -0400
Received: from mail1449c50.megamailservers.eu ([91.136.14.49]:59080
 helo=mail265c50.megamailservers.eu)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <mattiase@HIDDEN>) id 1mHPRA-0007J8-MO
 for 50067 <at> debbugs.gnu.org; Sat, 21 Aug 2021 07:45:25 -0400
X-Authenticated-User: mattiase@HIDDEN
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=megamailservers.eu;
 s=maildub; t=1629546313;
 bh=Tnc8mjbekW2VF75yVpeMiQ3OUqUSNtwUDv8DUZ4nvMc=;
 h=Subject:From:In-Reply-To:Date:Cc:References:To:From;
 b=l7mtNWzQZ+IvZJMTofAayrSDSY8cfo7dJyXp3S/sKuW4vw7h7kdQ5PR4mWh/NF5zT
 zZkh7GHFppVW01rbRHdvwQn8C1GlRhDx+w9ch4UzYJUNWUTffeFKHmT7aOuhXjH9s5
 jA3O0hSvo+KDJxNVja9U1MPmmIwGiW7asJ5ogvtg=
Feedback-ID: mattiase@HIDDEN
Received: from [192.168.0.4] (c188-150-171-71.bredband.tele2.se
 [188.150.171.71]) (authenticated bits=0)
 by mail265c50.megamailservers.eu (8.14.9/8.13.1) with ESMTP id 17LBj8xd031513; 
 Sat, 21 Aug 2021 11:45:10 +0000
Content-Type: text/plain;
	charset=us-ascii
Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.21\))
Subject: Re: bug#50067: Context menus
From: =?utf-8?Q?Mattias_Engdeg=C3=A5rd?= <mattiase@HIDDEN>
In-Reply-To: <83eeanyrm5.fsf@HIDDEN>
Date: Sat, 21 Aug 2021 13:45:08 +0200
Content-Transfer-Encoding: quoted-printable
Message-Id: <4BC1074D-DE75-4303-8385-B70BAACFCDA0@HIDDEN>
References: <83sfz639lh.fsf@HIDDEN> <8735r6ppf0.fsf@HIDDEN>
 <83o89u37gh.fsf@HIDDEN> <87wnohx5zd.fsf@HIDDEN>
 <831r6p3lzc.fsf@HIDDEN> <87o89sh96g.fsf@HIDDEN>
 <837dgg1hdg.fsf@HIDDEN> <87mtpcf79p.fsf@HIDDEN>
 <83zgtcyp2k.fsf@HIDDEN> <E96971E5-818F-4FE6-B702-37F09EDBB073@HIDDEN>
 <YSDKlDe2TiP7G1Gw@HIDDEN> <56454B2B-0250-4BC6-BC26-E1C5579ACF49@HIDDEN>
 <83eeanyrm5.fsf@HIDDEN>
To: Eli Zaretskii <eliz@HIDDEN>
X-Mailer: Apple Mail (2.3445.104.21)
X-CTCH-RefID: str=0001.0A742F24.6120E749.0009, ss=1, re=0.000, recu=0.000,
 reip=0.000, cl=1, cld=1, fgs=0
X-CTCH-VOD: Unknown
X-CTCH-Spam: Unknown
X-CTCH-Score: 0.000
X-CTCH-Rules: 
X-CTCH-Flags: 0
X-CTCH-ScoreCust: 0.000
X-CSC: 0
X-CHA: v=2.3 cv=K5pc4BeI c=1 sm=1 tr=0 a=SF+I6pRkHZhrawxbOkkvaA==:117
 a=SF+I6pRkHZhrawxbOkkvaA==:17 a=kj9zAlcOel0A:10 a=M51BFTxLslgA:10
 a=mDV3o1hIAAAA:8 a=_IId-rHdyO6W3HKXrF8A:9 a=CjuIK1q_8ugA:10
 a=_FVE-zBwftR9WsbkzFJk:22
X-Origin-Country: SE
X-Spam-Score: 1.4 (+)
X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org",
 has NOT identified this incoming email as spam.  The original
 message has been attached to this so you can view it or label
 similar future email.  If you have any questions, see
 the administrator of that system for details.
 Content preview:  21 aug. 2021 kl. 13.17 skrev Eli Zaretskii <eliz@HIDDEN>:
 > I think it may be confusing that the arrow doesn't appear immediately >
 after M-., only when you switch from the XREF buffer. I don't quite follow
 -- M-. typically doesn't create an *xref* buffer at all; when it does, it
 does not follow any of the matches found therein. 
 Content analysis details:   (1.4 points, 10.0 required)
 pts rule name              description
 ---- ---------------------- --------------------------------------------------
 0.0 SPF_HELO_NONE          SPF: HELO does not publish an SPF Record
 1.0 SPF_SOFTFAIL           SPF: sender does not match SPF record (softfail)
 0.4 KHOP_HELO_FCRDNS       Relay HELO differs from its IP's reverse DNS
X-Debbugs-Envelope-To: 50067
Cc: alan@HIDDEN, juri@HIDDEN, homeros.misasa@HIDDEN,
 tkk@HIDDEN, larsi@HIDDEN, 50067 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.0 (/)

21 aug. 2021 kl. 13.17 skrev Eli Zaretskii <eliz@HIDDEN>:

> I think it may be confusing that the arrow doesn't appear immediately
> after M-., only when you switch from the XREF buffer.

I don't quite follow -- M-. typically doesn't create an *xref* buffer at =
all; when it does, it does not follow any of the matches found therein.

The arrow indicates the latest match reference that has been followed to =
its target, in the same way as in compile, grep and occur buffers. In =
neither of these buffers the arrow appears immediately.





Information forwarded to bug-gnu-emacs@HIDDEN:
bug#50067; Package emacs. Full text available.

Message received at 50067 <at> debbugs.gnu.org:


Received: (at 50067) by debbugs.gnu.org; 21 Aug 2021 11:17:39 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Aug 21 07:17:39 2021
Received: from localhost ([127.0.0.1]:35924 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1mHP0I-0004Qe-UO
	for submit <at> debbugs.gnu.org; Sat, 21 Aug 2021 07:17:39 -0400
Received: from eggs.gnu.org ([209.51.188.92]:58170)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1mHP0H-0004QR-AS
 for 50067 <at> debbugs.gnu.org; Sat, 21 Aug 2021 07:17:34 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e]:42632)
 by eggs.gnu.org with esmtp (Exim 4.90_1)
 (envelope-from <eliz@HIDDEN>)
 id 1mHP06-0002pB-1L; Sat, 21 Aug 2021 07:17:22 -0400
Received: from 84.94.185.95.cable.012.net.il ([84.94.185.95]:4207
 helo=home-c4e4a596f7)
 by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <eliz@HIDDEN>)
 id 1mHP05-0005E7-KM; Sat, 21 Aug 2021 07:17:21 -0400
Date: Sat, 21 Aug 2021 14:17:06 +0300
Message-Id: <83eeanyrm5.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Mattias =?utf-8?Q?Engdeg=C3=A5rd?= <mattiase@HIDDEN>
In-Reply-To: <56454B2B-0250-4BC6-BC26-E1C5579ACF49@HIDDEN> (message from
 Mattias =?utf-8?Q?Engdeg=C3=A5rd?= on Sat, 21 Aug 2021 12:57:23 +0200)
Subject: Re: bug#50067: Context menus
References: <83sfz639lh.fsf@HIDDEN> <8735r6ppf0.fsf@HIDDEN>
 <83o89u37gh.fsf@HIDDEN> <87wnohx5zd.fsf@HIDDEN>
 <831r6p3lzc.fsf@HIDDEN> <87o89sh96g.fsf@HIDDEN>
 <837dgg1hdg.fsf@HIDDEN> <87mtpcf79p.fsf@HIDDEN>
 <83zgtcyp2k.fsf@HIDDEN> <E96971E5-818F-4FE6-B702-37F09EDBB073@HIDDEN>
 <YSDKlDe2TiP7G1Gw@HIDDEN> <56454B2B-0250-4BC6-BC26-E1C5579ACF49@HIDDEN>
MIME-version: 1.0
Content-type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 50067
Cc: alan@HIDDEN, juri@HIDDEN, homeros.misasa@HIDDEN,
 tkk@HIDDEN, larsi@HIDDEN, 50067 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

> From: Mattias Engdegård <mattiase@HIDDEN>
> Date: Sat, 21 Aug 2021 12:57:23 +0200
> Cc: Eli Zaretskii <eliz@HIDDEN>, Juri Linkov <juri@HIDDEN>,
>         50067 <at> debbugs.gnu.org, Tak Kunihiro <homeros.misasa@HIDDEN>,
>         tkk@HIDDEN, Lars Ingebrigtsen <larsi@HIDDEN>
> 
> (Reply to multiple messages)
> 
> * A fringe arrow is now used to indicate the current position in the *xref* buffer

I think it may be confusing that the arrow doesn't appear immediately
after M-., only when you switch from the XREF buffer.

Thanks.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#50067; Package emacs. Full text available.

Message received at 50067 <at> debbugs.gnu.org:


Received: (at 50067) by debbugs.gnu.org; 21 Aug 2021 10:57:42 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Aug 21 06:57:41 2021
Received: from localhost ([127.0.0.1]:35901 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1mHOgz-0003um-NW
	for submit <at> debbugs.gnu.org; Sat, 21 Aug 2021 06:57:41 -0400
Received: from mail202c50.megamailservers.eu ([91.136.10.212]:49814
 helo=mail193c50.megamailservers.eu)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <mattiase@HIDDEN>) id 1mHOgt-0003uY-2a
 for 50067 <at> debbugs.gnu.org; Sat, 21 Aug 2021 06:57:35 -0400
X-Authenticated-User: mattiase@HIDDEN
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=megamailservers.eu;
 s=maildub; t=1629543448;
 bh=Sx5FHpeyjrTmCR6Kp3RamaYgo6GPZ2UIvE1Owlv6hB0=;
 h=Subject:From:In-Reply-To:Date:Cc:References:To:From;
 b=MbWWLbQGnEJeA9KRq76VwXHqvu9B4iSKo70kMcoavIsxTcVwqjZOURLdexz8IqB0E
 9Rfz83g54mcZ0BEgx52wWwsQtrGzeaZVzRuX9eV9Z8XjcJCy1lMLOTEjxla/4tW9yb
 cougcajLJxyZ+pNMU3yrX4B/2zJc+BP5Z7ZEiLkU=
Feedback-ID: mattiase@HIDDEN
Received: from [192.168.0.4] (c188-150-171-71.bredband.tele2.se
 [188.150.171.71]) (authenticated bits=0)
 by mail193c50.megamailservers.eu (8.14.9/8.13.1) with ESMTP id 17LAvNZA026257; 
 Sat, 21 Aug 2021 10:57:25 +0000
Content-Type: text/plain;
	charset=us-ascii
Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.21\))
Subject: Re: bug#50067: Context menus
From: =?utf-8?Q?Mattias_Engdeg=C3=A5rd?= <mattiase@HIDDEN>
In-Reply-To: <YSDKlDe2TiP7G1Gw@HIDDEN>
Date: Sat, 21 Aug 2021 12:57:23 +0200
Content-Transfer-Encoding: quoted-printable
Message-Id: <56454B2B-0250-4BC6-BC26-E1C5579ACF49@HIDDEN>
References: <83sfz639lh.fsf@HIDDEN> <8735r6ppf0.fsf@HIDDEN>
 <83o89u37gh.fsf@HIDDEN> <87wnohx5zd.fsf@HIDDEN>
 <831r6p3lzc.fsf@HIDDEN> <87o89sh96g.fsf@HIDDEN>
 <837dgg1hdg.fsf@HIDDEN> <87mtpcf79p.fsf@HIDDEN>
 <83zgtcyp2k.fsf@HIDDEN> <E96971E5-818F-4FE6-B702-37F09EDBB073@HIDDEN>
 <YSDKlDe2TiP7G1Gw@HIDDEN>
To: Alan Third <alan@HIDDEN>
X-Mailer: Apple Mail (2.3445.104.21)
X-CTCH-RefID: str=0001.0A742F1B.6120DC18.001E, ss=1, re=0.000, recu=0.000,
 reip=0.000, cl=1, cld=1, fgs=0
X-CTCH-VOD: Unknown
X-CTCH-Spam: Unknown
X-CTCH-Score: 0.000
X-CTCH-Rules: 
X-CTCH-Flags: 0
X-CTCH-ScoreCust: 0.000
X-CSC: 0
X-CHA: v=2.3 cv=GJV27dFK c=1 sm=1 tr=0 a=SF+I6pRkHZhrawxbOkkvaA==:117
 a=SF+I6pRkHZhrawxbOkkvaA==:17 a=kj9zAlcOel0A:10 a=M51BFTxLslgA:10
 a=hIj89exaAAAA:8 a=vaJtXVxTAAAA:8 a=SlV3f15FWa3tu2RXqD0A:9
 a=CjuIK1q_8ugA:10 a=lS9wXHQM5UdnNJ4u63Ry:22
X-Origin-Country: SE
X-Spam-Score: 1.0 (+)
X-Debbugs-Envelope-To: 50067
Cc: Juri Linkov <juri@HIDDEN>, Tak Kunihiro <homeros.misasa@HIDDEN>,
 tkk@HIDDEN, Lars Ingebrigtsen <larsi@HIDDEN>,
 50067 <at> debbugs.gnu.org, Eli Zaretskii <eliz@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.0 (/)

(Reply to multiple messages)

21 aug. 2021 kl. 11.42 skrev Alan Third <alan@HIDDEN>:

> GNUstep, and I believe NEXTstep and old school macOS, allows you to
> "tear off" menus and leave them on screen as sort of custom toolbars.
> Hence the title on each menu.
>=20
> Emacs doesn't support this with the main menus (it was the source of a
> crash, so I removed it), but I don't know if it's something we should
> support. I suspect not because once Emacs updates the menus it
> probably can't handle clicks on old ones.

Thank you, I pushed the removal of the default "Select" title: titles =
will still be there if given explicitly. If this causes trouble for =
Gnustep, then we'll reinsert the default title for that platform only.

21 aug. 2021 kl. 01.31 skrev Dmitry Gutov <dgutov@HIDDEN>:

>> * If I start emacs -Q and enable context-menu-mode, right-clicking on =
an identifier in an elisp buffer still doesn't produce the Find =
Definition entry, presumably because xref hasn't been loaded. Shouldn't =
it be arranged to be autoloaded somehow, which is how xref works when =
invoked by keystrokes?
>=20
> I wonder what could be the reason for that. It would seem the menu =
should handle autoloaded commands fine. Even the visibility predicate =
should work: xref-find-backend is autoloaded as well.

It was just a (featurep 'xref) test which didn't seem to be needed; as =
you say, all the functions involved are autoloaded and I have verified =
that xref will indeed be loaded when the menu is used the first time. =
Pushed to master.

>> * `xref-make-match` requires (contrary to its doc string) its =
LOCATION argument to be of type `xref-file-location`, but some backends =
may only be able to make an `xref-buffer-location`. Would anyone object =
to changing the :location slot of `xref-match-item` to have type =
`xref-location`? I don't see how it could hurt.
>=20
> Makes sense to me, seems like an accident. I've done this change =
locally, no obvious bugs fell out.

Thank you, fixed on master.

Also pushed:

* Previous patch that adds "Find References" to the menu; it seemed to =
be the right thing to do.
* A fringe arrow is now used to indicate the current position in the =
*xref* buffer
* Messages added to assuage the boredom of users while searching for =
references. Could be moved, rephrased, made optional or removed =
altogether, but it did look a lot better than freezing for a long time.





Information forwarded to bug-gnu-emacs@HIDDEN:
bug#50067; Package emacs. Full text available.

Message received at 50067 <at> debbugs.gnu.org:


Received: (at 50067) by debbugs.gnu.org; 21 Aug 2021 09:43:04 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Aug 21 05:43:04 2021
Received: from localhost ([127.0.0.1]:35857 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1mHNWm-0001ze-IL
	for submit <at> debbugs.gnu.org; Sat, 21 Aug 2021 05:43:04 -0400
Received: from outbound.soverin.net ([116.202.126.228]:38211)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <alan@HIDDEN>) id 1mHNWh-0001z1-Ck
 for 50067 <at> debbugs.gnu.org; Sat, 21 Aug 2021 05:42:59 -0400
Received: from smtp.soverin.net (unknown [10.10.3.24])
 (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits))
 (No client certificate requested)
 by outbound.soverin.net (Postfix) with ESMTPS id 55BD1272;
 Sat, 21 Aug 2021 09:42:49 +0000 (UTC)
Received: from smtp.soverin.net (smtp.soverin.net [159.69.232.138]) by
 soverin.net
DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=idiocy.org; s=soverin;
 t=1629538967; bh=INnfDYhuFbnA9ra1r+ayc+E+CTuA6HiGbSuEj7lvsug=;
 h=Date:From:To:Cc:Subject:References:In-Reply-To:From;
 b=hpOp4UrNK47jIfewCBtF1vJ4ra5K0uQzRe/f71sjJMn+fjQTRbVB6w2dNtr4EbmVj
 U68KEZ3o2KkIR3nMs66vV9hsbYz1wfETh37DJvngrpBgqJdVD2/JSqraxVdnosZO9m
 oez0pFEiuc/gImY9XfA4iWHRUeU2hm4VnTRjpjLVyVhVMtYQ8+XnOVOxaWPFAPiMcv
 N/SK+89ZQKHEH9U5RjQPJW0pZS1BjS6PkdIjakp5yfKGOk72+m+GOm7QclF1CS9Twa
 MYxYRaGxPlyciHSmqyqRSIBFKovMdt/LiB3Tg0QL5IQ/CQZ4nTNay6suRcOoxYieo6
 +zZgQtS5PWQsg==
Received: from alan by faroe.holly.idiocy.org with local (Exim 4.94.2)
 (envelope-from <alan@HIDDEN>)
 id 1mHNWW-000hDe-7z; Sat, 21 Aug 2021 10:42:44 +0100
Date: Sat, 21 Aug 2021 10:42:44 +0100
From: Alan Third <alan@HIDDEN>
To: Mattias =?iso-8859-1?Q?Engdeg=E5rd?= <mattiase@HIDDEN>
Subject: Re: bug#50067: Context menus
Message-ID: <YSDKlDe2TiP7G1Gw@HIDDEN>
Mail-Followup-To: Alan Third <alan@HIDDEN>,
 Mattias =?iso-8859-1?Q?Engdeg=E5rd?= <mattiase@HIDDEN>,
 Eli Zaretskii <eliz@HIDDEN>, Juri Linkov <juri@HIDDEN>,
 50067 <at> debbugs.gnu.org, homeros.misasa@HIDDEN,
 tkk@HIDDEN, larsi@HIDDEN
References: <83sfz639lh.fsf@HIDDEN> <8735r6ppf0.fsf@HIDDEN>
 <83o89u37gh.fsf@HIDDEN> <87wnohx5zd.fsf@HIDDEN>
 <831r6p3lzc.fsf@HIDDEN> <87o89sh96g.fsf@HIDDEN>
 <837dgg1hdg.fsf@HIDDEN> <87mtpcf79p.fsf@HIDDEN>
 <83zgtcyp2k.fsf@HIDDEN>
 <E96971E5-818F-4FE6-B702-37F09EDBB073@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=iso-8859-1
Content-Disposition: inline
Content-Transfer-Encoding: 8bit
In-Reply-To: <E96971E5-818F-4FE6-B702-37F09EDBB073@HIDDEN>
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 50067
Cc: Juri Linkov <juri@HIDDEN>, homeros.misasa@HIDDEN,
 tkk@HIDDEN, larsi@HIDDEN, 50067 <at> debbugs.gnu.org,
 Eli Zaretskii <eliz@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

On Fri, Aug 20, 2021 at 09:29:47PM +0200, Mattias Engdegrd wrote:
> 20 aug. 2021 kl. 19.59 skrev Eli Zaretskii <eliz@HIDDEN>:
> 
> > OK, but where in that patch is the NS-specific "Select" title that
> > should be removed?
> 
> I'm not Juri, but the following patch removes the default "Select"
> title used by the NS port. Not sure why it was ever added -- perhaps
> something Gnustep-specific? Works well with Cocoa in any case.

GNUstep, and I believe NEXTstep and old school macOS, allows you to
"tear off" menus and leave them on screen as sort of custom toolbars.
Hence the title on each menu.

Emacs doesn't support this with the main menus (it was the source of a
crash, so I removed it), but I don't know if it's something we should
support. I suspect not because once Emacs updates the menus it
probably can't handle clicks on old ones.
-- 
Alan Third




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#50067; Package emacs. Full text available.

Message received at 50067 <at> debbugs.gnu.org:


Received: (at 50067) by debbugs.gnu.org; 21 Aug 2021 06:33:48 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Aug 21 02:33:48 2021
Received: from localhost ([127.0.0.1]:35771 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1mHKZg-0005sa-IM
	for submit <at> debbugs.gnu.org; Sat, 21 Aug 2021 02:33:48 -0400
Received: from mail-pf1-f174.google.com ([209.85.210.174]:46617)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <homeros.misasa@HIDDEN>) id 1mHKZf-0005sN-2W
 for 50067 <at> debbugs.gnu.org; Sat, 21 Aug 2021 02:33:47 -0400
Received: by mail-pf1-f174.google.com with SMTP id y11so10546091pfl.13
 for <50067 <at> debbugs.gnu.org>; Fri, 20 Aug 2021 23:33:47 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
 h=from:to:cc:cc:subject:references:date:in-reply-to:message-id
 :user-agent:mime-version;
 bh=pVmYReLNIYVnRYPWyFdzGrW2WcwGz5dylzRsQ6eAJ1E=;
 b=p/LS4PgdY2ZbmBgJml40q3Cgrw8RUcIsvLXBc475dSkZgQtWyXAsEZfEaurmmCoNGd
 /OoVnolSLzl+w4azs2D53CVxPGa+xiTZesKAmMU77UlVZq/sO+Z4bFPji4+/yNe4QmQt
 xaHytfxsKm+A27mTT3QwiKP+gCltroNz4WFJP2ghnmCd647NJEFA3dDUHmOilvvBlb0j
 at6bMLOzmSYPQoz3xSJXiIYvEF6cuzFpldv5ysSVK/0mzPIPq579rKeoESfbh9w7noFX
 AlwzFDcK7bL2C952ImbE/YzUfwpPGoPO7hGF2yp46uiV2GAyg94XhhXxJywBxmrKaWYP
 IOYQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:from:to:cc:cc:subject:references:date
 :in-reply-to:message-id:user-agent:mime-version;
 bh=pVmYReLNIYVnRYPWyFdzGrW2WcwGz5dylzRsQ6eAJ1E=;
 b=HYjhG04xxIvWjCfn2qJCxqok8Z7xZ5E2kwdSYBAE5403ENFCoLKrnqHMzKEx5oV0im
 kvI5I+Vn7ri2vY6kphK04VspCj0HTU7mb+CU2XJBED02O4xLOEuEd6kTkOPVlwMFjMwB
 89Rm+wus0/P/SN2qFyg3KXItpBnAm4wWhBP5Fas0PCdASD1GDBkPddEH+vZmjh8xsGo8
 oKK/Ecp5S8LwGD9F4tQdBrhAgPDbtOxYrCy/DbJ/DXxFlx8IF4KuF4TBcwGCVTFOeDRB
 a/+xFJGtYUxjphaox6XGKqRY1ar4f/z5UeGWqMMptFTW40/f/47kEgUrw94oms9/2Bfy
 DCnw==
X-Gm-Message-State: AOAM531/ZjzZ8bWPcjPCssAJZ2JWIIlU+ScInEANGafTUGpcswV9Vpr8
 6R9OPkTf//R2/1Br7yY/v+U=
X-Google-Smtp-Source: ABdhPJzwa/krkZ5XIsk1LW3FFNQarMCsXEnR9FkqC6mO1Snsk2b/MnCjDxG+uPr+64ocqKhDwog1YA==
X-Received: by 2002:a63:db4a:: with SMTP id x10mr8402320pgi.30.1629527621220; 
 Fri, 20 Aug 2021 23:33:41 -0700 (PDT)
Received: from thinkless2017 (vesta.misasa.okayama-u.ac.jp. [150.46.48.154])
 by smtp.gmail.com with ESMTPSA id j13sm10203161pgp.29.2021.08.20.23.33.38
 (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256);
 Fri, 20 Aug 2021 23:33:40 -0700 (PDT)
From: Tak Kunihiro <homeros.misasa@HIDDEN>
X-Google-Original-From: Tak Kunihiro <tkk@HIDDEN>
To: Juri Linkov <juri@HIDDEN>
Subject: Re: bug#50067: Context menus
References: <74BC00E9-2509-47DA-9428-1523FF7F3B33@HIDDEN>
 <87v942pvcj.fsf@HIDDEN>
 <F9F140FE-CB41-432E-BA96-6F1E49BEEB8F@HIDDEN>
 <004A628A-99CC-4C62-8AE2-921C4C38D42A@HIDDEN>
 <87h7fkh8z8.fsf@HIDDEN>
 <060413B6-E0EF-491D-986F-3988C255729F@HIDDEN>
Date: Sat, 21 Aug 2021 15:33:36 +0900
In-Reply-To: <060413B6-E0EF-491D-986F-3988C255729F@HIDDEN>
 (Tak Kunihiro's message of "Sat, 21 Aug 2021 13:43:53 +0900")
Message-ID: <86eeane27z.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (windows-nt)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: 50067
Cc: Alan Third <alan@HIDDEN>,
 Mattias =?utf-8?Q?Engdeg=C3=A5rd?= <mattiase@HIDDEN>,
 Tak Kunihiro <homeros.misasa@HIDDEN>, tkk@HIDDEN,
 Lars Ingebrigtsen <larsi@HIDDEN>, 50067 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

** context-menu-region

All commands belong to `Edit' in menu bar.
I think `context-menu-edit' sounds better.

Isn't it better to use `menu-bar-edit-menu' as a source rather than
create a menu from scratch?

On paste when there is a region and delete-selection-mode is t, the
region should be replaced by the text.

** no multiple horizontal lines

Sometimes I see double lines on the context menu.  I think that there is
no useful case to have double lines.  To allow only one horizontal line
would look cool.

** reuse existing menu

I cannot figure out how to include pre-existing menu such for
(mouse-buffer-menu-map).  To lean how to manipulate menu is not easy.
It's nice to have an example something like below (does not work).

  (defun context-menu-buffer (menu)
  "Add a buffer menu entry to MENU."
    (let ((map (mouse-buffer-menu-map)))
      (define-key-after menu [buffer] map))
    menu)




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#50067; Package emacs. Full text available.

Message received at 50067 <at> debbugs.gnu.org:


Received: (at 50067) by debbugs.gnu.org; 21 Aug 2021 04:44:15 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Aug 21 00:44:15 2021
Received: from localhost ([127.0.0.1]:35727 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1mHIre-00037l-Nl
	for submit <at> debbugs.gnu.org; Sat, 21 Aug 2021 00:44:14 -0400
Received: from mx0b-00602c01.pphosted.com ([205.220.174.65]:15694)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <prvs=98672ccd24=tkk@HIDDEN>)
 id 1mHIrc-00037b-H6
 for 50067 <at> debbugs.gnu.org; Sat, 21 Aug 2021 00:44:13 -0400
Received: from pps.filterd (m0238152.ppops.net [127.0.0.1])
 by mx0a-00602c01.pphosted.com (8.16.1.2/8.16.1.2) with SMTP id 17L0SvHf003467; 
 Sat, 21 Aug 2021 13:44:00 +0900
Received: from mlsec.cc.okayama-u.ac.jp (mlsec.cc.okayama-u.ac.jp
 [150.46.12.254])
 by mx0a-00602c01.pphosted.com with ESMTP id 3ajfv18fbp-1
 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT);
 Sat, 21 Aug 2021 13:43:59 +0900
Received: from jlsv301.okayama-u.ac.jp (unknown [150.46.12.5]) by
 mlsec.cc.okayama-u.ac.jp with smtp
 id 0969_24e9_8457054b_472a_4eba_959e_a0cc623c7693;
 Sat, 21 Aug 2021 13:43:53 +0900
Received: from smtpclient.apple (unknown [172.24.1.212])
 by jlsv301.okayama-u.ac.jp (Postfix) with ESMTPSA id 6B32E7604A1;
 Sat, 21 Aug 2021 13:43:53 +0900 (JST)
Content-Type: text/plain;
	charset=utf-8
Mime-Version: 1.0 (Mac OS X Mail 14.0 \(3654.120.0.1.13\))
Subject: Re: bug#50067: Context menus
From: Tak Kunihiro <tkk@HIDDEN>
In-Reply-To: <87h7fkh8z8.fsf@HIDDEN>
Date: Sat, 21 Aug 2021 13:43:53 +0900
Content-Transfer-Encoding: quoted-printable
Message-Id: <060413B6-E0EF-491D-986F-3988C255729F@HIDDEN>
References: <74BC00E9-2509-47DA-9428-1523FF7F3B33@HIDDEN>
 <87v942pvcj.fsf@HIDDEN>
 <F9F140FE-CB41-432E-BA96-6F1E49BEEB8F@HIDDEN>
 <004A628A-99CC-4C62-8AE2-921C4C38D42A@HIDDEN>
 <87h7fkh8z8.fsf@HIDDEN>
To: Juri Linkov <juri@HIDDEN>
X-Mailer: Apple Mail (2.3654.120.0.1.13)
X-NAI-Spam-Flag: NO
X-NAI-Spam-Level: 
X-NAI-Spam-Threshold: 11
X-NAI-Spam-Score: 0.1
X-NAI-Spam-Rules: 5 Rules triggered
 GME_TWTRE=0.1, EDT_SA_AU_PASS=0, EDT_SA_DN_PASS=0, EDT_SA_TS_PASS=0, 
 RV6962=0
X-NAI-Spam-Version: 2.3.0.9418 : core <6962> : inlines <7226> : streams
 <1899423> : uri <3309156>
X-Proofpoint-GUID: nzuWp7V7D5spGkr30uYOM5e9sOg9cO-0
X-Proofpoint-ORIG-GUID: nzuWp7V7D5spGkr30uYOM5e9sOg9cO-0
X-Proofpoint-Virus-Version: vendor=nai engine=6300 definitions=10082
 signatures=668682
X-Proofpoint-Spam-Details: rule=outbound_spam_notspam policy=outbound_spam
 score=0 bulkscore=0
 phishscore=0 mlxscore=0 spamscore=0 clxscore=1011 lowpriorityscore=0
 mlxlogscore=999 impostorscore=0 suspectscore=0 malwarescore=0 adultscore=0
 priorityscore=1501 classifier=spam adjust=0 reason=mlx scancount=1
 engine=8.12.0-2107140000 definitions=main-2108210026
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 50067
Cc: Alan Third <alan@HIDDEN>,
 =?utf-8?Q?Mattias_Engdeg=C3=A5rd?= <mattiase@HIDDEN>,
 Tak Kunihiro <homeros.misasa@HIDDEN>,
 =?utf-8?B?5Zu95bqD5Y2T5Lmf?= <tkk@HIDDEN>,
 Lars Ingebrigtsen <larsi@HIDDEN>, 50067 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

I=E2=80=99m new to 28 and it will take a while to adopt to it.
I=E2=80=99m sending comments so far.

* Binding

I suggest to assign [drag-mouse-3] as well, as shown below.

(define-key map [mouse-3] context-menu-entry)
(define-key map [drag-mouse-3] context-menu-entry)
=20
On Mac, I suggest to assign [C-double-mouse-1] as well as shown below.

(define-key map [C-down-mouse-1] #'ignore)
(define-key map [C-mouse-1] context-menu-entry)
(define-key map [C-double-mouse-1] context-menu-entry)
(define-key map [C-triple-mouse-1] context-menu-entry)
(define-key map [C-drag-mouse-1] context-menu-entry)

* Error detection system

It is good if the context-menu system is ready for
an error that occurs on one of context-menu-functions.
For now, when there is error, Emacs only tells
`<mouse-3> is undefined'.

* Long click system

It=E2=80=99s time to discuss long-left-click also as trigger to
show context menu.

https://lists.gnu.org/archive/html/emacs-devel/2017-11/msg00267.html
https://lists.gnu.org/archive/html/emacs-devel/2020-09/msg01277.html

* Open by other frame

File would be opened by this window. Sometimes I want to open it by
other frame.  It is good if which window to open, is selectable after
showing context-menu. I do not know how to do so.

* Details

It is handy to have buffer menu when right click mode bar.

(define-key map [remap buffer-menu-open] context-menu-entry)

Also it is handy to have frame menu when right click title bar.
I do not know how to do so.

Also it is nice to show word candidates by ispell when click a word.





Information forwarded to bug-gnu-emacs@HIDDEN:
bug#50067; Package emacs. Full text available.

Message received at 50067 <at> debbugs.gnu.org:


Received: (at 50067) by debbugs.gnu.org; 20 Aug 2021 23:32:04 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Aug 20 19:32:03 2021
Received: from localhost ([127.0.0.1]:35677 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1mHDzX-0004Lb-Kr
	for submit <at> debbugs.gnu.org; Fri, 20 Aug 2021 19:32:03 -0400
Received: from mail-wr1-f49.google.com ([209.85.221.49]:39426)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <raaahh@HIDDEN>) id 1mHDzV-0004L5-JQ
 for 50067 <at> debbugs.gnu.org; Fri, 20 Aug 2021 19:32:01 -0400
Received: by mail-wr1-f49.google.com with SMTP id z4so720843wrr.6
 for <50067 <at> debbugs.gnu.org>; Fri, 20 Aug 2021 16:32:01 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
 h=sender:subject:to:cc:references:from:message-id:date:user-agent
 :mime-version:in-reply-to:content-language:content-transfer-encoding;
 bh=UuL3tu3a6N8bd2HxF4WDFLutH7iLCB0Ub5gE08wcsuI=;
 b=Hcd5fD5pwJ6MTs4xW8nE4aED1hEgp9nINhlyJWXS+2S1sTHdhYwSrckuvABTjDR04e
 L7gIZ8A6reItomv/nhXYzkPhiATLutqEU56u+diHnIMrSDerCcuUeqVwaX7xVNAgb7wI
 Yjhdvmxg+GJMyt+pvQUy1vDtOJ1qXYqjsprEvloVD2hfozwwHTu3w/O9Ya7noLLZ/J15
 GxvSemTUV3mVJZdJkzJTlzoWvcObO4dfMVk9k5mJ4k8s9EEcshWwJbvkq1hsRa+MGiDd
 /J7gKHSrBfVoibpev4lXQ9CdsN8N2IkLCeU8COfNaFcnfh88KVrtlUfA2CzQDNRxAw/O
 +HWQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:sender:subject:to:cc:references:from:message-id
 :date:user-agent:mime-version:in-reply-to:content-language
 :content-transfer-encoding;
 bh=UuL3tu3a6N8bd2HxF4WDFLutH7iLCB0Ub5gE08wcsuI=;
 b=RKrdLjt7Ji1pcI0dIoHibsoXQ0X80GlSUGfipv+AtQicXZAGxaQClNHF/k/zfHcB4R
 3WBOjNagP3jnf7bNVVM20bOfDsMoGtFKm56AkQ0IoTrDgfy8BOF/couKwi050IOI7wLP
 E+QC76xs+yUdTzx2GfEsrEBc5ZjZYfxYEPNjVdZo+7xMKtwzhgJ8q0v6XEhMAjlRqruL
 t73iUK6TyInqwfppAKj8nwjdcjvZDgDmBYfeNATi23qjAQIvgComP6DmJ+vkTeURKz5M
 yHp+t2djX04lO4duASwbiDdKxKpmEOO2tNPrcryyk3P4z4UrWF5rKjJHL7exmXgDe7aH
 E9bw==
X-Gm-Message-State: AOAM53023i0Z1XBpb9ezWMcQrtN8UFhBDt195EZ85YfAU3tEnl31Pa+W
 koJ6fpg8mGrtSBWCD+bwESg=
X-Google-Smtp-Source: ABdhPJwz+tm4hP7ZMMKAeshFvFEX3qlumiMLo2mVMntO9KAKOu1XARGk06aFVYUFbvi9nHiCrM8SEg==
X-Received: by 2002:a5d:4a8d:: with SMTP id o13mr1200075wrq.156.1629502315807; 
 Fri, 20 Aug 2021 16:31:55 -0700 (PDT)
Received: from [192.168.0.6] ([46.251.119.176])
 by smtp.googlemail.com with ESMTPSA id h126sm11947783wmh.1.2021.08.20.16.31.53
 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128);
 Fri, 20 Aug 2021 16:31:55 -0700 (PDT)
Subject: Re: bug#50067: Context menus
To: =?UTF-8?Q?Mattias_Engdeg=c3=a5rd?= <mattiase@HIDDEN>,
 Juri Linkov <juri@HIDDEN>
References: <74BC00E9-2509-47DA-9428-1523FF7F3B33@HIDDEN>
 <87v942pvcj.fsf@HIDDEN>
 <F9F140FE-CB41-432E-BA96-6F1E49BEEB8F@HIDDEN>
 <004A628A-99CC-4C62-8AE2-921C4C38D42A@HIDDEN>
 <87h7fkh8z8.fsf@HIDDEN>
 <254C8F2C-423D-4DBE-9836-A92BD63827D7@HIDDEN>
From: Dmitry Gutov <dgutov@HIDDEN>
Message-ID: <970df21b-c9ab-94fb-bfed-ab8df1fb82e6@HIDDEN>
Date: Sat, 21 Aug 2021 02:31:53 +0300
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101
 Thunderbird/78.11.0
MIME-Version: 1.0
In-Reply-To: <254C8F2C-423D-4DBE-9836-A92BD63827D7@HIDDEN>
Content-Type: text/plain; charset=windows-1252; format=flowed
Content-Language: en-US
Content-Transfer-Encoding: 8bit
X-Spam-Score: 0.4 (/)
X-Debbugs-Envelope-To: 50067
Cc: tkk@HIDDEN, Tak Kunihiro <homeros.misasa@HIDDEN>,
 50067 <at> debbugs.gnu.org, Lars Ingebrigtsen <larsi@HIDDEN>,
 Alan Third <alan@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.6 (/)

Hi Mattias!

On 20.08.2021 20:06, Mattias Engdegrd wrote:
> * If I start emacs -Q and enable context-menu-mode, right-clicking on an identifier in an elisp buffer still doesn't produce the Find Definition entry, presumably because xref hasn't been loaded. Shouldn't it be arranged to be autoloaded somehow, which is how xref works when invoked by keystrokes?

I wonder what could be the reason for that. It would seem the menu 
should handle autoloaded commands fine. Even the visibility predicate 
should work: xref-find-backend is autoloaded as well.

Try rewriting it with a let, to ensure that xref-find-backend is called 
first:

(let ((backend (xref-find-backend)))
   (xref-backend-identifier-at-point backend))

> * `xref-make-match` requires (contrary to its doc string) its LOCATION argument to be of type `xref-file-location`, but some backends may only be able to make an `xref-buffer-location`. Would anyone object to changing the :location slot of `xref-match-item` to have type `xref-location`? I don't see how it could hurt.

Makes sense to me, seems like an accident. I've done this change 
locally, no obvious bugs fell out.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#50067; Package emacs. Full text available.

Message received at 50067 <at> debbugs.gnu.org:


Received: (at 50067) by debbugs.gnu.org; 20 Aug 2021 19:30:04 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Aug 20 15:30:04 2021
Received: from localhost ([127.0.0.1]:35564 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1mHADL-00077C-R3
	for submit <at> debbugs.gnu.org; Fri, 20 Aug 2021 15:30:04 -0400
Received: from mail1454c50.megamailservers.eu ([91.136.14.54]:50054
 helo=mail266c50.megamailservers.eu)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <mattiase@HIDDEN>) id 1mHADI-00076E-QK
 for 50067 <at> debbugs.gnu.org; Fri, 20 Aug 2021 15:30:02 -0400
X-Authenticated-User: mattiase@HIDDEN
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=megamailservers.eu;
 s=maildub; t=1629487794;
 bh=H+HL4DoRe1T+1qx4VYWb4kwn+C778D3Tx+JfzDfkPhU=;
 h=From:Subject:Date:In-Reply-To:Cc:To:References:From;
 b=iQUJxmv1gMU3VeZhA3IZZKEU70y5CkZUWCOL5osOnNkNpAIDncJbZLHZOo5Dv2EI+
 PEVk5iBc8NS0AgLB9RFZgxK1dTROMOY7dgJHkarOfv1RyaFoYToabgRkLNMQmdEeIz
 qmVrsmghOJ64LX/oleUaAN34VtczGIKCHEEmZkFM=
Feedback-ID: mattiase@HIDDEN
Received: from [192.168.0.4] (c188-150-171-71.bredband.tele2.se
 [188.150.171.71]) (authenticated bits=0)
 by mail266c50.megamailservers.eu (8.14.9/8.13.1) with ESMTP id 17KJTmae030582; 
 Fri, 20 Aug 2021 19:29:50 +0000
From: =?utf-8?Q?Mattias_Engdeg=C3=A5rd?= <mattiase@HIDDEN>
Message-Id: <E96971E5-818F-4FE6-B702-37F09EDBB073@HIDDEN>
Content-Type: multipart/mixed;
 boundary="Apple-Mail=_F4AA7B89-ECDE-4EBC-A0E0-C79E2F75AAED"
Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.21\))
Subject: Re: bug#50067: Context menus
Date: Fri, 20 Aug 2021 21:29:47 +0200
In-Reply-To: <83zgtcyp2k.fsf@HIDDEN>
To: Eli Zaretskii <eliz@HIDDEN>
References: <74BC00E9-2509-47DA-9428-1523FF7F3B33@HIDDEN>
 <87v942pvcj.fsf@HIDDEN> <83zgte3asy.fsf@HIDDEN>
 <87mtpepqzw.fsf@HIDDEN> <83sfz639lh.fsf@HIDDEN>
 <8735r6ppf0.fsf@HIDDEN> <83o89u37gh.fsf@HIDDEN>
 <87wnohx5zd.fsf@HIDDEN> <831r6p3lzc.fsf@HIDDEN>
 <87o89sh96g.fsf@HIDDEN> <837dgg1hdg.fsf@HIDDEN>
 <87mtpcf79p.fsf@HIDDEN> <83zgtcyp2k.fsf@HIDDEN>
X-Mailer: Apple Mail (2.3445.104.21)
X-CTCH-RefID: str=0001.0A742F26.612002B2.0006, ss=1, re=0.000, recu=0.000,
 reip=0.000, cl=1, cld=1, fgs=0
X-CTCH-VOD: Unknown
X-CTCH-Spam: Unknown
X-CTCH-Score: 0.000
X-CTCH-Rules: 
X-CTCH-Flags: 0
X-CTCH-ScoreCust: 0.000
X-CSC: 0
X-CHA: v=2.3 cv=UeYvt5aN c=1 sm=1 tr=0 a=SF+I6pRkHZhrawxbOkkvaA==:117
 a=SF+I6pRkHZhrawxbOkkvaA==:17 a=M51BFTxLslgA:10 a=mDV3o1hIAAAA:8
 a=aTpjW4tw5_cClw_LVMkA:9 a=CjuIK1q_8ugA:10 a=JUOl0zTICBLu7D2qXPMA:9
 a=B2y7HmGcmWMA:10 a=tclcd6dtLQvEqt9_mmAA:9 a=_FVE-zBwftR9WsbkzFJk:22
X-Origin-Country: SE
X-Spam-Score: 1.4 (+)
X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org",
 has NOT identified this incoming email as spam.  The original
 message has been attached to this so you can view it or label
 similar future email.  If you have any questions, see
 the administrator of that system for details.
 Content preview:  20 aug. 2021 kl. 19.59 skrev Eli Zaretskii <eliz@HIDDEN>:
 > OK, but where in that patch is the NS-specific "Select" title that > should
 be removed? I'm not Juri, but the following patch removes the default "Select"
 title used by the NS port. Not sure why it was ever added -- perhaps something
 Gnustep-specific? Works well with Cocoa in any case. 
 Content analysis details:   (1.4 points, 10.0 required)
 pts rule name              description
 ---- ---------------------- --------------------------------------------------
 0.0 SPF_HELO_NONE          SPF: HELO does not publish an SPF Record
 1.0 SPF_SOFTFAIL           SPF: sender does not match SPF record (softfail)
 0.4 KHOP_HELO_FCRDNS       Relay HELO differs from its IP's reverse DNS
X-Debbugs-Envelope-To: 50067
Cc: alan@HIDDEN, Juri Linkov <juri@HIDDEN>, homeros.misasa@HIDDEN,
 tkk@HIDDEN, larsi@HIDDEN, 50067 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.0 (/)


--Apple-Mail=_F4AA7B89-ECDE-4EBC-A0E0-C79E2F75AAED
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain;
	charset=us-ascii

20 aug. 2021 kl. 19.59 skrev Eli Zaretskii <eliz@HIDDEN>:

> OK, but where in that patch is the NS-specific "Select" title that
> should be removed?

I'm not Juri, but the following patch removes the default "Select" title =
used by the NS port. Not sure why it was ever added -- perhaps something =
Gnustep-specific? Works well with Cocoa in any case.


--Apple-Mail=_F4AA7B89-ECDE-4EBC-A0E0-C79E2F75AAED
Content-Disposition: attachment;
	filename=0001-Remove-default-Select-title-from-NS-popup-menus.patch
Content-Type: application/octet-stream;
	x-unix-mode=0644;
	name="0001-Remove-default-Select-title-from-NS-popup-menus.patch"
Content-Transfer-Encoding: quoted-printable

=46rom=20d08bba26704cbe2cd8c655279d95cfed88ff29ba=20Mon=20Sep=2017=20=
00:00:00=202001=0AFrom:=20=3D?UTF-8?q?Mattias=3D20Engdeg=3DC3=3DA5rd?=3D=20=
<mattiase@HIDDEN>=0ADate:=20Fri,=2020=20Aug=202021=2021:21:05=20+0200=0A=
Subject:=20[PATCH]=20Remove=20default=20"Select"=20title=20from=20NS=20=
popup=20menus=0A=0A*=20src/menu.c=20(x_popup_menu_1):=20Remove=20default=20=
"Select"=20title.=0A*=20src/nsmenu.m=20(ns_menu_show):=20Allow=20title=20=
to=20be=20absent.=0A---=0A=20src/menu.c=20=20=20|=204=20----=0A=20=
src/nsmenu.m=20|=202=20+-=0A=202=20files=20changed,=201=20insertion(+),=20=
5=20deletions(-)=0A=0Adiff=20--git=20a/src/menu.c=20b/src/menu.c=0Aindex=20=
3b1d740257..e441d22ea0=20100644=0A---=20a/src/menu.c=0A+++=20=
b/src/menu.c=0A@@=20-1286,10=20+1286,6=20@@=20x_popup_menu_1=20=
(Lisp_Object=20position,=20Lisp_Object=20menu)=0A=20=20=20=20=20=20=20=
prompt=20=3D=20Fkeymap_prompt=20(keymap);=0A=20=20=20=20=20=20=20if=20=
(!NILP=20(prompt))=0A=20=09title=20=3D=20prompt;=0A-#ifdef=20HAVE_NS=09=09=
/*=20Is=20that=20needed=20and=20NS-specific?=20=20--Stef=20=20*/=0A-=20=20=
=20=20=20=20else=0A-=09title=20=3D=20build_string=20("Select");=0A=
-#endif=0A=20=0A=20=20=20=20=20=20=20/*=20Make=20that=20be=20the=20pane=20=
title=20of=20the=20first=20pane.=20=20*/=0A=20=20=20=20=20=20=20if=20=
(!NILP=20(prompt)=20&&=20menu_items_n_panes=20>=3D=200)=0Adiff=20--git=20=
a/src/nsmenu.m=20b/src/nsmenu.m=0Aindex=20bb0dd2634d..fe4f825832=20=
100644=0A---=20a/src/nsmenu.m=0A+++=20b/src/nsmenu.m=0A@@=20-959,7=20=
+959,7=20@@=20-=20(void)menu:(NSMenu=20*)menu=20=
willHighlightItem:(NSMenuItem=20*)item=0A=20=20=20=20=20}=0A=20=0A=20=20=20=
pmenu=20=3D=20[[EmacsMenu=20alloc]=20initWithTitle:=0A-=20=20=20=20=20=20=
=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=
[NSString=20stringWithLispString:=20title]];=0A+=20=20=20=20=20=20=20=20=20=
=20=20=20=20=20=20=20=20=20=20NILP=20(title)=20?=20@""=20:=20[NSString=20=
stringWithLispString:=20title]];=0A=20=20=20[pmenu=20=
fillWithWidgetValue:=20first_wv->contents];=0A=20=20=20=
free_menubar_widget_value_tree=20(first_wv);=0A=20=20=20unbind_to=20=
(specpdl_count,=20Qnil);=0A--=20=0A2.21.1=20(Apple=20Git-122.3)=0A=0A=

--Apple-Mail=_F4AA7B89-ECDE-4EBC-A0E0-C79E2F75AAED
Content-Transfer-Encoding: 7bit
Content-Type: text/plain;
	charset=us-ascii





--Apple-Mail=_F4AA7B89-ECDE-4EBC-A0E0-C79E2F75AAED--




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#50067; Package emacs. Full text available.

Message received at 50067 <at> debbugs.gnu.org:


Received: (at 50067) by debbugs.gnu.org; 20 Aug 2021 18:00:38 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Aug 20 14:00:38 2021
Received: from localhost ([127.0.0.1]:35519 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1mH8oj-0002qj-1M
	for submit <at> debbugs.gnu.org; Fri, 20 Aug 2021 14:00:38 -0400
Received: from eggs.gnu.org ([209.51.188.92]:36546)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1mH8og-0002qV-J6
 for 50067 <at> debbugs.gnu.org; Fri, 20 Aug 2021 14:00:31 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e]:39600)
 by eggs.gnu.org with esmtp (Exim 4.90_1)
 (envelope-from <eliz@HIDDEN>)
 id 1mH8oU-00077f-Sw; Fri, 20 Aug 2021 14:00:20 -0400
Received: from 84.94.185.95.cable.012.net.il ([84.94.185.95]:3964
 helo=home-c4e4a596f7)
 by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <eliz@HIDDEN>)
 id 1mH8oH-0000R5-Lk; Fri, 20 Aug 2021 14:00:16 -0400
Date: Fri, 20 Aug 2021 20:59:47 +0300
Message-Id: <83zgtcyp2k.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Juri Linkov <juri@HIDDEN>
In-Reply-To: <87mtpcf79p.fsf@HIDDEN> (message from Juri Linkov on
 Fri, 20 Aug 2021 19:36:58 +0300)
Subject: Re: bug#50067: Context menus
References: <74BC00E9-2509-47DA-9428-1523FF7F3B33@HIDDEN>
 <87v942pvcj.fsf@HIDDEN> <83zgte3asy.fsf@HIDDEN>
 <87mtpepqzw.fsf@HIDDEN> <83sfz639lh.fsf@HIDDEN>
 <8735r6ppf0.fsf@HIDDEN> <83o89u37gh.fsf@HIDDEN>
 <87wnohx5zd.fsf@HIDDEN> <831r6p3lzc.fsf@HIDDEN>
 <87o89sh96g.fsf@HIDDEN> <837dgg1hdg.fsf@HIDDEN>
 <87mtpcf79p.fsf@HIDDEN>
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 50067
Cc: alan@HIDDEN, mattiase@HIDDEN, homeros.misasa@HIDDEN,
 tkk@HIDDEN, larsi@HIDDEN, 50067 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> From: Juri Linkov <juri@HIDDEN>
> Cc: mattiase@HIDDEN,  50067 <at> debbugs.gnu.org,  homeros.misasa@HIDDEN,
>   tkk@HIDDEN,  larsi@HIDDEN,  alan@HIDDEN
> Date: Fri, 20 Aug 2021 19:36:58 +0300
> 
> > OK, but I still don't think I fully understand how context menus are
> > different.  Are we sure the user will immediately understand the
> > purpose of the context menus, but not of a buffer-menu?
> 
> Context menus displayed up by down-mouse-3 are ubiquitous nowadays,
> they are everywhere, and the users expect them without a title,
> unlike Emacs-specific menus unfamiliar to most users.

So if some menu is popped up by mouse-3, it is automatically
considered ubiquitous and expected?  I really doubt that, but I won't
argue any further.

> >> Using a text property would be a good solution.  Should then
> >> the NS-specific "Select" title be removed in menu.c
> >> when the title has a special text property?
> >
> > I'm not sure I understand what is the NS-specific "Select" title.  Can
> > you point me to the relevant code?
> 
> I meant such patch:

OK, but where in that patch is the NS-specific "Select" title that
should be removed?




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#50067; Package emacs. Full text available.

Message received at 50067 <at> debbugs.gnu.org:


Received: (at 50067) by debbugs.gnu.org; 20 Aug 2021 17:13:09 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Aug 20 13:13:09 2021
Received: from localhost ([127.0.0.1]:35479 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1mH84r-0001i9-5Q
	for submit <at> debbugs.gnu.org; Fri, 20 Aug 2021 13:13:09 -0400
Received: from mail1462c50.megamailservers.eu ([91.136.14.62]:43060
 helo=mail267c50.megamailservers.eu)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <mattiase@HIDDEN>) id 1mH84o-0001hX-Kr
 for 50067 <at> debbugs.gnu.org; Fri, 20 Aug 2021 13:13:07 -0400
X-Authenticated-User: mattiase@HIDDEN
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=megamailservers.eu;
 s=maildub; t=1629479515;
 bh=7/KOiem9Ln6PfRKtaGLB+jbfibUqInZB2ZdI8Cl/djU=;
 h=Subject:From:In-Reply-To:Date:Cc:References:To:From;
 b=hCyHXaTVtgVpMhVm8BeTWL2sgdnQPB2kVyPmweSHR7evUOW2EA6J1t+hejgFUhwhU
 J/cnMfu2OH9/c9hjP58I3nDvC++j+FKahjI5XJvb2LzLLgBTHHDgDNtkDaLemNp0P0
 0h64EdD5IfvpHJh/JLRHck1DzKT/19Bzl2DcOlkU=
Feedback-ID: mattiase@HIDDEN
Received: from [192.168.0.4] (c188-150-171-71.bredband.tele2.se
 [188.150.171.71]) (authenticated bits=0)
 by mail267c50.megamailservers.eu (8.14.9/8.13.1) with ESMTP id 17KHBoCR011028; 
 Fri, 20 Aug 2021 17:11:52 +0000
Content-Type: text/plain;
	charset=us-ascii
Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.21\))
Subject: Re: bug#50067: Context menus
From: =?utf-8?Q?Mattias_Engdeg=C3=A5rd?= <mattiase@HIDDEN>
In-Reply-To: <87sfz4cb6r.fsf@HIDDEN>
Date: Fri, 20 Aug 2021 19:11:50 +0200
Content-Transfer-Encoding: 7bit
Message-Id: <EC39F9D5-4060-4C2E-B179-9B3DCC84CB33@HIDDEN>
References: <74BC00E9-2509-47DA-9428-1523FF7F3B33@HIDDEN>
 <87v942pvcj.fsf@HIDDEN> <83zgte3asy.fsf@HIDDEN>
 <87mtpepqzw.fsf@HIDDEN> <83sfz639lh.fsf@HIDDEN>
 <8735r6ppf0.fsf@HIDDEN> <83o89u37gh.fsf@HIDDEN>
 <87wnohx5zd.fsf@HIDDEN> <831r6p3lzc.fsf@HIDDEN>
 <87o89sh96g.fsf@HIDDEN>
 <054BA74B-AACE-483F-994E-5E8E49E093E5@HIDDEN> <83bl5s1j6a.fsf@HIDDEN>
 <4D90962D-4FB3-45AB-BC3C-6E947FE297D0@HIDDEN>
 <87sfz4cb6r.fsf@HIDDEN>
To: Juri Linkov <juri@HIDDEN>
X-Mailer: Apple Mail (2.3445.104.21)
X-CTCH-RefID: str=0001.0A742F21.611FE25B.0030, ss=1, re=0.000, recu=0.000,
 reip=0.000, cl=1, cld=1, fgs=0
X-CTCH-VOD: Unknown
X-CTCH-Spam: Unknown
X-CTCH-Score: 0.000
X-CTCH-Rules: 
X-CTCH-Flags: 0
X-CTCH-ScoreCust: 0.000
X-CSC: 0
X-CHA: v=2.3 cv=S9SnP7kP c=1 sm=1 tr=0 a=SF+I6pRkHZhrawxbOkkvaA==:117
 a=SF+I6pRkHZhrawxbOkkvaA==:17 a=kj9zAlcOel0A:10 a=M51BFTxLslgA:10
 a=ucMQw-l_AAAA:8 a=x6cgACKAFSKzhOxs98EA:9 a=CjuIK1q_8ugA:10
 a=L42WZ21l2ekA:10 a=xkTruGkd22MpkFU079mG:22
X-Origin-Country: SE
X-Spam-Score: 1.4 (+)
X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org",
 has NOT identified this incoming email as spam.  The original
 message has been attached to this so you can view it or label
 similar future email.  If you have any questions, see
 the administrator of that system for details.
 Content preview: 20 aug. 2021 kl. 18.50 skrev Juri Linkov <juri@HIDDEN>:
 > On emacs-devel Ergus proposed to add such bindings to a new >
 context-menu-mode-map.
 Do you think this is feasible? Quite possibly, but the proof is in the pudding.
 Content analysis details:   (1.4 points, 10.0 required)
 pts rule name              description
 ---- ---------------------- --------------------------------------------------
 0.0 SPF_HELO_NONE          SPF: HELO does not publish an SPF Record
 1.0 SPF_SOFTFAIL           SPF: sender does not match SPF record (softfail)
 0.4 KHOP_HELO_FCRDNS       Relay HELO differs from its IP's reverse DNS
X-Debbugs-Envelope-To: 50067
Cc: alan@HIDDEN, homeros.misasa@HIDDEN, tkk@HIDDEN,
 larsi@HIDDEN, 50067 <at> debbugs.gnu.org, Eli Zaretskii <eliz@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.0 (/)

20 aug. 2021 kl. 18.50 skrev Juri Linkov <juri@HIDDEN>:

> On emacs-devel Ergus proposed to add such bindings to a new
> context-menu-mode-map.  Do you think this is feasible?

Quite possibly, but the proof is in the pudding.





Information forwarded to bug-gnu-emacs@HIDDEN:
bug#50067; Package emacs. Full text available.

Message received at 50067 <at> debbugs.gnu.org:


Received: (at 50067) by debbugs.gnu.org; 20 Aug 2021 17:12:05 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Aug 20 13:12:05 2021
Received: from localhost ([127.0.0.1]:35475 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1mH83o-0001gT-Ro
	for submit <at> debbugs.gnu.org; Fri, 20 Aug 2021 13:12:05 -0400
Received: from mail1460c50.megamailservers.eu ([91.136.14.60]:42910
 helo=mail267c50.megamailservers.eu)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <mattiase@HIDDEN>) id 1mH83m-0001fr-Cx
 for 50067 <at> debbugs.gnu.org; Fri, 20 Aug 2021 13:12:03 -0400
X-Authenticated-User: mattiase@HIDDEN
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=megamailservers.eu;
 s=maildub; t=1629479515;
 bh=7/KOiem9Ln6PfRKtaGLB+jbfibUqInZB2ZdI8Cl/djU=;
 h=Subject:From:In-Reply-To:Date:Cc:References:To:From;
 b=hCyHXaTVtgVpMhVm8BeTWL2sgdnQPB2kVyPmweSHR7evUOW2EA6J1t+hejgFUhwhU
 J/cnMfu2OH9/c9hjP58I3nDvC++j+FKahjI5XJvb2LzLLgBTHHDgDNtkDaLemNp0P0
 0h64EdD5IfvpHJh/JLRHck1DzKT/19Bzl2DcOlkU=
Feedback-ID: mattiase@HIDDEN
Received: from [192.168.0.4] (c188-150-171-71.bredband.tele2.se
 [188.150.171.71]) (authenticated bits=0)
 by mail267c50.megamailservers.eu (8.14.9/8.13.1) with ESMTP id 17KHBoCR011028; 
 Fri, 20 Aug 2021 17:11:52 +0000
Content-Type: text/plain;
	charset=us-ascii
Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.21\))
Subject: Re: bug#50067: Context menus
From: =?utf-8?Q?Mattias_Engdeg=C3=A5rd?= <mattiase@HIDDEN>
In-Reply-To: <87sfz4cb6r.fsf@HIDDEN>
Date: Fri, 20 Aug 2021 19:11:50 +0200
Content-Transfer-Encoding: 7bit
Message-Id: <EC39F9D5-4060-4C2E-B179-9B3DCC84CB33@HIDDEN>
References: <74BC00E9-2509-47DA-9428-1523FF7F3B33@HIDDEN>
 <87v942pvcj.fsf@HIDDEN> <83zgte3asy.fsf@HIDDEN>
 <87mtpepqzw.fsf@HIDDEN> <83sfz639lh.fsf@HIDDEN>
 <8735r6ppf0.fsf@HIDDEN> <83o89u37gh.fsf@HIDDEN>
 <87wnohx5zd.fsf@HIDDEN> <831r6p3lzc.fsf@HIDDEN>
 <87o89sh96g.fsf@HIDDEN>
 <054BA74B-AACE-483F-994E-5E8E49E093E5@HIDDEN> <83bl5s1j6a.fsf@HIDDEN>
 <4D90962D-4FB3-45AB-BC3C-6E947FE297D0@HIDDEN>
 <87sfz4cb6r.fsf@HIDDEN>
To: Juri Linkov <juri@HIDDEN>
X-Mailer: Apple Mail (2.3445.104.21)
X-CTCH-RefID: str=0001.0A742F21.611FE25B.0030, ss=1, re=0.000, recu=0.000,
 reip=0.000, cl=1, cld=1, fgs=0
X-CTCH-VOD: Unknown
X-CTCH-Spam: Unknown
X-CTCH-Score: 0.000
X-CTCH-Rules: 
X-CTCH-Flags: 0
X-CTCH-ScoreCust: 0.000
X-CSC: 0
X-CHA: v=2.3 cv=S9SnP7kP c=1 sm=1 tr=0 a=SF+I6pRkHZhrawxbOkkvaA==:117
 a=SF+I6pRkHZhrawxbOkkvaA==:17 a=kj9zAlcOel0A:10 a=M51BFTxLslgA:10
 a=ucMQw-l_AAAA:8 a=x6cgACKAFSKzhOxs98EA:9 a=CjuIK1q_8ugA:10
 a=L42WZ21l2ekA:10 a=xkTruGkd22MpkFU079mG:22
X-Origin-Country: SE
X-Spam-Score: 1.4 (+)
X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org",
 has NOT identified this incoming email as spam.  The original
 message has been attached to this so you can view it or label
 similar future email.  If you have any questions, see
 the administrator of that system for details.
 Content preview: 20 aug. 2021 kl. 18.50 skrev Juri Linkov <juri@HIDDEN>:
 > On emacs-devel Ergus proposed to add such bindings to a new >
 context-menu-mode-map.
 Do you think this is feasible? Quite possibly, but the proof is in the pudding.
 Content analysis details:   (1.4 points, 10.0 required)
 pts rule name              description
 ---- ---------------------- --------------------------------------------------
 0.0 SPF_HELO_NONE          SPF: HELO does not publish an SPF Record
 1.0 SPF_SOFTFAIL           SPF: sender does not match SPF record (softfail)
 0.4 KHOP_HELO_FCRDNS       Relay HELO differs from its IP's reverse DNS
X-Debbugs-Envelope-To: 50067
Cc: alan@HIDDEN, homeros.misasa@HIDDEN, tkk@HIDDEN,
 larsi@HIDDEN, 50067 <at> debbugs.gnu.org, Eli Zaretskii <eliz@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.0 (/)

20 aug. 2021 kl. 18.50 skrev Juri Linkov <juri@HIDDEN>:

> On emacs-devel Ergus proposed to add such bindings to a new
> context-menu-mode-map.  Do you think this is feasible?

Quite possibly, but the proof is in the pudding.





Information forwarded to bug-gnu-emacs@HIDDEN:
bug#50067; Package emacs. Full text available.

Message received at 50067 <at> debbugs.gnu.org:


Received: (at 50067) by debbugs.gnu.org; 20 Aug 2021 17:06:36 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Aug 20 13:06:36 2021
Received: from localhost ([127.0.0.1]:35467 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1mH7yV-0001Ya-Tz
	for submit <at> debbugs.gnu.org; Fri, 20 Aug 2021 13:06:36 -0400
Received: from mail1453c50.megamailservers.eu ([91.136.14.53]:54042
 helo=mail266c50.megamailservers.eu)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <mattiase@HIDDEN>) id 1mH7yS-0001YH-MU
 for 50067 <at> debbugs.gnu.org; Fri, 20 Aug 2021 13:06:34 -0400
X-Authenticated-User: mattiase@HIDDEN
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=megamailservers.eu;
 s=maildub; t=1629479185;
 bh=wE53CSVU2M6T+n7mKvqwVSzSA1Z4X2uIRj6hvqvA8co=;
 h=From:Subject:Date:In-Reply-To:Cc:To:References:From;
 b=O1MjRJsO8rdxvC9bk+AZJvWVLYzOGQKSu/RHjKZ4zqFqdFCFjtaXXNWlzAIdbB7x0
 OdEj/d6rMdWEags9XuFCGjZb/5Y/Whh+JXpUNMYpj7duTlcEzvwzfAtvYz7/4EpDFr
 wlajV3WGfm/MZlah/dfjNQ9PwqReKY3ZS/vxIVss=
Feedback-ID: mattiase@HIDDEN
Received: from [192.168.0.4] (c188-150-171-71.bredband.tele2.se
 [188.150.171.71]) (authenticated bits=0)
 by mail266c50.megamailservers.eu (8.14.9/8.13.1) with ESMTP id 17KH6Li0023014; 
 Fri, 20 Aug 2021 17:06:22 +0000
From: =?utf-8?Q?Mattias_Engdeg=C3=A5rd?= <mattiase@HIDDEN>
Message-Id: <254C8F2C-423D-4DBE-9836-A92BD63827D7@HIDDEN>
Content-Type: multipart/mixed;
 boundary="Apple-Mail=_C25ECE58-4080-4F19-9312-BF36DA51730B"
Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.21\))
Subject: Re: bug#50067: Context menus
Date: Fri, 20 Aug 2021 19:06:20 +0200
In-Reply-To: <87h7fkh8z8.fsf@HIDDEN>
To: Juri Linkov <juri@HIDDEN>
References: <74BC00E9-2509-47DA-9428-1523FF7F3B33@HIDDEN>
 <87v942pvcj.fsf@HIDDEN>
 <F9F140FE-CB41-432E-BA96-6F1E49BEEB8F@HIDDEN>
 <004A628A-99CC-4C62-8AE2-921C4C38D42A@HIDDEN>
 <87h7fkh8z8.fsf@HIDDEN>
X-Mailer: Apple Mail (2.3445.104.21)
X-CTCH-RefID: str=0001.0A742F1D.611FE111.006C, ss=1, re=0.000, recu=0.000,
 reip=0.000, cl=1, cld=1, fgs=0
X-CTCH-VOD: Unknown
X-CTCH-Spam: Unknown
X-CTCH-Score: 0.000
X-CTCH-Rules: 
X-CTCH-Flags: 0
X-CTCH-ScoreCust: 0.000
X-CSC: 0
X-CHA: v=2.3 cv=UeYvt5aN c=1 sm=1 tr=0 a=SF+I6pRkHZhrawxbOkkvaA==:117
 a=SF+I6pRkHZhrawxbOkkvaA==:17 a=M51BFTxLslgA:10 a=ucMQw-l_AAAA:8
 a=TzWVU1kqNxKw69pBDi0A:9 a=CjuIK1q_8ugA:10 a=Fq6NDgnhy04kry1FW4EA:9
 a=B2y7HmGcmWMA:10 a=xkTruGkd22MpkFU079mG:22
X-Origin-Country: SE
X-Spam-Score: 1.4 (+)
X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org",
 has NOT identified this incoming email as spam.  The original
 message has been attached to this so you can view it or label
 similar future email.  If you have any questions, see
 the administrator of that system for details.
 Content preview: 20 aug. 2021 kl. 09.31 skrev Juri Linkov <juri@HIDDEN>:
 > If the existing `xref-backend-identifier-at-point` can't be reused > by
 adding a new optional arg `click`, then a cleaner solution > would be to
 add `xref-backend-identifier-at-mouse` indeed. 
 Content analysis details:   (1.4 points, 10.0 required)
 pts rule name              description
 ---- ---------------------- --------------------------------------------------
 0.0 SPF_HELO_NONE          SPF: HELO does not publish an SPF Record
 1.0 SPF_SOFTFAIL           SPF: sender does not match SPF record (softfail)
 0.4 KHOP_HELO_FCRDNS       Relay HELO differs from its IP's reverse DNS
X-Debbugs-Envelope-To: 50067
Cc: Alan Third <alan@HIDDEN>, Tak Kunihiro <homeros.misasa@HIDDEN>,
 tkk@HIDDEN, Dmitry Gutov <dgutov@HIDDEN>,
 Lars Ingebrigtsen <larsi@HIDDEN>, 50067 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.0 (/)


--Apple-Mail=_C25ECE58-4080-4F19-9312-BF36DA51730B
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain;
	charset=us-ascii

20 aug. 2021 kl. 09.31 skrev Juri Linkov <juri@HIDDEN>:

> If the existing `xref-backend-identifier-at-point` can't be reused
> by adding a new optional arg `click`, then a cleaner solution
> would be to add `xref-backend-identifier-at-mouse` indeed.

`xref-backend-identifier-at-point` is a generic function implemented by =
each backend; a new function appears cleaner. Suggested patch attached!

More discoveries and questions:

* If I start emacs -Q and enable context-menu-mode, right-clicking on an =
identifier in an elisp buffer still doesn't produce the Find Definition =
entry, presumably because xref hasn't been loaded. Shouldn't it be =
arranged to be autoloaded somehow, which is how xref works when invoked =
by keystrokes?

* `xref-make-match` requires (contrary to its doc string) its LOCATION =
argument to be of type `xref-file-location`, but some backends may only =
be able to make an `xref-buffer-location`. Would anyone object to =
changing the :location slot of `xref-match-item` to have type =
`xref-location`? I don't see how it could hurt.


--Apple-Mail=_C25ECE58-4080-4F19-9312-BF36DA51730B
Content-Disposition: attachment;
	filename=0001-Add-Find-References-to-context-menu.patch
Content-Type: application/octet-stream;
	x-unix-mode=0644;
	name="0001-Add-Find-References-to-context-menu.patch"
Content-Transfer-Encoding: quoted-printable

=46rom=208001c94088d1ee8418001e7fc1875f9cb2ec84f9=20Mon=20Sep=2017=20=
00:00:00=202001=0AFrom:=20=3D?UTF-8?q?Mattias=3D20Engdeg=3DC3=3DA5rd?=3D=20=
<mattiase@HIDDEN>=0ADate:=20Fri,=2020=20Aug=202021=2018:19:43=20+0200=0A=
Subject:=20[PATCH]=20Add=20"Find=20References"=20to=20context=20menu=0A=0A=
The=20new=20entry=20appears=20next=20to=20"Find=20Definition"=20and=20=
like=20it=20only=0Aappears=20when=20the=20context=20menu=20was=20invoked=20=
on=20an=20identifier.=0A=0A*=20lisp/progmodes/prog-mode.el=20=
(prog-context-menu):=20New=20menu=20entry.=0A*=20lisp/progmodes/xref.el=20=
(xref-find-references-at-mouse):=20New=0Afunction,=20analogous=20to=20=
`xref-find-definitions-at-mouse`.=0A---=0A=20lisp/progmodes/prog-mode.el=20=
|=2015=20++++++++++++---=0A=20lisp/progmodes/xref.el=20=20=20=20=20=20|=20=
14=20++++++++++++++=0A=202=20files=20changed,=2026=20insertions(+),=203=20=
deletions(-)=0A=0Adiff=20--git=20a/lisp/progmodes/prog-mode.el=20=
b/lisp/progmodes/prog-mode.el=0Aindex=20a8b608b018..89e2eb54d6=20100644=0A=
---=20a/lisp/progmodes/prog-mode.el=0A+++=20=
b/lisp/progmodes/prog-mode.el=0A@@=20-51,14=20+51,23=20@@=20=
prog-context-menu=0A=20=20=20=20=20=20=20'(menu-item=20"Find=20=
Definition"=20xref-find-definitions-at-mouse=0A=20=20=20=20=20=20=20=20=20=
=20=20=20=20=20=20=20=20=20=20:visible=20(save-excursion=0A=20=20=20=20=20=
=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=
(mouse-set-point=20last-input-event)=0A-=20=20=20=20=20=20=20=20=20=20=20=
=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=
(xref-backend-identifier-at-point=20(xref-find-backend)))=0A-=20=20=20=20=
=20=20=20=20=20=20=20=20=20=20=20=20=20=20:help=20"Find=20definition=20=
of=20function=20or=20variable")=0A+=20=20=20=20=20=20=20=20=20=20=20=20=20=
=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=
(xref-backend-identifier-at-point=0A+=20=20=20=20=20=20=20=20=20=20=20=20=
=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=
(xref-find-backend)))=0A+=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=
=20=20:help=20"Find=20definition=20of=20identifier")=0A=20=20=20=20=20=20=
=20'prog-separator)=0A+=20=20=20=20(define-key-after=20menu=20=
[xref-find-ref]=0A+=20=20=20=20=20=20'(menu-item=20"Find=20References"=20=
xref-find-references-at-mouse=0A+=20=20=20=20=20=20=20=20=20=20=20=20=20=20=
=20=20=20=20:visible=20(save-excursion=0A+=20=20=20=20=20=20=20=20=20=20=20=
=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20(mouse-set-point=20=
last-input-event)=0A+=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=
=20=20=20=20=20=20=20=20=20=20=20(xref-backend-identifier-at-point=0A+=20=
=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=
=20=20=20=20(xref-find-backend)))=0A+=20=20=20=20=20=20=20=20=20=20=20=20=
=20=20=20=20=20=20:help=20"Find=20references=20to=20identifier")=0A+=20=20=
=20=20=20=20'xref-find-def)=0A=20=20=20=20=20(define-key-after=20menu=20=
[xref-pop]=0A=20=20=20=20=20=20=20'(menu-item=20"Back=20Definition"=20=
xref-pop-marker-stack=0A=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=
=20=20:visible=20(not=20(xref-marker-stack-empty-p))=0A=20=20=20=20=20=20=
=20=20=20=20=20=20=20=20=20=20=20=20=20:help=20"Back=20to=20the=20=
position=20of=20the=20last=20search")=0A-=20=20=20=20=20=20=
'xref-find-def))=0A+=20=20=20=20=20=20'xref-find-ref))=0A=20=20=20menu)=0A=
=20=0A=20(defvar=20prog-mode-map=0Adiff=20--git=20=
a/lisp/progmodes/xref.el=20b/lisp/progmodes/xref.el=0Aindex=20=
b6ad485407..254d00e722=20100644=0A---=20a/lisp/progmodes/xref.el=0A+++=20=
b/lisp/progmodes/xref.el=0A@@=20-1349,6=20+1349,20=20@@=20=
xref-find-definitions-at-mouse=0A=20=20=20=20=20=20=20=20=20=
(xref-find-definitions=20identifier)=0A=20=20=20=20=20=20=20(user-error=20=
"No=20identifier=20here"))))=0A=20=0A+;;;###autoload=0A+(defun=20=
xref-find-references-at-mouse=20(event)=0A+=20=20"Find=20references=20to=20=
the=20identifier=20at=20or=20around=20mouse=20click.=0A+This=20command=20=
is=20intended=20to=20be=20bound=20to=20a=20mouse=20event."=0A+=20=20=
(interactive=20"e")=0A+=20=20(let=20((identifier=0A+=20=20=20=20=20=20=20=
=20=20(save-excursion=0A+=20=20=20=20=20=20=20=20=20=20=20=
(mouse-set-point=20event)=0A+=20=20=20=20=20=20=20=20=20=20=20=
(xref-backend-identifier-at-point=20(xref-find-backend)))))=0A+=20=20=20=20=
(if=20identifier=0A+=20=20=20=20=20=20=20=20(let=20=
((xref-prompt-for-identifier=20nil))=0A+=20=20=20=20=20=20=20=20=20=20=
(xref-find-references=20identifier))=0A+=20=20=20=20=20=20(user-error=20=
"No=20identifier=20here"))))=0A+=0A=20(declare-function=20=
apropos-parse-pattern=20"apropos"=20(pattern))=0A=20=0A=20;;;###autoload=0A=
--=20=0A2.21.1=20(Apple=20Git-122.3)=0A=0A=

--Apple-Mail=_C25ECE58-4080-4F19-9312-BF36DA51730B--




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#50067; Package emacs. Full text available.

Message received at 50067 <at> debbugs.gnu.org:


Received: (at 50067) by debbugs.gnu.org; 20 Aug 2021 16:52:32 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Aug 20 12:52:32 2021
Received: from localhost ([127.0.0.1]:35454 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1mH7ku-0001B8-DO
	for submit <at> debbugs.gnu.org; Fri, 20 Aug 2021 12:52:32 -0400
Received: from relay5-d.mail.gandi.net ([217.70.183.197]:39089)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <juri@HIDDEN>) id 1mH7kp-0001Ag-BE
 for 50067 <at> debbugs.gnu.org; Fri, 20 Aug 2021 12:52:27 -0400
Received: (Authenticated sender: juri@HIDDEN)
 by relay5-d.mail.gandi.net (Postfix) with ESMTPSA id 0E49C1C0004;
 Fri, 20 Aug 2021 16:52:15 +0000 (UTC)
From: Juri Linkov <juri@HIDDEN>
To: Mattias =?iso-8859-1?Q?Engdeg=E5rd?= <mattiase@HIDDEN>
Subject: Re: bug#50067: Context menus
Organization: LINKOV.NET
References: <74BC00E9-2509-47DA-9428-1523FF7F3B33@HIDDEN>
 <87v942pvcj.fsf@HIDDEN> <83zgte3asy.fsf@HIDDEN>
 <87mtpepqzw.fsf@HIDDEN> <83sfz639lh.fsf@HIDDEN>
 <8735r6ppf0.fsf@HIDDEN> <83o89u37gh.fsf@HIDDEN>
 <87wnohx5zd.fsf@HIDDEN> <831r6p3lzc.fsf@HIDDEN>
 <87o89sh96g.fsf@HIDDEN>
 <054BA74B-AACE-483F-994E-5E8E49E093E5@HIDDEN>
 <83bl5s1j6a.fsf@HIDDEN>
 <4D90962D-4FB3-45AB-BC3C-6E947FE297D0@HIDDEN>
Date: Fri, 20 Aug 2021 19:50:36 +0300
In-Reply-To: <4D90962D-4FB3-45AB-BC3C-6E947FE297D0@HIDDEN> ("Mattias
 =?iso-8859-1?Q?Engdeg=E5rd=22's?= message of "Fri, 20 Aug 2021 13:32:28
 +0200")
Message-ID: <87sfz4cb6r.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (x86_64-pc-linux-gnu)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 50067
Cc: alan@HIDDEN, homeros.misasa@HIDDEN, tkk@HIDDEN,
 larsi@HIDDEN, 50067 <at> debbugs.gnu.org, Eli Zaretskii <eliz@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

> Meanwhile I'm pushing the C-mouse-1 change since it seems to be
> in line with the intent of context-menu-mode.

On emacs-devel Ergus proposed to add such bindings to a new
context-menu-mode-map.  Do you think this is feasible?




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#50067; Package emacs. Full text available.

Message received at 50067 <at> debbugs.gnu.org:


Received: (at 50067) by debbugs.gnu.org; 20 Aug 2021 16:52:17 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Aug 20 12:52:17 2021
Received: from localhost ([127.0.0.1]:35446 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1mH7kY-0001AH-79
	for submit <at> debbugs.gnu.org; Fri, 20 Aug 2021 12:52:17 -0400
Received: from relay1-d.mail.gandi.net ([217.70.183.193]:11087)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <juri@HIDDEN>) id 1mH7kW-0001A1-Qv
 for 50067 <at> debbugs.gnu.org; Fri, 20 Aug 2021 12:52:09 -0400
Received: (Authenticated sender: juri@HIDDEN)
 by relay1-d.mail.gandi.net (Postfix) with ESMTPSA id A4B3D240006;
 Fri, 20 Aug 2021 16:51:58 +0000 (UTC)
From: Juri Linkov <juri@HIDDEN>
To: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#50067: Context menus
Organization: LINKOV.NET
References: <74BC00E9-2509-47DA-9428-1523FF7F3B33@HIDDEN>
 <87v942pvcj.fsf@HIDDEN> <83zgte3asy.fsf@HIDDEN>
 <87mtpepqzw.fsf@HIDDEN> <83sfz639lh.fsf@HIDDEN>
 <8735r6ppf0.fsf@HIDDEN> <83o89u37gh.fsf@HIDDEN>
 <87wnohx5zd.fsf@HIDDEN> <831r6p3lzc.fsf@HIDDEN>
 <87o89sh96g.fsf@HIDDEN> <837dgg1hdg.fsf@HIDDEN>
Date: Fri, 20 Aug 2021 19:36:58 +0300
In-Reply-To: <837dgg1hdg.fsf@HIDDEN> (Eli Zaretskii's message of "Fri, 20 Aug
 2021 14:32:27 +0300")
Message-ID: <87mtpcf79p.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (x86_64-pc-linux-gnu)
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="=-=-="
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 50067
Cc: alan@HIDDEN, mattiase@HIDDEN, homeros.misasa@HIDDEN,
 tkk@HIDDEN, larsi@HIDDEN, 50067 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

--=-=-=
Content-Type: text/plain

>> An example of such menu is mouse-buffer-menu bound to C-<down-mouse-1>
>> where the user might wonder what do these menu items with mode names mean?
>
> OK, but I still don't think I fully understand how context menus are
> different.  Are we sure the user will immediately understand the
> purpose of the context menus, but not of a buffer-menu?

Context menus displayed up by down-mouse-3 are ubiquitous nowadays,
they are everywhere, and the users expect them without a title,
unlike Emacs-specific menus unfamiliar to most users.

>> Using a text property would be a good solution.  Should then
>> the NS-specific "Select" title be removed in menu.c
>> when the title has a special text property?
>
> I'm not sure I understand what is the NS-specific "Select" title.  Can
> you point me to the relevant code?

I meant such patch:


--=-=-=
Content-Type: text/x-diff
Content-Disposition: inline; filename=context-menu-title.patch

diff --git a/lisp/mouse.el b/lisp/mouse.el
index d2a5200d8d..f9355b4f73 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)))
+  (let ((menu (make-sparse-keymap (propertize "Context Menu" 'hide t))))
     (run-hook-wrapped 'context-menu-functions
                       (lambda (fun)
                         (setq menu (funcall fun menu))
diff --git a/src/menu.c b/src/menu.c
index 3b1d740257..6654c47c93 100644
--- a/src/menu.c
+++ b/src/menu.c
@@ -1284,6 +1284,14 @@ x_popup_menu_1 (Lisp_Object position, Lisp_Object menu)
       /* Search for a string appearing directly as an element of the keymap.
 	 That string is the title of the menu.  */
       prompt = Fkeymap_prompt (keymap);
+
+#if defined (USE_GTK) || defined (HAVE_NS)
+      if (STRINGP (prompt)
+	  && SCHARS (prompt) > 0
+	  && !NILP (Fget_text_property (make_fixnum (0), Qhide, prompt)))
+	title = Qnil;
+      else
+#endif
       if (!NILP (prompt))
 	title = prompt;
 #ifdef HAVE_NS		/* Is that needed and NS-specific?  --Stef  */

--=-=-=--




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#50067; Package emacs. Full text available.

Message received at 50067 <at> debbugs.gnu.org:


Received: (at 50067) by debbugs.gnu.org; 20 Aug 2021 11:33:04 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Aug 20 07:33:04 2021
Received: from localhost ([127.0.0.1]:33051 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1mH2lg-0000Rp-5F
	for submit <at> debbugs.gnu.org; Fri, 20 Aug 2021 07:33:04 -0400
Received: from eggs.gnu.org ([209.51.188.92]:42864)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1mH2la-0000RU-LT
 for 50067 <at> debbugs.gnu.org; Fri, 20 Aug 2021 07:32:59 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e]:44694)
 by eggs.gnu.org with esmtp (Exim 4.90_1)
 (envelope-from <eliz@HIDDEN>)
 id 1mH2lQ-000113-Jk; Fri, 20 Aug 2021 07:32:44 -0400
Received: from 84.94.185.95.cable.012.net.il ([84.94.185.95]:4150
 helo=home-c4e4a596f7)
 by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <eliz@HIDDEN>)
 id 1mH2lP-0007T6-5R; Fri, 20 Aug 2021 07:32:44 -0400
Date: Fri, 20 Aug 2021 14:32:27 +0300
Message-Id: <837dgg1hdg.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Juri Linkov <juri@HIDDEN>
In-Reply-To: <87o89sh96g.fsf@HIDDEN> (message from Juri Linkov on
 Fri, 20 Aug 2021 10:29:47 +0300)
Subject: Re: bug#50067: Context menus
References: <74BC00E9-2509-47DA-9428-1523FF7F3B33@HIDDEN>
 <87v942pvcj.fsf@HIDDEN> <83zgte3asy.fsf@HIDDEN>
 <87mtpepqzw.fsf@HIDDEN> <83sfz639lh.fsf@HIDDEN>
 <8735r6ppf0.fsf@HIDDEN> <83o89u37gh.fsf@HIDDEN>
 <87wnohx5zd.fsf@HIDDEN> <831r6p3lzc.fsf@HIDDEN>
 <87o89sh96g.fsf@HIDDEN>
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 50067
Cc: alan@HIDDEN, mattiase@HIDDEN, homeros.misasa@HIDDEN,
 tkk@HIDDEN, larsi@HIDDEN, 50067 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> From: Juri Linkov <juri@HIDDEN>
> Cc: mattiase@HIDDEN,  50067 <at> debbugs.gnu.org,  homeros.misasa@HIDDEN,
>   tkk@HIDDEN,  larsi@HIDDEN,  alan@HIDDEN
> Date: Fri, 20 Aug 2021 10:29:47 +0300
> 
> >> GUI toolkits can't ignore titles for all menus.  Some menus should be
> >> displayed with a title for all toolkits.
> >
> > Which popup menus have titles that cannot be ignored, and why?
> 
> An example of such menu is mouse-buffer-menu bound to C-<down-mouse-1>
> where the user might wonder what do these menu items with mode names mean?

OK, but I still don't think I fully understand how context menus are
different.  Are we sure the user will immediately understand the
purpose of the context menus, but not of a buffer-menu?

> > If we want some titles to behave in special ways, we could put a text
> > property on the title string to mark those titles that should get
> > special treatment.  That is better than removing the title, and
> > certainly better than removing it based on the frame type, because
> > then Lisp code which handles the menu keymaps will need to be prepared
> > to handle both kinds of menu keymaps, the ones with a title and ones
> > without it.  It is also against the documented practice.
> 
> Using a text property would be a good solution.  Should then
> the NS-specific "Select" title be removed in menu.c
> when the title has a special text property?

I'm not sure I understand what is the NS-specific "Select" title.  Can
you point me to the relevant code?




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#50067; Package emacs. Full text available.

Message received at 50067 <at> debbugs.gnu.org:


Received: (at 50067) by debbugs.gnu.org; 20 Aug 2021 11:32:53 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Aug 20 07:32:53 2021
Received: from localhost ([127.0.0.1]:33048 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1mH2lV-0000RR-01
	for submit <at> debbugs.gnu.org; Fri, 20 Aug 2021 07:32:53 -0400
Received: from mail1458c50.megamailservers.eu ([91.136.14.58]:59656
 helo=mail267c50.megamailservers.eu)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <mattiase@HIDDEN>) id 1mH2lP-0000Nq-1G
 for 50067 <at> debbugs.gnu.org; Fri, 20 Aug 2021 07:32:47 -0400
X-Authenticated-User: mattiase@HIDDEN
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=megamailservers.eu;
 s=maildub; t=1629459154;
 bh=a2XdxiJxiv5TfuBMQgh8Cq9g3lkzBn6AKXRUZvMeaQM=;
 h=Subject:From:In-Reply-To:Date:Cc:References:To:From;
 b=HUzTJup8oGl4Y7Ds9WkFqiS2q9DTANMSkqLQJxue0eZJi6b6YBWq+DStu+M0gOMaF
 JveaEn1auXp/QDNBO1YskRubTBGD+Gkm4tJ/D1CYFAhEac7BF3u86jbOHdLhDfXx/g
 wRZyI+WUMnpcoDR8JdHDFe7QvALbhUdiLoht4tz8=
Feedback-ID: mattiase@HIDDEN
Received: from [192.168.0.4] (c188-150-171-71.bredband.tele2.se
 [188.150.171.71]) (authenticated bits=0)
 by mail267c50.megamailservers.eu (8.14.9/8.13.1) with ESMTP id 17KBWTGg010954; 
 Fri, 20 Aug 2021 11:32:30 +0000
Content-Type: text/plain;
	charset=us-ascii
Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.21\))
Subject: Re: bug#50067: Context menus
From: =?utf-8?Q?Mattias_Engdeg=C3=A5rd?= <mattiase@HIDDEN>
In-Reply-To: <83bl5s1j6a.fsf@HIDDEN>
Date: Fri, 20 Aug 2021 13:32:28 +0200
Content-Transfer-Encoding: quoted-printable
Message-Id: <4D90962D-4FB3-45AB-BC3C-6E947FE297D0@HIDDEN>
References: <74BC00E9-2509-47DA-9428-1523FF7F3B33@HIDDEN>
 <87v942pvcj.fsf@HIDDEN> <83zgte3asy.fsf@HIDDEN>
 <87mtpepqzw.fsf@HIDDEN> <83sfz639lh.fsf@HIDDEN>
 <8735r6ppf0.fsf@HIDDEN> <83o89u37gh.fsf@HIDDEN>
 <87wnohx5zd.fsf@HIDDEN> <831r6p3lzc.fsf@HIDDEN>
 <87o89sh96g.fsf@HIDDEN>
 <054BA74B-AACE-483F-994E-5E8E49E093E5@HIDDEN> <83bl5s1j6a.fsf@HIDDEN>
To: Eli Zaretskii <eliz@HIDDEN>
X-Mailer: Apple Mail (2.3445.104.21)
X-CTCH-RefID: str=0001.0A742F20.611F92D2.000B, ss=1, re=0.000, recu=0.000,
 reip=0.000, cl=1, cld=1, fgs=0
X-CTCH-VOD: Unknown
X-CTCH-Spam: Unknown
X-CTCH-Score: 0.000
X-CTCH-Rules: 
X-CTCH-Flags: 0
X-CTCH-ScoreCust: 0.000
X-CSC: 0
X-CHA: v=2.3 cv=S9SnP7kP c=1 sm=1 tr=0 a=SF+I6pRkHZhrawxbOkkvaA==:117
 a=SF+I6pRkHZhrawxbOkkvaA==:17 a=kj9zAlcOel0A:10 a=M51BFTxLslgA:10
 a=mDV3o1hIAAAA:8 a=gwcYGGNXkXFP349NZ4oA:9 a=CjuIK1q_8ugA:10
 a=_FVE-zBwftR9WsbkzFJk:22
X-Origin-Country: SE
X-Spam-Score: 1.4 (+)
X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org",
 has NOT identified this incoming email as spam.  The original
 message has been attached to this so you can view it or label
 similar future email.  If you have any questions, see
 the administrator of that system for details.
 Content preview:  20 aug. 2021 kl. 12.53 skrev Eli Zaretskii <eliz@HIDDEN>:
 > Then please propose macOS-specific changes that ignore the menu names >
 instead of displaying them. Platform-specific conventions should not > leak
 into general Lisp data structures. 
 Content analysis details:   (1.4 points, 10.0 required)
 pts rule name              description
 ---- ---------------------- --------------------------------------------------
 0.0 SPF_HELO_NONE          SPF: HELO does not publish an SPF Record
 1.0 SPF_SOFTFAIL           SPF: sender does not match SPF record (softfail)
 0.4 KHOP_HELO_FCRDNS       Relay HELO differs from its IP's reverse DNS
X-Debbugs-Envelope-To: 50067
Cc: alan@HIDDEN, juri@HIDDEN, homeros.misasa@HIDDEN,
 tkk@HIDDEN, larsi@HIDDEN, 50067 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.0 (/)

20 aug. 2021 kl. 12.53 skrev Eli Zaretskii <eliz@HIDDEN>:

> Then please propose macOS-specific changes that ignore the menu names
> instead of displaying them.  Platform-specific conventions should not
> leak into general Lisp data structures.

I fully agree. I'll see what I can do.

Meanwhile I'm pushing the C-mouse-1 change since it seems to be in line =
with the intent of context-menu-mode.





Information forwarded to bug-gnu-emacs@HIDDEN:
bug#50067; Package emacs. Full text available.

Message received at 50067 <at> debbugs.gnu.org:


Received: (at 50067) by debbugs.gnu.org; 20 Aug 2021 10:54:11 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Aug 20 06:54:11 2021
Received: from localhost ([127.0.0.1]:33026 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1mH2A2-0005q6-Qr
	for submit <at> debbugs.gnu.org; Fri, 20 Aug 2021 06:54:11 -0400
Received: from eggs.gnu.org ([209.51.188.92]:34636)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1mH2A1-0005pb-HB
 for 50067 <at> debbugs.gnu.org; Fri, 20 Aug 2021 06:54:06 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e]:39476)
 by eggs.gnu.org with esmtp (Exim 4.90_1)
 (envelope-from <eliz@HIDDEN>)
 id 1mH29r-0000V4-DD; Fri, 20 Aug 2021 06:53:55 -0400
Received: from 84.94.185.95.cable.012.net.il ([84.94.185.95]:1785
 helo=home-c4e4a596f7)
 by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <eliz@HIDDEN>)
 id 1mH29n-0002Wu-Sk; Fri, 20 Aug 2021 06:53:55 -0400
Date: Fri, 20 Aug 2021 13:53:33 +0300
Message-Id: <83bl5s1j6a.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Mattias =?utf-8?Q?Engdeg=C3=A5rd?= <mattiase@HIDDEN>
In-Reply-To: <054BA74B-AACE-483F-994E-5E8E49E093E5@HIDDEN> (message from
 Mattias =?utf-8?Q?Engdeg=C3=A5rd?= on Fri, 20 Aug 2021 12:29:46 +0200)
Subject: Re: bug#50067: Context menus
References: <74BC00E9-2509-47DA-9428-1523FF7F3B33@HIDDEN>
 <87v942pvcj.fsf@HIDDEN> <83zgte3asy.fsf@HIDDEN>
 <87mtpepqzw.fsf@HIDDEN> <83sfz639lh.fsf@HIDDEN>
 <8735r6ppf0.fsf@HIDDEN> <83o89u37gh.fsf@HIDDEN>
 <87wnohx5zd.fsf@HIDDEN> <831r6p3lzc.fsf@HIDDEN>
 <87o89sh96g.fsf@HIDDEN>
 <054BA74B-AACE-483F-994E-5E8E49E093E5@HIDDEN>
MIME-version: 1.0
Content-type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 50067
Cc: alan@HIDDEN, juri@HIDDEN, homeros.misasa@HIDDEN,
 tkk@HIDDEN, larsi@HIDDEN, 50067 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

> From: Mattias Engdegård <mattiase@HIDDEN>
> Date: Fri, 20 Aug 2021 12:29:46 +0200
> Cc: Eli Zaretskii <eliz@HIDDEN>, 50067 <at> debbugs.gnu.org,
>         homeros.misasa@HIDDEN, tkk@HIDDEN, larsi@HIDDEN,
>         alan@HIDDEN
> 
> In macOS/NS, "titles" as disabled menu entries simply do not exist in the GUI vocabulary and look alien, amateurish, confusing or wrong. The menu is expected to be understood in its context of activation.

Then please propose macOS-specific changes that ignore the menu names
instead of displaying them.  Platform-specific conventions should not
leak into general Lisp data structures.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#50067; Package emacs. Full text available.

Message received at 50067 <at> debbugs.gnu.org:


Received: (at 50067) by debbugs.gnu.org; 20 Aug 2021 10:30:03 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Aug 20 06:30:03 2021
Received: from localhost ([127.0.0.1]:33001 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1mH1mk-00034r-9X
	for submit <at> debbugs.gnu.org; Fri, 20 Aug 2021 06:30:02 -0400
Received: from mail1479c50.megamailservers.eu ([91.136.14.79]:42794
 helo=mail118c50.megamailservers.eu)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <mattiase@HIDDEN>) id 1mH1mh-00034H-2a
 for 50067 <at> debbugs.gnu.org; Fri, 20 Aug 2021 06:30:00 -0400
X-Authenticated-User: mattiase@HIDDEN
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=megamailservers.eu;
 s=maildub; t=1629455390;
 bh=xoa7oIRfmjXASWdFyylXfAv5lnqgYhFSycES2cquNg0=;
 h=From:Subject:Date:In-Reply-To:Cc:To:References:From;
 b=PIJ3M/2vdEqZnzmLBsMtyhT5kLD1bMDOr5bXIeb0RkYuZBCw4Cijym2AGNAf2eze+
 R4ZKwAS2XRyZ/P2P2lWOiFXDR7UP6MHv/LgLdwQw0BBfhymG6P6sCPoOriQvZRvPdT
 jf+yCycCklzEPAJ6P+nZnesJF8T9PMMRj2sNsB/k=
Feedback-ID: mattiase@HIDDEN
Received: from [192.168.0.4] (c188-150-171-71.bredband.tele2.se
 [188.150.171.71]) (authenticated bits=0)
 by mail118c50.megamailservers.eu (8.14.9/8.13.1) with ESMTP id 17KATkFW015080; 
 Fri, 20 Aug 2021 10:29:48 +0000
From: =?utf-8?Q?Mattias_Engdeg=C3=A5rd?= <mattiase@HIDDEN>
Message-Id: <054BA74B-AACE-483F-994E-5E8E49E093E5@HIDDEN>
Content-Type: multipart/mixed;
 boundary="Apple-Mail=_B5FCEA10-E0DC-424D-9857-A27F1972A5F9"
Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.21\))
Subject: Re: bug#50067: Context menus
Date: Fri, 20 Aug 2021 12:29:46 +0200
In-Reply-To: <87o89sh96g.fsf@HIDDEN>
To: Juri Linkov <juri@HIDDEN>
References: <74BC00E9-2509-47DA-9428-1523FF7F3B33@HIDDEN>
 <87v942pvcj.fsf@HIDDEN> <83zgte3asy.fsf@HIDDEN>
 <87mtpepqzw.fsf@HIDDEN> <83sfz639lh.fsf@HIDDEN>
 <8735r6ppf0.fsf@HIDDEN> <83o89u37gh.fsf@HIDDEN>
 <87wnohx5zd.fsf@HIDDEN> <831r6p3lzc.fsf@HIDDEN>
 <87o89sh96g.fsf@HIDDEN>
X-Mailer: Apple Mail (2.3445.104.21)
X-CTCH-RefID: str=0001.0A742F24.611F841E.0031, ss=1, re=0.000, recu=0.000,
 reip=0.000, cl=1, cld=1, fgs=0
X-CTCH-VOD: Unknown
X-CTCH-Spam: Unknown
X-CTCH-Score: 0.000
X-CTCH-Rules: 
X-CTCH-Flags: 0
X-CTCH-ScoreCust: 0.000
X-CSC: 0
X-CHA: v=2.3 cv=Ro+70xuK c=1 sm=1 tr=0 a=SF+I6pRkHZhrawxbOkkvaA==:117
 a=SF+I6pRkHZhrawxbOkkvaA==:17 a=M51BFTxLslgA:10 a=ucMQw-l_AAAA:8
 a=fadQNI1QHYaLwKwGDA4A:9 a=CjuIK1q_8ugA:10 a=QB8CW2OmG7bqRjDTZ6EA:9
 a=B2y7HmGcmWMA:10 a=tclcd6dtLQvEqt9_mmAA:9 a=xkTruGkd22MpkFU079mG:22
X-Origin-Country: SE
X-Spam-Score: 1.4 (+)
X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org",
 has NOT identified this incoming email as spam.  The original
 message has been attached to this so you can view it or label
 similar future email.  If you have any questions, see
 the administrator of that system for details.
 Content preview: 20 aug. 2021 kl. 09.29 skrev Juri Linkov <juri@HIDDEN>:
 > An example of such menu is mouse-buffer-menu bound to C-<down-mouse-1>
 > where the user might wonder what do these menu items with mode names mean?
 Content analysis details:   (1.4 points, 10.0 required)
 pts rule name              description
 ---- ---------------------- --------------------------------------------------
 0.0 SPF_HELO_NONE          SPF: HELO does not publish an SPF Record
 1.0 SPF_SOFTFAIL           SPF: sender does not match SPF record (softfail)
 0.4 KHOP_HELO_FCRDNS       Relay HELO differs from its IP's reverse DNS
X-Debbugs-Envelope-To: 50067
Cc: alan@HIDDEN, homeros.misasa@HIDDEN, tkk@HIDDEN,
 larsi@HIDDEN, 50067 <at> debbugs.gnu.org, Eli Zaretskii <eliz@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.0 (/)


--Apple-Mail=_B5FCEA10-E0DC-424D-9857-A27F1972A5F9
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain;
	charset=us-ascii

20 aug. 2021 kl. 09.29 skrev Juri Linkov <juri@HIDDEN>:

> An example of such menu is mouse-buffer-menu bound to C-<down-mouse-1>
> where the user might wonder what do these menu items with mode names =
mean?

That's moot for macOS since C-mouse-1 will be used for the context menu. =
(Proposed patch attached.)

In macOS/NS, "titles" as disabled menu entries simply do not exist in =
the GUI vocabulary and look alien, amateurish, confusing or wrong. The =
menu is expected to be understood in its context of activation.

Where menus have titles, it's the corresponding entry in the parent menu =
(or menu bar). They are never named "something Menu" because that would =
be silly; typically it's a verb, or a noun setting a context for the =
entries in the sub-menu. For a menu of buffers to switch to, the title =
(if any) might be "Switch to buffer", "Buffer", "Switch to" or similar.


--Apple-Mail=_B5FCEA10-E0DC-424D-9857-A27F1972A5F9
Content-Disposition: attachment;
	filename=0001-Use-C-mouse-1-for-context-menu-on-NS.patch
Content-Type: application/octet-stream;
	x-unix-mode=0644;
	name="0001-Use-C-mouse-1-for-context-menu-on-NS.patch"
Content-Transfer-Encoding: quoted-printable

=46rom=20e505aa17a1ac679fee55220c594f0cfd53342739=20Mon=20Sep=2017=20=
00:00:00=202001=0AFrom:=20=3D?UTF-8?q?Mattias=3D20Engdeg=3DC3=3DA5rd?=3D=20=
<mattiase@HIDDEN>=0ADate:=20Fri,=2020=20Aug=202021=2012:03:20=20+0200=0A=
Subject:=20[PATCH]=20Use=20C-mouse-1=20for=20context=20menu=20on=20NS=0A=0A=
The=20Mac=20platform=20convention=20is=20to=20use=20control-left-click=20=
for=20context=0Amenus=20(as=20a=20synonym=20to=20right-click).=0A=0A*=20=
lisp/mouse.el=20(context-menu--old-bindings):=20Remove.=0A=
(context-menu--saved-bindings)=0A(context-menu--bind-mouse,=20=
context-menu--reset-bindings):=20New.=0A(context-menu-mode):=20Use=20new=20=
functions,=20with=20C-mouse-1=20as=20extra=0Abinding=20on=20NS.=0A---=0A=20=
lisp/mouse.el=20|=2045=20+++++++++++++++++++++++++++++----------------=0A=
=201=20file=20changed,=2029=20insertions(+),=2016=20deletions(-)=0A=0A=
diff=20--git=20a/lisp/mouse.el=20b/lisp/mouse.el=0Aindex=20=
4c4a7d35a8..8af5509afc=20100644=0A---=20a/lisp/mouse.el=0A+++=20=
b/lisp/mouse.el=0A@@=20-440,8=20+440,28=20@@=20context-menu-entry=0A=20=20=
=20`(menu-item=20,(purecopy=20"Context=20Menu")=20ignore=0A=20=20=20=20=20=
=20=20=20=20=20=20=20=20=20=20:filter=20(lambda=20(_)=20=
(context-menu-map))))=0A=20=0A-(defvar=20context-menu--old-down-mouse-3=20=
nil)=0A-(defvar=20context-menu--old-mouse-3=20nil)=0A+(defvar=20=
context-menu--saved-bindings=20nil=0A+=20=20"Alist=20of=20bindings=20to=20=
restore=20when=20`context-menu-mode'=20is=20disabled.")=0A+=0A+(defun=20=
context-menu--bind-mouse=20(click-sym=20down-sym)=0A+=20=20"Enable=20=
`context-menu-mode'=20mouse=20bindings.=0A+CLICK-SYM=20and=20DOWN-SYM=20=
are=20the=20mouse=20click=20and=20down=20key=20symbols=20to=20use."=0A+=20=
=20(let=20((click=20(vector=20click-sym))=0A+=20=20=20=20=20=20=20=20=
(down=20(vector=20down-sym)))=0A+=20=20=20=20(push=20(cons=20click-sym=20=
(global-key-binding=20click))=0A+=20=20=20=20=20=20=20=20=20=20=
context-menu--saved-bindings)=0A+=20=20=20=20(global-unset-key=20click)=0A=
+=20=20=20=20(push=20(cons=20down-sym=20(global-key-binding=20down))=0A+=20=
=20=20=20=20=20=20=20=20=20context-menu--saved-bindings)=0A+=20=20=20=20=
(global-set-key=20down=20context-menu-entry)))=0A+=0A+(defun=20=
context-menu--reset-bindings=20()=0A+=20=20"Restore=20saved=20=
`context-menu-mode'=20bindings."=0A+=20=20(pcase-dolist=20(`(sym=20.=20=
binding)=20context-menu--saved-bindings)=0A+=20=20=20=20(let=20((key=20=
(vector=20sym)))=0A+=20=20=20=20=20=20(if=20binding=0A+=20=20=20=20=20=20=
=20=20=20=20(global-set-key=20key=20binding)=0A+=20=20=20=20=20=20=20=20=
(global-unset-key=20key)))))=0A=20=0A=20(define-minor-mode=20=
context-menu-mode=0A=20=20=20"Toggle=20Context=20Menu=20mode.=0A@@=20=
-449,20=20+469,13=20@@=20context-menu-mode=0A=20When=20Context=20Menu=20=
mode=20is=20enabled,=20clicking=20the=20mouse=20button=20down-mouse-3=0A=20=
activates=20the=20menu=20whose=20contents=20depends=20on=20its=20=
surrounding=20context."=0A=20=20=20:global=20t=20:group=20'mouse=0A-=20=20=
(cond=0A-=20=20=20(context-menu-mode=0A-=20=20=20=20(setq=20=
context-menu--old-mouse-3=20(global-key-binding=20[mouse-3]))=0A-=20=20=20=
=20(global-unset-key=20[mouse-3])=0A-=20=20=20=20(setq=20=
context-menu--old-down-mouse-3=20(global-key-binding=20[down-mouse-3]))=0A=
-=20=20=20=20(global-set-key=20[down-mouse-3]=20context-menu-entry))=0A-=20=
=20=20(t=0A-=20=20=20=20(if=20(not=20context-menu--old-down-mouse-3)=0A-=20=
=20=20=20=20=20=20=20(global-unset-key=20[down-mouse-3])=0A-=20=20=20=20=20=
=20(global-set-key=20[down-mouse-3]=20context-menu--old-down-mouse-3)=0A=
-=20=20=20=20=20=20(setq=20context-menu--old-down-mouse-3=20nil))=0A-=20=20=
=20=20(when=20context-menu--old-mouse-3=0A-=20=20=20=20=20=20=
(global-set-key=20[mouse-3]=20context-menu--old-mouse-3)=0A-=20=20=20=20=20=
=20(setq=20context-menu--old-mouse-3=20nil)))))=0A+=20=20(if=20=
context-menu-mode=0A+=20=20=20=20=20=20(progn=0A+=20=20=20=20=20=20=20=20=
(setq=20context-menu--saved-bindings=20nil)=0A+=20=20=20=20=20=20=20=20=
(context-menu--bind-mouse=20'mouse-3=20'down-mouse-3)=0A+=20=20=20=20=20=20=
=20=20(when=20(featurep=20'ns)=0A+=20=20=20=20=20=20=20=20=20=20=
(context-menu--bind-mouse=20'C-mouse-1=20'C-down-mouse-1)))=0A+=20=20=20=20=
(context-menu--restore-bindings)))=0A=20=0A=20=0C=0A=20;;=20Commands=20=
that=20operate=20on=20windows.=0A--=20=0A2.21.1=20(Apple=20Git-122.3)=0A=0A=

--Apple-Mail=_B5FCEA10-E0DC-424D-9857-A27F1972A5F9
Content-Transfer-Encoding: 7bit
Content-Type: text/plain;
	charset=us-ascii




--Apple-Mail=_B5FCEA10-E0DC-424D-9857-A27F1972A5F9--




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#50067; Package emacs. Full text available.

Message received at 50067 <at> debbugs.gnu.org:


Received: (at 50067) by debbugs.gnu.org; 20 Aug 2021 07:33:05 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Aug 20 03:33:05 2021
Received: from localhost ([127.0.0.1]:32904 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1mGz1V-0004Za-3h
	for submit <at> debbugs.gnu.org; Fri, 20 Aug 2021 03:33:05 -0400
Received: from relay6-d.mail.gandi.net ([217.70.183.198]:36461)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <juri@HIDDEN>) id 1mGz1S-0004YF-Hm
 for 50067 <at> debbugs.gnu.org; Fri, 20 Aug 2021 03:33:03 -0400
Received: (Authenticated sender: juri@HIDDEN)
 by relay6-d.mail.gandi.net (Postfix) with ESMTPSA id 3F920C0008;
 Fri, 20 Aug 2021 07:32:50 +0000 (UTC)
From: Juri Linkov <juri@HIDDEN>
To: Mattias =?iso-8859-1?Q?Engdeg=E5rd?= <mattiase@HIDDEN>
Subject: Re: bug#50067: Context menus
Organization: LINKOV.NET
References: <74BC00E9-2509-47DA-9428-1523FF7F3B33@HIDDEN>
 <87v942pvcj.fsf@HIDDEN>
 <F9F140FE-CB41-432E-BA96-6F1E49BEEB8F@HIDDEN>
 <004A628A-99CC-4C62-8AE2-921C4C38D42A@HIDDEN>
Date: Fri, 20 Aug 2021 10:31:07 +0300
In-Reply-To: <004A628A-99CC-4C62-8AE2-921C4C38D42A@HIDDEN> ("Mattias
 =?iso-8859-1?Q?Engdeg=E5rd=22's?= message of "Thu, 19 Aug 2021 16:22:39
 +0200")
Message-ID: <87h7fkh8z8.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (x86_64-pc-linux-gnu)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 50067
Cc: tkk@HIDDEN, Tak Kunihiro <homeros.misasa@HIDDEN>,
 50067 <at> debbugs.gnu.org, Lars Ingebrigtsen <larsi@HIDDEN>,
 Alan Third <alan@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

>> Yes it works for elisp, because its xref backend is simplistic enough to
>> just accept the symbol given as argument. An example of a package where
>> it doesn't work is merlin which is rather more sophisticated and wants to
>> find the exact context so that it can find the right definition, so it
>> ignores the argument.
>
> Having actually read the doc strings I see that xref backends are supposed
> to define `xref-backend-identifier-at-point` which can stuff any
> information it needs in a property of the string it returns, as sort of
> a semi-covert channel to `xref-backend-definitions` etc. Sorry about the
> unfounded complaint.
>
> Would adding `xref-find-references-at-mouse` be handy for use in the context menu?

If the existing `xref-backend-identifier-at-point` can't be reused
by adding a new optional arg `click`, then a cleaner solution
would be to add `xref-backend-identifier-at-mouse` indeed.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#50067; Package emacs. Full text available.

Message received at 50067 <at> debbugs.gnu.org:


Received: (at 50067) by debbugs.gnu.org; 20 Aug 2021 07:33:02 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Aug 20 03:33:02 2021
Received: from localhost ([127.0.0.1]:32896 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1mGz1R-0004YW-L4
	for submit <at> debbugs.gnu.org; Fri, 20 Aug 2021 03:33:02 -0400
Received: from relay7-d.mail.gandi.net ([217.70.183.200]:54545)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <juri@HIDDEN>) id 1mGz1K-0004Y5-C3
 for 50067 <at> debbugs.gnu.org; Fri, 20 Aug 2021 03:33:00 -0400
Received: (Authenticated sender: juri@HIDDEN)
 by relay7-d.mail.gandi.net (Postfix) with ESMTPSA id 17EC020005;
 Fri, 20 Aug 2021 07:32:43 +0000 (UTC)
From: Juri Linkov <juri@HIDDEN>
To: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#50067: Context menus
Organization: LINKOV.NET
References: <74BC00E9-2509-47DA-9428-1523FF7F3B33@HIDDEN>
 <87v942pvcj.fsf@HIDDEN> <83zgte3asy.fsf@HIDDEN>
 <87mtpepqzw.fsf@HIDDEN> <83sfz639lh.fsf@HIDDEN>
 <8735r6ppf0.fsf@HIDDEN> <83o89u37gh.fsf@HIDDEN>
 <87wnohx5zd.fsf@HIDDEN> <831r6p3lzc.fsf@HIDDEN>
Date: Fri, 20 Aug 2021 10:29:47 +0300
In-Reply-To: <831r6p3lzc.fsf@HIDDEN> (Eli Zaretskii's message of "Thu, 19 Aug
 2021 10:57:43 +0300")
Message-ID: <87o89sh96g.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (x86_64-pc-linux-gnu)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: 50067
Cc: alan@HIDDEN, mattiase@HIDDEN, homeros.misasa@HIDDEN,
 tkk@HIDDEN, larsi@HIDDEN, 50067 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

>> GUI toolkits can't ignore titles for all menus.  Some menus should be
>> displayed with a title for all toolkits.
>
> Which popup menus have titles that cannot be ignored, and why?

An example of such menu is mouse-buffer-menu bound to C-<down-mouse-1>
where the user might wonder what do these menu items with mode names mean?

>> The context menu is special.  Nowadays everyone is accustomed to
>> down-mouse-3 popping up a context menu without title.  But other
>> Emacs-specific menus that are not familiar to users such as
>> mouse-buffer-menu bound C-<down-mouse-1> should display a title for
>> all toolkits to explain to the user what choice the menu presents.
>
> If we want some titles to behave in special ways, we could put a text
> property on the title string to mark those titles that should get
> special treatment.  That is better than removing the title, and
> certainly better than removing it based on the frame type, because
> then Lisp code which handles the menu keymaps will need to be prepared
> to handle both kinds of menu keymaps, the ones with a title and ones
> without it.  It is also against the documented practice.

Using a text property would be a good solution.  Should then
the NS-specific "Select" title be removed in menu.c
when the title has a special text property?




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#50067; Package emacs. Full text available.

Message received at 50067 <at> debbugs.gnu.org:


Received: (at 50067) by debbugs.gnu.org; 19 Aug 2021 14:22:53 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Aug 19 10:22:53 2021
Received: from localhost ([127.0.0.1]:60508 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1mGiwX-0006AQ-KB
	for submit <at> debbugs.gnu.org; Thu, 19 Aug 2021 10:22:53 -0400
Received: from mail1439c50.megamailservers.eu ([91.136.14.39]:52206
 helo=mail264c50.megamailservers.eu)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <mattiase@HIDDEN>) id 1mGiwU-0006A4-JH
 for 50067 <at> debbugs.gnu.org; Thu, 19 Aug 2021 10:22:52 -0400
X-Authenticated-User: mattiase@HIDDEN
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=megamailservers.eu;
 s=maildub; t=1629382963;
 bh=oDaCIt7CA1G6hfhyu7b4PPkG140/D36pgeq+bFRLPGI=;
 h=Subject:From:In-Reply-To:Date:Cc:References:To:From;
 b=R22c8O++YFLuBvS/1Xo74ym52x93r/hqTV6kjQiUVcA93Fd2aqjdJekv7IjMMOgUk
 Wmtercbk6Sm8LW7WVxCzizL56TYTNesOen11aJkmLMS0CXPdDsx1iIylGB+n5KAFiF
 gOmRoyjo62smK/V2/CFLBlPpnM2XXBVuTyKdg2O8=
Feedback-ID: mattiase@HIDDEN
Received: from [192.168.0.4] (c188-150-171-71.bredband.tele2.se
 [188.150.171.71]) (authenticated bits=0)
 by mail264c50.megamailservers.eu (8.14.9/8.13.1) with ESMTP id 17JEMdwT009289; 
 Thu, 19 Aug 2021 14:22:41 +0000
Content-Type: text/plain;
	charset=utf-8
Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.21\))
Subject: Re: bug#50067: Context menus
From: =?utf-8?Q?Mattias_Engdeg=C3=A5rd?= <mattiase@HIDDEN>
In-Reply-To: <F9F140FE-CB41-432E-BA96-6F1E49BEEB8F@HIDDEN>
Date: Thu, 19 Aug 2021 16:22:39 +0200
Content-Transfer-Encoding: quoted-printable
Message-Id: <004A628A-99CC-4C62-8AE2-921C4C38D42A@HIDDEN>
References: <74BC00E9-2509-47DA-9428-1523FF7F3B33@HIDDEN>
 <87v942pvcj.fsf@HIDDEN>
 <F9F140FE-CB41-432E-BA96-6F1E49BEEB8F@HIDDEN>
To: Juri Linkov <juri@HIDDEN>
X-Mailer: Apple Mail (2.3445.104.21)
X-CTCH-RefID: str=0001.0A742F1A.611E6933.0070, ss=1, re=0.000, recu=0.000,
 reip=0.000, cl=1, cld=1, fgs=0
X-CTCH-VOD: Unknown
X-CTCH-Spam: Unknown
X-CTCH-Score: 0.000
X-CTCH-Rules: 
X-CTCH-Flags: 0
X-CTCH-ScoreCust: 0.000
X-CSC: 0
X-CHA: v=2.3 cv=Xdb3M7x5 c=1 sm=1 tr=0 a=SF+I6pRkHZhrawxbOkkvaA==:117
 a=SF+I6pRkHZhrawxbOkkvaA==:17 a=IkcTkHD0fZMA:10 a=M51BFTxLslgA:10
 a=N54-gffFAAAA:8 a=8Qn-sy085hmXBpBc-0AA:9 a=QEXdDO2ut3YA:10
 a=6l0D2HzqY3Epnrm8mE3f:22
X-Origin-Country: SE
X-Spam-Score: 1.4 (+)
X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org",
 has NOT identified this incoming email as spam.  The original
 message has been attached to this so you can view it or label
 similar future email.  If you have any questions, see
 the administrator of that system for details.
 
 Content preview:  18 aug. 2021 kl. 19.46 skrev Mattias Engdegård <mattiase@HIDDEN>:
    > Yes it works for elisp, because its xref backend is simplistic enough to
    just accept the symbol given as argument. An example of a package where it
    doesn't work is merlin which is rather more sophis [...] 
 
 Content analysis details:   (1.4 points, 10.0 required)
 
  pts rule name              description
 ---- ---------------------- --------------------------------------------------
  0.0 SPF_HELO_NONE          SPF: HELO does not publish an SPF Record
  1.0 SPF_SOFTFAIL           SPF: sender does not match SPF record (softfail)
  0.4 KHOP_HELO_FCRDNS       Relay HELO differs from its IP's reverse DNS
X-Debbugs-Envelope-To: 50067
Cc: tkk@HIDDEN, Tak Kunihiro <homeros.misasa@HIDDEN>,
 50067 <at> debbugs.gnu.org, Lars Ingebrigtsen <larsi@HIDDEN>,
 Alan Third <alan@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.0 (/)

18 aug. 2021 kl. 19.46 skrev Mattias Engdeg=C3=A5rd <mattiase@HIDDEN>:

> Yes it works for elisp, because its xref backend is simplistic enough =
to just accept the symbol given as argument. An example of a package =
where it doesn't work is merlin which is rather more sophisticated and =
wants to find the exact context so that it can find the right =
definition, so it ignores the argument.

Having actually read the doc strings I see that xref backends are =
supposed to define `xref-backend-identifier-at-point` which can stuff =
any information it needs in a property of the string it returns, as sort =
of a semi-covert channel to `xref-backend-definitions` etc. Sorry about =
the unfounded complaint.

Would adding `xref-find-references-at-mouse` be handy for use in the =
context menu?





Information forwarded to bug-gnu-emacs@HIDDEN:
bug#50067; Package emacs. Full text available.

Message received at 50067 <at> debbugs.gnu.org:


Received: (at 50067) by debbugs.gnu.org; 19 Aug 2021 07:58:19 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Aug 19 03:58:19 2021
Received: from localhost ([127.0.0.1]:58366 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1mGcwH-0002Ds-RC
	for submit <at> debbugs.gnu.org; Thu, 19 Aug 2021 03:58:19 -0400
Received: from eggs.gnu.org ([209.51.188.92]:42402)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1mGcwG-0002De-5L
 for 50067 <at> debbugs.gnu.org; Thu, 19 Aug 2021 03:58:12 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e]:36588)
 by eggs.gnu.org with esmtp (Exim 4.90_1)
 (envelope-from <eliz@HIDDEN>)
 id 1mGcw5-0000ic-9T; Thu, 19 Aug 2021 03:58:01 -0400
Received: from 84.94.185.95.cable.012.net.il ([84.94.185.95]:2016
 helo=home-c4e4a596f7)
 by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <eliz@HIDDEN>)
 id 1mGcw4-0002KV-TA; Thu, 19 Aug 2021 03:58:01 -0400
Date: Thu, 19 Aug 2021 10:57:43 +0300
Message-Id: <831r6p3lzc.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Juri Linkov <juri@HIDDEN>
In-Reply-To: <87wnohx5zd.fsf@HIDDEN> (message from Juri Linkov on
 Thu, 19 Aug 2021 10:12:54 +0300)
Subject: Re: bug#50067: Context menus
References: <74BC00E9-2509-47DA-9428-1523FF7F3B33@HIDDEN>
 <87v942pvcj.fsf@HIDDEN> <83zgte3asy.fsf@HIDDEN>
 <87mtpepqzw.fsf@HIDDEN> <83sfz639lh.fsf@HIDDEN>
 <8735r6ppf0.fsf@HIDDEN> <83o89u37gh.fsf@HIDDEN>
 <87wnohx5zd.fsf@HIDDEN>
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 50067
Cc: alan@HIDDEN, mattiase@HIDDEN, homeros.misasa@HIDDEN,
 tkk@HIDDEN, larsi@HIDDEN, 50067 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> From: Juri Linkov <juri@HIDDEN>
> Cc: mattiase@HIDDEN,  50067 <at> debbugs.gnu.org,  homeros.misasa@HIDDEN,
>   tkk@HIDDEN,  larsi@HIDDEN,  alan@HIDDEN
> Date: Thu, 19 Aug 2021 10:12:54 +0300
> 
> > OK, but as I wrote elsewhere, I think the string should always be
> > present, and if some GUI toolkit wants to ignore it, it should avoid
> > putting it into the native menu structure when it creates the menu
> > widget(s).  The Lisp data should remain the same, IMO.
> 
> GUI toolkits can't ignore titles for all menus.  Some menus should be
> displayed with a title for all toolkits.

Which popup menus have titles that cannot be ignored, and why?

> The context menu is special.  Nowadays everyone is accustomed to
> down-mouse-3 popping up a context menu without title.  But other
> Emacs-specific menus that are not familiar to users such as
> mouse-buffer-menu bound C-<down-mouse-1> should display a title for
> all toolkits to explain to the user what choice the menu presents.

If we want some titles to behave in special ways, we could put a text
property on the title string to mark those titles that should get
special treatment.  That is better than removing the title, and
certainly better than removing it based on the frame type, because
then Lisp code which handles the menu keymaps will need to be prepared
to handle both kinds of menu keymaps, the ones with a title and ones
without it.  It is also against the documented practice.

So let's please reinstate the title, and use properties or some other
mechanism to mark the title strings that need special handling in some
circumstances.

Thanks.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#50067; Package emacs. Full text available.

Message received at 50067 <at> debbugs.gnu.org:


Received: (at 50067) by debbugs.gnu.org; 19 Aug 2021 07:22:09 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Aug 19 03:22:09 2021
Received: from localhost ([127.0.0.1]:58262 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1mGcNN-0001D4-J2
	for submit <at> debbugs.gnu.org; Thu, 19 Aug 2021 03:22:09 -0400
Received: from relay2-d.mail.gandi.net ([217.70.183.194]:51517)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <juri@HIDDEN>) id 1mGcNL-0001CV-3G
 for 50067 <at> debbugs.gnu.org; Thu, 19 Aug 2021 03:22:08 -0400
Received: (Authenticated sender: juri@HIDDEN)
 by relay2-d.mail.gandi.net (Postfix) with ESMTPSA id 0389940003;
 Thu, 19 Aug 2021 07:21:57 +0000 (UTC)
From: Juri Linkov <juri@HIDDEN>
To: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#50067: Context menus
Organization: LINKOV.NET
References: <74BC00E9-2509-47DA-9428-1523FF7F3B33@HIDDEN>
 <87v942pvcj.fsf@HIDDEN> <83zgte3asy.fsf@HIDDEN>
 <87mtpepqzw.fsf@HIDDEN> <83sfz639lh.fsf@HIDDEN>
 <8735r6ppf0.fsf@HIDDEN> <83o89u37gh.fsf@HIDDEN>
Date: Thu, 19 Aug 2021 10:12:54 +0300
In-Reply-To: <83o89u37gh.fsf@HIDDEN> (Eli Zaretskii's message of "Wed, 18 Aug
 2021 21:59:10 +0300")
Message-ID: <87wnohx5zd.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (x86_64-pc-linux-gnu)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 50067
Cc: alan@HIDDEN, mattiase@HIDDEN, homeros.misasa@HIDDEN,
 tkk@HIDDEN, larsi@HIDDEN, 50067 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

>> >> 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?
>> 
>> The menu definition is constructed dynamically, so it possible
>> to set the title when (framep (selected-frame)) returns t on tty.
>
> OK, but as I wrote elsewhere, I think the string should always be
> present, and if some GUI toolkit wants to ignore it, it should avoid
> putting it into the native menu structure when it creates the menu
> widget(s).  The Lisp data should remain the same, IMO.

GUI toolkits can't ignore titles for all menus.  Some menus should be
displayed with a title for all toolkits.  The context menu is special.
Nowadays everyone is accustomed to down-mouse-3 popping up a context menu
without title.  But other Emacs-specific menus that are not familiar to users
such as mouse-buffer-menu bound C-<down-mouse-1> should display a title
for all toolkits to explain to the user what choice the menu presents.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#50067; Package emacs. Full text available.

Message received at 50067 <at> debbugs.gnu.org:


Received: (at 50067) by debbugs.gnu.org; 19 Aug 2021 06:45:41 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Aug 19 02:45:41 2021
Received: from localhost ([127.0.0.1]:58213 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1mGbny-0000II-Se
	for submit <at> debbugs.gnu.org; Thu, 19 Aug 2021 02:45:41 -0400
Received: from eggs.gnu.org ([209.51.188.92]:54278)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1mGbnt-0000I2-6B
 for 50067 <at> debbugs.gnu.org; Thu, 19 Aug 2021 02:45:33 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e]:34852)
 by eggs.gnu.org with esmtp (Exim 4.90_1)
 (envelope-from <eliz@HIDDEN>)
 id 1mGbnh-0003F8-If; Thu, 19 Aug 2021 02:45:17 -0400
Received: from 84.94.185.95.cable.012.net.il ([84.94.185.95]:1494
 helo=home-c4e4a596f7)
 by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <eliz@HIDDEN>)
 id 1mGbna-0005de-H4; Thu, 19 Aug 2021 02:45:17 -0400
Date: Thu, 19 Aug 2021 09:44:48 +0300
Message-Id: <83eeaq2asf.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Stefan Monnier <monnier@HIDDEN>
In-Reply-To: <jwvim02ql19.fsf-monnier+emacs@HIDDEN> (message from Stefan
 Monnier on Wed, 18 Aug 2021 21:31:37 -0400)
Subject: Re: bug#50067: Context menus
References: <74BC00E9-2509-47DA-9428-1523FF7F3B33@HIDDEN>
 <87v942pvcj.fsf@HIDDEN> <83zgte3asy.fsf@HIDDEN>
 <87mtpepqzw.fsf@HIDDEN> <83sfz639lh.fsf@HIDDEN>
 <83pmua38ck.fsf@HIDDEN> <jwvim02ql19.fsf-monnier+emacs@HIDDEN>
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 50067
Cc: alan@HIDDEN, mattiase@HIDDEN, juri@HIDDEN,
 homeros.misasa@HIDDEN, tkk@HIDDEN, larsi@HIDDEN,
 50067 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

> From: Stefan Monnier <monnier@HIDDEN>
> Cc: juri@HIDDEN,  alan@HIDDEN,  mattiase@HIDDEN,
>   homeros.misasa@HIDDEN,  tkk@HIDDEN,  larsi@HIDDEN,
>   50067 <at> debbugs.gnu.org
> Date: Wed, 18 Aug 2021 21:31:37 -0400
> 
> > Stefan, did we remove this requirement at some point, or is it still a
> > requirement?
> 
> If memory serves it's used (as the title) for the non-toolkit menus and
> it's not used for the toolkit menus, but the reality is probably less
> clear cut than that.

That's also my recollection.  In particular TTY menus actually
_expect_ to find a meaningful string there.

So I think we need to reinstate the name in the context menus (though
perhaps we could come up with a better name than "Context menu"), and
if some toolkit wants to ignore it, they should do it when they create
the menu widgets to show the menu on the screen.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#50067; Package emacs. Full text available.

Message received at 50067 <at> debbugs.gnu.org:


Received: (at 50067) by debbugs.gnu.org; 19 Aug 2021 01:31:55 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Aug 18 21:31:55 2021
Received: from localhost ([127.0.0.1]:57803 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1mGWuN-00071D-P9
	for submit <at> debbugs.gnu.org; Wed, 18 Aug 2021 21:31:55 -0400
Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:42434)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <monnier@HIDDEN>) id 1mGWuI-00070x-EI
 for 50067 <at> debbugs.gnu.org; Wed, 18 Aug 2021 21:31:50 -0400
Received: from pmg2.iro.umontreal.ca (localhost.localdomain [127.0.0.1])
 by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id 87876807F5;
 Wed, 18 Aug 2021 21:31:40 -0400 (EDT)
Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1])
 by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id D0FCF806C6;
 Wed, 18 Aug 2021 21:31:38 -0400 (EDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca;
 s=mail; t=1629336698;
 bh=JYlEyumcCO75WntavfeOrAY714fzN9CsPERTX7u5dmk=;
 h=From:To:Cc:Subject:References:Date:In-Reply-To:From;
 b=SBOXBVj1VH83TRsPRi184z1FYVcHoEDVQFOFA3eHcqFKatLLNtaC2uJe3CB9j2/Uo
 NlMXMDWr96lQnh36KoPZJw5p2GLRDSYQBT6m/aAngS87Y2GA8ET0ErsnShZRfZicLF
 qbbZVn2Mc8ZE6RFU66dKrn/Oz96/dr9NCc4Gic4vXnlLqQhGrghDldMo4igosO73FO
 eBMNYy8TLwj9ihy86vearKjYwaWwhvDSehQKyDOM4RQPQ9IxJ51O4hytAVNXiPSdzy
 eS/h817e74RxpE3mw0pEzBcmoxnKYpkvQjoRGjxz4whSVYMfYQ41WSNsICHsxHwDuy
 +macgUUM9aOPA==
Received: from alfajor (unknown [104.247.244.135])
 by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 75A10120208;
 Wed, 18 Aug 2021 21:31:38 -0400 (EDT)
From: Stefan Monnier <monnier@HIDDEN>
To: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#50067: Context menus
Message-ID: <jwvim02ql19.fsf-monnier+emacs@HIDDEN>
References: <74BC00E9-2509-47DA-9428-1523FF7F3B33@HIDDEN>
 <87v942pvcj.fsf@HIDDEN> <83zgte3asy.fsf@HIDDEN>
 <87mtpepqzw.fsf@HIDDEN> <83sfz639lh.fsf@HIDDEN>
 <83pmua38ck.fsf@HIDDEN>
Date: Wed, 18 Aug 2021 21:31:37 -0400
In-Reply-To: <83pmua38ck.fsf@HIDDEN> (Eli Zaretskii's message of "Wed, 18 Aug
 2021 21:39:55 +0300")
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-SPAM-INFO: Spam detection results:  0
 ALL_TRUSTED                -1 Passed through trusted hosts only via SMTP
 AWL 0.081 Adjusted score from AWL reputation of From: address
 BAYES_00                 -1.9 Bayes spam probability is 0 to 1%
 DKIM_SIGNED               0.1 Message has a DKIM or DK signature,
 not necessarily valid
 DKIM_VALID -0.1 Message has at least one valid DKIM or DK signature
 DKIM_VALID_AU -0.1 Message has a valid DKIM or DK signature from author's
 domain
X-SPAM-LEVEL: 
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 50067
Cc: alan@HIDDEN, mattiase@HIDDEN, juri@HIDDEN,
 homeros.misasa@HIDDEN, tkk@HIDDEN, larsi@HIDDEN,
 50067 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

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

If memory serves it's used (as the title) for the non-toolkit menus and
it's not used for the toolkit menus, but the reality is probably less
clear cut than that.


        Stefan





Information forwarded to bug-gnu-emacs@HIDDEN:
bug#50067; Package emacs. Full text available.

Message received at 50067 <at> debbugs.gnu.org:


Received: (at 50067) by debbugs.gnu.org; 18 Aug 2021 18:59:39 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Aug 18 14:59:39 2021
Received: from localhost ([127.0.0.1]:57658 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1mGQmk-0007lJ-1z
	for submit <at> debbugs.gnu.org; Wed, 18 Aug 2021 14:59:39 -0400
Received: from eggs.gnu.org ([209.51.188.92]:37708)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1mGQme-0007l1-2R
 for 50067 <at> debbugs.gnu.org; Wed, 18 Aug 2021 14:59:32 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e]:33942)
 by eggs.gnu.org with esmtp (Exim 4.90_1)
 (envelope-from <eliz@HIDDEN>)
 id 1mGQmU-0002bx-Ff; Wed, 18 Aug 2021 14:59:18 -0400
Received: from 84.94.185.95.cable.012.net.il ([84.94.185.95]:2216
 helo=home-c4e4a596f7)
 by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <eliz@HIDDEN>)
 id 1mGQmU-0007to-1h; Wed, 18 Aug 2021 14:59:18 -0400
Date: Wed, 18 Aug 2021 21:59:10 +0300
Message-Id: <83o89u37gh.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Juri Linkov <juri@HIDDEN>
In-Reply-To: <8735r6ppf0.fsf@HIDDEN> (message from Juri Linkov on
 Wed, 18 Aug 2021 21:40:19 +0300)
Subject: Re: bug#50067: Context menus
References: <74BC00E9-2509-47DA-9428-1523FF7F3B33@HIDDEN>
 <87v942pvcj.fsf@HIDDEN> <83zgte3asy.fsf@HIDDEN>
 <87mtpepqzw.fsf@HIDDEN> <83sfz639lh.fsf@HIDDEN>
 <8735r6ppf0.fsf@HIDDEN>
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 50067
Cc: alan@HIDDEN, mattiase@HIDDEN, homeros.misasa@HIDDEN,
 tkk@HIDDEN, larsi@HIDDEN, 50067 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

> From: Juri Linkov <juri@HIDDEN>
> Cc: mattiase@HIDDEN,  50067 <at> debbugs.gnu.org,  homeros.misasa@HIDDEN,
>   tkk@HIDDEN,  larsi@HIDDEN,  alan@HIDDEN
> Date: Wed, 18 Aug 2021 21:40:19 +0300
> 
> >> 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?
> 
> The menu definition is constructed dynamically, so it possible
> to set the title when (framep (selected-frame)) returns t on tty.

OK, but as I wrote elsewhere, I think the string should always be
present, and if some GUI toolkit wants to ignore it, it should avoid
putting it into the native menu structure when it creates the menu
widget(s).  The Lisp data should remain the same, IMO.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#50067; Package emacs. Full text available.

Message received at 50067 <at> debbugs.gnu.org:


Received: (at 50067) by debbugs.gnu.org; 18 Aug 2021 18:45:31 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Aug 18 14:45:31 2021
Received: from localhost ([127.0.0.1]:57637 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1mGQZ9-0007QC-AX
	for submit <at> debbugs.gnu.org; Wed, 18 Aug 2021 14:45:31 -0400
Received: from relay3-d.mail.gandi.net ([217.70.183.195]:55181)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <juri@HIDDEN>) id 1mGQZ7-0007Px-AC
 for 50067 <at> debbugs.gnu.org; Wed, 18 Aug 2021 14:45:29 -0400
Received: (Authenticated sender: juri@HIDDEN)
 by relay3-d.mail.gandi.net (Postfix) with ESMTPSA id CF1E760005;
 Wed, 18 Aug 2021 18:45:19 +0000 (UTC)
From: Juri Linkov <juri@HIDDEN>
To: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#50067: Context menus
Organization: LINKOV.NET
References: <74BC00E9-2509-47DA-9428-1523FF7F3B33@HIDDEN>
 <87v942pvcj.fsf@HIDDEN> <83zgte3asy.fsf@HIDDEN>
 <87mtpepqzw.fsf@HIDDEN> <83sfz639lh.fsf@HIDDEN>
Date: Wed, 18 Aug 2021 21:40:19 +0300
In-Reply-To: <83sfz639lh.fsf@HIDDEN> (Eli Zaretskii's message of "Wed, 18 Aug
 2021 21:12:58 +0300")
Message-ID: <8735r6ppf0.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (x86_64-pc-linux-gnu)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 50067
Cc: alan@HIDDEN, mattiase@HIDDEN, homeros.misasa@HIDDEN,
 tkk@HIDDEN, larsi@HIDDEN, 50067 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

>> 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?

The menu definition is constructed dynamically, so it possible
to set the title when (framep (selected-frame)) returns t on tty.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#50067; Package emacs. Full text available.

Message received at 50067 <at> debbugs.gnu.org:


Received: (at 50067) by debbugs.gnu.org; 18 Aug 2021 18:40:20 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Aug 18 14:40:20 2021
Received: from localhost ([127.0.0.1]:57627 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1mGQU4-0007I6-7J
	for submit <at> debbugs.gnu.org; Wed, 18 Aug 2021 14:40:20 -0400
Received: from eggs.gnu.org ([209.51.188.92]:34826)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1mGQU2-0007Hq-7A
 for 50067 <at> debbugs.gnu.org; Wed, 18 Aug 2021 14:40:15 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e]:33244)
 by eggs.gnu.org with esmtp (Exim 4.90_1)
 (envelope-from <eliz@HIDDEN>)
 id 1mGQTr-0005vk-Jm; Wed, 18 Aug 2021 14:40:03 -0400
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 <eliz@HIDDEN>)
 id 1mGQTq-0007vN-5d; Wed, 18 Aug 2021 14:40:02 -0400
Date: Wed, 18 Aug 2021 21:39:55 +0300
Message-Id: <83pmua38ck.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: juri@HIDDEN, Stefan Monnier <monnier@HIDDEN>
In-Reply-To: <83sfz639lh.fsf@HIDDEN> (message from Eli Zaretskii on Wed, 18
 Aug 2021 21:12:58 +0300)
Subject: Re: bug#50067: Context menus
References: <74BC00E9-2509-47DA-9428-1523FF7F3B33@HIDDEN>
 <87v942pvcj.fsf@HIDDEN> <83zgte3asy.fsf@HIDDEN>
 <87mtpepqzw.fsf@HIDDEN> <83sfz639lh.fsf@HIDDEN>
MIME-version: 1.0
Content-type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 50067
Cc: alan@HIDDEN, mattiase@HIDDEN, homeros.misasa@HIDDEN,
 tkk@HIDDEN, larsi@HIDDEN, 50067 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

> Date: Wed, 18 Aug 2021 21:12:58 +0300
> From: Eli Zaretskii <eliz@HIDDEN>
> Cc: alan@HIDDEN, mattiase@HIDDEN, homeros.misasa@HIDDEN,
>  tkk@HIDDEN, larsi@HIDDEN, 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.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#50067; Package emacs. Full text available.

Message received at 50067 <at> debbugs.gnu.org:


Received: (at 50067) by debbugs.gnu.org; 18 Aug 2021 18:13:24 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Aug 18 14:13:24 2021
Received: from localhost ([127.0.0.1]:57587 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1mGQ3z-0004TJ-Mx
	for submit <at> debbugs.gnu.org; Wed, 18 Aug 2021 14:13:24 -0400
Received: from eggs.gnu.org ([209.51.188.92]:58612)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1mGQ3q-0004Sq-LS
 for 50067 <at> debbugs.gnu.org; Wed, 18 Aug 2021 14:13:15 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e]:60410)
 by eggs.gnu.org with esmtp (Exim 4.90_1)
 (envelope-from <eliz@HIDDEN>)
 id 1mGQ3i-00040a-QU; Wed, 18 Aug 2021 14:13:04 -0400
Received: from 84.94.185.95.cable.012.net.il ([84.94.185.95]:3230
 helo=home-c4e4a596f7)
 by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <eliz@HIDDEN>)
 id 1mGQ3i-0003zD-C2; Wed, 18 Aug 2021 14:13:02 -0400
Date: Wed, 18 Aug 2021 21:12:58 +0300
Message-Id: <83sfz639lh.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Juri Linkov <juri@HIDDEN>
In-Reply-To: <87mtpepqzw.fsf@HIDDEN> (message from Juri Linkov on
 Wed, 18 Aug 2021 21:06:11 +0300)
Subject: Re: bug#50067: Context menus
References: <74BC00E9-2509-47DA-9428-1523FF7F3B33@HIDDEN>
 <87v942pvcj.fsf@HIDDEN> <83zgte3asy.fsf@HIDDEN>
 <87mtpepqzw.fsf@HIDDEN>
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 50067
Cc: alan@HIDDEN, mattiase@HIDDEN, homeros.misasa@HIDDEN,
 tkk@HIDDEN, larsi@HIDDEN, 50067 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> From: Juri Linkov <juri@HIDDEN>
> Cc: mattiase@HIDDEN,  50067 <at> debbugs.gnu.org,  homeros.misasa@HIDDEN,
>   tkk@HIDDEN,  larsi@HIDDEN,  alan@HIDDEN
> Date: Wed, 18 Aug 2021 21:06:11 +0300
> 
> > 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?




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#50067; Package emacs. Full text available.

Message received at 50067 <at> debbugs.gnu.org:


Received: (at 50067) by debbugs.gnu.org; 18 Aug 2021 18:11:42 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Aug 18 14:11:42 2021
Received: from localhost ([127.0.0.1]:57568 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1mGQ2L-0004Pb-Jz
	for submit <at> debbugs.gnu.org; Wed, 18 Aug 2021 14:11:41 -0400
Received: from eggs.gnu.org ([209.51.188.92]:57836)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1mGQ2F-0004PD-J0
 for 50067 <at> debbugs.gnu.org; Wed, 18 Aug 2021 14:11:35 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e]:60202)
 by eggs.gnu.org with esmtp (Exim 4.90_1)
 (envelope-from <eliz@HIDDEN>)
 id 1mGQ25-0002sc-OZ; Wed, 18 Aug 2021 14:11:21 -0400
Received: from 84.94.185.95.cable.012.net.il ([84.94.185.95]:3127
 helo=home-c4e4a596f7)
 by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <eliz@HIDDEN>)
 id 1mGQ25-0003dQ-Bn; Wed, 18 Aug 2021 14:11:21 -0400
Date: Wed, 18 Aug 2021 21:11:16 +0300
Message-Id: <83tujm39ob.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Mattias =?utf-8?Q?Engdeg=C3=A5rd?= <mattiase@HIDDEN>
In-Reply-To: <87E21203-7AF2-4FD6-80C2-4561CD0AA088@HIDDEN> (message from
 Mattias =?utf-8?Q?Engdeg=C3=A5rd?= on Wed, 18 Aug 2021 20:01:17 +0200)
Subject: Re: bug#50067: Context menus
References: <74BC00E9-2509-47DA-9428-1523FF7F3B33@HIDDEN>
 <87v942pvcj.fsf@HIDDEN> <83zgte3asy.fsf@HIDDEN>
 <87E21203-7AF2-4FD6-80C2-4561CD0AA088@HIDDEN>
MIME-version: 1.0
Content-type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 50067
Cc: alan@HIDDEN, juri@HIDDEN, homeros.misasa@HIDDEN,
 tkk@HIDDEN, larsi@HIDDEN, 50067 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> From: Mattias Engdegård <mattiase@HIDDEN>
> Date: Wed, 18 Aug 2021 20:01:17 +0200
> Cc: Juri Linkov <juri@HIDDEN>, 50067 <at> debbugs.gnu.org,
>         homeros.misasa@HIDDEN, tkk@HIDDEN, larsi@HIDDEN,
>         alan@HIDDEN
> 
> 18 aug. 2021 kl. 19.46 skrev Eli Zaretskii <eliz@HIDDEN>:
> 
> > 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?
> 
> We definitely do but few people use that (rather useless) menu so its appearance doesn't matter much.

OK, so I guess this change should be done only on macOS (but not on
TTY frames displayed on macOS).

> I'm probably wrong, but Windows context menus haven't titles either as I remember it and they would look quite out of place on that platform as well.

Well, C-mouse-3 shows the caption of a menu on MS-Windows, so I see no
problem with showing "Context menu" there (or any other string, if we
find a better one, actually).  That serves as a small description of
what this menu is about.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#50067; Package emacs. Full text available.

Message received at 50067 <at> debbugs.gnu.org:


Received: (at 50067) by debbugs.gnu.org; 18 Aug 2021 18:06:46 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Aug 18 14:06:46 2021
Received: from localhost ([127.0.0.1]:57560 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1mGPxd-0004ID-R4
	for submit <at> debbugs.gnu.org; Wed, 18 Aug 2021 14:06:46 -0400
Received: from relay11.mail.gandi.net ([217.70.178.231]:56383)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <juri@HIDDEN>) id 1mGPxc-0004Hz-D0
 for 50067 <at> debbugs.gnu.org; Wed, 18 Aug 2021 14:06:44 -0400
Received: (Authenticated sender: juri@HIDDEN)
 by relay11.mail.gandi.net (Postfix) with ESMTPSA id 0EA6F100007;
 Wed, 18 Aug 2021 18:06:34 +0000 (UTC)
From: Juri Linkov <juri@HIDDEN>
To: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#50067: Context menus
Organization: LINKOV.NET
References: <74BC00E9-2509-47DA-9428-1523FF7F3B33@HIDDEN>
 <87v942pvcj.fsf@HIDDEN> <83zgte3asy.fsf@HIDDEN>
Date: Wed, 18 Aug 2021 21:06:11 +0300
In-Reply-To: <83zgte3asy.fsf@HIDDEN> (Eli Zaretskii's message of "Wed, 18 Aug
 2021 20:46:53 +0300")
Message-ID: <87mtpepqzw.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (x86_64-pc-linux-gnu)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 50067
Cc: alan@HIDDEN, mattiase@HIDDEN, homeros.misasa@HIDDEN,
 tkk@HIDDEN, larsi@HIDDEN, 50067 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

>> 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 guess the presence of the title should be platform-dependent.
For example, without a title it looks great on the GTK build.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#50067; Package emacs. Full text available.

Message received at 50067 <at> debbugs.gnu.org:


Received: (at 50067) by debbugs.gnu.org; 18 Aug 2021 18:02:36 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Aug 18 14:02:36 2021
Received: from localhost ([127.0.0.1]:57556 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1mGPtc-0004Bx-8n
	for submit <at> debbugs.gnu.org; Wed, 18 Aug 2021 14:02:36 -0400
Received: from mail33c50.megamailservers.eu ([91.136.10.43]:49448)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <mattiase@HIDDEN>) id 1mGPtZ-0004Bn-9i
 for 50067 <at> debbugs.gnu.org; Wed, 18 Aug 2021 14:02:35 -0400
X-Authenticated-User: mattiase@HIDDEN
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=megamailservers.eu;
 s=maildub; t=1629309705;
 bh=KAjVAzrNBY+cIA0gk7/AMg/4e5OYhLyNbBUJRF5I07c=;
 h=Subject:From:In-Reply-To:Date:Cc:References:To:From;
 b=Ja0/ZkjkLcpn2zxf5vSunD834JcprV7a172bs4uBRa8+PGoAxJq0briYvs7yMzzId
 zgpYIm6tmJkfp3IPeH2GsIJWdSv4RAGaM2m758wsnKC5IRYA6Ku7Hfdi/HGJ2FRUFw
 pIqJiTak1cSogLfSLQzjFoHUClM/ecyGFUd8VABQ=
Feedback-ID: mattiase@HIDDEN
Received: from [192.168.0.4] (c188-150-171-71.bredband.tele2.se
 [188.150.171.71]) (authenticated bits=0)
 by mail33c50.megamailservers.eu (8.14.9/8.13.1) with ESMTP id 17II1fgj004399; 
 Wed, 18 Aug 2021 18:01:42 +0000
Content-Type: text/plain;
	charset=us-ascii
Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.21\))
Subject: Re: bug#50067: Context menus
From: =?utf-8?Q?Mattias_Engdeg=C3=A5rd?= <mattiase@HIDDEN>
In-Reply-To: <83zgte3asy.fsf@HIDDEN>
Date: Wed, 18 Aug 2021 20:01:17 +0200
Content-Transfer-Encoding: quoted-printable
Message-Id: <87E21203-7AF2-4FD6-80C2-4561CD0AA088@HIDDEN>
References: <74BC00E9-2509-47DA-9428-1523FF7F3B33@HIDDEN>
 <87v942pvcj.fsf@HIDDEN> <83zgte3asy.fsf@HIDDEN>
To: Eli Zaretskii <eliz@HIDDEN>
X-Mailer: Apple Mail (2.3445.104.21)
X-CTCH-RefID: str=0001.0A742F2A.611D4B09.0060, ss=1, re=0.000, recu=0.000,
 reip=0.000, cl=1, cld=1, fgs=0
X-CTCH-VOD: Unknown
X-CTCH-Spam: Unknown
X-CTCH-Score: 0.000
X-CTCH-Rules: 
X-CTCH-Flags: 0
X-CTCH-ScoreCust: 0.000
X-CSC: 0
X-CHA: v=2.3 cv=Rbbu9Glv c=1 sm=1 tr=0 a=SF+I6pRkHZhrawxbOkkvaA==:117
 a=SF+I6pRkHZhrawxbOkkvaA==:17 a=kj9zAlcOel0A:10 a=M51BFTxLslgA:10
 a=mDV3o1hIAAAA:8 a=ZHnRtNvBZrRZ8u_30o4A:9 a=CjuIK1q_8ugA:10
 a=_FVE-zBwftR9WsbkzFJk:22
X-Origin-Country: SE
X-Spam-Score: 1.0 (+)
X-Debbugs-Envelope-To: 50067
Cc: alan@HIDDEN, Juri Linkov <juri@HIDDEN>, homeros.misasa@HIDDEN,
 tkk@HIDDEN, larsi@HIDDEN, 50067 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.0 (/)

18 aug. 2021 kl. 19.46 skrev Eli Zaretskii <eliz@HIDDEN>:

> 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?

We definitely do but few people use that (rather useless) menu so its =
appearance doesn't matter much.
If the goal here is to make a genuinely useful context menu that people =
actually want to use, then it should look like one.

I'm probably wrong, but Windows context menus haven't titles either as I =
remember it and they would look quite out of place on that platform as =
well.






Information forwarded to bug-gnu-emacs@HIDDEN:
bug#50067; Package emacs. Full text available.

Message received at 50067 <at> debbugs.gnu.org:


Received: (at 50067) by debbugs.gnu.org; 18 Aug 2021 18:01:51 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Aug 18 14:01:51 2021
Received: from localhost ([127.0.0.1]:57552 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1mGPss-0004A1-Ve
	for submit <at> debbugs.gnu.org; Wed, 18 Aug 2021 14:01:51 -0400
Received: from mail33c50.megamailservers.eu ([91.136.10.43]:49322)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <mattiase@HIDDEN>) id 1mGPsq-00049b-0T
 for 50067 <at> debbugs.gnu.org; Wed, 18 Aug 2021 14:01:49 -0400
X-Authenticated-User: mattiase@HIDDEN
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=megamailservers.eu;
 s=maildub; t=1629309705;
 bh=KAjVAzrNBY+cIA0gk7/AMg/4e5OYhLyNbBUJRF5I07c=;
 h=Subject:From:In-Reply-To:Date:Cc:References:To:From;
 b=Ja0/ZkjkLcpn2zxf5vSunD834JcprV7a172bs4uBRa8+PGoAxJq0briYvs7yMzzId
 zgpYIm6tmJkfp3IPeH2GsIJWdSv4RAGaM2m758wsnKC5IRYA6Ku7Hfdi/HGJ2FRUFw
 pIqJiTak1cSogLfSLQzjFoHUClM/ecyGFUd8VABQ=
Feedback-ID: mattiase@HIDDEN
Received: from [192.168.0.4] (c188-150-171-71.bredband.tele2.se
 [188.150.171.71]) (authenticated bits=0)
 by mail33c50.megamailservers.eu (8.14.9/8.13.1) with ESMTP id 17II1fgj004399; 
 Wed, 18 Aug 2021 18:01:42 +0000
Content-Type: text/plain;
	charset=us-ascii
Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.21\))
Subject: Re: bug#50067: Context menus
From: =?utf-8?Q?Mattias_Engdeg=C3=A5rd?= <mattiase@HIDDEN>
In-Reply-To: <83zgte3asy.fsf@HIDDEN>
Date: Wed, 18 Aug 2021 20:01:17 +0200
Content-Transfer-Encoding: quoted-printable
Message-Id: <87E21203-7AF2-4FD6-80C2-4561CD0AA088@HIDDEN>
References: <74BC00E9-2509-47DA-9428-1523FF7F3B33@HIDDEN>
 <87v942pvcj.fsf@HIDDEN> <83zgte3asy.fsf@HIDDEN>
To: Eli Zaretskii <eliz@HIDDEN>
X-Mailer: Apple Mail (2.3445.104.21)
X-CTCH-RefID: str=0001.0A742F2A.611D4B09.0060, ss=1, re=0.000, recu=0.000,
 reip=0.000, cl=1, cld=1, fgs=0
X-CTCH-VOD: Unknown
X-CTCH-Spam: Unknown
X-CTCH-Score: 0.000
X-CTCH-Rules: 
X-CTCH-Flags: 0
X-CTCH-ScoreCust: 0.000
X-CSC: 0
X-CHA: v=2.3 cv=Rbbu9Glv c=1 sm=1 tr=0 a=SF+I6pRkHZhrawxbOkkvaA==:117
 a=SF+I6pRkHZhrawxbOkkvaA==:17 a=kj9zAlcOel0A:10 a=M51BFTxLslgA:10
 a=mDV3o1hIAAAA:8 a=ZHnRtNvBZrRZ8u_30o4A:9 a=CjuIK1q_8ugA:10
 a=_FVE-zBwftR9WsbkzFJk:22
X-Origin-Country: SE
X-Spam-Score: 1.0 (+)
X-Debbugs-Envelope-To: 50067
Cc: alan@HIDDEN, Juri Linkov <juri@HIDDEN>, homeros.misasa@HIDDEN,
 tkk@HIDDEN, larsi@HIDDEN, 50067 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.0 (/)

18 aug. 2021 kl. 19.46 skrev Eli Zaretskii <eliz@HIDDEN>:

> 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?

We definitely do but few people use that (rather useless) menu so its =
appearance doesn't matter much.
If the goal here is to make a genuinely useful context menu that people =
actually want to use, then it should look like one.

I'm probably wrong, but Windows context menus haven't titles either as I =
remember it and they would look quite out of place on that platform as =
well.






Information forwarded to bug-gnu-emacs@HIDDEN:
bug#50067; Package emacs. Full text available.

Message received at 50067 <at> debbugs.gnu.org:


Received: (at 50067) by debbugs.gnu.org; 18 Aug 2021 17:53:36 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Aug 18 13:53:36 2021
Received: from localhost ([127.0.0.1]:57547 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1mGPkq-0003vf-0X
	for submit <at> debbugs.gnu.org; Wed, 18 Aug 2021 13:53:36 -0400
Received: from eggs.gnu.org ([209.51.188.92]:52130)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1mGPkk-0003vI-AK
 for 50067 <at> debbugs.gnu.org; Wed, 18 Aug 2021 13:53:30 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e]:59534)
 by eggs.gnu.org with esmtp (Exim 4.90_1)
 (envelope-from <eliz@HIDDEN>)
 id 1mGPkb-0006kC-RS; Wed, 18 Aug 2021 13:53:17 -0400
Received: from 84.94.185.95.cable.012.net.il ([84.94.185.95]:2026
 helo=home-c4e4a596f7)
 by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <eliz@HIDDEN>)
 id 1mGPkb-0000P6-Eg; Wed, 18 Aug 2021 13:53:17 -0400
Date: Wed, 18 Aug 2021 20:53:12 +0300
Message-Id: <83wnoi3aif.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Mattias =?utf-8?Q?Engdeg=C3=A5rd?= <mattiase@HIDDEN>
In-Reply-To: <F9F140FE-CB41-432E-BA96-6F1E49BEEB8F@HIDDEN> (message from
 Mattias =?utf-8?Q?Engdeg=C3=A5rd?= on Wed, 18 Aug 2021 19:46:45 +0200)
Subject: Re: bug#50067: Context menus
References: <74BC00E9-2509-47DA-9428-1523FF7F3B33@HIDDEN>
 <87v942pvcj.fsf@HIDDEN>
 <F9F140FE-CB41-432E-BA96-6F1E49BEEB8F@HIDDEN>
MIME-version: 1.0
Content-type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 50067
Cc: alan@HIDDEN, juri@HIDDEN, homeros.misasa@HIDDEN,
 tkk@HIDDEN, larsi@HIDDEN, 50067 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> From: Mattias Engdegård <mattiase@HIDDEN>
> Date: Wed, 18 Aug 2021 19:46:45 +0200
> Cc: 50067 <at> debbugs.gnu.org, Tak Kunihiro <homeros.misasa@HIDDEN>,
>  tkk@HIDDEN, Lars Ingebrigtsen <larsi@HIDDEN>,
>  Alan Third <alan@HIDDEN>
> 
> > After trying to remove it altogether, there is no title at all,
> > but maybe it's platform-dependent (I tested on GTK):
> 
> After your suggested change I still get the "Select" title; needs to be investigated further.

That "Select" is probably macOS specific, I don't see it here.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#50067; Package emacs. Full text available.

Message received at 50067 <at> debbugs.gnu.org:


Received: (at 50067) by debbugs.gnu.org; 18 Aug 2021 17:47:11 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Aug 18 13:47:11 2021
Received: from localhost ([127.0.0.1]:57531 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1mGPec-0003m0-SX
	for submit <at> debbugs.gnu.org; Wed, 18 Aug 2021 13:47:10 -0400
Received: from eggs.gnu.org ([209.51.188.92]:49406)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1mGPeb-0003lI-Q7
 for 50067 <at> debbugs.gnu.org; Wed, 18 Aug 2021 13:47:06 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e]:59244)
 by eggs.gnu.org with esmtp (Exim 4.90_1)
 (envelope-from <eliz@HIDDEN>)
 id 1mGPeQ-0001us-VZ; Wed, 18 Aug 2021 13:46:54 -0400
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 <eliz@HIDDEN>)
 id 1mGPeQ-0008Er-IE; Wed, 18 Aug 2021 13:46:54 -0400
Date: Wed, 18 Aug 2021 20:46:53 +0300
Message-Id: <83zgte3asy.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Juri Linkov <juri@HIDDEN>
In-Reply-To: <87v942pvcj.fsf@HIDDEN> (message from Juri Linkov on
 Wed, 18 Aug 2021 19:42:12 +0300)
Subject: Re: bug#50067: Context menus
References: <74BC00E9-2509-47DA-9428-1523FF7F3B33@HIDDEN>
 <87v942pvcj.fsf@HIDDEN>
MIME-version: 1.0
Content-type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 50067
Cc: alan@HIDDEN, mattiase@HIDDEN, homeros.misasa@HIDDEN,
 tkk@HIDDEN, larsi@HIDDEN, 50067 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> From: Juri Linkov <juri@HIDDEN>
> Date: Wed, 18 Aug 2021 19:42:12 +0300
> Cc: 50067 <at> debbugs.gnu.org, Tak Kunihiro <homeros.misasa@HIDDEN>,
>  tkk@HIDDEN, Lars Ingebrigtsen <larsi@HIDDEN>,
>  Alan Third <alan@HIDDEN>
> 
> > 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?




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#50067; Package emacs. Full text available.

Message received at 50067 <at> debbugs.gnu.org:


Received: (at 50067) by debbugs.gnu.org; 18 Aug 2021 17:47:00 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Aug 18 13:47:00 2021
Received: from localhost ([127.0.0.1]:57527 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1mGPeW-0003lH-J7
	for submit <at> debbugs.gnu.org; Wed, 18 Aug 2021 13:47:00 -0400
Received: from mail1459c50.megamailservers.eu ([91.136.14.59]:40856
 helo=mail267c50.megamailservers.eu)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <mattiase@HIDDEN>) id 1mGPeS-0003kz-GO
 for 50067 <at> debbugs.gnu.org; Wed, 18 Aug 2021 13:46:58 -0400
X-Authenticated-User: mattiase@HIDDEN
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=megamailservers.eu;
 s=maildub; t=1629308809;
 bh=OKfdWL5Bak6QYLWYs42tBorpbj6n2NcUL3tlJBZiDG8=;
 h=Subject:From:In-Reply-To:Date:Cc:References:To:From;
 b=okuTuG8QrVJWdWl2rBEBAPcqlAg6jW2x3/5mZFEQhwXBQoIL0r/SUzyB3p51VyrrF
 4h91xhpXXy4x1spHCaf3kwJHkpWzvaZe4JhtsD3Zr4/vSDR1E2SsDdIBaPfA6rOhmV
 4NVS4VofgnbNehqY3PDJ561H9UPH5VFgdWQsjnXw=
Feedback-ID: mattiase@HIDDEN
Received: from [192.168.0.4] (c188-150-171-71.bredband.tele2.se
 [188.150.171.71]) (authenticated bits=0)
 by mail267c50.megamailservers.eu (8.14.9/8.13.1) with ESMTP id 17IHkj64022241; 
 Wed, 18 Aug 2021 17:46:47 +0000
Content-Type: text/plain;
	charset=utf-8
Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.21\))
Subject: Re: bug#50067: Context menus
From: =?utf-8?Q?Mattias_Engdeg=C3=A5rd?= <mattiase@HIDDEN>
In-Reply-To: <87v942pvcj.fsf@HIDDEN>
Date: Wed, 18 Aug 2021 19:46:45 +0200
Content-Transfer-Encoding: quoted-printable
Message-Id: <F9F140FE-CB41-432E-BA96-6F1E49BEEB8F@HIDDEN>
References: <74BC00E9-2509-47DA-9428-1523FF7F3B33@HIDDEN>
 <87v942pvcj.fsf@HIDDEN>
To: Juri Linkov <juri@HIDDEN>
X-Mailer: Apple Mail (2.3445.104.21)
X-CTCH-RefID: str=0001.0A742F25.611D4789.0024, ss=1, re=0.000, recu=0.000,
 reip=0.000, cl=1, cld=1, fgs=0
X-CTCH-VOD: Unknown
X-CTCH-Spam: Unknown
X-CTCH-Score: 0.000
X-CTCH-Rules: 
X-CTCH-Flags: 0
X-CTCH-ScoreCust: 0.000
X-CSC: 0
X-CHA: v=2.3 cv=S9SnP7kP c=1 sm=1 tr=0 a=SF+I6pRkHZhrawxbOkkvaA==:117
 a=SF+I6pRkHZhrawxbOkkvaA==:17 a=IkcTkHD0fZMA:10 a=M51BFTxLslgA:10
 a=ucMQw-l_AAAA:8 a=L4BmyjnkBGAdIlXQYDgA:9 a=QEXdDO2ut3YA:10
 a=xkTruGkd22MpkFU079mG:22
X-Origin-Country: SE
X-Spam-Score: 1.4 (+)
X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org",
 has NOT identified this incoming email as spam.  The original
 message has been attached to this so you can view it or label
 similar future email.  If you have any questions, see
 the administrator of that system for details.
 
 Content preview:  18 aug. 2021 kl. 18.42 skrev Juri Linkov <juri@HIDDEN>:
    > The raison d'être for the special mode context-menu-mode is to > rebind
    the default keys optionally. So it would make sense to bind > context-menu-entry
    conditionally: > > 1. to [C-mouse-1] on macO [...] 
 
 Content analysis details:   (1.4 points, 10.0 required)
 
  pts rule name              description
 ---- ---------------------- --------------------------------------------------
  0.0 SPF_HELO_NONE          SPF: HELO does not publish an SPF Record
  1.0 SPF_SOFTFAIL           SPF: sender does not match SPF record (softfail)
  0.4 KHOP_HELO_FCRDNS       Relay HELO differs from its IP's reverse DNS
X-Debbugs-Envelope-To: 50067
Cc: tkk@HIDDEN, Tak Kunihiro <homeros.misasa@HIDDEN>,
 50067 <at> debbugs.gnu.org, Lars Ingebrigtsen <larsi@HIDDEN>,
 Alan Third <alan@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.0 (/)

18 aug. 2021 kl. 18.42 skrev Juri Linkov <juri@HIDDEN>:

> The raison d'=C3=AAtre for the special mode context-menu-mode is to
> rebind the default keys optionally.  So it would make sense to bind
> context-menu-entry conditionally:
>=20
> 1. to [C-mouse-1] on macOS depending on =E2=80=98(featurep 'ns)=E2=80=99=
;
> 2. to [down-mouse-3] everywhere else.
>=20
> in the function body of context-menu-mode.

We'd like both bindings to work on macOS (the user could have a mouse =
with a right button) but that should be doable.

> After trying to remove it altogether, there is no title at all,
> but maybe it's platform-dependent (I tested on GTK):

After your suggested change I still get the "Select" title; needs to be =
investigated further.

> Could you please provide a test case?  Because I've thoroughly tested
> =E2=80=9CFind Definition=E2=80=9D to apply where the click occurred, =
and it works as expected.

Yes it works for elisp, because its xref backend is simplistic enough to =
just accept the symbol given as argument. An example of a package where =
it doesn't work is merlin which is rather more sophisticated and wants =
to find the exact context so that it can find the right definition, so =
it ignores the argument.

It would be useful to do this for elisp as well, so that it would work =
for local variables etc.





Information forwarded to bug-gnu-emacs@HIDDEN:
bug#50067; Package emacs. Full text available.

Message received at 50067 <at> debbugs.gnu.org:


Received: (at 50067) by debbugs.gnu.org; 18 Aug 2021 16:45:11 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Aug 18 12:45:11 2021
Received: from localhost ([127.0.0.1]:57444 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1mGOgh-00028Y-31
	for submit <at> debbugs.gnu.org; Wed, 18 Aug 2021 12:45:11 -0400
Received: from relay2-d.mail.gandi.net ([217.70.183.194]:44383)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <juri@HIDDEN>) id 1mGOgb-00027E-Aq
 for 50067 <at> debbugs.gnu.org; Wed, 18 Aug 2021 12:45:06 -0400
Received: (Authenticated sender: juri@HIDDEN)
 by relay2-d.mail.gandi.net (Postfix) with ESMTPSA id B346040009;
 Wed, 18 Aug 2021 16:44:54 +0000 (UTC)
From: Juri Linkov <juri@HIDDEN>
To: Mattias =?iso-8859-1?Q?Engdeg=E5rd?= <mattiase@HIDDEN>
Subject: Re: bug#50067: Context menus
Organization: LINKOV.NET
References: <74BC00E9-2509-47DA-9428-1523FF7F3B33@HIDDEN>
Date: Wed, 18 Aug 2021 19:42:12 +0300
In-Reply-To: <74BC00E9-2509-47DA-9428-1523FF7F3B33@HIDDEN> ("Mattias
 =?iso-8859-1?Q?Engdeg=E5rd=22's?= message of "Wed, 18 Aug 2021 12:52:08
 +0200")
Message-ID: <87v942pvcj.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (x86_64-pc-linux-gnu)
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 50067
Cc: tkk@HIDDEN, Tak Kunihiro <homeros.misasa@HIDDEN>,
 50067 <at> debbugs.gnu.org, Lars Ingebrigtsen <larsi@HIDDEN>,
 Alan Third <alan@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

> 1. Mac users expect C-mouse-1 to be equivalent to mouse-3 because Macs
> traditionally only have one mouse button; this is especially true of laptop
> users (probably the majority today). Simply speaking, control-mouse-1 is
> expected to invoke the context menu; this is the platform convention and we
> should try to find a way to make it so.
>
> We could add a mac-only setting that remaps control-mouse-1 to mouse-3
> (preserving all other modifiers like shift, alt and super). (I don't think
> there already is such a translation but could be mistaken). I'm attaching
> a tentative patch as a proof of concept.
>
> It is also possible to just do it in Lisp, but then we'd probably need
> to do it specially for the context menu. (I tried using event
> translation but that didn't work right.)

The raison d'être for the special mode context-menu-mode is to
rebind the default keys optionally.  So it would make sense to bind
context-menu-entry conditionally:

1. to [C-mouse-1] on macOS depending on ‘(featurep 'ns)’;
2. to [down-mouse-3] everywhere else.

in the function body of context-menu-mode.

> Currently, C-mouse-1 pops up the buffer menu but it's unclear if
> that's used by a sizeable part of the population, and in any case Macs
> have a Buffer menu easily accessible in the menu bar.

Additionally, a Buffer menu is accessible from the context menu
when context-menu-functions is customized to contain ‘context-menu-global’.

> 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))

> 3. Not Mac-specific (really about xref): in some modes, Find Definition
> applies to point instead of where the click occurred. Apparently the xref
> backend ignores the symbol discovered by xref-find-definition-at-mouse
> because that tokenisation isn't appropriate for the language and it does
> a more thorough job that is based on point instead. What we really should
> do is to set point temporarily for the whole duration of the
> xref-find-definitions call.

Could you please provide a test case?  Because I've thoroughly tested
“Find Definition” to apply where the click occurred, and it works as expected.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#50067; Package emacs. Full text available.

Message received at 50067 <at> debbugs.gnu.org:


Received: (at 50067) by debbugs.gnu.org; 18 Aug 2021 08:10:05 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Aug 18 04:10:05 2021
Received: from localhost ([127.0.0.1]:54778 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1mGGeD-0004Ri-EG
	for submit <at> debbugs.gnu.org; Wed, 18 Aug 2021 04:10:05 -0400
Received: from relay10.mail.gandi.net ([217.70.178.230]:58677)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <juri@HIDDEN>) id 1mGGeA-0004Qo-It
 for 50067 <at> debbugs.gnu.org; Wed, 18 Aug 2021 04:10:03 -0400
Received: (Authenticated sender: juri@HIDDEN)
 by relay10.mail.gandi.net (Postfix) with ESMTPSA id CAF41240007;
 Wed, 18 Aug 2021 08:09:52 +0000 (UTC)
From: Juri Linkov <juri@HIDDEN>
To: Tak Kunihiro <homeros.misasa@HIDDEN>
Subject: Re: bug#50067: Context menus
Organization: LINKOV.NET
References: <87pmufb3u0.fsf@HIDDEN> <87tujqoram.fsf@HIDDEN>
 <871r6u66zm.fsf@HIDDEN> <87o89xfwwh.fsf@HIDDEN>
 <87wnokcww6.fsf@HIDDEN>
 <m14kbnqser.fsf@HIDDEN>
Date: Wed, 18 Aug 2021 10:47:34 +0300
In-Reply-To: <m14kbnqser.fsf@HIDDEN> (Tak Kunihiro's message
 of "Wed, 18 Aug 2021 13:38:04 +0900")
Message-ID: <87bl5vtbuh.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (x86_64-pc-linux-gnu)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 50067
Cc: Lars Ingebrigtsen <larsi@HIDDEN>, 50067 <at> debbugs.gnu.org,
 tkk@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

>> It would be easier to make more experiments with code in master,
>> so now merged the branch to master.
>
> I see the context menu after M-x context-menu-mode.  Thank you for
> working on this.

Thank you for the great idea of using a list of functions.

> I will see how it works and try to give feedback soon.

Waiting for your feedback.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#50067; Package emacs. Full text available.

Message received at 50067 <at> debbugs.gnu.org:


Received: (at 50067) by debbugs.gnu.org; 18 Aug 2021 04:38:17 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Aug 18 00:38:17 2021
Received: from localhost ([127.0.0.1]:54532 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1mGDLE-0007EA-Rm
	for submit <at> debbugs.gnu.org; Wed, 18 Aug 2021 00:38:16 -0400
Received: from mail-pj1-f47.google.com ([209.85.216.47]:40878)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <homeros.misasa@HIDDEN>) id 1mGDLD-0007Dv-BZ
 for 50067 <at> debbugs.gnu.org; Wed, 18 Aug 2021 00:38:15 -0400
Received: by mail-pj1-f47.google.com with SMTP id
 n13-20020a17090a4e0d00b0017946980d8dso8050423pjh.5
 for <50067 <at> debbugs.gnu.org>; Tue, 17 Aug 2021 21:38:15 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
 h=from:to:cc:cc:subject:references:date:in-reply-to:message-id
 :user-agent:mime-version;
 bh=d/tPCq+zhxfexJSZeY+bcD6ooo/yLSWRifzzRl5+t2E=;
 b=eiJrNAPNvn4ZfHPyRYYWDUgz/TtbsVIm5uQZpXOg8yDX3QTinTzbPMaJ3AMY6rkdwY
 U4D4liQ+VQ8gOMqiIPqBrjdgN2m99dqczbiHetRhAO3Y8oVQBxDCmC6/aL6/X1aWYrcw
 6PrTZPLS3jOn7nP5+sbpF+kIdqj/RGvfCu7ysruqWD3IuQ4ZBhdABKni90u6D96c7AZw
 lj10bGMExeq6Lqpi4D/cLcWwh1yGIbSQJgVMzdE9op1HTu70FxKPwitspMMyE6bqePIy
 MSMTowCPSBKEpXXjsXfAg6RHT91vdmX2sJ9pvCufesehoWjqqI74QNONpT/fl3nDGu9e
 LThA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:from:to:cc:cc:subject:references:date
 :in-reply-to:message-id:user-agent:mime-version;
 bh=d/tPCq+zhxfexJSZeY+bcD6ooo/yLSWRifzzRl5+t2E=;
 b=DaRVcCdmqhbYhwIDsSFO8VWMigu48ARzaxZu+iyO1hudtCF3ykWx0Co1YjZKL4khFl
 s9BW32QHaNQSYUGNUXoUi1vTathOJNzIrEyJpZ2iy+smJ3HwUhn/LCR0l0ksA06mbS5s
 F5AzEkjO7xtSbqwBCtkhuy50xvxla5Cb6z8Z+8aCGDFJ0yKWAIhTQEeyTwPdOvWExKF5
 CvSVrDFpUX0cWb72QEhO+TzGYVt6hp5To9MnHbjOUYqdaufvfxC48Y8qq9u5GMW6XA6J
 FFbjTm2ytDbi798vumKIcoD9oJnyD7EZ9Gp3Y4MJ7ev9VhRHGzfPTfJJp+Qrf7GHzhUu
 fFNA==
X-Gm-Message-State: AOAM531h1rOa0peOHtzdhVYkEMOG7xcL9qSyTPiMAEXpAWObr/HXbH11
 sCuRI8dn8vXG5j+5b01Fqfk=
X-Google-Smtp-Source: ABdhPJzAZyvvLNLAzfamNsLmEN7mNzk/fcwNX6TfBT5vltF4SAJpVV+LZEg7bn1su47tS2/4D/Ho8g==
X-Received: by 2002:a17:90b:4905:: with SMTP id
 kr5mr7089825pjb.112.1629261489544; 
 Tue, 17 Aug 2021 21:38:09 -0700 (PDT)
Received: from DreamMini2019.local (vesta.misasa.okayama-u.ac.jp.
 [150.46.48.154])
 by smtp.gmail.com with ESMTPSA id y62sm4177329pfy.183.2021.08.17.21.38.07
 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
 Tue, 17 Aug 2021 21:38:08 -0700 (PDT)
From: Tak Kunihiro <homeros.misasa@HIDDEN>
X-Google-Original-From: Tak Kunihiro <tkk@HIDDEN>
To: Juri Linkov <juri@HIDDEN>
Subject: Re: bug#50067: Context menus
References: <87pmufb3u0.fsf@HIDDEN> <87tujqoram.fsf@HIDDEN>
 <871r6u66zm.fsf@HIDDEN> <87o89xfwwh.fsf@HIDDEN>
 <87wnokcww6.fsf@HIDDEN>
Date: Wed, 18 Aug 2021 13:38:04 +0900
In-Reply-To: <87wnokcww6.fsf@HIDDEN> (Juri Linkov's message of "Tue, 
 17 Aug 2021 11:12:41 +0300")
Message-ID: <m14kbnqser.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (darwin)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: 50067
Cc: Lars Ingebrigtsen <larsi@HIDDEN>, 50067 <at> debbugs.gnu.org,
 tkk@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

> It would be easier to make more experiments with code in master,
> so now merged the branch to master.

I see the context menu after M-x context-menu-mode.  Thank you for
working on this.

I will see how it works and try to give feedback soon.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#50067; Package emacs. Full text available.
bug marked as fixed in version 28.0.50, send any further explanations to 50067 <at> debbugs.gnu.org and Juri Linkov <juri@HIDDEN> Request was from Juri Linkov <juri@HIDDEN> to control <at> debbugs.gnu.org. Full text available.
Added tag(s) fixed. Request was from Juri Linkov <juri@HIDDEN> to control <at> debbugs.gnu.org. Full text available.

Message received at 50067 <at> debbugs.gnu.org:


Received: (at 50067) by debbugs.gnu.org; 17 Aug 2021 08:13:20 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Aug 17 04:13:20 2021
Received: from localhost ([127.0.0.1]:51616 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1mFuDn-00071R-U6
	for submit <at> debbugs.gnu.org; Tue, 17 Aug 2021 04:13:20 -0400
Received: from relay8-d.mail.gandi.net ([217.70.183.201]:32771)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <juri@HIDDEN>)
 id 1mFuDm-000718-15; Tue, 17 Aug 2021 04:13:18 -0400
Received: (Authenticated sender: juri@HIDDEN)
 by relay8-d.mail.gandi.net (Postfix) with ESMTPSA id 5D1191BF205;
 Tue, 17 Aug 2021 08:13:09 +0000 (UTC)
From: Juri Linkov <juri@HIDDEN>
To: Lars Ingebrigtsen <larsi@HIDDEN>
Subject: Re: bug#50067: Context menus
Organization: LINKOV.NET
References: <87pmufb3u0.fsf@HIDDEN> <87tujqoram.fsf@HIDDEN>
 <871r6u66zm.fsf@HIDDEN> <87o89xfwwh.fsf@HIDDEN>
Date: Tue, 17 Aug 2021 11:12:41 +0300
In-Reply-To: <87o89xfwwh.fsf@HIDDEN> (Lars Ingebrigtsen's message of "Mon,
 16 Aug 2021 13:31:58 +0200")
Message-ID: <87wnokcww6.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (x86_64-pc-linux-gnu)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 50067
Cc: 50067 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

tags 50067 fixed
close 50067 28.0.50
quit

>>> I'm also wondering whether we should add a `context-menu' text property.
>>
>> As soon as such a need arises, a text property could be added as well.
>> But it seems currently much cleaner is to use a single context-menu
>> function for every mode.
>
> Right.  I was thinking that it's pretty likely that all button-like
> things are going to grow a context menu, but we can add `context-menu'
> later if that turns out to be the case.

It would be easier to make more experiments with code in master,
so now merged the branch to master.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#50067; Package emacs. Full text available.

Message received at 50067 <at> debbugs.gnu.org:


Received: (at 50067) by debbugs.gnu.org; 16 Aug 2021 11:32:13 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Aug 16 07:32:13 2021
Received: from localhost ([127.0.0.1]:48645 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1mFaqj-0001Nn-2g
	for submit <at> debbugs.gnu.org; Mon, 16 Aug 2021 07:32:13 -0400
Received: from quimby.gnus.org ([95.216.78.240]:42204)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <larsi@HIDDEN>) id 1mFaqg-0001HZ-AX
 for 50067 <at> debbugs.gnu.org; Mon, 16 Aug 2021 07:32:12 -0400
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org;
 s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date:
 References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding:
 Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender:
 Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:
 List-Subscribe:List-Post:List-Owner:List-Archive;
 bh=3rs8lyn6YNG66WMF9rg5d5Huq+D89TVnGBlFeLz1yac=; b=O3UizJW9c919qNeXT0AUZ0KWHy
 gdshduh6tjoi8wWrMsCMvq5CRFyRZdFpMAqj9WRjTrXTc/2VXiF1Id6lLZiYz158JVXOfF89PyU8J
 3U5CqV7vYEE/ZOYQfvaMX+HTUpDZUQFgIEDuF8Uqt21hKJtC2Ee3vGL0OAYCPPA1PN5I=;
Received: from [84.212.220.105] (helo=elva)
 by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.92) (envelope-from <larsi@HIDDEN>)
 id 1mFaqV-0004DI-5U; Mon, 16 Aug 2021 13:32:03 +0200
From: Lars Ingebrigtsen <larsi@HIDDEN>
To: Juri Linkov <juri@HIDDEN>
Subject: Re: bug#50067: Context menus
References: <87pmufb3u0.fsf@HIDDEN> <87tujqoram.fsf@HIDDEN>
 <871r6u66zm.fsf@HIDDEN>
Date: Mon, 16 Aug 2021 13:31:58 +0200
In-Reply-To: <871r6u66zm.fsf@HIDDEN> (Juri Linkov's message of "Sun, 
 15 Aug 2021 19:12:57 +0300")
Message-ID: <87o89xfwwh.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org",
 has NOT identified this incoming email as spam.  The original
 message has been attached to this so you can view it or label
 similar future email.  If you have any questions, see
 @@CONTACT_ADDRESS@@ for details.
 Content preview: Juri Linkov <juri@HIDDEN> writes: >> +(defun
 eww-context-menu
 (menu) >> [...] >> + (when (or (mouse-posn-property (event-start
 last-input-event)
 'shr-url) >> + (mouse-posn-property (event-start last-input-event)
 'image-url)) >> + (def [...] 
 Content analysis details:   (-2.9 points, 5.0 required)
 pts rule name              description
 ---- ---------------------- --------------------------------------------------
 -1.0 ALL_TRUSTED            Passed through trusted hosts only via SMTP
 -1.9 BAYES_00               BODY: Bayes spam probability is 0 to 1%
 [score: 0.0000]
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 50067
Cc: 50067 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

Juri Linkov <juri@HIDDEN> writes:

>> +(defun eww-context-menu (menu)
>> [...]
>> +  (when (or (mouse-posn-property (event-start last-input-event) 'shr-url)
>> +            (mouse-posn-property (event-start last-input-event) 'image-url))
>> +    (define-key menu [shr-mouse-browse-url-new-window]

[...]

> To get an event would be nice, but I see no way to do this.
> The top function 'context-menu-map' is called by:
>
>   `(menu-item ,(purecopy "Context Menu") ignore
>               :filter (lambda (_) (context-menu-map))))
>
> that has no access to the event - an unused argument of lambda above
> is just the binding that is 'ignore' in this case.

Could just use `last-input-event', I guess?  But that doesn't really
give us anything better than what we have, so there's probably no point.

>> I'm also wondering whether we should add a `context-menu' text property.
>
> As soon as such a need arises, a text property could be added as well.
> But it seems currently much cleaner is to use a single context-menu
> function for every mode.

Right.  I was thinking that it's pretty likely that all button-like
things are going to grow a context menu, but we can add `context-menu'
later if that turns out to be the case.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#50067; Package emacs. Full text available.

Message received at 50067 <at> debbugs.gnu.org:


Received: (at 50067) by debbugs.gnu.org; 15 Aug 2021 16:21:17 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Aug 15 12:21:17 2021
Received: from localhost ([127.0.0.1]:47619 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1mFIsv-0003gM-Gm
	for submit <at> debbugs.gnu.org; Sun, 15 Aug 2021 12:21:17 -0400
Received: from relay11.mail.gandi.net ([217.70.178.231]:45693)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <juri@HIDDEN>) id 1mFIss-0003g4-Dx
 for 50067 <at> debbugs.gnu.org; Sun, 15 Aug 2021 12:21:16 -0400
Received: (Authenticated sender: juri@HIDDEN)
 by relay11.mail.gandi.net (Postfix) with ESMTPSA id 2A494100004;
 Sun, 15 Aug 2021 16:21:06 +0000 (UTC)
From: Juri Linkov <juri@HIDDEN>
To: Lars Ingebrigtsen <larsi@HIDDEN>
Subject: Re: bug#50067: Context menus
Organization: LINKOV.NET
References: <87pmufb3u0.fsf@HIDDEN> <87tujqoram.fsf@HIDDEN>
Date: Sun, 15 Aug 2021 19:12:57 +0300
In-Reply-To: <87tujqoram.fsf@HIDDEN> (Lars Ingebrigtsen's message of "Sun,
 15 Aug 2021 13:56:01 +0200")
Message-ID: <871r6u66zm.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (x86_64-pc-linux-gnu)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 50067
Cc: 50067 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

> I haven't tested the branch, but reading the diff, it looks like an
> excellent feature to me.  Looking at the implementation of the stuff in
> various modes, I'm wondering whether the interface should perhaps be
> tweaked a bit:
>
> +(defun eww-context-menu (menu)
> [...]
> +  (when (or (mouse-posn-property (event-start last-input-event) 'shr-url)
> +            (mouse-posn-property (event-start last-input-event) 'image-url))
> +    (define-key menu [shr-mouse-browse-url-new-window]
>
> Perhaps the signature of the context menu functions should be:
>
> +(defun eww-context-menu (menu event)
>
> ?

To get an event would be nice, but I see no way to do this.
The top function 'context-menu-map' is called by:

  `(menu-item ,(purecopy "Context Menu") ignore
              :filter (lambda (_) (context-menu-map))))

that has no access to the event - an unused argument of lambda above
is just the binding that is 'ignore' in this case.

> I'm also wondering whether we should add a `context-menu' text property.

As soon as such a need arises, a text property could be added as well.
But it seems currently much cleaner is to use a single context-menu
function for every mode.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#50067; Package emacs. Full text available.

Message received at 50067 <at> debbugs.gnu.org:


Received: (at 50067) by debbugs.gnu.org; 15 Aug 2021 11:56:25 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Aug 15 07:56:25 2021
Received: from localhost ([127.0.0.1]:45927 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1mFEkW-0008Ti-Fh
	for submit <at> debbugs.gnu.org; Sun, 15 Aug 2021 07:56:24 -0400
Received: from quimby.gnus.org ([95.216.78.240]:58036)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <larsi@HIDDEN>) id 1mFEkQ-0008TM-4e
 for 50067 <at> debbugs.gnu.org; Sun, 15 Aug 2021 07:56:18 -0400
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org;
 s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date:
 References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding:
 Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender:
 Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:
 List-Subscribe:List-Post:List-Owner:List-Archive;
 bh=U8hRI/6idegOzNlE9zzikT6PllUvTJBax/ksutgRmj4=; b=hj9j2dlwVqrJEPwefucX86U90L
 JAe8pogu0MvOcxedr4TUSnEky8mxqcVe0jO1RNdxCrYW/YuMTLwnfCaNc7a29rQq8bLDIwMuF1RMi
 rPQ1LCVLXMdYDgDfw9cKtIiLT2f/HaDF/MbkCiZdSk+POwMBZxcSfJw9Y427RJXWF9Pc=;
Received: from [84.212.220.105] (helo=elva)
 by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.92) (envelope-from <larsi@HIDDEN>)
 id 1mFEkF-0008HY-B9; Sun, 15 Aug 2021 13:56:07 +0200
From: Lars Ingebrigtsen <larsi@HIDDEN>
To: Juri Linkov <juri@HIDDEN>
Subject: Re: bug#50067: Context menus
References: <87pmufb3u0.fsf@HIDDEN>
Date: Sun, 15 Aug 2021 13:56:01 +0200
In-Reply-To: <87pmufb3u0.fsf@HIDDEN> (Juri Linkov's message of "Sun, 
 15 Aug 2021 11:48:55 +0300")
Message-ID: <87tujqoram.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org",
 has NOT identified this incoming email as spam.  The original
 message has been attached to this so you can view it or label
 similar future email.  If you have any questions, see
 @@CONTACT_ADDRESS@@ for details.
 Content preview: Juri Linkov <juri@HIDDEN> writes: > The branch
 'feature/context-menu'
 is ready for merging to master. > > It was created after the discussion in
 > https://lists.gnu.org/archive/html/emacs-devel/2021-07/msg00300.html >
 as a proof-of-co [...] 
 Content analysis details:   (-2.9 points, 5.0 required)
 pts rule name              description
 ---- ---------------------- --------------------------------------------------
 -1.0 ALL_TRUSTED            Passed through trusted hosts only via SMTP
 -1.9 BAYES_00               BODY: Bayes spam probability is 0 to 1%
 [score: 0.0000]
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 50067
Cc: 50067 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

Juri Linkov <juri@HIDDEN> writes:

> The branch 'feature/context-menu' is ready for merging to master.
>
> It was created after the discussion in
> https://lists.gnu.org/archive/html/emacs-devel/2021-07/msg00300.html
> as a proof-of-concept.
>
> And after testing with different modes, it proved to be flexible enough
> to support various needs.
>
> After merging it could be improved further with more development in master.

I haven't tested the branch, but reading the diff, it looks like an
excellent feature to me.  Looking at the implementation of the stuff in
various modes, I'm wondering whether the interface should perhaps be
tweaked a bit:

+(defun eww-context-menu (menu)
[...]
+  (when (or (mouse-posn-property (event-start last-input-event) 'shr-url)
+            (mouse-posn-property (event-start last-input-event) 'image-url))
+    (define-key menu [shr-mouse-browse-url-new-window]

Perhaps the signature of the context menu functions should be:

+(defun eww-context-menu (menu event)

?

I'm also wondering whether we should add a `context-menu' text property.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#50067; Package emacs. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 15 Aug 2021 08:51:11 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Aug 15 04:51:11 2021
Received: from localhost ([127.0.0.1]:45741 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1mFBrH-0005SO-IK
	for submit <at> debbugs.gnu.org; Sun, 15 Aug 2021 04:51:11 -0400
Received: from lists.gnu.org ([209.51.188.17]:48268)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <juri@HIDDEN>) id 1mFBrC-0005Rw-GS
 for submit <at> debbugs.gnu.org; Sun, 15 Aug 2021 04:51:06 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:53238)
 by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <juri@HIDDEN>) id 1mFBrC-0008SB-71
 for bug-gnu-emacs@HIDDEN; Sun, 15 Aug 2021 04:51:02 -0400
Received: from relay3-d.mail.gandi.net ([217.70.183.195]:53707)
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <juri@HIDDEN>) id 1mFBr9-0004XZ-SJ
 for bug-gnu-emacs@HIDDEN; Sun, 15 Aug 2021 04:51:02 -0400
Received: (Authenticated sender: juri@HIDDEN)
 by relay3-d.mail.gandi.net (Postfix) with ESMTPSA id 0EC546000A
 for <bug-gnu-emacs@HIDDEN>; Sun, 15 Aug 2021 08:50:56 +0000 (UTC)
From: Juri Linkov <juri@HIDDEN>
To: bug-gnu-emacs@HIDDEN
Subject: Context menus
Organization: LINKOV.NET
Date: Sun, 15 Aug 2021 11:48:55 +0300
Message-ID: <87pmufb3u0.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (x86_64-pc-linux-gnu)
MIME-Version: 1.0
Content-Type: text/plain
Received-SPF: pass client-ip=217.70.183.195; envelope-from=juri@HIDDEN;
 helo=relay3-d.mail.gandi.net
X-Spam_score_int: -25
X-Spam_score: -2.6
X-Spam_bar: --
X-Spam_report: (-2.6 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_LOW=-0.7,
 RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001,
 SPF_PASS=-0.001 autolearn=ham autolearn_force=no
X-Spam_action: no action
X-Spam-Score: -1.6 (-)
X-Debbugs-Envelope-To: submit
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -2.6 (--)

The branch 'feature/context-menu' is ready for merging to master.

It was created after the discussion in
https://lists.gnu.org/archive/html/emacs-devel/2021-07/msg00300.html
as a proof-of-concept.

And after testing with different modes, it proved to be flexible enough
to support various needs.

After merging it could be improved further with more development in master.

The branch contains a NEWS entry and changes in the documentation.




Acknowledgement sent to Juri Linkov <juri@HIDDEN>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs@HIDDEN. Full text available.
Report forwarded to bug-gnu-emacs@HIDDEN:
bug#50067; Package emacs. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Wed, 20 Oct 2021 17:00:02 UTC

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