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.help Subject: Re: Open rmail summarized by specific label? Date: Thu, 21 Nov 2024 10:59:37 +0200 Message-ID: <86plmpq7wm.fsf@gnu.org> References: <878qtd57tx.fsf@mccd.space> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="1454"; mail-complaints-to="usenet@ciao.gmane.io" To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Thu Nov 21 10:00:48 2024 Return-path: Envelope-to: geh-help-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 1tE33O-0000Di-95 for geh-help-gnu-emacs@m.gmane-mx.org; Thu, 21 Nov 2024 10:00:46 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tE32b-0002ZH-Nw; Thu, 21 Nov 2024 03:59:57 -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 1tE32Z-0002Yp-7E for help-gnu-emacs@gnu.org; Thu, 21 Nov 2024 03:59:55 -0500 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 1tE32Y-0000Ek-V5 for help-gnu-emacs@gnu.org; Thu, 21 Nov 2024 03:59:54 -0500 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=xqJ/BQG700hPo9zGp9gPH05LKBLTbyHUufZgQfNKaI8=; b=MXkTUIsWbfT/ Q9sE7X/4749ktr4Lhya9XiRLeQaUV8mgYCSrEbjyqqigrz006z5OSILqr1gk7sZ72ujboR/4Zel/K Fx7ICxO0sWFVnVYJ5oJLpjDhF3kNXrlqgpUBpD7WBntf1CnMnwD5n6a21wjBbgCLTBuXogA/k4PM/ tnax5COjK5TQb9hpoWz8ZqZ7xvibkogc1L2EiOM502jUoZPPx0KiCB3ZnKag+0GqzYNPkKk0bYPHk jD2zYZ1DCz3dkGdlJk+YVnvUlPb0oRGGBpXaoYnEm6jtETgv8tLoDHe1oNuhxSjGoAjAadxhswDtW DgmzkKwb42IL8aLOKEsTqg==; In-Reply-To: <878qtd57tx.fsf@mccd.space> (message from Marc Coquand on Thu, 21 Nov 2024 10:06:50 +0200) X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.help:148364 Archived-At: > From: Marc Coquand > Date: Thu, 21 Nov 2024 10:06:50 +0200 > > > > No, I don't think so. If you set rmail-display-summary to a non-nil > > value, rmail-input will display a summary, but it always displays the > > summary of all the messages. However, rmail-input calls rmail, and > > rmail runs rmail-mode-hook, so maybe you could define your hook > > function which would generate the summary you want. > > Hmm, that could be an option. > > When rmail fetches new email, it also automatically opens unread email. > Once an email has been read, as I understand it, the unseen label gets > removed. > > So if I use that hook, I worry the following sequence will happen: > > 1. I run rmail > 2. rmail fetches new email, and opens the latest unseen message. > 3. The unseen label gets removed from that message. > 4. rmail-mode-hook runs, and my function proceeds to summarizes by > unseen messages. The latest message is never shown to me, as the unseen > label got removed before the hook run. > > This would result in me actually not seeing all the unseen messages, but > I am not sure what the sequence is. C-h v rmail-mode-hook only tells me > it is invoked when Rmail is invoked. What's to prevent your hook from using rmail-set-attribute to "unsee" the message shown by rmail, before you perform the summary?