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 09:06:44 +0200 Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Message-ID: <87wtxn89vf.fsf@oak.pohoyda.family> References: <200410182157.i9ILvjln000739@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 1098169654 11264 80.91.229.6 (19 Oct 2004 07:07:34 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 19 Oct 2004 07:07:34 +0000 (UTC) Cc: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Oct 19 09:07:23 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 1CJo5a-0003KY-00 for ; Tue, 19 Oct 2004 09:07:22 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1CJoCv-0000sg-3S for ged-emacs-devel@m.gmane.org; Tue, 19 Oct 2004 03:14:57 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33) id 1CJoCl-0000sZ-P8 for emacs-devel@gnu.org; Tue, 19 Oct 2004 03:14:47 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33) id 1CJoCl-0000sB-61 for emacs-devel@gnu.org; Tue, 19 Oct 2004 03:14:47 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1CJoCl-0000s3-1t for emacs-devel@gnu.org; Tue, 19 Oct 2004 03:14:47 -0400 Original-Received: from [213.165.64.20] (helo=mail.gmx.net) by monty-python.gnu.org with smtp (Exim 4.34) id 1CJo57-0000ez-Tp for emacs-devel@gnu.org; Tue, 19 Oct 2004 03:06:54 -0400 Original-Received: (qmail 19908 invoked by uid 65534); 19 Oct 2004 07:06:52 -0000 Original-Received: from p50843176.dip0.t-ipconnect.de (EHLO www2.gmx.net) (80.132.49.118) by mail.gmx.net (mp014) with SMTP; 19 Oct 2004 09:06:52 +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 i9J76nWI000386; Tue, 19 Oct 2004 09:06:49 +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 i9J76jJh000381; Tue, 19 Oct 2004 09:06:45 +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: Original-Lines: 42 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:28594 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:28594 Stefan Monnier writes: > > + (let ((from (or from (point-min))) > > + (to (or to (point-max)))) > > I'd recommend > > (unless from (setq from (point-min))) > (unless to (setq to (point-max))) > > it saves a bit of indentation and is marginally more efficient. Good point, I'll change this everywhere. > > + (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, but I need a function to return the point and don't move the cursor. > > + (point) > > + ;; TODO: Shouldn't we return nil instead? > > + (message "This entity has no body") > > + to))))) > > I'd argue we should return `to' because the whole thing is the header. Sorry, I don't clearly understand you here. Do you agree with returning `to'? Thank you very much! -- Alexander Pohoyda PGP Key fingerprint: 7F C9 CC 5A 75 CD 89 72 15 54 5F 62 20 23 C6 44