Subject: Re: bug#72949: Gnus sometimes reports new messages but not showing them on IMAP server

From: Dan Christensen <[email-masked]>
Date: Sun, 15 Sep 2024 12:49:27 +0000

On Sep 15, 2024, James Thomas <[email-masked]> wrote:

> Dan Christensen wrote:
>
>>   (max (1+ (- (cdr active) (car active))) 0)
>
> Just wanna chime in with what's in (info "(gnus) Required Back End
> Functions"):
>
>   Gnus just discards the total-number, so whether one should take the
>   bother to generate it properly (if that is a problem) is left as an
>   exercise to the reader.

That's interesting.  I wonder if it is still correct.

As I mentioned in an earlier message in this bug report, without that
line of the patch, Gnus gives me an error.  Without that line, Gnus
would calculate the total number of articles as -1, and this line
from gnus-start.el would fail to match because of the minus sign:

    (when (looking-at "[0-9]+ [0-9]+ \\([0-9]+\\) [0-9]+")

I'm not sure if this is the only place that would be affected.  Also,
I see that many other parts of Gnus do a correct calculation of the
total number of articles, so I guess we should follow suit.

Dan