From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from localhost (localhost [127.0.0.1]) by arlo.cworth.org (Postfix) with ESMTP id 603436DE10E8 for ; Sun, 11 Sep 2016 09:08:48 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at cworth.org X-Spam-Flag: NO X-Spam-Score: -0.361 X-Spam-Level: X-Spam-Status: No, score=-0.361 tagged_above=-999 required=5 tests=[AWL=0.209, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_PASS=-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 tUeCzbTVwgtO for ; Sun, 11 Sep 2016 09:08:46 -0700 (PDT) Received: from mail-wm0-f67.google.com (mail-wm0-f67.google.com [74.125.82.67]) by arlo.cworth.org (Postfix) with ESMTPS id 5F6D16DE1034 for ; Sun, 11 Sep 2016 09:08:46 -0700 (PDT) Received: by mail-wm0-f67.google.com with SMTP id a6so10211588wmc.2 for ; Sun, 11 Sep 2016 09:08:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id; bh=WfhxbUHEJMJRav3QmFAXj5HW7zJAc4UnbVHlRyq6Qko=; b=ooRjLJLnzNVGyTdS267Cbz6NFtOXct8+9Yk+faWjFA/pkTNKTIV6dxbygcUlhhJ7ZD 3uadcqJ87Tm6+jv+F8rPYtVmEilEhDOquM0gWfef3kEVFMXpT/lg9NVx1Bchsdls9nfP jJt8ktoanivNqvGwM9R3+ANpJ4rwMOLxnBWSbAIMqAv+v4rBc+6JHzRVuT6cDnDNn4L2 X5m24pln166ot1cv1YB+FPd95Lt79fBZllLZy8dU0jWuDTikoUnG7HGsAKt6aMY/tIBr sfCAkIAK6fcfDErYQezUCgRgj6kRaG9XlFFsyzA9cwZv3RGvsVXaUuv/1gNGhVxWqFd8 E1OQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=WfhxbUHEJMJRav3QmFAXj5HW7zJAc4UnbVHlRyq6Qko=; b=U/F0yA7bNkYlVsepYps1KDWyo4RKbwCorujRfAitA49zMIAq8vV3EDd90vmj91D0Iy 3BlEkDJGvo6+IFVTEkDinqtSG/t2tkU2QuUzdatI+mwp7E7hnAbhzRkhcEOn46kZHfZs MN4gQtbukkEGeUp9KlEww46fj/e766+Xvy/ZpgR3vgyR8HxhN6QWuvDsGvz4o6wdnp3B 10VIFC2QPF0jumrHJ0WmnT20TCsBsSCWZLu79M2GZ0rVx9v4wp3MCdpp4CucrFxTJVmH BvlPWg/w0mhzgX1MbPjufONPBGfWjn+2dik0IuYwOc0+98GFdiCthwrgCWO3KMu0Ms5i j1fQ== X-Gm-Message-State: AE9vXwPoa4XiaJzSlFsd0fqUDEHxKbHBl5kcLgeDUoAwjDIdWtJcL1+Bwy7igtpx96rPBg== X-Received: by 10.28.150.145 with SMTP id y139mr6514623wmd.112.1473610124820; Sun, 11 Sep 2016 09:08:44 -0700 (PDT) Received: from localhost (5751dfa2.skybroadband.com. [87.81.223.162]) by smtp.gmail.com with ESMTPSA id s8sm13533873wjz.29.2016.09.11.09.08.43 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 11 Sep 2016 09:08:44 -0700 (PDT) From: Mark Walters To: notmuch@notmuchmail.org Subject: [PATCH] emacs: reply: remove wrong sig/enc status buttons Date: Sun, 11 Sep 2016 17:08:41 +0100 Message-Id: <1473610121-4450-1-git-send-email-markwalters1009@gmail.com> X-Mailer: git-send-email 2.1.4 X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.22 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: Sun, 11 Sep 2016 16:08:48 -0000 This stopps the (usually incorrect) sigstatus and encstatus buttons appearing when replying in emacs, and updates the test suite to match. Overriding the status button functions is a little unusual but much less intrusive than passing an argument all the way down the call chain. It also makes it clear exactly what it does. --- I dont't have any encrypted messages for testing but it seems to work on signed messages (but even that is very lightly tested). Best wishes Mark emacs/notmuch-mua.el | 7 +++++-- test/T310-emacs.sh | 2 -- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/emacs/notmuch-mua.el b/emacs/notmuch-mua.el index fadf20f..55bc267 100644 --- a/emacs/notmuch-mua.el +++ b/emacs/notmuch-mua.el @@ -253,8 +253,11 @@ mutiple parts get a header." (notmuch-show-insert-header-p-function notmuch-mua-reply-insert-header-p-function) ;; Don't indent multipart sub-parts. (notmuch-show-indent-multipart nil)) - (notmuch-show-insert-body original (plist-get original :body) 0) - (buffer-substring-no-properties (point-min) (point-max))))) + ;; We don't want sigstatus buttons (an information leak and usually wrong anyway). + (letf (((symbol-function 'notmuch-crypto-insert-sigstatus-button) #'ignore) + ((symbol-function 'notmuch-crypto-insert-encstatus-button) #'ignore)) + (notmuch-show-insert-body original (plist-get original :body) 0) + (buffer-substring-no-properties (point-min) (point-max)))))) (set-mark (point)) (goto-char start) diff --git a/test/T310-emacs.sh b/test/T310-emacs.sh index 202fc3b..21675b6 100755 --- a/test/T310-emacs.sh +++ b/test/T310-emacs.sh @@ -384,8 +384,6 @@ References: <20091118002059.067214ed@hikari> --text follows this line-- Adrian Perez de Castro writes: -> [ Unknown signature status ] -> > Hello to all, > > I have just heard about Not Much today in some random Linux-related news -- 2.1.4