[PATCH] properly raise exceptions in python bindings

2011-09-26 Thread Justus Winter
There are various locations where exceptions are constructed but not raised. This patch adds the necessary raise statements. Signed-off-by: Justus Winter 4win...@informatik.uni-hamburg.de --- bindings/python/notmuch/database.py |4 ++-- bindings/python/notmuch/filename.py |2 +- bindings

[PATCH 4/9] python: fix NotmuchError.__str__ if status == None

2011-09-26 Thread Justus Winter
Passing None to STATUS.status2str raises an ArgumentError. Add a check for this case and provide a generic message. Signed-off-by: Justus Winter 4win...@informatik.uni-hamburg.de --- bindings/python/notmuch/globals.py |4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) diff --git

[PATCH 5/9] python: rename _verify_initialized_db to _assert_db_is_initialized

2011-09-26 Thread Justus Winter
Rename the function to clarify its effect and remove all the comments accompanying each call to the function. Signed-off-by: Justus Winter 4win...@informatik.uni-hamburg.de --- bindings/python/notmuch/database.py | 32 +++- 1 files changed, 11 insertions(+), 21

[PATCH 7/9] python: provide more exception classes

2011-09-26 Thread Justus Winter
classes in __init__.py so they can be easily imported by anyone. Signed-off-by: Justus Winter 4win...@informatik.uni-hamburg.de --- bindings/python/notmuch/__init__.py | 16 ++- bindings/python/notmuch/globals.py | 37 +++ 2 files changed, 52 insertions

[PATCH 6/9] python: rename _verify_dir_initialized to _assert_dir_is_initialized

2011-09-26 Thread Justus Winter
Rename the function to clarify its effect and remove all the comments accompanying each call to the function. Signed-off-by: Justus Winter 4win...@informatik.uni-hamburg.de --- bindings/python/notmuch/database.py | 14 +- 1 files changed, 5 insertions(+), 9 deletions(-) diff --git

[PATCH 9/9] python: raise a more specific error in Messages.print_messages

2011-09-26 Thread Justus Winter
Raising Exception is considered bad since the only way to catch it is to do 'except Exception'. Raising a TypeError is more appropriate. Since the format parameter has already been validated, checking it again is not necessary. Simplify this conditional. Signed-off-by: Justus Winter 4win

[PATCH 3/9] python: reorder the arguments of NotmuchError.__init__()

2011-09-26 Thread Justus Winter
It is customary for subclasses of Exception to take a string as the first argument that describes the problem. Signed-off-by: Justus Winter 4win...@informatik.uni-hamburg.de --- bindings/python/notmuch/database.py | 48 ++-- bindings/python/notmuch/filename.py |4

[PATCH 8/9] python: use the new exception classes and update the documentation

2011-09-26 Thread Justus Winter
Signed-off-by: Justus Winter 4win...@informatik.uni-hamburg.de --- bindings/python/notmuch/database.py | 138 +-- bindings/python/notmuch/filename.py |9 +- bindings/python/notmuch/message.py | 79 ++-- bindings/python/notmuch/tag.py

Re: [PATCH 1/9] python: add a .gitignore file and refine the toplevel one

2011-09-29 Thread Justus Winter
Hi Sebastian, Quoting Sebastian Spaeth (2011-09-29 09:45:38) Also, not all status are an error, e.g. DuplicateMessageId denotes success rather than failure, it just communicates a status. I just stumbled upon the following comment in notmuch.h: /* Status codes used for the return values of

[PATCH] python: fix docstring of Message.get_header()

2011-09-29 Thread Justus Winter
Update the docstring from notmuch.h. Signed-off-by: Justus Winter 4win...@informatik.uni-hamburg.de --- bindings/python/notmuch/message.py | 13 +++-- 1 files changed, 7 insertions(+), 6 deletions(-) diff --git a/bindings/python/notmuch/message.py b/bindings/python/notmuch/message.py

python(?): process died while iterating over Messages object

2011-09-30 Thread Justus Winter
Hi, while iterating over a query result set my process died with terminate called after throwing an instance of 'Xapian::DatabaseModifiedError' Aborted I am not sure where this came from, grepping throuth notmuchs soure didn't reveal the location. So this might be not specific to the python

Re: [PATCH 7/9] python: provide more exception classes

2011-09-30 Thread Justus Winter
Quoting Sebastian Spaeth (2011-09-30 14:00:36) On Mon, 26 Sep 2011 03:05:35 +0200, Justus Winter 4win...@informatik.uni-hamburg.de wrote: To make the exception handling more effective in code using the python bindings it is necessary to differentiate between the different kind of failures

python: unpythonic result of Message.get_replies()

2011-10-04 Thread Justus Winter
Hi everyone :) I noticed that Message.get_replies() returns a Messages object *or* None. Quoting the documentation: Returns: Messages or None if there are no replies to this message Messages is a class implementing the iterator protocol, so a python programmer would expect to get an iterator

[PATCH 1/2] python: add classes to wrap all notmuch_*_t types

2011-10-10 Thread Justus Winter
Signed-off-by: Justus Winter 4win...@informatik.uni-hamburg.de --- bindings/python/notmuch/globals.py | 38 +++- 1 files changed, 37 insertions(+), 1 deletions(-) diff --git a/bindings/python/notmuch/globals.py b/bindings/python/notmuch/globals.py index de1db16

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

2011-10-10 Thread Justus Winter
Add type information to the ctypes._FuncPtr wrappers and use the wrapper classes instead of c_void_p for pointers to notmuch_*_t. This enables the ctypes library to type check parameters being handed to functions from the notmuch library. Signed-off-by: Justus Winter 4win...@informatik.uni

Re: [PATCH 1/2] python: add classes to wrap all notmuch_*_t types

2011-11-28 Thread Justus Winter
Quoting Sebastian Spaeth (2011-11-02 08:25:53) On Mon, 10 Oct 2011 00:12:53 +0200, Justus Winter 4win...@informatik.uni-hamburg.de wrote: Signed-off-by: Justus Winter 4win...@informatik.uni-hamburg.de --- bindings/python/notmuch/globals.py | 38 +++- Hi

Re: [PATCH 1/2] python: add classes to wrap all notmuch_*_t types

2011-12-02 Thread Justus Winter
Quoting James Westby (2011-12-02 00:32:30) On Thu, 01 Dec 2011 22:25:41 +0100, Sebastian Spaeth sebast...@sspaeth.de wrote: This strikes me as a rather good thing, so the patches went in. Hah, I've just seen this, and I'm going to guess that it fixes my problems too. ... I've tested and it

Re: [PATCH 1/2] python: add classes to wrap all notmuch_*_t types

2011-12-02 Thread Justus Winter
Quoting James Westby (2011-12-03 00:24:18) On Fri, 02 Dec 2011 09:20:35 -0500, James Westby jw+deb...@jameswestby.net wrote: I'll test again to make sure that I have this correct, but my tests yesterday certainly suggested that your patches fixed this. Yep, segfaults a plenty dropping your

RFC: don't ask users to do 'sudo make install'

2011-12-07 Thread Justus Winter
Hey everyone, I just noticed that running configure says: All required packages were found. You may now run the following commands to compile and install notmuch: make sudo make install I think that this is a very poor advice in general and we shouldn't give it to users. I

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

2011-12-07 Thread Justus Winter
Quoting Justus Winter (2011-12-06 13:51:08) Quoting Sebastian Spaeth (2011-12-06 13:05:53) On Tue, 06 Dec 2011 10:46:31 +, Patrick Totzke patricktot...@googlemail.com wrote: This commit breaks raising XapianErrors for me. If I lock the index with some `notmuch tag +test '*'` and try

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

2011-12-07 Thread Justus Winter
Quoting Justus Winter (2011-12-07 19:49:31) Quoting Justus Winter (2011-12-06 13:51:08) I began running alot in gdb since I get segfaults within libnotmuch from time to time and managed to get a stack trace pointing to notmuch_database_begin_atomic, but I couldn't figure out what caused

[afew] announcing afew, an universal tagging solution with some fancy features

2011-12-14 Thread Justus Winter
Hey everyone :) I'd like to introduce my initial tagging approach, afew tags: https://github.com/teythoon/afew It has some nifty features, citing the README: * text classification, magic tags aka the mailing list without server * spam handling (flush all tags, add spam) * killed thread

[PATCH 1/7] py3k: The execfile built-in has been removed in python 3

2011-12-14 Thread Justus Winter
--- bindings/python/setup.py |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/bindings/python/setup.py b/bindings/python/setup.py index 286fd19..2e58dab 100644 --- a/bindings/python/setup.py +++ b/bindings/python/setup.py @@ -7,7 +7,7 @@ from distutils.core import setup

[PATCH 2/7] py3k: The ConfigParser module has been renamed to configparser

2011-12-14 Thread Justus Winter
--- bindings/python/notmuch.py |7 ++- bindings/python/notmuch/database.py |8 +++- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/bindings/python/notmuch.py b/bindings/python/notmuch.py index 8d11859..3ff53ec 100755 --- a/bindings/python/notmuch.py +++

[PATCH 3/7] py3k: All strings are unicode strings in py3k

2011-12-14 Thread Justus Winter
--- bindings/python/notmuch/globals.py |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/bindings/python/notmuch/globals.py b/bindings/python/notmuch/globals.py index 54a49b2..99e6a10 100644 --- a/bindings/python/notmuch/globals.py +++

[PATCH 5/7] py3k: the basestring and unicode types are removed in python 3

2011-12-14 Thread Justus Winter
--- bindings/python/notmuch/globals.py |5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-) diff --git a/bindings/python/notmuch/globals.py b/bindings/python/notmuch/globals.py index 99e6a10..c52790c 100644 --- a/bindings/python/notmuch/globals.py +++

[PATCH 4/7] py3k: Rename .next() to __next__(), add python2.x compatibility alias

2011-12-14 Thread Justus Winter
--- bindings/python/notmuch/database.py |3 ++- bindings/python/notmuch/message.py |3 ++- bindings/python/notmuch/tag.py |3 ++- bindings/python/notmuch/thread.py |3 ++- 4 files changed, 8 insertions(+), 4 deletions(-) diff --git a/bindings/python/notmuch/database.py

[PATCH 6/7] py3k: Add and use a mixin class that implements __str__

2011-12-14 Thread Justus Winter
--- bindings/python/notmuch/filename.py |7 ++- bindings/python/notmuch/globals.py | 15 +++ bindings/python/notmuch/message.py |8 +++- bindings/python/notmuch/tag.py |7 ++- bindings/python/notmuch/thread.py |6 +++--- 5 files changed, 21

Re: [PATCH 6/7] py3k: Add and use a mixin class that implements __str__

2011-12-14 Thread Justus Winter
Quoting Tomi Ollila (2011-12-14 13:26:38) On Wed, 14 Dec 2011 11:58:24 +0100, Justus Winter 4win...@informatik.uni-hamburg.de wrote: --- [ ... snip ... ] -class Filenames(object): +class Filenames(Python3StringMixIn): Represents a list of filenames as returned by notmuch

[PATCH 6/7] py3k: Add and use a mixin class that implements __str__

2011-12-14 Thread Justus Winter
--- bindings/python/notmuch/filename.py |7 ++- bindings/python/notmuch/globals.py | 15 +++ bindings/python/notmuch/message.py |8 +++- bindings/python/notmuch/tag.py |7 ++- bindings/python/notmuch/thread.py |7 ++- 5 files changed, 20

Re: [afew] announcing afew, an universal tagging solution with some fancy features

2011-12-19 Thread Justus Winter
Hey Pazz :) Quoting Patrick Totzke (2011-12-14 17:59:43) Hi Justus, I have just tried your script and have some questions/remarks about it: * mkdir -p ~/.config/afew ~/.local/share/afew/categories As far as I can see, this is not needed if one doesn't use ClassifyingFilter, so its OK not to

Re: [afew] announcing afew, an universal tagging solution with some fancy features

2011-12-21 Thread Justus Winter
Hey Jamie :) Quoting Jameson Graef Rollins (2011-12-19 18:57:00) On Mon, 19 Dec 2011 15:13:51 +0100, Justus Winter 4win...@informatik.uni-hamburg.de wrote: Is your new tag called 'is:new'? Mine is just called 'new' is: is a search prefix, synonymous with tag: Ah, thanks for the clarification

Re: [afew] announcing afew, an universal tagging solution with some fancy features

2011-12-21 Thread Justus Winter
Hey Pazz, Quoting Patrick Totzke (2011-12-19 19:17:12) Also, should i not get some output when calling afew with -vv ? Yes you should ;). Here's an example run on my box: teythoon@thinkbox ~/repos/afew (git)-[master] % python3.2 bin/afew -vv --tag --new INFO:root:Tagging spam messages

patchwork link 404s

2011-12-21 Thread Justus Winter
Hi everyone :) the patchwork instance referenced on notmuchmail.org [0] returns a 404 not found. Cheers, Justus 0: http://patchwork.notmuchmail.org/project/notmuch .signature Description: Binary data ___ notmuch mailing list notmuch@notmuchmail.org

RFC: use the XDG Base Directory Specification for configuration data

2011-12-21 Thread Justus Winter
Hi :) I'd like to propose to store notmuchs configuration in $XDG_CONFIG_HOME/notmuch/config as suggested in the XDG Base Directory Specification [0]. Similarly $XDG_DATA_HOME/nmbug might be a more appropriate location for nmbugs git checkout than ~/.nmbug. Cheers, Justus 0:

Re: python: unpythonic result of Message.get_replies()

2011-12-21 Thread Justus Winter
The attached patch series fixes this problem. Note that the wrapping nature of the notmuch bindings makes it kind of awkward to fix the behavior. I've decided to avoid introducing code to the Messages class to indicate that there are no messages and there is no notmuch object being wrapped, but

[PATCH 2/2] python: make the result of Message.get_replies() more pythonic

2011-12-21 Thread Justus Winter
Formerly Message.get_replies() returned an iterator or None forcing users to check the result before iterating over it leading to strange looking code at the call site. Fix this flaw by adding an EmptyMessagesResult class that behaves like the Messages class but immediatly raises StopIteration if

[PATCH 1/2] python: refactor print_messages into format_messages and print_messages

2011-12-21 Thread Justus Winter
--- bindings/python/notmuch/message.py | 37 +-- 1 files changed, 26 insertions(+), 11 deletions(-) diff --git a/bindings/python/notmuch/message.py b/bindings/python/notmuch/message.py index ce8e718..cc9fc2a 100644 --- a/bindings/python/notmuch/message.py +++

Re: [PATCH 5/7] py3k: the basestring and unicode types are removed in python 3

2012-01-08 Thread Justus Winter
Hi Tomi, Hi Sebastian :) Quoting Tomi Ollila (2012-01-04 19:07:11) On Mon, 02 Jan 2012 16:15:58 +0100, Sebastian Spaeth sebast...@sspaeth.de wrote: Happy new year. Pushed patches 1-4 of this series so far. Looking fine, nice, thanks. but ugh, the below seems like a rather ugly hack in a

[PATCH] py3k: the basestring and unicode types are removed in python 3

2012-01-08 Thread Justus Winter
--- bindings/python/notmuch/globals.py | 34 ++ 1 files changed, 22 insertions(+), 12 deletions(-) diff --git a/bindings/python/notmuch/globals.py b/bindings/python/notmuch/globals.py index 32ed9ae..4138460 100644 --- a/bindings/python/notmuch/globals.py +++

Re: Python bindings for adoption

2012-01-08 Thread Justus Winter
on notmuch. I am already neglecting offlineimap, which also needs some attention. As I have repeatedly stated that I want to hand over the maintainership of the notmuch python bindings, and I would like to do it asap. I feel that people like Patrick Totzke, or Justus Winter who generally have been

Re: nmbug changes

2012-01-08 Thread Justus Winter
Hey David, Quoting David Bremner (2011-12-23 22:56:31) For those of you following/using the nmbug experiment, I made some slightly disruptive changes, in order to support auto-updating the web view on push. I'm having trouble with nmbug, I did follow the instructions in this mail and in the

Re: nmbug changes

2012-01-09 Thread Justus Winter
Quoting David Bremner (2012-01-08 23:34:26) On Sun, 08 Jan 2012 16:24:06 -, Justus Winter 4win...@informatik.uni-hamburg.de wrote: I'm having trouble with nmbug, I did follow the instructions in this mail and in the wiki, but nmbug never adds tags to my notmuch database (it is supposed

Re: [afew] announcing afew, an universal tagging solution with some fancy features

2012-01-20 Thread Justus Winter
Quoting Patrick Totzke (2012-01-20 11:40:41) Quoting Justus Winter (2011-12-21 08:53:23) Hey Pazz, Quoting Patrick Totzke (2011-12-19 19:17:12) Also, should i not get some output when calling afew with -vv ? Yes you should ;). Here's an example run on my box: Alright, I do get logging output

Re: [afew] announcing afew, an universal tagging solution with some fancy features

2012-01-20 Thread Justus Winter
Quoting Kazuo Teramoto (2012-01-20 22:55:08) On Fri, Jan 20, 2012 at 12:26:05PM +0100, Justus Winter wrote: Quoting Patrick Totzke (2012-01-20 11:40:41) I suspect you don't split the config value and thus afew ended up with a false tag new;. its just cosmetics but nevertheless.. Hm, actually

heads up from the python front

2012-01-21 Thread Justus Winter
Hey everyone :) after getting to know nmbug a little better (it's actually very nice to track bugs and patches this way...) I did some work on the python bindings. tl;dr version: housekeeping, python3.2 support, fixed nasty bug. I familiarized myself with nmbug and went through all the threads

[PATCH] python: fix error handling

2012-01-22 Thread Justus Winter
Before 3434d1940 the return values of libnotmuch functions were declared as c_void_p and the code checking for errors compared the returned value to None, which is the ctypes equivalent of a NULL pointer. But said commit wrapped all the data types in python classes and the semantic changed in a

[PATCH] Add a NEWS section for 0.11.1 and document the python error handling bugfix

2012-01-23 Thread Justus Winter
--- NEWS | 14 ++ 1 files changed, 14 insertions(+), 0 deletions(-) diff --git a/NEWS b/NEWS index bf21e64..3d2c2a8 100644 --- a/NEWS +++ b/NEWS @@ -1,3 +1,17 @@ +Notmuch 0.11.1 (2012-mm-dd) +=== + +Bug-fix release. + + +Fix error handling in

[PATCH 1/3] NEWS: add entry for python error handling fix

2012-01-29 Thread Justus Winter
Signed-off-by: Justus Winter 4win...@informatik.uni-hamburg.de --- NEWS | 10 ++ 1 files changed, 10 insertions(+), 0 deletions(-) diff --git a/NEWS b/NEWS index 2acdce5..bee6f2e 100644 --- a/NEWS +++ b/NEWS @@ -47,6 +47,16 @@ New functions notmuch_query_add_tag_exclude supports

[PATCH 2/3] NEWS: add entry for python 3.2 compatibility

2012-01-29 Thread Justus Winter
Signed-off-by: Justus Winter 4win...@informatik.uni-hamburg.de --- NEWS |4 1 files changed, 4 insertions(+), 0 deletions(-) diff --git a/NEWS b/NEWS index bee6f2e..71644ff 100644 --- a/NEWS +++ b/NEWS @@ -57,6 +57,10 @@ Fix error handling in python bindings. exceptions to indicate

error handling and stderr

2012-01-29 Thread Justus Winter
Hi notmuch developers, currently there is no way to determine why opening a database using notmuch_database_open fails. I suppose that this is a problem for all functions returning a pointer, but it is especially problematic for this function since one cannot distinguish between a temporary

Prevent segmentation fault in notmuch_database_close

2012-02-18 Thread Justus Winter
I've seen some segmentation faults lately again and rechecked the python bindings and while I actually found and fixed some error handling issues I overlooked last time, I think I also found a bug in notmuch_database_close. The problem can easily be reproduced with the following program: ~~~

[PATCH] Prevent segmentation fault in notmuch_database_close

2012-02-18 Thread Justus Winter
the xapian database object has actually been created before trying to call its flush method. Signed-off-by: Justus Winter 4win...@informatik.uni-hamburg.de --- lib/database.cc |3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/lib/database.cc b/lib/database.cc index c928d02

notmuch as a shared object aka library knigge

2012-02-20 Thread Justus Winter
Hi fellow notmuchrs, while going through the python bindings I recently came across the following note in the documentation for the Database.get_directory function [0]: ~~~ snip ~~~ Warning This call needs a writable database in Database.MODE.READ_WRITE mode. The underlying library will exit

Re: nomuch_addresses.py

2012-02-21 Thread Justus Winter
Quoting Daniel Schoepe (2012-02-17 02:28:52) [emphasis mine]: Just for completeness: I'm using the nice nottoomuch-addresses.pl script [1] by Tomi Ollila *which doesn't require any bindings* and is incredibly fast (after generating an initial address database). I don't get it. The perl script

Re: notmuch as a shared object aka library knigge

2012-02-22 Thread Justus Winter
Quoting Austin Clements (2012-02-21 16:53:12) Quoth Justus Winter on Feb 21 at 1:29 am: Hi fellow notmuchrs, while going through the python bindings I recently came across the following note in the documentation for the Database.get_directory function [0]: ~~~ snip ~~~ Warning

[PATCH 2/2] NEWS: add entry for the improved unicode handling in the python bindings

2012-02-22 Thread Justus Winter
Signed-off-by: Justus Winter 4win...@informatik.uni-hamburg.de --- NEWS |6 ++ 1 files changed, 6 insertions(+), 0 deletions(-) diff --git a/NEWS b/NEWS index 403a310..af5e9ea 100644 --- a/NEWS +++ b/NEWS @@ -78,6 +78,12 @@ Python 3.2 compatibility The python bindings are now

Re: notmuch as a shared object aka library knigge

2012-02-23 Thread Justus Winter
Quoting Justus Winter (2012-02-22 16:17:45) Quoting Austin Clements (2012-02-21 16:53:12) As always, patches welcome! Well, hacking on c code in my free time is not my idea of fun and I'm not familiar with the code base, so I'd appreciate it if someone who is in a better position to whip up

Re: notmuch as a shared object aka library knigge

2012-02-23 Thread Justus Winter
Quoting David Bremner (2012-02-24 01:29:36) On Thu, 23 Feb 2012 23:22:00 +0100, Justus Winter 4win...@informatik.uni-hamburg.de wrote: That wasn't meant to sound as harsh as it probably did. I seriously hope that someone is around who enjoys to hack on the c/c++ part of the library

fix notmuch_database_close

2012-02-29 Thread Justus Winter
Pazz mentioned a problem wrt reopening a notmuch database immediately after it has been closed. The problem can be reproduced with this test case: ~~~ snip ~~~ import os import notmuch db_path = os.path.expanduser('~/Maildir') for i in range(2): with notmuch.Database(db_path,

[PATCH] Actually close the xapian database in notmuch_database_close

2012-02-29 Thread Justus Winter
Formerly the xapian database object was deleted and closed in its destructor once the object was garbage collected. Explicitly call close() so that the database and the associated lock is released immediately. Signed-off-by: Justus Winter 4win...@informatik.uni-hamburg.de --- lib/database.cc

Re: [PATCH] Actually close the xapian database in notmuch_database_close

2012-02-29 Thread Justus Winter
: Quoth Justus Winter on Feb 29 at 10:19 am: Formerly the xapian database object was deleted and closed in its destructor once the object was garbage collected. Explicitly call close() so that the database and the associated lock is released immediately. Interesting. Is this a bug

[PATCH] Actually close the xapian database in notmuch_database_close

2012-03-02 Thread Justus Winter
Formerly the xapian database object was deleted and closed in its destructor once the object was garbage collected. Explicitly call close() so that the database and the associated lock is released immediately. The comment is a courtesy of Austin Clements. Signed-off-by: Justus Winter 4win

[rfc] autotools compatibility and Hurd as platform

2012-03-03 Thread Justus Winter
I made two tiny patches to enable notmuch to be built on the Hurd, the first one is straight forward, it just adds GNU as a platform and reuses the settings for Linux. The second one deals with the problem that the value passed as an argument to --build is not a triple but a tuple: %

[PATCH 1/2] Add GNU as a valid platform

2012-03-03 Thread Justus Winter
Signed-off-by: Justus Winter 4win...@informatik.uni-hamburg.de --- configure |6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/configure b/configure index 8b85b9d..77203ed 100755 --- a/configure +++ b/configure @@ -362,9 +362,9 @@ elif [ $uname = SunOS

[PATCH 2/2] Use autotools config.sub for --host and --build parsing

2012-03-03 Thread Justus Winter
This introduces a build dependency on autotools, update debian/control accordingly. Signed-off-by: Justus Winter 4win...@informatik.uni-hamburg.de --- configure | 28 ++-- debian/control |1 + 2 files changed, 7 insertions(+), 22 deletions(-) diff --git

[PATCH 1/2] Add GNU as a valid platform

2012-03-05 Thread Justus Winter
Signed-off-by: Justus Winter 4win...@informatik.uni-hamburg.de --- configure |6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/configure b/configure index 8b85b9d..77203ed 100755 --- a/configure +++ b/configure @@ -362,9 +362,9 @@ elif [ $uname = SunOS

[PATCH 2/2] Do not try to parse the options for --build and --host arguments

2012-03-05 Thread Justus Winter
. Signed-off-by: Justus Winter 4win...@informatik.uni-hamburg.de --- configure | 32 ++-- 1 files changed, 2 insertions(+), 30 deletions(-) diff --git a/configure b/configure index 77203ed..ca30482 100755 --- a/configure +++ b/configure @@ -171,37 +171,9 @@ for option; do

tiny and obviously correct (tm) fix for 0.12

2012-03-16 Thread Justus Winter
I've been going through the bindings lately and have some stuff in the pipeline that has to wait until 0.12 is out, but I've noticed two small and obvious errors I made when I annotated all the wrapped libnotmuch functions. The following patch addresses this problem and since it's a really small

[PATCH] python: fix signature of two wrapped libnotmuch functions

2012-03-16 Thread Justus Winter
Signed-off-by: Justus Winter 4win...@informatik.uni-hamburg.de --- bindings/python/notmuch/directory.py |2 +- bindings/python/notmuch/threads.py |2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/bindings/python/notmuch/directory.py b/bindings/python/notmuch

Fix error reporting in notmuch_database_find_message_by_filename

2012-03-17 Thread Justus Winter
while valgrinding a crashing python process I noticed that the error handling in notmuch_database_find_message_by_filename does not work as advertised in the documentation. I'd love to see this in the 0.12 release ;) Justus ___ notmuch mailing list

[PATCH] Fix error reporting in notmuch_database_find_message_by_filename

2012-03-17 Thread Justus Winter
Formerly it was possible for *message_ret to be left uninitialized. The documentation however clearly states that [o]n any failure or when the message is not found, this function initializes '*message' to NULL. Signed-off-by: Justus Winter 4win...@informatik.uni-hamburg.de --- lib/database.cc

[RFC] Split notmuch_database_close into two functions

2012-03-20 Thread Justus Winter
I propose to split the function notmuch_database_close into notmuch_database_close and notmuch_database_destroy so that long running processes like alot can close the database while still using data obtained from queries to that database. I've updated the tools, the go, ruby and python bindings

[PATCH 2/7] NEWS: Document the notmuch_database_close split

2012-03-20 Thread Justus Winter
Signed-off-by: Justus Winter 4win...@informatik.uni-hamburg.de --- NEWS | 12 1 files changed, 12 insertions(+), 0 deletions(-) diff --git a/NEWS b/NEWS index ed5e3c5..26fce67 100644 --- a/NEWS +++ b/NEWS @@ -52,6 +52,18 @@ Reply improvement using the JSON format reply body

[PATCH 3/7] Use notmuch_database_destroy instead of notmuch_database_close

2012-03-20 Thread Justus Winter
Adapt the notmuch binaries source to the notmuch_database_close split. Signed-off-by: Justus Winter 4win...@informatik.uni-hamburg.de --- notmuch-count.c |2 +- notmuch-dump.c|2 +- notmuch-new.c |2 +- notmuch-reply.c |2 +- notmuch-restore.c |2 +- notmuch

[PATCH 1/7] Split notmuch_database_close into two functions

2012-03-20 Thread Justus Winter
database and thus release the lock associated with it without destroying the data structures obtained from it. This also makes the api more consistent since every other data structure has a destructor function. Signed-off-by: Justus Winter 4win...@informatik.uni-hamburg.de --- lib/database.cc

[PATCH 4/7] Use notmuch_database_destroy instead of notmuch_database_close

2012-03-20 Thread Justus Winter
Adapt notmuch-deliver to the notmuch_database_close split. Signed-off-by: Justus Winter 4win...@informatik.uni-hamburg.de --- contrib/notmuch-deliver/src/main.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/contrib/notmuch-deliver/src/main.c b/contrib/notmuch-deliver

[PATCH 5/7] go: Use notmuch_database_destroy instead of notmuch_database_close

2012-03-20 Thread Justus Winter
Adapt the go bindings to the notmuch_database_close split. Signed-off-by: Justus Winter 4win...@informatik.uni-hamburg.de --- bindings/go/pkg/notmuch.go |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/bindings/go/pkg/notmuch.go b/bindings/go/pkg/notmuch.go index

[PATCH 6/7] ruby: Use notmuch_database_destroy instead of notmuch_database_close

2012-03-20 Thread Justus Winter
Adapt the ruby bindings to the notmuch_database_close split. Signed-off-by: Justus Winter 4win...@informatik.uni-hamburg.de --- bindings/ruby/database.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/bindings/ruby/database.c b/bindings/ruby/database.c index 982fd59

[PATCH 7/7] python: wrap and use notmuch_database_destroy as destructor

2012-03-20 Thread Justus Winter
Adapt the go bindings to the notmuch_database_close split. Signed-off-by: Justus Winter 4win...@informatik.uni-hamburg.de --- bindings/python/notmuch/database.py | 17 +++-- 1 files changed, 15 insertions(+), 2 deletions(-) diff --git a/bindings/python/notmuch/database.py b

Re: [RFC] Split notmuch_database_close into two functions

2012-03-27 Thread Justus Winter
You're right of course, updated patch sent as a follow up. Justus ___ notmuch mailing list notmuch@notmuchmail.org http://notmuchmail.org/mailman/listinfo/notmuch

[PATCH 1/7] Split notmuch_database_close into two functions

2012-03-27 Thread Justus Winter
database and thus release the lock associated with it without destroying the data structures obtained from it. This also makes the api more consistent since every other data structure has a destructor function. Signed-off-by: Justus Winter 4win...@informatik.uni-hamburg.de --- lib/database.cc

Re: [RFC] Split notmuch_database_close into two functions

2012-04-12 Thread Justus Winter
Quoting Austin Clements (2012-04-01 05:23:23) Quoth Justus Winter on Mar 21 at 1:55 am: I propose to split the function notmuch_database_close into notmuch_database_close and notmuch_database_destroy so that long running processes like alot can close the database while still using data

Re: incrontab?

2012-04-12 Thread Justus Winter
Hi David, Quoting David Belohrad (2012-04-12 10:25:45) Dear All, is somebody using incrontab to issue 'notmuch new'? I've tried but with only partial success. I have setup incrotab to run 'notmuch new' when something changes in my Maildir. However it is not reliable. E.g. sometimes it works out

Re: [RFC] Split notmuch_database_close into two functions

2012-04-12 Thread Justus Winter
Quoting Austin Clements (2012-04-12 18:57:44) Quoth Justus Winter on Apr 12 at 11:05 am: Quoting Austin Clements (2012-04-01 05:23:23) Quoth Justus Winter on Mar 21 at 1:55 am: I propose to split the function notmuch_database_close into notmuch_database_close and notmuch_database_destroy so

Re: some stale patches dropped from the review queue

2012-04-16 Thread Justus Winter
Hi Jani, thanks for your efforts. id:1316999137-28257-8-git-send-email-4win...@informatik.uni-hamburg.de That one is obsolete. Justus ___ notmuch mailing list notmuch@notmuchmail.org http://notmuchmail.org/mailman/listinfo/notmuch

Re: [PATCH 7/7] python: wrap and use notmuch_database_destroy as destructor

2012-04-22 Thread Justus Winter
Quoting Austin Clements (2012-04-12 19:02:49) Quoth Justus Winter on Mar 21 at 1:55 am: Adapt the go bindings to the notmuch_database_close split. Typo. Duh , Signed-off-by: Justus Winter 4win...@informatik.uni-hamburg.de --- bindings/python/notmuch/database.py | 17

[PATCH 1/7] Split notmuch_database_close into two functions

2012-04-22 Thread Justus Winter
database and thus release the lock associated with it without destroying the data structures obtained from it. This also makes the api more consistent since every other data structure has a destructor function. Signed-off-by: Justus Winter 4win...@informatik.uni-hamburg.de --- lib/database.cc

[PATCH 2/7] NEWS: Document the notmuch_database_close split

2012-04-22 Thread Justus Winter
Signed-off-by: Justus Winter 4win...@informatik.uni-hamburg.de --- NEWS | 12 1 file changed, 12 insertions(+) diff --git a/NEWS b/NEWS index c1704e0..a2cd080 100644 --- a/NEWS +++ b/NEWS @@ -73,6 +73,18 @@ leaving Mutt. notmuch-mutt, formerly distributed under the name mutt

[PATCH 4/7] Use notmuch_database_destroy instead of notmuch_database_close

2012-04-22 Thread Justus Winter
Adapt notmuch-deliver to the notmuch_database_close split. Signed-off-by: Justus Winter 4win...@informatik.uni-hamburg.de --- contrib/notmuch-deliver/src/main.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contrib/notmuch-deliver/src/main.c b/contrib/notmuch-deliver

[PATCH 3/7] Use notmuch_database_destroy instead of notmuch_database_close

2012-04-22 Thread Justus Winter
Adapt the notmuch binaries source to the notmuch_database_close split. Signed-off-by: Justus Winter 4win...@informatik.uni-hamburg.de --- notmuch-count.c |2 +- notmuch-dump.c|2 +- notmuch-new.c |2 +- notmuch-reply.c |2 +- notmuch-restore.c |2 +- notmuch

[PATCH 6/7] ruby: Use notmuch_database_destroy instead of notmuch_database_close

2012-04-22 Thread Justus Winter
Adapt the ruby bindings to the notmuch_database_close split. Signed-off-by: Justus Winter 4win...@informatik.uni-hamburg.de --- bindings/ruby/database.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bindings/ruby/database.c b/bindings/ruby/database.c index 982fd59

[PATCH 5/7] go: Use notmuch_database_destroy instead of notmuch_database_close

2012-04-22 Thread Justus Winter
Adapt the go bindings to the notmuch_database_close split. Signed-off-by: Justus Winter 4win...@informatik.uni-hamburg.de --- bindings/go/pkg/notmuch.go |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bindings/go/pkg/notmuch.go b/bindings/go/pkg/notmuch.go index

[PATCH 7/7] python: wrap and use notmuch_database_destroy as destructor

2012-04-22 Thread Justus Winter
Adapt the python bindings to the notmuch_database_close split. Signed-off-by: Justus Winter 4win...@informatik.uni-hamburg.de --- bindings/python/notmuch/database.py | 14 ++ 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/bindings/python/notmuch/database.py b

Re: [PATCH 6/7] ruby: Use notmuch_database_destroy instead of notmuch_database_close

2012-04-23 Thread Justus Winter
Quoting Felipe Contreras (2012-04-23 14:36:33) I don't think this is the right approach. If database_destroy truly destroys the object, then we would want to do it only at garbage collection, when it's not accessible any more. What if I want to re-use the database from the Ruby code? This

[PATCH 1/7] Split notmuch_database_close into two functions

2012-04-25 Thread Justus Winter
database and thus release the lock associated with it without destroying the data structures obtained from it. This also makes the api more consistent since every other data structure has a destructor function. The comments in notmuch.h are a courtesy of Austin Clements. Signed-off-by: Justus

Re: [PATCH] go: Update to the current notmuch_database_find_message API

2012-04-30 Thread Justus Winter
Quoting David Bremner (2012-04-30 13:53:47) Austin Clements amdra...@mit.edu writes: The signature of notmuch_database_find_message was changed in 02a30767 to report errors and the Go bindings were never updated. This brings the Go bindings in sync with that change and at least makes

[PATCH 2/5] go: set LDFLAGS, fix include directive

2012-04-30 Thread Justus Winter
Signed-off-by: Justus Winter 4win...@informatik.uni-hamburg.de --- bindings/go/src/notmuch/notmuch.go |4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/bindings/go/src/notmuch/notmuch.go b/bindings/go/src/notmuch/notmuch.go index de9de23..524c956 100644 --- a/bindings/go

[PATCH 3/5] go: update the addrlookup utility to go 1

2012-04-30 Thread Justus Winter
Signed-off-by: Justus Winter 4win...@informatik.uni-hamburg.de --- bindings/go/src/notmuch-addrlookup/addrlookup.go |6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/bindings/go/src/notmuch-addrlookup/addrlookup.go b/bindings/go/src/notmuch-addrlookup/addrlookup.go

[PATCH 4/5] go: update the build system

2012-04-30 Thread Justus Winter
Signed-off-by: Justus Winter 4win...@informatik.uni-hamburg.de --- bindings/go/Makefile | 51 ++--- bindings/go/cmds/Makefile | 11 -- bindings/go/pkg/Makefile | 17 --- 3 files changed, 30 insertions(+), 49 deletions

  1   2   3   4   >