From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: Recognize mbox files? Date: Mon, 09 Feb 2009 20:34:27 -0500 Message-ID: References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1234229687 14142 80.91.229.12 (10 Feb 2009 01:34:47 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 10 Feb 2009 01:34:47 +0000 (UTC) Cc: Chong Yidong , rms@gnu.org, emacs-devel@gnu.org To: ams@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Feb 10 02:36:02 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 1LWhXd-00073C-1W for ged-emacs-devel@m.gmane.org; Tue, 10 Feb 2009 02:36:01 +0100 Original-Received: from localhost ([127.0.0.1]:56511 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LWhWJ-00033s-J6 for ged-emacs-devel@m.gmane.org; Mon, 09 Feb 2009 20:34:39 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LWhWF-00033g-6K for emacs-devel@gnu.org; Mon, 09 Feb 2009 20:34:35 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LWhWC-00033R-TC for emacs-devel@gnu.org; Mon, 09 Feb 2009 20:34:34 -0500 Original-Received: from [199.232.76.173] (port=51053 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LWhWC-00033O-NG for emacs-devel@gnu.org; Mon, 09 Feb 2009 20:34:32 -0500 Original-Received: from ironport2-out.pppoe.ca ([206.248.154.182]:15914 helo=ironport2-out.teksavvy.com) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1LWhWA-00050G-79; Mon, 09 Feb 2009 20:34:30 -0500 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: ApsEAFhokElFxIvi/2dsb2JhbACBbs9lhBoGgyA X-IronPort-AV: E=Sophos;i="4.38,182,1233550800"; d="scan'208";a="33637793" Original-Received: from 69-196-139-226.dsl.teksavvy.com (HELO pastel.home) ([69.196.139.226]) by ironport2-out.teksavvy.com with ESMTP; 09 Feb 2009 20:34:28 -0500 Original-Received: by pastel.home (Postfix, from userid 20848) id DCBCD806C; Mon, 9 Feb 2009 20:34:27 -0500 (EST) In-Reply-To: (Alfred M. Szmidt's message of "Mon, 09 Feb 2009 19:38:24 +0100") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux) X-detected-operating-system: by monty-python.gnu.org: Genre and OS details not recognized. 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:108919 Archived-At: >> 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. Agreed. 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). Stefan