query on a subset of messages ?

2012-07-09 Thread Sebastien Binet
hi there, I was trying to reduce the I/O stress during my usual email fetching+tagging by writing a little program using the go bindings to notmuch. ie: db, status := notmuch.OpenDatabase(db_path, notmuch.DATABASE_MODE_READ_WRITE) query := db.CreateQuery((tag:new AND tag:inbox))

[PATCH] ruby: add all_tags method to Notmuch::Database

2012-07-09 Thread Peter Keen
The python bindings define a binding for the all_tags method on the database, which is pretty handy. This commit adds the same binding to the ruby bindings. --- bindings/ruby/database.c | 20 bindings/ruby/defs.h |3 +++ bindings/ruby/init.c |1 + 3 files

Re: query on a subset of messages ?

2012-07-09 Thread Jameson Graef Rollins
On Mon, Jul 09 2012, Sebastien Binet bi...@cern.ch wrote: I was trying to reduce the I/O stress during my usual email fetching+tagging by writing a little program using the go bindings to notmuch. ie: db, status := notmuch.OpenDatabase(db_path,

Re: query on a subset of messages ?

2012-07-09 Thread Austin Clements
Quoth Sebastien Binet on Jul 09 at 10:25 am: hi there, I was trying to reduce the I/O stress during my usual email fetching+tagging by writing a little program using the go bindings to notmuch. ie: db, status := notmuch.OpenDatabase(db_path,

Re: query on a subset of messages ?

2012-07-09 Thread Sebastien Binet
Jamie, Jameson Graef Rollins jroll...@finestructure.net writes: On Mon, Jul 09 2012, Sebastien Binet bi...@cern.ch wrote: I was trying to reduce the I/O stress during my usual email fetching+tagging by writing a little program using the go bindings to notmuch. ie: db, status :=

post-new [was: Re: query on a subset of messages ?]

2012-07-09 Thread Sebastien Binet
Sebastien Binet bi...@cern.ch writes: Jamie, Jameson Graef Rollins jroll...@finestructure.net writes: On Mon, Jul 09 2012, Sebastien Binet bi...@cern.ch wrote: I was trying to reduce the I/O stress during my usual email fetching+tagging by writing a little program using the go bindings to

Re: query on a subset of messages ?

2012-07-09 Thread Sebastien Binet
Austin Clements amdra...@mit.edu writes: Quoth Sebastien Binet on Jul 09 at 10:25 am: hi there, I was trying to reduce the I/O stress during my usual email fetching+tagging by writing a little program using the go bindings to notmuch. ie: db, status := notmuch.OpenDatabase(db_path,

Re: post-new [was: Re: query on a subset of messages ?]

2012-07-09 Thread Jameson Graef Rollins
On Mon, Jul 09 2012, Sebastien Binet bi...@cern.ch wrote: hum... is post-new supposed to be run even if there is no new message ? Hi, Sebastian. Yes, I think it runs regardless if there are any new messages or not. jamie. pgpakbKBDFRuy.pgp Description: PGP signature

Re: post-new [was: Re: query on a subset of messages ?]

2012-07-09 Thread Jani Nikula
On Jul 9, 2012 8:12 PM, Jameson Graef Rollins jroll...@finestructure.net wrote: On Mon, Jul 09 2012, Sebastien Binet bi...@cern.ch wrote: hum... is post-new supposed to be run even if there is no new message ? Hi, Sebastian. Yes, I think it runs regardless if there are any new messages or

RE: S/MIME support

2012-07-09 Thread Bryant, Daniel B.
Jamie, I was able to get signature verification working with your patchset (with a caveat) but not decryption. Signature Verification -- The caveat is that GMime is still borked with handling signatures with content type application/x-pkcs7-signature (vs.

[PATCH v3] contrib/nmbug: add nmbug-status script

2012-07-09 Thread david
From: David Bremner brem...@debian.org This is (almost) the same script as has been used for http://nmbug.tethera.net/status for a while now. The only change is that the configuration is not hardcoded anymore. By default the config is fetched from a special branch in the nmbug repo that contains

[PATCH v3 1/9] emacs: Clean up notmuch-search-show-result

2012-07-09 Thread Austin Clements
This simplifies the code and makes it no longer cubic in the number of result fields. --- emacs/notmuch.el | 19 ++- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/emacs/notmuch.el b/emacs/notmuch.el index c6236db..8ad0b68 100644 --- a/emacs/notmuch.el +++

[PATCH v3 2/9] emacs: Separate search line parsing and display

2012-07-09 Thread Austin Clements
Previously, much of the display of search lines was done in the same function that parsed the CLI's output. Now the parsing function only parses, and notmuch-search-show-result fully inserts the search result in the search buffer. --- emacs/notmuch.el | 33 + 1

[PATCH v3 0/9] JSON-based search-mode

2012-07-09 Thread Austin Clements
This fixes the docstings for notmuch-json-read and notmuch-json-eof as suggested by Mark. No other changes. ___ notmuch mailing list notmuch@notmuchmail.org http://notmuchmail.org/mailman/listinfo/notmuch

[PATCH v3 6/9] test: New test for incremental search output parsing

2012-07-09 Thread Austin Clements
This advises the search process filter to make it process one character at a time in order to test the pessimal case for incremental search output parsing. The text parser fails this test because it gets tricked into thinking a parenthetical remark in a subject is the tag list. --- test/emacs

[PATCH v3 5/9] emacs: Pass plist to `notmuch-search-show-result'

2012-07-09 Thread Austin Clements
Rather than passing lots of arguments and then further passing those to `notmuch-search-insert-field', pass a plist containing all of the search result information. This plist is compatible with the JSON format search results. --- emacs/notmuch.el | 65

[PATCH v3 3/9] emacs: Helper for reporting search parsing errors

2012-07-09 Thread Austin Clements
This removes the last bit of direct output from the parsing function. With the parser now responsible solely for parsing, we can swap it out for another parser. --- emacs/notmuch.el |8 +++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/emacs/notmuch.el b/emacs/notmuch.el

[PATCH v3 7/9] emacs: Implement an incremental JSON parser

2012-07-09 Thread Austin Clements
This parser is designed to read streaming JSON whose structure is known to the caller. Like a typical JSON parsing interface, it provides a function to read a complete JSON value from the input. However, it extends this with an additional function that requires the next value in the input to be a

[PATCH v3 4/9] emacs: Move search-target logic to `notmuch-search-show-result'

2012-07-09 Thread Austin Clements
This is a simpler place to do this, since we can avoid any point motion and hence any save-excursions in `notmuch-search-process-filter', which in turn lets us put all of the search-target logic outside of any save-excursions. `notmuch-search-show-{result,error}' are now responsible for their own

Re: [PATCH] Add missing tags field to search schema

2012-07-09 Thread David Bremner
On Tue, 3 Jul 2012 01:47:38 -0400, Austin Clements amdra...@mit.edu wrote: This field is output by search, but it didn't make it into the documentation. pushed, d ___ notmuch mailing list notmuch@notmuchmail.org

Re: [PATCH] manpages: consistent format for NAME section

2012-07-09 Thread David Bremner
On Mon, 25 Jun 2012 00:53:27 +0300, Tomi Ollila tomi.oll...@iki.fi wrote: The NAME section in manpages generally doesn't start with capital letter (unless the word is 'proper noun') and doesn't end with period. Notmuch manual pages now matches that format. --- pushed, d

Re: [PATCH 1/3] test: add basic show, search --format=text tests

2012-07-09 Thread David Bremner
On Sun, 24 Jun 2012 13:27:48 +1000, Peter Wang noval...@gmail.com wrote: There didn't seem to be these basic tests for --format=text, as there are for --format=json. These are just the tests from the `json' script, with adjusted expected outputs. I have pushed the first patch in the series.

Re: [PATCH 1/3] emacs: add no-display arg to notmuch-hello-refresh-hook

2012-07-09 Thread Jani Nikula
On Jul 10, 2012 4:49 AM, Austin Clements amdra...@mit.edu wrote: Quoth Jani Nikula on Jun 15 at 6:53 pm: Add no-display arg to notmuch-hello-refresh-hook to allow each hook to decide what is appropriate when no-display is t, which is typically the case when called non-interactively. This

ANN: Speedee, a web-based notmuch client

2012-07-09 Thread Peter Keen
Hi guys, Over the weekend I threw together the prototype for a web-based notmuch client named Speedee. It's a little Ruby webapp with a Backbone.js front end, using Twitter Bootstrap and a free theme from Bootswatch. It doesn't do much yet. Basically, it can list threads matching a search and

[PATCH v2] contrib/nmbug: add nmbug-status script

2012-07-09 Thread da...@tethera.net
From: David Bremner This is (almost) the same script as has been used for http://nmbug.tethera.net/status for a while now. The only change is that the configuration is not hardcoded anymore. By default the config is fetched from a special branch in the nmbug repo that

query on a subset of messages ?

2012-07-09 Thread Sebastien Binet
attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 197 bytes Desc: not available URL: <http://notmuchmail.org/pipermail/notmuch/attachments/20120709/f8904298/attachment.pgp>

[PATCH] ruby: add all_tags method to Notmuch::Database

2012-07-09 Thread Peter Keen
", notmuch_rb_database_get_all_tags, 0); /* in database.c */ /* * Document-class: Notmuch::Directory -- 1.7.7.5 (Apple Git-26) -- next part -- An HTML attachment was scrubbed... URL: <http://notmuchmail.org/pipermail/notmuch/attachments/20120709/1b28f4b6/attachment.html>

query on a subset of messages ?

2012-07-09 Thread Jameson Graef Rollins
o:me" search term. But I think the right place to achieve that is in the query parser. jamie. -- next part -- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 835 bytes Desc: not available URL: <http://notmuchmail.org/pipermail/notmuch/attachments/20120709/af57bb42/attachment.pgp>

query on a subset of messages ?

2012-07-09 Thread Austin Clements
Quoth Sebastien Binet on Jul 09 at 10:25 am: > > hi there, > > I was trying to reduce the I/O stress during my usual email > fetching+tagging by writing a little program using the go bindings to > notmuch. > > ie: > db, status := notmuch.OpenDatabase(db_path, >

query on a subset of messages ?

2012-07-09 Thread Sebastien Binet
k it is then :) (but there is probably something to do to speed-up a 'notmuch new' after having dropped all fs caches... ?) -s -- next part -- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 197 bytes Desc: not available URL: <http://notmuchmail.org/pipermail/notmuch/attachments/20120709/f8f7106d/attachment.pgp>

post-new [was: Re: query on a subset of messages ?]

2012-07-09 Thread Sebastien Binet
cs/notmuch-lib/notmuch-tag.sh | wc -l > 54 > > also: > $ du -hs mail-notmuch/.notmuch > 2.9G mail-notmuch/.notmuch > > that said, most of the I/O wait seem to come from 'notmuch new' (after > having dropped all fs caches.) > > ok, post-new hook it is then :) hum... is post-new supposed to be run even if there is no new message ? -s -- next part -- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 197 bytes Desc: not available URL: <http://notmuchmail.org/pipermail/notmuch/attachments/20120709/32d8f4bc/attachment.pgp>

query on a subset of messages ?

2012-07-09 Thread Sebastien Binet
pe, I haven't tried that, but will do. > > Note that there is an important optimization in notmuch tag that you > might have to replicate. It manipulates the original query to exclude > messages that already have the desired tags, so that they get skipped > very efficiently at the earliest stage possible. I already have this in my original shell script. (wouldn't be too hard to automatically do, though.) -s -- next part -- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 197 bytes Desc: not available URL: <http://notmuchmail.org/pipermail/notmuch/attachments/20120709/bfc4612a/attachment.pgp>

post-new [was: Re: query on a subset of messages ?]

2012-07-09 Thread Jani Nikula
t -- An HTML attachment was scrubbed... URL: <http://notmuchmail.org/pipermail/notmuch/attachments/20120709/3237942c/attachment.html>

S/MIME support

2012-07-09 Thread Bryant, Daniel B.
Jamie, I was able to get signature verification working with your patchset (with a caveat) but not decryption. Signature Verification -- The caveat is that GMime is still borked with handling signatures with content type application/x-pkcs7-signature (vs.

[PATCH v3] contrib/nmbug: add nmbug-status script

2012-07-09 Thread da...@tethera.net
From: David Bremner This is (almost) the same script as has been used for http://nmbug.tethera.net/status for a while now. The only change is that the configuration is not hardcoded anymore. By default the config is fetched from a special branch in the nmbug repo that

[PATCH v3 1/9] emacs: Clean up notmuch-search-show-result

2012-07-09 Thread Austin Clements
This simplifies the code and makes it no longer cubic in the number of result fields. --- emacs/notmuch.el | 19 ++- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/emacs/notmuch.el b/emacs/notmuch.el index c6236db..8ad0b68 100644 --- a/emacs/notmuch.el +++

[PATCH v3 2/9] emacs: Separate search line parsing and display

2012-07-09 Thread Austin Clements
Previously, much of the display of search lines was done in the same function that parsed the CLI's output. Now the parsing function only parses, and notmuch-search-show-result fully inserts the search result in the search buffer. --- emacs/notmuch.el | 33 + 1

[PATCH v3 0/9] JSON-based search-mode

2012-07-09 Thread Austin Clements
This fixes the docstings for notmuch-json-read and notmuch-json-eof as suggested by Mark. No other changes.

[PATCH v3 6/9] test: New test for incremental search output parsing

2012-07-09 Thread Austin Clements
This advises the search process filter to make it process one character at a time in order to test the pessimal case for incremental search output parsing. The text parser fails this test because it gets tricked into thinking a parenthetical remark in a subject is the tag list. --- test/emacs

[PATCH v3 3/9] emacs: Helper for reporting search parsing errors

2012-07-09 Thread Austin Clements
This removes the last bit of direct output from the parsing function. With the parser now responsible solely for parsing, we can swap it out for another parser. --- emacs/notmuch.el |8 +++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/emacs/notmuch.el b/emacs/notmuch.el

[PATCH v3 7/9] emacs: Implement an incremental JSON parser

2012-07-09 Thread Austin Clements
This parser is designed to read streaming JSON whose structure is known to the caller. Like a typical JSON parsing interface, it provides a function to read a complete JSON value from the input. However, it extends this with an additional function that requires the next value in the input to be a

[PATCH v3 9/9] News for JSON-based search

2012-07-09 Thread Austin Clements
--- NEWS | 17 + 1 file changed, 17 insertions(+) diff --git a/NEWS b/NEWS index d29ec5b..a1a6e93 100644 --- a/NEWS +++ b/NEWS @@ -14,6 +14,23 @@ Maildir tag synchronization messages (typically causing new messages to not receive the "unread" tag). +Emacs Interface

[PATCH v3 5/9] emacs: Pass plist to `notmuch-search-show-result'

2012-07-09 Thread Austin Clements
Rather than passing lots of arguments and then further passing those to `notmuch-search-insert-field', pass a plist containing all of the search result information. This plist is compatible with the JSON format search results. --- emacs/notmuch.el | 65

[PATCH v3 4/9] emacs: Move search-target logic to `notmuch-search-show-result'

2012-07-09 Thread Austin Clements
This is a simpler place to do this, since we can avoid any point motion and hence any save-excursions in `notmuch-search-process-filter', which in turn lets us put all of the search-target logic outside of any save-excursions. `notmuch-search-show-{result,error}' are now responsible for their own

[PATCH v3 8/9] emacs: Switch from text to JSON format for search results

2012-07-09 Thread Austin Clements
The JSON format eliminates the complex escaping issues that have plagued the text search format. This uses the incremental JSON parser so that, like the text parser, it can output search results incrementally. This slows down the parser by about ~4X, but puts us in a good position to optimize

[PATCH 1/3] emacs: add no-display arg to notmuch-hello-refresh-hook

2012-07-09 Thread Austin Clements
Quoth Jani Nikula on Jun 15 at 6:53 pm: > Add no-display arg to notmuch-hello-refresh-hook to allow each hook to > decide what is appropriate when no-display is t, which is typically > the case when called non-interactively. This is used by the following > patch. > > This breaks existing hooks

[PATCH] manpages: consistent "format" for NAME section

2012-07-09 Thread David Bremner
On Mon, 25 Jun 2012 00:53:27 +0300, Tomi Ollila wrote: > The NAME section in manpages generally doesn't start with capital > letter (unless the word is 'proper noun') and doesn't end with > period. Notmuch manual pages now matches that "format". > --- pushed, d

[PATCH 1/3] test: add basic show, search --format=text tests

2012-07-09 Thread David Bremner
On Sun, 24 Jun 2012 13:27:48 +1000, Peter Wang wrote: > There didn't seem to be these basic tests for --format=text, > as there are for --format=json. These are just the tests from > the `json' script, with adjusted expected outputs. I have pushed the first patch in the series. d

ANN: Speedee, a web-based notmuch client

2012-07-09 Thread Peter Keen
s scrubbed... URL: <http://notmuchmail.org/pipermail/notmuch/attachments/20120709/224fd193/attachment.html>