Re: [PATCH] zlib-related bugs

2020-04-13 Thread David Bremner
Olivier Taïbi writes: Thanks for the mail. In general we need each change in a separate patch for review. Being zlib related is not really close enough for us. > the following diff addresses 3 zlib-related bugs in notmuch. > 1) the second argument of gzerror() cannot be NULL, so replace it by a

Re: [PATCH 4/6] cli/dump: define GZPRINTF macro and use it in place of gzprintf

2020-04-13 Thread Tomi Ollila
On Mon, Apr 13 2020, David Bremner wrote: > This will at least catch errors, and can be replaced with more > sophisticated error handling where appropriate. > --- > notmuch-client.h | 4 > notmuch-dump.c | 24 > 2 files changed, 16 insertions(+), 12 deletions(-)

Re: [PATCH] zlib-related bugs

2020-04-13 Thread Tomi Ollila
On Fri, Apr 10 2020, Olivier Taïbi wrote: > the following diff addresses 3 zlib-related bugs in notmuch. > 3) in gz_getline(), if gz_error sets its second argument to Z_STREAM_END >then there was no error (only EOF). Unfortunately the zlib manual is >not very clear on the meaning of

[PATCH 4/6] cli/dump: define GZPRINTF macro and use it in place of gzprintf

2020-04-13 Thread David Bremner
This will at least catch errors, and can be replaced with more sophisticated error handling where appropriate. --- notmuch-client.h | 4 notmuch-dump.c | 24 2 files changed, 16 insertions(+), 12 deletions(-) diff --git a/notmuch-client.h b/notmuch-client.h index

[PATCH 1/6] test: add known_broken test for dumping large stored queries

2020-04-13 Thread David Bremner
'qsx' reported a bug on #notmuch with notmuch-dump and large stored queries. This test will pass (on my machine) if the value of `repeat' is made smaller. Reported-By: Thomas Schneider --- test/T600-named-queries.sh | 16 1 file changed, 16 insertions(+) diff --git

[PATCH 5/6] cli/dump: define GZPUTS and use it in notmuch-dump

2020-04-13 Thread David Bremner
Similarly to GZPRINTF, this is a drop in replacement that can be improved where needd. --- notmuch-client.h | 1 + notmuch-dump.c | 10 +- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/notmuch-client.h b/notmuch-client.h index 01f5101a..b59f3c81 100644 ---

[PATCH 3/6] status: add print_status_gzbytes

2020-04-13 Thread David Bremner
This is in the client code, rather than libnotmuch_util, because it prints to stderr. Also it in pretends to generate notmuch status codes. --- notmuch-client.h | 8 +++- status.c | 14 ++ 2 files changed, 21 insertions(+), 1 deletion(-) diff --git a/notmuch-client.h

[PATCH 2/6] util/zlib-extra.c: don't pass NULL to gzerror.

2020-04-13 Thread David Bremner
Although (as of 1.2.11) zlib checks this parameter before writing to it, the docs don't promise to keep doing so, so be safe. --- notmuch-dump.c| 6 +++--- notmuch-restore.c | 2 +- util/zlib-extra.c | 2 +- util/zlib-extra.h | 5 + 4 files changed, 10 insertions(+), 5 deletions(-) diff

[PATCH 6/6] cli/dump: replace use of gzprintf with gzputs for config values

2020-04-13 Thread David Bremner
These can be large, and hit buffer limitations of gzprintf. --- notmuch-dump.c | 4 +++- test/T600-named-queries.sh | 1 - 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/notmuch-dump.c b/notmuch-dump.c index 52a88283..887ef7f0 100644 --- a/notmuch-dump.c +++

Re: [PATCH 1/6] test: add known_broken test for dumping large stored queries

2020-04-13 Thread David Bremner
David Bremner writes: > 'qsx' reported a bug on #notmuch with notmuch-dump and large stored > queries. This test will pass (on my machine) if the value of `repeat' > is made smaller. > > Reported-By: Thomas Schneider series pushed, with one space deleted to please Tomi ;P d

[PATCH] emacs: introduce notmuch-search-by-tag

2020-04-13 Thread Keegan Carruthers-Smith
This is like notmuch-search-filter-by-tag, but creates a new search rather than filtering the current search. We add this to notmuch-common-keymap since this can be used by many contexts. We bind to the key "t", which is the same key used by notmuch-search-filter-by-tag in notmuch-search-mode-map.

Re: [PATCH] emacs doc: replace `...' with `...` in emacs docstrings for rst

2020-04-13 Thread Tomi Ollila
On Mon, Apr 13 2020, Tomi Ollila wrote: > Previously ' without preceding \ was replaced with `, to make emacs > document content structure `...' to work with reStructuredText. The change is good, but comment message crap. While trying to make rstdoc.el to load elisp code so that in docstrings

[PATCH] emacs: use def instead of initial-input for notmuch-show-browse-urls

2020-04-13 Thread Keegan Carruthers-Smith
This is the non-deprecated way to use completing-read. Additionally the old use was broken when using ivy for completing-read. For user's using completing-read-default they won't see the default URL now, but if they hit enter it will be visited. Alternatively they can select it with M-n. >From

Re: [PATCH] test: add known_broken test for dumping large stored queries

2020-04-13 Thread Tomi Ollila
On Sun, Apr 12 2020, David Bremner wrote: > 'qsx' reported a bug on #notmuch with notmuch-dump and large stored > queries. This test will pass (on my machine) if the value of `repeat' > is made smaller. > --- > test/T240-dump-restore.sh | 13 + > 1 file changed, 13 insertions(+) > >

Re: [PATCH 3/5] cli/dump: define GZPRINTF macro and use it in place of gzprintf

2020-04-13 Thread Tomi Ollila
On Sun, Apr 12 2020, David Bremner wrote: > This will at least catch errors, and can be replaced with more > sophisticated error handling where appropriate. > --- > notmuch-client.h | 3 +++ > notmuch-dump.c | 24 > 2 files changed, 15 insertions(+), 12 deletions(-) >

Re: [PATCH] test: add known_broken test for dumping large stored queries

2020-04-13 Thread Thomas Schneider
David Bremner writes: > 'qsx' reported a bug on #notmuch with notmuch-dump and large stored > queries. This test will pass (on my machine) if the value of `repeat' > is made smaller. Feel free to add 'Reported-By: Thomas Schneider ', if you like. --Thomas

[PATCH] emacs doc: replace `...' with `...` in emacs docstrings for rst

2020-04-13 Thread Tomi Ollila
Previously ' without preceding \ was replaced with `, to make emacs document content structure `...' to work with reStructuredText. But there are also single uses of ' in parts of the extracted docstrings, so better "restrict" the matching content to `[^']+'. Dropped checking preceding \ before

Re: [PATCH 3/5] cli/dump: define GZPRINTF macro and use it in place of gzprintf

2020-04-13 Thread David Bremner
Tomi Ollila writes: > __location__ ?? never seen such a (preprocessor?) definition. could not > find any reference by search... I have to admit, it's just cargo culted from util/error_util.h > > there are also some suspiciously looking like inconsistent spaces in that > macro above OK, I'll

Re: [PATCH 3/5] cli/dump: define GZPRINTF macro and use it in place of gzprintf

2020-04-13 Thread David Bremner
David Bremner writes: > Tomi Ollila writes: > >> __location__ ?? never seen such a (preprocessor?) definition. could not >> find any reference by search... > > I have to admit, it's just cargo culted from util/error_util.h > OIC, it's defined in talloc.h. Probably that deserves a comment.