unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* Convert text file to mbox file?
@ 2022-03-03 17:53 Dr. C. Baxter
  2022-03-03 18:07 ` Emanuel Berg via Users list for the GNU Emacs text editor
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Dr. C. Baxter @ 2022-03-03 17:53 UTC (permalink / raw)
  To: help-gnu-emacs


Hello,

In my rmail configuration, I have sent the variable
'mail-archive-file-name' to a local file 'sent'. All appeared to go well
for several months, but when I now try to read 'sent' via "M-x rmail-input"
I'm told that 'sent' is an Invalid mbox file. I think the problem may
have arisen when I edited and saved 'sent' as if it were an ordinary
text file. Is there anyway in which I can covert 'sent' back to an mbox
file?

Thanks.

Best wishes,

Colin Baxter.




^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Convert text file to mbox file?
  2022-03-03 17:53 Convert text file to mbox file? Dr. C. Baxter
@ 2022-03-03 18:07 ` Emanuel Berg via Users list for the GNU Emacs text editor
  2022-03-03 18:24 ` Eli Zaretskii
  2022-03-04  7:49 ` Jean Louis
  2 siblings, 0 replies; 6+ messages in thread
From: Emanuel Berg via Users list for the GNU Emacs text editor @ 2022-03-03 18:07 UTC (permalink / raw)
  To: help-gnu-emacs

Dr. C. Baxter wrote:

> In my rmail configuration, I have sent the variable
> 'mail-archive-file-name' to a local file 'sent'.
> All appeared to go well for several months, but when I now
> try to read 'sent' via "M-x rmail-input" I'm told that
> 'sent' is an Invalid mbox file. I think the problem may have
> arisen when I edited and saved 'sent' as if it were an
> ordinary text file. Is there anyway in which I can covert
> 'sent' back to an mbox file?

If it makes you feel better, several people have, uhm, tried:

  https://www.google.com/search?q=unix+mbox+file+repair&hl=en&ie=utf-8&oe=utf-8&gbv=1&ucbcb=1

-- 
underground experts united
https://dataswamp.org/~incal




^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Convert text file to mbox file?
  2022-03-03 17:53 Convert text file to mbox file? Dr. C. Baxter
  2022-03-03 18:07 ` Emanuel Berg via Users list for the GNU Emacs text editor
@ 2022-03-03 18:24 ` Eli Zaretskii
  2022-03-04  7:27   ` Colin Baxter
  2022-03-04  7:49 ` Jean Louis
  2 siblings, 1 reply; 6+ messages in thread
From: Eli Zaretskii @ 2022-03-03 18:24 UTC (permalink / raw)
  To: help-gnu-emacs

> From: "Dr. C. Baxter" <m43cap@yandex.com>
> Date: Thu, 03 Mar 2022 17:53:28 +0000
> 
> In my rmail configuration, I have sent the variable
> 'mail-archive-file-name' to a local file 'sent'. All appeared to go well
> for several months, but when I now try to read 'sent' via "M-x rmail-input"
> I'm told that 'sent' is an Invalid mbox file. I think the problem may
> have arisen when I edited and saved 'sent' as if it were an ordinary
> text file. Is there anyway in which I can covert 'sent' back to an mbox
> file?

My suggestion is to establish what exactly causes Rmail to signal this
error.  Set debug-on-error non-nil, and examine the backtrace; then
step with Edebug if needed.

Once you understand what exactly causes the error, I'm quite sure
repairing your archive will be easy.



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Convert text file to mbox file?
  2022-03-03 18:24 ` Eli Zaretskii
@ 2022-03-04  7:27   ` Colin Baxter
  2022-04-05 21:41     ` TRS-80
  0 siblings, 1 reply; 6+ messages in thread
From: Colin Baxter @ 2022-03-04  7:27 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: help-gnu-emacs

>>>>> Eli Zaretskii <eliz@gnu.org> writes:

    >> From: "Dr. C. Baxter" <m43cap@yandex.com> Date: Thu, 03 Mar 2022
    >> 17:53:28 +0000
    >> 
    >> In my rmail configuration, I have sent the variable
    >> 'mail-archive-file-name' to a local file 'sent'. All appeared to
    >> go well for several months, but when I now try to read 'sent' via
    >> "M-x rmail-input" I'm told that 'sent' is an Invalid mbox file. I
    >> think the problem may have arisen when I edited and saved 'sent'
    >> as if it were an ordinary text file. Is there anyway in which I
    >> can covert 'sent' back to an mbox file?

    > My suggestion is to establish what exactly causes Rmail to signal
    > this error.  Set debug-on-error non-nil, and examine the
    > backtrace; then step with Edebug if needed.

    > Once you understand what exactly causes the error, I'm quite sure
    > repairing your archive will be easy.

You're right, the repair was easy. During a previous edit, I had inadvertently
written several blank lines to the top of the archive file. I removed
these to obtain once again an mbox file.

Thanks.

Best wishes,

Colin Baxter.



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Convert text file to mbox file?
  2022-03-03 17:53 Convert text file to mbox file? Dr. C. Baxter
  2022-03-03 18:07 ` Emanuel Berg via Users list for the GNU Emacs text editor
  2022-03-03 18:24 ` Eli Zaretskii
@ 2022-03-04  7:49 ` Jean Louis
  2 siblings, 0 replies; 6+ messages in thread
From: Jean Louis @ 2022-03-04  7:49 UTC (permalink / raw)
  To: Dr. C. Baxter; +Cc: help-gnu-emacs

* Dr. C. Baxter <m43cap@yandex.com> [2022-03-03 20:59]:
> In my rmail configuration, I have sent the variable
> 'mail-archive-file-name' to a local file 'sent'. All appeared to go well
> for several months, but when I now try to read 'sent' via "M-x rmail-input"
> I'm told that 'sent' is an Invalid mbox file. I think the problem may
> have arisen when I edited and saved 'sent' as if it were an ordinary
> text file. Is there anyway in which I can covert 'sent' back to an mbox
> file?

I am not helpful in this comment here. It is of course a problem in
software. It may not be related to un-reliability of Mbox, though
maybe it is.

That is why I use Maildir format, and nothing else.

cr.yp.to/proto/maildir.html
http://cr.yp.to/proto/maildir.html

And yes, I have tried (last year last ltime) to be fast and efficient
with Emacs and e-mail. Compared to Mutt software, it was never
reliable, consistent, efficient and enough fast. And yes, I have tried
all of the packages like Rmail, MH for Emacs, Gnus (terrible),
Wonderwhat else...

And the Emacs handling of email never worked faster and more efficient
than Mutt, so I stick to Mutt and Maildir. The best setup for last 20
years.

The Mutt E-Mail Client
http://mutt.org/

-- 
Jean

Take action in Free Software Foundation campaigns:
https://www.fsf.org/campaigns

In support of Richard M. Stallman
https://stallmansupport.org/



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Convert text file to mbox file?
  2022-03-04  7:27   ` Colin Baxter
@ 2022-04-05 21:41     ` TRS-80
  0 siblings, 0 replies; 6+ messages in thread
From: TRS-80 @ 2022-04-05 21:41 UTC (permalink / raw)
  To: help-gnu-emacs

On 2022-03-04 02:27, Colin Baxter wrote:
> 
> You're right, the repair was easy. During a previous edit, I had 
> inadvertently
> written several blank lines to the top of the archive file. I removed
> these to obtain once again an mbox file.
> 

You already arrived at the solution.  However I just wanted to point out 
that both mbox and Maildir are quite simple file formats.  Mbox is 
essentially 'just a text file', albeit with some particular formatting.

Cheers,
TRS-80



^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2022-04-05 21:41 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-03-03 17:53 Convert text file to mbox file? Dr. C. Baxter
2022-03-03 18:07 ` Emanuel Berg via Users list for the GNU Emacs text editor
2022-03-03 18:24 ` Eli Zaretskii
2022-03-04  7:27   ` Colin Baxter
2022-04-05 21:41     ` TRS-80
2022-03-04  7:49 ` Jean Louis

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).