From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Drew Adams Newsgroups: gmane.emacs.bugs Subject: bug#52293: [External] : bug#52293: 29.0.50; [PATCH v3] Prevent further cases of duplicated separators in context menus Date: Wed, 15 Dec 2021 18:10:45 +0000 Message-ID: References: <86ilvysyq3.fsf@mail.linkov.net> <834k7ix4ij.fsf@gnu.org> <86pmq6taeb.fsf@mail.linkov.net> <83czm6unfs.fsf@gnu.org> <414be477-34d4-c777-f623-3e0e59c0dd08@gmail.com> <83o85mpaqb.fsf@gnu.org> <8e9b29cd-8700-1a60-1d91-b6995d8f433a@gmail.com> <86czm0eue5.fsf@mail.linkov.net> <8c440269-262a-ba78-6630-d3f90c2fcc19@gmail.com> <86fsqwmig7.fsf@mail.linkov.net> <1c1995a2-c033-51c8-4aa6-7458ad07c75c@gmail.com> <86mtl3629t.fsf@mail.linkov.net> <83ilvrl4m2.fsf@gnu.org> <86y24mucz2.fsf@mail.linkov.net> <864k7agrur.fsf@mail.linkov.net> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="24943"; mail-complaints-to="usenet@ciao.gmane.io" Cc: "jporterbugs@gmail.com" , "52293@debbugs.gnu.org" <52293@debbugs.gnu.org> To: Juri Linkov Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Dec 15 19:52:50 2021 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mxZOU-0006HZ-Nb for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 15 Dec 2021 19:52:50 +0100 Original-Received: from localhost ([::1]:37672 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mxZOT-0000b6-Ke for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 15 Dec 2021 13:52:49 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:53534) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mxYk2-0002ZK-Fr for bug-gnu-emacs@gnu.org; Wed, 15 Dec 2021 13:11:02 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:50340) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mxYk2-0000Rb-79 for bug-gnu-emacs@gnu.org; Wed, 15 Dec 2021 13:11:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mxYk2-000541-3L for bug-gnu-emacs@gnu.org; Wed, 15 Dec 2021 13:11:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Drew Adams Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 15 Dec 2021 18:11:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 52293 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 52293-submit@debbugs.gnu.org id=B52293.163959185219449 (code B ref 52293); Wed, 15 Dec 2021 18:11:02 +0000 Original-Received: (at 52293) by debbugs.gnu.org; 15 Dec 2021 18:10:52 +0000 Original-Received: from localhost ([127.0.0.1]:33653 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mxYjr-00053d-Um for submit@debbugs.gnu.org; Wed, 15 Dec 2021 13:10:52 -0500 Original-Received: from mx0b-00069f02.pphosted.com ([205.220.177.32]:39758) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mxYjp-00053V-Te for 52293@debbugs.gnu.org; Wed, 15 Dec 2021 13:10:50 -0500 Original-Received: from pps.filterd (m0246631.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.16.1.2/8.16.1.2) with SMTP id 1BFG8GTJ009116; Wed, 15 Dec 2021 18:10:49 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=fg6e0yi0REj8iYA55YdUfBjxL2I6cxf0sJhhZ5Q2sdk=; b=Hq0M+osS0ouncUE8dhPVcQai1o/Cd02SqBIR3OwFhfYe3Lv/YafbruLrxgg8xOOh0/tY pr0k468zfaPEX5l9pRYBgfRD5R62GYgGooImJGr/l62Xl3m1RKlWMX61tFhBgdEmoH+T P2USkPs/2F/X7G2dFrP3xraX/MjqMVABTD5LASdx5MH3v0iuoMBZ9oOIHWIcRNr19wDp 8i2bJ63lLBHHIgpEWrRiTRuoERfQyEonfIl7b6vpR0GcmXTuE/T7SDJB5npZeldN2r4x V+5irZ36lKAvdppCCjFENJTVNhr82LUwH0wraxU6pSCvlKTq1Fzi2b4IcLmRlwwWYq02 Rg== Original-Received: from aserp3030.oracle.com (aserp3030.oracle.com [141.146.126.71]) by mx0b-00069f02.pphosted.com with ESMTP id 3cykmbgdaj-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 15 Dec 2021 18:10:49 +0000 Original-Received: from pps.filterd (aserp3030.oracle.com [127.0.0.1]) by aserp3030.oracle.com (8.16.1.2/8.16.1.2) with SMTP id 1BFHu7BV051100; Wed, 15 Dec 2021 18:10:48 GMT Original-Received: from nam10-bn7-obe.outbound.protection.outlook.com (mail-bn7nam10lp2107.outbound.protection.outlook.com [104.47.70.107]) by aserp3030.oracle.com with ESMTP id 3cyju8q40j-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 15 Dec 2021 18:10:48 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=n1pbg4lFUdsBcytYSCIrD6IxCUYGpQRgW6VzYZ408ZBfR2BC20mZQPkVSHhv5VgbD5fyZEyPI7vLwhMp7RvunOmbfmjhYABuV2kfNZeSkMMnNcdI453AsSUsyNjkQ/l09nW+UB33uIzhGexRSJstm3jGC/NwDNxOHU8Lf0TB3u/GIXIjHq/K1buqDXUSdWEFQbSRBTMNx31YoHgXsn/C/VrlbUNw7hMv5plim8nblBexUbvqQ42rn0Ku1+fZ/ATboT1CGv1dWAIAvwxmWFqQ5KVQfsldJIZYu0Cpy2wZ4JvoppUgSJqu068VVuGecdthf1fUf8KtBdKhLeJhBr4sCA== 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:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=fg6e0yi0REj8iYA55YdUfBjxL2I6cxf0sJhhZ5Q2sdk=; b=nQ4LKJ6n/vstVle3KcXheHHeTzjKfCjHtABTju+CVbbf7UCRoiSTVA9RdccKNYD8H4cRilOB6Quu2oUSxiE349/uGVwfCaOFFDDf5TMJWAVk8uAjQHmV5/XWggybxjR1hI4C8hC7F5erAe7QfSWHgQOu4jTiotrtWptVgpTnRlCcDqFmeG5do2W1Yx47BY3uReXKnRoQQ0vKSchZsFpW21aW0VJtf6ujiBUaV4nSncyE6Q9p3dyH798KmZCEqYt2cZLApBvtd0ygGB4SgcUCRsxbUPg17wS1ZNi11laOtnShPxvYPq3nY7zJtZXzyy9Z9fnu6uvWQ9wxDBbXilm9ew== 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=fg6e0yi0REj8iYA55YdUfBjxL2I6cxf0sJhhZ5Q2sdk=; b=P9ydl+Rbmu5rRheXWAq5JsdaPOeU4L8peek1eIgANAtS3MqKusnAlxx4ph7slPJ2Ai5yptpF/v5gqvPRmO/lafAxnNJp0XWajUeuRBW3TLEBZ9krL1C3/NJ4Gz9EL5r3u5zwljrHeI9wIe9iBB+FuCwPuYDq0hPPHv2iaYzmEG8= Original-Received: from SJ0PR10MB5488.namprd10.prod.outlook.com (2603:10b6:a03:37e::19) by SJ0PR10MB4544.namprd10.prod.outlook.com (2603:10b6:a03:2ad::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4778.17; Wed, 15 Dec 2021 18:10:45 +0000 Original-Received: from SJ0PR10MB5488.namprd10.prod.outlook.com ([fe80::99a4:696f:5f30:36b3]) by SJ0PR10MB5488.namprd10.prod.outlook.com ([fe80::99a4:696f:5f30:36b3%8]) with mapi id 15.20.4778.018; Wed, 15 Dec 2021 18:10:45 +0000 Thread-Topic: bug#52293: [External] : bug#52293: 29.0.50; [PATCH v3] Prevent further cases of duplicated separators in context menus Thread-Index: AQHX8ZMxLWhIsycs9kqBuGVclsbOKqwzx9Ow In-Reply-To: <864k7agrur.fsf@mail.linkov.net> Accept-Language: en-US Content-Language: en-US x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 7e4b5953-2305-4de7-7d78-08d9bff63707 x-ms-traffictypediagnostic: SJ0PR10MB4544:EE_ x-microsoft-antispam-prvs: 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: 2L3sFinEiISlU0ypqHN8V7cYpqvhnffft5M+EOD+ZJ9NgGY/Va/cBtMpoeTrP8nxmECP04flkbJwRlJrfExt1xoXBkASQYHUN/eJ9C+LcH7g4Tn/nj2JeCjcANuIhb62dCbif5185CQmtdTQVcQGfuND01poVSjr+NbtU3iMn4VwSxVe7FuxLOtvec4AZe7sjxmkQINGjlUGKFO+/x5dwFjWkufEG03rngFUFHSPE/M9E/WG3A4g9Y29GveZt2TVT2M4m4WBnaF1iOOrzSD5HKNMj8j2GzoWXAhdGsQyOk9c2zn2lU8gGZnw4GOG3qw0Y0Z0XRX9vks5K92RyPFDzfVTKaV3PFt2WBQqCS8qnpBzYw0Y+x4C4kZVQAhAPJEhoelERtTe+P72APpnyXpncfcVyLjw4BcXMWJF86K/Twv2PAESopyyZfQszRKOQVT2bikz6wD9UWGuMMvEqhNn44/WiMYiNcTY3c6bpHingW6b1RocQzQBAf96he1SwNmWx57SWfA77LC7PLliXFgqnRNOltRYV8iWjmxJRpv0BkISO78z1awtMY8aHGE/GYc2o5LjCrA8GeYYHLWZhoN+sNWd+s2G+MQtJh9tBbl5UuKERDYH8gs1WMjFfGpsL1DtbchuIwcw+Q2GjkcAvsSipBdcdQo3cRILyWa9o6AeS8LKTURLgv7knWfUyD12YYX4Rn2YQ6FPvr7yj8J1R5YBEdzS1lk9wRBqwYMgo+55hGPLjU1FyKETklNqIiugv F/Y9ocHgZJj9hsAXe3yHUmDsfoP0gxXjDRMopgGY1vJbME= 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)(66556008)(6506007)(8936002)(66946007)(55016003)(508600001)(76116006)(71200400001)(86362001)(44832011)(7696005)(6916009)(33656002)(316002)(83380400001)(38070700005)(122000001)(64756008)(38100700002)(2906002)(66476007)(186003)(66446008)(54906003)(966005)(8676002)(9686003)(5660300002)(26005)(52536014)(4326008); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: F2PlJCRt2zf70T0iQYOmKfTq/+ulDrK8sk//uXi+NEIjX8Bao/KIo/TAtX0HpVyUbDXgfccBNxjGR5x8p/M2NhVasCEUlywxO8mTHydmRRzpnNiBl2rDjpCyjR7Bp017tZ40HQPduWTcAgHAKnniAPcmGjED4F7Uup316xjfw+IRPVyagioSiIkmtuc6KQNZ28Qikl2kj0AWbkXzRAL/5JVVoJKk4Nm6gypNfOv9ScnKeFA9ip1LUyYYM480RSh5GYfIVnaNgb2ZaNQCeqWJpDv8fE7vdChcbRnjtrCBgCcbHwrKre9MAIuYjrjd6uyrLshPoE+s0+ReWayWHQtLmR6T1L+D8Y7DyP6kmXvPLkHHE5GZ0INetr78ij13b1EfrcXfWnTu7baCTxfE0Bz+m6mIu2HGE+jm1qd77o3UM6GmhAZ3/yc6Ot0Hn+e16yrUS2bJdSXPUR0XmJFGmZb8g/Xu4xfagCotcTxHanqq+aVuqQH5mJ984jENZILE/KOXCGt8XH0ZSRdwHfZ1SFW7piLMlpvLweAz7VWCbZ/jsv2nh0JT6euIyG7Xqd1VFPL1zCiRSXtfRHWNTwzjDkr83x2wF9KfzmFPE0XNv6Bn2dWti30kU7k8z369A5TqGHGRzZQZSetT2b9suA2sIGqkxHZ1XPvL4BLNLQs4wGmsSe8RyZEw+Ev+HkY6yGQlCttLZ2mldBVv7wBGt7hBCW/VhdkpH6Z2BTUMU/ZRxB4591FTl0UM/oaEkFikDv GfSvfU6p8jm0PP9ZuQ/nahS9V0u/BL7IpfLE6BCUZPhJMYMSJQ+scRv5PKOpaSpvkoUihtuduDLjC4IPynQIU/HiPRfxwbT8PI 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: 7e4b5953-2305-4de7-7d78-08d9bff63707 X-MS-Exchange-CrossTenant-originalarrivaltime: 15 Dec 2021 18:10:45.4627 (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: uGhTqP2FJvS99tCV/hSwXLT+3RgenyfbCTnCHItjyMqcvN6xRxM3Ij44G0AzHDoLejp/Xps6+CsERaukPsPE+w== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SJ0PR10MB4544 X-Proofpoint-Virus-Version: vendor=nai engine=6300 definitions=10199 signatures=668683 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 mlxlogscore=999 phishscore=0 spamscore=0 mlxscore=0 adultscore=0 bulkscore=0 suspectscore=0 malwarescore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2110150000 definitions=main-2112150101 X-Proofpoint-ORIG-GUID: txF5L80r_xJY1blZucvstiT9p9l04Z_d X-Proofpoint-GUID: txF5L80r_xJY1blZucvstiT9p9l04Z_d X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:222432 Archived-At: > > Instead of throwing the traditional Emacs `mouse-3' > > under the bus, we should be running it up the flag > > pole and shining a light on it. >=20 > I wonder how do you think it's possible to combine > the traditional `mouse-3' that operates on the region, > and `mouse-3' that pops up the context menu? Why do you wonder? You asked that same question yesterday, and I answered it, in the same message you're quoting from. Is there some part of either the description or the code of `mouse3.el' that isn't clear in this regard? Did you follow those links? Do you have a specific question about how it works or behaves? Here are the links again. Description: https://www.emacswiki.org/emacs/Mouse3 Code: https://www.emacswiki.org/emacs/download/mouse3.el Anyway - from the description: Library `mouse3.el' lets you pop up such a menu by using only 'mouse-3' - no need to use the keyboard (hitting the 'Control' key). Yet you can still use 'mouse-3' to extend and delete the selection. How does it work? [read that section] That section tells you that "`mouse3.el' redefines standard command 'mouse-save-then-kill' in a trivial way to give you custom behavior for a second 'mouse-3' click at the same spot." Instead of a second single click always deleting, you can use it to access a context menu, to delete or perform any other actions. Doesn't that remove the standard second-click-deletes=20 behavior? No, because it distinguishes a `mouse-3' double-click (which performs the usual delete action) from a second single click (which shows a context menu - or in fact to do anything else you like). Vanilla Emacs doesn't distinguish these two ways to click `mouse-3' a second time, so it misses an opportunity to provide both a menu and the standard extend-or-delete-region behavior. The redefined `mouse-save-then-kill' command just uses=20 function `mouse3-second-click-command' to handle a second click at the same spot. That function returns the command that `mouse-save-then-kill' invokes: either the command that is the value of variable `mouse3-save-then-kill-command' or, if that is `nil' the command that is the value of user option `mouse3-second-click-default-command'. The default value of that user option is command `mouse3-popup-menu', which pops up a `Region' menu, which generally has items that act on the region. ___ To obtain the vanilla Emacs behavior, customize that option value to command `mouse3-kill/delete-region'. To _always_ have `mouse-3' pop up a context menu, set option `mouse3-menu-always-flag' to non-`nil', or bind `mouse-3' to `mouse3-action-wo-save-then-kill'. IOW, both vanilla Emacs's hard-coded behavior and an always-use-context-menu behavior are trivial subsets of what `mouse3.el' offer.