[PATCH v2 5/6] emacs: bind 'r' to reply-to-sender and 'R' to reply-to-all
[notmuch-archives.git] / 0c / 31ea14d0f520028f792133c43469419a13e5ff
1 Return-Path: <james@hackervisions.org>\r
2 X-Original-To: notmuch@notmuchmail.org\r
3 Delivered-To: notmuch@notmuchmail.org\r
4 Received: from localhost (localhost [127.0.0.1])\r
5         by olra.theworths.org (Postfix) with ESMTP id 789A549F192\r
6         for <notmuch@notmuchmail.org>; Thu, 11 Mar 2010 06:45:49 -0800 (PST)\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
8 X-Spam-Flag: NO\r
9 X-Spam-Score: -0.16\r
10 X-Spam-Level: \r
11 X-Spam-Status: No, score=-0.16 tagged_above=-999 required=5 tests=[AWL=-0.261,\r
12         BAYES_50=0.001, RDNS_DYNAMIC=0.1] autolearn=no\r
13 Received: from olra.theworths.org ([127.0.0.1])\r
14         by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
15         with ESMTP id 0rO+5CIeTJtq for <notmuch@notmuchmail.org>;\r
16         Thu, 11 Mar 2010 06:45:47 -0800 (PST)\r
17 Received: from hackervisions.org (67-207-143-141.slicehost.net\r
18         [67.207.143.141])\r
19         by olra.theworths.org (Postfix) with ESMTP id 3681A4916B2\r
20         for <notmuch@notmuchmail.org>; Thu, 11 Mar 2010 06:45:47 -0800 (PST)\r
21 Received: from john-marshall.sflc.info ([216.27.154.200] helo=localhost)\r
22         by hv with esmtpsa (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.69)\r
23         (envelope-from <james@hackervisions.org>)\r
24         id 1Npjdj-0003aZ-20; Thu, 11 Mar 2010 09:45:31 -0500\r
25 From: James Vasile <james@hackervisions.org>\r
26 To: Michal Sojka <sojkam1@fel.cvut.cz>, notmuch@notmuchmail.org\r
27 In-Reply-To: <87pr3bm2sn.fsf@steelpick.localdomain>\r
28 References: <87aauhp9kk.fsf@hackervisions.org>\r
29         <87pr3bm2sn.fsf@steelpick.localdomain>\r
30 Date: Thu, 11 Mar 2010 09:45:23 -0500\r
31 Message-ID: <87fx46hq7w.fsf@hackervisions.org>\r
32 MIME-Version: 1.0\r
33 Content-Type: text/plain; charset=us-ascii\r
34 Subject: Re: [notmuch] [PATCH] Change From and Bcc when creating reply draft\r
35  buffer\r
36 X-BeenThere: notmuch@notmuchmail.org\r
37 X-Mailman-Version: 2.1.13\r
38 Precedence: list\r
39 List-Id: "Use and development of the notmuch mail system."\r
40         <notmuch.notmuchmail.org>\r
41 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
42         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
43 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
44 List-Post: <mailto:notmuch@notmuchmail.org>\r
45 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
46 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
47         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
48 X-List-Received-Date: Thu, 11 Mar 2010 14:45:49 -0000\r
49 \r
50 On Thu, 11 Mar 2010 14:00:08 +0100, Michal Sojka <sojkam1@fel.cvut.cz> wrote:\r
51 > Hi James,\r
52\r
53 > On Tue, 09 Mar 2010, James Vasile wrote:\r
54 > > When notmuch creates a reply buffer, it guesses the From and Bcc\r
55 > > addresses.  The client is in a better position to guess these, and this\r
56 > > patch adjusts notmuch-reply accordingly.\r
57 > > \r
58 > > diff --git a/notmuch.el b/notmuch.el\r
59 > > index ab56f48..07f957e 100644\r
60 > > --- a/notmuch.el\r
61 > > +++ b/notmuch.el\r
62 > > @@ -436,10 +436,20 @@ buffer."\r
63 > >    (message "Done"))\r
64 > >  \r
65 > >  (defun notmuch-reply (query-string)\r
66 > > +  "Prepare a reply draft buffer.\r
67 > > +\r
68 > > +Have notmuch create a reply buffer, then adjust the from and bcc\r
69 > > +headers to match our current user-full-name and\r
70 > > +user-mail-address."\r
71 > >    (switch-to-buffer (generate-new-buffer "notmuch-draft"))\r
72 > >    (call-process notmuch-command nil t nil "reply" query-string)\r
73 > >    (message-insert-signature)\r
74 > >    (goto-char (point-min))\r
75 > > +  (kill-line)\r
76 > > +  (insert (format "From: %s <%s>" user-full-name user-mail-address))\r
77\r
78 > Notmuch reply contains From: address which is based on the addresses in\r
79 > .notmuch-config and the replied message. When you use multiple addresses\r
80 > (e.g. home and work address), notmuch puts there the one used in the\r
81 > replied message. It seems that your patch would break this feature.\r
82\r
83 > -Michal\r
84 \r
85 Yes, it does break that feature, and intentionally so.  The MUA should\r
86 select the From: address.  I have profile selection code that sets my\r
87 user-full-name and user-mail-address based on some context.  When I\r
88 reply to somebody, the correct From: address is not who they think I am\r
89 but rather who *I* think I am.\r
90 \r
91 Here's my use case: I have a job in the free software world.  There's an\r
92 email address attached to that.  I also serve on the board of a free\r
93 software project.  There's another email for that.  People email me\r
94 about the project using my work email, but I always reply using the\r
95 project email, and my MUA knows that.  Notmuch doesn't.\r
96 \r
97 Also: my girlfriend's family sometimes emails me at work.  I don't want\r
98 personal email at my work address, so I always reply using a personal\r
99 address.\r
100 \r
101 Also: I have an old email address that I've deprecated, but old friends\r
102 still use it.  I always reply with my newer address and they eventually\r
103 start using the new one.\r
104 \r
105 My profile code is usable but not complete.  It looks at folder contents\r
106 to pick the correct From: address automatically (you can override the\r
107 choice, of course), which is good when you have 400+ folders.  If\r
108 anybody wants it before it's done, I can put it in a public branch.\r
109 \r
110 -J\r