From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Jim Porter 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: Sun, 12 Dec 2021 14:12:16 -0800 Message-ID: References: <86tufn5jn9.fsf@mail.linkov.net> <86pmqa14fc.fsf@mail.linkov.net> <15eebcb1-b67a-8363-bc23-cf113913856f@gmail.com> <86h7bkhlo7.fsf@mail.linkov.net> <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> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="31265"; mail-complaints-to="usenet@ciao.gmane.io" Cc: "52293@debbugs.gnu.org" <52293@debbugs.gnu.org>, "juri@linkov.net" To: Drew Adams , Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Dec 12 23:13:15 2021 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mwX5n-0007yz-05 for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 12 Dec 2021 23:13:15 +0100 Original-Received: from localhost ([::1]:43108 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mwX5k-0001lO-DB for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 12 Dec 2021 17:13:12 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:35018) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mwX5a-0001l0-At for bug-gnu-emacs@gnu.org; Sun, 12 Dec 2021 17:13:02 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:41842) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mwX5a-0003YX-2F for bug-gnu-emacs@gnu.org; Sun, 12 Dec 2021 17:13:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mwX5Z-0005Aq-PU for bug-gnu-emacs@gnu.org; Sun, 12 Dec 2021 17:13:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Jim Porter Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 12 Dec 2021 22:13: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.163934714419839 (code B ref 52293); Sun, 12 Dec 2021 22:13:01 +0000 Original-Received: (at 52293) by debbugs.gnu.org; 12 Dec 2021 22:12:24 +0000 Original-Received: from localhost ([127.0.0.1]:53388 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mwX4x-00059u-Ub for submit@debbugs.gnu.org; Sun, 12 Dec 2021 17:12:24 -0500 Original-Received: from mail-pj1-f41.google.com ([209.85.216.41]:38893) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mwX4x-00059i-60 for 52293@debbugs.gnu.org; Sun, 12 Dec 2021 17:12:23 -0500 Original-Received: by mail-pj1-f41.google.com with SMTP id p18-20020a17090ad31200b001a78bb52876so13305544pju.3 for <52293@debbugs.gnu.org>; Sun, 12 Dec 2021 14:12:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=subject:to:cc:references:from:message-id:date:mime-version :in-reply-to:content-language:content-transfer-encoding; bh=OsmB7l8d5NY/9ixnT3DjFg4obANv1dxv2ZyW/NB4pHI=; b=B3yyx5sK+Is5UkYo4sRf+eGRq6n9Mib4+hDu4Bo4x+AEB8/GWZacX1k/6K8SOVAfAE P4pOlt+zsewpbftQBefvc1pEi4Woe3+8DJgFx5JTmwJOKzKato2ww2IolglbtJzlRRHQ v1h0S+ydBFM+DhwJn0uz7D1m0zeFt8nUzNugSgwrJmxrj30ZHQUj0An0NRPFOCVUxL98 GCR02U81DtSIQb3x7LBmDCWQmcziaZwfoPEWPUnho/Fa+rvaXYHrKugLMR4j5nG9cxDW p8I5TYwrYv3ZheNN3FKK9bKVOJrtS6SaCxxmRQ/1nQgTiSJp24xwYaKjRlwDj1RcKrhw drag== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=OsmB7l8d5NY/9ixnT3DjFg4obANv1dxv2ZyW/NB4pHI=; b=KN0Sl/W2qehtSB2XGyLlH+ElLDN30pQGecJcgELVQhfRZbKSwKczCCMj91MqXYNtdy 4EVEvHTBZVDUeqJLTicw/AD+Hf1DY2MjOJtBxMcfN5YzC+kTjQsZguEa07Apj/Y2S82y zSNapV8Auk/v3SwxxBQyn7V877xnbIHHIdG9VQnSBAGCOlTMRyuWEJKadYJsSfKCkWec WBeZTehKd3JbOg96gqF9cRNdVzoNjKfKsgfDGKaeTsGRX0dpHYrKgzSs6QQVvEiXrEC0 sMzgFofN4VedBoHKZOolIAGUM8F6p9m96yy9bpFptosDou2iU/0QhrD0TJJtiS2NkU5a XGhA== X-Gm-Message-State: AOAM533bvCsEkwzCLJhPIDkRPoYThD62DrlnY45BLom5IC/jAoL15qTK G5kk/zuWnYDcjN2wum6VqX8= X-Google-Smtp-Source: ABdhPJwT+forjAbW0TyFjw6l2wCadXo4WaCcq4lDBooTuK4OmjgjIxCHM2QqKmWftpKrAbRn425J3Q== X-Received: by 2002:a17:90a:5883:: with SMTP id j3mr39834305pji.13.1639347137409; Sun, 12 Dec 2021 14:12:17 -0800 (PST) Original-Received: from [192.168.1.2] (cpe-76-168-148-233.socal.res.rr.com. [76.168.148.233]) by smtp.googlemail.com with ESMTPSA id j20sm4245700pjl.3.2021.12.12.14.12.16 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 12 Dec 2021 14:12:17 -0800 (PST) In-Reply-To: Content-Language: en-US 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:222275 Archived-At: On 12/12/2021 1:00 PM, Drew Adams wrote: > Caveat: I'm not following this thread. FWIW: > > 1. In my code I have _lots_ of menu separators that > are apparently in what you call the old naming > convention. That's fine. I'd prefer we *not* update old menu separators, since that's a compatibility break. The only exception would be for existing context menu separators, since they're pretty new anyway, so the chance of any code relying on the old context menu names is low. > 3. I think there's zero need for any naming > convention for menu-item names, whether > separators or other. The goal was to make it easier to remember the names of the separators if you wanted to add a new item after a particular separator that had already been added. It's easier to remember if they're all `foo-separator' instead of a mix of styles. > 4. As I stated early on in this thread, I think > it's misguided to prevent the use of duplicate > separators. If someone wants such duplicates > for some reason (and there can be any number > of reasons), let them be. And if someone, for > some reason, wants to prevent such duplicates > they can do so easily enough, manually or by > code. Technically, this is already possible by using extended-format menu items. Only simple separators are de-duplicated. So this would be de-duplicated: (define-key menu [foo-separator] '("--")) But this wouldn't: (define-key menu [bar-separator] '(menu-item "--")) That's not documented though, and I'm not sure what promises we should make here. It might be better to have a more-explicit way of opting into de-duplication, but I'm not sure what that would be off-hand. It may be possible for context menu functions to be more careful about the insertion of separators so that duplicates never crop up in the first place. However, that would take a bit of experimentation, and I'm not sure of all the pros and cons of a solution like that. Maybe Juri has some thoughts on this though.