[PATCH 3/4] test: add S/MIME signature verification test for notmuch CLI
[notmuch-archives.git] / 34 / acefcbe87a325684157f17fd0dce745cd2ca6f
1 Return-Path: <tomi.ollila@iki.fi>\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 29C56431E62\r
6         for <notmuch@notmuchmail.org>; Wed, 21 Aug 2013 13:23:49 -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: 0\r
10 X-Spam-Level: \r
11 X-Spam-Status: No, score=0 tagged_above=-999 required=5 tests=[none]\r
12         autolearn=disabled\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 bZjkjPjtBIHg for <notmuch@notmuchmail.org>;\r
16         Wed, 21 Aug 2013 13:23:39 -0700 (PDT)\r
17 Received: from guru.guru-group.fi (guru.guru-group.fi [46.183.73.34])\r
18         by olra.theworths.org (Postfix) with ESMTP id 8493A431FC2\r
19         for <notmuch@notmuchmail.org>; Wed, 21 Aug 2013 13:23:39 -0700 (PDT)\r
20 Received: from guru.guru-group.fi (localhost [IPv6:::1])\r
21         by guru.guru-group.fi (Postfix) with ESMTP id 97AAE100086;\r
22         Wed, 21 Aug 2013 23:23:33 +0300 (EEST)\r
23 From: Tomi Ollila <tomi.ollila@iki.fi>\r
24 To: Mark Walters <markwalters1009@gmail.com>, notmuch@notmuchmail.org\r
25 Subject: Re: [PATCH v2 11/11] contrib: pick: use close-message-pane for reply\r
26         etc\r
27 In-Reply-To: <1376828079-21455-12-git-send-email-markwalters1009@gmail.com>\r
28 References: <1376828079-21455-1-git-send-email-markwalters1009@gmail.com>\r
29         <1376828079-21455-12-git-send-email-markwalters1009@gmail.com>\r
30 User-Agent: Notmuch/0.16+3~g340c058 (http://notmuchmail.org) Emacs/24.3.1\r
31         (x86_64-unknown-linux-gnu)\r
32 X-Face: HhBM'cA~<r"^Xv\KRN0P{vn'Y"Kd;zg_y3S[4)KSN~s?O\"QPoL\r
33         $[Xv_BD:i/F$WiEWax}R(MPS`^UaptOGD`*/=@\1lKoVa9tnrg0TW?"r7aRtgk[F\r
34         !)g;OY^,BjTbr)Np:%c_o'jj,Z\r
35 Date: Wed, 21 Aug 2013 23:23:33 +0300\r
36 Message-ID: <m238q294je.fsf@guru.guru-group.fi>\r
37 MIME-Version: 1.0\r
38 Content-Type: text/plain\r
39 X-BeenThere: notmuch@notmuchmail.org\r
40 X-Mailman-Version: 2.1.13\r
41 Precedence: list\r
42 List-Id: "Use and development of the notmuch mail system."\r
43         <notmuch.notmuchmail.org>\r
44 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
45         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
46 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
47 List-Post: <mailto:notmuch@notmuchmail.org>\r
48 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
49 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
50         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
51 X-List-Received-Date: Wed, 21 Aug 2013 20:23:49 -0000\r
52 \r
53 On Sun, Aug 18 2013, Mark Walters <markwalters1009@gmail.com> wrote:\r
54 \r
55 > We can save some code duplication by using the new close-message-pane\r
56 > functionality for reply, forward, and new mail.\r
57 > ---\r
58 >  contrib/notmuch-pick/notmuch-pick.el |   43 +++------------------------------\r
59 >  1 files changed, 4 insertions(+), 39 deletions(-)\r
60 >\r
61 > diff --git a/contrib/notmuch-pick/notmuch-pick.el b/contrib/notmuch-pick/notmuch-pick.el\r
62 > index 0e10c7c..3b86a5a 100644\r
63 > --- a/contrib/notmuch-pick/notmuch-pick.el\r
64 > +++ b/contrib/notmuch-pick/notmuch-pick.el\r
65 > @@ -236,6 +236,10 @@ FUNC."\r
66 >      (define-key map "e" (notmuch-pick-to-message-pane #'notmuch-pick-button-activate))\r
67 >  \r
68 >      ;; bindings from show (or elsewhere) but we close the message pane first.\r
69 > +    (define-key map "m" (notmuch-pick-close-message-pane-and #'notmuch-mua-new-mail))\r
70 > +    (define-key map "f" (notmuch-pick-close-message-pane-and #'notmuch-show-forward-message))\r
71 > +    (define-key map "r" (notmuch-pick-close-message-pane-and #'notmuch-show-reply-sender))\r
72 > +    (define-key map "R" (notmuch-pick-close-message-pane-and #'notmuch-show-reply))\r
73 >      (define-key map "V" (notmuch-pick-close-message-pane-and #'notmuch-show-view-raw-message))\r
74 >      (define-key map "?" (notmuch-pick-close-message-pane-and #'notmuch-help))\r
75 >  \r
76 > @@ -246,10 +250,6 @@ FUNC."\r
77 >      (define-key map "=" 'notmuch-pick-refresh-view)\r
78 >      (define-key map "s" 'notmuch-pick-to-search)\r
79 >      (define-key map "z" 'notmuch-pick-to-pick)\r
80 > -    (define-key map "m" 'notmuch-pick-new-mail)\r
81 > -    (define-key map "f" 'notmuch-pick-forward-message)\r
82 > -    (define-key map "r" 'notmuch-pick-reply-sender)\r
83 > -    (define-key map "R" 'notmuch-pick-reply)\r
84 >      (define-key map "n" 'notmuch-pick-next-matching-message)\r
85 >      (define-key map "p" 'notmuch-pick-prev-matching-message)\r
86 >      (define-key map "N" 'notmuch-pick-next-message)\r
87 > @@ -599,41 +599,6 @@ message will be \"unarchived\", i.e. the tag changes in\r
88 >                        target\r
89 >                        (get-buffer buffer-name))))\r
90 >  \r
91 > -(defmacro with-current-notmuch-pick-message (&rest body)\r
92 > -  "Evaluate body with current buffer set to the text of current message"\r
93 > -  `(save-excursion\r
94 > -     (let ((id (notmuch-pick-get-message-id)))\r
95 > -       (let ((buf (generate-new-buffer (concat "*notmuch-msg-" id "*"))))\r
96 > -         (with-current-buffer buf\r
97 > -         (call-process notmuch-command nil t nil "show" "--format=raw" id)\r
98 > -           ,@body)\r
99 > -      (kill-buffer buf)))))\r
100 > -\r
101 > -(defun notmuch-pick-new-mail (&optional prompt-for-sender)\r
102 > -  "Compose new mail."\r
103 > -  (interactive "P")\r
104 > -  (notmuch-pick-close-message-window)\r
105 > -  (notmuch-mua-new-mail prompt-for-sender ))\r
106 \r
107 This patch series generally LGTM. The only question I have left is how much\r
108 it matters that e.g. the pick keybinding for new mail cannot use prefix\r
109 argument to make notmuch-mua-new-mail to prompt-for-sender. Also, how is it\r
110 made possible that with-current-notmuch-pick-message is not needed anymore ?\r
111 \r
112 Maybe, if there is problem with this prompt-for-sender, a followup patch\r
113 could create another function like `notmuch-pick-close-message-pane-and`\r
114 which does `(lambda (&optional arg)... and (interactive "P"). and use\r
115 that in some keybindings.\r
116 \r
117 Tomi\r
118 \r
119 > -\r
120 > -(defun notmuch-pick-forward-message (&optional prompt-for-sender)\r
121 > -  "Forward the current message."\r
122 > -  (interactive "P")\r
123 > -  (notmuch-pick-close-message-window)\r
124 > -  (with-current-notmuch-pick-message\r
125 > -   (notmuch-mua-new-forward-message prompt-for-sender)))\r
126 > -\r
127 > -(defun notmuch-pick-reply (&optional prompt-for-sender)\r
128 > -  "Reply to the sender and all recipients of the current message."\r
129 > -  (interactive "P")\r
130 > -  (notmuch-pick-close-message-window)\r
131 > -  (notmuch-mua-new-reply (notmuch-pick-get-message-id) prompt-for-sender t))\r
132 > -\r
133 > -(defun notmuch-pick-reply-sender (&optional prompt-for-sender)\r
134 > -  "Reply to the sender of the current message."\r
135 > -  (interactive "P")\r
136 > -  (notmuch-pick-close-message-window)\r
137 > -  (notmuch-mua-new-reply (notmuch-pick-get-message-id) prompt-for-sender nil))\r
138 > -\r
139 >  (defun notmuch-pick-clean-address (address)\r
140 >    "Try to clean a single email ADDRESS for display. Return\r
141 >  AUTHOR_NAME if present, otherwise return AUTHOR_EMAIL. Return\r
142 > -- \r
143 > 1.7.9.1\r
144 >\r
145 > _______________________________________________\r
146 > notmuch mailing list\r
147 > notmuch@notmuchmail.org\r
148 > http://notmuchmail.org/mailman/listinfo/notmuch\r