Return-Path: X-Original-To: notmuch@notmuchmail.org Delivered-To: notmuch@notmuchmail.org Received: from localhost (localhost [127.0.0.1]) by arlo.cworth.org (Postfix) with ESMTP id 257FD6DE02CE for ; Tue, 9 Feb 2016 04:24:00 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at cworth.org X-Spam-Flag: NO X-Spam-Score: -0.045 X-Spam-Level: X-Spam-Status: No, score=-0.045 tagged_above=-999 required=5 tests=[AWL=0.022, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_NEUTRAL=0.652, UNPARSEABLE_RELAY=0.001] autolearn=disabled Received: from arlo.cworth.org ([127.0.0.1]) by localhost (arlo.cworth.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id TDLzUiLMy7oG for ; Tue, 9 Feb 2016 04:23:58 -0800 (PST) Received: from mail-wm0-f68.google.com (mail-wm0-f68.google.com [74.125.82.68]) by arlo.cworth.org (Postfix) with ESMTPS id 7CCA66DE103A for ; Tue, 9 Feb 2016 04:23:57 -0800 (PST) Received: by mail-wm0-f68.google.com with SMTP id g62so3112152wme.2 for ; Tue, 09 Feb 2016 04:23:57 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=dme-org.20150623.gappssmtp.com; s=20150623; h=from:to:subject:date:message-id:in-reply-to:references; bh=FpkU1cEESHbESLW0neDnT8mDZOooZG+SpHGxi4qXqWM=; b=uroYL4e4q+uQUKkgpnqRVbQR/j1y3CfzWGJSy5iJx3KvDo/SRkxL3Y+Z6a6JcXHzI/ kcADodQ/kuIKevqCcuioC2p9i4Gnk1VIrXthEeknlTox3HvDXkG5Y5TywuRNqPykTVX5 WCEqPxA6z8+Y3kFDgMoxskmKHArvGuOYnGMoNFVXrW9SFKRFW83D9+NMuNdYJmlIQUIt Ikms5+KZ6eskCk+upPcDL0+BTHBdexaYklcykKckph74nVqYOF9ZefRBT4znAh6G8dmc JHZb5AlT1847aZSIlZAyKXQgDfvIoSLoU5agl/pVtoMNuU68D0q9L2HQ88naI9FITwMt kXqQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references; bh=FpkU1cEESHbESLW0neDnT8mDZOooZG+SpHGxi4qXqWM=; b=ESwbWKmmL0eTEZUmE6UoDtzhdNN9H+MW8pNJkXqnza67hnsLHMxrfoSifREO0UuaTd HBzpF9TzG7E6VnX7hHw66FtmRkQYt3ElNvQgBZuZ0+JGI17Id6tKc1tZ3tWekm0Re4I0 lMh1vZQdbxChnaOADkNpVO9/ELzMMHhZd4bO/Qs+amGpomqf6gcqRpJGC6eRdFmoCr9R 4DkrP9o+ZcwLxuQijxtblJy/a+FRAdnrURsaP6vfgcjKoHMwKasVLaQfmh7EFOjER8eJ luYg+jainEHpHd9Xa3hu5oealAYsqEx87zx5ZKFi81EOH2q/I/2nsCbU9AIM8VlnbZVY WBgA== X-Gm-Message-State: AG10YORUTVgOWt3vOa5jud6k8CCqDGR6vPWQzU2EwfWR6sr6FUmlOfmpRvBJueGU8FqD1g== X-Received: by 10.28.175.193 with SMTP id y184mr4918689wme.62.1455020636174; Tue, 09 Feb 2016 04:23:56 -0800 (PST) Received: from disaster-area.hh.sledj.net ([2a01:348:1a2:1:ea39:35ff:fe2c:a227]) by smtp.gmail.com with ESMTPSA id l7sm34513729wjx.14.2016.02.09.04.23.54 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 09 Feb 2016 04:23:54 -0800 (PST) Received: from localhost (disaster-area.hh.sledj.net [local]) by disaster-area.hh.sledj.net (OpenSMTPD) with ESMTPA id c510b3a9 for ; Tue, 9 Feb 2016 12:23:51 +0000 (UTC) From: David Edmondson To: notmuch@notmuchmail.org Subject: [PATCH v1 2/3] emacs: Always insert crypto buttons. Date: Tue, 9 Feb 2016 12:23:50 +0000 Message-Id: <1455020631-15646-3-git-send-email-dme@dme.org> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1455020631-15646-1-git-send-email-dme@dme.org> References: <1455020631-15646-1-git-send-email-dme@dme.org> X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.20 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: Tue, 09 Feb 2016 12:24:00 -0000 When no decryption or signature examination is happening (i.e. `notmuch-crypto-process-mime' is `nil') insert buttons that indicate this, rather than remaining silent. --- emacs/notmuch-show.el | 29 +++++++++++------------------ 1 file changed, 11 insertions(+), 18 deletions(-) diff --git a/emacs/notmuch-show.el b/emacs/notmuch-show.el index 3345878..4bc5811 100644 --- a/emacs/notmuch-show.el +++ b/emacs/notmuch-show.el @@ -646,13 +646,10 @@ will return nil if the CID is unknown or cannot be retrieved." (defun notmuch-show-insert-part-multipart/signed (msg part content-type nth depth button) (button-put button 'face 'notmuch-crypto-part-header) - ;; add signature status button if sigstatus provided - (if (plist-member part :sigstatus) - (let* ((from (notmuch-show-get-header :From msg)) - (sigstatus (car (plist-get part :sigstatus)))) - (notmuch-crypto-insert-sigstatus-button sigstatus from)) - ;; if we're not adding sigstatus, tell the user how they can get it - (button-put button 'help-echo "Set notmuch-crypto-process-mime to process cryptographic MIME parts.")) + + ;; Insert a button detailing the signature status. + (notmuch-crypto-insert-sigstatus-button (car (plist-get part :sigstatus)) + (notmuch-show-get-header :From msg)) (let ((inner-parts (plist-get part :content)) (start (point))) @@ -667,17 +664,13 @@ will return nil if the CID is unknown or cannot be retrieved." (defun notmuch-show-insert-part-multipart/encrypted (msg part content-type nth depth button) (button-put button 'face 'notmuch-crypto-part-header) - ;; add encryption status button if encstatus specified - (if (plist-member part :encstatus) - (let ((encstatus (car (plist-get part :encstatus)))) - (notmuch-crypto-insert-encstatus-button encstatus) - ;; add signature status button if sigstatus specified - (if (plist-member part :sigstatus) - (let* ((from (notmuch-show-get-header :From msg)) - (sigstatus (car (plist-get part :sigstatus)))) - (notmuch-crypto-insert-sigstatus-button sigstatus from)))) - ;; if we're not adding encstatus, tell the user how they can get it - (button-put button 'help-echo "Set notmuch-crypto-process-mime to process cryptographic MIME parts.")) + + ;; Insert a button detailing the encryption status. + (notmuch-crypto-insert-encstatus-button (car (plist-get part :encstatus))) + + ;; Insert a button detailing the signature status. + (notmuch-crypto-insert-sigstatus-button (car (plist-get part :sigstatus)) + (notmuch-show-get-header :From msg)) (let ((inner-parts (plist-get part :content)) (start (point))) -- 2.1.4