Re: [notmuch] [PATCH] Change From and Bcc when creating reply draft buffer

Subject: Re: [notmuch] [PATCH] Change From and Bcc when creating reply draft buffer

Date: Thu, 11 Mar 2010 14:00:08 +0100

To: James Vasile, notmuch@notmuchmail.org

Cc:

From: Michal Sojka


Hi James,

On Tue, 09 Mar 2010, James Vasile wrote:
> When notmuch creates a reply buffer, it guesses the From and Bcc
> addresses.  The client is in a better position to guess these, and this
> patch adjusts notmuch-reply accordingly.
> 
> diff --git a/notmuch.el b/notmuch.el
> index ab56f48..07f957e 100644
> --- a/notmuch.el
> +++ b/notmuch.el
> @@ -436,10 +436,20 @@ buffer."
>    (message "Done"))
>  
>  (defun notmuch-reply (query-string)
> +  "Prepare a reply draft buffer.
> +
> +Have notmuch create a reply buffer, then adjust the from and bcc
> +headers to match our current user-full-name and
> +user-mail-address."
>    (switch-to-buffer (generate-new-buffer "notmuch-draft"))
>    (call-process notmuch-command nil t nil "reply" query-string)
>    (message-insert-signature)
>    (goto-char (point-min))
> +  (kill-line)
> +  (insert (format "From: %s <%s>" user-full-name user-mail-address))

Notmuch reply contains From: address which is based on the addresses in
.notmuch-config and the replied message. When you use multiple addresses
(e.g. home and work address), notmuch puts there the one used in the
replied message. It seems that your patch would break this feature.

-Michal

Thread: