From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Sean Whitton Newsgroups: gmane.emacs.bugs Subject: bug#61539: 29.0.60; When nnselect-always-regenerate, group info gets out-of-date Date: Wed, 15 Feb 2023 12:47:18 -0700 Message-ID: <87lekyaeyh.fsf@melete.silentflame.com> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="40953"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: cohen@andy.bu.edu To: 61539@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Feb 15 20:48:15 2023 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pSNlF-000APl-Ox for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 15 Feb 2023 20:48:15 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pSNl7-0007w9-9m; Wed, 15 Feb 2023 14:48:05 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pSNl5-0007mI-23 for bug-gnu-emacs@gnu.org; Wed, 15 Feb 2023 14:48:03 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pSNl4-0005Ih-ND for bug-gnu-emacs@gnu.org; Wed, 15 Feb 2023 14:48:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pSNl4-0002lr-Ho; Wed, 15 Feb 2023 14:48:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Sean Whitton Original-Sender: "Debbugs-submit" Resent-CC: cohen@andy.bu.edu, bug-gnu-emacs@gnu.org Resent-Date: Wed, 15 Feb 2023 19:48:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 61539 X-GNU-PR-Package: emacs X-Debbugs-Original-To: bug-gnu-emacs@gnu.org X-Debbugs-Original-Xcc: cohen@andy.bu.edu Original-Received: via spool by submit@debbugs.gnu.org id=B.167649044710453 (code B ref -1); Wed, 15 Feb 2023 19:48:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 15 Feb 2023 19:47:27 +0000 Original-Received: from localhost ([127.0.0.1]:34095 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pSNkV-0002iX-6y for submit@debbugs.gnu.org; Wed, 15 Feb 2023 14:47:27 -0500 Original-Received: from lists.gnu.org ([209.51.188.17]:36254) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pSNkT-0002iP-2j for submit@debbugs.gnu.org; Wed, 15 Feb 2023 14:47:26 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pSNkS-0007MH-Qv for bug-gnu-emacs@gnu.org; Wed, 15 Feb 2023 14:47:24 -0500 Original-Received: from out1-smtp.messagingengine.com ([66.111.4.25]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pSNkQ-00059y-Pd for bug-gnu-emacs@gnu.org; Wed, 15 Feb 2023 14:47:24 -0500 Original-Received: from compute2.internal (compute2.nyi.internal [10.202.2.46]) by mailout.nyi.internal (Postfix) with ESMTP id 59A255C01CA for ; Wed, 15 Feb 2023 14:47:20 -0500 (EST) Original-Received: from mailfrontend1 ([10.202.2.162]) by compute2.internal (MEProxy); Wed, 15 Feb 2023 14:47:20 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=spwhitton.name; h=cc:content-type:date:date:from:from:in-reply-to:message-id :mime-version:reply-to:sender:subject:subject:to:to; s=fm3; t= 1676490440; x=1676576840; bh=3m6mVzaK4zYSRsnWFGApxtVspO/5Yeur7It nx09gXN4=; b=HbP2ts9RO28c3CIbi/b5zly+DK02MnDAWS53K8z8yHWm0FveDbh watVKkqf7SZQqcRj619/KGGlzS9KA0BNHZ092eAcpE7+QIZHedzjPNj4KbzrqC+I IqCI3iTTuMXNmnHRkHfimjoKAuJWTFt2BcZFmFrw6whTQAv25Ux9swTVkAvv2NTM K2AQtxrVjF5gvpamtuT3hf+hzqC/uXBBJNzfhDKZx4ykI04D0cmfqBsxnmsuyKZU aVklDD3GZ9aPWTjSygxRePUwEL7SW0yiJUC7tc+03aH9uugib/JElCarQCv5nfRU EJ+lR3fF3GJgcx0x8AqvzAMjEOXMnXBWJ9w== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:date:feedback-id :feedback-id:from:from:in-reply-to:message-id:mime-version :reply-to:sender:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t=1676490440; x= 1676576840; bh=3m6mVzaK4zYSRsnWFGApxtVspO/5Yeur7Itnx09gXN4=; b=P WjLgaQsKx7eX1amPXszlwC48yXmTL+RjKyWN4elUpSk3L8DerkJvyM0jorzXPpU8 E85hjnCvQHE5cgrfzjKBp7tdQjLYrn2H+uo9+Qp8md2Og1whLUtIXcd64DUPIYA+ CJsRcabyuecRNV0hgWsNk2iRM1PlPklJPnFsagUlW+RT2XpltX9iyZPL+tQvnjnn fXKfwgXnQlLabSH5xV5u4mCAv0oR4IXGegj4Rf/FVJ3ssCxq6vnXglU+0yO6rt/H FJeF3iJRLASzQCo+OOY+hL1Kyf5osN4OB/vwA/wYUVT0/PzssJ+skiYGjlTphpHT iQ6QvBgRuydtXrWkh7UBQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedrudeihedguddvvdcutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecunecujfgurhephffvufffkfgfgggtsehttddttd dtredtnecuhfhrohhmpefuvggrnhcuhghhihhtthhonhcuoehsphifhhhithhtohhnsehs phifhhhithhtohhnrdhnrghmvgeqnecuggftrfgrthhtvghrnhepfffgheeggffgheeuvd ethfekuddtgffgtdeukeegkedttefftdeghfdvgfdtjeelnecuvehluhhsthgvrhfuihii vgeptdenucfrrghrrghmpehmrghilhhfrhhomhepshhpfihhihhtthhonhesshhpfihhih htthhonhdrnhgrmhgv X-ME-Proxy: Feedback-ID: i23c04076:Fastmail Original-Received: by mail.messagingengine.com (Postfix) with ESMTPA for ; Wed, 15 Feb 2023 14:47:19 -0500 (EST) Original-Received: by melete.silentflame.com (Postfix, from userid 1000) id D780A7E96E0; Wed, 15 Feb 2023 12:47:18 -0700 (MST) Received-SPF: pass client-ip=66.111.4.25; envelope-from=spwhitton@spwhitton.name; helo=out1-smtp.messagingengine.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:255772 Archived-At: X-debbugs-cc: cohen@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