From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: New mail-related routines Date: Mon, 18 Oct 2004 18:12:51 -0400 Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Message-ID: 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 1098137604 30556 80.91.229.6 (18 Oct 2004 22:13:24 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 18 Oct 2004 22:13:24 +0000 (UTC) Cc: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Oct 19 00:13:13 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 1CJfkf-0004kv-00 for ; Tue, 19 Oct 2004 00:13:13 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1CJfry-0001TY-8k for ged-emacs-devel@m.gmane.org; Mon, 18 Oct 2004 18:20:46 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33) id 1CJfrq-0001TK-Kv for emacs-devel@gnu.org; Mon, 18 Oct 2004 18:20:38 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33) id 1CJfrp-0001Sv-SJ for emacs-devel@gnu.org; Mon, 18 Oct 2004 18:20:38 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1CJfrp-0001Ss-P4 for emacs-devel@gnu.org; Mon, 18 Oct 2004 18:20:37 -0400 Original-Received: from [132.204.24.67] (helo=mercure.iro.umontreal.ca) by monty-python.gnu.org with esmtp (Exim 4.34) id 1CJfkN-0002lM-Dp for emacs-devel@gnu.org; Mon, 18 Oct 2004 18:12:55 -0400 Original-Received: from hidalgo.iro.umontreal.ca (hidalgo.iro.umontreal.ca [132.204.27.50]) by mercure.iro.umontreal.ca (Postfix) with ESMTP id 869398282CB; Mon, 18 Oct 2004 18:12:54 -0400 (EDT) Original-Received: from asado.iro.umontreal.ca (asado.iro.umontreal.ca [132.204.24.84]) by hidalgo.iro.umontreal.ca (Postfix) with ESMTP id 708004AC757; Mon, 18 Oct 2004 18:12:52 -0400 (EDT) Original-Received: by asado.iro.umontreal.ca (Postfix, from userid 20848) id 1ABAF8CA23; Mon, 18 Oct 2004 18:12:52 -0400 (EDT) Original-To: Alexander Pohoyda In-Reply-To: <200410182157.i9ILvjln000739@oak.pohoyda.family> (Alexander Pohoyda's message of "Mon, 18 Oct 2004 23:57:45 +0200 (CEST)") User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/21.3.50 (gnu/linux) X-DIRO-MailScanner-Information: Please contact the ISP for more information X-DIRO-MailScanner: Found to be clean X-DIRO-MailScanner-SpamCheck: n'est pas un polluriel, SpamAssassin (score=0, requis 5) X-MailScanner-From: monnier@iro.umontreal.ca 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:28580 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:28580 > + (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. > + (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. > + (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. Stefan