[DRAFT PATCH] emacs: support limiting the number of results shown in search results

2011-12-06 Thread Jani Nikula
On Sun, 04 Dec 2011 13:21:40 +0530, "Aneesh Kumar K.V" wrote: > On Thu, 17 Nov 2011 22:07:38 +0200, Jani Nikula wrote: > > Add support for limiting the maximum number of results initially displayed > > in search results. When enabled, the search results will contain push > > buttons to double the

[PATCH 1/4] notmuch-opts.[ch]: new argument parsing framework for notmuch.

2011-12-06 Thread Jani Nikula
On Sun, 4 Dec 2011 11:47:52 -0400, David Bremner wrote: > + case NOTMUCH_OPT_INT: > + if (try->output_var) > + *((int *)try->output_var) = > + atol (arg + strlen (try->name) + 1); Looking at patch 4 and the existing handling of int params,

[PATCH 3/4] notmuch-restore: convert to notmuch-opts argument handling.

2011-12-06 Thread Jani Nikula
On Sun, 4 Dec 2011 11:47:54 -0400, David Bremner wrote: > From: David Bremner > > The new argument handling is a bit more concise, and bit more > flexible. It allows the input file name to go before the --accumulate > option. > --- > notmuch-restore.c | 38 --

[PATCH 2/4] notmuch-dump: convert to notmuch-opts argument handling.

2011-12-06 Thread Jani Nikula
On Sun, 4 Dec 2011 11:47:53 -0400, David Bremner wrote: > From: David Bremner > > The output file is handled via positional arguments. There are > currently no "normal" options. > --- > notmuch-dump.c | 32 > 1 files changed, 20 insertions(+), 12 deletions(-)

[PATCH 1/4] notmuch-opts.[ch]: new argument parsing framework for notmuch.

2011-12-06 Thread Jani Nikula
On Sun, 4 Dec 2011 11:47:52 -0400, David Bremner wrote: > From: David Bremner > > As we noticed when Jani kindly converted things to getopt_long, much > of the work in argument parsing in notmuch is due to the the key-value > style arguments like --format=(raw|json|text). Hi David - Apologie

[PATCH v3 0/2] notmuch hooks

2011-12-06 Thread Tom Prince
On Tue, 06 Dec 2011 18:47:01 -0800, Jameson Graef Rollins wrote: > Also, what if we make it so that the post-new hook script only runs if > notmuch new processes new messages? All of my post-new functions don't > need to be run at all if there is no new mail. Or would it make sense to pass this

[PATCH] fix format string in Message.__unicode__

2011-12-06 Thread Patrick Totzke
Since 2b0116119160f2dc83, Message.__str__ doesn't construct a hash containing the thread data before constructing the formatstring. This changes the formatstring to accept positional parameters instead of a hash. --- bindings/python/notmuch/message.py |2 +- 1 files changed, 1 insertions(+), 1

fix error introduced in pushed patch

2011-12-06 Thread Patrick Totzke
Hi, A friend of mine just complained about an issue he had with upstream notmuch python that is due to my recent reformating of Message.__str__. This patch fixes it. Sorry for the inconveniences, /p

notmuch release 0.10.2 now available

2011-12-06 Thread David Bremner
http://notmuchmail.org -- next part -- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 315 bytes Desc: not available URL: <http://notmuchmail.org/pipermail/notmuch/attachments/20111206/6009fe79/attachment.pgp>

Re: [PATCH v3 0/2] notmuch hooks

2011-12-06 Thread Tom Prince
On Tue, 06 Dec 2011 18:47:01 -0800, Jameson Graef Rollins wrote: > Also, what if we make it so that the post-new hook script only runs if > notmuch new processes new messages? All of my post-new functions don't > need to be run at all if there is no new mail. Or would it make sense to pass this

Re: [PATCH v3 0/2] notmuch hooks

2011-12-06 Thread Jameson Graef Rollins
Also, what if we make it so that the post-new hook script only runs if notmuch new processes new messages? All of my post-new functions don't need to be run at all if there is no new mail. jamie. pgpgDgcQk46WK.pgp Description: PGP signature ___ notmuc

[PATCH v3 0/2] notmuch hooks

2011-12-06 Thread Jameson Graef Rollins
lable Type: application/pgp-signature Size: 835 bytes Desc: not available URL: <http://notmuchmail.org/pipermail/notmuch/attachments/20111206/5219bbdd/attachment.pgp>

Re: [PATCH v3 0/2] notmuch hooks

2011-12-06 Thread Jameson Graef Rollins
On Tue, 6 Dec 2011 15:22:36 +0200, Jani Nikula wrote: > Hi all, this is v3 of the notmuch hooks patches. I think this is nearing > completion apart from final review and, most notably, tests. Hey, Jani. Thanks so much for these patches. I think this is a really neat idea and it will be very us

[PATCH v3 0/2] notmuch hooks

2011-12-06 Thread Jameson Graef Rollins
ot available Type: application/pgp-signature Size: 835 bytes Desc: not available URL: <http://notmuchmail.org/pipermail/notmuch/attachments/20111206/31bc3e3e/attachment.pgp>

ANNOUNCE: nottoomuch-addresses.pl

2011-12-06 Thread Bart Bunting
Hi Tomi, I made the changes for case insensitivity and I much prefer that. Perhaps it could be an option if you like it the other way around. Kind regards Bart

notmuch release 0.10.2 now available

2011-12-06 Thread David Bremner
Where to obtain notmuch 0.10.2 === http://notmuchmail.org/releases/notmuch-0.10.2.tar.gz Which can be verified with: http://notmuchmail.org/releases/notmuch-0.10.2.tar.gz.sha1 3064c1722d30c71f287e1ab63ac13a5847e20c14 notmuch-0.10.2.tar.gz http://notmuchmail.org/

[PATCH v3 1/2] cli: introduce the concept of user defined hooks

2011-12-06 Thread Jani Nikula
On Tue, 6 Dec 2011 15:22:37 +0200, Jani Nikula wrote: > +if (!WIFEXITED (status) || WEXITSTATUS (status)) { > + if (WEXITSTATUS (status)) { Grrh, the above should be "if (WIFEXITED (status))". Please review otherwise. Jani. > + fprintf (stderr, "Error: %s hook failed with statu

[PATCH v3 2/2] cli: add support for pre and post notmuch new hooks

2011-12-06 Thread Jani Nikula
Run notmuch new pre and post hooks, named "pre-new" and "post-new", if present in the notmuch hooks directory. The hooks will be run before and after incorporating new messages to the database. Typical use cases for pre-new and post-new hooks are fetching or delivering new mail to the maildir, and

[PATCH v3 1/2] cli: introduce the concept of user defined hooks

2011-12-06 Thread Jani Nikula
Add mechanism for running user defined hooks. Hooks are executables or symlinks to executables stored under the new notmuch hooks directory, /.notmuch/hooks. No hooks are introduced here, but adding support for a hook is now a simple matter of calling the new notmuch_run_hook() function at an appr

[PATCH v3 0/2] notmuch hooks

2011-12-06 Thread Jani Nikula
Hi all, this is v3 of the notmuch hooks patches. I think this is nearing completion apart from final review and, most notably, tests. Changes in v3: * Incorporate Austin's review comments (id:"20111204034210.GA16405 at mit.edu" and id:"20111204040047.GB16405 at mit.edu"), the biggest change be

Re: ANNOUNCE: nottoomuch-addresses.pl

2011-12-06 Thread Tomi Ollila
On Tue, 06 Dec 2011 08:45:49 +1100, Bart Bunting wrote: > Hi, > > I agree with Jamie on this one. > > The case sensitivity appears to get in the way of searching. I also > think that enabling the regular expressionsearching is a good idea. > > All in all though this is great. I did versio

[PATCH] python: use wrapped notmuch_*_t types instead of raw pointers

2011-12-06 Thread Sebastian Spaeth
ble URL: <http://notmuchmail.org/pipermail/notmuch/attachments/20111206/60369338/attachment.pgp>

[PATCH 3/3] errors='ignore' when decode to unicode

2011-12-06 Thread Sebastian Spaeth
available Type: application/pgp-signature Size: 197 bytes Desc: not available URL: <http://notmuchmail.org/pipermail/notmuch/attachments/20111206/58df338e/attachment.pgp>

[python] documentation & TODO list

2011-12-06 Thread Sebastian Spaeth
--- 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/20111206/08dbb04d/attachment.pgp>

Re: [DRAFT PATCH] emacs: support limiting the number of results shown in search results

2011-12-06 Thread Jani Nikula
On Sun, 04 Dec 2011 13:21:40 +0530, "Aneesh Kumar K.V" wrote: > On Thu, 17 Nov 2011 22:07:38 +0200, Jani Nikula wrote: > > Add support for limiting the maximum number of results initially displayed > > in search results. When enabled, the search results will contain push > > buttons to double th

[PATCH 2/2] python: annotate all calls into libnotmuch with types

2011-12-06 Thread Sebastian Spaeth
u find a cause of that? Sebastian -- 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/20111206/9f0ffc2b/attachment.pgp>

Re: [PATCH 1/4] notmuch-opts.[ch]: new argument parsing framework for notmuch.

2011-12-06 Thread Jani Nikula
On Sun, 4 Dec 2011 11:47:52 -0400, David Bremner wrote: > + case NOTMUCH_OPT_INT: > + if (try->output_var) > + *((int *)try->output_var) = > + atol (arg + strlen (try->name) + 1); Looking at patch 4 and the existing handling of int params,

Re: [PATCH 3/4] notmuch-restore: convert to notmuch-opts argument handling.

2011-12-06 Thread Jani Nikula
On Sun, 4 Dec 2011 11:47:54 -0400, David Bremner wrote: > From: David Bremner > > The new argument handling is a bit more concise, and bit more > flexible. It allows the input file name to go before the --accumulate > option. > --- > notmuch-restore.c | 38 --

Re: [PATCH 2/4] notmuch-dump: convert to notmuch-opts argument handling.

2011-12-06 Thread Jani Nikula
On Sun, 4 Dec 2011 11:47:53 -0400, David Bremner wrote: > From: David Bremner > > The output file is handled via positional arguments. There are > currently no "normal" options. > --- > notmuch-dump.c | 32 > 1 files changed, 20 insertions(+), 12 deletions(-)

Re: [PATCH 1/4] notmuch-opts.[ch]: new argument parsing framework for notmuch.

2011-12-06 Thread Jani Nikula
On Sun, 4 Dec 2011 11:47:52 -0400, David Bremner wrote: > From: David Bremner > > As we noticed when Jani kindly converted things to getopt_long, much > of the work in argument parsing in notmuch is due to the the key-value > style arguments like --format=(raw|json|text). Hi David - Apologie

[PATCH] fix format string in Message.__unicode__

2011-12-06 Thread Patrick Totzke
Since 2b0116119160f2dc83, Message.__str__ doesn't construct a hash containing the thread data before constructing the formatstring. This changes the formatstring to accept positional parameters instead of a hash. --- bindings/python/notmuch/message.py |2 +- 1 files changed, 1 insertions(+), 1

fix error introduced in pushed patch

2011-12-06 Thread Patrick Totzke
Hi, A friend of mine just complained about an issue he had with upstream notmuch python that is due to my recent reformating of Message.__str__. This patch fixes it. Sorry for the inconveniences, /p ___ notmuch mailing list notmuch@notmuchmail.org http:

[PATCH] lib: call g_type_init from notmuch_database_open

2011-12-06 Thread Sebastian Spaeth
otmuch/attachments/20111206/06ebc245/attachment.pgp>

[PATCH 2/2] python: annotate all calls into libnotmuch with types

2011-12-06 Thread Sebastian Spaeth
would not also occur before this patch. Sebastian -- 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/20111206/23b3e233/attachment.pgp>

Re: [PATCH 2/2] python: annotate all calls into libnotmuch with types

2011-12-06 Thread Patrick Totzke
nt was scrubbed... Name: exceptiontest.py Type: text/x-python Size: 181 bytes Desc: not available URL: <http://notmuchmail.org/pipermail/notmuch/attachments/20111206/9fc1327c/attachment-0001.py>

[PATCH] python: use wrapped notmuch_*_t types instead of raw pointers

2011-12-06 Thread Thomas Jost
Now that types are checked correctly, we also need to make sure that all the arguments actually are instances of these types. Otherwise the function calls will fail and raise an exception similar to this one: ctypes.ArgumentError: argument 3: : expected LP_LP_NotmuchMessageS instance instead

Re: [PATCH 2/2] python: annotate all calls into libnotmuch with types

2011-12-06 Thread Patrick Totzke
This commit breaks raising XapianErrors for me. If I lock the index with some `notmuch tag +test '*'` and try to write to it in alot, i get a segfault and the following on stderr: Xapian exception occurred opening database: Unable to get write lock on /home/pazz/mail/.notmuch/xapian: already lock

[PATCH] make release: remove LATEST-$(PACKAGE)-*

2011-12-06 Thread David Bremner
On Mon, 05 Dec 2011 13:39:32 +0200, Tomi Ollila wrote: > The tar file of particular package (notmuch in this case) is named > as $(PACKAGE)-$(VERSION).tar.gz. Therefore the best way to remove > previous link to LATEST is to remove all files beginning with > LATEST-$(PACKAGE)- and not relying how $

[PATCH] test: add test-binaries target

2011-12-06 Thread David Bremner
On Sun, 4 Dec 2011 11:58:49 -0400, David Bremner wrote: > From: David Bremner > > The goal here is to have a simple way of making sure all of the > binaries needed to run tests are available. Pushed to master d

ANNOUNCE: nottoomuch-addresses.pl

2011-12-06 Thread Bart Bunting
Hi, I agree with Jamie on this one. The case sensitivity appears to get in the way of searching. I also think that enabling the regular expressionsearching is a good idea. All in all though this is great. The only other idea I have, which is only half formed, is that it would be nice to pr

Re: [PATCH] make release: remove LATEST-$(PACKAGE)-*

2011-12-06 Thread David Bremner
On Mon, 05 Dec 2011 13:39:32 +0200, Tomi Ollila wrote: > The tar file of particular package (notmuch in this case) is named > as $(PACKAGE)-$(VERSION).tar.gz. Therefore the best way to remove > previous link to LATEST is to remove all files beginning with > LATEST-$(PACKAGE)- and not relying how $

Re: [PATCH] test: add test-binaries target

2011-12-06 Thread David Bremner
On Sun, 4 Dec 2011 11:58:49 -0400, David Bremner wrote: > From: David Bremner > > The goal here is to have a simple way of making sure all of the > binaries needed to run tests are available. Pushed to master d ___ notmuch mailing list notmuch@notmu

Re: [PATCH v3 1/2] cli: introduce the concept of user defined hooks

2011-12-06 Thread Jani Nikula
On Tue, 6 Dec 2011 15:22:37 +0200, Jani Nikula wrote: > +if (!WIFEXITED (status) || WEXITSTATUS (status)) { > + if (WEXITSTATUS (status)) { Grrh, the above should be "if (WIFEXITED (status))". Please review otherwise. Jani. > + fprintf (stderr, "Error: %s hook failed with statu

[PATCH v3 1/2] cli: introduce the concept of user defined hooks

2011-12-06 Thread Jani Nikula
Add mechanism for running user defined hooks. Hooks are executables or symlinks to executables stored under the new notmuch hooks directory, /.notmuch/hooks. No hooks are introduced here, but adding support for a hook is now a simple matter of calling the new notmuch_run_hook() function at an appr

[PATCH v3 2/2] cli: add support for pre and post notmuch new hooks

2011-12-06 Thread Jani Nikula
Run notmuch new pre and post hooks, named "pre-new" and "post-new", if present in the notmuch hooks directory. The hooks will be run before and after incorporating new messages to the database. Typical use cases for pre-new and post-new hooks are fetching or delivering new mail to the maildir, and

[PATCH v3 0/2] notmuch hooks

2011-12-06 Thread Jani Nikula
Hi all, this is v3 of the notmuch hooks patches. I think this is nearing completion apart from final review and, most notably, tests. Changes in v3: * Incorporate Austin's review comments (id:"20111204034210.ga16...@mit.edu" and id:"20111204040047.gb16...@mit.edu"), the biggest change being the

Re: [PATCH] python: use wrapped notmuch_*_t types instead of raw pointers

2011-12-06 Thread Sebastian Spaeth
On Tue, 6 Dec 2011 11:03:22 +0100, Thomas Jost wrote: > Now that types are checked correctly, we also need to make sure that all the > arguments actually are instances of these types. Otherwise the function calls > will fail and raise an exception similar to this one: >ctypes.ArgumentError: a

Re: [PATCH 3/3] errors='ignore' when decode to unicode

2011-12-06 Thread Sebastian Spaeth
Just for reference, all three patches went in. Perhaps this warrants a NEWS entry such as: * python: using more unicode throughout and robustify against unicode errors (credits to Patrick Totzke) pgpFR77WcaGxT.pgp Description: PGP signature ___ no

Re: [python] documentation & TODO list

2011-12-06 Thread Sebastian Spaeth
On Mon, 05 Dec 2011 22:36:06 +, Patrick Totzke wrote: > These are the things I noticed when going through the code today: > 1) in filenames.py, __str__ of Filenames: should the return value be >'\n'.join(self._files)? alternatively, define __iter__ to make this object >behave as iterat

Re: [PATCH 2/2] python: annotate all calls into libnotmuch with types

2011-12-06 Thread Sebastian Spaeth
On Tue, 06 Dec 2011 10:46:31 +, Patrick Totzke wrote: > This commit breaks raising XapianErrors for me. > > If I lock the index with some `notmuch tag +test '*'` > and try to write to it in alot, i get a segfault and > the following on stderr: > > Xapian exception occurred opening database:

Re: [PATCH 2/2] python: annotate all calls into libnotmuch with types

2011-12-06 Thread Patrick Totzke
yes, i can. here's how to reproduce it on master: fire a `notmuch tag +TEST1 '*'`, which should block the db for a while. Then use the attached script to write to the index (this could make a nice second testcase for the bindings in case the test body is large enough). On master, the script fails

Re: [PATCH] lib: call g_type_init from notmuch_database_open

2011-12-06 Thread Sebastian Spaeth
On Sun, 4 Dec 2011 15:35:14 -0400, David Bremner wrote: > From: David Bremner > This seems to fix the segfault for me. Any other comments/experiences? > +/* Initialize the GLib type system and threads */ > +g_type_init (); > + Thanks the patch looks sane, and relieves me from doing ug

Re: [PATCH 2/2] python: annotate all calls into libnotmuch with types

2011-12-06 Thread Sebastian Spaeth
On Tue, 06 Dec 2011 10:46:31 +, Patrick Totzke wrote: > This commit breaks raising XapianErrors for me. > > If I lock the index with some `notmuch tag +test '*'` > and try to write to it in alot, i get a segfault and > the following on stderr: > > Xapian exception occurred opening database:

Re: [PATCH 2/2] python: annotate all calls into libnotmuch with types

2011-12-06 Thread Patrick Totzke
This commit breaks raising XapianErrors for me. If I lock the index with some `notmuch tag +test '*'` and try to write to it in alot, i get a segfault and the following on stderr: Xapian exception occurred opening database: Unable to get write lock on /home/pazz/mail/.notmuch/xapian: already lock

[PATCH] python: use wrapped notmuch_*_t types instead of raw pointers

2011-12-06 Thread Thomas Jost
Now that types are checked correctly, we also need to make sure that all the arguments actually are instances of these types. Otherwise the function calls will fail and raise an exception similar to this one: ctypes.ArgumentError: argument 3: : expected LP_LP_NotmuchMessageS instance instead