GNU bug report logs - #61539
29.0.60; When nnselect-always-regenerate, group info gets out-of-date

Previous Next

Package: emacs;

Reported by: Sean Whitton <spwhitton <at> spwhitton.name>

Date: Wed, 15 Feb 2023 19:48:02 UTC

Severity: normal

Found in version 29.0.60

Done: Stefan Kangas <stefankangas <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: help-debbugs <at> gnu.org (GNU bug Tracking System)
To: Sean Whitton <spwhitton <at> spwhitton.name>
Subject: bug#61539: closed (Re: bug#61539: 29.0.60; When nnselect-always-regenerate,
 group info gets out-of-date)
Date: Tue, 05 Sep 2023 06:18:02 +0000
[Message part 1 (text/plain, inline)]
Your bug report

#61539: 29.0.60; When nnselect-always-regenerate, group info gets out-of-date

which was filed against the emacs package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to 61539 <at> debbugs.gnu.org.

-- 
61539: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=61539
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: Stefan Kangas <stefankangas <at> gmail.com>
To: Andrew Cohen <cohen <at> bu.edu>
Cc: Sean Whitton <spwhitton <at> arizona.edu>, 61539-done <at> debbugs.gnu.org
Subject: Re: bug#61539: 29.0.60; When nnselect-always-regenerate, group info
 gets out-of-date
Date: Mon, 4 Sep 2023 23:16:53 -0700
Andrew Cohen <cohen <at> bu.edu> writes:

> Just forgot to close the bug. Its all pushed to master quite some time
> ago.

OK, thanks.  Closing.

[Message part 3 (message/rfc822, inline)]
From: Sean Whitton <spwhitton <at> spwhitton.name>
To: bug-gnu-emacs <at> gnu.org
Subject: 29.0.60; When nnselect-always-regenerate, group info gets out-of-date
Date: Wed, 15 Feb 2023 12:47:18 -0700
X-debbugs-cc: cohen <at> andy.bu.edu

1. Same setup described in #56592, but additionally set
   nnselect-always-regenerate to t for the groups.
2. Enter group.  Mark an unread article as read.

   (length gnus-newsgroup-selection) => 935
   (car (last (gnus-info-read (gnus-get-info gnus-newsgroup-name))))
       => (930 . 935)

3. Exit group.  Enter group again.

   (length gnus-newsgroup-selection) => 934
   (car (last (gnus-info-read (gnus-get-info gnus-newsgroup-name))))
       => (930 . 935)

4. Attempt to exit group again.  Then, while binding select-reads at the
   beginning of nnselect-push-info, nnselect-categorize signals
   args-out-of-range, because one of the inline functions it calls
   attempts to read the 935th element of gnus-newsgroup-selection.

I believe that the nnselect-always-regenerate branch of
nnselect-get-artlist needs to update the group info, because the
following hack seems to avoid the problem.

-- >8 --
diff --git a/lisp/gnus/nnselect.el b/lisp/gnus/nnselect.el
index 87cb1275313..fdb4956b8e6 100644
--- a/lisp/gnus/nnselect.el
+++ b/lisp/gnus/nnselect.el
@@ -303,7 +303,10 @@ nnselect-get-artlist
        (cond
         (override (funcall override ,group))
         ((gnus-group-get-parameter ,group 'nnselect-always-regenerate)
-         (nnselect-generate-artlist ,group))
+         (let* ((artlist (nnselect-generate-artlist ,group))
+                (gnus-newsgroup-selection artlist))
+           (nnselect-request-update-info ,group (gnus-get-info ,group))
+           artlist))
         (t
 	 (nnselect-uncompress-artlist
           (gnus-group-get-parameter ,group 'nnselect-artlist t)))))))

-- 
Sean Whitton



This bug report was last modified 1 year and 261 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.