GNU bug report logs -
#60560
29.0.60; ERC 5.5: erc-track should account for killed buffers
Previous Next
Reported by: "J.P." <jp <at> neverwas.me>
Date: Wed, 4 Jan 2023 18:36:02 UTC
Severity: normal
Tags: patch
Found in version 29.0.60
Fixed in version 30.1
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 60560 in the body.
You can then email your comments to 60560 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#60560
; Package
emacs
.
(Wed, 04 Jan 2023 18:36:02 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
.
(Wed, 04 Jan 2023 18:36: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
Case 1
- From emacs -Q, do an M-x erc.
- Join a channel, but stay in the server buffer.
- C-x k and answer "yes". You should end up in the channel buffer, and
the mode line should contain an indicator referencing the killed
server buffer.
- Issuing a C-c C-SPC produces an error saying "attempt to display
deleted buffer".
Here, `erc-track--switch-buffer' and friends do not fully account for
killed buffers hanging around in `erc-modified-channels-alist'. This
could potentially be addressed by adding a maintenance function to
`erc-kill-server-hook' on module init (er, major-mode init). However,
since the hook itself is a public option and there's a race between it
and `erc-window-configuration-change' (which sees the killed buffer as
still being alive), I've modified the command instead. If this is
potentially problematic, someone please enlighten me.
Case 2
- From emacs -Q, do an M-x erc.
- Join a channel, switch to it, and /quit.
- From any buffer other than the server buffer (current is fine),
do another M-x erc (instead of just /reconnect'ing).
- Wait a few seconds until the mode line updates.
- Issue a C-c C-SPC and get an error saying "attempt to display
deleted buffer".
This highlights the need for other modules to perform chores when
erc-networks kills a server buffer. Basically, when merging contexts,
it doesn't run the normal `erc-kill-server-hook' because that would
invite a host of complications. I've chosen to address this by adding
a separate, internal hook expressly for this purpose. If that's dumb,
please someone say so.
The fix for the second case belongs on emacs-29 (IMO) because the bug is
caused by changes it introduces. The fix for the first could arguably go
on master because it's been with ERC since the beginning. If anyone has
opinions on this or other aspects of this patch, please make them known
in the coming days. Thanks.
[0001-Fix-wrong-type-in-erc-ignore-hide-list-options.patch (text/x-patch, attachment)]
[0002-Remove-obsolete-server-buffers-on-MOTD-in-erc-track.patch (text/x-patch, attachment)]
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#60560
; Package
emacs
.
(Tue, 10 Jan 2023 14:37:02 GMT)
Full text and
rfc822 format available.
Message #8 received at 60560 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
"J.P." <jp <at> neverwas.me> writes:
> Case 1
>
[...]
>
> Here, `erc-track--switch-buffer' and friends do not fully account for
> killed buffers hanging around in `erc-modified-channels-alist'. This
> could potentially be addressed by adding a maintenance function to
> `erc-kill-server-hook' on module init (er, major-mode init). However,
> since the hook itself is a public option and there's a race between it
> and `erc-window-configuration-change' (which sees the killed buffer as
> still being alive), I've modified the command instead. If this is
> potentially problematic, someone please enlighten me.
>
>
> Case 2
>
[...]
>
> This highlights the need for other modules to perform chores when
> erc-networks kills a server buffer. Basically, when merging contexts,
> it doesn't run the normal `erc-kill-server-hook' because that would
> invite a host of complications. I've chosen to address this by adding
> a separate, internal hook expressly for this purpose. If that's dumb,
> please someone say so.
>
> The fix for the second case belongs on emacs-29 (IMO) because the bug is
> caused by changes it introduces.
This has been carried out.
> The fix for the first could arguably go on master because it's been
> with ERC since the beginning.
This has indeed been held back in a separate patch destined for master
(attached).
[0000-v1-v2.diff (text/x-patch, attachment)]
[0003-5.6-Ignore-killed-buffers-when-switching-in-erc-trac.patch (text/x-patch, attachment)]
bug marked as fixed in version 30.1, send any further explanations to
60560 <at> debbugs.gnu.org and "J.P." <jp <at> neverwas.me>
Request was from
"J.P." <jp <at> neverwas.me>
to
control <at> debbugs.gnu.org
.
(Sat, 08 Apr 2023 23:29:02 GMT)
Full text and
rfc822 format available.
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Sun, 07 May 2023 11:24:10 GMT)
Full text and
rfc822 format available.
This bug report was last modified 2 years and 7 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.