[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Recognize mbox files?

From: Stefan Monnier
Subject: Re: Recognize mbox files?
Date: Mon, 09 Feb 2009 20:34:27 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux)

>> Is it reliable enough to recognize mbox files that we could visit
>> them automatically in Rmail mode?

>    I don't think so.  Mbox files are lines that begin with "From ",
>    separated by arbitrary data.  There's not enough information to
>    autodetect them.

OTOH, the format of that From line is somewhat free, so we could
arrange to place some kind of cookie in it (maybe even "-*-rmail-*-"
could fit).

Note that we need to set not only the major-mode, but also the
coding-system (binary).

> What about assuming that rmail files always start witj "RMAIL" or
> "XMAIL" (and ignore case-sensitivity)? Then RMAIL.foo would be a RMAIL
> file, and xmail.123 would also be a rmail file.

Yes, a naming convention seems easier.  a ".mbox" extension seems like
an obvious choice as well.

> That would work for most normal cases.  That way if you open
> /com/mail/ams or some other mail spool file, RMAIL will not do
> anything funny with it.

It's important that if opened on a non-mbox file, Rmail shouldn't do
anything bad (e.g. it shouldn't modify the file).


reply via email to

[Prev in Thread] Current Thread [Next in Thread]