GNU bug report logs -
#63569
30.0.50; ERC 5.6: Add automatic nickname highlighting to ERC
Previous Next
Reported by: "J.P." <jp <at> neverwas.me>
Date: Thu, 18 May 2023 14:38:01 UTC
Severity: wishlist
Tags: patch
Found in version 30.0.50
Done: "J.P." <jp <at> neverwas.me>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
[Message part 1 (text/plain, inline)]
"J.P." <jp <at> neverwas.me> writes:
> Currently, users on a non-graphical, non 24-bit Emacs who provide their
> own `erc-nicks-colors' pool must ensure those colors fall within
> `erc-nicks-contrast-range' and `erc-nicks-saturation-range' (assuming a
> non-nil `erc-nicks-color-adjustments', the default). Otherwise, their
> pool is subject to culling without warning on module init, which they
> may find frustrating even though this behavior is documented. If people
> believe this to be a grave enough annoyance, we can do something like
> the attached, which offers a couple alternate pool-prep approaches that
> "pre-treat" candidates with `erc-nicks-color-adjustments' and coerce
> them to predefined system palette members, thus effectively culling by
> way of deduping.
>
> If actually doing this, we'd likely have to add a public-facing knob
> for selecting between various fixed-pool filtering styles, such as:
>
> - cull (current)
> - treat, coerce, and cull
> - treat and coerce
>
> The latter two differ in that the first rechecks if the remapped
> "defined" value still falls within specified tolerances, and drops it if
> it doesn't, while the last approach turns a blind eye. IMO, the first is
> of limited value unless we were to make it try repeatedly to find a
> satisfactory match. Although these only run on init, folks may find them
> too sluggish (both are already quadratic). We could instead make them
> interactive commands (or `custom-set' functions) that users can use to
> populate `erc-nicks-colors' while configuring.
>
> Personally, I'm not affected by the current behavior because I use
> graphical Emacs or a 24-bit terminal emulator with ERC. However, I'm
> open to doing this if others think it worthwhile. Thanks.
A user on Libera requested some time ago that pool-creation facilities
like the ones mentioned above be added to erc-nicks. The attached patch
does this but in a simplified manner that avoids adding additional user
options. Instead, it defaults to the "blind eye" approach mentioned
above since (IMO) it's likeliest to meet user expectations.
The patch also adds two ready-made Custom choice variants to the option
`erc-nick-colors': `font-lock' and `ansi-color'. These are predefined
sets of candidates for the (repeat string) :type variant. As may be
obvious, ERC interprets these symbols as palettes to be populated from
the :foreground colors of whatever font-lock- and ansi-color-related
faces exist for the current theme.
There's also a minor bug fix involving initialization ordering.
[0000-v1-v2.diff (text/x-patch, attachment)]
[0001-5.6-Offer-alternate-pool-creation-strategies-in-erc-.patch (text/x-patch, attachment)]
[0001-POC-Offer-alternate-pool-creation-strategies-in-erc-.patch (text/x-patch, attachment)]
This bug report was last modified 1 year and 250 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.