Re: [notmuch] keeping a copy of sent mail locally
[notmuch-archives.git] / 58 / 075fd05d13b6aea50c74128b38f57588b5d1e8
1 Return-Path: <aghitza@gmail.com>\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 AC5C2431FC0\r
6         for <notmuch@notmuchmail.org>; Sat, 19 Dec 2009 20:29:44 -0800 (PST)\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
8 Received: from olra.theworths.org ([127.0.0.1])\r
9         by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
10         with ESMTP id FEui7m-sIZc6 for <notmuch@notmuchmail.org>;\r
11         Sat, 19 Dec 2009 20:29:43 -0800 (PST)\r
12 Received: from mail-gx0-f221.google.com (mail-gx0-f221.google.com\r
13         [209.85.217.221])\r
14         by olra.theworths.org (Postfix) with ESMTP id 5F930431FAE\r
15         for <notmuch@notmuchmail.org>; Sat, 19 Dec 2009 20:29:43 -0800 (PST)\r
16 Received: by gxk21 with SMTP id 21so2009978gxk.10\r
17         for <notmuch@notmuchmail.org>; Sat, 19 Dec 2009 20:29:43 -0800 (PST)\r
18 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma;\r
19         h=domainkey-signature:received:received:from:to:subject:in-reply-to\r
20         :references:date:message-id:mime-version:content-type;\r
21         bh=s/lPo4rwEksbGLt8Lq/Cafp3cLzpZW9ch3iakMaitcE=;\r
22         b=eY0ov8xA8dP7+uIEvVPdheuHDdG3MvQnPhHyLJxjfeZ3dQPtHdnu6mPx32XUEsy4t5\r
23         7ItdJlcqp0m+yVJD99BoJV0A3NhjmNSgADrDWcFEhVx7O7642Y7tpt7OHHOqwBjgdCc+\r
24         pxuhER6w9ZX5lgLydYGa0VGjoW51soFzWITlk=\r
25 DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma;\r
26         h=from:to:subject:in-reply-to:bcc:references:date:message-id\r
27         :mime-version:content-type;\r
28         b=AZMO9kW0953RnhxzlxeAvfTM/U5ZeN3p8h597SXuTXaIqga/sV0aRCVM2Mb7XA596z\r
29         NpsH4N4PBOCdJScPRj1ejOfqLao028mPyc0kduCCUXFuyq8u5OxHXWl1CZORm55VsgEA\r
30         1bcjX0zK1Kb+L4WnRS+i2gFfLsMEGycmlYYs8=\r
31 Received: by 10.90.41.14 with SMTP id o14mr1952543ago.25.1261283382936;\r
32         Sat, 19 Dec 2009 20:29:42 -0800 (PST)\r
33 Received: from localhost (220-244-174-171.static.tpgi.com.au\r
34  [220.244.174.171])     by mx.google.com with ESMTPS id\r
35  14sm2248511gxk.14.2009.12.19.20.29.40  (version=TLSv1/SSLv3 cipher=RC4-MD5);\r
36         Sat, 19 Dec 2009 20:29:41 -0800 (PST)\r
37 From: Alex Ghitza <aghitza@gmail.com>\r
38 To: Keith Packard <keithp@keithp.com>, Carl Worth <cworth@cworth.org>,\r
39         Jed Brown <jed@59A2.org>, notmuch@notmuchmail.org\r
40 In-Reply-To: <yunljgye4uu.fsf@aiko.keithp.com>\r
41 References: <54hbrnpod1.fsf@gmail.com> <8763836xnv.fsf@59A2.org>\r
42         <54hbrmze3v.fsf@gmail.com> <87aaxextev.fsf@yoom.home.cworth.org>\r
43         <yunljgye4uu.fsf@aiko.keithp.com>\r
44 Date: Sun, 20 Dec 2009 15:29:15 +1100\r
45 Message-ID: <54eimqz2sk.fsf@gmail.com>\r
46 MIME-Version: 1.0\r
47 Content-Type: text/plain; charset=us-ascii\r
48 Subject: Re: [notmuch] keeping a copy of sent mail locally\r
49 X-BeenThere: notmuch@notmuchmail.org\r
50 X-Mailman-Version: 2.1.12\r
51 Precedence: list\r
52 List-Id: "Use and development of the notmuch mail system."\r
53         <notmuch.notmuchmail.org>\r
54 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
55         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
56 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
57 List-Post: <mailto:notmuch@notmuchmail.org>\r
58 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
59 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
60         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
61 X-List-Received-Date: Sun, 20 Dec 2009 04:29:44 -0000\r
62 \r
63 On Sat, 19 Dec 2009 18:50:17 -0800, Keith Packard <keithp@keithp.com> wrote:\r
64 > On Sat, 19 Dec 2009 18:37:12 -0800, Carl Worth <cworth@cworth.org> wrote:\r
65\r
66 > > So we need to figure out how to configure (or hook) that\r
67 > > to insert the Bcc, and then we can fix notmuch.el to do this without any\r
68 > > user configuration.\r
69\r
70 > Just call:\r
71\r
72 > (message-mail nil nil '(("bcc" "keithp@keithp.com")))\r
73\r
74 > instead of (message-mail)\r
75\r
76 \r
77 Good.  So we can put this in notmuch.el and Keith will get everybody's\r
78 sent mail. :)\r
79 \r
80 It looks like we need a way to get the primary email address from the\r
81 config file.  Actually, while we're at it, we can consider making this\r
82 more flexible and adding a new option to the config file (e.g. bcc=...)\r
83 which would take a semicolon-separated list of email addresses (in case\r
84 someone wants to always bcc an address other than the primary one).\r
85 \r
86 Is there a nice clean way of getting the config variables in notmuch.el?\r
87 Or should this go into a new file notmuch-compose.c?  Note that the\r
88 latter would imply having a new command like "notmuch compose".\r
89 \r
90 Ah, I just realised there's another issue related to the fact that 'm'\r
91 immediately defers to Message mode while 'r' does some preprocessing:\r
92 after pressing 'r', various headers are set in the appropriate manner\r
93 (From:, for instance, using the user name and email address from the\r
94 config file).  If you press 'm', you would get something like\r
95 \r
96 From: ghitza@artin.i-did-not-set--mail-host-address--so-tickle-me\r
97 \r
98 due to the fact that Message mode doesn't know the name or the email\r
99 address.  This can be fixed by adding to .emacs something like\r
100 \r
101 (setq user-full-name "Alex Ghitza")\r
102 (setq user-mail-address "aghitza@gmail.com")\r
103 \r
104 It's not a big deal, but now the same thing must be set in two different\r
105 places (.notmuch-config and .emacs), and can lead to confusion if, say,\r
106 the user changes their primary email address in one place but forgets it\r
107 needs to also be changed in the other.  So I guess I would prefer it if\r
108 notmuch would do a very minimal amount of preprocessing before heading\r
109 into Message mode when composing mail.  In fact, we could make sure that\r
110 there is consistent behaviour between 'm' and 'r' by making "notmuch\r
111 compose" return a few preset headers (From:, Bcc:, whatever else is\r
112 deemed appropriate), and making "notmuch reply" call "notmuch compose"\r
113 first and then add the reply-specific content.\r
114 \r
115 Sorry about writing a lot of prose and no code!  I'd like to get a sense\r
116 for people's reactions before trying to write a patch for this.\r
117 \r
118 \r
119 Best,\r
120 Alex\r
121 \r
122 \r
123 -- \r
124 Alex Ghitza -- Lecturer in Mathematics -- The University of Melbourne\r
125 -- Australia -- http://www.ms.unimelb.edu.au/~aghitza/\r