[PATCH 12/23] cli: replace use of g_mime_message_get_reply_to

2017-06-03 Thread David Bremner
This function changes signature in gmime 3.0, so we provide two new functions, one for each signature. --- notmuch-reply.c| 10 -- notmuch-show.c | 4 +++- util/gmime-extra.c | 37 + util/gmime-extra.h | 12 4 files changed, 56

[PATCH 01/23] emacs: convert to use format-version 3

2017-06-03 Thread David Bremner
Keeping the emacs interface running old format-versions makes it impossible to test new format-versions or deprecate old ones. --- emacs/notmuch-address.el | 2 +- emacs/notmuch-mua.el | 2 +- emacs/notmuch-query.el | 2 +- emacs/notmuch-show.el| 3 ++- emacs/notmuch-tree.el| 2 +-

[PATCH 17/23] cli: hide rename of GMimeCertificateTrust

2017-06-03 Thread David Bremner
Both the enum and the values are renamed in GMime 3.0. --- util/gmime-extra.h | 10 ++ 1 file changed, 10 insertions(+) diff --git a/util/gmime-extra.h b/util/gmime-extra.h index 90f230c1..6b74724e 100644 --- a/util/gmime-extra.h +++ b/util/gmime-extra.h @@ -37,10 +37,20 @@ typedef

[PATCH 05/23] test: mark inclusion of headers as broken in gmime-2.x

2017-06-03 Thread David Bremner
The output of headers here reflects an underlying bug / quirk of gmime-2.6. --- test/T190-multipart.sh | 28 1 file changed, 4 insertions(+), 24 deletions(-) diff --git a/test/T190-multipart.sh b/test/T190-multipart.sh index 91a632c6..94bb0570 100755 ---

[PATCH 18/23] lib: wrap use of g_mime_utils_header_decode_date

2017-06-03 Thread David Bremner
This changes return type in gmime 3.0 --- lib/message.cc | 2 +- util/gmime-extra.c | 19 +++ util/gmime-extra.h | 2 ++ 3 files changed, 22 insertions(+), 1 deletion(-) diff --git a/lib/message.cc b/lib/message.cc index b330dcce..f78e5a9d 100644 --- a/lib/message.cc +++

[PATCH 11/23] cli: replace use of g_mime_message_get_date_as_string

2017-06-03 Thread David Bremner
This function goes away in gmime-3.0. Also, the memory management is apparently error prone, witness the memory leak in notmuch-reply. --- notmuch-reply.c| 2 +- notmuch-show.c | 8 ++-- util/gmime-extra.c | 35 +++ util/gmime-extra.h | 8 4

[PATCH 08/23] test: add test for modified pgp/mime signed message

2017-06-03 Thread David Bremner
This is a good thing to test in any case, but particularly as we hit the dark corners of the gmime crypto API. --- test/T350-crypto.sh | 39 +++ 1 file changed, 39 insertions(+) diff --git a/test/T350-crypto.sh b/test/T350-crypto.sh index 720a2225..4a2c4c85

[PATCH 02/23] devel/schemata: describe version 4

2017-06-03 Thread David Bremner
Replace numeric errors with human readable flags. Not all sig_error keys will necessarily be generated with a given version of gmime. Drop status "none" as it's currrently unused and I don't know what it's for. --- devel/schemata | 24 1 file changed, 20 insertions(+),

[PATCH 09/23] test/crypto: add test for corrupted signatures

2017-06-03 Thread David Bremner
Have an empty list of signatures is not the nicest mechanism to signal complete failure to verify, but it's the one we currently have. --- test/T350-crypto.sh | 43 +++ 1 file changed, 43 insertions(+) diff --git a/test/T350-crypto.sh b/test/T350-crypto.sh

[PATCH 06/23] test: mark test as broken in gmime 3.0

2017-06-03 Thread David Bremner
Currently I'm not sure what the intent of this test is, so it's not clear if the new answer is better or worse than the old one. --- test/T310-emacs.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/test/T310-emacs.sh b/test/T310-emacs.sh index 8a881941..c8a25de2 100755 ---

[PATCH 03/23] cli: implement structured output version 4

2017-06-03 Thread David Bremner
Since the error field is unused by the emacs front end, no changes are needed other than bumping the format version number. As it is, this is a bit overengineered, but it will reduce duplication when we support gmime 3.0 --- emacs/notmuch-query.el | 2 +- notmuch-client.h| 2 +-

[PATCH 19/23] lib: refactor _notmuch_messsage_file_get_combined_header

2017-06-03 Thread David Bremner
We need to rewrite the loop for gmime-3.0; move the loop body to its own function to avoid code duplication. Keep the common exit via "goto DONE" to make this pure code movement. It's important to note that the existing exit path only deallocates the iterator. --- lib/message-file.c | 57

[PATCH 10/23] test: test parsing of malformed from addresses

2017-06-03 Thread David Bremner
This was previously tested in T200-thread-naming.sh, but failures due to changes in address parsing were confusing because they had nothing to do with threads. --- test/T050-new.sh | 7 +++ 1 file changed, 7 insertions(+) diff --git a/test/T050-new.sh b/test/T050-new.sh index

[PATCH 20/23] lib: add version of _n_m_f_get_combinded_header for gmime 3.0

2017-06-03 Thread David Bremner
The iterator is gone, so we need a new loop structure. --- lib/message-file.c | 34 ++ 1 file changed, 34 insertions(+) diff --git a/lib/message-file.c b/lib/message-file.c index 7d38ebd0..d7acf0d5 100644 --- a/lib/message-file.c +++ b/lib/message-file.c @@ -232,6

[PATCH 15/23] util: fake gmime-2.6 compatible API for gmime-3.0

2017-06-03 Thread David Bremner
Several functions have added arguments which accept NULL and provide hopefully sensible defaults. Use macros to minimize source changes. --- util/gmime-extra.h | 23 +++ 1 file changed, 23 insertions(+) diff --git a/util/gmime-extra.h b/util/gmime-extra.h index

[PATCH 07/23] test/crypto: mark extra space in userid as a bug in gmime-2.6

2017-06-03 Thread David Bremner
I can't see the space in the output of gpg -K --with-colons --- test/T350-crypto.sh | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/test/T350-crypto.sh b/test/T350-crypto.sh index 0753acf3..720a2225 100755 --- a/test/T350-crypto.sh +++ b/test/T350-crypto.sh @@ -69,6

[PATCH 22/23] cli: make keyid from fingerprint in gmime 3.0

2017-06-03 Thread David Bremner
The "key_id" field seems to used for userid in gmime-3.0, while the keyid is dropped in the fingerprint field if the full fingerprint is not available. --- notmuch-show.c | 2 +- util/gmime-extra.c | 10 ++ util/gmime-extra.h | 5 + 3 files changed, 16 insertions(+), 1

[PATCH 14/23] cli: replace use of g_mime_message_get_recipients

2017-06-03 Thread David Bremner
This function, and associated enum, have been renamed and generalized in gmime-3.0. --- notmuch-reply.c| 21 + notmuch-show.c | 17 + util/gmime-extra.c | 20 util/gmime-extra.h | 22 -- 4 files changed, 54

[PATCH 21/23] lib: paper over allocation difference

2017-06-03 Thread David Bremner
In gmime 3.0 this function is "transfer none", so no deallocation is needed (or permitted) --- lib/index.cc | 2 +- util/gmime-extra.h | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/index.cc b/lib/index.cc index d2472896..70607069 100644 --- a/lib/index.cc +++

[no subject]

2017-06-03 Thread David Bremner
This is the first allegedly complete version of support for gmime 3 It obsoletes several partial series [1][2] - id:20170602022232.17264-1-da...@tethera.net - patches 9-11, starting at id:20170527165121.9654-10-da...@tethera.net There still remains the question of whether we should

Re: [FEATURE] indexing arbitrary headers

2017-06-03 Thread David Bremner
Ɓukasz Stelmach writes: > I'd like to ask for a new feature: indexing of arbitrary headers. Not > all headers but a few selected by users. > > For example, I get a lot of mails from a Gerrit system. I'd like to keep > them for a while and remove them when they are old

Modify kill and exit functions on emacs notmuch mode

2017-06-03 Thread katsuyuki2388
Hi, I modified kill and exit functions on emacs notmuch mode. I want to hear your opinion about the change. ___ notmuch mailing list notmuch@notmuchmail.org https://notmuchmail.org/mailman/listinfo/notmuch

[PATCH 2/2] NEWS: emacs notmuch buffer exit functions are modified

2017-06-03 Thread katsuyuki2388
From: Kiso Katsuyuki --- NEWS | 8 1 file changed, 8 insertions(+) diff --git a/NEWS b/NEWS index 70bce788..af9d5fb8 100644 --- a/NEWS +++ b/NEWS @@ -11,6 +11,14 @@ Emacs Fix filename stashing in tree view. +Return to the previous notmuch buffer when kill

[PATCH 1/2] emacs: retrun to the previous notmuch buffer when exit

2017-06-03 Thread katsuyuki2388
From: Kiso Katsuyuki When kill and exit from a notmuch mode buffer (notmuch-show-mode, notmuch-tree-mode, notmuch-search-mode, notmuch-hello-mode, notmuch-message-mode), return to the previous notmuch mode buffer. It's because the previous notmuch buffer is often buried