From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-1.8 required=5.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,RCVD_IN_DNSWL_MED,RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL autolearn=ham autolearn_force=no version=3.4.4 Received: from mx1.math.uh.edu (mx1.math.uh.edu [129.7.128.32]) by inbox.vuxu.org (Postfix) with ESMTP id 548432F6E2 for ; Sat, 14 Sep 2024 16:20:37 +0200 (CEST) Received: from lists1.math.uh.edu ([129.7.128.208]) by mx1.math.uh.edu with esmtps (TLS1.3) tls TLS_AES_256_GCM_SHA384 (Exim 4.98) (envelope-from ) id 1spTdQ-0000000DlQN-3gLT for ml@inbox.vuxu.org; Sat, 14 Sep 2024 09:20:29 -0500 Received: from lists1.math.uh.edu ([127.0.0.1] helo=lists.math.uh.edu) by lists1.math.uh.edu with smtp (Exim 4.97.1) (envelope-from ) id 1spTdP-000000042Q7-3rTD for ml@inbox.vuxu.org; Sat, 14 Sep 2024 09:20:23 -0500 Received: from mx1.math.uh.edu ([129.7.128.32]) by lists1.math.uh.edu with esmtp (Exim 4.97.1) (envelope-from ) id 1spTdM-000000042Py-3PG0 for ding@lists.math.uh.edu; Sat, 14 Sep 2024 09:20:20 -0500 Received: from quimby.gnus.org ([95.216.78.240]) by mx1.math.uh.edu with esmtps (TLS1.3) tls TLS_AES_256_GCM_SHA384 (Exim 4.98) (envelope-from ) id 1spTdL-0000000DlPt-1onw for ding@lists.math.uh.edu; Sat, 14 Sep 2024 09:20:20 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:Mime-Version:References:Message-ID:Date:Subject: From:To:Sender:Reply-To:Cc:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=pEv/es0YxBpi7Eu2zNd9xhH39gJqjJNGNw9xMyxOm68=; b=sZc5krYy0lRVisymAEnqzJUQ2S ou82HK3YXYS3g3yEPWCvl2cno/R9eMYCJ2Ezewb/QbPATHveNR0RokYLu+3ToEbW0muuWweQWnbqB 3aAi+G5LrqSNn1VHXJh/AWsHGGxntTNi7pDWy3EyoI4kxaZRhk0RJF6C6o74EYoWPkvs=; Received: from ciao.gmane.io ([116.202.254.214]) by quimby.gnus.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1spTdD-00076P-J3 for ding@gnus.org; Sat, 14 Sep 2024 16:20:14 +0200 Received: from list by ciao.gmane.io with local (Exim 4.92) (envelope-from ) id 1spTdC-000AJV-0V for ding@gnus.org; Sat, 14 Sep 2024 16:20:10 +0200 X-Injected-Via-Gmane: http://gmane.org/ Mail-Followup-To: ding@gnus.org To: ding@gnus.org From: Dan Christensen Subject: Re: bug#72949: Gnus sometimes reports new messages but not showing them on IMAP server Date: Sat, 14 Sep 2024 10:20:01 -0400 Message-ID: <87seu2xqpa.fsf@uwo.ca> References: <87h6g7mm8r.fsf@debian-hx90.lan> <868qwar3yn.fsf@gmx.net> <86h6ankmm6.fsf@gmx.net> <87r09q1i0s.fsf@uwo.ca> <868qvx1xst.fsf@gmx.net> <861q1p1gg2.fsf@gmx.net> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" User-Agent: Gnus/5.13 (Gnus v5.13) Cancel-Lock: sha1:s5Fk7nHGYvANvnYaaZ/82HMSOvY= Mail-Copies-To: never List-ID: Precedence: bulk --=-=-= Content-Type: text/plain 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 --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=nnimap.patch diff --git a/lisp/gnus/nnimap.el b/lisp/gnus/nnimap.el index 17a55f98..cdd9f01f 100644 --- a/lisp/gnus/nnimap.el +++ b/lisp/gnus/nnimap.el @@ -918,10 +918,10 @@ nnimap-request-group (nnimap-finish-retrieve-group-infos server info sequences t) (setq active (nth 2 (assoc group nnimap-current-infos))))) - (setq active (or active '(0 . 1))) + (setq active (or active '(1 . 0))) (erase-buffer) (insert (format "211 %d %d %d %S\n" - (- (cdr active) (car active)) + (max (1+ (- (cdr active) (car active))) 0) (car active) (cdr active) group)) --=-=-=--