Return-Path: X-Original-To: notmuch@notmuchmail.org Delivered-To: notmuch@notmuchmail.org Received: from localhost (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id 3C6D5431FC0 for ; Sun, 6 Apr 2014 23:40:21 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org X-Spam-Flag: NO X-Spam-Score: -2.3 X-Spam-Level: X-Spam-Status: No, score=-2.3 tagged_above=-999 required=5 tests=[RCVD_IN_DNSWL_MED=-2.3] autolearn=disabled Received: from olra.theworths.org ([127.0.0.1]) by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Vx6imgSaXmPy for ; Sun, 6 Apr 2014 23:40:16 -0700 (PDT) Received: from outgoing-mail.its.caltech.edu (outgoing-mail.its.caltech.edu [131.215.239.19]) by olra.theworths.org (Postfix) with ESMTP id C4BEF431FBF for ; Sun, 6 Apr 2014 23:40:16 -0700 (PDT) Received: from earth-doxen.imss.caltech.edu (localhost [127.0.0.1]) by earth-doxen-postvirus (Postfix) with ESMTP id 8CB8A66E01B8 for ; Sun, 6 Apr 2014 23:40:16 -0700 (PDT) X-Spam-Scanned: at Caltech-IMSS on earth-doxen by amavisd-new Received: from finestructure.net (cpe-107-185-189-81.socal.res.rr.com [107.185.189.81]) (Authenticated sender: jrollins) by earth-doxen-submit (Postfix) with ESMTP id 20FF366E0151 for ; Sun, 6 Apr 2014 23:40:15 -0700 (PDT) Received: by finestructure.net (Postfix, from userid 1000) id CA39F60187; Sun, 6 Apr 2014 23:40:14 -0700 (PDT) From: Jameson Graef Rollins To: Notmuch Mail Subject: [PATCH] emacs: process crypto for reply only when specified Date: Sun, 6 Apr 2014 23:40:14 -0700 Message-Id: <1396852814-10338-1-git-send-email-jrollins@finestructure.net> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1396689486-19232-1-git-send-email-jani@nikula.org> References: <1396689486-19232-1-git-send-email-jani@nikula.org> X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: "Use and development of the notmuch mail system." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 07 Apr 2014 06:40:21 -0000 This is a tweak to patch "emacs: sign/encrypt replies to signed/encrypted messages" to only add mml crypto flags for replys when crypto processing has been activated. --- Thanks to mjw1009 for implementation suggestions. Jani, you might consider squashing this with your original for a v2. Pushing them separately seems fine to me as well. jamie. --- emacs/notmuch-mua.el | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/emacs/notmuch-mua.el b/emacs/notmuch-mua.el index 9fb84b5..bf6253f 100644 --- a/emacs/notmuch-mua.el +++ b/emacs/notmuch-mua.el @@ -160,9 +160,10 @@ list." (defun notmuch-mua-reply (query-string &optional sender reply-all) (let ((args '("reply" "--format=sexp" "--format-version=1")) + (process-crypto notmuch-show-process-crypto) reply original) - (when notmuch-show-process-crypto + (when process-crypto (setq args (append args '("--decrypt")))) (if reply-all @@ -236,7 +237,8 @@ list." (message-cite-original))) ;; Sign and/or encrypt replies to signed and/or encrypted messages. - (notmuch-mua-reply-crypto (plist-get original :body))) + (when process-crypto + (notmuch-mua-reply-crypto (plist-get original :body)))) ;; Push mark right before signature, if any. (message-goto-signature) -- 1.9.1