From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Alexander Pohoyda Newsgroups: gmane.emacs.devel Subject: Re: New mail-related routines Date: 19 Oct 2004 20:37:39 +0200 Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Message-ID: <87oeiyzh8s.fsf@oak.pohoyda.family> References: <200410182157.i9ILvjln000739@oak.pohoyda.family> <87wtxn89vf.fsf@oak.pohoyda.family> NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1098211098 1680 80.91.229.6 (19 Oct 2004 18:38:18 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 19 Oct 2004 18:38:18 +0000 (UTC) Cc: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Oct 19 20:38:06 2004 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1CJys2-0008Pb-00 for ; Tue, 19 Oct 2004 20:38:06 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1CJyzM-000200-Gb for ged-emacs-devel@m.gmane.org; Tue, 19 Oct 2004 14:45:41 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33) id 1CJyzE-0001z8-Rb for emacs-devel@gnu.org; Tue, 19 Oct 2004 14:45:32 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33) id 1CJyzE-0001yb-Ag for emacs-devel@gnu.org; Tue, 19 Oct 2004 14:45:32 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1CJyzC-0001yS-Bu for emacs-devel@gnu.org; Tue, 19 Oct 2004 14:45:32 -0400 Original-Received: from [213.165.64.20] (helo=mail.gmx.net) by monty-python.gnu.org with smtp (Exim 4.34) id 1CJyrh-0007Ga-V0 for emacs-devel@gnu.org; Tue, 19 Oct 2004 14:37:46 -0400 Original-Received: (qmail 18570 invoked by uid 65534); 19 Oct 2004 18:37:44 -0000 Original-Received: from p50843176.dip0.t-ipconnect.de (EHLO www2.gmx.net) (80.132.49.118) by mail.gmx.net (mp018) with SMTP; 19 Oct 2004 20:37:44 +0200 X-Authenticated: #14602519 Original-Received: from oak.pohoyda.family (localhost [127.0.0.1]) by www2.gmx.net (8.12.10/8.12.10) with ESMTP id i9JIbfs0000601; Tue, 19 Oct 2004 20:37:41 +0200 (CEST) (envelope-from alexander.pohoyda@gmx.net) Original-Received: (from apog@localhost) by oak.pohoyda.family (8.12.10/8.12.10/Submit) id i9JIbdiT000598; Tue, 19 Oct 2004 20:37:39 +0200 (CEST) (envelope-from alexander.pohoyda@gmx.net) X-Authentication-Warning: oak.pohoyda.family: apog set sender to alexander.pohoyda@gmx.net using -f Original-To: Stefan Monnier In-Reply-To: <87wtxn89vf.fsf@oak.pohoyda.family> Original-Lines: 22 User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3.50 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: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: main.gmane.org gmane.emacs.devel:28621 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:28621 Alexander Pohoyda writes: > > > + (if (or (search-forward (concat "\n" mail-header-separator "\n") to t) > > > + (search-forward "\n\n" to t)) > > > > This is less robust than what rfc822-goto-eoh uses, in the case where the > > mail-header-separator is modified. > > Yes, you're right. I'll reuse the original regexp from > rfc822-goto-eoh, ... There's a small problem with this approach. In mbox file format, messages start with "From blah-blah..", so the original rfc822-goto-eoh stops at this line. Wouldn't it be better to use pure "\n\n" as defined by RFC and to make this a good general-purpose function? I tend to this solution now. -- Alexander Pohoyda PGP Key fingerprint: 7F C9 CC 5A 75 CD 89 72 15 54 5F 62 20 23 C6 44