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#52286: 28.0.90; [PATCH] Be consistent in naming of separators in context menu Date: Sun, 5 Dec 2021 18:09:22 -0800 Message-ID: References: <7a7d6b5c-ff5e-3d55-bef4-8ce8e163abdb@gmail.com> <8335n75z4a.fsf@gnu.org> <3788dcca-c2bd-99b2-b54d-463e12cd52c0@gmail.com> <835ys349p2.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="3419"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 52286@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Dec 06 03:10:31 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 1mu3SY-0000il-LN for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 06 Dec 2021 03:10:30 +0100 Original-Received: from localhost ([::1]:51742 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mu3SX-0007En-8F for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 05 Dec 2021 21:10:29 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:38046) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mu3SD-0007EK-BD for bug-gnu-emacs@gnu.org; Sun, 05 Dec 2021 21:10:10 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:48600) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mu3S6-0000sJ-Jr for bug-gnu-emacs@gnu.org; Sun, 05 Dec 2021 21:10:09 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mu3S6-0000Oi-CQ for bug-gnu-emacs@gnu.org; Sun, 05 Dec 2021 21:10:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Jim Porter Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 06 Dec 2021 02:10:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 52286 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 52286-submit@debbugs.gnu.org id=B52286.16387565711431 (code B ref 52286); Mon, 06 Dec 2021 02:10:02 +0000 Original-Received: (at 52286) by debbugs.gnu.org; 6 Dec 2021 02:09:31 +0000 Original-Received: from localhost ([127.0.0.1]:60141 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mu3Ra-0000Mz-Me for submit@debbugs.gnu.org; Sun, 05 Dec 2021 21:09:31 -0500 Original-Received: from mail-pg1-f182.google.com ([209.85.215.182]:35712) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mu3RZ-0000Mf-Ag for 52286@debbugs.gnu.org; Sun, 05 Dec 2021 21:09:29 -0500 Original-Received: by mail-pg1-f182.google.com with SMTP id j11so9037149pgs.2 for <52286@debbugs.gnu.org>; Sun, 05 Dec 2021 18:09:29 -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=2SHLf4j5baLtpRIt/ocQEmS9BNG/XSNPDYW6dvAvU9w=; b=Gn+1OSgPrsWQzzB8IpqlFJ59sJlPlC9AxAjxQmOclfnyzjfG3iKDcN/46xFWlcvxGX Amw4YUaAhUS8vXKgzB1ILCzFpkY8oHWiOyq9IoXrUZHuIjHscMy2XnhPvMwICMHcQOUP p27/6x7McrGJi7ZJOhU5tGvIvag9A3ePgLVTBYNHpxM4h5PWE/bPMDksRTZnFnCMsBG6 A8brMH7zXcAvs5PcTBgYNj49g2Pdbq9KzAwocaUHsM4mkHBCS3l0jdlQTyWoonB/wCYA /FgduXSg9p64Jf+Y7S11Kgg312sd0I55z4OKHIcUhKxn7qgBuLauJE2PxERJXgcmF2Gi kdHg== 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=2SHLf4j5baLtpRIt/ocQEmS9BNG/XSNPDYW6dvAvU9w=; b=lk1XuOqAy8t+Fr5gPhXtJzm9ti7nfvg70r8QJZkdeZSMiiVqJjctFMdSb4gOIkA/tv mSgBRuBLbl6igiZ/KovrA2rlOcauAo3Zy64EmdAG/bEYKw3DRN0HXbshN3XycmmRUDKS CkEV5T6MrJRp02Jbwzg2OrRrfZUpB64zEul17/jq+kEGOgBShqTWQL+IdPsrNzc987T3 L9skGXY54f/Ln2DVRGcqEAOEONqhB7d8PU6q7/fO3ozk/CU+xLZyZAHJwewjNjW8+xzm QxP61KtNkioLeBii9/cALiqUm4chzMUY+6Ay9pgykYSOAGtFvbZCX0T5m6GQJgQjKhQR uUrg== X-Gm-Message-State: AOAM530kNqJf6BcZOj20SVXKAS30nOSCXP7RY9zujF1nalX6cCdXDsgd ic/EsRSi7jgfr6CvmJdC38kA7rHaP4c= X-Google-Smtp-Source: ABdhPJwT0A9eZrvc1MY/rUT94z+xY53VrI9xT5vXT/vozI0we/EnGpiZ9dUt1V4CHPyiUSG3Jhk7AA== X-Received: by 2002:a63:8049:: with SMTP id j70mr16688445pgd.39.1638756563603; Sun, 05 Dec 2021 18:09:23 -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 x6sm7838825pga.14.2021.12.05.18.09.22 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 05 Dec 2021 18:09:23 -0800 (PST) In-Reply-To: <835ys349p2.fsf@gnu.org> 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:221703 Archived-At: On 12/5/2021 2:39 AM, Eli Zaretskii wrote: >> Cc: 52286@debbugs.gnu.org >> From: Jim Porter >> Date: Sat, 4 Dec 2021 23:44:07 -0800 >> >>> The first pretest of Emacs 28 is already out, so this problem is >>> already with us, isn't it? >> >> If it's too late to change this, that's ok. I just noticed it while >> working on the patch for bug#52237 and figured it'd be good to file a >> bug about it while there's still a non-zero chance it could be changed. >> It's a pretty minor issue, so I don't really mind if this gets closed as >> wontfix. >> >> If this change *is* ok to merge, I'll happily update the ELisp manual >> with a brief summary of the convention before it gets merged. > > I'd like to hear opinions of others. Meanwhile, having the proposed > convention spelled out in the manual would be good to make sure we are > all on the same page regarding the issue. Ok, I'll start working on some documentation. Do you have any suggestion on where it should go, or how general I should make it? (I could document the convention specifically for separators, or I could try to write up a more general guideline that could apply to any symbol name.) > As for the issue itself: cannot we detect the separators in some more > robust way, one that doesn't depend on how they are named? And if > that's not feasible, perhaps allow anything that has "separator" in > its name to be considered a separator? We can detect whether an item is a separator pretty easily without this change. However, context menu functions use specific separators to determine where exactly it should put new menu items. For example, `elisp-context-menu' adds menu items after `middle-separator': (define-key-after menu [elisp-separator] menu-bar-separator 'middle-separator) (Later in the function, it adds the actual menu items after the newly-added `elisp-separator'.) The only issue (though it's a small one) is that some of the separator names added to the context menu by default are named `FOO-separator' and others are named `separator-FOO'. I thought it might be hard to remember which was which without double-checking, so my patch converts all of the names to use the `FOO-separator' format. Of course, as Juri Linkov's message points out, many already-existing separators use both naming schemes, and it's too late to change those. Since the context menu is new, I thought it would be worth converting to a consistent naming scheme if it's not too late. Still, this is a *very* small problem. I'm not sure third party packages would want to insert context menu items after, say, `separator-undo'; a user might customize `context-menu-functions' so that their menu doesn't even *have* a separator of that name. In practice, it's possible almost no one will even notice the different naming conventions.