Return-Path: X-Original-To: notmuch@notmuchmail.org Delivered-To: notmuch@notmuchmail.org Received: from localhost (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id 789A549F192 for ; Thu, 11 Mar 2010 06:45:49 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org X-Spam-Flag: NO X-Spam-Score: -0.16 X-Spam-Level: X-Spam-Status: No, score=-0.16 tagged_above=-999 required=5 tests=[AWL=-0.261, BAYES_50=0.001, RDNS_DYNAMIC=0.1] autolearn=no Received: from olra.theworths.org ([127.0.0.1]) by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 0rO+5CIeTJtq for ; Thu, 11 Mar 2010 06:45:47 -0800 (PST) Received: from hackervisions.org (67-207-143-141.slicehost.net [67.207.143.141]) by olra.theworths.org (Postfix) with ESMTP id 3681A4916B2 for ; Thu, 11 Mar 2010 06:45:47 -0800 (PST) Received: from john-marshall.sflc.info ([216.27.154.200] helo=localhost) by hv with esmtpsa (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.69) (envelope-from ) id 1Npjdj-0003aZ-20; Thu, 11 Mar 2010 09:45:31 -0500 From: James Vasile To: Michal Sojka , notmuch@notmuchmail.org In-Reply-To: <87pr3bm2sn.fsf@steelpick.localdomain> References: <87aauhp9kk.fsf@hackervisions.org> <87pr3bm2sn.fsf@steelpick.localdomain> Date: Thu, 11 Mar 2010 09:45:23 -0500 Message-ID: <87fx46hq7w.fsf@hackervisions.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Subject: Re: [notmuch] [PATCH] Change From and Bcc when creating reply draft buffer X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: "Use and development of the notmuch mail system." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 11 Mar 2010 14:45:49 -0000 On Thu, 11 Mar 2010 14:00:08 +0100, Michal Sojka wrote: > 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 Yes, it does break that feature, and intentionally so. The MUA should select the From: address. I have profile selection code that sets my user-full-name and user-mail-address based on some context. When I reply to somebody, the correct From: address is not who they think I am but rather who *I* think I am. Here's my use case: I have a job in the free software world. There's an email address attached to that. I also serve on the board of a free software project. There's another email for that. People email me about the project using my work email, but I always reply using the project email, and my MUA knows that. Notmuch doesn't. Also: my girlfriend's family sometimes emails me at work. I don't want personal email at my work address, so I always reply using a personal address. Also: I have an old email address that I've deprecated, but old friends still use it. I always reply with my newer address and they eventually start using the new one. My profile code is usable but not complete. It looks at folder contents to pick the correct From: address automatically (you can override the choice, of course), which is good when you have 400+ folders. If anybody wants it before it's done, I can put it in a public branch. -J