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.
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 63569 in the body.
You can then email your comments to 63569 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
emacs-erc <at> gnu.org, bug-gnu-emacs <at> gnu.org
:
bug#63569
; Package
emacs
.
(Thu, 18 May 2023 14:38:01 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
"J.P." <jp <at> neverwas.me>
:
New bug report received and forwarded. Copy sent to
emacs-erc <at> gnu.org, bug-gnu-emacs <at> gnu.org
.
(Thu, 18 May 2023 14:38:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Tags: patch
Severity: wishlist
Hi people,
Highlighting nicknames belonging to predetermined categories, like
"fools" or "pals," has long been part of ERC's repertoire. And doing the
same for any number of arbitrary buckets has long been on the wishlist.
Of the various third-party renditions floating around, the most
featureful is likely erc-hl-nicks by David Leatherman. I know I'm hardly
alone in feeling that folding this package or one like it into ERC
proper would be a welcome inclusion indeed, in part because the same
sentiment has been echoed widely in #emacs and beyond for years. To that
end, some months ago, Emacs' own Stefan K. reached out to David on
GitHub, entreating as much [1]. So far, that ticket has gone unanswered
(as has another, more recent effort by Corwin over email).
In any event, I'd like to find a way to move ahead with this, possibly
by replicating (most of) hl-nicks' functionality. Attached is a
quasi-"clean-roomed" (hopefully not too cynical) knockoff/POC for your
booing pleasure. Of course, if anyone has a problem with the degree of
perceived similitude, by all means, please say so. In general, this take
aims to be simpler and more tightly integrated with ERC's other
libraries, although both qualities would likely have manifested
naturally had we been able to officially procure the genuine article
(which of course I'd still be into).
Thanks,
J.P.
[1] https://github.com/leathekd/erc-hl-nicks/issues/15
In GNU Emacs 30.0.50 (build 2, x86_64-pc-linux-gnu, GTK+ Version
3.24.37, cairo version 1.17.6) of 2023-05-13 built on localhost
Repository revision: 867b104010760c4b7cd700078884cc774a01860a
Repository branch: master
Windowing system distributor 'The X.Org Foundation', version 11.0.12014000
System Description: Fedora Linux 37 (Workstation Edition)
Configured using:
'configure --enable-check-lisp-object-type --enable-checking=yes,glyphs
'CFLAGS=-O0 -g3'
PKG_CONFIG_PATH=:/usr/lib64/pkgconfig:/usr/share/pkgconfig'
Configured features:
ACL CAIRO DBUS FREETYPE GIF GLIB GMP GNUTLS GPM GSETTINGS HARFBUZZ JPEG
JSON LCMS2 LIBOTF LIBSELINUX LIBSYSTEMD LIBXML2 M17N_FLT MODULES NOTIFY
INOTIFY PDUMPER PNG RSVG SECCOMP SOUND SQLITE3 THREADS TIFF
TOOLKIT_SCROLL_BARS WEBP X11 XDBE XIM XINPUT2 XPM GTK3 ZLIB
Important settings:
value of $LANG: en_US.UTF-8
value of $XMODIFIERS: @im=ibus
locale-coding-system: utf-8-unix
Major mode: Lisp Interaction
Minor modes in effect:
tooltip-mode: t
global-eldoc-mode: t
eldoc-mode: t
show-paren-mode: t
electric-indent-mode: t
mouse-wheel-mode: t
tool-bar-mode: t
menu-bar-mode: t
file-name-shadow-mode: t
global-font-lock-mode: t
font-lock-mode: t
blink-cursor-mode: t
line-number-mode: t
indent-tabs-mode: t
transient-mark-mode: t
auto-composition-mode: t
auto-encryption-mode: t
auto-compression-mode: t
Load-path shadows:
None found.
Features:
(shadow sort mail-extr emacsbug message mailcap yank-media puny dired
dired-loaddefs rfc822 mml mml-sec epa derived epg rfc6068 epg-config
gnus-util text-property-search time-date mm-decode mm-bodies mm-encode
mail-parse rfc2231 mailabbrev gmm-utils mailheader sendmail rfc2047
rfc2045 ietf-drums mm-util mail-prsvr mail-utils erc auth-source cl-seq
eieio eieio-core cl-macs password-cache json subr-x map format-spec
cl-loaddefs cl-lib erc-backend erc-networks byte-opt gv bytecomp
byte-compile erc-common erc-compat erc-loaddefs rmc iso-transl tooltip
cconv eldoc paren electric uniquify ediff-hook vc-hooks lisp-float-type
elisp-mode mwheel term/x-win x-win term/common-win x-dnd tool-bar dnd
fontset image regexp-opt fringe tabulated-list replace newcomment
text-mode lisp-mode prog-mode register page tab-bar menu-bar rfn-eshadow
isearch easymenu timer select scroll-bar mouse jit-lock font-lock syntax
font-core term/tty-colors frame minibuffer nadvice seq simple cl-generic
indonesian philippine cham georgian utf-8-lang misc-lang vietnamese
tibetan thai tai-viet lao korean japanese eucjp-ms cp51932 hebrew greek
romanian slovak czech european ethiopic indian cyrillic chinese
composite emoji-zwj charscript charprop case-table epa-hook
jka-cmpr-hook help abbrev obarray oclosure cl-preloaded button loaddefs
theme-loaddefs faces cus-face macroexp files window text-properties
overlay sha1 md5 base64 format env code-pages mule custom widget keymap
hashtable-print-readable backquote threads dbusbind inotify lcms2
dynamic-setting system-font-setting font-render-setting cairo
move-toolbar gtk x-toolkit xinput2 x multi-tty make-network-process
emacs)
Memory information:
((conses 16 64236 9476)
(symbols 48 8573 0)
(strings 32 23246 1709)
(string-bytes 1 674076)
(vectors 16 15015)
(vector-slots 8 207266 8159)
(floats 8 24 33)
(intervals 56 229 0)
(buffers 976 10))
[0001-5.6-Add-module-for-colorizing-nicknames-to-ERC.patch (text/x-patch, attachment)]
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#63569
; Package
emacs
.
(Tue, 23 May 2023 13:38:01 GMT)
Full text and
rfc822 format available.
Message #8 received at 63569 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
v2. Generalize contrast function. Make option `erc-nicks-contrast-ratio'
a cons. Change default for `erc-nicks-color-contrast-strategy'. Generate
`use-package' snippet alongside standard `defface' (to help Customize
haters persist edited colors).
[0000-v1-v2.diff (text/x-patch, attachment)]
[0001-5.6-Add-module-for-colorizing-nicknames-to-ERC.patch (text/x-patch, attachment)]
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#63569
; Package
emacs
.
(Tue, 30 May 2023 14:26:02 GMT)
Full text and
rfc822 format available.
Message #11 received at 63569 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
v3. Spin off nick-popup business to separate patch. Fix existing bug
concerning truncated transmission of KICK "reason". Change "strategy"
function type from operating on strings to normalized RGB triplets. Fix
perceived bug in invert strategy and have it consult contrast knob. Add
new saturation strategy and knob. Redo front matter for anticipated
inclusion of other authors.
. . .
For anyone following this bug, there's been some movement regarding the
possible official incorporation (or adaptation) of erc-hl-nicks by David
Leatherman. How exactly that's to occur will be up for discussion in due
course. These developments do mean that this feature may not be ready in
time for ERC 5.6, so I may end up renaming this bug at some point (just
a heads up). Thanks.
[0000-v2-v3.diff (text/x-patch, attachment)]
[0001-5.6-Allow-ERC-modules-to-extend-erc-nick-popup-alist.patch (text/x-patch, attachment)]
[0002-5.6-Add-module-for-colorizing-nicknames-to-ERC.patch (text/x-patch, attachment)]
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#63569
; Package
emacs
.
(Tue, 13 Jun 2023 04:08:02 GMT)
Full text and
rfc822 format available.
Message #14 received at 63569 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
v4. Drop erc-buttons patch. Be smarter when looking for faces to skip.
Just a minor update. As noted, I've dropped the first patch
0001-5.6-Allow-ERC-modules-to-extend-erc-nick-popup-alist.patch
which has been installed on HEAD as
e560f9af8e8 Allow ERC modules to extend erc-nick-popup-alist
[0000-v3-v4.diff (text/x-patch, attachment)]
[0001-5.6-Add-module-for-colorizing-nicknames-to-ERC.patch (text/x-patch, attachment)]
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#63569
; Package
emacs
.
(Fri, 16 Jun 2023 03:08:01 GMT)
Full text and
rfc822 format available.
Message #17 received at 63569 <at> debbugs.gnu.org (full text, mbox):
[[[ To any NSA and FBI agents reading my email: please consider ]]]
[[[ whether defending the US Constitution against all enemies, ]]]
[[[ foreign or domestic, requires you to follow Snowden's example. ]]]
> v4. Drop erc-buttons patch.
I am puzzled by the word "drop". What does it mean to "drop" a patch?
To cancel plans to install it?
--
Dr Richard Stallman (https://stallman.org)
Chief GNUisance of the GNU Project (https://gnu.org)
Founder, Free Software Foundation (https://fsf.org)
Internet Hall-of-Famer (https://internethalloffame.org)
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#63569
; Package
emacs
.
(Fri, 16 Jun 2023 05:13:02 GMT)
Full text and
rfc822 format available.
Message #20 received at 63569 <at> debbugs.gnu.org (full text, mbox):
Richard Stallman <rms <at> gnu.org> writes:
> [[[ To any NSA and FBI agents reading my email: please consider ]]]
> [[[ whether defending the US Constitution against all enemies, ]]]
> [[[ foreign or domestic, requires you to follow Snowden's example. ]]]
>
> > v4. Drop erc-buttons patch.
>
> I am puzzled by the word "drop". What does it mean to "drop" a patch?
> To cancel plans to install it?
Yes, sorry, "drop" as in "cancel." I've removed the patch from the
proposed change set because it's already been installed.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#63569
; Package
emacs
.
(Sun, 18 Jun 2023 02:14:02 GMT)
Full text and
rfc822 format available.
Message #23 received at 63569 <at> debbugs.gnu.org (full text, mbox):
[[[ To any NSA and FBI agents reading my email: please consider ]]]
[[[ whether defending the US Constitution against all enemies, ]]]
[[[ foreign or domestic, requires you to follow Snowden's example. ]]]
> Yes, sorry, "drop" as in "cancel." I've removed the patch from the
> proposed change set because it's already been installed.
Now I understand.
I suggest saying "cancel" in the future, to avoid possible
uncertainty.
Thanks for helping with this feature.
--
Dr Richard Stallman (https://stallman.org)
Chief GNUisance of the GNU Project (https://gnu.org)
Founder, Free Software Foundation (https://fsf.org)
Internet Hall-of-Famer (https://internethalloffame.org)
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#63569
; Package
emacs
.
(Thu, 22 Jun 2023 13:49:02 GMT)
Full text and
rfc822 format available.
Message #26 received at 63569 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
v5. Simplify integration with internal buttons API. Factor out common
utilities for nick trimming, key generation, etc. Improve user
experience in dealing with predefined color palettes.
Note that these changes break those currently on offer in bug#63595. But
since things are still pretty fluid, I'm going to hold off on updating
those for a bit. Thanks.
[0000-v4-v5.diff (text/x-patch, attachment)]
[0001-5.6-Add-module-for-colorizing-nicknames-to-ERC.patch (text/x-patch, attachment)]
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#63569
; Package
emacs
.
(Fri, 23 Jun 2023 13:39:01 GMT)
Full text and
rfc822 format available.
Message #29 received at 63569 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
v6. Add command for reviewing and editing managed faces. Rework
properties applied to face symbols.
Previously, tuning this module's options to arrive at a satisfactory
palette was a bit inconvenient because you had to scroll around in
different target buffers afterward to get a sense of the result, which
was often only subtly different from a previous incarnation. Editing
persistent faces was also somewhat unpleasant for similar reasons. This
adds a single dashboard based on `list-faces-display' for doing both.
[0000-v5-v6.diff (text/x-patch, attachment)]
[0001-5.6-Add-module-for-colorizing-nicknames-to-ERC.patch (text/x-patch, attachment)]
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#63569
; Package
emacs
.
(Mon, 26 Jun 2023 13:45:01 GMT)
Full text and
rfc822 format available.
Message #32 received at 63569 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
v7. Adapt to change in `buttons' interface. Rework refresh command's
"debug" feature for user-provided color pools. Use `random' instead of
`sxhash' for generating colors. Add option for controlling suffix of
color keys.
[0000-v6-v7.diff (text/x-patch, attachment)]
[0001-5.6-Add-module-for-colorizing-nicknames-to-ERC.patch (text/x-patch, attachment)]
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#63569
; Package
emacs
.
(Sat, 01 Jul 2023 03:32:01 GMT)
Full text and
rfc822 format available.
Message #35 received at 63569 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
v8. Use foreground and background colors when adjusting contrast. Fix
memory leak affecting continued sessions.
[0000-v7-v8.diff (text/x-patch, attachment)]
[0001-5.6-Add-module-for-colorizing-nicknames-to-ERC.patch (text/x-patch, attachment)]
Reply sent
to
"J.P." <jp <at> neverwas.me>
:
You have taken responsibility.
(Fri, 14 Jul 2023 02:38:02 GMT)
Full text and
rfc822 format available.
Notification sent
to
"J.P." <jp <at> neverwas.me>
:
bug acknowledged by developer.
(Fri, 14 Jul 2023 02:38:02 GMT)
Full text and
rfc822 format available.
Message #40 received at 63569-done <at> debbugs.gnu.org (full text, mbox):
I'm happy to report that this feature has landed [1]. Aside from small
fixes, the version installed was endorsed [2] by the author of hl-nicks
(which, you'll recall, is the most direct and significant ancestor of
what's now sitting on HEAD). Thanks to Corwin and the FSF for helping
make this initiative happen.
Closing.
[1] https://git.savannah.gnu.org/cgit/emacs.git/commit/?id=9bdc5c62
[2] https://lists.gnu.org/archive/html/emacs-erc/2023-07/msg00010.html
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Fri, 11 Aug 2023 11:24:10 GMT)
Full text and
rfc822 format available.
bug unarchived.
Request was from
"J.P." <jp <at> neverwas.me>
to
control <at> debbugs.gnu.org
.
(Thu, 07 Sep 2023 13:27:02 GMT)
Full text and
rfc822 format available.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#63569
; Package
emacs
.
(Thu, 07 Sep 2023 13:33:01 GMT)
Full text and
rfc822 format available.
Message #47 received at 63569 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
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.
[0001-POC-Offer-alternate-pool-creation-strategies-in-erc-.patch (text/x-patch, attachment)]
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Fri, 06 Oct 2023 11:24:14 GMT)
Full text and
rfc822 format available.
bug unarchived.
Request was from
"J.P." <jp <at> neverwas.me>
to
control <at> debbugs.gnu.org
.
(Tue, 07 Nov 2023 16:18:01 GMT)
Full text and
rfc822 format available.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#63569
; Package
emacs
.
(Tue, 07 Nov 2023 16:30:01 GMT)
Full text and
rfc822 format available.
Message #54 received at 63569 <at> debbugs.gnu.org (full text, mbox):
[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)]
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#63569
; Package
emacs
.
(Mon, 13 Nov 2023 20:09:01 GMT)
Full text and
rfc822 format available.
Message #57 received at 63569 <at> debbugs.gnu.org (full text, mbox):
"J.P." <jp <at> neverwas.me> writes:
> 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.
This has been installed as
5baa0f61f8d * Offer alternate pool-creation strategies in erc-nicks
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Tue, 12 Dec 2023 12:24:10 GMT)
Full text and
rfc822 format available.
This bug report was last modified 1 year and 151 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.