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: Unseen attribute doesn't get saved in rmail Date: Sat, 09 Jan 2021 09:44:22 +0200 Message-ID: <83mtxiimg9.fsf@gnu.org> References: <87eeivunad.fsf@autistici.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="25175"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel@gnu.org To: "Andrea G. Monaco" Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sat Jan 09 08:45:30 2021 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 1ky8wC-0006Op-J0 for ged-emacs-devel@m.gmane-mx.org; Sat, 09 Jan 2021 08:45:28 +0100 Original-Received: from localhost ([::1]:56948 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ky8wB-0002UV-3l for ged-emacs-devel@m.gmane-mx.org; Sat, 09 Jan 2021 02:45:27 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:38156) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ky8v4-00021y-KJ for emacs-devel@gnu.org; Sat, 09 Jan 2021 02:44:18 -0500 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:56113) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ky8v3-0008Re-8Q; Sat, 09 Jan 2021 02:44:17 -0500 Original-Received: from 84.94.185.95.cable.012.net.il ([84.94.185.95]:2050 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1ky8v2-0002hi-OS; Sat, 09 Jan 2021 02:44:17 -0500 In-Reply-To: <87eeivunad.fsf@autistici.org> (andrea.monaco@autistici.org) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:262786 Archived-At: > From: "Andrea G. Monaco" > Date: Fri, 08 Jan 2021 22:33:14 +0100 > > > > Why does it matter for your purposes? > > I usually don't delete my mail, I just read it, so it's important for me > to keep track of read mail. For this use case, which I think is pretty > common, clearing the unseen flag in a message should set the modified > flag for the RMAIL buffer. > > Otherwise I have to manually set the flag in order to save the file, if > I understand correctly. That seems like an unnecessary workaround. That's not what I asked about. You are describing your original motivation for raising this issue, but I was specifically asking about this part of your response to my proposal of a solution: > But I wonder if that workaround is enough: I saw that the hook is called > at the end of the function rmail-show-message-1, but after the snippet > that I posted the information I care about is lost: we don't know if the > mail was just read for the first time or not; so we can't set the > modified flag meaningfully. I'm asking why is it important for your purposes to know whether the mail was read for the first time or not. Because if it isn't very important, the solution I proposed should work for you. In general, your use case is very unusual one, so much so that I was originally certain that's not the behavior I see, because I never read any batch of new messages without deleting or filing away at least one of them. That's the reason Rmail doesn't already have the feature you want: I guess no one else uses it as you do. (It means, btw, that your inbox is growing without limitation, which is also not a good idea.)