GNU bug report logs -
#72949
[PATCH] Wrong unread count in the Group buffer in nnimap
Previous Next
Reported by: James Thomas <jimjoe <at> gmx.net>
Date: Mon, 2 Sep 2024 06:01:02 UTC
Severity: normal
Tags: fixed, patch
Fixed in version 31.1
Done: Robert Pluim <rpluim <at> gmail.com>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
Dan Christensen wrote:
> On Sep 15, 2024, James Thomas 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:
Wait! I think we've miscommunicated: I'd meant the _other_ patch, the
one in (gnus-summary-goto-article "<86zfoqpobd.fsf <at> gmx.net>"). I use
that and it's working fine here.
Dan Christensen wrote:
> On Sep 12, 2024, James Thomas wrote:
>
>>> Sorry! I got confused again... Please try the other patch in that bug
>>> report (the one that swaps the car and cdr). I find that it works with
>>> your use case!
>
> Yes, that patch fixes the problem I've had for ages. But I don't think
> that it's correct. Here's what is done in nnml.el:
>
> (nnheader-insert "211 %d %d %d %s\n"
> (max (1+ (- (cdr active) (car active))) 0)
> (car active) (cdr active) group)))))))
>
> Notice that the car comes before the cdr, and that you have to add 1
> to the difference between the cdr and the car, since if the active
> range is 2 . 3, then there are 2 active articles, which is one more
> than 3 - 2. So I suspect that the patch attached below might be
> correct. Someone who knows more about what the "211" line should
> contain should review this.
>
> My patch also fixes the problem I've had. With either patch, after
> moving or copying an article to a new group, the new group has (active 1
> . 1) as expected, with no unexist entry.
>
> But the two patches would behave differently when active was already set.
>
> Dan
The total shouldn't need any change for these reasons below.
James Thomas wrote:
> 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.
>
> --
>>>> I see that many other parts of Gnus do a correct calculation of the
>>>> total number of articles
>>>
>>> Wrt this function?
>>
>> Yes, for example, the code from nnml-request-group that I posted
>> earlier in the thread, and other places that have "211".
>
> No, I mean something that _uses_ that value? The only function I can
> find is 'gnus-browse-foreign-server' which doesn't.
Could you try again with that patch and a clean newsrc?
Regards,
James
This bug report was last modified 274 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.