From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Xavier Maillard Newsgroups: gmane.emacs.devel Subject: Re: Recognize mbox files? Date: Wed, 18 Feb 2009 00:55:55 +0100 Organization: GNU's Not UNIX! Message-ID: <200902172355.n1HNttZ3022506@zogzog.maillard.mobi> Reply-To: Xavier Maillard NNTP-Posting-Host: lo.gmane.org X-Trace: ger.gmane.org 1234914890 24200 80.91.229.12 (17 Feb 2009 23:54:50 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 17 Feb 2009 23:54:50 +0000 (UTC) Cc: cyd@stupidchicken.com, stephen@xemacs.org, rms@gnu.org, emacs-devel@gnu.org To: "Alfred M\. Szmidt" Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Feb 18 00:56:05 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 1LZZnH-0007My-D3 for ged-emacs-devel@m.gmane.org; Wed, 18 Feb 2009 00:56:03 +0100 Original-Received: from localhost ([127.0.0.1]:52093 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LZZlx-0001eA-DK for ged-emacs-devel@m.gmane.org; Tue, 17 Feb 2009 18:54:41 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LZZl6-0000xi-77 for emacs-devel@gnu.org; Tue, 17 Feb 2009 18:53:48 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LZZl5-0000wr-JW for emacs-devel@gnu.org; Tue, 17 Feb 2009 18:53:47 -0500 Original-Received: from [199.232.76.173] (port=48589 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LZZl5-0000wf-Cq for emacs-devel@gnu.org; Tue, 17 Feb 2009 18:53:47 -0500 Original-Received: from ded1.conovae.com ([88.191.52.166]:34476 helo=mf1.conovae.net) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1LZZl2-0004Gn-Ny; Tue, 17 Feb 2009 18:53:44 -0500 Original-Received: by mf1.conovae.net (Postfix, from userid 10) id 4FE2C2613FA; Wed, 18 Feb 2009 00:51:36 +0100 (CET) Original-Received: from zogzog.maillard.mobi (IDENT:1000@localhost [127.0.0.1]) by zogzog.maillard.mobi (8.14.3/8.13.8) with ESMTP id n1HNtupt022508; Wed, 18 Feb 2009 00:55:56 +0100 Original-Received: (from xma@localhost) by zogzog.maillard.mobi (8.14.3/8.13.8/Submit) id n1HNttZ3022506; Wed, 18 Feb 2009 00:55:55 +0100 X-Authentication-Warning: zogzog.maillard.mobi: xma set sender to xma@gnu.org using -f In-reply-to: "ams@gnu.org"'s message of Sat, 14 Feb 2009 22:52:30 +0100 User-Agent: Rmail GNU emacs 23.0 on Slackware 12.2.0 Jabber-ID: xma01@jabber.fr Original-References: X-UUCPssh-Information: Please contact the ISP for more information X-UUCPssh: Found to be clean X-UUCPssh-SpamCheck: not spam, SpamAssassin (not cached, score=-4.399, required 6, autolearn=not spam, ALL_TRUSTED -1.80, BAYES_00 -2.60) X-UUCPssh-From: xma@gnu.org X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 3) 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:109153 Archived-At: 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. That sounds like a good idea. It should be enough to check the first message for that header, since a previous visit with Rmail will necessarily have displayed the first message and put that header into it. This mbox detection problem sounds like what we are trying to solve with bug#2222 (Labels). Launching rmail would automatically add a message on top of the mbox file, adding special rmail headers and thus making this mbox file detection really easy (if grepping for rmail headers on the first message). We would have solved two problems that way. I am strongly in favour of this approach. Still we need to find a consensus to the question: to hide or not to hide. How would thiis work for "C-x C-f ~/RMAIL.foo"? Is the suggestion to do this check on all files one opens? I think this would be very bad... See below. But I guess emacs is already doing such check each time it opens a file, no ? Using file variables is the right solution. This is what we have discussed using normal local variables, so C-x C-f would work or I did not understand all the discussion :/ The alternative would be to use a special suffix for the rmail files and add it to the auto-mode-alist variable but I find it less useful since we cannot offer user the possibility not to open a mbox file in rmail-mode. Xavier -- http://www.gnu.org http://www.april.org http://www.lolica.org