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.bugs Subject: bug#65071: 29.1; RMAIL changed on disk leads to rmail-error-bad-format Date: Sat, 05 Aug 2023 13:52:00 +0300 Message-ID: <83sf8xsqwf.fsf@gnu.org> References: Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="5371"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 65071@debbugs.gnu.org To: emacs-bug@rulnick.com Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Aug 05 12:52:14 2023 Return-path: Envelope-to: geb-bug-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 1qSEtJ-0001Bg-B6 for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 05 Aug 2023 12:52:13 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qSEtA-0007ua-LB; Sat, 05 Aug 2023 06:52:04 -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 1qSEt8-0007sn-NM for bug-gnu-emacs@gnu.org; Sat, 05 Aug 2023 06:52:02 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qSEt8-0003Xy-Ek for bug-gnu-emacs@gnu.org; Sat, 05 Aug 2023 06:52:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qSEt8-000570-BD for bug-gnu-emacs@gnu.org; Sat, 05 Aug 2023 06:52:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 05 Aug 2023 10:52:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 65071 X-GNU-PR-Package: emacs Original-Received: via spool by 65071-submit@debbugs.gnu.org id=B65071.169123271319625 (code B ref 65071); Sat, 05 Aug 2023 10:52:02 +0000 Original-Received: (at 65071) by debbugs.gnu.org; 5 Aug 2023 10:51:53 +0000 Original-Received: from localhost ([127.0.0.1]:55790 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qSEsy-00056S-KO for submit@debbugs.gnu.org; Sat, 05 Aug 2023 06:51:52 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:37212) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qSEsw-00056D-UY for 65071@debbugs.gnu.org; Sat, 05 Aug 2023 06:51:51 -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 1qSEsr-0003X7-CD; Sat, 05 Aug 2023 06:51:45 -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=AQQkhMf/iabOahaGoyLfU7rY14WNizn3VETC2HNxjQA=; b=chXqnspWU8sf cJQJvoHyFd+irR66EzhJwGu08F3AorV6hWqK4vBsc4ZEoldottd5SIedC9o4wjAkLdwq4P4sYd7b4 VuHvPcw7FyiPK6HNoz1mAmMHRBip57BqyV2JV5Y7C2dtjDBL5jhdR+wChThuS/zJDIGIg2+o404Nu 88uH80ZPteySrEHwXTxemdYHyAnJdQsGdcwOr/3h7OkGzyyx0mVfWIRgYpqeZq/jpMpSii6y6zkqk nGQR/L08+cFzvRm3LEFXwJILOG9F/BXx43Qyx+pB6PDvTKqWDZaqWdg4WcsyWkVII1OtrJGzRp6eF mtKNAzHrTeYNH319XLc33g==; 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 1qSEsq-0001Hm-SG; Sat, 05 Aug 2023 06:51:45 -0400 In-Reply-To: (emacs-bug@rulnick.com) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:266766 Archived-At: > From: emacs-bug@rulnick.com > Cc: 65071@debbugs.gnu.org > Date: Sat, 05 Aug 2023 06:31:10 -0400 > > Eli Zaretskii writes: > > >> From: > >> Date: Fri, 04 Aug 2023 14:18:52 -0400 > >> > >> In Emacs 29.1, starting with no ~/RMAIL file and empty primary mail > >> spool file ('$' indicates command line terminal prompt outside Emacs): > >> > >> $ mail me@foo ... # send a message to myself > >> > >> emacs -Q > >> > >> M-x RMAIL # retrieves/reads message > >> > >> $ cat /dev/null > ~/RMAIL # clear (or otherwise modify) RMAIL file > >> > >> $ mail me@foo ... # send another message to myself > >> > >> M-x RMAIL > >> > >> "File RMAIL changed on disk. Reread from disk? (yes or no) " yes > >> > >> "rmail-error-bad-format: Message is not a valid RFC 822 (or later) > >> message" and: > >> > >> mode changes from RMAIL to fundamental > >> > >> ~/RMAIL file on disk looks good (proper RFC 822 file) > >> > >> ~/RMAIL file as visited in buffer looks bad, can be seen (e.g., > >> upon immediate save) to be missing top "From " and other header > >> lines ("Return-Path:", "Received:", etc.) > > > > Does using "M-x revert-buffer RET" avoid the problem? > > > > In any case, this is not how you are supposed to read new email into > > an existing Rmail buffer. You are supposed to use the 'g' command. > > 1. M-x revert-buffer RET does not avoid or solve the problem completely; > the contents from disk appear to be restored as expected but the > buffer remains in Fundamental mode. However, following this with > RMAIL-mode RET does appear to at least be a fix. > > 2. Yes, I should have said 'g' rather than 'M-x rmail RET' in the second > instance. The bug report applies in this case as well. Then I'm sorry, I don't understand the recipe, because I cannot reproduce this on my system. After $ cat /dev/null > ~/RMAIL the ~/RMAIL file is empty, right? And the Emacs session that used that file was terminated, i.e. Emacs doesn't run when you clear the ~/RMAIL file? Then you do "M-x RMAIL"? But it should be "M-x rmail", lower-case, right? Or is the command something else, like C-u M-x rmail RET ~/RMAIL RET ? And how do you modify the recipe to use the 'g' command? can you show the recipe with 'g' instead of a new "M-x rmail".