[PATCH 1/2] lib: use glib for sha1 digests instead of embedding libsha1

2017-01-06 Thread Jani Nikula
We already depend on glib both directly and indirectly (via gmime). We might as well make use of its facilities. Drop the embedded libsha1 and use glib for sha1 digests. --- lib/Makefile.local | 1 - lib/libsha1.c | 244 - lib/libsha1.h

[PATCH 2/2] build & util: drop byte order configure check and endian util header

2017-01-06 Thread Jani Nikula
With the removal of the embedded libsha1, we lost the first and last user of the platform byte order checks. Remove them from configure, and remove the endian util header. --- configure | 17 + util/endian-util.h | 38 -- 2 files

[PATCH 7/9] cli/show: move formatter structs closer to where they're needed

2017-01-06 Thread Jani Nikula
The formatter structs are only needed for the formatter array initialization. Move them closer to use. This also lets us drop some forward declarations. No functional changes. --- notmuch-show.c | 67 ++ 1 file changed, 25 insertions(+), 42

[PATCH 9/9] cli: do not initialize zero values with designated initializers

2017-01-06 Thread Jani Nikula
Let the language initialize defaults to zero when some values are initialized to non-zero values. No functional changes. --- notmuch-reply.c | 5 - notmuch-show.c | 6 -- 2 files changed, 11 deletions(-) diff --git a/notmuch-reply.c b/notmuch-reply.c index 8c894974485d..166a59467eec

[PATCH 8/9] cli: simplify mime node walk

2017-01-06 Thread Jani Nikula
The function is more straighforward to read when it's clear that the only non-NULL return is at one place. No functional changes. --- mime-node.c | 13 +++-- 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/mime-node.c b/mime-node.c index c9b82330f6e0..f719422ec678 100644 ---

[PATCH 4/9] cli/show: use a table for choosing the formatter

2017-01-06 Thread Jani Nikula
Continue detangling format pointer and format selection variables. No functional changes. --- notmuch-show.c | 36 +++- 1 file changed, 15 insertions(+), 21 deletions(-) diff --git a/notmuch-show.c b/notmuch-show.c index b8e45f187360..93b51008381c 100644 ---

[PATCH 5/9] cli/show: rename format_sel to simply format

2017-01-06 Thread Jani Nikula
Now that the format pointer is a temporary variable, and named formatter, shorten format_sel to format. No functional changes. --- notmuch-show.c | 24 +++- 1 file changed, 11 insertions(+), 13 deletions(-) diff --git a/notmuch-show.c b/notmuch-show.c index

[PATCH 6/9] cli/show: group --entire-thread option handling into one place

2017-01-06 Thread Jani Nikula
The --entire-thread option handling is split around, making the logic harder to follow than necessary. Put it in one place. While at it, make the true/false values match notmuch_bool_t values for simplicity. No functional changes. --- notmuch-show.c | 17 +++-- 1 file changed, 7

[PATCH 0/9] cli/show: refactoring and cleanup

2017-01-06 Thread Jani Nikula
I was planning on adding mime structure printing to notmuch show, not unlike devel/printmimestructure, but notmuch-show was in need of some cleanup first. Here goes. BR, Jani. Jani Nikula (9): cli/show: detangle overloading of params.part for single message display cli/show: remove

[PATCH 2/9] cli/show: remove unused raw member from show parameters struct

2017-01-06 Thread Jani Nikula
The raw member has been unused since b1130bc71c02 ("show: Convert raw format to the new self-recursive style, properly support interior parts"). Good riddance. No functional changes. --- notmuch-client.h | 1 - notmuch-show.c | 1 - 2 files changed, 2 deletions(-) diff --git a/notmuch-client.h

[PATCH 1/9] cli/show: detangle overloading of params.part for single message display

2017-01-06 Thread Jani Nikula
The use of params.part has become rather convoluted in notmuch show. Add another variable for selecting single message display to make the code easier to read. No functional changes. --- notmuch-show.c | 14 -- 1 file changed, 8 insertions(+), 6 deletions(-) diff --git

[PATCH 3/9] cli/show: consistently use format_sel for checking the format

2017-01-06 Thread Jani Nikula
The mixed use of the format pointer and the format selection variables is confusing. Add more clarity by using format_sel alone. No functional changes. --- notmuch-show.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/notmuch-show.c b/notmuch-show.c index

[RFC PATCH] rfc: make 'make distclean' always use current Makefile.config

2017-01-06 Thread Tomi Ollila
... and not recreate it (slowly) if 'configure' changed, just to be deleteted later during 'make distclean'. For cleaning the old Makefile.config might actually be more accurate if configure changes what will be cleaned later... --- Makefile | 8 +++- 1 file changed, 7 insertions(+), 1

Re: [BUG] notmuch-emacs highlights '>' quoted wrapped lines incorrectly

2017-01-06 Thread Tomi Ollila
On Fri, Jan 06 2017, David Edmondson wrote: > On Fri, Jan 06 2017, Tomi Ollila wrote: > >> On Thu, Jan 05 2017, David Edmondson wrote: >> >>> On Thu, Jan 05 2017, Jani Nikula wrote: >>> When the show view in notmuch-emacs highlights quoted text, any long,

Re: [BUG] notmuch-emacs highlights '>' quoted wrapped lines incorrectly

2017-01-06 Thread David Edmondson
On Fri, Jan 06 2017, Tomi Ollila wrote: > On Thu, Jan 05 2017, David Edmondson wrote: > >> On Thu, Jan 05 2017, Jani Nikula wrote: >> >>> When the show view in notmuch-emacs highlights quoted text, any long, >>> folded lines in quotes prefixed using '>' fail to be highlighted.

Re: [BUG] notmuch-emacs highlights '>' quoted wrapped lines incorrectly

2017-01-06 Thread Tomi Ollila
On Thu, Jan 05 2017, David Edmondson wrote: > On Thu, Jan 05 2017, Jani Nikula wrote: > >> When the show view in notmuch-emacs highlights quoted text, any long, >> folded lines in quotes prefixed using '>' fail to be highlighted. Quotes >> prefixed using '> ' work fine. See below.