Re: Error with contrib/notmuch-pick
[notmuch-archives.git] / e7 / 0f7bc45b87d184c5005b3b5405c778a11e9000
1 Return-Path: <markwalters1009@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 2F4CF429E4A\r
6         for <notmuch@notmuchmail.org>; Thu, 26 May 2011 16:32:46 -0700 (PDT)\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
8 X-Spam-Flag: NO\r
9 X-Spam-Score: 1.424\r
10 X-Spam-Level: *\r
11 X-Spam-Status: No, score=1.424 tagged_above=-999 required=5\r
12         tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1,\r
13         FREEMAIL_ENVFROM_END_DIGIT=2.223, FREEMAIL_FROM=0.001,\r
14         RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled\r
15 Received: from olra.theworths.org ([127.0.0.1])\r
16         by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
17         with ESMTP id 22+Bxh7Eymrh for <notmuch@notmuchmail.org>;\r
18         Thu, 26 May 2011 16:32:44 -0700 (PDT)\r
19 Received: from mail-ww0-f45.google.com (mail-ww0-f45.google.com\r
20  [74.125.82.45])        (using TLSv1 with cipher RC4-SHA (128/128 bits))        (No client\r
21  certificate requested) by olra.theworths.org (Postfix) with ESMTPS id\r
22  1BF5D429E44    for <notmuch@notmuchmail.org>; Thu, 26 May 2011 16:32:43 -0700\r
23  (PDT)\r
24 Received: by mail-ww0-f45.google.com with SMTP id 36so1070600wwi.2\r
25         for <notmuch@notmuchmail.org>; Thu, 26 May 2011 16:32:43 -0700 (PDT)\r
26 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma;\r
27         h=domainkey-signature:from:to:cc:subject:date:message-id:x-mailer\r
28         :in-reply-to:references;\r
29         bh=3HQfbtgPAVGg2ux16QbLzcaIxZOsD8N41ql2rnKpK+A=;\r
30         b=FiPQAFx34yRWDyxvYDvo9Rzoe417Z6/Bjp5e0lQUGZkFbOLDYPZtnSSxt+T5abfozV\r
31         weAcD5ueoY2kWMwkxIPKBk7tr0OIPxf2qS9ft8K6PunmHzpjXtov+7Kr/MMzv9jJjeUH\r
32         4VFnJS5od6bnZITjDTVxbD9DNMhdl45vGgaYY=\r
33 DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma;\r
34         h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references;\r
35         b=V8PoZ+4yB1Wu/gLeKfnzXgZFG8QXgSJqTgMhEkQ49VODsdjiGJJAmXnPs6uvcNqGvL\r
36         d9RbOj3zW7DXRTrujb+1TBxuDVeb55D19N9v65Na2IMeTV5cYiwgcCYbr1vBSk1ETyT5\r
37         Nx3HW0RViV585J+k00v7ca957tQ2v4MBM5imc=\r
38 Received: by 10.216.59.85 with SMTP id r63mr6435147wec.35.1306452763778;\r
39         Thu, 26 May 2011 16:32:43 -0700 (PDT)\r
40 Received: from localhost.localdomain (93-97-25-209.zone5.bethere.co.uk\r
41         [93.97.25.209])\r
42         by mx.google.com with ESMTPS id fw15sm804800wbb.27.2011.05.26.16.32.42\r
43         (version=TLSv1/SSLv3 cipher=OTHER);\r
44         Thu, 26 May 2011 16:32:42 -0700 (PDT)\r
45 From: Mark Walters <markwalters1009@gmail.com>\r
46 To: notmuch@notmuchmail.org\r
47 Subject: [PATCH v2 3/3] Emacs changes for reply to sender\r
48 Date: Fri, 27 May 2011 00:31:57 +0100\r
49 Message-Id: <1306452717-19934-4-git-send-email-markwalters1009@gmail.com>\r
50 X-Mailer: git-send-email 1.7.2.5\r
51 In-Reply-To: <87pqn5cg4g.fsf@yoom.home.cworth.org>\r
52 References: <87pqn5cg4g.fsf@yoom.home.cworth.org>\r
53 X-BeenThere: notmuch@notmuchmail.org\r
54 X-Mailman-Version: 2.1.13\r
55 Precedence: list\r
56 List-Id: "Use and development of the notmuch mail system."\r
57         <notmuch.notmuchmail.org>\r
58 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
59         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
60 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
61 List-Post: <mailto:notmuch@notmuchmail.org>\r
62 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
63 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
64         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
65 X-List-Received-Date: Thu, 26 May 2011 23:32:46 -0000\r
66 \r
67 Reply to sender is currently bound to R\r
68 ---\r
69  emacs/notmuch-mua.el  |   10 ++++++----\r
70  emacs/notmuch-show.el |    8 +++++++-\r
71  emacs/notmuch.el      |    2 +-\r
72  3 files changed, 14 insertions(+), 6 deletions(-)\r
73 \r
74 diff --git a/emacs/notmuch-mua.el b/emacs/notmuch-mua.el\r
75 index 61a723b..c9c5854 100644\r
76 --- a/emacs/notmuch-mua.el\r
77 +++ b/emacs/notmuch-mua.el\r
78 @@ -69,13 +69,15 @@ list."\r
79             (push header message-hidden-headers)))\r
80         notmuch-mua-hidden-headers))\r
81  \r
82 -(defun notmuch-mua-reply (query-string &optional sender)\r
83 +(defun notmuch-mua-reply (query-string option-string &optional sender)\r
84    (let (headers body)\r
85      ;; This make assumptions about the output of `notmuch reply', but\r
86      ;; really only that the headers come first followed by a blank\r
87      ;; line and then the body.\r
88      (with-temp-buffer\r
89 -      (call-process notmuch-command nil t nil "reply" query-string)\r
90 +      (if option-string\r
91 +         (call-process notmuch-command nil t nil "reply" option-string query-string)\r
92 +       (call-process notmuch-command nil t nil "reply" query-string))\r
93        (goto-char (point-min))\r
94        (if (re-search-forward "^$" nil t)\r
95           (save-excursion\r
96 @@ -194,13 +196,13 @@ the From: address first."\r
97         (notmuch-mua-forward-message))\r
98      (notmuch-mua-forward-message)))\r
99  \r
100 -(defun notmuch-mua-new-reply (query-string &optional prompt-for-sender)\r
101 +(defun notmuch-mua-new-reply (query-string option-string &optional prompt-for-sender)\r
102    "Invoke the notmuch reply window."\r
103    (interactive "P")\r
104    (let ((sender\r
105          (when (or prompt-for-sender notmuch-always-prompt-for-sender)\r
106            (notmuch-mua-prompt-for-sender))))\r
107 -    (notmuch-mua-reply query-string sender)))\r
108 +    (notmuch-mua-reply query-string option-string sender)))\r
109  \r
110  (defun notmuch-mua-send-and-exit (&optional arg)\r
111    (interactive "P")\r
112 diff --git a/emacs/notmuch-show.el b/emacs/notmuch-show.el\r
113 index 2ba151e..852dadf 100644\r
114 --- a/emacs/notmuch-show.el\r
115 +++ b/emacs/notmuch-show.el\r
116 @@ -795,6 +795,7 @@ function is used. "\r
117         (define-key map "m" 'notmuch-mua-new-mail)\r
118         (define-key map "f" 'notmuch-show-forward-message)\r
119         (define-key map "r" 'notmuch-show-reply)\r
120 +       (define-key map "R" 'notmuch-show-reply-sender)\r
121         (define-key map "|" 'notmuch-show-pipe-message)\r
122         (define-key map "w" 'notmuch-show-save-attachments)\r
123         (define-key map "V" 'notmuch-show-view-raw-message)\r
124 @@ -1101,7 +1102,12 @@ any effects from previous calls to\r
125  (defun notmuch-show-reply (&optional prompt-for-sender)\r
126    "Reply to the current message."\r
127    (interactive "P")\r
128 -  (notmuch-mua-new-reply (notmuch-show-get-message-id) prompt-for-sender))\r
129 +  (notmuch-mua-new-reply (notmuch-show-get-message-id) nil prompt-for-sender))\r
130 +\r
131 +(defun notmuch-show-reply-sender (&optional prompt-for-sender)\r
132 +  "Reply to the current message."\r
133 +  (interactive "P")\r
134 +  (notmuch-mua-new-reply (notmuch-show-get-message-id) "--reply-to=sender" prompt-for-sender))\r
135  \r
136  (defun notmuch-show-forward-message (&optional prompt-for-sender)\r
137    "Forward the current message."\r
138 diff --git a/emacs/notmuch.el b/emacs/notmuch.el\r
139 index c22add7..e956420 100644\r
140 --- a/emacs/notmuch.el\r
141 +++ b/emacs/notmuch.el\r
142 @@ -440,7 +440,7 @@ Complete list of currently available key bindings:\r
143    "Begin composing a reply to the entire current thread in a new buffer."\r
144    (interactive "P")\r
145    (let ((message-id (notmuch-search-find-thread-id)))\r
146 -    (notmuch-mua-new-reply message-id prompt-for-sender)))\r
147 +    (notmuch-mua-new-reply message-id nil prompt-for-sender)))\r
148  \r
149  (defun notmuch-call-notmuch-process (&rest args)\r
150    "Synchronously invoke \"notmuch\" with the given list of arguments.\r
151 -- \r
152 1.7.2.5\r
153 \r