Re: [PATCH 9/9] add has: query prefix to search for specific properties
[notmuch-archives.git] / 98 / 3ffda51f4714f1e889412b5bbff441179b6e67
1 Return-Path: <Sebastian@SSpaeth.de>\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 86CCA4196F4\r
6         for <notmuch@notmuchmail.org>; Tue,  6 Apr 2010 00:12:56 -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.9\r
10 X-Spam-Level: \r
11 X-Spam-Status: No, score=-1.9 tagged_above=-999 required=5\r
12         tests=[BAYES_00=-1.9] autolearn=ham\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 8LooBS3yXlrK for <notmuch@notmuchmail.org>;\r
16         Tue,  6 Apr 2010 00:12:55 -0700 (PDT)\r
17 Received: from homiemail-a19.g.dreamhost.com (caiajhbdcbef.dreamhost.com\r
18         [208.97.132.145])\r
19         by olra.theworths.org (Postfix) with ESMTP id B16484196F5\r
20         for <notmuch@notmuchmail.org>; Tue,  6 Apr 2010 00:12:55 -0700 (PDT)\r
21 Received: from localhost.localdomain (mtec-hg-docking-1-dhcp-204.ethz.ch\r
22         [129.132.133.204])\r
23         by homiemail-a19.g.dreamhost.com (Postfix) with ESMTPA id 5746260406C; \r
24         Tue,  6 Apr 2010 00:12:54 -0700 (PDT)\r
25 From: Sebastian Spaeth <Sebastian@SSpaeth.de>\r
26 To: notmuch@notmuchmail.org\r
27 Subject: [PATCH 2/2] notmuch.el: Add support for reply-to sender\r
28 Date: Tue,  6 Apr 2010 09:12:46 +0200\r
29 Message-Id: <1270537966-19324-2-git-send-email-Sebastian@SSpaeth.de>\r
30 X-Mailer: git-send-email 1.6.3.3\r
31 In-Reply-To: <1270537966-19324-1-git-send-email-Sebastian@SSpaeth.de>\r
32 References: <87mxxhgims.fsf@SSpaeth.de>\r
33         <1270537966-19324-1-git-send-email-Sebastian@SSpaeth.de>\r
34 Cc: "Aneesh Kumar K.V" <aneesh.kumar@gmail.com>\r
35 X-BeenThere: notmuch@notmuchmail.org\r
36 X-Mailman-Version: 2.1.13\r
37 Precedence: list\r
38 List-Id: "Use and development of the notmuch mail system."\r
39         <notmuch.notmuchmail.org>\r
40 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
41         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
42 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
43 List-Post: <mailto:notmuch@notmuchmail.org>\r
44 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
45 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
46         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
47 X-List-Received-Date: Tue, 06 Apr 2010 07:12:56 -0000\r
48 \r
49 From: Aneesh Kumar K.V <aneesh.kumar@gmail.com>\r
50 \r
51 Add key binding to do a reply-to sender. This is mapped to 'R'\r
52 \r
53 Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@gmail.com>\r
54 Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>\r
55 ---\r
56  emacs/notmuch-show.el |   21 ++++++++++++++++++++-\r
57  1 files changed, 20 insertions(+), 1 deletions(-)\r
58 \r
59 diff --git a/emacs/notmuch-show.el b/emacs/notmuch-show.el\r
60 index cc1f905..3d89861 100644\r
61 --- a/emacs/notmuch-show.el\r
62 +++ b/emacs/notmuch-show.el\r
63 @@ -63,7 +63,8 @@\r
64      (define-key map "s" 'notmuch-search)\r
65      (define-key map "m" 'message-mail)\r
66      (define-key map "f" 'notmuch-show-forward-current)\r
67 -    (define-key map "r" 'notmuch-show-reply)\r
68 +    (define-key map "r" 'notmuch-show-reply-all)\r
69 +    (define-key map "R" 'notmuch-show-reply)\r
70      (define-key map "|" 'notmuch-show-pipe-message)\r
71      (define-key map "w" 'notmuch-show-save-attachments)\r
72      (define-key map "V" 'notmuch-show-view-raw-message)\r
73 @@ -360,10 +361,28 @@ buffer."\r
74        mm-handle (> (notmuch-count-attachments mm-handle) 1))))\r
75    (message "Done"))\r
76  \r
77 +(defun notmuch-recipient-reply (recipient query-string)\r
78 +  (switch-to-buffer (generate-new-buffer "notmuch-draft"))\r
79 +  (call-process notmuch-command nil t nil "reply"\r
80 +               (concat "--recipient=" recipient) query-string)\r
81 +  (message-insert-signature)\r
82 +  (goto-char (point-min))\r
83 +  (if (re-search-forward "^$" nil t)\r
84 +      (progn\r
85 +       (insert "--text follows this line--")\r
86 +       (forward-line)))\r
87 +  (message-mode))\r
88 +\r
89  (defun notmuch-show-reply ()\r
90    "Begin composing a reply to the current message in a new buffer."\r
91    (interactive)\r
92    (let ((message-id (notmuch-show-get-message-id)))\r
93 +    (notmuch-recipient-reply "sender" message-id)))\r
94 +\r
95 +(defun notmuch-show-reply-all ()\r
96 +  "Begin composing a reply to the current message in a new buffer."\r
97 +  (interactive)\r
98 +  (let ((message-id (notmuch-show-get-message-id)))\r
99      (notmuch-reply message-id)))\r
100  \r
101  (defun notmuch-show-forward-current ()\r
102 -- \r
103 1.6.3.3\r
104 \r