From: "J.P." <jp@neverwas.me>
To: tmarjeski@gmail.com
Cc: emacs-erc@gnu.org, 73443@debbugs.gnu.org
Subject: 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 [thread overview]
Message-ID: <87tte5zvzl.fsf__39036.8956302822$1727140996$gmane$org@neverwas.me> (raw)
In-Reply-To: <87h6a63zmj.fsf@trevarch.mail-host-address-is-not-set> (tmarjeski@gmail.com's message of "Mon, 23 Sep 2024 23:04:52 +0300")
Hi,
tmarjeski@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.
next prev parent reply other threads:[~2024-09-24 1:22 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-09-23 20:04 bug#73443: 29.4; ERC 5.6.1-git: erc-track mode line face color broken with left timestamps tmarjeski
2024-09-24 1:22 ` J.P. [this message]
[not found] ` <87tte5zvzl.fsf@neverwas.me>
[not found] ` <87r0998tqe.fsf@trevarch.mail-host-address-is-not-set>
2024-09-24 6:53 ` bug#73443: Fwd: " Trevor Arjeski
[not found] ` <CACPvkDxUsaMRtL18NxbYd=w2dObuc++bvBQQe2Nms1D6_4zWNg@mail.gmail.com>
2024-09-24 7:03 ` J.P.
[not found] ` <871q19y1lz.fsf@neverwas.me>
2024-09-24 8:08 ` Trevor Arjeski
[not found] ` <87ed59o4nq.fsf@gmail.com>
2024-09-25 0:36 ` J.P.
[not found] ` <87v7ykvabp.fsf@neverwas.me>
2024-09-25 4:54 ` Trevor Arjeski
[not found] ` <87plosuyd5.fsf@gmail.com>
2024-10-01 0:15 ` J.P.
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='87tte5zvzl.fsf__39036.8956302822$1727140996$gmane$org@neverwas.me' \
--to=jp@neverwas.me \
--cc=73443@debbugs.gnu.org \
--cc=emacs-erc@gnu.org \
--cc=tmarjeski@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.