From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: James Thomas via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#72949: Gnus sometimes reports new messages but not showing them on IMAP server, bug#72949: Gnus sometimes reports new messages but not showing them on IMAP server, bug#72949: Gnus sometimes reports new messages but not showing them on IMAP server Date: Mon, 16 Sep 2024 13:56:36 +0530 Message-ID: <86plp4ovgj.fsf@gmx.net> References: <87h6g7mm8r.fsf@debian-hx90.lan> <868qvx1xst.fsf@gmx.net> <861q1p1gg2.fsf@gmx.net> <87seu2xqpa.fsf@uwo.ca> <87frq2xh4c.fsf@uwo.ca> <86h6ah2q47.fsf@gmx.net> <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> <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> <87seu2xqpa.fsf@uwo.ca> <87frq2xh4c.fsf@uwo.ca> <871q1lw089.fsf@uwo.ca> Reply-To: James Thomas Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="30626"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: "72949@debbugs.gnu.org" <72949@debbugs.gnu.org> To: Dan Christensen Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Sep 16 10:28:08 2024 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 1sq75c-0007q5-0T for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 16 Sep 2024 10:28:08 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sq75L-0003VQ-2j; Mon, 16 Sep 2024 04:27:51 -0400 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 1sq75J-0003VH-W0 for bug-gnu-emacs@gnu.org; Mon, 16 Sep 2024 04:27:50 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sq75J-0001Dc-ME for bug-gnu-emacs@gnu.org; Mon, 16 Sep 2024 04:27:49 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:Date:References:In-Reply-To:From:To:Subject; bh=DrViUZaTxGVOfVW1zacL5/L7DdFiNbzg3GB5t2LTT4c=; b=HACa1l3H+hlgtYzH2PTQ5/ogi1oI5taAvnltm025yTiNiFr9lryOuLe1kuksRc2q/SZcwnhKc/1YI9tKvFtS8Ag528nyvASnaFwPCw8F0NQrhBUG7oI9NsHbd54Ch7/wqOS9DEjZILhy5s9s2PtfxzQcppAPh+OGuL1GbjyJ7qCr55oB72ZMRrEVNggwvnM8FcoaIiBo3tolkLnlXby8r9MwsG+AkDpiXk+Y8zZCJcNWJi91rU1Gs667RMQTR7ff24xC9AINmNdYN8V5miTeJl4uZAdp9102FRUouql4Brh07kIJD1w+cmyAu5dTzKMz5CP/VHlGbY8XTjs209qOGA==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1sq75W-0008WA-Ku for bug-gnu-emacs@gnu.org; Mon, 16 Sep 2024 04:28:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: James Thomas Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 16 Sep 2024 08:28:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 72949 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 72949-submit@debbugs.gnu.org id=B72949.172647522332635 (code B ref 72949); Mon, 16 Sep 2024 08:28:02 +0000 Original-Received: (at 72949) by debbugs.gnu.org; 16 Sep 2024 08:27:03 +0000 Original-Received: from localhost ([127.0.0.1]:51068 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sq74Z-0008UI-9f for submit@debbugs.gnu.org; Mon, 16 Sep 2024 04:27:03 -0400 Original-Received: from mout.gmx.net ([212.227.15.18]:54389) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sq74X-0008Tk-5r for 72949@debbugs.gnu.org; Mon, 16 Sep 2024 04:27:02 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmx.net; s=s31663417; t=1726475200; x=1727080000; i=jimjoe@gmx.net; bh=DrViUZaTxGVOfVW1zacL5/L7DdFiNbzg3GB5t2LTT4c=; h=X-UI-Sender-Class:From:To:Cc:Subject:In-Reply-To:References:Date: Message-ID:MIME-Version:Content-Type:cc:content-transfer-encoding: content-type:date:from:message-id:mime-version:reply-to:subject: to; b=bKulghrrkx5f4k1cS4h7o12gaKOD+jUV1VBb1V1Et/SYOUVKbclMeKsDTlATq8In 3QJKHA0AIlG601wLX3++8Ax2Tkq3w03rHSxThlut+38kxT+PGuqygxfkEFX1nwuJQ Gg5lX/sOk5Vrl9de6LDk3MXmYBwcQIbm0iL/PdAxUmW3PTPtIFXhndgmXu+Oeox9f AhOetM7JUDVf1G9Vvyb5D2sY6YsKA3/VpHbJXWshrZMMNi3ruvCxb0IpDabGkcWiG TrEnE2J7vqpU9d4ShIG+rmqjW4Q9BZPonaldl91AwwqjutTqfgifACGu31+JR6kNc z4msrM/fUU/osZTTsw== X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a Original-Received: from user-Inspiron-3493 ([117.206.139.239]) by mail.gmx.net (mrgmx004 [212.227.17.184]) with ESMTPSA (Nemesis) id 1MHXFr-1slQ5e3nMn-003hMO; Mon, 16 Sep 2024 10:26:40 +0200 In-Reply-To: <871q1lw089.fsf@uwo.ca> (Dan Christensen's message of "Sun, 15 Sep 2024 12:49:27 +0000, Sat, 14 Sep 2024 17:46:52 +0000, Sun, 15 Sep 2024 15:30:40 +0530") X-Provags-ID: V03:K1:4zMETUu8/5vWQxCV/3paXXVkQ68RfI4xzjhva5Pdhhyp3/5Iwuf LXWnjJ5vmD98Hhe3BqaFxhG3pizP6zev4jmw0Itc15jiUToZbEZuB14JwWhG+S8Wa954FM2 IOsc0h2CAcmxPczAhsGh0cq5H5XpHbTw+M/vvlvTCChHrPrXc9xMh65vmYYWzoAUkjM2JlT MM+8FTrjpo0usyqVK3Glw== UI-OutboundReport: notjunk:1;M01:P0:dPE0HZlus3I=;hCDyxnLuDc9ZG0G+2b6ljN9sgV8 HpllEEHMQYyBCZFCeVUyaahXdH36/cNiMOna2zlbzPOHyFU3W/aRU0yuGA69RA+O7EzQTnAnd yuvlZBfW71hzM+RpiuGLeM20PYlB+efyR0TtE32Ob+jddBxfmyRKQ4ZwtGvR4wxD+asdRXmt6 dDSqYNrU6eIpg+uzB92QvJ9aANW3IQkM/LeXnORoS+zdjfmxiiXHrfYoQu5q6CksyH+Ska6kt 8f3zn8u8LJpq3MHbT2eQUQHsWtDJia0RhzuqIvdb9T7xH5ghcm0ftaHMB2kP6CSefyszj7UqC 9y0e0pORIr7WHbq5ps8HC+r81dXvqcxhOJd42dGnErOcMg2cz9FTH29lm2lnERrDSiwCbsXLi v19+LBFTAMGcc3oAr8S9v3wQAKVeCsg9W13OUUCs14bId6FxBIkB9Y6F0kjNTT1arb9UxoVP7 mPJiseOu1iPGdWIv6peotp6S1YQ6IdIwftNwlSJcII1qSU6Dtv05Sh1zMX8vhsBQb7xC7ARD2 3YpuQybYqOs+8NLj++eMrK4eajm0IP5KCEuf/w+7iR298BHgin4A8XwW9cqQ4UA968jiTXQ6Y OUa2xRS2024aST3HkChM3/Gz8GQ49o+KbRAD+0m++scT1IxmONPYzYOW5SCSHGTcKIpvS0j7u +GlU19p/xJRQuehMb7nl7u1ymmndR6r+Qg+Bp/S7nR4I0nki7k79/C9lWf0TU+SC2ANFU/M6e qofPQvZCmbaEixs6QUDuVSt/28Qs9F49W/31QxbuEIPavVPinm/Yu/qYMLAzqSTJkKHQURwV 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:291878 Archived-At: 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@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