Subject: bug#62845: 29.0.90; nntp-with-open-group-function kills current buffer on timeout

From: Eric Abrahamsen <[email-masked]>
Date: Sat, 06 May 2023 10:05:54 -0700

On 05/06/23 09:31 AM, Eli Zaretskii wrote:
>> From: Eric Abrahamsen <[email-masked]>
>> Cc: [email-masked],  [email-masked]
>> Date: Fri, 05 May 2023 17:03:35 -0700
>> 
>> `nntp-report' used to raise an error in this case, so it didn't matter
>> what happened afterwards. That error would derail the entire process of
>> Gnus checking for news/mail, so I took it out so that other servers
>> could continue doing their work even if this one had lost its
>> connection.
>> 
>> But then the current buffer of `with-current-buffer` is gone, which as
>> Andreas notes dumps us in the most-recently-used buffer, which could be
>> anything. The `nnheader-strip-cr' acts on that buffer, and terrible
>> things result.
>> 
>> Other code in this library checks if the timer has killed the process
>> buffer in the meantime. There's probably a safe solution in here
>> somewhere, but if you're looking for a reliable regression fix to
>> include in Emacs 29, it's probably best just to revert 032969e8c65. That
>> behavior is annoying, but at least not buggy.
>> 
>> WDYT?
>
> Fine with me, but what is the plan for master?  If you can show the
> proposed solution for master, we could then try to figure out if it is
> safe enough for emacs-29 as well.
>
> But if it will take a significant time to come up with such a solution
> for master, then let's revert on emacs-29 for now.

I've had a patch sitting around since forever that defines a handful of
Gnus-specific errors and uses them for explicit flow control, preventing
errors with individual servers from interrupting Gnus' top-level usage.
Personally I think that's the right way to go, but it seems like too
much for a emacs 29 fix. I will look the patch over this afternoon and
see how close I got.