1 Return-Path: <jrollins@finestructure.net>
\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 3C6D5431FC0
\r
6 for <notmuch@notmuchmail.org>; Sun, 6 Apr 2014 23:40:21 -0700 (PDT)
\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org
\r
11 X-Spam-Status: No, score=-2.3 tagged_above=-999 required=5
\r
12 tests=[RCVD_IN_DNSWL_MED=-2.3] 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 Vx6imgSaXmPy for <notmuch@notmuchmail.org>;
\r
16 Sun, 6 Apr 2014 23:40:16 -0700 (PDT)
\r
17 Received: from outgoing-mail.its.caltech.edu (outgoing-mail.its.caltech.edu
\r
19 by olra.theworths.org (Postfix) with ESMTP id C4BEF431FBF
\r
20 for <notmuch@notmuchmail.org>; Sun, 6 Apr 2014 23:40:16 -0700 (PDT)
\r
21 Received: from earth-doxen.imss.caltech.edu (localhost [127.0.0.1])
\r
22 by earth-doxen-postvirus (Postfix) with ESMTP id 8CB8A66E01B8
\r
23 for <notmuch@notmuchmail.org>; Sun, 6 Apr 2014 23:40:16 -0700 (PDT)
\r
24 X-Spam-Scanned: at Caltech-IMSS on earth-doxen by amavisd-new
\r
25 Received: from finestructure.net (cpe-107-185-189-81.socal.res.rr.com
\r
26 [107.185.189.81]) (Authenticated sender: jrollins)
\r
27 by earth-doxen-submit (Postfix) with ESMTP id 20FF366E0151
\r
28 for <notmuch@notmuchmail.org>; Sun, 6 Apr 2014 23:40:15 -0700 (PDT)
\r
29 Received: by finestructure.net (Postfix, from userid 1000)
\r
30 id CA39F60187; Sun, 6 Apr 2014 23:40:14 -0700 (PDT)
\r
31 From: Jameson Graef Rollins <jrollins@finestructure.net>
\r
32 To: Notmuch Mail <notmuch@notmuchmail.org>
\r
33 Subject: [PATCH] emacs: process crypto for reply only when specified
\r
34 Date: Sun, 6 Apr 2014 23:40:14 -0700
\r
35 Message-Id: <1396852814-10338-1-git-send-email-jrollins@finestructure.net>
\r
36 X-Mailer: git-send-email 1.9.1
\r
37 In-Reply-To: <1396689486-19232-1-git-send-email-jani@nikula.org>
\r
38 References: <1396689486-19232-1-git-send-email-jani@nikula.org>
\r
39 X-BeenThere: notmuch@notmuchmail.org
\r
40 X-Mailman-Version: 2.1.13
\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: Mon, 07 Apr 2014 06:40:21 -0000
\r
53 This is a tweak to patch "emacs: sign/encrypt replies to
\r
54 signed/encrypted messages" to only add mml crypto flags for replys
\r
55 when crypto processing has been activated.
\r
59 Thanks to mjw1009 for implementation suggestions.
\r
61 Jani, you might consider squashing this with your original for a v2.
\r
62 Pushing them separately seems fine to me as well.
\r
67 emacs/notmuch-mua.el | 6 ++++--
\r
68 1 file changed, 4 insertions(+), 2 deletions(-)
\r
70 diff --git a/emacs/notmuch-mua.el b/emacs/notmuch-mua.el
\r
71 index 9fb84b5..bf6253f 100644
\r
72 --- a/emacs/notmuch-mua.el
\r
73 +++ b/emacs/notmuch-mua.el
\r
74 @@ -160,9 +160,10 @@ list."
\r
76 (defun notmuch-mua-reply (query-string &optional sender reply-all)
\r
77 (let ((args '("reply" "--format=sexp" "--format-version=1"))
\r
78 + (process-crypto notmuch-show-process-crypto)
\r
81 - (when notmuch-show-process-crypto
\r
82 + (when process-crypto
\r
83 (setq args (append args '("--decrypt"))))
\r
86 @@ -236,7 +237,8 @@ list."
\r
87 (message-cite-original)))
\r
89 ;; Sign and/or encrypt replies to signed and/or encrypted messages.
\r
90 - (notmuch-mua-reply-crypto (plist-get original :body)))
\r
91 + (when process-crypto
\r
92 + (notmuch-mua-reply-crypto (plist-get original :body))))
\r
94 ;; Push mark right before signature, if any.
\r
95 (message-goto-signature)
\r