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: Tue, 14 Dec 2021 22:02:25 +0000 Message-ID: References: <37047ada-fa33-88dd-5237-769611fec61b@gmail.com> <83wnkfw8ud.fsf@gnu.org> <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> 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="39155"; 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 Tue Dec 14 23:03:10 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 1mxFt8-000A0K-7N for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 14 Dec 2021 23:03:10 +0100 Original-Received: from localhost ([::1]:52460 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mxFt6-0007km-Vh for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 14 Dec 2021 17:03:08 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:60856) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mxFsz-0007jG-W5 for bug-gnu-emacs@gnu.org; Tue, 14 Dec 2021 17:03:02 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:48287) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mxFsz-0007hY-O1 for bug-gnu-emacs@gnu.org; Tue, 14 Dec 2021 17:03:01 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mxFsz-0000mB-MO for bug-gnu-emacs@gnu.org; Tue, 14 Dec 2021 17:03:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Drew Adams Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 14 Dec 2021 22:03:01 +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.16395193762972 (code B ref 52293); Tue, 14 Dec 2021 22:03:01 +0000 Original-Received: (at 52293) by debbugs.gnu.org; 14 Dec 2021 22:02:56 +0000 Original-Received: from localhost ([127.0.0.1]:59833 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mxFst-0000lr-Ex for submit@debbugs.gnu.org; Tue, 14 Dec 2021 17:02:55 -0500 Original-Received: from mx0b-00069f02.pphosted.com ([205.220.177.32]:61138) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mxFsr-0000lj-I7 for 52293@debbugs.gnu.org; Tue, 14 Dec 2021 17:02:54 -0500 Original-Received: from pps.filterd (m0246632.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.16.1.2/8.16.1.2) with SMTP id 1BEJIbuw025841; Tue, 14 Dec 2021 22:02:52 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=xR80bOrOV3w5sAVJIdp5htAhy1rP75WVN/8I3gtma3k=; b=eNiNhmaynWBu+o2yB5OL8owp4SNbxjv/yVUeQ0vF3VplbdT+gWNws0YYamT5TGyMrFue P2qLVqIQtm2QiotyGFDZxa81KS+qDkeZA2Q5kiXaIRVwaa8XtS4Jp96zalqMAYBkRnbn OBcu0zdJaCHLSK/iIBswkxziOD8buBwMd0kps1CEWbTIRf+bqBtoW0kPG6VzsWHyXL2J VYFD6z0V55y5z88pJMARMknvaaguLnQmZ7++sV0J3haPMazBQnp5gQhTftrulIaZr/2+ Zcd6j1QA7nXEHc51wupR9cC7w9IGj2+nsbr3aMuiIYIcuUryQOzuk/BO96j8BLu80hbp Gg== Original-Received: from userp3030.oracle.com (userp3030.oracle.com [156.151.31.80]) by mx0b-00069f02.pphosted.com with ESMTP id 3cx5akcx6h-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 14 Dec 2021 22:02:52 +0000 Original-Received: from pps.filterd (userp3030.oracle.com [127.0.0.1]) by userp3030.oracle.com (8.16.1.2/8.16.1.2) with SMTP id 1BELxwIL171137; Tue, 14 Dec 2021 22:02:51 GMT Original-Received: from nam10-mw2-obe.outbound.protection.outlook.com (mail-mw2nam10lp2101.outbound.protection.outlook.com [104.47.55.101]) by userp3030.oracle.com with ESMTP id 3cvh3y3qu2-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 14 Dec 2021 22:02:51 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=KXtvtExiPVJypQvI0XiRp1pcBX3wEDDA0nwrizVPRypjkqIJ/WAOC7WtFifPfplkbzYHEslkKRX/LZb7u1TULrNdA3svRshPaWrqvWunCByNK79pBeal01/c03jWASuomgPGzoBeCqfxz/6cLzr8c9MNd+UA5+y0oCamyBFlr+5aCLdBS1/vXHvReKWgy/4hbE7x1rLbmgQLOR9M6mk6ZvPBnnO0nn5j/GlSg6Yb2kRnDOTm9XrU9pwLDheZ9hsHjwzBGO5AVUlKvjyVv2v8BzfxY1rpqWOKzFEuEKOAKTP3VXjqjCabLVJmooPlKDz9aneyMFSkG7b5ZEd+Lu0pEA== 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=xR80bOrOV3w5sAVJIdp5htAhy1rP75WVN/8I3gtma3k=; b=Jb6Pl2Xmhsbqocd58GTsSPp/uaGAm+6Lb++5nOK8Eu+Z6ftd3II6NTtDYrkX1GUBWXCsvhFAd61XNfYNv5KNNdpaJHI/Pf8E0dbPncyfSiUTk5P+GurLBfKf8XQd359sjkM2U2g5PNckAH1RrIRW7qa6nC6R5M0Tb5cm1II6l4YE4IDiyd821RQrKnlROrCv20wIU486PimAUYqzmlI5DPDc+CQ2W9mgI4rdrBNw3d4u9BvGd4qxzLAkFusBWaG7bu7M19j1hCRExDvNb6Jk1x9vAaW7WmV/9s2IUK5ruIEqkaSNCJkpTOlGt7fYu0F26TpbCh3afic1JyYdT7VGhQ== 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=xR80bOrOV3w5sAVJIdp5htAhy1rP75WVN/8I3gtma3k=; b=exTBLVEsPsb8w4p6QxMGS2aqLAofcqW36DNaEj+eTT5bE4VAmJWKow0Tt6MNw9a4OckvbOVV73JoMhqVtE8V3UmhkrstiJp0ufqeg6cTl0FisZG0oNgnOtrnzZhuLgmJEVUqcccUUIICbB442U8T/CcFv47wGT5ntwL0pxr47Ks= Original-Received: from SJ0PR10MB5488.namprd10.prod.outlook.com (2603:10b6:a03:37e::19) by BYAPR10MB2439.namprd10.prod.outlook.com (2603:10b6:a02:ba::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4778.12; Tue, 14 Dec 2021 22:02:25 +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; Tue, 14 Dec 2021 22:02:25 +0000 Thread-Topic: bug#52293: [External] : bug#52293: 29.0.50; [PATCH v3] Prevent further cases of duplicated separators in context menus Thread-Index: AQHX8S8XshVVR6OKwU2RFKpQQXfdz6wyfzBA In-Reply-To: <86y24mucz2.fsf@mail.linkov.net> Accept-Language: en-US Content-Language: en-US x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 10da386c-b94d-49c1-0027-08d9bf4d69d2 x-ms-traffictypediagnostic: BYAPR10MB2439:EE_ x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:9508; x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: 3t3fAWH4rsT2rBUYRQeLUD8W62Q48nS4xDwRVhgE+2zijT0rdvigowRsmgV50CU53mFME6RoICjFAyDXB94kNfsLfJC0Z3HtWDFPSauHSr59Y0bcaoxl1esWK6nXKxnyfaDD/pT1FEwuqBTXPdenN7ag5cl7OjT/CfIbH0LuDDVUNsj3+qzdpNfgLuylCdUZFcGdDKeQbdQNe301qup8dPgfjGm31zePzQPMka6TRr/OXq4JfAZsiMpGS6Gh+OEU1KhwqU0rzlldZb1Xgg7+jUIT+5iXzfr5XqWy1K5CbZTbB07Pnce8OAhVgzQbhpRxUmklIo7u9QCMAKb88I7V2XAlGlsIurc+I+AfQwfmfVZt0PYNoKtqkc8Eixwd4SH2YFF30+KpK0r74elF7uiFdD+m6cMOO+pTakVBu4NIGvxYzMv9U6E/jqT7a8SnpO4Xv6lnmkocPzB3t8ITV8ODh4MFWs/Z4XOc5VdotDhknOlVJOxwwndoUBDEK4H6USvoH+dmDPUNwBFFCD20027MoC/LueEsQXbquLZJp59SmQbdzw6DwXU7PPYXgJrgOtVYaezZ7zfMAFpNmwe/+I+0r1ZH0S3HG8qv8LUAL4Y2nRRJglZ9Dj035Fc+FX9ZsmnIHRp1TBL/A+B66ayHhdx3fLKWBU0KU3pmz87X0dK3dWeVOHN7C1JSVr3hbumQrylECrIUB4xgQ93xsV+n+T7/6yMqc+bTQI3r6CTejlQ1c2awG2IAtapp5iBZtdreX DGsAFBhcA3qUgDrgxLsUWh8XC7JjgFrE0zRx+emDlxoM6k= 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)(55016003)(9686003)(33656002)(8676002)(38070700005)(508600001)(8936002)(122000001)(38100700002)(966005)(5660300002)(4326008)(186003)(316002)(71200400001)(83380400001)(66946007)(66476007)(76116006)(64756008)(66556008)(66446008)(26005)(86362001)(44832011)(7696005)(52536014)(6916009)(54906003)(2906002)(6506007); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: sFiHNbYu1PeNJTAkVMi0KRAkELfyDAGhxjt3p/QkBRyHfoLHYkhCeI969cxQ0tOSa/aYbTkoqodfmurLxh9YXkJtAh3EKK804e77hJcXNhJ+qBgrz+1rljJKnJXh19nzjHMY5HHv7tAq7iWsi5gpEwExzpdsfiHNnBOzg8FfdCDK2m1znfu9YpAlEp9XK5dW/do857iQ5pkzXNjG4otp55Phjz737iRLG1iZ30+pFjxjnRJfY6NVrfqZIO62IzX21bXeZfa/KXM0M4jGZCKjCwFCefMxZZH40SRsxQp6hED0M7F5fmvAKTBtKXcl4FuULmv4XnkfSVVT6wpNvu/u+HbkNxj86ojDO5GkK4KrAhC4wNceFQ+EnkX8klFsXa3s98t8zo0U2qt3RTF1cqb4dwszSzfMlLoPLv50eVc7gnX94FcyZcTu69h9fxJ1lQY5th1BnWtzaZ6vs0a5i7DtdI0HOkAWrvSPO+MVJuyGZegtogDEQKtFb6Y1gPMmydU0ie+twQHJPdZdsaGU3eMjp7uVj9zFrgkFazP1eX4l8w4k7ZlRpZDIeYaHlDFP9pCGGV9SOHI/aq2vx4y1ZEcRqzvo+op+POUcP1aBrbSPwVIP8ET/JIF2TOB34//+40jUd7QBqygOPtKoTUsfMS7sPE5PoMVw21ZWxzayPPtPtVaDlNAmKY+W/Xnj2FC3AqXU0RZtUl0zpeI0zWnDV5eN/y+721shEK77G0PPxhTgg16C7yowRmErEthhwB TcUkixoWxj5Z5cAX0Vb2q6wJOsOcHZJrZ05dA6T//xzTk5oB+h7ztxIxgXPGo5QqlPiqGYOddRQuORoUBcj/2PJkIN/lkLcBY4 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: 10da386c-b94d-49c1-0027-08d9bf4d69d2 X-MS-Exchange-CrossTenant-originalarrivaltime: 14 Dec 2021 22:02:25.7612 (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: dbhqn4B3guWeZEcGS//liicZbEUvH5WCt8guQjhS4uTzKh/kv4GCxZqg01ObZVB8Q2ycC15Asey78WEZ2SazYg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: BYAPR10MB2439 X-Proofpoint-Virus-Version: vendor=nai engine=6300 definitions=10198 signatures=668683 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 phishscore=0 spamscore=0 suspectscore=0 malwarescore=0 mlxlogscore=999 bulkscore=0 mlxscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2110150000 definitions=main-2112140116 X-Proofpoint-GUID: Y6vVhf2AEd2Uu0LCAQGyVyDNr3P628zU X-Proofpoint-ORIG-GUID: Y6vVhf2AEd2Uu0LCAQGyVyDNr3P628zU 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:222399 Archived-At: > > I said only that someone (for whatever reasons) might > > want to provide or allow consecutive separators, and > > that that should be possible. That's all. And I > > said that programmers can anyway make separators, > > like other menu items, conditional (e.g. invisible). >=20 > I was referring to your following words: >=20 > Why should we even provide such removal? If > someone doesn't want it they won't code it. > That's all. >=20 > But the problem is that it's not easy not to add separators that > become duplicated when no menu items are added to submenus. Please read the rest of what I wrote. I specifically pointed out that some conditional menu items might not appear, resulting in consecutive separators. And that such a possibility might, or might not, be what someone wants. And I mentioned the possibility of making separators themselves conditional. You can programmatically control what happens dynamically. Of course, if you're only trying to insert some item into an existing menu, then do more than just insert the item. At the limit, you might even need to reprogram the menu, or at least some part of it beyond that new item. And I specifically mentioned the problem of having two separators end up being consecutive because of a dynamic situation - even just conditional insertion or removal of some items. I was the first one (maybe the only one?) to have mentioned that possibility. There are multiple ways in which a menu, including its separators, can be "dynamic". I'm well aware of that, as I think you know. =20 > > I've elsewhere expressed my displeasure in seeing > > context menus implemented in the way Emacs is doing > > that, but that was ignored. (I use my own approach > > to providing mouse-3 context menus, which allows the > > standard, longstanding Emacs mouse-3 behavior at the > > same time.) >=20 > Interesting. Could you please describe your approach. I already did, including in the thread where your context-menu was proposed. I've described it more than once. If you're truly interested and haven't paid any mind to it before, you can find a description here: https://www.emacswiki.org/emacs/Mouse3 And you can find the code here: https://www.emacswiki.org/emacs/download/mouse3.el In general, I'm in favor of: 1. Combining these two advantages: . Allowing for a `mouse-3' context menu . Emacs's longstanding `mouse-3' actions Users shouldn't have to sacrifice one to have the other. 2. Letting users easily configure such menus, for whatever contexts they want. 3. Letting user code do the same (e.g., dynamic control). `mouse3.el' is a simple start, but it already goes a long way toward all of that. My impression, from the discussion about your context-menu approach, is that it's much less open to user and programmatic control, and it doesn't enable the traditional `mouse-3' behavior at the same time. The traditional `mouse-3' behavior (including deleting) is a strong plus, IMHO. Many Emacs users, even those who use a mouse heavily, might not even be aware of it, which is too bad, IMO. I wonder how many are even aware of multiclicking `mouse-1'. Again, too bad, if they're not. 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. That your new context-menu feature has the effect of throwing Emacs's traditional `mouse-3' under the bus is just a guess of mine. Mille excuses, if you do in fact allow both the traditional behavior and a context menu at the same time. Don't ask me to prove that your approach hard-codes things in such a way. That was my impression when reading your descriptions and the arguments for the approach. I don't claim to be an expert on what resulted. As an eternal optimist, I can hope that it isn't as closed, narrow, and predefined as what my impression of it suggests.