From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Stephen J. Turnbull" Newsgroups: gmane.emacs.devel Subject: Re: Recognize mbox files? Date: Wed, 11 Feb 2009 13:51:51 +0900 Message-ID: <87d4dpd194.fsf@xemacs.org> References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1234328085 18483 80.91.229.12 (11 Feb 2009 04:54:45 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 11 Feb 2009 04:54:45 +0000 (UTC) Cc: ams@gnu.org, cyd@stupidchicken.com, emacs-devel@gnu.org To: rms@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Feb 11 05:55:59 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 1LX78f-0003Em-VY for ged-emacs-devel@m.gmane.org; Wed, 11 Feb 2009 05:55:58 +0100 Original-Received: from localhost ([127.0.0.1]:45587 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LX77M-00066X-F3 for ged-emacs-devel@m.gmane.org; Tue, 10 Feb 2009 23:54:36 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LX77I-00066I-D3 for emacs-devel@gnu.org; Tue, 10 Feb 2009 23:54:32 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LX77H-000664-BC for emacs-devel@gnu.org; Tue, 10 Feb 2009 23:54:31 -0500 Original-Received: from [199.232.76.173] (port=33388 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LX77H-000661-7U for emacs-devel@gnu.org; Tue, 10 Feb 2009 23:54:31 -0500 Original-Received: from mtps02.sk.tsukuba.ac.jp ([130.158.97.224]:35634) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1LX77E-0001aP-6g; Tue, 10 Feb 2009 23:54:28 -0500 Original-Received: from uwakimon.sk.tsukuba.ac.jp (uwakimon.sk.tsukuba.ac.jp [130.158.99.156]) by mtps02.sk.tsukuba.ac.jp (Postfix) with ESMTP id 8EDEF7FFA; Wed, 11 Feb 2009 13:54:19 +0900 (JST) Original-Received: by uwakimon.sk.tsukuba.ac.jp (Postfix, from userid 1000) id DA9B61A261D; Wed, 11 Feb 2009 13:51:51 +0900 (JST) In-Reply-To: X-Mailer: VM 8.0.12-devo-585 under 21.5 (beta28) "fuki" 83e35df20028+ XEmacs Lucid (x86_64-unknown-linux) 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:108978 Archived-At: Richard M Stallman writes: > I normally use *.xmail for these files. > I think others use *.mbox. > But the general idea would work. As long as Rmail munges the file without asking, autodetecting by filename is a bad idea, because far too many applications use mbox files as an interchange format, and there's no fixed convention for naming them, although "mbox" often appears somewhere in the name. You could use something unlikely to mean "I'm an mbox file", although that sorta defeats the purpose. Eg, something like "auto-open-me-in-rmail-mode.$SERIAL_NO" would be OK. A better idea would be for Rmail to detect whether it has already munged the file (a quick grep for "^X-RMAIL-.*" headers should do) and if not make the buffer read-only. When it needs to edit the buffer, it can ask the user whether that's OK. That should be the default (ie, failsafe) behavior. If you want to have an option to turn off that protection, it would be OK. Otherwise, Rmail will have to be considered risky for use by mail admins.