From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: rmail-total-messages has two different values, one is wrong Date: Thu, 27 Oct 2022 20:04:56 +0300 Message-ID: <83fsf9kxjb.fsf@gnu.org> References: <878rl2i8dp.fsf@autistici.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="24879"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel@gnu.org To: Andrea Monaco Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Thu Oct 27 19:08:21 2022 Return-path: Envelope-to: ged-emacs-devel@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 1oo6Mf-0006CH-8c for ged-emacs-devel@m.gmane-mx.org; Thu, 27 Oct 2022 19:08:21 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oo6Jr-0004Jg-7w; Thu, 27 Oct 2022 13:05:27 -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 1oo6JX-0004As-8H for emacs-devel@gnu.org; Thu, 27 Oct 2022 13:05:08 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oo6JU-000507-PV; Thu, 27 Oct 2022 13:05:05 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=9ol2ZhSiJeft3wW2ytGXevXEHGlor/DR5suIfG6iCgs=; b=MYNUJVBRYYuc 8K8myoEKFUqRYZvErrJzzWcAnpcmvZaTYhI/AejIlqLA9pVb8fuoJUgCilIZTc3tsSNkZ6PPlAli5 8qYg1rjFbdRc/kiDyVperKtKYsYSuaVUbrsFz/am3qhDaxA0h+ylWiEhXtnaWAcVSz5WsIQyPU8L/ TgPxZMD1O2RHe27FokgcfmUbfrht2lElWqXhXH6swc/w+lkV3Cs4DI4RV4Nu0e9yLe08j1Qrik8iT Dzo/TeLhLXZUFDp9XNCwJ/iGrbwNY5STiX4sdMRvSGs5TdD4jx1dvfMqGNwof7ea9pzrMmAyse25W 8xNTydpnL5puwWJzEnXrZw==; Original-Received: from [87.69.77.57] (helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oo6JT-00007z-Cb; Thu, 27 Oct 2022 13:05:04 -0400 In-Reply-To: <878rl2i8dp.fsf@autistici.org> (message from Andrea Monaco on Wed, 26 Oct 2022 23:26:42 +0200) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: "Emacs-devel" Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:298630 Archived-At: > From: Andrea Monaco > Date: Wed, 26 Oct 2022 23:26:42 +0200 > > > When I evaluate these forms, I get two different values: > > (with-current-buffer "RMAIL" > rmail-total-messages) -> 4805 > > (with-current-buffer "RMAIL-summary" > rmail-total-messages) -> 4457 > > > The first one is correct and in fact the summary has 4805 lines. The > second one is wrong. Why? This caused me some delay while working on a > patch. I conjecture that the second binding is not updated when new > mail is loaded. It is supposed to happen inside rmail-select-summary, which is called from rmail-get-new-mail-1. Can you step through it and see why it doesn't update the count?