From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: "Andrea G. Monaco" Newsgroups: gmane.emacs.devel Subject: Re: Unseen attribute doesn't get saved in rmail Date: Sat, 02 Jan 2021 21:05:26 +0100 Message-ID: <87czyn6r5l.fsf@autistici.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="14947"; mail-complaints-to="usenet@ciao.gmane.io" To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sat Jan 02 21:09:55 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 1kvnDn-0003o9-6Z for ged-emacs-devel@m.gmane-mx.org; Sat, 02 Jan 2021 21:09:55 +0100 Original-Received: from localhost ([::1]:34692 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kvnDm-0001ea-1f for ged-emacs-devel@m.gmane-mx.org; Sat, 02 Jan 2021 15:09:54 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:34912) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kvn9d-0006S8-T8 for emacs-devel@gnu.org; Sat, 02 Jan 2021 15:05:37 -0500 Original-Received: from confino.investici.org ([2a00:c38:11e:ffff::a020]:57809) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kvn9b-0007eN-Ry for emacs-devel@gnu.org; Sat, 02 Jan 2021 15:05:37 -0500 Original-Received: from mx1.investici.org (unknown [127.0.0.1]) by confino.investici.org (Postfix) with ESMTP id 4D7Xtv2ndRz115T for ; Sat, 2 Jan 2021 20:05:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=autistici.org; s=stigmate; t=1609617927; bh=qHHrGIUC7IKin+g/C0I0oN0XHV/l2luKguHdN2kIqug=; h=From:To:Subject:Date:From; b=Aa0Mj5Krqf+R82HCvpUHaWONtfQxqcae2rnkZSldk941eSUW/BThofHxGXLe4ahnl Q2nUCqQlB+h1L+xDO3XjWHSSPYD++cnMgY0Fgs01Ma7UWF3Q9YFK6a8kbz+VWm0+Za ZN3khOXIn+VUK9M+FEQNDLoVdLbu+gsh+qVbdFnQ= Original-Received: from [212.103.72.250] (mx1.investici.org [212.103.72.250]) (Authenticated sender: andrea.monaco@autistici.org) by localhost (Postfix) with ESMTPSA id 4D7Xtv27vVz115K for ; Sat, 2 Jan 2021 20:05:27 +0000 (UTC) Received-SPF: pass client-ip=2a00:c38:11e:ffff::a020; envelope-from=andrea.monaco@autistici.org; helo=confino.investici.org X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action 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:262333 Archived-At: > I think you can use rmail-show-message-hook to call a function that > sets the buffer's modified flag, then reading a message will leave > that set. Thanks, I didn't know about that hook. 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. Is that correct? Andrea Monaco