* [PATCH v2 0/2] Always insert crypto buttons.
@ 2016-04-03 15:38 David Edmondson
2016-04-03 15:38 ` [PATCH v2 1/2] emacs: " David Edmondson
2016-04-03 15:38 ` [PATCH v2 2/2] Test: Fix tests David Edmondson
0 siblings, 2 replies; 5+ messages in thread
From: David Edmondson @ 2016-04-03 15:38 UTC (permalink / raw)
To: notmuch
Always insert crypto buttons.
This set of patches is in response to the discussion started in
id:87silucnfx.fsf@maritornes.cs.unb.ca and specifically the comments
from dkg in id:53CDEAE8.3000607@fifthhorseman.net.
v2:
- Merge forward.
- Fix new test.
David Edmondson (2):
emacs: Always insert crypto buttons.
Test: Fix tests.
emacs/notmuch-show.el | 34 +++++++---------------
test/T310-emacs.sh | 2 ++
.../notmuch-show-elide-non-matching-messages-off | 3 ++
.../notmuch-show-elide-non-matching-messages-on | 3 ++
.../notmuch-show-indent-thread-content-off | 3 ++
.../notmuch-show-process-crypto-mime-parts-off | 1 +
.../notmuch-show-thread-maildir-storage | 4 +++
...hread-maildir-storage-with-fourfold-indentation | 4 +++
...show-thread-maildir-storage-without-indentation | 4 +++
test/tree.expected-output/notmuch-tree-show-window | 1 +
10 files changed, 36 insertions(+), 23 deletions(-)
--
2.1.4
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH v2 1/2] emacs: Always insert crypto buttons.
2016-04-03 15:38 [PATCH v2 0/2] Always insert crypto buttons David Edmondson
@ 2016-04-03 15:38 ` David Edmondson
2016-04-09 19:41 ` David Bremner
2016-04-03 15:38 ` [PATCH v2 2/2] Test: Fix tests David Edmondson
1 sibling, 1 reply; 5+ messages in thread
From: David Edmondson @ 2016-04-03 15:38 UTC (permalink / raw)
To: notmuch
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 | 34 +++++++++++-----------------------
1 file changed, 11 insertions(+), 23 deletions(-)
diff --git a/emacs/notmuch-show.el b/emacs/notmuch-show.el
index 7c34449..fcb539a 100644
--- a/emacs/notmuch-show.el
+++ b/emacs/notmuch-show.el
@@ -642,15 +642,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)
(when 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 the signature status, tell the user how
- ;; they can get it.
- (when button
- (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)))
@@ -666,20 +661,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)
(when button
(button-put button 'face 'notmuch-crypto-part-header))
- ;; Add encryption status button if encryption status is specified.
- (if (plist-member part :encstatus)
- (let ((encstatus (car (plist-get part :encstatus))))
- (notmuch-crypto-insert-encstatus-button encstatus)
- ;; Add signature status button if signature status is
- ;; 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 the encryption status, tell the user how
- ;; they can get it.
- (when button
- (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
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH v2 2/2] Test: Fix tests.
2016-04-03 15:38 [PATCH v2 0/2] Always insert crypto buttons David Edmondson
2016-04-03 15:38 ` [PATCH v2 1/2] emacs: " David Edmondson
@ 2016-04-03 15:38 ` David Edmondson
2016-04-10 23:53 ` David Bremner
1 sibling, 1 reply; 5+ messages in thread
From: David Edmondson @ 2016-04-03 15:38 UTC (permalink / raw)
To: notmuch
---
test/T310-emacs.sh | 2 ++
.../notmuch-show-elide-non-matching-messages-off | 3 +++
.../notmuch-show-elide-non-matching-messages-on | 3 +++
.../emacs-show.expected-output/notmuch-show-indent-thread-content-off | 3 +++
.../notmuch-show-process-crypto-mime-parts-off | 1 +
test/emacs.expected-output/notmuch-show-thread-maildir-storage | 4 ++++
.../notmuch-show-thread-maildir-storage-with-fourfold-indentation | 4 ++++
.../notmuch-show-thread-maildir-storage-without-indentation | 4 ++++
test/tree.expected-output/notmuch-tree-show-window | 1 +
9 files changed, 25 insertions(+)
diff --git a/test/T310-emacs.sh b/test/T310-emacs.sh
index 43b9973..daa0256 100755
--- a/test/T310-emacs.sh
+++ b/test/T310-emacs.sh
@@ -394,6 +394,8 @@ User-Agent: Notmuch/XXX Emacs/XXX
--text follows this line--
Adrian Perez de Castro <aperez@igalia.com> writes:
+> [ Unknown signature status ]
+>
> Hello to all,
>
> I have just heard about Not Much today in some random Linux-related news
diff --git a/test/emacs-show.expected-output/notmuch-show-elide-non-matching-messages-off b/test/emacs-show.expected-output/notmuch-show-elide-non-matching-messages-off
index b31fe62..9f1e91f 100644
--- a/test/emacs-show.expected-output/notmuch-show-elide-non-matching-messages-off
+++ b/test/emacs-show.expected-output/notmuch-show-elide-non-matching-messages-off
@@ -5,6 +5,7 @@ Date: Tue, 17 Nov 2009 14:00:54 -0500
[ multipart/mixed ]
[ multipart/signed ]
+[ Unknown signature status ]
[ text/plain ]
I saw the LWN article and decided to take a look at notmuch. I'm
currently using mutt and mairix to index and read a collection of
@@ -39,6 +40,7 @@ Cheers,
[ multipart/mixed ]
[ multipart/signed ]
+ [ Unknown signature status ]
[ text/plain ]
> See the patch just posted here.
@@ -65,6 +67,7 @@ Cheers,
[ multipart/mixed ]
[ multipart/signed ]
+ [ Unknown signature status ]
[ text/plain ]
> I've also pushed a slightly more complicated (and complete) fix to my
> private notmuch repository
diff --git a/test/emacs-show.expected-output/notmuch-show-elide-non-matching-messages-on b/test/emacs-show.expected-output/notmuch-show-elide-non-matching-messages-on
index bafb479..118053b 100644
--- a/test/emacs-show.expected-output/notmuch-show-elide-non-matching-messages-on
+++ b/test/emacs-show.expected-output/notmuch-show-elide-non-matching-messages-on
@@ -5,6 +5,7 @@ Date: Tue, 17 Nov 2009 14:00:54 -0500
[ multipart/mixed ]
[ multipart/signed ]
+[ Unknown signature status ]
[ text/plain ]
I saw the LWN article and decided to take a look at notmuch. I'm
currently using mutt and mairix to index and read a collection of
@@ -38,6 +39,7 @@ Cheers,
[ multipart/mixed ]
[ multipart/signed ]
+ [ Unknown signature status ]
[ text/plain ]
> See the patch just posted here.
@@ -62,6 +64,7 @@ Cheers,
[ multipart/mixed ]
[ multipart/signed ]
+ [ Unknown signature status ]
[ text/plain ]
> I've also pushed a slightly more complicated (and complete) fix to my
> private notmuch repository
diff --git a/test/emacs-show.expected-output/notmuch-show-indent-thread-content-off b/test/emacs-show.expected-output/notmuch-show-indent-thread-content-off
index 37b4f7d..2cb1211 100644
--- a/test/emacs-show.expected-output/notmuch-show-indent-thread-content-off
+++ b/test/emacs-show.expected-output/notmuch-show-indent-thread-content-off
@@ -5,6 +5,7 @@ Date: Tue, 17 Nov 2009 14:00:54 -0500
[ multipart/mixed ]
[ multipart/signed ]
+[ Unknown signature status ]
[ text/plain ]
I saw the LWN article and decided to take a look at notmuch. I'm
currently using mutt and mairix to index and read a collection of
@@ -39,6 +40,7 @@ Date: Tue, 17 Nov 2009 15:33:01 -0500
[ multipart/mixed ]
[ multipart/signed ]
+[ Unknown signature status ]
[ text/plain ]
> See the patch just posted here.
@@ -65,6 +67,7 @@ Date: Tue, 17 Nov 2009 19:50:40 -0500
[ multipart/mixed ]
[ multipart/signed ]
+[ Unknown signature status ]
[ text/plain ]
> I've also pushed a slightly more complicated (and complete) fix to my
> private notmuch repository
diff --git a/test/emacs-show.expected-output/notmuch-show-process-crypto-mime-parts-off b/test/emacs-show.expected-output/notmuch-show-process-crypto-mime-parts-off
index 3282c7b..ce2892a 100644
--- a/test/emacs-show.expected-output/notmuch-show-process-crypto-mime-parts-off
+++ b/test/emacs-show.expected-output/notmuch-show-process-crypto-mime-parts-off
@@ -9,6 +9,7 @@ Subject: [notmuch] Working with Maildir storage?
[ multipart/mixed ]
[ multipart/signed ]
+ [ Unknown signature status ]
[ text/plain ]
> See the patch just posted here.
diff --git a/test/emacs.expected-output/notmuch-show-thread-maildir-storage b/test/emacs.expected-output/notmuch-show-thread-maildir-storage
index cdbfa1d..3599892 100644
--- a/test/emacs.expected-output/notmuch-show-thread-maildir-storage
+++ b/test/emacs.expected-output/notmuch-show-thread-maildir-storage
@@ -5,6 +5,7 @@ Date: Tue, 17 Nov 2009 14:00:54 -0500
[ multipart/mixed ]
[ multipart/signed ]
+[ Unknown signature status ]
[ text/plain ]
I saw the LWN article and decided to take a look at notmuch. I'm
currently using mutt and mairix to index and read a collection of
@@ -45,6 +46,7 @@ http://notmuchmail.org/mailman/listinfo/notmuch
[ multipart/mixed ]
[ multipart/signed ]
+ [ Unknown signature status ]
[ text/plain ]
Twas brillig at 14:00:54 17.11.2009 UTC-05 when lars@seas.harvard.edu did
@@ -77,6 +79,7 @@ http://notmuchmail.org/mailman/listinfo/notmuch
[ multipart/mixed ]
[ multipart/signed ]
+ [ Unknown signature status ]
[ text/plain ]
> See the patch just posted here.
@@ -159,6 +162,7 @@ http://notmuchmail.org/mailman/listinfo/notmuch
[ multipart/mixed ]
[ multipart/signed ]
+ [ Unknown signature status ]
[ text/plain ]
> I've also pushed a slightly more complicated (and complete) fix to my
> private notmuch repository
diff --git a/test/emacs.expected-output/notmuch-show-thread-maildir-storage-with-fourfold-indentation b/test/emacs.expected-output/notmuch-show-thread-maildir-storage-with-fourfold-indentation
index b0bf93e..4721b8b 100644
--- a/test/emacs.expected-output/notmuch-show-thread-maildir-storage-with-fourfold-indentation
+++ b/test/emacs.expected-output/notmuch-show-thread-maildir-storage-with-fourfold-indentation
@@ -5,6 +5,7 @@ Date: Tue, 17 Nov 2009 14:00:54 -0500
[ multipart/mixed ]
[ multipart/signed ]
+[ Unknown signature status ]
[ text/plain ]
I saw the LWN article and decided to take a look at notmuch. I'm
currently using mutt and mairix to index and read a collection of
@@ -45,6 +46,7 @@ http://notmuchmail.org/mailman/listinfo/notmuch
[ multipart/mixed ]
[ multipart/signed ]
+ [ Unknown signature status ]
[ text/plain ]
Twas brillig at 14:00:54 17.11.2009 UTC-05 when lars@seas.harvard.edu did
@@ -77,6 +79,7 @@ http://notmuchmail.org/mailman/listinfo/notmuch
[ multipart/mixed ]
[ multipart/signed ]
+ [ Unknown signature status ]
[ text/plain ]
> See the patch just posted here.
@@ -159,6 +162,7 @@ http://notmuchmail.org/mailman/listinfo/notmuch
[ multipart/mixed ]
[ multipart/signed ]
+ [ Unknown signature status ]
[ text/plain ]
> I've also pushed a slightly more complicated (and complete) fix to my
> private notmuch repository
diff --git a/test/emacs.expected-output/notmuch-show-thread-maildir-storage-without-indentation b/test/emacs.expected-output/notmuch-show-thread-maildir-storage-without-indentation
index 08de8b5..62a4635 100644
--- a/test/emacs.expected-output/notmuch-show-thread-maildir-storage-without-indentation
+++ b/test/emacs.expected-output/notmuch-show-thread-maildir-storage-without-indentation
@@ -5,6 +5,7 @@ Date: Tue, 17 Nov 2009 14:00:54 -0500
[ multipart/mixed ]
[ multipart/signed ]
+[ Unknown signature status ]
[ text/plain ]
I saw the LWN article and decided to take a look at notmuch. I'm
currently using mutt and mairix to index and read a collection of
@@ -45,6 +46,7 @@ Date: Wed, 18 Nov 2009 01:02:38 +0600
[ multipart/mixed ]
[ multipart/signed ]
+[ Unknown signature status ]
[ text/plain ]
Twas brillig at 14:00:54 17.11.2009 UTC-05 when lars@seas.harvard.edu did
@@ -77,6 +79,7 @@ Date: Tue, 17 Nov 2009 15:33:01 -0500
[ multipart/mixed ]
[ multipart/signed ]
+[ Unknown signature status ]
[ text/plain ]
> See the patch just posted here.
@@ -159,6 +162,7 @@ Date: Tue, 17 Nov 2009 19:50:40 -0500
[ multipart/mixed ]
[ multipart/signed ]
+[ Unknown signature status ]
[ text/plain ]
> I've also pushed a slightly more complicated (and complete) fix to my
> private notmuch repository
diff --git a/test/tree.expected-output/notmuch-tree-show-window b/test/tree.expected-output/notmuch-tree-show-window
index e16792b..ab7205b 100644
--- a/test/tree.expected-output/notmuch-tree-show-window
+++ b/test/tree.expected-output/notmuch-tree-show-window
@@ -5,6 +5,7 @@ Date: Tue, 17 Nov 2009 14:00:54 -0500
[ multipart/mixed ]
[ multipart/signed ]
+[ Unknown signature status ]
[ text/plain ]
I saw the LWN article and decided to take a look at notmuch. I'm
currently using mutt and mairix to index and read a collection of
--
2.1.4
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH v2 1/2] emacs: Always insert crypto buttons.
2016-04-03 15:38 ` [PATCH v2 1/2] emacs: " David Edmondson
@ 2016-04-09 19:41 ` David Bremner
0 siblings, 0 replies; 5+ messages in thread
From: David Bremner @ 2016-04-09 19:41 UTC (permalink / raw)
To: David Edmondson, notmuch
David Edmondson <dme@dme.org> writes:
> 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.
Looks OK, and seems to work. I think I'd rather apply these squashed
into one patch so there is no test suite breakage.
d
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH v2 2/2] Test: Fix tests.
2016-04-03 15:38 ` [PATCH v2 2/2] Test: Fix tests David Edmondson
@ 2016-04-10 23:53 ` David Bremner
0 siblings, 0 replies; 5+ messages in thread
From: David Bremner @ 2016-04-10 23:53 UTC (permalink / raw)
To: David Edmondson, notmuch
as promised, push the series as a single patche
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2016-04-10 23:53 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-04-03 15:38 [PATCH v2 0/2] Always insert crypto buttons David Edmondson
2016-04-03 15:38 ` [PATCH v2 1/2] emacs: " David Edmondson
2016-04-09 19:41 ` David Bremner
2016-04-03 15:38 ` [PATCH v2 2/2] Test: Fix tests David Edmondson
2016-04-10 23:53 ` David Bremner
Code repositories for project(s) associated with this public inbox
https://yhetil.org/notmuch.git/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).