GNU bug report logs - #73443
29.4; ERC 5.6.1-git: erc-track mode line face color broken with left timestamps

Previous Next

Package: emacs;

Reported by: tmarjeski <at> gmail.com

Date: Mon, 23 Sep 2024 20:06:01 UTC

Severity: normal

Found in version 29.4

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 73443 in the body.
You can then email your comments to 73443 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to emacs-erc <at> gnu.org, bug-gnu-emacs <at> gnu.org:
bug#73443; Package emacs. (Mon, 23 Sep 2024 20:06:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to tmarjeski <at> gmail.com:
New bug report received and forwarded. Copy sent to emacs-erc <at> gnu.org, bug-gnu-emacs <at> gnu.org. (Mon, 23 Sep 2024 20:06:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: tmarjeski <at> gmail.com
To: bug-gnu-emacs <at> gnu.org
Subject: 29.4; ERC 5.6.1-git: erc-track mode line face color broken with
 left timestamps
Date: Mon, 23 Sep 2024 23:04:52 +0300
When setting erc-insert-timestamp-function to 'erc-insert-timestamp-left
the erc-track channel names in the mode line do not respect the nick
face color of whoever sent the message. The result is that the face
color is white or the color of the timestamp face, whereas with
'erc-insert-timestamp-right the color is of the nick that sent a
message.

Reproduction steps:
1. emacs -Q
2. (setq erc-insert-timestamp-function 'erc-insert-timestamp-left
         erc-timestamp-format "[%H:%M") ;; possibly unnecessary
   (erc-track-mode) ;; enable track mode in mode line
3. Connect to ERC
4. Join a few channels so the names are legible
5. Go to scratch or irc server buffer, wait for a message on a channel
6. Notice that the channel name is not the color of the nick who sent
the message


In GNU Emacs 29.4 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.43,
cairo version 1.18.0)
Windowing system distributor 'The X.Org Foundation', version 11.0.12101013
System Description: Arch Linux

Configured using:
 'configure --with-x-toolkit=gtk3 --with-native-compilation=aot
 --sysconfdir=/etc --prefix=/usr --libexecdir=/usr/lib
 --with-tree-sitter --localstatedir=/var --with-cairo
 --disable-build-details --with-harfbuzz --with-libsystemd
 --with-modules 'CFLAGS=-march=x86-64 -mtune=generic -O2 -pipe -fno-plt
 -fexceptions -Wp,-D_FORTIFY_SOURCE=3 -Wformat -Werror=format-security
 -fstack-clash-protection -fcf-protection -fno-omit-frame-pointer
 -mno-omit-leaf-frame-pointer -g
 -ffile-prefix-map=/build/emacs/src=/usr/src/debug/emacs -flto=auto'
 'LDFLAGS=-Wl,-O1 -Wl,--sort-common -Wl,--as-needed -Wl,-z,relro
 -Wl,-z,now -Wl,-z,pack-relative-relocs -flto=auto'
 'CXXFLAGS=-march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fexceptions
 -Wp,-D_FORTIFY_SOURCE=3 -Wformat -Werror=format-security
 -fstack-clash-protection -fcf-protection -fno-omit-frame-pointer
 -mno-omit-leaf-frame-pointer -Wp,-D_GLIBCXX_ASSERTIONS -g
 -ffile-prefix-map=/build/emacs/src=/usr/src/debug/emacs -flto=auto''

Configured features:
ACL CAIRO DBUS FREETYPE GIF GLIB GMP GNUTLS GPM GSETTINGS HARFBUZZ JPEG
JSON LCMS2 LIBOTF LIBSYSTEMD LIBXML2 M17N_FLT MODULES NATIVE_COMP NOTIFY
INOTIFY PDUMPER PNG RSVG SECCOMP SOUND SQLITE3 THREADS TIFF
TOOLKIT_SCROLL_BARS TREE_SITTER WEBP X11 XDBE XIM XINPUT2 XPM GTK3 ZLIB

Important settings:
  value of $LC_ALL: en_US.UTF-8
  value of $LC_CTYPE: en_US.UTF-8
  value of $LANG: en_US.UTF-8
  locale-coding-system: utf-8-unix

Major mode: ERC

Minor modes in effect:
  erc-ring-mode: t
  erc-nicks-mode: t
  erc-netsplit-mode: t
  erc-menu-mode: t
  erc-list-mode: t
  erc-imenu-mode: t
  erc-pcomplete-mode: t
  erc-button--phantom-users-mode: t
  erc-button-mode: t
  erc-fill-mode: t
  erc-stamp-mode: t
  erc-autojoin-mode: t
  erc-irccontrols-mode: t
  erc-move-to-prompt-mode: t
  erc-readonly-mode: t
  erc-scrolltobottom-mode: t
  erc-spelling-mode: t
  flyspell-mode: t
  erc-track-mode: (t erc-nicks--setup-track-integration)
  erc-track-minor-mode: t
  erc-match-mode: t
  erc-networks-mode: t
  diff-hl-flydiff-mode: t
  global-diff-hl-mode: t
  electric-pair-mode: t
  apheleia-global-mode: t
  global-treesit-auto-mode: t
  corfu-popupinfo-mode: t
  global-corfu-mode: t
  corfu-mode: t
  marginalia-mode: t
  vertico-mode: t
  which-key-mode: t
  global-ligature-mode: t
  ligature-mode: t
  global-auto-revert-mode: t
  global-display-line-numbers-mode: t
  desktop-save-mode: t
  recentf-mode: t
  save-place-mode: t
  straight-use-package-mode: t
  straight-package-neutering-mode: t
  override-global-mode: t
  global-eldoc-mode: t
  show-paren-mode: t
  electric-indent-mode: t
  mouse-wheel-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-mode: t
  column-number-mode: t
  line-number-mode: t
  transient-mark-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t

Load-path shadows:
/home/trev/.emacs.d/straight/build/external-completion/external-completion hides /usr/share/emacs/29.4/lisp/external-completion
/home/trev/.emacs.d/straight/build/transient/transient hides /usr/share/emacs/29.4/lisp/transient
/home/trev/.emacs.d/straight/build/jsonrpc/jsonrpc hides /usr/share/emacs/29.4/lisp/jsonrpc
/home/trev/.emacs.d/straight/build/eglot/eglot hides /usr/share/emacs/29.4/lisp/progmodes/eglot
/home/trev/.emacs.d/straight/build/xref/xref hides /usr/share/emacs/29.4/lisp/progmodes/xref
/home/trev/.emacs.d/straight/build/project/project hides /usr/share/emacs/29.4/lisp/progmodes/project
/home/trev/.emacs.d/straight/build/flymake/flymake hides /usr/share/emacs/29.4/lisp/progmodes/flymake
/home/trev/.emacs.d/straight/build/erc/erc-button hides /usr/share/emacs/29.4/lisp/erc/erc-button
/home/trev/.emacs.d/straight/build/erc/erc-backend hides /usr/share/emacs/29.4/lisp/erc/erc-backend
/home/trev/.emacs.d/straight/build/erc/erc-ibuffer hides /usr/share/emacs/29.4/lisp/erc/erc-ibuffer
/home/trev/.emacs.d/straight/build/erc/erc-compat hides /usr/share/emacs/29.4/lisp/erc/erc-compat
/home/trev/.emacs.d/straight/build/erc/erc-capab hides /usr/share/emacs/29.4/lisp/erc/erc-capab
/home/trev/.emacs.d/straight/build/erc/erc hides /usr/share/emacs/29.4/lisp/erc/erc
/home/trev/.emacs.d/straight/build/erc/erc-status-sidebar hides /usr/share/emacs/29.4/lisp/erc/erc-status-sidebar
/home/trev/.emacs.d/straight/build/erc/erc-identd hides /usr/share/emacs/29.4/lisp/erc/erc-identd
/home/trev/.emacs.d/straight/build/erc/erc-replace hides /usr/share/emacs/29.4/lisp/erc/erc-replace
/home/trev/.emacs.d/straight/build/erc/erc-sasl hides /usr/share/emacs/29.4/lisp/erc/erc-sasl
/home/trev/.emacs.d/straight/build/erc/erc-speedbar hides /usr/share/emacs/29.4/lisp/erc/erc-speedbar
/home/trev/.emacs.d/straight/build/erc/erc-notify hides /usr/share/emacs/29.4/lisp/erc/erc-notify
/home/trev/.emacs.d/straight/build/erc/erc-pcomplete hides /usr/share/emacs/29.4/lisp/erc/erc-pcomplete
/home/trev/.emacs.d/straight/build/erc/erc-list hides /usr/share/emacs/29.4/lisp/erc/erc-list
/home/trev/.emacs.d/straight/build/erc/erc-autoaway hides /usr/share/emacs/29.4/lisp/erc/erc-autoaway
/home/trev/.emacs.d/straight/build/erc/erc-xdcc hides /usr/share/emacs/29.4/lisp/erc/erc-xdcc
/home/trev/.emacs.d/straight/build/erc/erc-networks hides /usr/share/emacs/29.4/lisp/erc/erc-networks
/home/trev/.emacs.d/straight/build/erc/erc-page hides /usr/share/emacs/29.4/lisp/erc/erc-page
/home/trev/.emacs.d/straight/build/erc/erc-truncate hides /usr/share/emacs/29.4/lisp/erc/erc-truncate
/home/trev/.emacs.d/straight/build/erc/erc-lang hides /usr/share/emacs/29.4/lisp/erc/erc-lang
/home/trev/.emacs.d/straight/build/erc/erc-sound hides /usr/share/emacs/29.4/lisp/erc/erc-sound
/home/trev/.emacs.d/straight/build/erc/erc-fill hides /usr/share/emacs/29.4/lisp/erc/erc-fill
/home/trev/.emacs.d/straight/build/erc/erc-loaddefs hides /usr/share/emacs/29.4/lisp/erc/erc-loaddefs
/home/trev/.emacs.d/straight/build/erc/erc-ring hides /usr/share/emacs/29.4/lisp/erc/erc-ring
/home/trev/.emacs.d/straight/build/erc/erc-join hides /usr/share/emacs/29.4/lisp/erc/erc-join
/home/trev/.emacs.d/straight/build/erc/erc-desktop-notifications hides /usr/share/emacs/29.4/lisp/erc/erc-desktop-notifications
/home/trev/.emacs.d/straight/build/erc/erc-stamp hides /usr/share/emacs/29.4/lisp/erc/erc-stamp
/home/trev/.emacs.d/straight/build/erc/erc-netsplit hides /usr/share/emacs/29.4/lisp/erc/erc-netsplit
/home/trev/.emacs.d/straight/build/erc/erc-goodies hides /usr/share/emacs/29.4/lisp/erc/erc-goodies
/home/trev/.emacs.d/straight/build/erc/erc-track hides /usr/share/emacs/29.4/lisp/erc/erc-track
/home/trev/.emacs.d/straight/build/erc/erc-ezbounce hides /usr/share/emacs/29.4/lisp/erc/erc-ezbounce
/home/trev/.emacs.d/straight/build/erc/erc-common hides /usr/share/emacs/29.4/lisp/erc/erc-common
/home/trev/.emacs.d/straight/build/erc/erc-imenu hides /usr/share/emacs/29.4/lisp/erc/erc-imenu
/home/trev/.emacs.d/straight/build/erc/erc-services hides /usr/share/emacs/29.4/lisp/erc/erc-services
/home/trev/.emacs.d/straight/build/erc/erc-spelling hides /usr/share/emacs/29.4/lisp/erc/erc-spelling
/home/trev/.emacs.d/straight/build/erc/erc-match hides /usr/share/emacs/29.4/lisp/erc/erc-match
/home/trev/.emacs.d/straight/build/erc/erc-menu hides /usr/share/emacs/29.4/lisp/erc/erc-menu
/home/trev/.emacs.d/straight/build/erc/erc-dcc hides /usr/share/emacs/29.4/lisp/erc/erc-dcc
/home/trev/.emacs.d/straight/build/erc/erc-log hides /usr/share/emacs/29.4/lisp/erc/erc-log
/home/trev/.emacs.d/straight/build/eldoc/eldoc hides /usr/share/emacs/29.4/lisp/emacs-lisp/eldoc
/home/trev/.emacs.d/straight/build/seq/seq hides /usr/share/emacs/29.4/lisp/emacs-lisp/seq

Features:
(shadow sort mail-extr emacsbug message yank-media dired dired-loaddefs
rfc822 mml mml-sec gnus-util mm-decode mm-bodies mm-encode mail-parse
rfc2231 mailabbrev gmm-utils mailheader sendmail rfc2047 rfc2045
ietf-drums mm-util mail-prsvr mail-utils cape orderless project consult
bookmark text-property-search pp ace-window avy markdown-mode thingatpt
noutline outline network-stream puny nsm erc-ring erc-nicks color
erc-netsplit erc-menu erc-list erc-imenu imenu erc-pcomplete pcomplete
comint ansi-osc ansi-color ring erc-button browse-url erc-fill erc-stamp
erc-join erc-goodies erc-spelling flyspell ispell erc-track erc-match
epa-file epa derived epg rfc6068 epg-config erc format-spec erc-backend
erc-networks erc-common erc-compat erc-loaddefs comp comp-cstr warnings
icons mule-util jka-compr time-date diff-hl-flydiff diff diff-hl
log-view pcvs-util vc-dir ewoc vc vc-git diff-mode vc-dispatcher
parinfer-rust-mode parinfer-rust-changes parinfer-rust track-changes
parinfer-rust-helper url url-proxy url-privacy url-expand url-methods
url-history url-cookie generate-lisp-file url-domsuf url-util url-parse
auth-source eieio eieio-core password-cache json map url-vars mailcap
elec-pair rainbow-delimiters init erc-init erc-autoloads
markdown-mode-autoloads geiser-guile-autoloads geiser-autoloads
rust-mode-autoloads parinfer-rust-mode-autoloads eglot-autoloads
track-changes-autoloads jsonrpc-autoloads flymake-autoloads
project-autoloads xref-autoloads external-completion-autoloads
vterm-autoloads nerd-icons-dired-autoloads nerd-icons-autoloads
diff-hl-autoloads magit-autoloads magit-section-autoloads
git-commit-autoloads with-editor-autoloads dash-autoloads
rainbow-mode-autoloads apheleia-autoloads casual-ibuffer-autoloads
casual-avy-autoloads use-package-ensure casual-dired-autoloads
casual-lib-autoloads transient-autoloads envrc-autoloads
inheritenv-autoloads editorconfig-autoloads rainbow-delimiters-autoloads
ws-butler-autoloads treesit-auto treesit treesit-auto-autoloads
cape-autoloads corfu-doc-terminal-autoloads corfu-doc-autoloads
corfu-terminal-autoloads popon-autoloads orderless-autoloads
corfu-popupinfo byte-opt corfu corfu-autoloads consult-autoloads
marginalia marginalia-autoloads vertico compat vertico-autoloads
compat-autoloads info seq-autoloads undo-fu-autoloads
ace-window-autoloads avy-autoloads which-key which-key-autoloads
diminish diminish-autoloads doom-themes-ext-org doom-nord-theme pcase
doom-themes doom-themes-base doom-themes-autoloads finder-inf rx
ligature ligature-autoloads eldoc-autoloads use-package-diminish
autorevert filenotify display-line-numbers desktop frameset recentf
tree-widget wid-edit saveplace edmacro kmacro straight-autoloads
straight subr-x cl-extra help-mode cl-macs gv use-package-bind-key
bind-key easy-mmode cl-seq use-package-core cl-loaddefs cl-lib bytecomp
byte-compile early-init 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
native-compile emacs)

Memory information:
((conses 16 399747 508253)
 (symbols 48 22267 36)
 (strings 32 77737 66785)
 (string-bytes 1 3078055)
 (vectors 16 46549)
 (vector-slots 8 1193570 637516)
 (floats 8 514 1662)
 (intervals 56 6087 28924)
 (buffers 984 21))




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#73443; Package emacs. (Tue, 24 Sep 2024 01:23:02 GMT) Full text and rfc822 format available.

Message #8 received at 73443 <at> debbugs.gnu.org (full text, mbox):

From: "J.P." <jp <at> neverwas.me>
To: tmarjeski <at> gmail.com
Cc: emacs-erc <at> gnu.org, 73443 <at> debbugs.gnu.org
Subject: Re: bug#73443: 29.4; ERC 5.6.1-git: erc-track mode line face color
 broken with left timestamps
Date: Mon, 23 Sep 2024 18:22:22 -0700
Hi,

tmarjeski <at> gmail.com writes:

> When setting erc-insert-timestamp-function to 'erc-insert-timestamp-left
> the erc-track channel names in the mode line do not respect the nick
> face color of whoever sent the message. The result is that the face
> color is white or the color of the timestamp face, whereas with
> 'erc-insert-timestamp-right the color is of the nick that sent a
> message.
>
> Reproduction steps:
> 1. emacs -Q
> 2. (setq erc-insert-timestamp-function 'erc-insert-timestamp-left
>          erc-timestamp-format "[%H:%M") ;; possibly unnecessary
>    (erc-track-mode) ;; enable track mode in mode line
> 3. Connect to ERC
> 4. Join a few channels so the names are legible
> 5. Go to scratch or irc server buffer, wait for a message on a channel
> 6. Notice that the channel name is not the color of the nick who sent
> the message

Unfortunately, I've not (yet) been able to reproduce this.

> In GNU Emacs 29.4 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.43,
> cairo version 1.18.0)

Complicating things slightly is this bit from the subject line:

  "29.4; ERC 5.6.1-git"

Those two don't normally jive. Typically, when you install the devel
version from GNU ELPA, ERC reports its version as something like

  "5.6.1snapshot0.20240813.11230"

If straight.el is using its own non-tarball snapshots [1], it'd be nice
to get the actual version string (you mentioned something like this in
the Libera channel). If you're feeling lucky, please try

  (and-let*
      ((straight--default-directory (straight--repos-dir "erc"))
       (ref (straight-vc 'get-commit 'git "erc"))
       (output (straight--process-output "git" "show" "--stat" ref))
       (pat (rx bol (* ?\s) "Sourced from erc version "
                (group (+ (in "0-9.a-z-"))) " on GNU ELPA Devel"))
       ((string-match pat output))
       ((match-string 1 output))))

and share the result (if it doesn't bork your Emacs first).

[1] https://github.com/emacs-straight/erc.git

Also, in your description above, "the color of the nick that sent a
message" appears to suggest you want the `nicks' module loaded (it's not
by default and isn't part of the ERC that ships with Emacs 29.4).
Anyway, perhaps the recipe should contain something like

  (setopt erc-modules (add-to-list 'erc-modules 'nicks))

or similar.

> Major mode: ERC
>
> Minor modes in effect:
>   erc-ring-mode: t
>   erc-nicks-mode: t
    ^~~~~~~~~~~~~~~~~

I realize this list of modes is merely gleaned from the Emacs process
that generated the bug report and not necessarily the one exhibiting the
bug. Nevertheless, I'm compelled to wonder if your straight.el
configuration isn't somehow inadvertently "contaminating" the session
launched from your emacs -Q recipe behind the scenes?

>   erc-scrolltobottom-mode: t
>   erc-spelling-mode: t
>   flyspell-mode: t
>   erc-track-mode: (t erc-nicks--setup-track-integration)
                     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

BTW, this strange value is definitely a bug (that I believe I can fix).
But it's likely unrelated to your issue, sadly.

> Load-path shadows:
[...]
> /home/trev/.emacs.d/straight/build/erc/erc-fill hides
>   /usr/share/emacs/29.4/lisp/erc/erc-fill
> /home/trev/.emacs.d/straight/build/erc/erc-loaddefs hides
>   /usr/share/emacs/29.4/lisp/erc/erc-loaddefs

If these load paths or ones like it are in fact generated from the
suspected straight.el snapshots mentioned above _and_ are meant to be
present in your -Q recipe's session, please specify something like

  emacs -Q
  -L /home/trev/.emacs.d/straight/build/erc
  -l /home/trev/.emacs.d/straight/build/erc/erc-autoloads.el

if possible. Better still would be a full recipe for a clean install
from scratch. For example:

1. $ mkdir -p /tmp/bug73443/.emacs.d/
2. Put this in /tmp/bug73443/.emacs.d/init.el:

  ;; -*- lexical-binding: t; -*-

  ;; straight.el boilerplate
  (defvar bootstrap-version)
  (let ((bootstrap-file
         (expand-file-name
          "straight/repos/straight.el/bootstrap.el"
          (or (bound-and-true-p straight-base-dir)
              user-emacs-directory)))
        (bootstrap-version 7))
    (unless (file-exists-p bootstrap-file)
      (with-current-buffer
          (url-retrieve-synchronously
           "https://raw.githubusercontent.com/radian-software/straight.el/develop/install.el"
           'silent 'inhibit-cookies)
        (goto-char (point-max))
        (eval-print-last-sexp)))
    (load bootstrap-file nil 'nomessage))

  (straight-use-package 'use-package)
  (setq straight-use-package-by-default t)

  ;; Config for ERC recipe
  (use-package erc
    :defer t
    :config
    (setopt erc-modules
            (seq-union '(nicks scrolltobottom spelling) erc-modules))
    :custom
    (erc-insert-timestamp-function #'erc-insert-timestamp-left))

3. $ HOME=/tmp/bug73443 emacs
4. M-x restart-emacs RET
5. M-x erc-tls RET ... RET

FWIW, using the above setup, I don't notice the behavior described nor
any difference in the mode line with `erc-insert-timestamp-function' set
to 'erc-insert-timestamp-right' or its default. If you're able to
confirm this, then perhaps we can assume there's indeed been some kind
of "contamination," at which point it may be worth adding `use-package'
declarations for some of the other built-in modes and packages present
when the bug occurred. If you're able to narrow it down to an
unfavorable combination, perhaps we can teach ERC to integrate better
with those culprits.

Cheers.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#73443; Package emacs. (Tue, 24 Sep 2024 06:56:01 GMT) Full text and rfc822 format available.

Message #11 received at 73443 <at> debbugs.gnu.org (full text, mbox):

From: Trevor Arjeski <tmarjeski <at> gmail.com>
To: "J.P." <jp <at> neverwas.me>
Cc: emacs-erc <at> gnu.org, 73443 <at> debbugs.gnu.org
Subject: Fwd: bug#73443: 29.4; ERC 5.6.1-git: erc-track mode line face color
 broken with left timestamps
Date: Tue, 24 Sep 2024 09:53:29 +0300
[Message part 1 (text/plain, inline)]
"J.P." <jp <at> neverwas.me> writes:

> Complicating things slightly is this bit from the subject line:
>
>   "29.4; ERC 5.6.1-git"
>

Agreed. I don't even really want to begin debugging this. Perhaps we
should consider the issue moot unless verifiable on Emacs 30+ or master.

> FWIW, using the above setup, I don't notice the behavior described nor
> any difference in the mode line with `erc-insert-timestamp-function' set
> to 'erc-insert-timestamp-right' or its default.

I was not able to reproduce the issue either with your provided config
using 'erc-insert-timestamp-left (also needed to turn on erc-track-mode).

Thanks for looking into this.
[Message part 2 (text/html, inline)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#73443; Package emacs. (Tue, 24 Sep 2024 07:05:02 GMT) Full text and rfc822 format available.

Message #14 received at 73443 <at> debbugs.gnu.org (full text, mbox):

From: "J.P." <jp <at> neverwas.me>
To: Trevor Arjeski <tmarjeski <at> gmail.com>
Cc: emacs-erc <at> gnu.org, 73443 <at> debbugs.gnu.org
Subject: Re: Fwd: bug#73443: 29.4; ERC 5.6.1-git: erc-track mode line face
 color broken with left timestamps
Date: Tue, 24 Sep 2024 00:03:52 -0700
Trevor Arjeski <tmarjeski <at> gmail.com> writes:

> "J.P." <jp <at> neverwas.me> writes:
>
>> Complicating things slightly is this bit from the subject line:
>>
>>   "29.4; ERC 5.6.1-git"
>>
> The version output with your snippet: 5.6.1snapshot0.20240813.11230

OK, that's what I get when I install straight.el from scratch. So at
least we're synced.

>
> Agreed. I don't even really want to begin debugging this. Perhaps we
> should consider the issue moot unless verifiable on Emacs 30+ or master.

You could start by "bisecting" the non-ERC parts of your config or the
non-ERC modes listed in the gathered facts from your initial report
(default stuff commented out):

  // erc-ring-mode: t
  // erc-nicks-mode: t                // config
  // erc-netsplit-mode: t
  // erc-menu-mode: t
  // erc-list-mode: t
  // erc-imenu-mode: t
  // erc-pcomplete-mode: t
  // erc-button--phantom-users-mode: t
  // erc-button-mode: t
  // erc-fill-mode: t
  // erc-stamp-mode: t
  // erc-autojoin-mode: t
  // erc-irccontrols-mode: t
  // erc-move-to-prompt-mode: t
  // erc-readonly-mode: t
  // erc-scrolltobottom-mode: t         // config
  // erc-spelling-mode: t               // config
  // flyspell-mode: t                   // config (spell module)
  // erc-track-mode: t
  // erc-track-minor-mode: t
  // erc-match-mode: t
  // erc-networks-mode: t
  diff-hl-flydiff-mode: t
  global-diff-hl-mode: t
  electric-pair-mode: t
  apheleia-global-mode: t
  global-treesit-auto-mode: t
  corfu-popupinfo-mode: t
  global-corfu-mode: t
  corfu-mode: t
  marginalia-mode: t
  vertico-mode: t
  which-key-mode: t
  global-ligature-mode: t
  ligature-mode: t
  global-auto-revert-mode: t
  global-display-line-numbers-mode: t
  desktop-save-mode: t
  recentf-mode: t
  save-place-mode: t
  // straight-use-package-mode: t       // config
  // straight-package-neutering-mode: t // config
  override-global-mode: t
  // global-eldoc-mode: t
  // show-paren-mode: t
  // electric-indent-mode: t
  // mouse-wheel-mode: t
  // file-name-shadow-mode: t
  // global-font-lock-mode: t
  // font-lock-mode: t
  // blink-cursor-mode: t
  column-number-mode: t
  // line-number-mode: t
  // transient-mark-mode: t
  // auto-composition-mode: t
  // auto-encryption-mode: t
  // auto-compression-mode: t

So, essentially, you'd just be adding like half of these to the base
config from my previous reply, e.g.,

  (use-package diff-hl ...) ; where "..." means "your config details"
  (use-package elec-pair :straight nil :init (electric-pair-mode +1))
  (use-package apheleia ...)
  ;; [...]
  (use-package vertico ...)

And if the bug is still present, remove half of those, and so on. But if
it's absent, switch to the other half and test again. Let me know if
that doesn't make sense. (And apologies if you're already familiar with
this method.)

>  
>> FWIW, using the above setup, I don't notice the behavior described nor
>> any difference in the mode line with `erc-insert-timestamp-function' set
>> to 'erc-insert-timestamp-right' or its default.
>
> I was not able to reproduce the issue either with your provided config
> using 'erc-insert-timestamp-left (also needed to turn on erc-track-mode).

FYI, you actually don't _need_ to explicitly activate any minor modes
for modules that appear in `erc-modules', which `track' (i.e.,
`erc-track-mode') does by default. I know the ";;; Commentary" front
matter atop ERC's libraries makes it seem otherwise, but that's because
they're ancient and were never updated. Sorry about that (good first
issue, though). So, yeah, rule of thumb: if `erc-modules' contains some
module `foo', you almost never need

  (erc-foo-mode +1)

in your config, at least not for built-in modules. That said, doing so
is superfluous and basically benign.

>
> Thanks for looking into this.

No problem!




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#73443; Package emacs. (Tue, 24 Sep 2024 08:10:01 GMT) Full text and rfc822 format available.

Message #17 received at 73443 <at> debbugs.gnu.org (full text, mbox):

From: Trevor Arjeski <tmarjeski <at> gmail.com>
To: "J.P." <jp <at> neverwas.me>
Cc: emacs-erc <at> gnu.org, 73443 <at> debbugs.gnu.org
Subject: Re: Fwd: bug#73443: 29.4; ERC 5.6.1-git: erc-track mode line face
 color broken with left timestamps
Date: Tue, 24 Sep 2024 11:08:09 +0300
"J.P." <jp <at> neverwas.me> writes:

> You could start by "bisecting" the non-ERC parts of your config or the
> non-ERC modes listed in the gathered facts from your initial report
> (default stuff commented out):

After a bisect, I was able to find the culprit:

      (erc-fill-function 'erc-fill-static)

Toggling this to and from the default - 'erc-fill-variable - allows me
to reproduce the issue consistently.

My guess is that the track parser does not like the extra padding
between the timestamp and nick, but I haven't yet looked into the code.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#73443; Package emacs. (Wed, 25 Sep 2024 00:41:02 GMT) Full text and rfc822 format available.

Message #20 received at 73443 <at> debbugs.gnu.org (full text, mbox):

From: "J.P." <jp <at> neverwas.me>
To: Trevor Arjeski <tmarjeski <at> gmail.com>
Cc: emacs-erc <at> gnu.org, 73443 <at> debbugs.gnu.org
Subject: Re: Fwd: bug#73443: 29.4; ERC 5.6.1-git: erc-track mode line face
 color broken with left timestamps
Date: Tue, 24 Sep 2024 17:36:10 -0700
[Message part 1 (text/plain, inline)]
Trevor Arjeski <tmarjeski <at> gmail.com> writes:

> "J.P." <jp <at> neverwas.me> writes:
>
>> You could start by "bisecting" the non-ERC parts of your config or the
>> non-ERC modes listed in the gathered facts from your initial report
>> (default stuff commented out):
>
> After a bisect, I was able to find the culprit:
>
>       (erc-fill-function 'erc-fill-static)
>
> Toggling this to and from the default - 'erc-fill-variable - allows me
> to reproduce the issue consistently.

Thanks for getting to the bottom of this. I was indeed able to reproduce
it with user options alone.

>
> My guess is that the track parser does not like the extra padding
> between the timestamp and nick, but I haven't yet looked into the code.

Yes, that's essentially what's happening. The new internal function that
extracts all faces in a message acted too aggressively in abandoning its
search after encountering a region without any face properties. So while
this issue is most visible when using `nicks' highlighting, it's
actually always present and therefore somewhat pernicious. The attached
patch should fix the problem.

[0001-5.6.1-Skip-indentation-when-gathering-faces-in-erc-t.patch (text/x-patch, attachment)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#73443; Package emacs. (Wed, 25 Sep 2024 04:57:01 GMT) Full text and rfc822 format available.

Message #23 received at 73443 <at> debbugs.gnu.org (full text, mbox):

From: Trevor Arjeski <tmarjeski <at> gmail.com>
To: "J.P." <jp <at> neverwas.me>
Cc: emacs-erc <at> gnu.org, 73443 <at> debbugs.gnu.org
Subject: Re: Fwd: bug#73443: 29.4; ERC 5.6.1-git: erc-track mode line face
 color broken with left timestamps
Date: Wed, 25 Sep 2024 07:54:30 +0300
I applied the patch and it's working on my end! Thanks J.P!






Reply sent to "J.P." <jp <at> neverwas.me>:
You have taken responsibility. (Tue, 01 Oct 2024 00:17:03 GMT) Full text and rfc822 format available.

Notification sent to tmarjeski <at> gmail.com:
bug acknowledged by developer. (Tue, 01 Oct 2024 00:17:03 GMT) Full text and rfc822 format available.

Message #28 received at 73443-done <at> debbugs.gnu.org (full text, mbox):

From: "J.P." <jp <at> neverwas.me>
To: Trevor Arjeski <tmarjeski <at> gmail.com>
Cc: emacs-erc <at> gnu.org, 73443-done <at> debbugs.gnu.org
Subject: Re: Fwd: bug#73443: 29.4; ERC 5.6.1-git: erc-track mode line face
 color broken with left timestamps
Date: Mon, 30 Sep 2024 17:15:55 -0700
Trevor Arjeski <tmarjeski <at> gmail.com> writes:

> I applied the patch and it's working on my end! Thanks J.P!

This has been installed as

  https://git.savannah.gnu.org/cgit/emacs.git/commit/?id=df593b5a

Thanks and closing.




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Tue, 29 Oct 2024 11:24:06 GMT) Full text and rfc822 format available.

This bug report was last modified 229 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.