From: Mike Kazantsev <mk.fraggod@gmail.com>
To: 59976@debbugs.gnu.org
Cc: emacs-erc@gnu.org
Subject: bug#59976: ERC 5.4.1: erc-networks--id gets clobbered in erc server buffer on /query name conflict
Date: Mon, 12 Dec 2022 00:00:31 +0500 [thread overview]
Message-ID: <20221212000031.2f679e5e@malediction> (raw)
Hi.
I've needed to use case-sensitive channel names (with matrix2051 ad-hoc
ircd), wanted to test updated ERC client for that, and stumbled upon
what looks like a bug there:
When IRC server is named "slack", and then it sends you a message from
user named "slack", ERC tries to open query-buffer "slack", ends up
running erc--open-target("slack") which does kill-all-local-variables()
when enabling erc-mode in the buffer.
That removes erc-networks--id value there and from then on ERC keeps
spamming "error in process filter" about erc-networks--id being nil.
- What I'm trying to do:
- (erc-tls ...) ;; cleates "slack" server buffer and some channels.
- Open "slack" buffer
- Send "/ping myuser" IRC-command there
- Expected result:
Command actually results in PRIVMSG from "slack" user on this
specific ircd, so I expect to see that open a separate query-buffer
where that message is displayed.
(message in question - though probably doesn't matter:
"msg: ^APING 1670781447.080567^A could not be sent channel_not_found")
- Actual result:
- Emacs slows down while printing following errors to MiniBuffer and *Messages*:
error in process filter: or: Wrong type argument: erc-networks--id, nil
error in process filter: Wrong type argument: erc-networks--id, nil
- As far as I can tell that IRC connection becomes unusable, and
errors like above get signaled from then on randomly, likely on
some commands sent from ircd.
- Workaround: changing announced name of the server to something else
helps - "slack" query-buffer gets created and is separate from server buffer.
Was able to understand what seem to be the issue here by enabling
logging for erc-networks--id changes to *Messages* like this:
(defun debug-watch-log (sym newval op where)
(message "Variable update: %s = %S -> %S [%S %S]"
sym (symbol-value sym) newval op where)
(backtrace))
(add-variable-watcher 'erc-networks--id #'debug-watch-log)
(run M-x cancel-debug-on-variable-change afterwards to disable this)
I think some kind of disambiguation or conflict-detection for
query-channel names might be either missing or not working atm,
but is needed to avoid this happening unintentionally, or maybe
even on purpose (e.g. to annoy someone by cutting their IRC connection).
I'm running ERC 5.4.1 from current 0e5d059 git master on Emacs 28.2
(replacing "erc" dir in /usr/share/emacs), so it is also possible that
maybe some change in Emacs 29+ prevents this behavior, but it seems unlikely.
Thanks.
--
Mike Kazantsev // fraggod.net
next reply other threads:[~2022-12-11 19:00 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-12-11 19:00 Mike Kazantsev [this message]
2022-12-12 14:35 ` bug#59976: ERC 5.4.1: erc-networks--id gets clobbered in erc server buffer on /query name conflict J.P.
[not found] ` <87pmcowuzv.fsf@neverwas.me>
2022-12-12 15:35 ` Mike Kazantsev
[not found] ` <20221212203508.3cd44bb6@malediction>
2022-12-13 15:13 ` J.P.
2022-12-15 14:16 ` J.P.
[not found] ` <87sfhgn45z.fsf@neverwas.me>
2022-12-15 18:24 ` Mike Kazantsev
[not found] ` <20221215232455.4a9c6677@malediction>
2022-12-15 18:45 ` Mike Kazantsev
2022-12-16 15:17 ` 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
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20221212000031.2f679e5e@malediction \
--to=mk.fraggod@gmail.com \
--cc=59976@debbugs.gnu.org \
--cc=emacs-erc@gnu.org \
/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 public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).