Re: [PATCH 0/7] Structed output versioning support

2012-12-15 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 swi

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

2012-12-15 Thread David Bremner
Jani Nikula writes: > strtok_len() will eat all the leading delimiters at each call, and will > not return a zero-length token if you have multiple consecutive > delimiters. Which means you may end up losing stuff here. Right, I think for ':' it does matter, but it should be fixable with a a lit

[PATCH 7/7] emacs: Use --format-version for search, show, and reply

2012-12-15 Thread Austin Clements
--- emacs/notmuch-mua.el |2 +- emacs/notmuch-query.el |2 +- emacs/notmuch.el |6 +- test/emacs |2 +- test/emacs-show|2 +- 5 files changed, 9 insertions(+), 5 deletions(-) diff --git a/emacs/notmuch-mua.el b/emacs/notmuch-mua.el index ac2d29e

[PATCH 6/7] emacs: Special handling for version mismatch errors

2012-12-15 Thread Austin Clements
Since Emacs has more semantic information, we suppress the generic format version error from the CLI and give a more informative error. --- emacs/notmuch-lib.el | 11 ++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/emacs/notmuch-lib.el b/emacs/notmuch-lib.el index 8f840

[PATCH 5/7] test: Sanity tests for the --format-version argument

2012-12-15 Thread Austin Clements
--- test/json |6 ++ 1 file changed, 6 insertions(+) diff --git a/test/json b/test/json index bfafd55..8a01117 100755 --- a/test/json +++ b/test/json @@ -60,4 +60,10 @@ test_expect_equal_json "$output" "[{\"thread\": \"XXX\", \"tags\": [\"inbox\", \"unread\"]}]" +test_expect_code 20

[PATCH 4/7] reply: Support --format-version

2012-12-15 Thread Austin Clements
--- man/man1/notmuch-reply.1 | 21 + notmuch-reply.c |3 +++ 2 files changed, 24 insertions(+) diff --git a/man/man1/notmuch-reply.1 b/man/man1/notmuch-reply.1 index fa04c9e..9fa1956 100644 --- a/man/man1/notmuch-reply.1 +++ b/man/man1/notmuch-reply.1 @@ -57,6 +

[PATCH 3/7] show: Support --format-version

2012-12-15 Thread Austin Clements
--- man/man1/notmuch-show.1 | 20 notmuch-show.c |3 +++ 2 files changed, 23 insertions(+) diff --git a/man/man1/notmuch-show.1 b/man/man1/notmuch-show.1 index bd41c48..44cec46 100644 --- a/man/man1/notmuch-show.1 +++ b/man/man1/notmuch-show.1 @@ -128,6 +128,15

[PATCH 2/7] search: Support --format-version

2012-12-15 Thread Austin Clements
--- man/man1/notmuch-search.1 | 20 notmuch-search.c |3 +++ 2 files changed, 23 insertions(+) diff --git a/man/man1/notmuch-search.1 b/man/man1/notmuch-search.1 index 0aff348..5c771fa 100644 --- a/man/man1/notmuch-search.1 +++ b/man/man1/notmuch-search.1 @@ -3

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

2012-12-15 Thread Austin Clements
Currently there is a period of pain whenever we make backward-incompatible changes to the structured output format, which discourages not only backward-incompatible improvements to the format, but also backwards-compatible additions that may not be "perfect". In the end, these problems limit exper

[PATCH 0/7] Structed output versioning support

2012-12-15 Thread Austin Clements
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 switches to a CLI-wide minimum version instead of a per-command version, prints a war

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

2012-12-15 Thread Peter Wang
On Sat, 15 Dec 2012 08:45:33 +, Mark Walters wrote: > > This version looks good to me with one very minor comments: > > Perhaps the name format-omitted-part-meta should include sprinter (eg > format-omitted-part-meta-sprinter)? Seems so. I'll roll up another series if that's necessary. Pe

[PATCH] cli: add support for batch tagging operations to "notmuch tag"

2012-12-15 Thread da...@tethera.net
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: +|- [...] [--] [...] Each line is interpreted similarly to "notmuch tag" comm

Re: [PATCH 0/7] Structed output versioning support

2012-12-15 Thread Tomi Ollila
On Sun, Dec 16 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 switches to a CLI-wide minimum

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

2012-12-15 Thread David Bremner
Jani Nikula writes: > strtok_len() will eat all the leading delimiters at each call, and will > not return a zero-length token if you have multiple consecutive > delimiters. Which means you may end up losing stuff here. Right, I think for ':' it does matter, but it should be fixable with a a lit

[PATCH 3/7] show: Support --format-version

2012-12-15 Thread Austin Clements
--- man/man1/notmuch-show.1 | 20 notmuch-show.c |3 +++ 2 files changed, 23 insertions(+) diff --git a/man/man1/notmuch-show.1 b/man/man1/notmuch-show.1 index bd41c48..44cec46 100644 --- a/man/man1/notmuch-show.1 +++ b/man/man1/notmuch-show.1 @@ -128,6 +128,15

[PATCH 6/7] emacs: Special handling for version mismatch errors

2012-12-15 Thread Austin Clements
Since Emacs has more semantic information, we suppress the generic format version error from the CLI and give a more informative error. --- emacs/notmuch-lib.el | 11 ++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/emacs/notmuch-lib.el b/emacs/notmuch-lib.el index 8f840

[PATCH 5/7] test: Sanity tests for the --format-version argument

2012-12-15 Thread Austin Clements
--- test/json |6 ++ 1 file changed, 6 insertions(+) diff --git a/test/json b/test/json index bfafd55..8a01117 100755 --- a/test/json +++ b/test/json @@ -60,4 +60,10 @@ test_expect_equal_json "$output" "[{\"thread\": \"XXX\", \"tags\": [\"inbox\", \"unread\"]}]" +test_expect_code 20

[PATCH 7/7] emacs: Use --format-version for search, show, and reply

2012-12-15 Thread Austin Clements
--- emacs/notmuch-mua.el |2 +- emacs/notmuch-query.el |2 +- emacs/notmuch.el |6 +- test/emacs |2 +- test/emacs-show|2 +- 5 files changed, 9 insertions(+), 5 deletions(-) diff --git a/emacs/notmuch-mua.el b/emacs/notmuch-mua.el index ac2d29e

[PATCH 4/7] reply: Support --format-version

2012-12-15 Thread Austin Clements
--- man/man1/notmuch-reply.1 | 21 + notmuch-reply.c |3 +++ 2 files changed, 24 insertions(+) diff --git a/man/man1/notmuch-reply.1 b/man/man1/notmuch-reply.1 index fa04c9e..9fa1956 100644 --- a/man/man1/notmuch-reply.1 +++ b/man/man1/notmuch-reply.1 @@ -57,6 +

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

2012-12-15 Thread Austin Clements
Currently there is a period of pain whenever we make backward-incompatible changes to the structured output format, which discourages not only backward-incompatible improvements to the format, but also backwards-compatible additions that may not be "perfect". In the end, these problems limit exper

[PATCH 0/7] Structed output versioning support

2012-12-15 Thread Austin Clements
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 switches to a CLI-wide minimum version instead of a per-command version, prints a war

[PATCH 2/7] search: Support --format-version

2012-12-15 Thread Austin Clements
--- man/man1/notmuch-search.1 | 20 notmuch-search.c |3 +++ 2 files changed, 23 insertions(+) diff --git a/man/man1/notmuch-search.1 b/man/man1/notmuch-search.1 index 0aff348..5c771fa 100644 --- a/man/man1/notmuch-search.1 +++ b/man/man1/notmuch-search.1 @@ -3

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

2012-12-15 Thread Tomi Ollila
On Sat, Dec 15 2012, Austin Clements wrote: > This obsoletes id:1355548513-10085-1-git-send-email-amdra...@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 b/emac

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

2012-12-15 Thread Tomi Ollila
On Sat, Dec 15 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 format-omitted-part-meta should include sprinter (eg >>> format-o

v3 performance tests improvements

2012-12-15 Thread Tomi Ollila
On Sat, Dec 15 2012, david at tethera.net wrote: > This obsoletes the series > > id:1354762908-5788-1-git-send-email-david at tethera.net > > I addition to fixing some small things that Austin noticed, this > series adds a convenience function "time_start" that unpacks the mail, > prints the

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

2012-12-15 Thread Tomi Ollila
On Sat, Dec 15 2012, Austin Clements wrote: > 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. > --- The series looks prett

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

2012-12-15 Thread Mark Walters
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 >

[PATCH] emacs: Fix bug in resynchronizing after a JSON parse error

2012-12-15 Thread Tomi Ollila
On Fri, Dec 14 2012, Austin Clements wrote: > Previously, if the input stream consisted only of an error message, > notmuch-json-begin-compound would signal a (wrong-type-argument > number-or-marker-p nil) error when reaching the end of the error > message. This happened because notmuch-json-sca

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

2012-12-15 Thread Mark Walters
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. > --- > notm

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

2012-12-15 Thread Mark Walters
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 d

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

2012-12-15 Thread Mark Walters
This series looks good to me. Just one possible thought: would it be worth time-stamping the errors (mostly in case the user does not quit the error buffer). But +1 anyway Best wishes Mark On Sat, 15 Dec 2012, Austin Clements wrote: > This obsoletes id:1355548513-10085-1-git-send-email-amdra.

[PATCH] contrib: pick: archive message updated

2012-12-15 Thread Tomi Ollila
On Sat, Dec 08 2012, Mark Walters wrote: > Update pick's archive message to respect notmuch-archive-tags. Also > split archive message into an archiving part and a separate > "then-next" part, to move more inline with show. Update the keybinding > so default behaviour is unchanged. > --- LGTM.

[PATCH] cli: add support for batch tagging operations to "notmuch tag"

2012-12-15 Thread david
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: +|- [...] [--] [...] Each line is interpreted similarly to "notmuch tag" comm

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

2012-12-15 Thread da...@tethera.net
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 ac2c8d7..a203f53 100644 --- a/man/man1/notmuch-tag.1 +++ b/man/man

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

2012-12-15 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 re

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

2012-12-15 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

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

2012-12-15 Thread Jani Nikula
On Fri, 14 Dec 2012, da...@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 does

[PATCH] fixup: clarify TAG_FLAG_ID_ONLY comments and name

2012-12-15 Thread da...@tethera.net
From: David Bremner --- After some chatter on IRC, Mark and I converged to the following notmuch-restore.c |2 +- tag-util.c|2 +- tag-util.h|6 -- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/notmuch-restore.c b/notmuch-restore.c index 112f2f

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

2012-12-15 Thread Jani Nikula
On Fri, 14 Dec 2012, da...@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: > > +|- [...] [--] [...]

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

2012-12-15 Thread Jani Nikula
On Sat, 15 Dec 2012, da...@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 ac2

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

2012-12-15 Thread Jani Nikula
On Fri, 14 Dec 2012, da...@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. > --- > notmuch

[PATCH v2 7/7] test: Test search's handling of subprocess errors

2012-12-15 Thread Austin Clements
--- test/emacs | 23 +++ 1 file changed, 23 insertions(+) diff --git a/test/emacs b/test/emacs index 5403930..5067d67 100755 --- a/test/emacs +++ b/test/emacs @@ -853,4 +853,27 @@ test_expect_success "Rendering HTML mail with images" \ 'cat OUTPUT && grep -q smiley OUTP

[PATCH v2 6/7] emacs: Use unified error handling in search

2012-12-15 Thread Austin Clements
This slightly changes the output of an existing test since we now report non-zero exits with a pop-up buffer instead of at the end of the search results. --- emacs/notmuch-lib.el | 13 + emacs/notmuch.el | 13 - test/emacs-large-search-buffer |

[PATCH v2 5/7] test: Test show's handling of subprocess errors

2012-12-15 Thread Austin Clements
--- test/emacs-show | 22 ++ 1 file changed, 22 insertions(+) diff --git a/test/emacs-show b/test/emacs-show index b670abf..40fab61 100755 --- a/test/emacs-show +++ b/test/emacs-show @@ -163,4 +163,26 @@ EOF test_expect_equal_file OUTPUT EXPECTED +test_begin_subtest "Show

[PATCH v2 4/7] emacs: Improve error handling for notmuch-call-notmuch-json

2012-12-15 Thread Austin Clements
This checks for non-zero exit status from JSON CLI calls and pops up an error buffer with stderr and stdout. A consequence of this is that show and reply now handle errors, rather than ignoring them. --- emacs/notmuch-lib.el | 22 +++--- 1 file changed, 15 insertions(+), 7 delet

[PATCH v2 3/7] emacs: Factor out synchronous notmuch JSON invocations

2012-12-15 Thread Austin Clements
Previously this code was duplicated between show and reply. This factors out synchronously invoking notmuch and parsing the output as JSON. --- emacs/notmuch-lib.el | 14 ++ emacs/notmuch-mua.el |8 +--- emacs/notmuch-query.el | 11 ++- 3 files changed, 17 inse

[PATCH v2 2/7] emacs: Use unified error handling in notmuch-call-notmuch-process

2012-12-15 Thread Austin Clements
This makes notmuch-call-notmuch-process use the unified CLI error handling, which basically refines the error handling this function already did. --- emacs/notmuch.el | 20 +++- 1 file changed, 7 insertions(+), 13 deletions(-) diff --git a/emacs/notmuch.el b/emacs/notmuch.el ind

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

2012-12-15 Thread Austin Clements
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. --- emacs/notmuch-lib.el | 55 ++

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

2012-12-15 Thread Austin Clements
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. diff --git a/emacs/notmuch-lib.el b/emacs/notmuch-lib.el index cf61635..8f84087 100644 --- a/emacs/notmuch-lib.el +++ b/emacs/notmuch-lib.el @@ -326,10

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

2012-12-15 Thread David Bremner
Mark Walters writes: > What happens if a message id (for example) contains a ':'? Is a query of > the form > > id:stuff"encoded_stuff" > > acceptable? (As far as I can see from the man page ':' does not need to > be in hex.) The updated version of the notmuch-dump man page does say that : wil

[PATCH 6/7] emacs: Use unified error handling in search

2012-12-15 Thread Austin Clements
On Sat, 15 Dec 2012, Mark Walters wrote: > On Sat, 15 Dec 2012, Austin Clements wrote: >> This slightly changes the output of an existing test since we now >> report non-zero exits with a pop-up buffer instead of at the end of >> the search results. >> --- >> emacs/notmuch-lib.el | 1

[PATCH 2/7] emacs: Use unified error handling in notmuch-call-notmuch-process

2012-12-15 Thread Austin Clements
On Sat, 15 Dec 2012, Mark Walters wrote: > On Sat, 15 Dec 2012, Austin Clements wrote: >> This makes notmuch-call-notmuch-process use the unified CLI error >> handling, which basically refines the error handling this function >> already did. >> --- >> emacs/notmuch.el | 15 --- >>

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

2012-12-15 Thread Austin Clements
On Sat, 15 Dec 2012, Tomi Ollila wrote: > On Sat, Dec 15 2012, Austin Clements wrote: > >> 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

[PATCH] contrib: pick: archive message updated

2012-12-15 Thread David Bremner
Mark Walters writes: > Update pick's archive message to respect notmuch-archive-tags. Also > split archive message into an archiving part and a separate > "then-next" part, to move more inline with show. Update the keybinding > so default behaviour is unchanged. > --- pushed, d

[PATCH] emacs: Fix bug in resynchronizing after a JSON parse error

2012-12-15 Thread David Bremner
Austin Clements writes: > Previously, if the input stream consisted only of an error message, > notmuch-json-begin-compound would signal a (wrong-type-argument > number-or-marker-p nil) error when reaching the end of the error > message. pushed. d

v3 performance tests improvements

2012-12-15 Thread David Bremner
Tomi Ollila writes: > > This patch set looks tolerable to me :-D > > Tomi With such a strong endorsement, I had to push the series right away. d

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

2012-12-15 Thread Jani Nikula
On Fri, 14 Dec 2012, da...@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 > max

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

2012-12-15 Thread David Bremner
Mark Walters writes: >> +if (hex_decode_inplace (tok) != HEX_SUCCESS) { >> +ret = line_error (TAG_PARSE_INVALID, line_for_error, >> + "hex decoding of query %s failed", tok); >> +goto DONE; >> +} >> +/* skip 'id:' */ >> +*query_string = tok

[PATCH v5 4/4] test: conform to content length, encoding fields

2012-12-15 Thread Peter Wang
Update tests to expect content-length and content-transfer-encoding fields in show --format=json output, for leaf parts with omitted body content. --- test/crypto| 30 +- test/json | 4 +++- test/multipart | 24 +--- test/sexp | 4 +++

[PATCH v5 3/4] show: indicate length, encoding of omitted body content

2012-12-15 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 re

[PATCH v5 2/4] show: indicate charset for all omitted parts

2012-12-15 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 v5 1/4] test: normalize only message filenames in show json

2012-12-15 Thread Peter Wang
notmuch_json_show_sanitize replaced "filename" field values even in part structures, where the value is predictable. Make it only normalize the filename value if it is an absolute path (begins with slash), which is true of the Maildir filenames that were intended to be normalized away. --- test/m

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

2012-12-15 Thread Peter Wang
This obsoletes 1355057796-19260-1-git-send-email-markwalters1009 at gmail.com Peter Wang (4): test: normalize only message filenames in show json show: indicate charset for all omitted parts show: indicate length, encoding of omitted body content test: conform to content length, encoding f

[PATCH v3 0/5] Use invisibility to toggle display of all parts including multipart

2012-12-15 Thread Austin Clements
Quoth Mark Walters on Dec 15 at 8:15 am: > This is version 3 of this set: version 2 is at > id:1355389924-3718-1-git-send-email-markwalters1009 at gmail.com > > This fixes the things Austin pointed out in the previous version. > > Diff from v2 is below the diffstat. > > Best wishes > > Mark

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

2012-12-15 Thread david
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 ac2c8d7..a203f53 100644 --- a/man/man1/notmuch-tag.1 +++ b/man/man

[PATCH v2 4/7] emacs: Improve error handling for notmuch-call-notmuch-json

2012-12-15 Thread Austin Clements
This checks for non-zero exit status from JSON CLI calls and pops up an error buffer with stderr and stdout. A consequence of this is that show and reply now handle errors, rather than ignoring them. --- emacs/notmuch-lib.el | 22 +++--- 1 file changed, 15 insertions(+), 7 delet

[PATCH v2 3/7] emacs: Factor out synchronous notmuch JSON invocations

2012-12-15 Thread Austin Clements
Previously this code was duplicated between show and reply. This factors out synchronously invoking notmuch and parsing the output as JSON. --- emacs/notmuch-lib.el | 14 ++ emacs/notmuch-mua.el |8 +--- emacs/notmuch-query.el | 11 ++- 3 files changed, 17 inse

[PATCH v2 6/7] emacs: Use unified error handling in search

2012-12-15 Thread Austin Clements
This slightly changes the output of an existing test since we now report non-zero exits with a pop-up buffer instead of at the end of the search results. --- emacs/notmuch-lib.el | 13 + emacs/notmuch.el | 13 - test/emacs-large-search-buffer |

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

2012-12-15 Thread Austin Clements
This obsoletes id:1355548513-10085-1-git-send-email-amdra...@mit.edu and fixes the things Mark and Tomi commented on. The interdiff is below. diff --git a/emacs/notmuch-lib.el b/emacs/notmuch-lib.el index cf61635..8f84087 100644 --- a/emacs/notmuch-lib.el +++ b/emacs/notmuch-lib.el @@ -326,10 +32

[PATCH v2 5/7] test: Test show's handling of subprocess errors

2012-12-15 Thread Austin Clements
--- test/emacs-show | 22 ++ 1 file changed, 22 insertions(+) diff --git a/test/emacs-show b/test/emacs-show index b670abf..40fab61 100755 --- a/test/emacs-show +++ b/test/emacs-show @@ -163,4 +163,26 @@ EOF test_expect_equal_file OUTPUT EXPECTED +test_begin_subtest "Sh

[PATCH v2 7/7] test: Test search's handling of subprocess errors

2012-12-15 Thread Austin Clements
--- test/emacs | 23 +++ 1 file changed, 23 insertions(+) diff --git a/test/emacs b/test/emacs index 5403930..5067d67 100755 --- a/test/emacs +++ b/test/emacs @@ -853,4 +853,27 @@ test_expect_success "Rendering HTML mail with images" \ 'cat OUTPUT && grep -q smiley OUTP

[PATCH v2 2/7] emacs: Use unified error handling in notmuch-call-notmuch-process

2012-12-15 Thread Austin Clements
This makes notmuch-call-notmuch-process use the unified CLI error handling, which basically refines the error handling this function already did. --- emacs/notmuch.el | 20 +++- 1 file changed, 7 insertions(+), 13 deletions(-) diff --git a/emacs/notmuch.el b/emacs/notmuch.el ind

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

2012-12-15 Thread Austin Clements
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. --- emacs/notmuch-lib.el | 55 ++

Re: [PATCH 6/7] emacs: Use unified error handling in search

2012-12-15 Thread Austin Clements
On Sat, 15 Dec 2012, Mark Walters wrote: > On Sat, 15 Dec 2012, Austin Clements wrote: >> This slightly changes the output of an existing test since we now >> report non-zero exits with a pop-up buffer instead of at the end of >> the search results. >> --- >> emacs/notmuch-lib.el | 1

Re: [PATCH 2/7] emacs: Use unified error handling in notmuch-call-notmuch-process

2012-12-15 Thread Austin Clements
On Sat, 15 Dec 2012, Mark Walters wrote: > On Sat, 15 Dec 2012, Austin Clements wrote: >> This makes notmuch-call-notmuch-process use the unified CLI error >> handling, which basically refines the error handling this function >> already did. >> --- >> emacs/notmuch.el | 15 --- >>

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

2012-12-15 Thread Austin Clements
On Sat, 15 Dec 2012, Tomi Ollila wrote: > On Sat, Dec 15 2012, Austin Clements wrote: > >> 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

[PATCH] fixup: clarify TAG_FLAG_ID_ONLY comments and name

2012-12-15 Thread david
From: David Bremner --- After some chatter on IRC, Mark and I converged to the following notmuch-restore.c |2 +- tag-util.c|2 +- tag-util.h|6 -- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/notmuch-restore.c b/notmuch-restore.c index 112f2

handling mail sent to a subscribed list

2012-12-15 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 v3 0/5] Use invisibility to toggle display of all parts including multipart

2012-12-15 Thread Austin Clements
Quoth Mark Walters on Dec 15 at 8:15 am: > This is version 3 of this set: version 2 is at > id:1355389924-3718-1-git-send-email-markwalters1...@gmail.com > > This fixes the things Austin pointed out in the previous version. > > Diff from v2 is below the diffstat. > > Best wishes > > Mark LGT

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

2012-12-15 Thread David Bremner
Mark Walters writes: > What happens if a message id (for example) contains a ':'? Is a query of > the form > > id:stuff"encoded_stuff" > > acceptable? (As far as I can see from the man page ':' does not need to > be in hex.) The updated version of the notmuch-dump man page does say that : wil

notmuch for christmas, again

2012-12-15 Thread Mark Walters
There are some pick patches I would quite like to get in: (note all patches below only touch contrib/notmuch-pick/notmuch-pick.el) id:1354970494-18050-1-git-send-email-markwalters1009 at gmail.com bugfix to use archive tags rather than always "-inbox" id:1354970674-18136-1-git-send-email-markwa

gmail importer script

2012-12-15 Thread Patrick Totzke
ail.org/pipermail/notmuch/attachments/20121215/a8b6075b/attachment.pgp>

Re: [PATCH] contrib: pick: archive message updated

2012-12-15 Thread David Bremner
Mark Walters writes: > Update pick's archive message to respect notmuch-archive-tags. Also > split archive message into an archiving part and a separate > "then-next" part, to move more inline with show. Update the keybinding > so default behaviour is unchanged. > --- pushed, d ___

Re: [PATCH] emacs: Fix bug in resynchronizing after a JSON parse error

2012-12-15 Thread David Bremner
Austin Clements writes: > Previously, if the input stream consisted only of an error message, > notmuch-json-begin-compound would signal a (wrong-type-argument > number-or-marker-p nil) error when reaching the end of the error > message. pushed. d ___

Re: v3 performance tests improvements

2012-12-15 Thread David Bremner
Tomi Ollila writes: > > This patch set looks tolerable to me :-D > > Tomi With such a strong endorsement, I had to push the series right away. d ___ notmuch mailing list notmuch@notmuchmail.org http://notmuchmail.org/mailman/listinfo/notmuch

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

2012-12-15 Thread David Bremner
Mark Walters writes: >> +if (hex_decode_inplace (tok) != HEX_SUCCESS) { >> +ret = line_error (TAG_PARSE_INVALID, line_for_error, >> + "hex decoding of query %s failed", tok); >> +goto DONE; >> +} >> +/* skip 'id:' */ >> +*query_string = tok

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

2012-12-15 Thread Mark Walters
On Fri, 14 Dec 2012, da...@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 > max

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

2012-12-15 Thread Mark Walters
On Fri, 14 Dec 2012, da...@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. > --- > notmuch

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

2012-12-15 Thread Mark Walters
On Fri, 14 Dec 2012, da...@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 does

[PATCH 7/7] test: Test search's handling of subprocess errors

2012-12-15 Thread Mark Walters
On Sat, 15 Dec 2012, Austin Clements wrote: > --- > test/emacs | 23 +++ > 1 file changed, 23 insertions(+) > > diff --git a/test/emacs b/test/emacs > index 5403930..88b062c 100755 > --- a/test/emacs > +++ b/test/emacs > @@ -853,4 +853,27 @@ test_expect_success "Rendering HT

[PATCH 6/7] emacs: Use unified error handling in search

2012-12-15 Thread Mark Walters
On Sat, 15 Dec 2012, Austin Clements wrote: > This slightly changes the output of an existing test since we now > report non-zero exits with a pop-up buffer instead of at the end of > the search results. > --- > emacs/notmuch-lib.el | 13 + > emacs/notmuch.el

[PATCH 2/7] emacs: Use unified error handling in notmuch-call-notmuch-process

2012-12-15 Thread Mark Walters
On Sat, 15 Dec 2012, Austin Clements wrote: > This makes notmuch-call-notmuch-process use the unified CLI error > handling, which basically refines the error handling this function > already did. > --- > emacs/notmuch.el | 15 --- > 1 file changed, 4 insertions(+), 11 deletions(-) >

notmuch python bindings corrupt db index (was: gmail importer script)

2012-12-15 Thread Jason A. Donenfeld
nt was scrubbed... URL: <http://notmuchmail.org/pipermail/notmuch/attachments/20121215/559ddabd/attachment.html>

gmail importer script

2012-12-15 Thread Jason A. Donenfeld
On Thu, Dec 13, 2012 at 5:48 PM, Patrick Totzke wrote: > > notmuch.errors.FileNotEmailError Delete the file it dies on and try again. -- next part -- An HTML attachment was scrubbed... URL: <http://notmuchmail.org/pipermail/notmuch/attachments/20121215

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

2012-12-15 Thread Tomi Ollila
On Sat, Dec 15 2012, David Bremner wrote: > Peter Wang writes: > >> On Sat, 15 Dec 2012 08:45:33 +, Mark Walters >> wrote: >>> >>> This version looks good to me with one very minor comments: >>> >>> Perhaps the name format-omitted-part-meta should include sprinter (eg >>> format-omitted-p

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

2012-12-15 Thread David Bremner
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 format-omitted-part-meta should include sprinter (eg >> format-omitted-part-meta-sprinter)? > > Seems so. I'll roll u

Re: v3 performance tests improvements

2012-12-15 Thread Tomi Ollila
On Sat, Dec 15 2012, da...@tethera.net wrote: > This obsoletes the series > > id:1354762908-5788-1-git-send-email-da...@tethera.net > > I addition to fixing some small things that Austin noticed, this > series adds a convenience function "time_start" that unpacks the mail, > prints the heade

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

2012-12-15 Thread Mark Walters
This version looks good to me with one very minor comments: Perhaps the name format-omitted-part-meta should include sprinter (eg format-omitted-part-meta-sprinter)? Best wishes Mark On Sat, 15 Dec 2012, Peter Wang wrote: > This obsoletes 1355057796-19260-1-git-send-email-markwalters1009 at

[Patch v3 11/11] perf-test: use nmbug tags in dump-restore tests

2012-12-15 Thread da...@tethera.net
From: David Bremner This makes the tag set a bit less trivial. Note that if you use the small corpus, this is not so interesting (and is also a bit noisy) since the messages will not be found. In the future this could be checked for. Conflicts: performance-test/01-dump-restore --- perf

[Patch v3 10/11] perf-test: split basic into 00-new, 01-dump-restore, and 02-tag

2012-12-15 Thread da...@tethera.net
From: David Bremner We use the new "time_start" function to restore the database from cache if possible. --- performance-test/00-new| 19 +++ performance-test/01-dump-restore | 12 performance-test/02-tag| 14 ++ performanc

  1   2   >