Re: [notmuch] [PATCH] Change From and Bcc when creating reply draft buffer
authorJames Vasile <james@hackervisions.org>
Thu, 11 Mar 2010 14:45:23 +0000 (09:45 +1900)
committerW. Trevor King <wking@tremily.us>
Fri, 7 Nov 2014 17:36:22 +0000 (09:36 -0800)
0c/31ea14d0f520028f792133c43469419a13e5ff [new file with mode: 0644]

diff --git a/0c/31ea14d0f520028f792133c43469419a13e5ff b/0c/31ea14d0f520028f792133c43469419a13e5ff
new file mode 100644 (file)
index 0000000..7960eb6
--- /dev/null
@@ -0,0 +1,110 @@
+Return-Path: <james@hackervisions.org>\r
+X-Original-To: notmuch@notmuchmail.org\r
+Delivered-To: notmuch@notmuchmail.org\r
+Received: from localhost (localhost [127.0.0.1])\r
+       by olra.theworths.org (Postfix) with ESMTP id 789A549F192\r
+       for <notmuch@notmuchmail.org>; Thu, 11 Mar 2010 06:45:49 -0800 (PST)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: -0.16\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=-0.16 tagged_above=-999 required=5 tests=[AWL=-0.261,\r
+       BAYES_50=0.001, RDNS_DYNAMIC=0.1] autolearn=no\r
+Received: from olra.theworths.org ([127.0.0.1])\r
+       by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
+       with ESMTP id 0rO+5CIeTJtq for <notmuch@notmuchmail.org>;\r
+       Thu, 11 Mar 2010 06:45:47 -0800 (PST)\r
+Received: from hackervisions.org (67-207-143-141.slicehost.net\r
+       [67.207.143.141])\r
+       by olra.theworths.org (Postfix) with ESMTP id 3681A4916B2\r
+       for <notmuch@notmuchmail.org>; Thu, 11 Mar 2010 06:45:47 -0800 (PST)\r
+Received: from john-marshall.sflc.info ([216.27.154.200] helo=localhost)\r
+       by hv with esmtpsa (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.69)\r
+       (envelope-from <james@hackervisions.org>)\r
+       id 1Npjdj-0003aZ-20; Thu, 11 Mar 2010 09:45:31 -0500\r
+From: James Vasile <james@hackervisions.org>\r
+To: Michal Sojka <sojkam1@fel.cvut.cz>, notmuch@notmuchmail.org\r
+In-Reply-To: <87pr3bm2sn.fsf@steelpick.localdomain>\r
+References: <87aauhp9kk.fsf@hackervisions.org>\r
+       <87pr3bm2sn.fsf@steelpick.localdomain>\r
+Date: Thu, 11 Mar 2010 09:45:23 -0500\r
+Message-ID: <87fx46hq7w.fsf@hackervisions.org>\r
+MIME-Version: 1.0\r
+Content-Type: text/plain; charset=us-ascii\r
+Subject: Re: [notmuch] [PATCH] Change From and Bcc when creating reply draft\r
+ buffer\r
+X-BeenThere: notmuch@notmuchmail.org\r
+X-Mailman-Version: 2.1.13\r
+Precedence: list\r
+List-Id: "Use and development of the notmuch mail system."\r
+       <notmuch.notmuchmail.org>\r
+List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
+       <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
+List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
+List-Post: <mailto:notmuch@notmuchmail.org>\r
+List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
+List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
+       <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
+X-List-Received-Date: Thu, 11 Mar 2010 14:45:49 -0000\r
+\r
+On Thu, 11 Mar 2010 14:00:08 +0100, Michal Sojka <sojkam1@fel.cvut.cz> wrote:\r
+> Hi James,\r
+> \r
+> On Tue, 09 Mar 2010, James Vasile wrote:\r
+> > When notmuch creates a reply buffer, it guesses the From and Bcc\r
+> > addresses.  The client is in a better position to guess these, and this\r
+> > patch adjusts notmuch-reply accordingly.\r
+> > \r
+> > diff --git a/notmuch.el b/notmuch.el\r
+> > index ab56f48..07f957e 100644\r
+> > --- a/notmuch.el\r
+> > +++ b/notmuch.el\r
+> > @@ -436,10 +436,20 @@ buffer."\r
+> >    (message "Done"))\r
+> >  \r
+> >  (defun notmuch-reply (query-string)\r
+> > +  "Prepare a reply draft buffer.\r
+> > +\r
+> > +Have notmuch create a reply buffer, then adjust the from and bcc\r
+> > +headers to match our current user-full-name and\r
+> > +user-mail-address."\r
+> >    (switch-to-buffer (generate-new-buffer "notmuch-draft"))\r
+> >    (call-process notmuch-command nil t nil "reply" query-string)\r
+> >    (message-insert-signature)\r
+> >    (goto-char (point-min))\r
+> > +  (kill-line)\r
+> > +  (insert (format "From: %s <%s>" user-full-name user-mail-address))\r
+> \r
+> Notmuch reply contains From: address which is based on the addresses in\r
+> .notmuch-config and the replied message. When you use multiple addresses\r
+> (e.g. home and work address), notmuch puts there the one used in the\r
+> replied message. It seems that your patch would break this feature.\r
+> \r
+> -Michal\r
+\r
+Yes, it does break that feature, and intentionally so.  The MUA should\r
+select the From: address.  I have profile selection code that sets my\r
+user-full-name and user-mail-address based on some context.  When I\r
+reply to somebody, the correct From: address is not who they think I am\r
+but rather who *I* think I am.\r
+\r
+Here's my use case: I have a job in the free software world.  There's an\r
+email address attached to that.  I also serve on the board of a free\r
+software project.  There's another email for that.  People email me\r
+about the project using my work email, but I always reply using the\r
+project email, and my MUA knows that.  Notmuch doesn't.\r
+\r
+Also: my girlfriend's family sometimes emails me at work.  I don't want\r
+personal email at my work address, so I always reply using a personal\r
+address.\r
+\r
+Also: I have an old email address that I've deprecated, but old friends\r
+still use it.  I always reply with my newer address and they eventually\r
+start using the new one.\r
+\r
+My profile code is usable but not complete.  It looks at folder contents\r
+to pick the correct From: address automatically (you can override the\r
+choice, of course), which is good when you have 400+ folders.  If\r
+anybody wants it before it's done, I can put it in a public branch.\r
+\r
+-J\r