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 DBA9E2EB40 for ; Sat, 14 Sep 2024 18:28:58 +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 1spVdp-0000000Dpgq-0d9z for ml@inbox.vuxu.org; Sat, 14 Sep 2024 11:28:57 -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 1spVdn-000000042dT-303c for ml@inbox.vuxu.org; Sat, 14 Sep 2024 11:28:55 -0500 Received: from mx2.math.uh.edu ([129.7.128.33]) by lists1.math.uh.edu with esmtp (Exim 4.97.1) (envelope-from ) id 1spVdk-000000042dK-3mrt for ding@lists.math.uh.edu; Sat, 14 Sep 2024 11:28:52 -0500 Received: from quimby.gnus.org ([95.216.78.240]) by mx2.math.uh.edu with esmtps (TLS1.3) tls TLS_AES_256_GCM_SHA384 (Exim 4.98) (envelope-from ) id 1spVdj-0000000DJCG-2ku5 for ding@lists.math.uh.edu; Sat, 14 Sep 2024 11:28:52 -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=/4WZMuIkhGALvT3khPnTv03z4Ngr1QvCJYWzRzxo0so=; b=lHn8qKcVYMNS7GHi995+VdzHnC 52QaoASVrBJMkWZyTPFN/REmSixYh6jt+xCPrpsun7ywg2sSsLDatcFioov4lcQHB10RzPp+TRsv7 X9qMGes6oHyuX/Qnx5RkXxhIpOkl0qhuWsrq76TxVNfdbbqNH8OLCHDWNJWwht7R7roU=; 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 1spVdb-0008VP-CG for ding@gnus.org; Sat, 14 Sep 2024 18:28:46 +0200 Received: from list by ciao.gmane.io with local (Exim 4.92) (envelope-from ) id 1spVda-0000rU-4T for ding@gnus.org; Sat, 14 Sep 2024 18:28:42 +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 12:28:37 -0400 Message-ID: <87ldzuxkqy.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> <87seu2xqpa.fsf@uwo.ca> Mime-Version: 1.0 Content-Type: text/plain User-Agent: Gnus/5.13 (Gnus v5.13) Cancel-Lock: sha1:ztGzNOxUFJ9J6E74MZ+VyGVmnZo= Mail-Copies-To: never List-ID: Precedence: bulk An alternative to (max (1+ (- (cdr active) (car active))) 0) would be (range-length active), I believe. (Untested.) That function assume that the range is well-formed, so doesn't use max to avoid negative numbers, but that's probably fine. (range-length '(1 . 0)) does correctly return 0. Dan