[PATCH 3/3] notmuch-restore: allocate a temporary talloc context for each line parsed.

2012-12-16 Thread da...@tethera.net
From: David Bremner This lets the high level code in notmuch restore be ignorant about what the lower level code is doing as far as allocating memory. --- notmuch-restore.c | 12 ++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/notmuch-restore.c

[PATCH 2/3] tag-utils: use the tag_opt_list_t as talloc context, if possible.

2012-12-16 Thread da...@tethera.net
From: David Bremner This code is no less correct than the previous version, since it does not make sense for the array to live longer than the wrapping struct. By not relying on the context passed into tag_parse_line, we can allow tag_op_list_t structures to live longer than

[PATCH 1/3] notmuch-restore: fix return value propagation

2012-12-16 Thread da...@tethera.net
From: David Bremner Previously notmuch_restore_command returned 0 if tag_message returned a non-zero (failure) value. This is wrong, since non-zero status indicates something mysterious went wrong with retrieving the message, or applying it. There was also a failure to check

v2 restore leak fix

2012-12-16 Thread da...@tethera.net
This obsoletes id:1355688997-19164-1-git-send-email-david at tethera.net Actually the first patch in the series is now an unrelated bug fix, since it isn't needed anymore for 2 and 3.

[RFC PATCH] cli: add --remove-all option to "notmuch tag"

2012-12-16 Thread Jani Nikula
On Sun, 16 Dec 2012, Mark Walters wrote: > On Mon, 03 Dec 2012, Jani Nikula wrote: >> Add --remove-all option to "notmuch tag" to remove all tags matching >> query before applying the tag changes. This allows removal and >> unconditional setting of the tags of a message: >> >> $ notmuch tag

[PATCH 3/3] notmuch-restore: use xtalloc version of strndup

2012-12-16 Thread da...@tethera.net
From: David Bremner This gives line numbers for better debugging. --- notmuch-restore.c |7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/notmuch-restore.c b/notmuch-restore.c index 40596a8..0cc9c9f 100644 --- a/notmuch-restore.c +++

[PATCH 2/3] util: add xtalloc.[ch]

2012-12-16 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/xtalloc.c | 15 +++

[PATCH 1/3] CLI: add talloc leak report, controlled by an environment variable.

2012-12-16 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.

talloc leak debugging

2012-12-16 Thread da...@tethera.net
I was playing a bit with adding talloc leak debugging to notmuch (since it seems to be essentially free, performance-wise). I got a bit discouraged about modifying the argument handling in notmuch.c, so I hacked it in via an environment variable.

[PATCH v3 5/5] man: document notmuch search --format=text0

2012-12-16 Thread Jani Nikula
--- man/man1/notmuch-search.1 | 26 -- 1 file changed, 16 insertions(+), 10 deletions(-) diff --git a/man/man1/notmuch-search.1 b/man/man1/notmuch-search.1 index 0aff348..22bcd0a 100644 --- a/man/man1/notmuch-search.1 +++ b/man/man1/notmuch-search.1 @@ -25,9 +25,11 @@

[PATCH v3 4/5] test: notmuch search --format=text0

2012-12-16 Thread Jani Nikula
--- test/text | 33 + 1 file changed, 33 insertions(+) diff --git a/test/text b/test/text index 428c89b..b5ccefc 100755 --- a/test/text +++ b/test/text @@ -52,4 +52,37 @@ output=$(notmuch search --format=text "t?xt-search-m?ssage" | notmuch_search_s

[PATCH v3 3/5] cli: add --format=text0 to notmuch search

2012-12-16 Thread Jani Nikula
Add new format text0, which is otherwise the same as text, but use the null character as separator instead of the newline character. This is similar to find(1) -print0 option, and works together with the xargs(1) -0 option. --- notmuch-search.c | 16 ++-- 1 file changed, 14

[PATCH v3 2/5] sprinter: add text0 formatter for null character separated text

2012-12-16 Thread Jani Nikula
Same as the text formatter, but with each field separated by a null character rather than a newline character. --- sprinter-text.c | 22 ++ sprinter.h |6 ++ 2 files changed, 28 insertions(+) diff --git a/sprinter-text.c b/sprinter-text.c index 10343be..7779488

[PATCH v3 1/5] sprinter: clarify separator documentation

2012-12-16 Thread Jani Nikula
For text printers, the separator is a syntactic element. --- sprinter.h |9 + 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/sprinter.h b/sprinter.h index 59776a9..f43a844 100644 --- a/sprinter.h +++ b/sprinter.h @@ -42,10 +42,11 @@ typedef struct sprinter { */

gmail importer script

2012-12-16 Thread Patrick Totzke
text parameter.. best, /p -- next part -- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 198 bytes Desc: signature URL: <http://notmuchmail.org/pipermail/notmuch/attachments/20121216/62774cac/attachment.pgp>

gmail importer script

2012-12-16 Thread Jason A. Donenfeld
- next part -- An HTML attachment was scrubbed... URL: <http://notmuchmail.org/pipermail/notmuch/attachments/20121216/e36a1be9/attachment-0001.html>

[PATCH v3 0/5] add --format=text0 to notmuch search

2012-12-16 Thread Mark Walters
On Sun, 16 Dec 2012, Jani Nikula wrote: > Hi all, v3 of id:cover.1355064714.git.jani at nikula.org > > Changes since v2: > * add new patch 1/5 to clarify sprinter documentation > * fix the test patch 4/5 according to id:8738z6wguj.fsf at qmul.ac.uk and >id:87y5gyvvv7.fsf at

[RFC PATCH] cli: add --remove-all option to "notmuch tag"

2012-12-16 Thread Mark Walters
On Mon, 03 Dec 2012, Jani Nikula wrote: > Add --remove-all option to "notmuch tag" to remove all tags matching > query before applying the tag changes. This allows removal and > unconditional setting of the tags of a message: > > $ notmuch tag --remove-all id:foo at example.com > $ notmuch tag

[PATCH 4/4] perf-test: add memory leak test for dump restore

2012-12-16 Thread David Bremner
david at tethera.net writes: > + > +memory_run 'load nmbug tags' 'notmuch restore --accumulate > --input=corpus.tags/nmbug.sup-dump' > +memory_run 'dump *' 'notmuch dump --output=tags.sup' > +memory_run 'restore *' 'notmuch restore --input=tags.sup' > +memory_run 'dump --format=batch-tag *'

[PATCH v2 1/7] emacs: Centralize notmuch command error handling

2012-12-16 Thread David Bremner
Austin Clements writes: > This provides library functions for unified handling of errors from > the notmuch CLI. Follow-up patches will convert some scattered error > handling to use this and add error handling where we currently ignore > errors. pushed, d

[PATCH 1/7] cli: Framework for structured output versioning

2012-12-16 Thread David Bremner
Austin Clements writes: > > This series of patches introduces a way for CLI callers to request a > specific format version on the command line and to determine if the > CLI does not supported the requested version pushed, d

[PATCH 3/3] notmuch-restore: allocate a temporary talloc context for each line parsed.

2012-12-16 Thread da...@tethera.net
From: David Bremner This lets the high level code in notmuch restore be ignorant about what the lower level code is doing as far as allocating memory. --- notmuch-restore.c | 12 ++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/notmuch-restore.c

[PATCH 2/3] notmuch-restore: replace continue with if

2012-12-16 Thread da...@tethera.net
From: David Bremner It is maybe a bit counter-intuitive with the condition reversed like this, but it makes the memory handling fix in the next patch easier. --- notmuch-restore.c | 15 +-- 1 file changed, 9 insertions(+), 6 deletions(-) diff --git

[PATCH 1/3] tag-utils: use the tag_opt_list_t as talloc context, if possible.

2012-12-16 Thread da...@tethera.net
From: David Bremner This code is no less correct than the previous version, since it does not make sense for the array to live longer than the wrapping struct. By not relying on the context passed into tag_parse_line, we can allow tag_op_list_t structures to live longer than

proposed fix for memory leak in notmuch restore

2012-12-16 Thread da...@tethera.net
In id:87vcc2q5n2.fsf at nikula.org, Jani points out a memory leak in the new restore code. This series is a proposed fix, namely do any allocation on a temporary talloc context that is destroyed after each line is processed.

[PATCH v3 0/5] add --format=text0 to notmuch search

2012-12-16 Thread Austin Clements
On Sun, 16 Dec 2012, Jani Nikula wrote: > Hi all, v3 of id:cover.1355064714.git.jani at nikula.org > > Changes since v2: > * add new patch 1/5 to clarify sprinter documentation > * fix the test patch 4/5 according to id:8738z6wguj.fsf at qmul.ac.uk and >id:87y5gyvvv7.fsf at

[PATCH 4/4] perf-test: add memory leak test for dump restore

2012-12-16 Thread da...@tethera.net
From: David Bremner In id:87vcc2q5n2.fsf at nikula.org, Jani points out a memory leak in the current version of the sup restore code. Among other things, this test is intended to verify a fix for that leak. --- performance-test/M01-dump-restore | 15 +++ 1 file

[PATCH 3/4] perf-test: initial version of memory test infrastructure.

2012-12-16 Thread da...@tethera.net
From: David Bremner The idea is run some code under valgrind --leak-check=full and report a summary, leaving the user to peruse the log file if they want. We go to some lengths to preserve the log files from accidental overwriting; the full corpus takes about 3 hours to run

[PATCH 2/4] perf-test: rename current tests as "time tests"

2012-12-16 Thread da...@tethera.net
From: David Bremner This is almost entirely renaming files, except for updating a few references to those file names, and changing the makefile target. A new set of memory tests will be run separately because they take much longer. --- performance-test/00-new|

[PATCH 1/4] perf-test: remove redunant "initial notmuch new"

2012-12-16 Thread da...@tethera.net
From: David Bremner The initial notmuch-new and caching are now done automatically by time_start --- performance-test/00-new |4 1 file changed, 4 deletions(-) diff --git a/performance-test/00-new b/performance-test/00-new index 6f0b50c..553bb8b 100755 ---

memory leak tests

2012-12-16 Thread da...@tethera.net
These are slightly rough around the edges, but I think they are useful. They already helped me track down a memory leak in notmuch new (id:1355234087-6886-1-git-send-email-david at tethera.net, id:1355196820-29734-1-git-send-email-david at tethera.net) They also would have caught the restore

[PATCH v2 3/4] test: notmuch search --format=text0

2012-12-16 Thread Austin Clements
On Sun, 09 Dec 2012, Jani Nikula wrote: > --- > test/text | 29 + > 1 file changed, 29 insertions(+) > > diff --git a/test/text b/test/text > index 428c89b..e003a66 100755 > --- a/test/text > +++ b/test/text > @@ -52,4 +52,33 @@ output=$(notmuch search --format=text

[PATCH v5b] show: indicate length, encoding of omitted body content

2012-12-16 Thread Peter Wang
If a leaf part's body content is omitted, return the encoded length and transfer encoding in --format=json output. This information may be used by the consumer, e.g. to decide whether to download a large attachment over a slow link. Returning the _encoded_ content length is more efficient than

[PATCH v5b] show: indicate charset for all omitted parts

2012-12-16 Thread Peter Wang
Write a "charset" field for all omitted parts for which it is applicable, not only text/html parts. Factor out the code to a separate function. It will be extended with more fields next. --- notmuch-show.c | 24 1 file changed, 16 insertions(+), 8 deletions(-) diff --git

[PATCH] contrib: pick: close message pane when quitting from show in the message pane

2012-12-16 Thread Mark Walters
We add a hook to the show buffer in the message window to close the message window when that buffer quits. It checks that the message-window is still displaying the show-message buffer and then closes it. --- This is (probably) a rather better version than the previous attempt. It uses hooks

[PATCH v2 3/4] test: notmuch search --format=text0

2012-12-16 Thread Mark Walters
On Sun, 09 Dec 2012, Jani Nikula wrote: > --- > test/text | 29 + > 1 file changed, 29 insertions(+) > > diff --git a/test/text b/test/text > index 428c89b..e003a66 100755 > --- a/test/text > +++ b/test/text > @@ -52,4 +52,33 @@ output=$(notmuch search

[PATCH v5 0/4] indicate length of omitted body content

2012-12-16 Thread Mark Walters
The b versions of this look good to me. Best wishes Mark On Sat, 15 Dec 2012, David Bremner wrote: > Peter Wang writes: > >> On Sat, 15 Dec 2012 08:45:33 +, Mark Walters > gmail.com> wrote: >>> >>> This version looks good to me with one very minor comments: >>> >>> Perhaps the name

[PATCH 0/7] Structed output versioning support

2012-12-16 Thread Mark Walters
LGTM +1 Best wishes Mark On Sun, 16 Dec 2012, Austin Clements wrote: > This series obsoletes [0] and must be applied on top of the Emacs CLI > error handling series [1]. This is much simpler than the original > series because it no longer includes the Emacs CLI error handling. > This also

[PATCH v2 0/7] Improve Emacs CLI error handling

2012-12-16 Thread Tomi Ollila
On Sat, Dec 15 2012, Austin Clements wrote: > This obsoletes id:1355548513-10085-1-git-send-email-amdragon at mit.edu > and fixes the things Mark and Tomi commented on. The interdiff is > below. Ok, new error messages appear at the end. Good. +1 Tomi > > diff --git a/emacs/notmuch-lib.el

[Patch v7 05/14] quote_and_decode_query: new function to quote hex-decoded queries

2012-12-16 Thread Jani Nikula
On Fri, 14 Dec 2012, david at tethera.net wrote: > From: David Bremner > > The query is split into tokens, with ' ' and ':' as delimiters. Any > token containing some hex-escaped character is quoted according to > Xapian rules. This maps id:foo%20%22bar to id:"foo ""bar". > This intentionally

[Patch v7 07/14] cli: add support for batch tagging operations to "notmuch tag"

2012-12-16 Thread Jani Nikula
On Fri, 14 Dec 2012, david at tethera.net wrote: > From: Jani Nikula > > Add support for batch tagging operations through stdin to "notmuch > tag". This can be enabled with the new --batch command line option to > "notmuch tag". The input must consist of lines of the format: > > +|- [...] [--]

[PATCH] fixup for hex encoding desription in notmuch-tag.1

2012-12-16 Thread Jani Nikula
On Sat, 15 Dec 2012, david at tethera.net wrote: > From: David Bremner > > --- > and here is the updated description. > > man/man1/notmuch-tag.1 | 19 ++- > 1 file changed, 14 insertions(+), 5 deletions(-) > > diff --git a/man/man1/notmuch-tag.1 b/man/man1/notmuch-tag.1 > index

[Patch v7 06/14] notmuch-restore: move query handling for batch restore to parser

2012-12-16 Thread Jani Nikula
On Fri, 14 Dec 2012, david at tethera.net wrote: > From: David Bremner > > We are able to detect more errors by looking at the string before it > is hex-decoded. We also need this to avoid the query quoting for more > general queries (to be written) that will mess up raw message-ids. > --- >

[Patch v7 04/14] notmuch-tag: factor out double quoting routine

2012-12-16 Thread Jani Nikula
On Fri, 14 Dec 2012, david at tethera.net wrote: > From: David Bremner > > This could live in tag-util as well, but it is really nothing specific > to tags (although the conventions are arguable specific to Xapian). > > The API is changed from "caller-allocates" to "readline-like". The scan for >

Re: [PATCH v5 0/4] indicate length of omitted body content

2012-12-16 Thread Mark Walters
The b versions of this look good to me. Best wishes Mark On Sat, 15 Dec 2012, David Bremner da...@tethera.net wrote: Peter Wang noval...@gmail.com writes: On Sat, 15 Dec 2012 08:45:33 +, Mark Walters markwalters1...@gmail.com wrote: This version looks good to me with one very minor

[PATCH] contrib: pick: close message pane when quitting from show in the message pane

2012-12-16 Thread Mark Walters
We add a hook to the show buffer in the message window to close the message window when that buffer quits. It checks that the message-window is still displaying the show-message buffer and then closes it. --- This is (probably) a rather better version than the previous attempt. It uses hooks

Re: [PATCH v2 3/4] test: notmuch search --format=text0

2012-12-16 Thread Austin Clements
On Sun, 09 Dec 2012, Jani Nikula j...@nikula.org wrote: --- test/text | 29 + 1 file changed, 29 insertions(+) diff --git a/test/text b/test/text index 428c89b..e003a66 100755 --- a/test/text +++ b/test/text @@ -52,4 +52,33 @@ output=$(notmuch search

memory leak tests

2012-12-16 Thread david
These are slightly rough around the edges, but I think they are useful. They already helped me track down a memory leak in notmuch new (id:1355234087-6886-1-git-send-email-da...@tethera.net, id:1355196820-29734-1-git-send-email-da...@tethera.net) They also would have caught the restore leak Jani

[PATCH 1/4] perf-test: remove redunant initial notmuch new

2012-12-16 Thread david
From: David Bremner brem...@debian.org The initial notmuch-new and caching are now done automatically by time_start --- performance-test/00-new |4 1 file changed, 4 deletions(-) diff --git a/performance-test/00-new b/performance-test/00-new index 6f0b50c..553bb8b 100755 ---

[PATCH 3/4] perf-test: initial version of memory test infrastructure.

2012-12-16 Thread david
From: David Bremner brem...@debian.org The idea is run some code under valgrind --leak-check=full and report a summary, leaving the user to peruse the log file if they want. We go to some lengths to preserve the log files from accidental overwriting; the full corpus takes about 3 hours to run

[PATCH 4/4] perf-test: add memory leak test for dump restore

2012-12-16 Thread david
From: David Bremner brem...@debian.org In id:87vcc2q5n2@nikula.org, Jani points out a memory leak in the current version of the sup restore code. Among other things, this test is intended to verify a fix for that leak. --- performance-test/M01-dump-restore | 15 +++ 1 file

Re: [PATCH 3/4] perf-test: initial version of memory test infrastructure.

2012-12-16 Thread Austin Clements
Quoth da...@tethera.net on Dec 16 at 2:23 pm: From: David Bremner brem...@debian.org The idea is run some code under valgrind --leak-check=full and report a summary, leaving the user to peruse the log file if they want. We go to some lengths to preserve the log files from accidental

proposed fix for memory leak in notmuch restore

2012-12-16 Thread david
In id:87vcc2q5n2@nikula.org, Jani points out a memory leak in the new restore code. This series is a proposed fix, namely do any allocation on a temporary talloc context that is destroyed after each line is processed. ___ notmuch mailing list

[PATCH 3/3] notmuch-restore: allocate a temporary talloc context for each line parsed.

2012-12-16 Thread david
From: David Bremner brem...@debian.org This lets the high level code in notmuch restore be ignorant about what the lower level code is doing as far as allocating memory. --- notmuch-restore.c | 12 ++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/notmuch-restore.c

[PATCH 1/3] tag-utils: use the tag_opt_list_t as talloc context, if possible.

2012-12-16 Thread david
From: David Bremner brem...@debian.org This code is no less correct than the previous version, since it does not make sense for the array to live longer than the wrapping struct. By not relying on the context passed into tag_parse_line, we can allow tag_op_list_t structures to live longer than

Re: [RFC PATCH] cli: add --remove-all option to notmuch tag

2012-12-16 Thread Mark Walters
On Mon, 03 Dec 2012, Jani Nikula j...@nikula.org wrote: Add --remove-all option to notmuch tag to remove all tags matching query before applying the tag changes. This allows removal and unconditional setting of the tags of a message: $ notmuch tag --remove-all id:f...@example.com $ notmuch

Re: gmail importer script

2012-12-16 Thread Jason A. Donenfeld
On Sat, Dec 15, 2012 at 11:41 AM, Patrick Totzke patricktot...@gmail.comwrote: Well, thats not the point.. the script shouldn't die like this. I think it's be better if the script caught that exception, deleted the file and continued.. Probably, but I suspect it's related to whatever

[PATCH v3 0/5] add --format=text0 to notmuch search

2012-12-16 Thread Jani Nikula
Hi all, v3 of id:cover.1355064714.git.j...@nikula.org Changes since v2: * add new patch 1/5 to clarify sprinter documentation * fix the test patch 4/5 according to id:8738z6wguj@qmul.ac.uk and id:87y5gyvvv7@awakening.csail.mit.edu Diff to v2 at the end of the cover letter. BR,

[PATCH v3 1/5] sprinter: clarify separator documentation

2012-12-16 Thread Jani Nikula
For text printers, the separator is a syntactic element. --- sprinter.h |9 + 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/sprinter.h b/sprinter.h index 59776a9..f43a844 100644 --- a/sprinter.h +++ b/sprinter.h @@ -42,10 +42,11 @@ typedef struct sprinter { */

[PATCH v3 2/5] sprinter: add text0 formatter for null character separated text

2012-12-16 Thread Jani Nikula
Same as the text formatter, but with each field separated by a null character rather than a newline character. --- sprinter-text.c | 22 ++ sprinter.h |6 ++ 2 files changed, 28 insertions(+) diff --git a/sprinter-text.c b/sprinter-text.c index 10343be..7779488

[PATCH v3 3/5] cli: add --format=text0 to notmuch search

2012-12-16 Thread Jani Nikula
Add new format text0, which is otherwise the same as text, but use the null character as separator instead of the newline character. This is similar to find(1) -print0 option, and works together with the xargs(1) -0 option. --- notmuch-search.c | 16 ++-- 1 file changed, 14

[PATCH v3 4/5] test: notmuch search --format=text0

2012-12-16 Thread Jani Nikula
--- test/text | 33 + 1 file changed, 33 insertions(+) diff --git a/test/text b/test/text index 428c89b..b5ccefc 100755 --- a/test/text +++ b/test/text @@ -52,4 +52,37 @@ output=$(notmuch search --format=text tëxt-search-méssage | notmuch_search_s

[PATCH v3 5/5] man: document notmuch search --format=text0

2012-12-16 Thread Jani Nikula
--- man/man1/notmuch-search.1 | 26 -- 1 file changed, 16 insertions(+), 10 deletions(-) diff --git a/man/man1/notmuch-search.1 b/man/man1/notmuch-search.1 index 0aff348..22bcd0a 100644 --- a/man/man1/notmuch-search.1 +++ b/man/man1/notmuch-search.1 @@ -25,9 +25,11 @@

Re: [PATCH v3 0/5] add --format=text0 to notmuch search

2012-12-16 Thread Austin Clements
On Sun, 16 Dec 2012, Jani Nikula j...@nikula.org wrote: Hi all, v3 of id:cover.1355064714.git.j...@nikula.org Changes since v2: * add new patch 1/5 to clarify sprinter documentation * fix the test patch 4/5 according to id:8738z6wguj@qmul.ac.uk and

Re: [PATCH v3 0/5] add --format=text0 to notmuch search

2012-12-16 Thread Mark Walters
On Sun, 16 Dec 2012, Jani Nikula j...@nikula.org wrote: Hi all, v3 of id:cover.1355064714.git.j...@nikula.org Changes since v2: * add new patch 1/5 to clarify sprinter documentation * fix the test patch 4/5 according to id:8738z6wguj@qmul.ac.uk and

Re: [PATCH v2 1/7] emacs: Centralize notmuch command error handling

2012-12-16 Thread David Bremner
Austin Clements amdra...@mit.edu writes: This provides library functions for unified handling of errors from the notmuch CLI. Follow-up patches will convert some scattered error handling to use this and add error handling where we currently ignore errors. pushed, d

Re: [RFC PATCH] cli: add --remove-all option to notmuch tag

2012-12-16 Thread Jani Nikula
On Sun, 16 Dec 2012, Mark Walters markwalters1...@gmail.com wrote: On Mon, 03 Dec 2012, Jani Nikula j...@nikula.org wrote: Add --remove-all option to notmuch tag to remove all tags matching query before applying the tag changes. This allows removal and unconditional setting of the tags of a

[PATCH v4 0/5] add --format=text0 to notmuch search

2012-12-16 Thread Jani Nikula
Hi all, a quick rebase of id:cover.1355691124.git.j...@nikula.org to fix a tiny conflict in patch context of 3/5. BR, Jani. Jani Nikula (5): sprinter: clarify separator documentation sprinter: add text0 formatter for null character separated text cli: add --format=text0 to notmuch search

[PATCH v4 1/5] sprinter: clarify separator documentation

2012-12-16 Thread Jani Nikula
For text printers, the separator is a syntactic element. --- sprinter.h |9 + 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/sprinter.h b/sprinter.h index 59776a9..f43a844 100644 --- a/sprinter.h +++ b/sprinter.h @@ -42,10 +42,11 @@ typedef struct sprinter { */

[PATCH v4 2/5] sprinter: add text0 formatter for null character separated text

2012-12-16 Thread Jani Nikula
Same as the text formatter, but with each field separated by a null character rather than a newline character. --- sprinter-text.c | 22 ++ sprinter.h |6 ++ 2 files changed, 28 insertions(+) diff --git a/sprinter-text.c b/sprinter-text.c index 10343be..7779488

[PATCH v4 3/5] cli: add --format=text0 to notmuch search

2012-12-16 Thread Jani Nikula
Add new format text0, which is otherwise the same as text, but use the null character as separator instead of the newline character. This is similar to find(1) -print0 option, and works together with the xargs(1) -0 option. --- notmuch-search.c | 16 ++-- 1 file changed, 14

[PATCH v4 4/5] test: notmuch search --format=text0

2012-12-16 Thread Jani Nikula
--- test/text | 33 + 1 file changed, 33 insertions(+) diff --git a/test/text b/test/text index 428c89b..b5ccefc 100755 --- a/test/text +++ b/test/text @@ -52,4 +52,37 @@ output=$(notmuch search --format=text tëxt-search-méssage | notmuch_search_s

[PATCH v4 5/5] man: document notmuch search --format=text0

2012-12-16 Thread Jani Nikula
--- man/man1/notmuch-search.1 | 26 -- 1 file changed, 16 insertions(+), 10 deletions(-) diff --git a/man/man1/notmuch-search.1 b/man/man1/notmuch-search.1 index 5c771fa..12f6719 100644 --- a/man/man1/notmuch-search.1 +++ b/man/man1/notmuch-search.1 @@ -25,9 +25,11 @@

Re: [PATCH 4/4] perf-test: add memory leak test for dump restore

2012-12-16 Thread David Bremner
da...@tethera.net writes: + +memory_run 'load nmbug tags' 'notmuch restore --accumulate --input=corpus.tags/nmbug.sup-dump' +memory_run 'dump *' 'notmuch dump --output=tags.sup' +memory_run 'restore *' 'notmuch restore --input=tags.sup' +memory_run 'dump --format=batch-tag *' 'notmuch dump

Re: gmail importer script

2012-12-16 Thread Patrick Totzke
Quoting Jason A. Donenfeld (2012-12-16 20:44:04) On Sat, Dec 15, 2012 at 11:41 AM, Patrick Totzke patricktot...@gmail.com wrote: Well, thats not the point.. the script shouldn't die like this. I think it's be better if the script caught that exception, deleted the file and

Re: [PATCH 3/3] notmuch-restore: allocate a temporary talloc context for each line parsed.

2012-12-16 Thread Jani Nikula
On Sun, 16 Dec 2012, da...@tethera.net wrote: From: David Bremner brem...@debian.org This lets the high level code in notmuch restore be ignorant about what the lower level code is doing as far as allocating memory. --- notmuch-restore.c | 12 ++-- 1 file changed, 10

Re: handling mail sent to a subscribed list

2012-12-16 Thread Brandon Invergo
If understand correctly, your concern is with the second copy of a message with the same message-id not showing up in your inbox? If so, this is more or less a feature (although in the case where the duplicated message id's are because of malice or stupidity on the sender's part, and not

Re: [PATCH v4 0/5] add --format=text0 to notmuch search

2012-12-16 Thread Tomi Ollila
On Mon, Dec 17 2012, Jani Nikula j...@nikula.org wrote: Hi all, a quick rebase of id:cover.1355691124.git.j...@nikula.org to fix a tiny conflict in patch context of 3/5. BR, Jani. As Mark Austin (also) gave +1 to v3 added notmuch::patch (only). Tomi Jani Nikula (5): sprinter:

Re: [PATCH v4 0/5] add --format=text0 to notmuch search

2012-12-16 Thread Tomi Ollila
On Mon, Dec 17 2012, Tomi Ollila tomi.oll...@iki.fi wrote: On Mon, Dec 17 2012, Jani Nikula j...@nikula.org wrote: Hi all, a quick rebase of id:cover.1355691124.git.j...@nikula.org to fix a tiny conflict in patch context of 3/5. BR, Jani. As Mark Austin (also) gave +1 to v3 added

[PATCH 1/3] CLI: add talloc leak report, controlled by an environment variable.

2012-12-16 Thread david
From: David Bremner brem...@debian.org 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. ---

[PATCH 3/3] notmuch-restore: use xtalloc version of strndup

2012-12-16 Thread david
From: David Bremner brem...@debian.org This gives line numbers for better debugging. --- notmuch-restore.c |7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/notmuch-restore.c b/notmuch-restore.c index 40596a8..0cc9c9f 100644 --- a/notmuch-restore.c +++

[PATCH 2/3] util: add xtalloc.[ch]

2012-12-16 Thread david
From: David Bremner brem...@debian.org 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/xtalloc.c | 15 +++

v2 restore leak fix

2012-12-16 Thread david
This obsoletes id:1355688997-19164-1-git-send-email-da...@tethera.net Actually the first patch in the series is now an unrelated bug fix, since it isn't needed anymore for 2 and 3. ___ notmuch mailing list notmuch@notmuchmail.org

[PATCH 1/3] notmuch-restore: fix return value propagation

2012-12-16 Thread david
From: David Bremner brem...@debian.org Previously notmuch_restore_command returned 0 if tag_message returned a non-zero (failure) value. This is wrong, since non-zero status indicates something mysterious went wrong with retrieving the message, or applying it. There was also a failure to check

[PATCH 3/3] notmuch-restore: allocate a temporary talloc context for each line parsed.

2012-12-16 Thread david
From: David Bremner brem...@debian.org This lets the high level code in notmuch restore be ignorant about what the lower level code is doing as far as allocating memory. --- notmuch-restore.c | 12 ++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/notmuch-restore.c

[PATCH 2/3] tag-utils: use the tag_opt_list_t as talloc context, if possible.

2012-12-16 Thread david
From: David Bremner brem...@debian.org This code is no less correct than the previous version, since it does not make sense for the array to live longer than the wrapping struct. By not relying on the context passed into tag_parse_line, we can allow tag_op_list_t structures to live longer than