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: Unseen attribute doesn't get saved in rmail Date: Thu, 31 Dec 2020 15:03:54 +0100 Message-ID: <87sg7m3wdx.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="26518"; 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 Thu Dec 31 16:08:02 2020 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 1kuzYX-0006mP-NX for ged-emacs-devel@m.gmane-mx.org; Thu, 31 Dec 2020 16:08:01 +0100 Original-Received: from localhost ([::1]:50692 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kuzYW-0004aG-KP for ged-emacs-devel@m.gmane-mx.org; Thu, 31 Dec 2020 10:08:00 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:40016) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kuyYj-0006f9-QT for emacs-devel@gnu.org; Thu, 31 Dec 2020 09:04:09 -0500 Original-Received: from devianza.investici.org ([198.167.222.108]:25747) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kuyYh-0004u3-98 for emacs-devel@gnu.org; Thu, 31 Dec 2020 09:04:09 -0500 Original-Received: from mx2.investici.org (unknown [127.0.0.1]) by devianza.investici.org (Postfix) with ESMTP id 4D68yh1cQRz6v90 for ; Thu, 31 Dec 2020 14:03:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=autistici.org; s=stigmate; t=1609423436; bh=L93D2/MO0Hhv0QaG91ZpVt7OSkBsQw4D0jPjQ17VBXE=; h=From:To:Subject:Date:From; b=OpGvwMMThTyKKW3nOaZ0M7pPmQuG3VU5L4RZJj9Ys+PVozpEhLZL4JBhvsYiBp2W9 QZThaJTV6qEltAcwBEHmBmE5OG+hbKJMeAbM48ChWDbaDB6GQ6H4Euj36m0nF8x/Sj 36YXFUWkmhw+exg9KtEcCxuHBn3Po7V718c0m80s= Original-Received: from [198.167.222.108] (mx2.investici.org [198.167.222.108]) (Authenticated sender: andrea.monaco@autistici.org) by localhost (Postfix) with ESMTPSA id 4D68yh0GNmz6v8x for ; Thu, 31 Dec 2020 14:03:55 +0000 (UTC) Received-SPF: pass client-ip=198.167.222.108; envelope-from=andrea.monaco@autistici.org; helo=devianza.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, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Mailman-Approved-At: Thu, 31 Dec 2020 10:04:39 -0500 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:262162 Archived-At: Hello everyone, there's a behavior in rmail I can't quite understand. I never delete my mail, I just read it. So here's the problem: when some messages are read and marked as such, the modified flag of the RMAIL buffer apparently stays cleared, so Emacs doesn't offer to save it when I close the editor. This way I lose track of read mail every time. I think these are the relevant lines in rmail.el inside rmail-show-message-1: ;; Mark the message as seen, but preserve buffer modified flag. (let ((modiff (buffer-modified-p))) (rmail-set-attribute rmail-unseen-attr-index nil) (unless modiff (restore-buffer-modified-p modiff))) So the modified flag is explicitly cleared after reading a new message. Is there some reason I can't see for this behavior? Maybe we could add a configuration option to let the user choose. Let me know, Andrea Monaco