[PATCH v2 0/2] Add flush/reopen methods to notmuch_database_t

2012-12-26 Thread David Bremner
Michael Forney writes: > On Thu, 18 Oct 2012 00:52:20 +0300, Adrien Bustany > wrote: >> The code of the patches in unchanged, but the formatting issues are now >> hopefully fixed. > > I would like to bump this patch set. I also need these features from > libnotmuch. Currently there is no way to

[PATCH] emacs: tweak error buffer handling

2012-12-26 Thread Mark Walters
On Tue, 25 Dec 2012, Tomi Ollila wrote: > On Sat, Dec 22 2012, Mark Walters wrote: > >> view-mode-enter changed between emacs 23 and emacs 24: the current >> code makes the error buffer disappear in emacs 24 on quitting it (ie >> pressing q) but this just kills the buffer without closing the spl

Re: [PATCH v2 0/2] Add flush/reopen methods to notmuch_database_t

2012-12-26 Thread David Bremner
Michael Forney writes: > On Thu, 18 Oct 2012 00:52:20 +0300, Adrien Bustany wrote: >> The code of the patches in unchanged, but the formatting issues are now >> hopefully fixed. > > I would like to bump this patch set. I also need these features from > libnotmuch. Currently there is no way to re

[Patch v2 4/4] perf-test: initial support for talloc leak report in memory tests

2012-12-26 Thread da...@tethera.net
From: David Bremner As with the valgrind logs, we print a (very) brief summary and leave the log for inspection. --- performance-test/perf-test-lib.sh |5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/performance-test/perf-test-lib.sh b/performance-test/perf-test-lib.sh

[Patch v2 3/4] notmuch-restore: use debug version of talloc_strndup

2012-12-26 Thread da...@tethera.net
From: David Bremner This gives line numbers for better debugging. --- notmuch-restore.c |9 + 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/notmuch-restore.c b/notmuch-restore.c index c93f1ac..6111977 100644 --- a/notmuch-restore.c +++ b/notmuch-restore.c @@ -88,10 +8

[Patch v2 2/4] util: add talloc-extra.[ch]

2012-12-26 Thread da...@tethera.net
From: David Bremner These are intended to be simple wrappers to provide slightly better debugging information than what talloc currently provides natively. --- notmuch-client.h|2 +- util/Makefile.local |2 +- util/talloc-extra.c | 14 ++ util/talloc-extra.h | 18

[Patch v2 1/4] CLI: add talloc leak report, controlled by an environment variable.

2012-12-26 Thread da...@tethera.net
From: David Bremner The argument handling in notmuch.c seems due for an overhaul, but until then use an environment variable to specify a location to write the talloc leak report to. This is only enabled for the (interesting) case where some notmuch subcommand is invoked. --- notmuch.c | 24 +

v2 talloc leak report

2012-12-26 Thread da...@tethera.net
Obsoletes id:1355714648-23144-1-git-send-email-david at tethera.netZ [Patch v2 1/4] CLI: add talloc leak report, controlled by an - comments and formatting [Patch v2 2/4] util: add talloc-extra.[ch] - rename, fix dangerous memcpy [Patch v2 3/4] notmuch-restore: use debug version of

[PATCH 2/2] notmuch-restore: handle empty input file, leading blank lines and comments.

2012-12-26 Thread da...@tethera.net
From: David Bremner This patch corrects several undesirable behaviours: 1) Empty files were not detected, leading to buffer read overrun. 2) An initial blank line cause restore to silently abort 3) Initial comment line caused format detection to fail --- notmuch-restore.c | 17 -

[PATCH 1/2] test/dump-restore: new tests for empty files and leading comments/whitespace.

2012-12-26 Thread da...@tethera.net
From: David Bremner Three of these are marked broken; the third is a regression test, since it passes by virtue of batch-tag being the default input format. --- test/dump-restore | 42 ++ 1 file changed, 42 insertions(+) diff --git a/test/dump-restore b

Re: [PATCH] emacs: tweak error buffer handling

2012-12-26 Thread Mark Walters
On Tue, 25 Dec 2012, Tomi Ollila wrote: > On Sat, Dec 22 2012, Mark Walters wrote: > >> view-mode-enter changed between emacs 23 and emacs 24: the current >> code makes the error buffer disappear in emacs 24 on quitting it (ie >> pressing q) but this just kills the buffer without closing the spl

[Patch v2 1/4] CLI: add talloc leak report, controlled by an environment variable.

2012-12-26 Thread david
From: David Bremner The argument handling in notmuch.c seems due for an overhaul, but until then use an environment variable to specify a location to write the talloc leak report to. This is only enabled for the (interesting) case where some notmuch subcommand is invoked. --- notmuch.c | 24 +

[Patch v2 4/4] perf-test: initial support for talloc leak report in memory tests

2012-12-26 Thread david
From: David Bremner As with the valgrind logs, we print a (very) brief summary and leave the log for inspection. --- performance-test/perf-test-lib.sh |5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/performance-test/perf-test-lib.sh b/performance-test/perf-test-lib.sh

[Patch v2 3/4] notmuch-restore: use debug version of talloc_strndup

2012-12-26 Thread david
From: David Bremner This gives line numbers for better debugging. --- notmuch-restore.c |9 + 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/notmuch-restore.c b/notmuch-restore.c index c93f1ac..6111977 100644 --- a/notmuch-restore.c +++ b/notmuch-restore.c @@ -88,10 +8

[Patch v2 2/4] util: add talloc-extra.[ch]

2012-12-26 Thread david
From: David Bremner These are intended to be simple wrappers to provide slightly better debugging information than what talloc currently provides natively. --- notmuch-client.h|2 +- util/Makefile.local |2 +- util/talloc-extra.c | 14 ++ util/talloc-extra.h | 18

v2 talloc leak report

2012-12-26 Thread david
Obsoletes id:1355714648-23144-1-git-send-email-da...@tethera.netz [Patch v2 1/4] CLI: add talloc leak report, controlled by an - comments and formatting [Patch v2 2/4] util: add talloc-extra.[ch] - rename, fix dangerous memcpy [Patch v2 3/4] notmuch-restore: use debug version of tal

[PATCH] notmuch.c: run uncrustify

2012-12-26 Thread da...@tethera.net
From: David Bremner In anticipation of doing some updates to this code, it simplifies life if the code is "uncrustify clean" to start with --- notmuch.c | 23 +++ 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/notmuch.c b/notmuch.c index 9516dfb..ee2892e 10

[PATCH 2/2] notmuch-restore: handle empty input file, leading blank lines and comments.

2012-12-26 Thread david
From: David Bremner This patch corrects several undesirable behaviours: 1) Empty files were not detected, leading to buffer read overrun. 2) An initial blank line cause restore to silently abort 3) Initial comment line caused format detection to fail --- notmuch-restore.c | 17 -

[PATCH 1/2] test/dump-restore: new tests for empty files and leading comments/whitespace.

2012-12-26 Thread david
From: David Bremner Three of these are marked broken; the third is a regression test, since it passes by virtue of batch-tag being the default input format. --- test/dump-restore | 42 ++ 1 file changed, 42 insertions(+) diff --git a/test/dump-restore b

[PATCH] emacs: show: make id links respect window

2012-12-26 Thread David Bremner
Mark Walters writes: >> I can imagine that people would want/like the "open in other window" >> effect of the current code, even if the reason is a bug. > > That's definitely possible. I generally expect a mouse click to select > the window I click and this feels counter intuitive. I think that

[PATCH v2 0/5] Use Xapian query syntax for batch-tag dump/restore

2012-12-26 Thread David Bremner
Austin Clements writes: > This obsoletes > > id:1356415076-5692-1-git-send-email-amdragon at mit.edu > > In addition to incorporating all of David's suggestions, this reworks > the boolean term parsing so it only handles the subset of quoting > syntax used by make_boolean_term (which also happe

[PATCH v2 2/5] util: Function to parse boolean term queries

2012-12-26 Thread David Bremner
Austin Clements writes: > + char *out = talloc_strdup (ctx, pos + 1); > + int closed = 0; > + /* Find the closing quote and un-double doubled internal > + * quotes. */ > + for (pos = *term_out = out; *pos; ) { Since you strdup anyway, wouldn't it be easier to understand if p

[PATCH v2 1/5] util: Factor out boolean term quoting routine

2012-12-26 Thread David Bremner
Austin Clements writes: > +/* Construct a boolean term query with the specified prefix (e.g., > + * "id") and search term, quoting term as necessary. > + * > + * Output is into buf; it may be talloc_realloced. > + * Return: 0 on success, non-zero on memory allocation failure. > + */ > +int make_b

[PATCH 01/11] parse_tag_line: use enum for return value.

2012-12-26 Thread David Bremner
david at tethera.net writes: > From: David Bremner > > This is essentially cosmetic, since success=0 is promised by > the comments in tag-utils.h. Pushed this one patch. Both of the two I pushed from this series are really nothing to do with batch tagging, and were just cluttering things up. d

[PATCH 09/11] notmuch-tag.1: tidy synopsis formatting, reference

2012-12-26 Thread David Bremner
david at tethera.net writes: > From: David Bremner > > Consistently use [...]; one less space. Use singular > --- pushed this one patch. d

Xapian-quoting based batch-tagging.

2012-12-26 Thread David Bremner
Mark Walters writes: > I am unclear about how this is going to deal with queries containing > newlines. For dump/restore I think this is not a problem (as Austin and > others have said), but for batch tagging I think it could be; for > example the query could be for a tag containing a newline. Y

Xapian-quoting based batch-tagging.

2012-12-26 Thread Mark Walters
On Tue, 25 Dec 2012, david at tethera.net wrote: > This is an alternative version of > > id:1356313183-9266-1-git-send-email-david at tethera.net > > batch tagging patches rebased on top of > > id:1356415076-5692-1-git-send-email-amdragon at mit.edu > > This mainly consisted of removin

[PATCH] notmuch.c: run uncrustify

2012-12-26 Thread david
From: David Bremner In anticipation of doing some updates to this code, it simplifies life if the code is "uncrustify clean" to start with --- notmuch.c | 23 +++ 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/notmuch.c b/notmuch.c index 9516dfb..ee2892e 10

Re: [PATCH] emacs: show: make id links respect window

2012-12-26 Thread David Bremner
Mark Walters writes: >> I can imagine that people would want/like the "open in other window" >> effect of the current code, even if the reason is a bug. > > That's definitely possible. I generally expect a mouse click to select > the window I click and this feels counter intuitive. I think that

Re: [PATCH v2 0/5] Use Xapian query syntax for batch-tag dump/restore

2012-12-26 Thread David Bremner
Austin Clements writes: > This obsoletes > > id:1356415076-5692-1-git-send-email-amdra...@mit.edu > > In addition to incorporating all of David's suggestions, this reworks > the boolean term parsing so it only handles the subset of quoting > syntax used by make_boolean_term (which also happens

Re: [PATCH v2 2/5] util: Function to parse boolean term queries

2012-12-26 Thread David Bremner
Austin Clements writes: > + char *out = talloc_strdup (ctx, pos + 1); > + int closed = 0; > + /* Find the closing quote and un-double doubled internal > + * quotes. */ > + for (pos = *term_out = out; *pos; ) { Since you strdup anyway, wouldn't it be easier to understand if p

Re: [PATCH v2 1/5] util: Factor out boolean term quoting routine

2012-12-26 Thread David Bremner
Austin Clements writes: > +/* Construct a boolean term query with the specified prefix (e.g., > + * "id") and search term, quoting term as necessary. > + * > + * Output is into buf; it may be talloc_realloced. > + * Return: 0 on success, non-zero on memory allocation failure. > + */ > +int make_b

Re: [PATCH 01/11] parse_tag_line: use enum for return value.

2012-12-26 Thread David Bremner
da...@tethera.net writes: > From: David Bremner > > This is essentially cosmetic, since success=0 is promised by > the comments in tag-utils.h. Pushed this one patch. Both of the two I pushed from this series are really nothing to do with batch tagging, and were just cluttering things up. d __

Re: [PATCH 09/11] notmuch-tag.1: tidy synopsis formatting, reference

2012-12-26 Thread David Bremner
da...@tethera.net writes: > From: David Bremner > > Consistently use [...]; one less space. Use singular > --- pushed this one patch. d ___ notmuch mailing list notmuch@notmuchmail.org http://notmuchmail.org/mailman/listinfo/notmuch

Re: Xapian-quoting based batch-tagging.

2012-12-26 Thread David Bremner
Mark Walters writes: > I am unclear about how this is going to deal with queries containing > newlines. For dump/restore I think this is not a problem (as Austin and > others have said), but for batch tagging I think it could be; for > example the query could be for a tag containing a newline. Y

Re: Xapian-quoting based batch-tagging.

2012-12-26 Thread Mark Walters
On Tue, 25 Dec 2012, da...@tethera.net wrote: > This is an alternative version of > > id:1356313183-9266-1-git-send-email-da...@tethera.net > > batch tagging patches rebased on top of > > id:1356415076-5692-1-git-send-email-amdra...@mit.edu > > This mainly consisted of removing > >