all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Jim Porter <jporterbugs@gmail.com>
Cc: 52286@debbugs.gnu.org
Subject: bug#52286: 28.0.90; [PATCH] Be consistent in naming of separators in context menu
Date: Mon, 06 Dec 2021 14:55:49 +0200	[thread overview]
Message-ID: <8335n53nai.fsf@gnu.org> (raw)
In-Reply-To: <dfd66624-89cf-4575-d466-107b56d0f146@gmail.com> (message from Jim Porter on Sun, 5 Dec 2021 18:09:22 -0800)

> Cc: 52286@debbugs.gnu.org
> From: Jim Porter <jporterbugs@gmail.com>
> Date: Sun, 5 Dec 2021 18:09:22 -0800
> 
> >> 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.)

I think the most natural place is where we describe how to construct
menus.

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

If this is a private convention of elisp-mode, we don't have to codify
it.

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

So maybe instead of conventions we should have recommendations, with
explanation why following that could be useful in some situation.
Then let Lisp programmers decide what they want.





  reply	other threads:[~2021-12-06 12:55 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-04 21:57 bug#52286: 28.0.90; [PATCH] Be consistent in naming of separators in context menu Jim Porter
2021-12-05  6:45 ` Eli Zaretskii
2021-12-05  7:44   ` Jim Porter
2021-12-05 10:39     ` Eli Zaretskii
2021-12-06  2:09       ` Jim Porter
2021-12-06 12:55         ` Eli Zaretskii [this message]
2021-12-11 20:52           ` Jim Porter
2022-01-15 18:57             ` Juri Linkov
2022-01-15 19:13               ` Eli Zaretskii
2022-01-15 19:19                 ` Juri Linkov
2022-01-15 19:23                   ` Eli Zaretskii
2022-01-15 19:25                     ` Juri Linkov
2021-12-05  9:37   ` Juri Linkov
2021-12-05 17:52 ` Juri Linkov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=8335n53nai.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=52286@debbugs.gnu.org \
    --cc=jporterbugs@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.