From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Alfred M\. Szmidt" Newsgroups: gmane.emacs.devel Subject: Re: Recognize mbox files? Date: Thu, 12 Feb 2009 09:16:36 +0100 Message-ID: <1234426596.076271.2586.nullmailer@beryx.hq.kred> Reply-To: ams@gnu.org NNTP-Posting-Host: lo.gmane.org X-Trace: ger.gmane.org 1234426721 21618 80.91.229.12 (12 Feb 2009 08:18:41 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 12 Feb 2009 08:18:41 +0000 (UTC) Cc: eliz@gnu.org, rms@gnu.org, emacs-devel@gnu.org To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Feb 12 09:19:55 2009 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1LXWnY-0007JY-Da for ged-emacs-devel@m.gmane.org; Thu, 12 Feb 2009 09:19:52 +0100 Original-Received: from localhost ([127.0.0.1]:57233 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LXWmE-0003VS-Gl for ged-emacs-devel@m.gmane.org; Thu, 12 Feb 2009 03:18:30 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LXWkn-000386-Al for emacs-devel@gnu.org; Thu, 12 Feb 2009 03:17:01 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LXWkl-00037K-K8 for emacs-devel@gnu.org; Thu, 12 Feb 2009 03:17:00 -0500 Original-Received: from [199.232.76.173] (port=54463 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LXWkl-000379-Em for emacs-devel@gnu.org; Thu, 12 Feb 2009 03:16:59 -0500 Original-Received: from mx20.gnu.org ([199.232.41.8]:3756) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1LXWkg-0001ry-2R; Thu, 12 Feb 2009 03:16:54 -0500 Original-Received: from hq.kreditor.se ([213.136.42.58] helo=auxid.hq.kred) by mx20.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1LXWkf-000352-Cn; Thu, 12 Feb 2009 03:16:53 -0500 Original-Received: by auxid.hq.kred (Postfix, from userid 118) id A4B7D13796A1; Thu, 12 Feb 2009 09:16:36 +0100 (CET) Original-Received: from beryx.hq.kred (unknown [10.16.0.106]) by auxid.hq.kred (Postfix) with SMTP id 6A71013795F8; Thu, 12 Feb 2009 09:16:36 +0100 (CET) Original-Received: (nullmailer pid 2587 invoked by uid 1000); Thu, 12 Feb 2009 08:16:36 -0000 In-reply-to: message from Stefan Monnier on Thu, 12 Feb 2009 00:15:56 -0500 Original-References: X-detected-kernel: by mx20.gnu.org: Linux 2.6 (newer, 3) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:109016 Archived-At: >> >> Otherwise, Rmail will have to be considered risky for use by mail >> >> admins. >> > Heh, what it does nowadays is nothing compared with what it did before >> > the mbox merge: it would convert the file to Babyl! How's that for >> > ``risky''? >> >> But *when* did it do it? Would it do it, just by C-x C-f RET? > The conversion happened when you turned on rmail-mode. If C-x C-f did > that automatically, the conversion happened automatically just by > typing C-x C-f. But could C-x C-f do that "by accident"? Anyway, even if it could, we want to be more careful now. I think the idea of checking the presence of RMAIL tags before allowing to modify the buffer is a good plan. There seems to be confusion about how rmail work(s/ed). A RMAIL/BABYL file contains a header that specifies the mode of the file, so when you open such files (C-x C-f), you will get the file in rmail-mode. If you opened a random mbox file, no conversion occurs. If you type M-x rmail, rmail will read the mail spool, and save the content to ~/RMAIL, converting the result to BABYL. When a buffer was converted to BABYL, the file was never saved automatically. This was, I found anyway, useful for looking at mbox files where you could then just use rmail to navigate th file, disgarding the conversion later. rmail would _never_ convert a file to BABYL unless the user explicitly commanded emacs to do so, by invoking M-x rmail, or C-u M-x rmail. Infact, a solution to the whole problem is simple. Upon adding headers, add the following header to the first message: X-RMAIL-MODE: -*- rmail -*- The file will then be handled by Emacs correctly, when the user does a C-x C-f.