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

2012-12-15 Thread Mark Walters
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 Mark Walters (5): emacs: show: modify insert-part-header to

[PATCH v3 1/5] emacs: show: modify insert-part-header to save the button text

2012-12-15 Thread Mark Walters
This just make notmuch-show-insert-part-header save the basic button text for parts as an attribute. This makes it simpler for the button action (added in a later patch) to reword the label as appropriate (eg append (not shown) or not as appropriate). --- emacs/notmuch-show.el | 18

[PATCH v3 2/5] emacs: show: add overlays for each part

2012-12-15 Thread Mark Walters
This makes notmuch-show-insert-bodypart add an overlay for any non-trivial part with a button header (currently the first text/plain part does not have a button). At this point the overlay is available to the button but there is no action using it yet. In addition the argument HIDE is passed down

[PATCH v3 3/5] emacs: show: add invisibility button action

2012-12-15 Thread Mark Walters
This adds a button action to show hidden parts. In this version t toggles the visibility of a part. In addition RET on a non-shown part shows it. The button is used to hide parts when appropriate (eg text/html in multipart/alternative). --- emacs/notmuch-show.el | 35

[PATCH v3 4/5] emacs: wash: fix fake-diff part to include msg parameter

2012-12-15 Thread Mark Walters
The fake-diff part from notmuch wash did not pass the msg parameter to notmuch-show-insert-bodypart. Previously this did not matter, but is now needed to get the overlays right for invisibility. --- emacs/notmuch-wash.el |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git

[PATCH v3 5/5] emacs: show: set default show-all-multipart/alternatives to nil

2012-12-15 Thread Mark Walters
Now that the invisibility display of parts is present we no longer need to force the display of all multipart/alternatives: users can toggle them for themselves when needed. --- emacs/notmuch-show.el |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/emacs/notmuch-show.el

Re: gmail importer script

2012-12-15 Thread Jason A. Donenfeld
On Thu, Dec 13, 2012 at 5:48 PM, Patrick Totzke patricktot...@gmail.comwrote: notmuch.errors.FileNotEmailError Delete the file it dies on and try again. ___ notmuch mailing list notmuch@notmuchmail.org http://notmuchmail.org/mailman/listinfo/notmuch

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

2012-12-15 Thread Jason A. Donenfeld
On Sat, Dec 15, 2012 at 7:18 AM, Austin Clements amdra...@mit.edu wrote: need to at least os.fsync before the os.link. Fixed, thanks for the suggestion. http://git.zx2c4.com/gmail-notmuch/commit/?id=3f9646058bfd91d7d0e2eda035521f97de92eabc ___

Re: [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 noval...@gmail.com wrote: This obsoletes

Re: [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 amdra...@mit.edu 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

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

2012-12-15 Thread Mark Walters
On Sat, 15 Dec 2012, Austin Clements amdra...@mit.edu 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

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

2012-12-15 Thread Mark Walters
On Sat, 15 Dec 2012, Austin Clements amdra...@mit.edu 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

Re: gmail importer script

2012-12-15 Thread Patrick Totzke
Quoting Jason A. Donenfeld (2012-12-15 08:22:46) On Thu, Dec 13, 2012 at 5:48 PM, Patrick Totzke patricktot...@gmail.com wrote: notmuch.errors.FileNotEmailError Delete the file it dies on and try again. Well, thats not the point.. the script shouldn't die like this. I think it's

Re: 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-markwalters1...@gmail.com bugfix to use archive tags rather than always -inbox

Re: [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 markwalters1...@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 up another series if

Re: [Patch v6 1/6] tag-util: factor out rules for illegal tags, use in parse_tag_line

2012-12-15 Thread David Bremner
Mark Walters markwalters1...@gmail.com writes: I don't know if this matters but it seems that one can still add a - tag by doing something like echo +%2d -- search | notmuch tag --batch This might be the right thing to do but I thought I would mention it. I _think_ it's a feature, so I'm

v3 performance tests improvements

2012-12-15 Thread david
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 header, and recovers a database cache if present. This should

[Patch v3 03/11] perf-test: add corpus size to output, compact I/O stats

2012-12-15 Thread david
From: David Bremner brem...@debian.org Austin suggested a while ago that the corpus size be printed in the header. In the end it seems the corpus will be fixed per test script, so this suggestion indeed makes sense. The tabbing was wrapping on my usual 80 column terminal, so I joined the input

[Patch v3 02/11] perf-test: add argument parsing for performance tests

2012-12-15 Thread david
From: David Bremner brem...@debian.org This patch just sets (non-exported) variables. The variable $debug is already used, and $corpus_size will be used in following commits. --- performance-test/perf-test-lib.sh | 25 + 1 file changed, 25 insertions(+) diff --git

[Patch v3 04/11] perf-test: optionally print description for each group of tests

2012-12-15 Thread david
From: David Bremner brem...@debian.org Output from tests is indented slightly in the same style as the correctness tests. --- performance-test/perf-test-lib.sh |7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/performance-test/perf-test-lib.sh

[Patch v3 05/11] perf-test: cache unpacked corpus

2012-12-15 Thread david
From: David Bremner brem...@debian.org Unpacking is not really the expensive step (compared to the initial notmuch new), but this is a pre-requisite to caching the database. --- performance-test/.gitignore |1 + performance-test/Makefile.local |2 +-

[Patch v3 06/11] perf-test: add caching of xapian database

2012-12-15 Thread david
From: David Bremner brem...@debian.org The caching and uncaching seem to be necessarily manual, as timing the initial notmuch new is one of our goals with this suite. --- performance-test/.gitignore |1 + performance-test/Makefile.local |2 +- performance-test/basic|

[Patch v3 07/11] perf-test: update README

2012-12-15 Thread david
From: David Bremner brem...@debian.org Describe new argument parsing and mention cache handling routines. --- performance-test/README | 26 -- 1 file changed, 16 insertions(+), 10 deletions(-) diff --git a/performance-test/README b/performance-test/README index

[Patch v3 09/11] perf-test: unpack tags.

2012-12-15 Thread david
From: David Bremner brem...@debian.org There is only one set of tags, independant of the size of message corpus chosen. --- performance-test/perf-test-lib.sh |7 +++ 1 file changed, 7 insertions(+) diff --git a/performance-test/perf-test-lib.sh b/performance-test/perf-test-lib.sh index

[Patch v3 08/11] perf-test: bump corpus version to 0.3

2012-12-15 Thread david
From: David Bremner brem...@debian.org The new version ships with some tags, and an updated archive of the notmuch mailing list. --- performance-test/download/notmuch-email-corpus-0.2.tar.xz.asc |9 - performance-test/download/notmuch-email-corpus-0.3.tar.xz.asc |9 +

[Patch v3 01/11] perf-test: propagate non-zero returns from /usr/bin/time

2012-12-15 Thread david
From: David Bremner brem...@debian.org Unlike in the correctness tests, the most common cause of non-zero return seems to be the user interrupting, so killing the run seems like the friendly thing to do. --- performance-test/perf-test-lib.sh |2 ++ 1 file changed, 2 insertions(+) diff --git

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

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

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

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

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

2012-12-15 Thread David Bremner
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 comments: Perhaps the name format-omitted-part-meta should include sprinter (eg format-omitted-part-meta-sprinter)?

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

2012-12-15 Thread Tomi Ollila
On Sat, Dec 08 2012, Mark Walters markwalters1...@gmail.com 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

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

2012-12-15 Thread Tomi Ollila
On Fri, Dec 14 2012, Austin Clements amdra...@mit.edu 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

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

2012-12-15 Thread Tomi Ollila
On Sat, Dec 15 2012, Austin Clements amdra...@mit.edu 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

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 header, and

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 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 comments: Perhaps the name format-omitted-part-meta should include

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 brem...@debian.org 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

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 brem...@debian.org 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.

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 brem...@debian.org 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

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

2012-12-15 Thread David Bremner
Mark Walters markwalters1...@gmail.com 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:' */ +

Re: v3 performance tests improvements

2012-12-15 Thread David Bremner
Tomi Ollila tomi.oll...@iki.fi 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

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

2012-12-15 Thread David Bremner
Austin Clements amdra...@mit.edu 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: [PATCH] contrib: pick: archive message updated

2012-12-15 Thread David Bremner
Mark Walters markwalters1...@gmail.com 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,

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

2012-12-15 Thread David Bremner
Mark Walters markwalters1...@gmail.com writes: What happens if a message id (for example) contains a ':'? Is a query of the form id:stuffencoded_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

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 LGTM.

[PATCH] fixup: clarify TAG_FLAG_ID_ONLY comments and name

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

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

2012-12-15 Thread Austin Clements
On Sat, 15 Dec 2012, Tomi Ollila tomi.oll...@iki.fi wrote: On Sat, Dec 15 2012, Austin Clements amdra...@mit.edu 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

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 markwalters1...@gmail.com wrote: On Sat, 15 Dec 2012, Austin Clements amdra...@mit.edu wrote: This makes notmuch-call-notmuch-process use the unified CLI error handling, which basically refines the error handling this function already did. ---

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

2012-12-15 Thread Austin Clements
On Sat, 15 Dec 2012, Mark Walters markwalters1...@gmail.com wrote: On Sat, 15 Dec 2012, Austin Clements amdra...@mit.edu 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. ---

[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 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

[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 OUTPUT'

[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

[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

[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 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

[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

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

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

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 brem...@debian.org 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

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 brem...@debian.org 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.

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 brem...@debian.org --- 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

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 j...@nikula.org 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: +tag|-tag [...]

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 brem...@debian.org 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

[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

[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

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

2012-12-15 Thread david
From: Jani Nikula j...@nikula.org 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: +tag|-tag [...] [--] search-term [...] Each line is interpreted

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 amdra...@mit.edu wrote: This obsoletes

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

2012-12-15 Thread Tomi Ollila
On Sat, Dec 15 2012, Austin Clements amdra...@mit.edu 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

[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 @@

[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

[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

[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 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

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

2012-12-15 Thread David Bremner
Jani Nikula j...@nikula.org 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

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

2012-12-15 Thread Tomi Ollila
On Sun, Dec 16 2012, Austin Clements amdra...@mit.edu 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

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 amdra...@mit.edu 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.

[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

[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. ---

[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 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

[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 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

[PATCH 0/7] Improve Emacs CLI error handling

2012-12-15 Thread Austin Clements
This remixes the error handling patches from the schema versioning series [1] and adds tests for error handling. Beyond generally improving our error handling in Emacs, with this series in place, the schema versioning series will be much simpler. [1] id:1354416002-3557-1-git-send-email-amdragon

[PATCH 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..c67c6a4 100755 --- a/test/emacs-show +++ b/test/emacs-show @@ -163,4 +163,26 @@ EOF test_expect_equal_file OUTPUT EXPECTED +test_begin_subtest

[PATCH 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 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

[PATCH 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 | 15 --- 1 file changed, 4 insertions(+), 11 deletions(-) diff --git a/emacs/notmuch.el b/emacs/notmuch.el index

[PATCH v2 2/5] emacs: show: add overlays for each part

2012-12-15 Thread Austin Clements
On Thu, 13 Dec 2012, Mark Walters wrote: > This makes notmuch-show-insert-bodypart add an overlay for any > non-trivial part with a button header (currently the first text/plain > part does not have a button). At this point the overlay is available > to the button but there is no action using it

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

2012-12-15 Thread Austin Clements
On Thu, 13 Dec 2012, Mark Walters wrote: > This is version 2 of the patch series (version 1 at > id:1354663662-20524-1-git-send-email-markwalters1009 at gmail.com) > > Almost all of the changes and fixes are in response to Austin's > review. I have changed things as he suggested. > > There are

[PATCH v2 3/5] emacs: show: add invisibility button action

2012-12-15 Thread Austin Clements
On Thu, 13 Dec 2012, Mark Walters wrote: > This adds a button action to show hidden parts. In this version "t" > toggles the visibility of a part. In addition "RET" on a non-shown > part shows it. > > The button is used to hide parts when appropriate (eg text/html in > multipart/alternative). >

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

2012-12-15 Thread Austin Clements
Quoth Jason A. Donenfeld on Dec 13 at 3:32 pm: > On Wed, Dec 12, 2012 at 9:49 PM, Austin Clements wrote: > > There should be no way to corrupt the database at this level through > > the Xapian API, which means nothing libnotmuch can do (much less users > > of libnotmuch) should be able to

[PATCH 2/3] emacs: show: add overlays for each part

2012-12-15 Thread Austin Clements
Quoth Mark Walters on Dec 13 at 8:54 am: > >> + (string= chosen-type > >> inner-type)) > > > > You could let-bind the (not (or ..)) to some variable ("hide" perhaps) > > in the let above to avoid this crazy line length. > > > >> inner-parts)

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

2012-12-15 Thread Mark Walters
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 Mark Walters (5): emacs: show: modify insert-part-header to

[PATCH v3 1/5] emacs: show: modify insert-part-header to save the button text

2012-12-15 Thread Mark Walters
This just make notmuch-show-insert-part-header save the basic button text for parts as an attribute. This makes it simpler for the button action (added in a later patch) to reword the label as appropriate (eg append "(not shown)" or not as appropriate). --- emacs/notmuch-show.el | 18

[PATCH v3 2/5] emacs: show: add overlays for each part

2012-12-15 Thread Mark Walters
This makes notmuch-show-insert-bodypart add an overlay for any non-trivial part with a button header (currently the first text/plain part does not have a button). At this point the overlay is available to the button but there is no action using it yet. In addition the argument HIDE is passed down

[PATCH v3 3/5] emacs: show: add invisibility button action

2012-12-15 Thread Mark Walters
This adds a button action to show hidden parts. In this version "t" toggles the visibility of a part. In addition "RET" on a non-shown part shows it. The button is used to hide parts when appropriate (eg text/html in multipart/alternative). --- emacs/notmuch-show.el | 35

[PATCH v3 4/5] emacs: wash: fix fake-diff part to include msg parameter

2012-12-15 Thread Mark Walters
The fake-diff part from notmuch wash did not pass the msg parameter to notmuch-show-insert-bodypart. Previously this did not matter, but is now needed to get the overlays right for invisibility. --- emacs/notmuch-wash.el |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git

[PATCH v3 5/5] emacs: show: set default show-all-multipart/alternatives to nil

2012-12-15 Thread Mark Walters
Now that the invisibility display of parts is present we no longer need to force the display of all multipart/alternatives: users can toggle them for themselves when needed. --- emacs/notmuch-show.el |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/emacs/notmuch-show.el

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

[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(-)

[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 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

  1   2   >