GNU bug report logs -
#52237
29.0.50; [PATCH] Doubled separators in context-menu-mode
Previous Next
Reported by: Jim Porter <jporterbugs <at> gmail.com>
Date: Thu, 2 Dec 2021 06:07:01 UTC
Severity: normal
Tags: moreinfo, patch
Found in version 29.0.50
Fixed in version 29.1
Done: Lars Ingebrigtsen <larsi <at> gnus.org>
Bug is archived. No further changes may be made.
Full log
Message #48 received at 52237 <at> debbugs.gnu.org (full text, mbox):
On 12/4/2021 11:50 AM, Juri Linkov wrote:
>> I found another odd case, but I'm not 100% sure the best way to fix it:
>>
>> emacs -Q --eval '(context-menu-mode)'
>> C-h o identity RET
>> ;; Right-click somewhere in the Help buffer
>>
>> There's a doubled separator after "Next Topic".
[snip]
> I see no simpler way, so perhaps we need to add `context-menu-top-separator'.
Sounds good. I'll work on a patch for this and file a new bug for it
once it's ready.
>> [1] As an aside, is there a standard naming convention to use here? Should
>> "separator" go at the beginning of the name or the end?
>
> `context-menu-middle-separator' is a function, so it requires the
> `context-menu-' prefix. It adds the menu item [middle-separator].
> Since "middle" is an adjective, the word order can't be "separator-middle".
> But "buffers-separator" doesn't look nicer than `separator-buffers'.
I think `FOO-separator' is the best choice here for the separators
themselves. `FOO' acts as a noun adjunct[1], modifying the underlying
object: a separator. For functions that just make a separator, they'd be
named `MODULE-[FOO-]-separator', with `FOO-' being optional if it would
be redundant with the module name. So then
`context-menu-middle-separator' is the right function name, and it adds
a separator named `middle-separator'.
`buffers-separator' is a bit of an odd phrasing since, as the Wikipedia
article mentions, "Noun adjuncts were traditionally mostly singular".
However, I think it's still a bit easier to read that correctly as "the
separator used to mark the buffers", whereas `separator-buffers' reads
more like "buffers used to separate things" to me.
Since this should just be a trivial renaming, hopefully we can merge
that into Emacs 28 so we're not locked into the current names.
[1] https://en.wikipedia.org/wiki/Noun_adjunct
This bug report was last modified 3 years and 261 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.