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

2012-12-08 Thread Mark Walters
This patch looks good to me. Should it go in ahead of the rest of the series as it essentially a bugfix? Best wishes Mark On Sun, 02 Dec 2012, Austin Clements wrote: > Previously, if the input stream consisted only of an error message, > notmuch-json-begin-compound would signal a (wrong-type-a

Re: [PATCH 07/10] emacs: Use --use-schema for search

2012-12-08 Thread Mark Walters
On Sun, 02 Dec 2012, Austin Clements wrote: > We detect the special exit statuses and use these to produce specific > diagnostic messages. > --- > emacs/notmuch-lib.el | 32 > emacs/notmuch.el | 17 + > 2 files changed, 45 insertions(+), 4

Re: [PATCH 00/10] CLI output versioning

2012-12-08 Thread Mark Walters
Hi Overall this series looks good. As we discussed on irc I think i would prefer global NOTMUCH_SCHEMA_MIN as I am a little worried about these proliferating (eg if someone decides text output also needs versioning etc) In addition, if we do find the distinction useful it would be easy to add at

Re: [Patch v3b 3/9] util: add string-util.[ch]

2012-12-08 Thread Mark Walters
On Fri, 07 Dec 2012, da...@tethera.net wrote: > From: David Bremner > > This is to give a home to strtok_len. It's a bit silly to add a header > for one routine, but it needs to be shared between several compilation > units (or at least that's the most natural design). > --- > util/Makefile.loca

Re: [Patch v3b 4/9] tag-util.[ch]: New files for common tagging routines

2012-12-08 Thread Mark Walters
On Fri, 07 Dec 2012, da...@tethera.net wrote: > From: David Bremner > > These are meant to be shared between notmuch-tag and notmuch-restore. > > The bulk of the routines implement a "tag operation list" abstract > data type act as a structured representation of a set of tag > operations (typicall

Re: [Patch v3b 9/9] tag-util: optimization of tag application

2012-12-08 Thread Mark Walters
On Fri, 07 Dec 2012, da...@tethera.net wrote: > From: David Bremner > > The idea is not to bother with restore operations if they don't change > the set of tags. This is actually a relatively common case. > > In order to avoid fancy datastructures, this method is quadratic in > the number of tags;

Re: [Patch v3b 5/9] notmuch-restore: add support for input format 'batch-tag'

2012-12-08 Thread Mark Walters
Hi Basically LGTM: just one comment below. On Fri, 07 Dec 2012, da...@tethera.net wrote: > From: David Bremner > > This can be enabled with the new --format=batch-tag command line > option to "notmuch restore". The input must consist of lines of the > format: > > +|- [...] [--] id: > > Each

[PATCH] contrib: pick: archive message updated

2012-12-08 Thread Mark Walters
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. --- Notmuch pick had fallen behind show so update. Best wishes

[PATCH] contrib: pick: slightly tweak running search and pick from pick buffer

2012-12-08 Thread Mark Walters
Previously running search or pick from the pick buffer did not close the message pane (if open). This meant that then new search ends up in a very small window. Fix this so that the message pane is shut. However, make it so that the pane is shut after the search string is entered in case the user i

[PATCH 0/2] Add some thread based actions to pick

2012-12-08 Thread Mark Walters
This addes the a macro to notmuch pick to apply a command to all messages in the current thread. In the second patch we add the ability to tag/archive whole threads. This is independent of id:1354970494-18050-1-git-send-email-markwalters1...@gmail.com and id:1354970674-18136-1-git-send-email-markw

[PATCH 1/2] contrib: pick: add thread based utility functions

2012-12-08 Thread Mark Walters
Previously notmuch-pick had no thread based functionality. This adds a macro to iterate through all messages in a thread. To simplify this it adds a text-property marker to the first message of each thread. --- contrib/notmuch-pick/notmuch-pick.el | 28 1 files chang

[PATCH 2/2] contrib: pick: thread tagging (including archiving) implemented

2012-12-08 Thread Mark Walters
Previously pick had no actions based on the entire thread: this adds some. Note in this version '*' is bound to `tag thread' which is not consistent with search or show. However it still might be the most natural thing (as it is similar to running * in the show pane). --- contrib/notmuch-pick/notm

Re: gmail importer script

2012-12-08 Thread Jason A. Donenfeld
> I actually prefer this approach, but I think it would be more useful to > leave the syncing of the emails to a different program, and then just > managing the labels / tags with your tool (which is notmuch territory). So > the workflow would be: > So, implementing the mail sync in this script wou

The Gmail Importer Script: Complete

2012-12-08 Thread Jason A. Donenfeld
Hi everyone, My script to import messages from gmail into notmuch, including tag information, is now polished and feature complete. ** Watch a video of it here: ** https://www.youtube.com/watch?v=e-8EHIAr7wA

Re: Tags with spaces

2012-12-08 Thread Jason A. Donenfeld
Very helpful! Thanks folks for the explanations. Another thing to note is that the dump format doesn't add any quotes to the tags, so this is something of an issue I suppose. ___ notmuch mailing list notmuch@notmuchmail.org http://notmuchmail.org/mailman

Re: [PATCH] TODO: date range queries - check

2012-12-08 Thread David Bremner
Jameson Graef Rollins writes: > On Fri, Dec 07 2012, Jani Nikula wrote: >> Fine by me. I was just trying to clean up the file a bit, that's >> all. The only downside I can think of is potential new users stumbling >> on this and thinking we still don't have date queries. *shrug*. > > That's why

Re: [PATCH v5 0/5] New output format sexp (Lisp S-Expressions)

2012-12-08 Thread David Bremner
Peter Feigl writes: > This patch series adds a new output format "sexp" to notmuch-reply, > notmuch-show and notmuch-search. These are useful for the Android mobile > client, Emacs and perhaps other Lisp programs as well. pushed, looking forward to an android client ;) d ___

Re: [PATCH 0/3] test fixes, portability

2012-12-08 Thread David Bremner
Jani Nikula writes: > I had a glance at a 'make test' report on OS X [1], and tried to fix a > few things from there. While at it, noticed that count test is horribly > broken. pushed, d ___ notmuch mailing list notmuch@notmuchmail.org http://notmuchm

Re: [PATCH] test: Fix UTF-8 JSON tests in Python 3

2012-12-08 Thread David Bremner
Austin Clements writes: > This patch sets the PYTHONIOENCODING > environment variable to utf-8 when invoking json.tool to override > Python's default encoding choice. Pushed. One day I'd like to experience, "yes, python really got that aspect of encoding right" ;). d ___

[PATCH] emacs: query: make sync queries use sexp

2012-12-08 Thread Mark Walters
This changes the queries used by notmuch-show from json to sexp (patch based on a comment by Tomi on irc as to the trivial change needed). The async query parsed used by search is not as easy to convert. --- It's probably worth making this change: sexps are significantly faster but I doubt anyone

v4 of Hex Dump/Restore patches

2012-12-08 Thread david
This obsoletes the series at id:1354843607-17980-1-git-send-email-da...@tethera.net One new patch: [Patch v4 08/10] test/dump-restore: add test for warning/error Other changes since the last series are as follows: commit 16ca0f8126fafd49266ffa02534f2e9b73c03027 Author: David Bremner

[Patch v4 01/10] notmuch-dump: add --format=(batch-tag|sup)

2012-12-08 Thread david
From: David Bremner sup is the old format, and remains the default, at least until restore is converted to parse this format. Each line of the batch-tag format is modelled on the syntax of notmuch tag: - "notmuch tag" is omitted from the front of the line - The dump format only uses query string

[Patch v4 02/10] test: add sanity check for dump --format=batch-tag.

2012-12-08 Thread david
From: David Bremner It's important this does not rely on restore, since it hasn't been written yet. --- test/dump-restore | 13 + 1 file changed, 13 insertions(+) diff --git a/test/dump-restore b/test/dump-restore index bf31266..b4c807f 100755 --- a/test/dump-restore +++ b/test/du

[Patch v4 03/10] util: add string-util.[ch]

2012-12-08 Thread david
From: David Bremner This is to give a home to strtok_len. It's a bit silly to add a header for one routine, but it needs to be shared between several compilation units (or at least that's the most natural design). --- util/Makefile.local |3 ++- util/string-util.c | 34 +++

[Patch v4 06/10] test: update dump-restore roundtripping test for batch-tag format

2012-12-08 Thread david
From: David Bremner Now we can actually round trip these crazy tags and and message ids. hex-xcode is no longer needed as it's built in. --- test/dump-restore | 17 - 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/test/dump-restore b/test/dump-restore index b4c80

[Patch v4 07/10] test: second set of dump/restore --format=batch-tag tests

2012-12-08 Thread david
From: David Bremner These one need the completed functionality in notmuch-restore. Fairly exotic tags are tested, but no weird message id's. We test each possible input to autodetection, both explicit (with --format=auto) and implicit (without --format). --- test/dump-restore | 85 +++

[Patch v4 05/10] notmuch-restore: add support for input format 'batch-tag'

2012-12-08 Thread david
From: David Bremner This can be enabled with the new --format=batch-tag command line option to "notmuch restore". The input must consist of lines of the format: +|- [...] [--] id: Each line is interpreted similarly to "notmuch tag" command line arguments. The delimiter is one or more spaces

[Patch v4 08/10] test/dump-restore: add test for warning/error messages

2012-12-08 Thread david
From: David Bremner We want to test both that error/warning messages are generated when they should be, and not generated when they should not be. This varies between restore and batch tagging. --- test/dump-restore | 29 + 1 file changed, 29 insertions(+) diff --g

[Patch v4 04/10] tag-util.[ch]: New files for common tagging routines

2012-12-08 Thread david
From: David Bremner These are meant to be shared between notmuch-tag and notmuch-restore. The bulk of the routines implement a "tag operation list" abstract data type act as a structured representation of a set of tag operations (typically coming from a single tag command or line of input). ---

[Patch v4 10/10] tag-util: optimization of tag application

2012-12-08 Thread david
From: David Bremner The idea is not to bother with restore operations if they don't change the set of tags. This is actually a relatively common case. In order to avoid fancy datastructures, this method is quadratic in the number of tags; at least on my mail database this doesn't seem to be a bi

[Patch v4 09/10] notmuch-{dump, restore}.1: document new format options

2012-12-08 Thread david
From: David Bremner More or less arbitrarily, notmuch-dump.1 gets the more detailed description of the format. --- man/man1/notmuch-dump.1| 59 man/man1/notmuch-restore.1 | 59 +++- 2 files changed, 112

Re: Tags with spaces

2012-12-08 Thread David Bremner
Austin Clements writes: > Tags with spaces are supported, but your shell will strip away the > quotes you've used in both examples before notmuch ever sees them. > You'll need both shell quoting and Xapian quoting in this case. Try > notmuch search -- '-tag:"This has spaces"' > This should be

Re: gmail importer script

2012-12-08 Thread Patrick Totzke
Quoting Jason A. Donenfeld (2012-12-07 13:49:46) > Not sure what is causing this. My best guess is that your password was > incorrect and that I'm not checking the login return value. Yes, you're right, it was an incorrect passwd. > One thing you also might want to watch out for is > exce

Re: gmail importer script

2012-12-08 Thread Jason A. Donenfeld
On Sat, Dec 8, 2012 at 5:20 PM, Patrick Totzke wrote: > I have two new errors: > > - > ./gmail-notmuch.py -u patricktot...@gmail.com -p mypwd ~/mail/gmail/ > > I also tried with maildir param ~/mail/gmail/\[Google\ Mail\].All\ Mail > as this

Re: gmail importer script

2012-12-08 Thread Jason A. Donenfeld
On Sat, Dec 8, 2012 at 6:04 PM, Jason A. Donenfeld wrote: >> BTW: I had to change the hardcoded "[Gmail]" to "[Google Mail]" for it to >> get that far. > > Really? Are you in the UK? I'll have to do this dynamically using the > XLIST imap extension. Okay, I've updated it to dynamically find the

Re: gmail importer script

2012-12-08 Thread Patrick Totzke
Quoting Jason A. Donenfeld (2012-12-08 17:04:48) > On Sat, Dec 8, 2012 at 5:20 PM, Patrick Totzke > wrote: > > I have two new errors: > > > > - > > ./gmail-notmuch.py -u patricktot...@gmail.com -p mypwd ~/mail/gmail/ > > > > I also tried wit

Re: [Patch v4 08/10] test/dump-restore: add test for warning/error messages

2012-12-08 Thread Mark Walters
On Sat, 08 Dec 2012, da...@tethera.net wrote: > From: David Bremner > > We want to test both that error/warning messages are generated when > they should be, and not generated when they should not be. This varies > between restore and batch tagging. > --- > test/dump-restore | 29 ++

Re: [Patch v4 08/10] test/dump-restore: add test for warning/error messages

2012-12-08 Thread David Bremner
Mark Walters writes: >> ++e +f id:%yy >> +# the next line should report an an empty tag error for batch tagging, but >> restore >> ++ +e -- id:20091117232137.ga7...@griffis1.net > > I don't follow the comment above: do you mean "but not for restore", or > it should report an error but restore any

[RFC PATCH] emacs/show: add command to view a patch using diff mode

2012-12-08 Thread david
From: David Bremner This enables fast navigation between hunks and better highlighting. The use of notmuch-get-bodypart-internal could be improved; hard coding to 1 seems to work for the output of git-format-patch. It also not so nice to call (insert (notmuch-get-bodypart-internal ...)) since th

[PATCH] test: Adding non-maildir tags does not move message from new to cur

2012-12-08 Thread david
From: Michal Sojka Some MUA's like mutt show the difference between "new" emails living in maildir directory new/, and "old" emails living in maildir directory cur/. However notmuch tag unconditionally moves selected messages from new/ to cur/, even if no maildir synchronized tag is changed. Whi

Re: [Patch v4 04/10] tag-util.[ch]: New files for common tagging routines

2012-12-08 Thread Jani Nikula
Hi David, some error message bikeshedding below. BR, Jani. On Sat, 08 Dec 2012, da...@tethera.net wrote: > From: David Bremner > > These are meant to be shared between notmuch-tag and notmuch-restore. > > The bulk of the routines implement a "tag operation list" abstract > data type act as a s

Re: [PATCH V2 1/1] NEWS: under-the-hood Emacs interface fixes

2012-12-08 Thread David Bremner
Tomi Ollila writes: > Added the following Emacs Interface NEWS entries: > > Catch errors bodypart insertions may throw, > Improved text/calendar content handling and > Disabled coding conversions when reading in > `with-current-notmuch-show-message`. > Some suggestions about wording: diff --git

Re: v4 of Hex Dump/Restore patches

2012-12-08 Thread Jani Nikula
Hi David, some minor bikeshedding in patch 4 (can be fixed later too), and did not look at patches 7, 8, or 9, but otherwise the series LGTM. BR, Jani. On Sat, 08 Dec 2012, da...@tethera.net wrote: > This obsoletes the series at > > id:1354843607-17980-1-git-send-email-da...@tethera.

Re: v4 of Hex Dump/Restore patches

2012-12-08 Thread Mark Walters
Aside from the minor nit with one comment this series looks good to me. (I haven't thoroughly checked patch 8) Best wishes Mark On Sat, 08 Dec 2012, da...@tethera.net wrote: > This obsoletes the series at > > id:1354843607-17980-1-git-send-email-da...@tethera.net > > One new patch: >

Re: [PATCH] TODO: date range queries - check

2012-12-08 Thread Jameson Graef Rollins
On Sat, Dec 08 2012, David Bremner wrote: > Patch? Concrete wording suggestion? How about: It would be nice to not require both endpoints to be specified in date searches. For example it would be nice to be able to say things like "date:2009-01-1", to specify a search over a particular day, or

Re: [PATCH] test: Adding non-maildir tags does not move message from new to cur

2012-12-08 Thread Jani Nikula
On Sat, 08 Dec 2012, da...@tethera.net wrote: > From: Michal Sojka > > Some MUA's like mutt show the difference between "new" emails living in > maildir > directory new/, and "old" emails living in maildir directory cur/. However > notmuch tag unconditionally moves selected messages from new/ to

Re: [PATCH] TODO: date range queries - check

2012-12-08 Thread Jani Nikula
On Sat, 08 Dec 2012, Jameson Graef Rollins wrote: > On Sat, Dec 08 2012, David Bremner wrote: >> Patch? Concrete wording suggestion? > > How about: > > It would be nice to not require both endpoints to be specified in date > searches. For example it would be nice to be able to say things like >

v5 of Batch-tag dump/restore patches

2012-12-08 Thread david
Yet another version. Luckily we all use threaded mailreaders, right? This obsoletes id:1354979276-20099-1-git-send-email-da...@tethera.net One trivial new patch [Patch v5 06/11] notmuch-restore: normalize case of error messages. And a fairly extensive reworking of the error reporting

[Patch v5 02/11] test: add sanity check for dump --format=batch-tag.

2012-12-08 Thread david
From: David Bremner It's important this does not rely on restore, since it hasn't been written yet. --- test/dump-restore | 13 + 1 file changed, 13 insertions(+) diff --git a/test/dump-restore b/test/dump-restore index bf31266..b4c807f 100755 --- a/test/dump-restore +++ b/test/du

[Patch v5 01/11] notmuch-dump: add --format=(batch-tag|sup)

2012-12-08 Thread david
From: David Bremner sup is the old format, and remains the default, at least until restore is converted to parse this format. Each line of the batch-tag format is modelled on the syntax of notmuch tag: - "notmuch tag" is omitted from the front of the line - The dump format only uses query string

[Patch v5 06/11] notmuch-restore: normalize case of error messages.

2012-12-08 Thread david
From: David Bremner In English, (unlike German) one does not capitalize the first word after a colon. --- notmuch-restore.c |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/notmuch-restore.c b/notmuch-restore.c index 44bf88d..dba882b 100644 --- a/notmuch-restore.c +++ b

[Patch v5 03/11] util: add string-util.[ch]

2012-12-08 Thread david
From: David Bremner This is to give a home to strtok_len. It's a bit silly to add a header for one routine, but it needs to be shared between several compilation units (or at least that's the most natural design). --- util/Makefile.local |3 ++- util/string-util.c | 34 +++

[Patch v5 07/11] test: update dump-restore roundtripping test for batch-tag format

2012-12-08 Thread david
From: David Bremner Now we can actually round trip these crazy tags and and message ids. hex-xcode is no longer needed as it's built in. --- test/dump-restore | 15 +++ 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/test/dump-restore b/test/dump-restore index b4c807f

[Patch v5 04/11] tag-util.[ch]: New files for common tagging routines

2012-12-08 Thread david
From: David Bremner These are meant to be shared between notmuch-tag and notmuch-restore. The bulk of the routines implement a "tag operation list" abstract data type act as a structured representation of a set of tag operations (typically coming from a single tag command or line of input). ---

[Patch v5 05/11] notmuch-restore: add support for input format 'batch-tag'

2012-12-08 Thread david
From: David Bremner This can be enabled with the new --format=batch-tag command line option to "notmuch restore". The input must consist of lines of the format: +|- [...] [--] id: Each line is interpreted similarly to "notmuch tag" command line arguments. The delimiter is one or more spaces

[Patch v5 11/11] tag-util: optimization of tag application

2012-12-08 Thread david
From: David Bremner The idea is not to bother with restore operations if they don't change the set of tags. This is actually a relatively common case. In order to avoid fancy datastructures, this method is quadratic in the number of tags; at least on my mail database this doesn't seem to be a bi

[Patch v5 10/11] notmuch-{dump, restore}.1: document new format options

2012-12-08 Thread david
From: David Bremner More or less arbitrarily, notmuch-dump.1 gets the more detailed description of the format. --- man/man1/notmuch-dump.1| 59 man/man1/notmuch-restore.1 | 59 +++- 2 files changed, 112

[Patch v5 08/11] test: second set of dump/restore --format=batch-tag tests

2012-12-08 Thread david
From: David Bremner These one need the completed functionality in notmuch-restore. Fairly exotic tags are tested, but no weird message id's. We test each possible input to autodetection, both explicit (with --format=auto) and implicit (without --format). --- test/dump-restore | 83 +++

[Patch v5 09/11] test/dump-restore: add test for warning/error messages

2012-12-08 Thread david
From: David Bremner We want to test both that error/warning messages are generated when they should be, and not generated when they should not be. This varies between restore and batch tagging. --- test/dump-restore | 35 +++ 1 file changed, 35 insertions(+) di

Re: [PATCH] emacs: query: make sync queries use sexp

2012-12-08 Thread Austin Clements
sexp-at-point is a pretty roundabout way to parse this that I think will basically parse the S-expression three times (in end-of-sexp, in beginning-of-sexp, and then for real in read-from-whole-string). How about (prog1 (read (current-buffer)) (skip-chars-forward " \t\n\f") (unles

Re: [PATCH] TODO: date range queries - check

2012-12-08 Thread Tomi Ollila
On Sun, Dec 09 2012, Jani Nikula wrote: > On Sat, 08 Dec 2012, Jameson Graef Rollins wrote: >> On Sat, Dec 08 2012, David Bremner wrote: >>> Patch? Concrete wording suggestion? >> >> How about: >> >> It would be nice to not require both endpoints to be specified in date >> searches. For exampl

[PATCH] emacs/show: add command to view a patch using diff mode

2012-12-08 Thread Mark Walters
From: markwalters1...@gmail.com This enables fast navigation between hunks and better highlighting. The use of notmuch-get-bodypart-internal could be improved; hard coding to 1 seems to work for the output of git-format-patch. It also not so nice to call (insert (notmuch-get-bodypart-internal ...

[Patch v3b 1/9] notmuch-dump: add --format=(batch-tag|sup)

2012-12-08 Thread Jani Nikula
LGTM. On Fri, 07 Dec 2012, david at tethera.net wrote: > From: David Bremner > > sup is the old format, and remains the default, at least until > restore is converted to parse this format. > > Each line of the batch-tag format is modelled on the syntax of notmuch tag: > - "notmuch tag" is omitte

[PATCH v2] emacs: add support for stashing the thread id in show view

2012-12-08 Thread Tomi Ollila
On Fri, Dec 07 2012, Jani Nikula wrote: > Add a prefix argument to notmuch-show-stash-message-id to stash thread > id instead of message id. > --- LTGM. Tomi > emacs/notmuch-show.el | 14 ++ > 1 file changed, 10 insertions(+), 4 deletions(-) > > diff --git a/emacs/notmuch-show.el

[Patch v3b 2/9] test: add sanity check for dump --format=batch-tag.

2012-12-08 Thread Jani Nikula
LGTM. On Fri, 07 Dec 2012, david at tethera.net wrote: > From: David Bremner > > It's important this does not rely on restore, since it hasn't been > written yet. > --- > test/dump-restore | 13 + > 1 file changed, 13 insertions(+) > > diff --git a/test/dump-restore b/test/dump-re

[Patch v3b 3/9] util: add string-util.[ch]

2012-12-08 Thread Jani Nikula
LGTM. On Fri, 07 Dec 2012, david at tethera.net wrote: > From: David Bremner > > This is to give a home to strtok_len. It's a bit silly to add a header > for one routine, but it needs to be shared between several compilation > units (or at least that's the most natural design). > --- > util/Mak

[Patch v3b 4/9] tag-util.[ch]: New files for common tagging routines

2012-12-08 Thread Jani Nikula
A few small comments, otherwise LGTM. On Fri, 07 Dec 2012, david at tethera.net wrote: > From: David Bremner > > These are meant to be shared between notmuch-tag and notmuch-restore. > > The bulk of the routines implement a "tag operation list" abstract > data type act as a structured representa

[Patch v3b 5/9] notmuch-restore: add support for input format 'batch-tag'

2012-12-08 Thread Jani Nikula
LGTM. On Fri, 07 Dec 2012, david at tethera.net wrote: > From: David Bremner > > This can be enabled with the new --format=batch-tag command line > option to "notmuch restore". The input must consist of lines of the > format: > > +|- [...] [--] id: > > Each line is interpreted similarly to "

[PATCH V2 1/1] NEWS: under-the-hood Emacs interface fixes

2012-12-08 Thread Tomi Ollila
Added the following Emacs Interface NEWS entries: Catch errors bodypart insertions may throw, Improved text/calendar content handling and Disabled coding conversions when reading in `with-current-notmuch-show-message`. Thanks to Austin for improved content parts. --- This replaces id:1354488524-

[Patch v3b 6/9] test: update dump-restore roundtripping test for batch-tag format

2012-12-08 Thread Jani Nikula
On Fri, 07 Dec 2012, david at tethera.net wrote: > From: David Bremner > > Now we can actually round trip these crazy tags and and message ids. > hex-xcode is no longer needed as it's built in. > --- > test/dump-restore | 17 - > 1 file changed, 8 insertions(+), 9 deletions(-) >

[Patch v3b 9/9] tag-util: optimization of tag application

2012-12-08 Thread Jani Nikula
On Fri, 07 Dec 2012, david at tethera.net wrote: > From: David Bremner > > The idea is not to bother with restore operations if they don't change > the set of tags. This is actually a relatively common case. > > In order to avoid fancy datastructures, this method is quadratic in > the number of ta

Tags with spaces

2012-12-08 Thread Jason A. Donenfeld
Do we support them? Are we going to? This doesn't work: notmuch search -tag:"This has spaces" Nor does: notmuch search "-tag:This has spaces"

Tags with spaces

2012-12-08 Thread Tomi Ollila
On Sat, Dec 08 2012, "Jason A. Donenfeld" wrote: > Do we support them? Are we going to? > > This doesn't work: > notmuch search -tag:"This has spaces" > > Nor does: > notmuch search "-tag:This has spaces" This might work: notmuch search "-tag:'This has spaces'"

Tags with spaces

2012-12-08 Thread Austin Clements
Quoth Jason A. Donenfeld on Dec 08 at 4:44 am: > Do we support them? Are we going to? > > This doesn't work: > notmuch search -tag:"This has spaces" > > Nor does: > notmuch search "-tag:This has spaces" Tags with spaces are supported, but your shell will strip away the quotes you've used in bot

Tags with spaces

2012-12-08 Thread Austin Clements
Quoth Tomi Ollila on Dec 08 at 8:21 am: > On Sat, Dec 08 2012, "Jason A. Donenfeld" wrote: > > > Do we support them? Are we going to? > > > > This doesn't work: > > notmuch search -tag:"This has spaces" > > > > Nor does: > > notmuch search "-tag:This has spaces" > > This might work: > > notmuc

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

2012-12-08 Thread Mark Walters
This patch looks good to me. Should it go in ahead of the rest of the series as it essentially a bugfix? Best wishes Mark On Sun, 02 Dec 2012, Austin Clements wrote: > Previously, if the input stream consisted only of an error message, > notmuch-json-begin-compound would signal a (wrong-type-a

[PATCH 07/10] emacs: Use --use-schema for search

2012-12-08 Thread Mark Walters
On Sun, 02 Dec 2012, Austin Clements wrote: > We detect the special exit statuses and use these to produce specific > diagnostic messages. > --- > emacs/notmuch-lib.el | 32 > emacs/notmuch.el | 17 + > 2 files changed, 45 insertions(+), 4

[PATCH 00/10] CLI output versioning

2012-12-08 Thread Mark Walters
Hi Overall this series looks good. As we discussed on irc I think i would prefer global NOTMUCH_SCHEMA_MIN as I am a little worried about these proliferating (eg if someone decides text output also needs versioning etc) In addition, if we do find the distinction useful it would be easy to add at

[Patch v3b 3/9] util: add string-util.[ch]

2012-12-08 Thread Mark Walters
On Fri, 07 Dec 2012, david at tethera.net wrote: > From: David Bremner > > This is to give a home to strtok_len. It's a bit silly to add a header > for one routine, but it needs to be shared between several compilation > units (or at least that's the most natural design). > --- > util/Makefile.l

[Patch v3b 4/9] tag-util.[ch]: New files for common tagging routines

2012-12-08 Thread Mark Walters
On Fri, 07 Dec 2012, david at tethera.net wrote: > From: David Bremner > > These are meant to be shared between notmuch-tag and notmuch-restore. > > The bulk of the routines implement a "tag operation list" abstract > data type act as a structured representation of a set of tag > operations (typic

[Patch v3b 9/9] tag-util: optimization of tag application

2012-12-08 Thread Mark Walters
On Fri, 07 Dec 2012, david at tethera.net wrote: > From: David Bremner > > The idea is not to bother with restore operations if they don't change > the set of tags. This is actually a relatively common case. > > In order to avoid fancy datastructures, this method is quadratic in > the number of ta

[Patch v3b 5/9] notmuch-restore: add support for input format 'batch-tag'

2012-12-08 Thread Mark Walters
Hi Basically LGTM: just one comment below. On Fri, 07 Dec 2012, david at tethera.net wrote: > From: David Bremner > > This can be enabled with the new --format=batch-tag command line > option to "notmuch restore". The input must consist of lines of the > format: > > +|- [...] [--] id: > > E

[PATCH] contrib: pick: archive message updated

2012-12-08 Thread Mark Walters
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. --- Notmuch pick had fallen behind show so update. Best wishes

[PATCH] contrib: pick: slightly tweak running search and pick from pick buffer

2012-12-08 Thread Mark Walters
Previously running search or pick from the pick buffer did not close the message pane (if open). This meant that then new search ends up in a very small window. Fix this so that the message pane is shut. However, make it so that the pane is shut after the search string is entered in case the user i

[PATCH 0/2] Add some thread based actions to pick

2012-12-08 Thread Mark Walters
This addes the a macro to notmuch pick to apply a command to all messages in the current thread. In the second patch we add the ability to tag/archive whole threads. This is independent of id:1354970494-18050-1-git-send-email-markwalters1009 at gmail.com and id:1354970674-18136-1-git-send-email-ma

[PATCH 1/2] contrib: pick: add thread based utility functions

2012-12-08 Thread Mark Walters
Previously notmuch-pick had no thread based functionality. This adds a macro to iterate through all messages in a thread. To simplify this it adds a text-property marker to the first message of each thread. --- contrib/notmuch-pick/notmuch-pick.el | 28 1 files chang

[PATCH 2/2] contrib: pick: thread tagging (including archiving) implemented

2012-12-08 Thread Mark Walters
Previously pick had no actions based on the entire thread: this adds some. Note in this version '*' is bound to `tag thread' which is not consistent with search or show. However it still might be the most natural thing (as it is similar to running * in the show pane). --- contrib/notmuch-pick/notm

gmail importer script

2012-12-08 Thread Jason A. Donenfeld
> I actually prefer this approach, but I think it would be more useful to > leave the syncing of the emails to a different program, and then just > managing the labels / tags with your tool (which is notmuch territory). So > the workflow would be: > So, implementing the mail sync in this script wou

The Gmail Importer Script: Complete

2012-12-08 Thread Jason A. Donenfeld
Hi everyone, My script to import messages from gmail into notmuch, including tag information, is now polished and feature complete. ** Watch a video of it here: ** https://www.youtube.com/watch?v=e-8EHIAr7wA

Tags with spaces

2012-12-08 Thread Jason A. Donenfeld
Very helpful! Thanks folks for the explanations. Another thing to note is that the dump format doesn't add any quotes to the tags, so this is something of an issue I suppose.

[PATCH] TODO: date range queries - check

2012-12-08 Thread David Bremner
Jameson Graef Rollins writes: > On Fri, Dec 07 2012, Jani Nikula wrote: >> Fine by me. I was just trying to clean up the file a bit, that's >> all. The only downside I can think of is potential new users stumbling >> on this and thinking we still don't have date queries. *shrug*. > > That's why

[PATCH v5 0/5] New output format sexp (Lisp S-Expressions)

2012-12-08 Thread David Bremner
Peter Feigl writes: > This patch series adds a new output format "sexp" to notmuch-reply, > notmuch-show and notmuch-search. These are useful for the Android mobile > client, Emacs and perhaps other Lisp programs as well. pushed, looking forward to an android client ;) d

[PATCH 0/3] test fixes, portability

2012-12-08 Thread David Bremner
Jani Nikula writes: > I had a glance at a 'make test' report on OS X [1], and tried to fix a > few things from there. While at it, noticed that count test is horribly > broken. pushed, d

[PATCH] test: Fix UTF-8 JSON tests in Python 3

2012-12-08 Thread David Bremner
Austin Clements writes: > This patch sets the PYTHONIOENCODING > environment variable to utf-8 when invoking json.tool to override > Python's default encoding choice. Pushed. One day I'd like to experience, "yes, python really got that aspect of encoding right" ;). d

[PATCH] emacs: query: make sync queries use sexp

2012-12-08 Thread Mark Walters
This changes the queries used by notmuch-show from json to sexp (patch based on a comment by Tomi on irc as to the trivial change needed). The async query parsed used by search is not as easy to convert. --- It's probably worth making this change: sexps are significantly faster but I doubt anyone

v4 of Hex Dump/Restore patches

2012-12-08 Thread da...@tethera.net
This obsoletes the series at id:1354843607-17980-1-git-send-email-david at tethera.net One new patch: [Patch v4 08/10] test/dump-restore: add test for warning/error Other changes since the last series are as follows: commit 16ca0f8126fafd49266ffa02534f2e9b73c03027 Author: David Bremner D

[Patch v4 01/10] notmuch-dump: add --format=(batch-tag|sup)

2012-12-08 Thread da...@tethera.net
From: David Bremner sup is the old format, and remains the default, at least until restore is converted to parse this format. Each line of the batch-tag format is modelled on the syntax of notmuch tag: - "notmuch tag" is omitted from the front of the line - The dump format only uses query string

[Patch v4 02/10] test: add sanity check for dump --format=batch-tag.

2012-12-08 Thread da...@tethera.net
From: David Bremner It's important this does not rely on restore, since it hasn't been written yet. --- test/dump-restore | 13 + 1 file changed, 13 insertions(+) diff --git a/test/dump-restore b/test/dump-restore index bf31266..b4c807f 100755 --- a/test/dump-restore +++ b/test/du

[Patch v4 03/10] util: add string-util.[ch]

2012-12-08 Thread da...@tethera.net
From: David Bremner This is to give a home to strtok_len. It's a bit silly to add a header for one routine, but it needs to be shared between several compilation units (or at least that's the most natural design). --- util/Makefile.local |3 ++- util/string-util.c | 34 +++

[Patch v4 06/10] test: update dump-restore roundtripping test for batch-tag format

2012-12-08 Thread da...@tethera.net
From: David Bremner Now we can actually round trip these crazy tags and and message ids. hex-xcode is no longer needed as it's built in. --- test/dump-restore | 17 - 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/test/dump-restore b/test/dump-restore index b4c80

  1   2   >