[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#65071: 29.1; RMAIL changed on disk leads to rmail-error-bad-format
From: |
emacs-bug |
Subject: |
bug#65071: 29.1; RMAIL changed on disk leads to rmail-error-bad-format |
Date: |
Sat, 05 Aug 2023 06:31:10 -0400 |
Eli Zaretskii <eliz@gnu.org> writes:
>> From: <emacs-bug@rulnick.com>
>> 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.