Re: [PATCH] gzclose_r() and gzclose_w() are not available in older versions of zlib such as the version on Ubuntu LTS 12.04. Changing to gzclose() allows notmuch to work on older versions as well

2016-11-21 Thread David Bremner
Ico Doornekamp writes: > --- > configure |4 ++-- > notmuch-dump.c|4 ++-- > notmuch-restore.c |2 +- > 3 files changed, 5 insertions(+), 5 deletions(-) Looking at the docs, this looks sensible. , | Same as gzclose(), but gzclose_r() is only for use

Re: [PATCH] gzclose_r() and gzclose_w() are not available in older...

2016-11-21 Thread Jani Nikula
On Mon, 21 Nov 2016, Tomi Ollila wrote: > On Mon, Nov 21 2016, David Bremner wrote: > >> I take the submitters word for the first version supporting gzclose > > I tried this patch on Scientific Linux 6.2 -- after applied it I changed > the check to >= 1.2.3

Re: [PATCH 6/8] emacs/desktop: update to use notmuch-emacs-mua and handle mailto

2016-11-21 Thread Jani Nikula
On Mon, 21 Nov 2016, Keith Amidon wrote: > However, this did not seem to work when I tried it out in my gnome > session. I'm pretty sure creating two separate desktop files > (duplicating some of the fields) would work. I see three options here: 1) Just always go to

Re: [PATCH] gzclose_r() and gzclose_w() are not available in older...

2016-11-21 Thread Tomi Ollila
On Mon, Nov 21 2016, David Bremner wrote: > I take the submitters word for the first version supporting gzclose I tried this patch on Scientific Linux 6.2 -- after applied it I changed the check to >= 1.2.3 (to the one used in sl62). This compiles fine but tests fails

[PATCH v2] cli: consider files vanishing during notmuch new non-fatal

2016-11-21 Thread Jani Nikula
If some software other than notmuch new renames or removes files during the notmuch new scan (specifically after scandir but before indexing the file), keep going instead of bailing out. Failing to index the file is just a race condition between notmuch and the other software; the rename could

[PATCH v2 9/9] build: update the desktop database after installing the desktop file

2016-11-21 Thread Jani Nikula
This makes the option to choose Notmuch as mailto: handler show up in the desktop environment settings. --- emacs/Makefile.local | 1 + 1 file changed, 1 insertion(+) diff --git a/emacs/Makefile.local b/emacs/Makefile.local index ffa8421ebd45..de4f40d1316b 100644 --- a/emacs/Makefile.local +++

[PATCH v2 7/9] emacs/desktop: update to use notmuch-emacs-mua and handle mailto

2016-11-21 Thread Jani Nikula
With the mailto: handling in notmuch-emacs-mua, we can update the desktop file to advertize we can be set as the default application to handle email. While at it, add GenericName and Comment to be more informative. With --hello, notmuch-emacs-mua will run (notmuch) if mailto: url is not given.

Re: [PATCH 6/8] emacs/desktop: update to use notmuch-emacs-mua and handle mailto

2016-11-21 Thread Jani Nikula
On Mon, 21 Nov 2016, Jani Nikula wrote: > On Mon, 21 Nov 2016, Keith Amidon wrote: >> However, this did not seem to work when I tried it out in my gnome >> session. I'm pretty sure creating two separate desktop files >> (duplicating some of the fields)

[PATCH v2 3/9] emacs: move notmuch-emacs-mua under emacs

2016-11-21 Thread Jani Nikula
While the notmuch-emacs-mua script is a sort of cli command, it is really a part of notmuch-emacs. Move it under the emacs directory. --- notmuch-emacs-mua => emacs/notmuch-emacs-mua | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename notmuch-emacs-mua => emacs/notmuch-emacs-mua (100%)

[PATCH v2 4/9] notmuch-emacs-mua: add --hello parameter

2016-11-21 Thread Jani Nikula
If the --hello parameter is given, display the notmuch hello buffer instead of the message composition buffer if no message composition parameters are given. Signed-off-by: Jani Nikula --- doc/man1/notmuch-emacs-mua.rst | 4 emacs/notmuch-emacs-mua| 8 +++- 2

[PATCH v2 6/9] notmuch.desktop: move under emacs as notmuch-emacs-mua.desktop

2016-11-21 Thread Jani Nikula
The notmuch.desktop file is part of notmuch-emacs. Move it under emacs, and rename as notmuch-emacs-mua.desktop to reflect this. --- Makefile.local | 5 - emacs/Makefile.local | 6 ++ notmuch.desktop =>

[PATCH v2 5/9] build: install notmuch-emacs-mua with notmuch-emacs

2016-11-21 Thread Jani Nikula
notmuch-emacs-mua is good enough to be installed with notmuch-emacs. --- emacs/Makefile.local | 4 1 file changed, 4 insertions(+) diff --git a/emacs/Makefile.local b/emacs/Makefile.local index 90a57cca74ed..8ab7b1260924 100644 --- a/emacs/Makefile.local +++ b/emacs/Makefile.local @@ -36,6

[PATCH v2 0/9] improvements around notmuch-emacs-mua

2016-11-21 Thread Jani Nikula
v2 of id:cover.1478205331.git.j...@nikula.org, with rebase plus David's concern about .desktop opening mail composition vs. hello screen addressed. BR, Jani. Jani Nikula (9): completion: complete notmuch emacs-mua man: advertize notmuch-emacs-mua as notmuch emacs-mua subcommand emacs:

[PATCH v2 1/9] completion: complete notmuch emacs-mua

2016-11-21 Thread Jani Nikula
With subcommand handling for external commands we can easily complete 'notmuch emacs-mua' using the existing completion system. --- completion/notmuch-completion.bash | 34 +- 1 file changed, 33 insertions(+), 1 deletion(-) diff --git

[PATCH v2 2/9] man: advertize notmuch-emacs-mua as notmuch emacs-mua subcommand

2016-11-21 Thread Jani Nikula
With subcommand handling for external commands we can now hide the implementation detail of emacs-mua being a separate notmuch-emacs-mua script. --- doc/man1/notmuch-emacs-mua.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/man1/notmuch-emacs-mua.rst

[PATCH 2/4] lib/query: make query parsing lazy again, keep centralized.

2016-11-21 Thread David Bremner
This is mainly to fix the nasty error path introduced in the last commit, by moving the parsing into functions where the API is already set up to return error status. It preserves the feature of having a pre-parsed query available for further processing. --- lib/query.cc | 37

Re: [PATCH 6/8] emacs/desktop: update to use notmuch-emacs-mua and handle mailto

2016-11-21 Thread Keith Amidon
On Mon, 2016-11-21 at 13:44 +0200, Jani Nikula wrote: > I wonder if there's a way to define different Execs for clicking on > the icon and handling mailto. The desktop file format specification implies you can just add an extra context entry. For reference, the full specification is here:

[PATCH 4/4] lib: make notmuch_query_add_tag_exclude return a status value

2016-11-21 Thread David Bremner
Since this is an ABI breaking change, bump the SONAME. --- lib/notmuch.h| 23 +++ lib/query.cc | 7 --- notmuch-count.c | 9 +++-- notmuch-search.c | 12 ++-- notmuch-show.c | 13 +++-- 5 files changed, 51 insertions(+), 13 deletions(-)

[PATCH 3/4] lib: query make exclude handling non-destructive

2016-11-21 Thread David Bremner
We filter added exclude at add time, rather than modifying the query by count search. As noted in the comments, there are several ignored conditions here. Returning proper status is split into a separate commit because it is ABI breaking. --- lib/query.cc | 47

[PATCH 1/4] lib: eagerly parse queries

2016-11-21 Thread David Bremner
Rather than waiting for a call to count/search, parse the query string when the notmuch_query_t is created. This is a small reduction in duplicated code, and a potential efficiency improvement if many count/search operations are called on the same query (although the latter sounds a bit unusual).

V3 of non-destructive excludes patches

2016-11-21 Thread David Bremner
Obsoletes id:20161002021328.30487-1-da...@tethera.net There is only trivial whitespace changes in the final diff, but I did move several small changes / fixes farther back in the series. As before, it's a bit of an open question whether breaking the ABI is worth it to return a proper status

Re: [emacs] thread view is showing all messages

2016-11-21 Thread David Bremner
Mark Walters writes: > Hi > >>> -- >>> By default, various components of email messages, (citations, >>> signatures, already-read messages), are hidden. >>> -- > > I wonder if this text should be

Re: [PATCH 6/8] emacs/desktop: update to use notmuch-emacs-mua and handle mailto

2016-11-21 Thread David Bremner
Jani Nikula writes: > -Exec=emacs -f notmuch > +GenericName=Email Client > +Comment=Emacs based email client > +Exec=notmuch-emacs-mua %u This seems like a fairly substantial change in functionality. Previously people could click on the icon fire up a mail reader; now they get

Re: [PATCH 6/8] emacs/desktop: update to use notmuch-emacs-mua and handle mailto

2016-11-21 Thread Jani Nikula
On Mon, Nov 21, 2016 at 1:34 PM, David Bremner wrote: > Jani Nikula writes: > >> -Exec=emacs -f notmuch >> +GenericName=Email Client >> +Comment=Emacs based email client >> +Exec=notmuch-emacs-mua %u > > This seems like a fairly substantial change in

Re: [PATCH 6/8] emacs/desktop: update to use notmuch-emacs-mua and handle mailto

2016-11-21 Thread Tomi Ollila
On Mon, Nov 21 2016, Jani Nikula wrote: > On Mon, Nov 21, 2016 at 1:34 PM, David Bremner wrote: >> Jani Nikula writes: >> >>> -Exec=emacs -f notmuch >>> +GenericName=Email Client >>> +Comment=Emacs based email client >>>

[PATCH] gzclose_r() and gzclose_w() are not available in older versions of zlib such as the version on Ubuntu LTS 12.04. Changing to gzclose() allows notmuch to work on older versions as well

2016-11-21 Thread Ico Doornekamp
--- configure |4 ++-- notmuch-dump.c|4 ++-- notmuch-restore.c |2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/configure b/configure index f0fc466..dc3256b 100755 --- a/configure +++ b/configure @@ -491,9 +491,9 @@ if ! pkg-config --exists zlib; then