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: Sat, 18 Feb 2023 13:20:25 -0700 Message-ID: <87ilfy3euu.fsf@melete.silentflame.com> References: <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="24893"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: cohen@bu.edu To: 61539@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Feb 18 21:21:23 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 1pTThw-0006AY-G3 for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 18 Feb 2023 21:21:21 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pTThh-0005zm-Ce; Sat, 18 Feb 2023 15:21: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 1pTThf-0005zN-9I for bug-gnu-emacs@gnu.org; Sat, 18 Feb 2023 15:21: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 1pTThf-00054J-0A for bug-gnu-emacs@gnu.org; Sat, 18 Feb 2023 15:21:03 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pTThe-00015K-He for bug-gnu-emacs@gnu.org; Sat, 18 Feb 2023 15:21:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Sean Whitton Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 18 Feb 2023 20:21:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 61539 X-GNU-PR-Package: emacs Original-Received: via spool by 61539-submit@debbugs.gnu.org id=B61539.16767516344109 (code B ref 61539); Sat, 18 Feb 2023 20:21:02 +0000 Original-Received: (at 61539) by debbugs.gnu.org; 18 Feb 2023 20:20:34 +0000 Original-Received: from localhost ([127.0.0.1]:45019 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pTThB-00014D-Rd for submit@debbugs.gnu.org; Sat, 18 Feb 2023 15:20:34 -0500 Original-Received: from out5-smtp.messagingengine.com ([66.111.4.29]:44527) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pTThA-000141-5p for 61539@debbugs.gnu.org; Sat, 18 Feb 2023 15:20:32 -0500 Original-Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.nyi.internal (Postfix) with ESMTP id F3AAE5C005A; Sat, 18 Feb 2023 15:20:26 -0500 (EST) Original-Received: from mailfrontend1 ([10.202.2.162]) by compute5.internal (MEProxy); Sat, 18 Feb 2023 15:20:26 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=spwhitton.name; h=cc:cc:content-type:date:date:from:from:in-reply-to :in-reply-to:message-id:mime-version:references:reply-to:sender :subject:subject:to:to; s=fm3; t=1676751626; x=1676838026; bh=1q oPq8TNDy1/EXnHQKZvc/B8UZtwWru11vnk5VnKHxM=; b=XMkcMFaS8BSI6fDVPr 2kKPb4yOD5T48wfYOQKxQSPmO+6LcLW+yNyfrWI3mDww7BnaifLd0twFZ3lkEVUG GLf1FdCdLyKvkk5Da2dazfEoCQK/cBIPLnHfEYQm2v4ogwFz0waRXixfTVKyneDR v6HKgrr4GCA5IhJiyOMPoGWYwp1Dr/mvd5pJUhos01Hp0AWcaS1T7Gfw/e9BOC3W HztONWLQBgAYrWN3fNidIcMSgzDIEo3vsHjOCM2fnS3x7M0KDygZpDDdBElInTRa zFa6JTI8jmwSWaLVsxp25b6K+a7LwkhZn3zp5PaWYWr/8+R6d+8Hoa644J540rKw LAlw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:date:date:feedback-id :feedback-id:from:from:in-reply-to:in-reply-to:message-id :mime-version:references: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=1676751626; x=1676838026; bh=1qoPq8TNDy1/EXnHQKZvc/B8UZtw Wru11vnk5VnKHxM=; b=BJRXvGAIwEMEDi6wbSEy+RLHc4A8pMtp+3g69bPMj/v8 tJBz1+I1ORDi8edcZ+RsM9l5syAjZV1gVhYo4JXIuhDpXqrjgngL2TwVNigNx+LM 811WzO6KWS2VrU2wOQc2Jeg8sNswF2HZU/0Kas21qLHD4+lMZnWpPCifROjHcAUT IKvCCNkfcNM37iw1NC2myNBuzT3m4u1no+sNr+qiRxuuK3wCY1MtfrOIVfFgIrzv i5jSkKz5J4263gtSU3fiTDEwmU++kCyiahGcJLJmjXz8dzK6Hf1Xl4jcFe+Ki5fi 2WNJQpJfob9XqDFqd3pojTp02w98q8jC3P0wP4FpfQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedrudejuddgudefvdcutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecunecujfgurhephffvvefujghffffkfgggtgesth dttddttdertdenucfhrhhomhepufgvrghnucghhhhithhtohhnuceoshhpfihhihhtthho nhesshhpfihhihhtthhonhdrnhgrmhgvqeenucggtffrrghtthgvrhhnpedtffdvffeule euvdetkedvveehgfehvdegvefghfevudekgeegleevgeejkeetkeenucevlhhushhtvghr ufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehsphifhhhithhtohhnsehsph ifhhhithhtohhnrdhnrghmvg X-ME-Proxy: Feedback-ID: i23c04076:Fastmail Original-Received: by mail.messagingengine.com (Postfix) with ESMTPA; Sat, 18 Feb 2023 15:20:26 -0500 (EST) Original-Received: by melete.silentflame.com (Postfix, from userid 1000) id 211AA7EBA43; Sat, 18 Feb 2023 13:20:25 -0700 (MST) In-Reply-To: <87lekyaeyh.fsf@melete.silentflame.com> (Sean Whitton's message of "Wed, 15 Feb 2023 12:47:18 -0700") 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:255991 Archived-At: control: tag -1 + patch Hello, On Wed 15 Feb 2023 at 12:47PM -07, Sean Whitton wrote: > 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. Andrew Cohen sent me the following fix. I've asked him whether he thinks this is safe enough for emacs-29. -- >8 -- From: Andrew Cohen diff --git a/lisp/gnus/nnselect.el b/lisp/gnus/nnselect.el index 87cb1275313..516433aba93 100644 --- a/lisp/gnus/nnselect.el +++ b/lisp/gnus/nnselect.el @@ -350,9 +350,9 @@ nnselect-request-group ;; the result. (unless nnselect-artlist (nnselect-store-artlist group - (setq nnselect-artlist (nnselect-generate-artlist group))) + (setq nnselect-artlist (nnselect-generate-artlist group)))) (nnselect-request-update-info - group (or info (gnus-get-info group)))) + group (or info (gnus-get-info group))) (if (zerop (setq length (nnselect-artlist-length nnselect-artlist))) (progn (nnheader-report 'nnselect "Selection produced empty results.") @@ -880,11 +880,13 @@ nnselect-search-thread -(defun nnselect-push-info (group) +(defun nnselect-push-info (_group) "Copy mark-lists from GROUP to the originating groups." (let ((select-unreads (numbers-by-group gnus-newsgroup-unreads)) (select-reads (numbers-by-group - (gnus-info-read (gnus-get-info group)) 'range)) + (gnus-sorted-difference gnus-newsgroup-articles + gnus-newsgroup-unreads) + 'range)) (select-unseen (numbers-by-group gnus-newsgroup-unseen)) (gnus-newsgroup-active nil) mark-list) ;; collect the set of marked article lists categorized by -- Sean Whitton