[PATCH] emacs: Make moving to the previous message move to the previous boundary

2012-07-18 Thread Mark Walters
On Sat, 14 Jul 2012, Austin Clements wrote: > Previously, notmuch-show-previous-message would move to the beginning > of the message before the message containing point. This patch makes > it instead move to the previous message *boundary*. That is, if point > isn't already at the beginning of

[PATCH 1/7] go: Use iota in enum bindings

2012-07-18 Thread Sebastien Binet
--- 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/20120718/e7f11955/attachment.pgp>

[PATCH 7/7] go: Bind notmuch_thread_t functions

2012-07-18 Thread Adrien Bustany
--- bindings/go/src/notmuch/notmuch.go | 253 +++- 1 files changed, 252 insertions(+), 1 deletions(-) diff --git a/bindings/go/src/notmuch/notmuch.go b/bindings/go/src/notmuch/notmuch.go index be4cb8c..f667dbb 100644 --- a/bindings/go/src/notmuch/notmuch.go +++

[PATCH 6/7] go: Bind notmuch_database_find_message_by_filename

2012-07-18 Thread Adrien Bustany
--- bindings/go/src/notmuch/notmuch.go | 39 1 files changed, 39 insertions(+), 0 deletions(-) diff --git a/bindings/go/src/notmuch/notmuch.go b/bindings/go/src/notmuch/notmuch.go index 384d5a5..be4cb8c 100644 --- a/bindings/go/src/notmuch/notmuch.go +++

[PATCH 5/7] go: Partially bind notmuch_database_upgrade

2012-07-18 Thread Adrien Bustany
This binding does not handle the progress callback, but at least allows opening and upgrading a database if needed. --- bindings/go/src/notmuch/notmuch.go | 13 - 1 files changed, 12 insertions(+), 1 deletions(-) diff --git a/bindings/go/src/notmuch/notmuch.go

[PATCH 4/7] go: Make Destroy functions safe to call several times

2012-07-18 Thread Adrien Bustany
Those methods were already checking if the underlying C object was NULL, but they were not setting the pointer to NULL after destroying it. --- bindings/go/src/notmuch/notmuch.go |6 ++ 1 files changed, 6 insertions(+), 0 deletions(-) diff --git a/bindings/go/src/notmuch/notmuch.go

[PATCH 3/7] go: Allow notmuch objects to be garbage collected

2012-07-18 Thread Adrien Bustany
This makes notmuch appropriately free the underlying notmuch C objects when garbage collecting their Go wrappers. To make sure we don't break the underlying links between objects (for example, a notmuch_messages_t being GC'ed before a notmuch_message_t belonging to it), we add for each wraper

[PATCH 2/7] go: Add missing MESSAGE_FLAG_EXCLUDED in Flag enum

2012-07-18 Thread Adrien Bustany
--- bindings/go/src/notmuch/notmuch.go |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/bindings/go/src/notmuch/notmuch.go b/bindings/go/src/notmuch/notmuch.go index ecd7418..1d77fd2 100644 --- a/bindings/go/src/notmuch/notmuch.go +++ b/bindings/go/src/notmuch/notmuch.go

[PATCH 1/7] go: Use iota in enum bindings

2012-07-18 Thread Adrien Bustany
Using iota is the correct way to get the values in the enum increment automatically. The old code would just set all the enum values to 0. --- bindings/go/src/notmuch/notmuch.go |6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/bindings/go/src/notmuch/notmuch.go

[PATCH 0/7] Various fixes for the Go bindings

2012-07-18 Thread Adrien Bustany
The following patches fix some serious memory management issues with the Go bindings, and add some missing functions as well. Adrien Bustany (7): go: Use iota in enum bindings go: Add missing MESSAGE_FLAG_EXCLUDED in Flag enum go: Allow notmuch objects to be garbage collected go: Make

[PATCHv2] cli: Hooks for tag-command

2012-07-18 Thread Dominik Peteler
hello, I improved my patch according to Janis mail: * new cli syntax: notmuch tag [ --no-hooks ] -- [ -- ] * adjusted man pages and wrote tests I had the idea to improve this feature by passing the message-ids or the filename to the hooks. What's your opinion about that ? Any suggestions ?

[PATCH 0/7] Various fixes for the Go bindings

2012-07-18 Thread Austin Clements
This series looks good to me other than the few things I commented on. It's nice to see the Go bindings get a bit of love! Quoth Adrien Bustany on Jul 18 at 9:34 pm: > The following patches fix some serious memory management issues with > the Go bindings, and add some missing functions as well.

[PATCH 7/7] go: Bind notmuch_thread_t functions

2012-07-18 Thread Austin Clements
Quoth Adrien Bustany on Jul 18 at 9:34 pm: > --- > bindings/go/src/notmuch/notmuch.go | 253 > +++- > 1 files changed, 252 insertions(+), 1 deletions(-) > > diff --git a/bindings/go/src/notmuch/notmuch.go > b/bindings/go/src/notmuch/notmuch.go > index

[PATCH 5/7] go: Partially bind notmuch_database_upgrade

2012-07-18 Thread Austin Clements
Quoth Adrien Bustany on Jul 18 at 9:34 pm: > This binding does not handle the progress callback, but at least allows > opening and upgrading a database if needed. > --- > bindings/go/src/notmuch/notmuch.go | 13 - > 1 files changed, 12 insertions(+), 1 deletions(-) > > diff --git

[PATCH 3/7] go: Allow notmuch objects to be garbage collected

2012-07-18 Thread Austin Clements
This is subtle enough that I think it deserves a comment in the source code explaining that tracking the talloc owner reference, combined with the fact that Go finalizers are run in dependency order, ensures that the C objects will always be destroyed from the talloc leaves up. Just one inline

[PATCH 1/7] go: Use iota in enum bindings

2012-07-18 Thread Austin Clements
Hah. I guess nobody has tried to modify a notmuch database using the Go bindings. Could this instead assign the constants to C.NOTMUCH_DATABASE_MODE_READ_ONLY, etc, rather than duplicating their values? It would be nice to do that for the Status values as well (which are correctly using iota,

[PATCH v6 3/3] Use the structured formatters in notmuch-search.c.

2012-07-18 Thread Austin Clements
Just a few comments (don't forget to scroll all the way down). Overall this is looking pretty good. Quoth craven at gmx.net on Jul 16 at 10:35 am: > This patch switches from the current ad-hoc printer to the structured > formatters in sprinter.h, sprinter-text-search.c and sprinter-json.c. > >

[PATCH v6 2/3] Add structured output formatter for JSON and plain text.

2012-07-18 Thread Austin Clements
Quoth craven at gmx.net on Jul 16 at 10:35 am: > Using the new structured printer support in sprinter.h, implement > sprinter_json_create, which returns a new JSON structured output > formatter. The formatter prints output similar to the existing JSON, but > with differences in whitespace (mostly

[PATCH] cli: Hooks for tag-command

2012-07-18 Thread Jani Nikula
ect_equal_file expected output > + > +test_begin_subtest "pre-tag is run before post-new" > +rm_hooks > +generate_message > +create_echo_hook "pre-tag" pre-tag.expected pre-tag.output > +create_echo_hook "post-tag" post-tag.expected post-tag.output > +notmuch tag +foo -- '*' > /dev/null > +test_expect_equal_file post-tag.expected post-tag.output > + > +test_begin_subtest "pre-tag non-zero exit status (hook status)" > +rm_hooks > +generate_message > +create_failing_hook "pre-tag" > +output=`notmuch tag +foo -- '*' 2>&1` > +test_expect_equal "$output" "Error: pre-tag hook failed with status 13" > + > +# depends on the previous subtest leaving broken hook behind > +test_expect_code 1 "pre-tag non-zero exit status (notmuch status)" "notmuch tag +foo -- '*'" > + > test_done > -- > 1.7.11.2 > > ___ > notmuch mailing list > notmuch at notmuchmail.org > http://notmuchmail.org/mailman/listinfo/notmuch -- next part -- An HTML attachment was scrubbed... URL: <http://notmuchmail.org/pipermail/notmuch/attachments/20120718/cd0913ea/attachment.html>

Re: [PATCH] cli: Hooks for tag-command

2012-07-18 Thread Jani Nikula
On Jul 18, 2012 12:25 AM, Dominik Peteler domi...@with-h.at wrote: hello, I attached some modifications which I made to notmuch. Comes with man pages and test. Hi Dominik, please find a couple of comments below. I'm on the road, replying on a phone, so this is not very thorough... BR, Jani.

[PATCH 5/7] go: Partially bind notmuch_database_upgrade

2012-07-18 Thread Adrien Bustany
This binding does not handle the progress callback, but at least allows opening and upgrading a database if needed. --- bindings/go/src/notmuch/notmuch.go | 13 - 1 files changed, 12 insertions(+), 1 deletions(-) diff --git a/bindings/go/src/notmuch/notmuch.go

[PATCH 4/7] go: Make Destroy functions safe to call several times

2012-07-18 Thread Adrien Bustany
Those methods were already checking if the underlying C object was NULL, but they were not setting the pointer to NULL after destroying it. --- bindings/go/src/notmuch/notmuch.go |6 ++ 1 files changed, 6 insertions(+), 0 deletions(-) diff --git a/bindings/go/src/notmuch/notmuch.go

[PATCH 1/7] go: Use iota in enum bindings

2012-07-18 Thread Adrien Bustany
Using iota is the correct way to get the values in the enum increment automatically. The old code would just set all the enum values to 0. --- bindings/go/src/notmuch/notmuch.go |6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/bindings/go/src/notmuch/notmuch.go

[PATCH 6/7] go: Bind notmuch_database_find_message_by_filename

2012-07-18 Thread Adrien Bustany
--- bindings/go/src/notmuch/notmuch.go | 39 1 files changed, 39 insertions(+), 0 deletions(-) diff --git a/bindings/go/src/notmuch/notmuch.go b/bindings/go/src/notmuch/notmuch.go index 384d5a5..be4cb8c 100644 --- a/bindings/go/src/notmuch/notmuch.go +++

[PATCH 2/7] go: Add missing MESSAGE_FLAG_EXCLUDED in Flag enum

2012-07-18 Thread Adrien Bustany
--- bindings/go/src/notmuch/notmuch.go |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/bindings/go/src/notmuch/notmuch.go b/bindings/go/src/notmuch/notmuch.go index ecd7418..1d77fd2 100644 --- a/bindings/go/src/notmuch/notmuch.go +++ b/bindings/go/src/notmuch/notmuch.go

[PATCH 0/7] Various fixes for the Go bindings

2012-07-18 Thread Adrien Bustany
The following patches fix some serious memory management issues with the Go bindings, and add some missing functions as well. Adrien Bustany (7): go: Use iota in enum bindings go: Add missing MESSAGE_FLAG_EXCLUDED in Flag enum go: Allow notmuch objects to be garbage collected go: Make

[PATCH 7/7] go: Bind notmuch_thread_t functions

2012-07-18 Thread Adrien Bustany
--- bindings/go/src/notmuch/notmuch.go | 253 +++- 1 files changed, 252 insertions(+), 1 deletions(-) diff --git a/bindings/go/src/notmuch/notmuch.go b/bindings/go/src/notmuch/notmuch.go index be4cb8c..f667dbb 100644 --- a/bindings/go/src/notmuch/notmuch.go +++

[PATCH 3/7] go: Allow notmuch objects to be garbage collected

2012-07-18 Thread Adrien Bustany
This makes notmuch appropriately free the underlying notmuch C objects when garbage collecting their Go wrappers. To make sure we don't break the underlying links between objects (for example, a notmuch_messages_t being GC'ed before a notmuch_message_t belonging to it), we add for each wraper

Re: [PATCH v6 2/3] Add structured output formatter for JSON and plain text.

2012-07-18 Thread Austin Clements
Quoth cra...@gmx.net on Jul 16 at 10:35 am: Using the new structured printer support in sprinter.h, implement sprinter_json_create, which returns a new JSON structured output formatter. The formatter prints output similar to the existing JSON, but with differences in whitespace (mostly

Re: [PATCH v6 3/3] Use the structured formatters in notmuch-search.c.

2012-07-18 Thread Austin Clements
Just a few comments (don't forget to scroll all the way down). Overall this is looking pretty good. Quoth cra...@gmx.net on Jul 16 at 10:35 am: This patch switches from the current ad-hoc printer to the structured formatters in sprinter.h, sprinter-text-search.c and sprinter-json.c. The JSON

[PATCHv2] cli: Hooks for tag-command

2012-07-18 Thread Dominik Peteler
hello, I improved my patch according to Janis mail: * new cli syntax: notmuch tag [ --no-hooks ] -- tag ops [ -- ] search terms * adjusted man pages and wrote tests I had the idea to improve this feature by passing the message-ids or the filename to the hooks. What's your opinion about that ?

Re: [PATCH 1/7] go: Use iota in enum bindings

2012-07-18 Thread Austin Clements
Hah. I guess nobody has tried to modify a notmuch database using the Go bindings. Could this instead assign the constants to C.NOTMUCH_DATABASE_MODE_READ_ONLY, etc, rather than duplicating their values? It would be nice to do that for the Status values as well (which are correctly using iota,

Re: [PATCH 1/7] go: Use iota in enum bindings

2012-07-18 Thread Sebastien Binet
Austin Clements amdra...@mit.edu writes: Hah. I guess nobody has tried to modify a notmuch database using the Go bindings. Could this instead assign the constants to C.NOTMUCH_DATABASE_MODE_READ_ONLY, etc, rather than duplicating their values? It would be nice to do that for the Status

Re: [PATCH 3/7] go: Allow notmuch objects to be garbage collected

2012-07-18 Thread Austin Clements
This is subtle enough that I think it deserves a comment in the source code explaining that tracking the talloc owner reference, combined with the fact that Go finalizers are run in dependency order, ensures that the C objects will always be destroyed from the talloc leaves up. Just one inline

Re: [PATCH 5/7] go: Partially bind notmuch_database_upgrade

2012-07-18 Thread Austin Clements
Quoth Adrien Bustany on Jul 18 at 9:34 pm: This binding does not handle the progress callback, but at least allows opening and upgrading a database if needed. --- bindings/go/src/notmuch/notmuch.go | 13 - 1 files changed, 12 insertions(+), 1 deletions(-) diff --git

Re: [PATCH 7/7] go: Bind notmuch_thread_t functions

2012-07-18 Thread Austin Clements
Quoth Adrien Bustany on Jul 18 at 9:34 pm: --- bindings/go/src/notmuch/notmuch.go | 253 +++- 1 files changed, 252 insertions(+), 1 deletions(-) diff --git a/bindings/go/src/notmuch/notmuch.go b/bindings/go/src/notmuch/notmuch.go index be4cb8c..f667dbb

Re: [PATCH 0/7] Various fixes for the Go bindings

2012-07-18 Thread Austin Clements
This series looks good to me other than the few things I commented on. It's nice to see the Go bindings get a bit of love! Quoth Adrien Bustany on Jul 18 at 9:34 pm: The following patches fix some serious memory management issues with the Go bindings, and add some missing functions as well.

Re: [PATCH] emacs: Make moving to the previous message move to the previous boundary

2012-07-18 Thread Mark Walters
On Sat, 14 Jul 2012, Austin Clements amdra...@mit.edu wrote: Previously, notmuch-show-previous-message would move to the beginning of the message before the message containing point. This patch makes it instead move to the previous message *boundary*. That is, if point isn't already at the