Re: [PATCH v2] Omit User-Agent: header by default
[notmuch-archives.git] / 10 / 1e99c66675c1a6f07507c5bf42623c64d98b44
1 Return-Path: <aneesh.kumar@linux.vnet.ibm.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 2F5B9431FBC\r
6         for <notmuch@notmuchmail.org>; Sat, 23 Jan 2010 02:05:34 -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: -5.041\r
10 X-Spam-Level: \r
11 X-Spam-Status: No, score=-5.041 tagged_above=-999 required=5 tests=[AWL=1.558,\r
12         BAYES_00=-2.599, RCVD_IN_DNSWL_MED=-4] autolearn=unavailable\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 N3MnJyoncBJr for <notmuch@notmuchmail.org>;\r
16         Sat, 23 Jan 2010 02:05:32 -0800 (PST)\r
17 Received: from e23smtp08.au.ibm.com (e23smtp08.au.ibm.com [202.81.31.141])\r
18         by olra.theworths.org (Postfix) with ESMTP id 7A2EC431FBD\r
19         for <notmuch@notmuchmail.org>; Sat, 23 Jan 2010 02:05:31 -0800 (PST)\r
20 Received: from d23relay04.au.ibm.com (d23relay04.au.ibm.com [202.81.31.246])\r
21         by e23smtp08.au.ibm.com (8.14.3/8.13.1) with ESMTP id o0NA5U0E021377\r
22         for <notmuch@notmuchmail.org>; Sat, 23 Jan 2010 21:05:30 +1100\r
23 Received: from d23av04.au.ibm.com (d23av04.au.ibm.com [9.190.235.139])\r
24         by d23relay04.au.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id\r
25         o0NA0kcI1667130\r
26         for <notmuch@notmuchmail.org>; Sat, 23 Jan 2010 21:00:46 +1100\r
27 Received: from d23av04.au.ibm.com (loopback [127.0.0.1])\r
28         by d23av04.au.ibm.com (8.14.3/8.13.1/NCO v10.0 AVout) with ESMTP id\r
29         o0NA5TXC007409\r
30         for <notmuch@notmuchmail.org>; Sat, 23 Jan 2010 21:05:29 +1100\r
31 Received: from localhost.localdomain ([9.77.206.84])\r
32         by d23av04.au.ibm.com (8.14.3/8.13.1/NCO v10.0 AVin) with ESMTP id\r
33         o0NA5J0g007294; Sat, 23 Jan 2010 21:05:24 +1100\r
34 From: "Aneesh Kumar K.V" <aneesh.kumar@linux.vnet.ibm.com>\r
35 To: cworth@cworth.org\r
36 Date: Sat, 23 Jan 2010 15:35:05 +0530\r
37 Message-Id: <1264241105-5983-2-git-send-email-aneesh.kumar@linux.vnet.ibm.com>\r
38 X-Mailer: git-send-email 1.6.6.1.394.gdedc0\r
39 In-Reply-To:\r
40  <1264241105-5983-1-git-send-email-aneesh.kumar@linux.vnet.ibm.com>\r
41 References: <1264241105-5983-1-git-send-email-aneesh.kumar@linux.vnet.ibm.com>\r
42 Cc: "Aneesh Kumar K.V" <aneesh.kumar@gmail.com>, notmuch@notmuchmail.org\r
43 Subject: [notmuch] [PATCH -V2 2/2] notmuch.el: Add support for reply-to\r
44         sender\r
45 X-BeenThere: notmuch@notmuchmail.org\r
46 X-Mailman-Version: 2.1.13\r
47 Precedence: list\r
48 List-Id: "Use and development of the notmuch mail system."\r
49         <notmuch.notmuchmail.org>\r
50 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
51         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
52 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
53 List-Post: <mailto:notmuch@notmuchmail.org>\r
54 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
55 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
56         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
57 X-List-Received-Date: Sat, 23 Jan 2010 10:05:34 -0000\r
58 \r
59 From: Aneesh Kumar K.V <aneesh.kumar@gmail.com>\r
60 \r
61 Add key binding to do a reply-to sender. This\r
62 is mapped to 'R'\r
63 \r
64 Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@gmail.com>\r
65 ---\r
66  notmuch.el |   24 ++++++++++++++++++++++--\r
67  1 files changed, 22 insertions(+), 2 deletions(-)\r
68 \r
69 diff --git a/notmuch.el b/notmuch.el\r
70 index 97914f2..5589350 100644\r
71 --- a/notmuch.el\r
72 +++ b/notmuch.el\r
73 @@ -62,7 +62,8 @@\r
74      (define-key map "s" 'notmuch-search)\r
75      (define-key map "m" 'message-mail)\r
76      (define-key map "f" 'notmuch-show-forward-current)\r
77 -    (define-key map "r" 'notmuch-show-reply)\r
78 +    (define-key map "r" 'notmuch-show-reply-all)\r
79 +    (define-key map "R" 'notmuch-show-reply)\r
80      (define-key map "|" 'notmuch-show-pipe-message)\r
81      (define-key map "w" 'notmuch-show-save-attachments)\r
82      (define-key map "V" 'notmuch-show-view-raw-message)\r
83 @@ -363,12 +364,31 @@ buffer."\r
84         (forward-line)))\r
85    (message-mode))\r
86  \r
87 -(defun notmuch-show-reply ()\r
88 +(defun notmuch-show-reply-all ()\r
89    "Begin composing a reply to the current message in a new buffer."\r
90    (interactive)\r
91    (let ((message-id (notmuch-show-get-message-id)))\r
92      (notmuch-reply message-id)))\r
93  \r
94 +\r
95 +(defun notmuch-format-reply (format-string query-string)\r
96 +  (switch-to-buffer (generate-new-buffer "notmuch-draft"))\r
97 +  (call-process notmuch-command nil t nil "reply"\r
98 +               (concat "--format=" format-string) query-string)\r
99 +  (message-insert-signature)\r
100 +  (goto-char (point-min))\r
101 +  (if (re-search-forward "^$" nil t)\r
102 +      (progn\r
103 +       (insert "--text follows this line--")\r
104 +       (forward-line)))\r
105 +  (message-mode))\r
106 +\r
107 +(defun notmuch-show-reply ()\r
108 +  "Begin composing a reply to the current message in a new buffer."\r
109 +  (interactive)\r
110 +  (let ((message-id (notmuch-show-get-message-id)))\r
111 +    (notmuch-format-reply "sender-only" message-id)))\r
112 +\r
113  (defun notmuch-show-forward-current ()\r
114    "Forward the current message."\r
115    (interactive)\r
116 -- \r
117 1.6.6.1.394.gdedc0\r
118 \r