From xemacs-m  Fri Jun 20 08:32:16 1997
Received: from jagor.srce.hr (root@jagor.srce.hr [161.53.2.130])
	by xemacs.org (8.8.5/8.8.5) with ESMTP id IAA24865
	for <xemacs-beta@xemacs.org>; Fri, 20 Jun 1997 08:32:13 -0500 (CDT)
Received: (from hniksic@localhost)
          by jagor.srce.hr (8.8.5/8.8.4)
	  id HAA22798; Fri, 20 Jun 1997 07:50:34 +0200 (MET DST)
To: bugs@gnus.org
cc: XEmacs Developers <xemacs-beta@xemacs.org>
Subject: Wrong usage of `mail-fetch-field'
X-Attribution: Hrv
X-Face: Mie8:rOV<\c/~z{s.X4A{!?vY7{drJ([U]0O=W/<W*SMo/Mv:58:*_y~ki>xDi&N7XG
        KV^$k0m3Oe/)'e%3=$PCR&3ITUXH,cK>]bci&<qQ>Ff%x_>1`T(+M2Gg/fgndU%k*ft
        [(7._6e0n-V%|%'[c|q:;}td$#INd+;?!-V=c8Pqf}3J
From: Hrvoje Niksic <hniksic@srce.hr>
Date: 20 Jun 1997 07:50:34 +0200
Message-ID: <kig3eqdvn4l.fsf@jagor.srce.hr>
Lines: 33
X-Mailer: Gnus v5.4.59/XEmacs 20.3(beta7) - "Oslo"

I have discovered a bug in `message-fetch-field'.  Before calling
`mail-fetch-field', it should narrow to headers of the message.  For
example:

Reply-To: president@whitehouse_.gov

In this buffer, (message-fetch-field "reply-to") returns the
address of you-know-whom.

Now, the same goes for `message-fetch-field' and
`message-fetch-reply-field'.  The problem is that you do not narrow to 
headers consistently.  The problem with `message-fetch-reply-field' is 
that you *cannot* narrow to headers, since the function changes the
buffer.  I propose to either:

1) change the interface, so that the message-* versions do not require
   explicit narrowing; or

2) include explicit narrows consistently

Solution #1 will cause loss of performance in cases where many headers 
are checked in succession.

Solution #2 will still require a change in interface for
`message-fetch-reply-field' to work correctly.

I didn't want to send a patch until you decide which solution you like 
best.

-- 
Hrvoje Niksic <hniksic@srce.hr> | Student at FER Zagreb, Croatia
--------------------------------+--------------------------------
I'm a Lisp variable -- bind me!

