Use message-field-value instead of message-fetch-field in FCC header setup.
authorDmitry Kurochkin <dmitry.kurochkin@gmail.com>
Sat, 28 May 2011 21:51:50 +0000 (14:51 -0700)
committerCarl Worth <cworth@cworth.org>
Fri, 3 Jun 2011 19:30:55 +0000 (12:30 -0700)
commita0f09b4942b7fdb852b45856e3439acac2649035
treedf568cf959fb6e7af01eb56cbe4bedc245eba929
parent6ae4e7d88be66ab7b24d96b7091ed56aa7e97ccc
Use message-field-value instead of message-fetch-field in FCC header setup.

For message-fetch-field the buffer is expected to be narrowed to
just the header of the message.  That is not the case when
notmuch-fcc-header-setup is run, hence a wrong header value may be
returned.  E.g. when forwarding an
email, (message-fetch-field "From") returns the From header value
of the forwarded email.

Message-field-value is the same as message-fetch-field, only
narrows the buffer to the headers first.

Signed-off-by: Jameson Graef Rollins <jrollins@finestructure.net>
emacs/notmuch-maildir-fcc.el