[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: bug#70840: 29.3; ERC 5.5.0.29.1: erc-kill-buffer-on-part kills serve
From: |
J.P. |
Subject: |
Re: bug#70840: 29.3; ERC 5.5.0.29.1: erc-kill-buffer-on-part kills server buffer |
Date: |
Wed, 15 May 2024 06:22:54 -0700 |
User-agent: |
Gnus/5.13 (Gnus v5.13) |
"J.P." <jp@neverwas.me> writes:
> Such an addition would require us checking how `erc-kill-channel-hook'
> is used in erc-log.el and erc-status-sidebar.el, etc., and confirming
> that running `erc-part-hook' in this fashion (within another hook) won't
> cause any problems.
I've checked `erc-log', and it indeed requires a tweak in order to
prevent a double save. The use case in `erc-status-sidebar' is that the
module wants `erc-status-sidebar-refresh' to run when parting. Luckily,
it doesn't care about the current buffer, so I'm somewhat confident that
it's safe to run whenever the user kills a live channel buffer.
> It's probably also worth doing the same with popular third-party
> packages and configs.
I've found a couple packages that operate in the affected areas. The
first one, sauron, uses `erc-server-PART-functions' instead of
`erc-part-hook', so that should be safe. The second, ZNC.el, adds advice
around `erc-kill-channel', inhibiting it when its own option is non-nil.
This too should be fine, since it also conditionally suppresses our
running `erc-part-hook'.
> There may well be other issues here I've not yet considered, so if you
> can think of any, please share. Also, if you're up for taking this on
> (not necessarily in the way I've described), please feel free to send a
> patch. The same goes for anyone else out there. I can definitely help
> with the leg work and test coverage if that makes things easier.
> Otherwise, I may not be able to get to this in time for the next release
> (not that there's any rush).
I've gone ahead with a provisional patch (attached) that incorporates
the points raised so far. Anyone interested, please take a look.
Thanks.
0001-5.6-Don-t-kill-server-buffer-with-erc-kill-buffer-on.patch
Description: Text Data