Re: notmuch version/Python bindings

2017-02-21 Thread Sebastian Spaeth
lse a clue? Sebastian Spaeth -- Sent from my mobile phone. Please excuse brevity. Am 18. Februar 2017 16:14:49 MEZ schrieb David Bremner <da...@tethera.net>: >Sebastian Spaeth <sebast...@sspaeth.de> writes: > >> Hi there, I did stop using notmuch, true. Let me know if I s

Re: notmuch version/Python bindings

2017-02-16 Thread Sebastian Spaeth
Hi there, I did stop using notmuch, true. Let me know if I should hand over administration or if I shouldnsimply delete the package on pypi. Sebastian -- Sent from my mobile phone. Please excuse brevity. Am 16. Februar 2017 18:00:33 MEZ schrieb David Bremner : >Aryeh Leib

notmuch.readthedocs.org

2014-11-18 Thread Sebastian Spaeth
Am 16.11.2014 20:00, schrieb Ben Gamari: > David Bremner writes: > >> It seems that this site has bitrotted. I hit the build button and it >> now builds the CLI docs instead of the python bindings. I assume since >> Sebastian has moved on from maintaining the bindings he's also not >>

Re: notmuch.readthedocs.org

2014-11-18 Thread Sebastian Spaeth
Am 16.11.2014 20:00, schrieb Ben Gamari: David Bremner da...@tethera.net writes: It seems that this site has bitrotted. I hit the build button and it now builds the CLI docs instead of the python bindings. I assume since Sebastian has moved on from maintaining the bindings he's also not

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

2012-04-21 Thread Sebastian Spaeth
Austin Clements amdra...@mit.edu writes: (I think it also doesn't make sense to expose notmuch_database_destroy as a general, public method since it will free all of the other C objects out from under the bindings, resulting in exactly the double free-type crashes that you're trying to avoid.

notmuch-poll and OfflineIMAP

2012-04-09 Thread Sebastian Spaeth
Adam Wolfe Gordon wrote: > >I run offlineimap in autorefresh mode (with IDLE too, actually) and >use a script based on inotify to update notmuch whenever new mail >comes in: https://gist.github.com/1952483 . It sounds like some >variant of this would probably work for you.

Message deletion wisdom

2012-04-09 Thread Sebastian Spaeth
Jameson Graef Rollins wrote: >So in summary, if you would like to "delete" messages, you can: > > * add a key binding to emacs (or your favorite ui) to add a "deleted" > tag to messages that you want to delete: > >(define-key notmuch-show-mode-map "d" > (lambda () >

notmuch-poll and OfflineIMAP

2012-04-09 Thread Sebastian Spaeth
Jani Nikula wrote: >Jacek Generowicz writes: > >> Hello, >> >> Would you have any advice on how to construct a notmuch-poll script >> that would work well in concert with OfflineIMAP? In particlular, >how >> can you avoid having to re-issue the IMAP account passwords? >> Any words of wisdom?

Why not tags inside messages?

2012-04-09 Thread Sebastian Spaeth
>On Sat, Apr 7, 2012 at 10:46, David Belohrad wrote: >> I'd love to use notmuch with offline imap ?to work rather on local >copy of >> messages, than using remote notmuch, which is slightly slower due to >> bandwidth limitation of my vdsl line. There is however fundamental >problem >> of syncing

Re: Why not tags inside messages?

2012-04-08 Thread Sebastian Spaeth
On Sat, Apr 7, 2012 at 10:46, David Belohrad da...@belohrad.ch wrote: I'd love to use notmuch with offline imap  to work rather on local copy of messages, than using remote notmuch, which is slightly slower due to bandwidth limitation of my vdsl line. There is however fundamental problem of

Re: notmuch-poll and OfflineIMAP

2012-04-08 Thread Sebastian Spaeth
Jani Nikula j...@nikula.org wrote: Jacek Generowicz jacek.generow...@cern.ch writes: Hello, Would you have any advice on how to construct a notmuch-poll script that would work well in concert with OfflineIMAP? In particlular, how can you avoid having to re-issue the IMAP account passwords?

Re: Message deletion wisdom

2012-04-08 Thread Sebastian Spaeth
Jameson Graef Rollins jroll...@finestructure.net wrote: So in summary, if you would like to delete messages, you can: * add a key binding to emacs (or your favorite ui) to add a deleted tag to messages that you want to delete: (define-key notmuch-show-mode-map d (lambda ()

Re: notmuch-poll and OfflineIMAP

2012-04-08 Thread Sebastian Spaeth
Adam Wolfe Gordon awg+notm...@xvx.ca wrote: I run offlineimap in autorefresh mode (with IDLE too, actually) and use a script based on inotify to update notmuch whenever new mail comes in: https://gist.github.com/1952483 . It sounds like some variant of this would probably work for you. I

nomuch_addresses.py

2012-02-17 Thread Sebastian Spaeth
On Fri, 17 Feb 2012 20:58:50 +0200, Tomi Ollila wrote: > Thank you for promoting my stuff. > > Latest version is 2.0 and name is now nottoomuch-addresses.sh > It is available at: > > http://www.iki.fi/too/nottoomuch/ It would be great to add these things to the notmuch wiki so that people can

Re: nomuch_addresses.py

2012-02-17 Thread Sebastian Spaeth
On Fri, 17 Feb 2012 20:58:50 +0200, Tomi Ollila tomi.oll...@iki.fi wrote: Thank you for promoting my stuff. Latest version is 2.0 and name is now nottoomuch-addresses.sh It is available at: http://www.iki.fi/too/nottoomuch/ It would be great to add these things to the notmuch wiki so that

Info about notmuch database

2012-01-08 Thread Sebastian Spaeth
On Thu, 05 Jan 2012 16:04:22 +0100, Thomas Jost wrote: > There's a description of the DB "schema" in lib/database.cc in the > notmuch source code. But you may also consider just using libnotmuch > instead, if that's enough for what you want to do. > > Also: why Xapian? I'm already using

notmuch git's disk is full! ERROR pushing.

2012-01-08 Thread Sebastian Spaeth
Actually trying to push the above 2 patches, I get Writing objects: 100% (8/8), 1.25 KiB, done. Total 8 (delta 5), reused 0 (delta 0) error: unable to create temporary sha1 filename : No space left on device fatal: failed to write object error: unpack failed: unpack-objects abnormal exit To

[PATCH 2/2] python test "compare message ids"

2012-01-08 Thread Sebastian Spaeth
On Mon, 2 Jan 2012 14:51:27 +, Patrick Totzke wrote: > Introduces a second (trivial) test for the python > bindings that searches for message ids and compares > the output with that of `notmuch search`. Test passes, so it went in. -- next part -- A non-text

[PATCH 1/2] clean up "compare thread ids" python test

2012-01-08 Thread Sebastian Spaeth
On Mon, 2 Jan 2012 14:51:26 +, Patrick Totzke wrote: > This makes the test script open the database in READ_ONLY mode > and use the libraries own sorting methods instead of "sort". +1 I don't want to fudge the tests (I don't know a thing about them), so I can't judge the test outcome, but

Re: [PATCH 1/2] clean up compare thread ids python test

2012-01-08 Thread Sebastian Spaeth
On Mon, 2 Jan 2012 14:51:26 +, Patrick Totzke patricktot...@googlemail.com wrote: This makes the test script open the database in READ_ONLY mode and use the libraries own sorting methods instead of sort. +1 I don't want to fudge the tests (I don't know a thing about them), so I can't

Re: [PATCH 2/2] python test compare message ids

2012-01-08 Thread Sebastian Spaeth
On Mon, 2 Jan 2012 14:51:27 +, Patrick Totzke patricktot...@googlemail.com wrote: Introduces a second (trivial) test for the python bindings that searches for message ids and compares the output with that of `notmuch search`. Test passes, so it went in. pgpOPxhSYny4e.pgp Description:

notmuch git's disk is full! ERROR pushing.

2012-01-08 Thread Sebastian Spaeth
Actually trying to push the above 2 patches, I get Writing objects: 100% (8/8), 1.25 KiB, done. Total 8 (delta 5), reused 0 (delta 0) error: unable to create temporary sha1 filename : No space left on device fatal: failed to write object error: unpack failed: unpack-objects abnormal exit To

Re: Info about notmuch database

2012-01-08 Thread Sebastian Spaeth
On Thu, 05 Jan 2012 16:04:22 +0100, Thomas Jost schno...@schnouki.net wrote: There's a description of the DB schema in lib/database.cc in the notmuch source code. But you may also consider just using libnotmuch instead, if that's enough for what you want to do. Also: why Xapian? I'm already

Re: [PATCH 5/5] python: add get_mtime() to the Message class

2012-01-03 Thread Sebastian Spaeth
On Tue, 13 Dec 2011 18:11:45 +0100, Thomas Jost schno...@schnouki.net wrote: --- bindings/python/notmuch/message.py | 20 1 files changed, 20 insertions(+), 0 deletions(-) The patch looks good, so once this goes into libnotmuch, +1 for also applying this one. Sebastian

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

2012-01-03 Thread Sebastian Spaeth
Happy new year. Pushed patches 1-4 of this series so far. Looking fine, but ugh, the below seems like a rather ugly hack in a function that is probably called quite often. Isn't there a more pretty variant avoiding these sys.version_info checks all over the place? @@ -200,9 +201,9 @@ def

Re: Segmentation fault at gmime-iconv with python binding

2012-01-03 Thread Sebastian Spaeth
On Fri, 30 Dec 2011 10:58:06 -0400, David Bremner da...@tethera.net wrote: On Thu, 29 Dec 2011 22:57:27 -0200, Kazuo Teramoto kaz@gmail.com wrote: notmuch CLI show the message correct. I know nothing about gmime or notmuch code, but can this be the case of the python bindings not

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

2012-01-03 Thread Sebastian Spaeth
On Wed, 21 Dec 2011 14:15:01 +0100, Justus Winter 4win...@informatik.uni-hamburg.de wrote: --- bindings/python/notmuch/message.py | 37 +-- 1 files changed, 26 insertions(+), 11 deletions(-) Pushed pgpV5PET0tvXX.pgp Description: PGP signature

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

2012-01-03 Thread Sebastian Spaeth
On Wed, 21 Dec 2011 14:15:02 +0100, Justus Winter 4win...@informatik.uni-hamburg.de wrote: 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

Python bindings for adoption

2012-01-03 Thread Sebastian Spaeth
Hi all, a happy new year! After a few weeks of notmuch abstinence I am being overwhelmed with 750 new notmuch mails, and I really don't have the time or will (nor does my family approve) to spend enormous amounts of time on notmuch. I am already neglecting offlineimap, which also needs some

Re: [PATCH 1/3] pep8 fixes

2012-01-03 Thread Sebastian Spaeth
On Mon, 5 Dec 2011 21:12:33 +, Patrick Totzke patricktot...@googlemail.com wrote: no changes to the code, only fixed stuff denounced by `pep8 *py` Hi, just tried to apply but it doesn't apply cleanly anymore, can you update the patch to latest master? Sorry for letting this languish for

[PATCH 1/3] pep8 fixes

2012-01-02 Thread Sebastian Spaeth
On Mon, 5 Dec 2011 21:12:33 +, Patrick Totzke wrote: > no changes to the code, only fixed stuff denounced by `pep8 *py` Hi, just tried to apply but it doesn't apply cleanly anymore, can you update the patch to latest master? Sorry for letting this languish for so long. Sebastian

Python bindings for adoption

2012-01-02 Thread Sebastian Spaeth
Hi all, a happy new year! After a few weeks of notmuch abstinence I am being overwhelmed with 750 new notmuch mails, and I really don't have the time or will (nor does my family approve) to spend enormous amounts of time on notmuch. I am already neglecting offlineimap, which also needs some

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

2012-01-02 Thread Sebastian Spaeth
On Wed, 21 Dec 2011 14:15:02 +0100, Justus Winter <4winter at informatik.uni-hamburg.de> wrote: > 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

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

2012-01-02 Thread Sebastian Spaeth
On Wed, 21 Dec 2011 14:15:01 +0100, Justus Winter <4winter at informatik.uni-hamburg.de> wrote: > --- > bindings/python/notmuch/message.py | 37 +-- > 1 files changed, 26 insertions(+), 11 deletions(-) Pushed -- next part -- A non-text

Segmentation fault at gmime-iconv with python binding

2012-01-02 Thread Sebastian Spaeth
On Fri, 30 Dec 2011 10:58:06 -0400, David Bremner wrote: > On Thu, 29 Dec 2011 22:57:27 -0200, Kazuo Teramoto > wrote: > > > notmuch CLI show the message correct. I know nothing about gmime or > > notmuch code, but can this be the case of the python bindings not > > calling g_mime_init()

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

2012-01-02 Thread Sebastian Spaeth
Happy new year. Pushed patches 1-4 of this series so far. Looking fine, but ugh, the below seems like a rather ugly hack in a function that is probably called quite often. Isn't there a more pretty variant avoiding these sys.version_info checks all over the place? > @@ -200,9 +201,9 @@ def

[PATCH 5/5] python: add get_mtime() to the Message class

2012-01-02 Thread Sebastian Spaeth
On Tue, 13 Dec 2011 18:11:45 +0100, Thomas Jost wrote: > --- > bindings/python/notmuch/message.py | 20 > 1 files changed, 20 insertions(+), 0 deletions(-) The patch looks good, so once this goes into libnotmuch, +1 for also applying this one. Sebastian --

[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) -- next part -- A non-text attachment was scrubbed... Name: not

[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

[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:

[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

[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 Sebastian Spaeth
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 to write to it in alot, i get a segfault and the following on stderr: Xapian exception

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 da...@tethera.net wrote: From: David Bremner brem...@debian.org 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

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 patricktot...@googlemail.com 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

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 iterator.

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 ___

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 schno...@schnouki.net 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:

python-notmuch decoding error on a message

2011-12-01 Thread Sebastian Spaeth
On Thu, 24 Nov 2011 12:13:22 -0400, David Bremner wrote: > I get a set of critical errors about forgetting to call g_type_init. > We actually call g_type_init in the CLI now, thanks to Oooh, ahh, I just saw these message on doing 'notmuch.py search "moo"' myself. I would prefer if I (the

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

2011-12-01 Thread Sebastian Spaeth
On Mon, 28 Nov 2011 13:36:44 +0100, Justus Winter wrote: > Well, quoting my commit message: > > > 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

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

2011-12-01 Thread Sebastian Spaeth
On Mon, 28 Nov 2011 13:36:44 +0100, Justus Winter wrote: Well, quoting my commit message: 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

Re: python-notmuch decoding error on a message

2011-12-01 Thread Sebastian Spaeth
On Thu, 24 Nov 2011 12:13:22 -0400, David Bremner da...@tethera.net wrote: I get a set of critical errors about forgetting to call g_type_init. We actually call g_type_init in the CLI now, thanks to Oooh, ahh, I just saw these message on doing 'notmuch.py search moo' myself. I would prefer if

[PATCH] emacs: Use a single buffer invisibility spec to fix quadratic search cost.

2011-11-10 Thread Sebastian Spaeth
On Tue, 8 Nov 2011 21:55:28 -0500, Austin Clements wrote: > emacs/notmuch.el | 11 +++ > 1 files changed, 3 insertions(+), 8 deletions(-) Tested and works great here! +1 for quick inclusion. Sebastian -- next part -- A non-text attachment was scrubbed...

[PATCH] tag: Automatically limit to messages whose tags will actually change.

2011-11-10 Thread Sebastian Spaeth
On Wed, 09 Nov 2011 08:46:02 +, Jani Nikula wrote: > It's unrelated, but looking at the above also made me check something > I've suspected before: notmuch allows you to have empty or zero length > tags "", which is probably not intentional. I had reported already that it is possible to add

Re: [PATCH] emacs: Use a single buffer invisibility spec to fix quadratic search cost.

2011-11-10 Thread Sebastian Spaeth
On Tue, 8 Nov 2011 21:55:28 -0500, Austin Clements amdra...@mit.edu wrote: emacs/notmuch.el | 11 +++ 1 files changed, 3 insertions(+), 8 deletions(-) Tested and works great here! +1 for quick inclusion. Sebastian pgp6PHMdh8uon.pgp Description: PGP signature

[PATCH] tag: Automatically limit to messages whose tags will actually change.

2011-11-08 Thread Sebastian Spaeth
On Mon, 7 Nov 2011 22:55:23 -0500, Austin Clements wrote: > This optimizes the user's tagging query to exclude messages that won't > be affected by the tagging operation, saving computation and IO for > redundant tagging operations. +1 for this! -- next part -- A

Re: [PATCH] tag: Automatically limit to messages whose tags will actually change.

2011-11-08 Thread Sebastian Spaeth
On Mon, 7 Nov 2011 22:55:23 -0500, Austin Clements amdra...@mit.edu wrote: This optimizes the user's tagging query to exclude messages that won't be affected by the tagging operation, saving computation and IO for redundant tagging operations. +1 for this! pgprDeAo5avPx.pgp Description: PGP

python: unpythonic result of Message.get_replies()

2011-11-02 Thread Sebastian Spaeth
On Wed, 05 Oct 2011 03:42:38 +0200, Justus Winter <4winter at informatik.uni-hamburg.de> wrote: Non-text part: multipart/mixed > 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

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

2011-11-02 Thread Sebastian Spaeth
On Mon, 10 Oct 2011 00:12:53 +0200, Justus Winter <4winter at informatik.uni-hamburg.de> wrote: > Signed-off-by: Justus Winter <4winter at informatik.uni-hamburg.de> > --- > bindings/python/notmuch/globals.py | 38 > +++- Hi there, catching up on email, sorry

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

2011-11-02 Thread Sebastian Spaeth
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 there, catching up on email, sorry for the delay.

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

2011-11-02 Thread Sebastian Spaeth
On Wed, 05 Oct 2011 03:42:38 +0200, Justus Winter 4win...@informatik.uni-hamburg.de wrote: Non-text part: multipart/mixed 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

Re: [PATCH] lib: make find_message{,by_filename) report errors

2011-10-06 Thread Sebastian Spaeth
The new API looks sane and much better to me. +1, just give me plenty of time to catch up before releasing once this goes in :-) Sebastian pgpnZQGJSMlVt.pgp Description: PGP signature ___ notmuch mailing list notmuch@notmuchmail.org

Re: [python] can't find shared lib

2011-10-06 Thread Sebastian Spaeth
On Wed, 05 Oct 2011 13:58:14 +0100, Patrick Totzke wrote: I fumbled around with resetting come commits, and it turns out that the problem is in 9e976fc60c40e07cb62a7d656e86ee3101c1b2f5. Once resetted before that, everything works nicely. Thanks for the pointer :) [master 7047975] python:

[python] can't find shared lib

2011-10-05 Thread Sebastian Spaeth
On Wed, 05 Oct 2011 13:58:14 +0100, Patrick Totzke wrote: > I fumbled around with resetting come commits, and it turns out that the > problem is in 9e976fc60c40e07cb62a7d656e86ee3101c1b2f5. Once resetted before > that, > everything works nicely. Thanks for the pointer :) [master 7047975]

[PATCH] lib: make find_message{,by_filename) report errors

2011-10-05 Thread Sebastian Spaeth
The new API looks sane and much better to me. +1, just give me plenty of time to catch up before releasing once this goes in :-) Sebastian -- next part -- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 197 bytes Desc: not

[PATCH] python: fix Message.get_filenames()

2011-10-01 Thread Sebastian Spaeth
On Fri, 30 Sep 2011 12:16:47 +0200, Thomas Jost wrote: > Previously, the Filenames generator only yielded *one* filename before > returning, making Message.get_filenames() behave as Message.get_filename(). > This > commit fixes this incorrect behavior: now the generator yields all the >

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

2011-09-30 Thread Sebastian Spaeth
On Mon, 26 Sep 2011 03:05:35 +0200, Justus Winter <4winter at 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. [master b6a0173] python: provide more

[PATCH v6 00/17] Fix 'notmuch new' atomicity issues

2011-09-30 Thread Sebastian Spaeth
On Thu, 29 Sep 2011 11:01:47 -0400, Austin Clements wrote: > Quoth Sebastian Spaeth on Sep 28 at 6:36 pm: > > db.find_message_by_filename("moo") > > Internal error: Failure to ensure database is writable > > (lib/directory.cc:100). > It appears that looking

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

2011-09-30 Thread Sebastian Spaeth
On Fri, 30 Sep 2011 02:41:02 +0200, Justus Winter <4winter at informatik.uni-hamburg.de> wrote: Non-text part: multipart/mixed > Quoting Sebastian Spaeth (2011-09-29 09:45:38) > >Also, not all "status" are an error, e.g. DuplicateMessageId denotes > >succe

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

2011-09-30 Thread Sebastian Spaeth
On Fri, 30 Sep 2011 03:05:04 +0200, Justus Winter wrote: > Update the docstring from notmuch.h. APPLIED; thanks. -- next part -- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 197 bytes Desc: not available URL:

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

2011-09-30 Thread Sebastian Spaeth
On Fri, 30 Sep 2011 03:05:04 +0200, Justus Winter wrote: Update the docstring from notmuch.h. APPLIED; thanks. pgpa1dmwpeQ1M.pgp Description: PGP signature ___ notmuch mailing list notmuch@notmuchmail.org

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

2011-09-30 Thread Sebastian Spaeth
On Fri, 30 Sep 2011 02:41:02 +0200, Justus Winter 4win...@informatik.uni-hamburg.de wrote: Non-text part: multipart/mixed 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

Re: [PATCH v6 00/17] Fix 'notmuch new' atomicity issues

2011-09-30 Thread Sebastian Spaeth
On Thu, 29 Sep 2011 11:01:47 -0400, Austin Clements amdra...@mit.edu wrote: Quoth Sebastian Spaeth on Sep 28 at 6:36 pm: db.find_message_by_filename(moo) Internal error: Failure to ensure database is writable (lib/directory.cc:100). It appears that looking up a directory requires

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

2011-09-30 Thread Sebastian Spaeth
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. [master b6a0173] python: provide more exception

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

2011-09-29 Thread Sebastian Spaeth
Here goes Justus's reply which he accidentally sent to me only. -- next part -- An embedded message was scrubbed... From: Justus Winter <4win...@informatik.uni-hamburg.de> Subject: Re: [PATCH 1/9] python: add a .gitignore file and refine the toplevel one Date: Thu, 29 Sep

Python bindings doc update

2011-09-29 Thread Sebastian Spaeth
Online docs for current master are updated and as usual online at: http://packages.python.org/notmuch/ Besides some prettifications, the three new functions have been documented. Sebastian -- next part -- A non-text attachment was scrubbed... Name: not available Type:

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

2011-09-29 Thread Sebastian Spaeth
On Mon, 26 Sep 2011 03:05:29 +0200, Justus Winter wrote: P.S. I don't use the bindings myself, and I don't see me using them in the near future. If you are volunteering to take over the binding maintainership, I'd be happy to hand the reign over :-). Sebastian -- next part

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

2011-09-29 Thread Sebastian Spaeth
On Mon, 26 Sep 2011 03:05:29 +0200, Justus Winter wrote: #1) APPLIED #2) APPLIED #3) reorder the arguments of NotmuchError.__init__(): NOT APPLIED The python tutorial gives an example of custom TransitionError with three arguments, a custom message as the third. In addition, a STATUS value is

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

2011-09-29 Thread Sebastian Spaeth
On Mon, 26 Sep 2011 03:05:29 +0200, Justus Winter wrote: #1) APPLIED #2) APPLIED #3) reorder the arguments of NotmuchError.__init__(): NOT APPLIED The python tutorial gives an example of custom TransitionError with three arguments, a custom message as the third. In addition, a STATUS value is

Python bindings doc update

2011-09-29 Thread Sebastian Spaeth
Online docs for current master are updated and as usual online at: http://packages.python.org/notmuch/ Besides some prettifications, the three new functions have been documented. Sebastian pgpOCB1wrCQOh.pgp Description: PGP signature ___ notmuch

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

2011-09-29 Thread Sebastian Spaeth
Here goes Justus's reply which he accidentally sent to me only. ---BeginMessage--- Hey Sebastian, Quoting Sebastian Spaeth (2011-09-29 09:45:38) On Mon, 26 Sep 2011 03:05:29 +0200, Justus Winter wrote: #1) APPLIED #2) APPLIED #4) APPLIED #5#6) APPLIED #9) APPLIED Thanks for the patches, most

[PATCH v6 00/17] Fix 'notmuch new' atomicity issues

2011-09-28 Thread Sebastian Spaeth
On Sat, 11 Jun 2011 16:04:26 -0400, Austin Clements wrote: > Here's the reworked patch series that uses atomic sections more > heavily rather than changing the removal API. This is atomic-new-v6 > on http://awakening.csail.mit.edu/git/notmuch.git . I just caught up implementing

Concerns regarding some library functions

2011-09-28 Thread Sebastian Spaeth
On Tue, 27 Sep 2011 16:25:58 +0300, Ali Polatel wrote: > The two functions I've mentioned above are > notmuch_database_find_message() and > notmuch_database_find_message_by_filename(). > > The problem with their design is NULL return may both mean an error > condition and "message not found".

Rethinking *_destroy()

2011-09-20 Thread Sebastian Spaeth
On Mon, 19 Sep 2011 18:08:22 -0400, Ben Gamari wrote: [...] Just sayin' that from a python perspective, this happen to seem to work fine with the current cpython implementation, but it might well break when switching to pypy or what not. So, given some spare time, I would be happy to move

Re: Rethinking *_destroy()

2011-09-20 Thread Sebastian Spaeth
On Mon, 19 Sep 2011 18:08:22 -0400, Ben Gamari bgamari.f...@gmail.com wrote: [...] Just sayin' that from a python perspective, this happen to seem to work fine with the current cpython implementation, but it might well break when switching to pypy or what not. So, given some spare time, I would

Python Unicode Was: Not much database creation error

2011-09-16 Thread Sebastian Spaeth
P.S. perhaps we should be using: locale.getpreferredencoding() to determine the default path and tag encoding? Opinions, Experiences,...? Sebastian -- next part -- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 197 bytes

Python Unicode Was: Not much database creation error

2011-09-16 Thread Sebastian Spaeth
On Thu, 15 Sep 2011 13:41:11 -0400, Martin Owens wrote: > I've attached a diff for some proposed changes to help make dealing with > unicode and strings in the bindings more regular. I noticed some of the > methods were protected and others were not. I've now pushed a slightly modified version of

Unicode Paths

2011-09-16 Thread Sebastian Spaeth
On Thu, 15 Sep 2011 13:52:12 -0400, Austin Clements wrote: > On Tue, Sep 13, 2011 at 11:55 PM, Martin Owens wrote: > > Hello Again, > > > > I notice in the lib code notmuch_database_open(), > > notmuch_database_create() these functions use const char *path for the > > directory path input. Is

Re: Unicode Paths

2011-09-16 Thread Sebastian Spaeth
On Thu, 15 Sep 2011 13:52:12 -0400, Austin Clements amdra...@mit.edu wrote: On Tue, Sep 13, 2011 at 11:55 PM, Martin Owens docto...@gmail.com wrote: Hello Again, I notice in the lib code notmuch_database_open(), notmuch_database_create() these functions use const char *path for the

Re: Python Unicode Was: Not much database creation error

2011-09-16 Thread Sebastian Spaeth
On Thu, 15 Sep 2011 13:41:11 -0400, Martin Owens wrote: I've attached a diff for some proposed changes to help make dealing with unicode and strings in the bindings more regular. I noticed some of the methods were protected and others were not. I've now pushed a slightly modified version of

Memory management practices

2011-09-12 Thread Sebastian Spaeth
On Fri, 9 Sep 2011 13:53:28 -0400, Austin Clements wrote: > Ah, the *Python* objects don't care, but the underlying C objects do. [...] Thanks for the elaboration. I understand now and agree with the analysis.. > Hence my suggestion that, rather than trying to emulate C-style memory >

Patch: Flush and Reopen

2011-09-12 Thread Sebastian Spaeth
On Sun, 11 Sep 2011 21:04:39 -0400, Martin Owens wrote: > Subject: [PATCH] Add flush and reopen to notmuch database + python bindings. The python parts look fine to me, they certainly have my blessing to go in if the rest is being checked in. Sebastian -- next part -- A

Re: Memory management practices

2011-09-12 Thread Sebastian Spaeth
On Fri, 9 Sep 2011 13:53:28 -0400, Austin Clements amdra...@mit.edu wrote: Ah, the *Python* objects don't care, but the underlying C objects do. [...] Thanks for the elaboration. I understand now and agree with the analysis.. Hence my suggestion that, rather than trying to emulate C-style

Memory management practices

2011-09-09 Thread Sebastian Spaeth
On Thu, 8 Sep 2011 11:15:57 -0400, Austin Clements wrote: > In general, a garbage collector can't make any guarantees about > finalization order. When a collection of objects all become > unreachable simultaneously (for example, the last reference to any > Messages object is dropped, causing the

Re: Memory management practices

2011-09-09 Thread Sebastian Spaeth
On Thu, 8 Sep 2011 11:15:57 -0400, Austin Clements amdra...@mit.edu wrote: In general, a garbage collector can't make any guarantees about finalization order. When a collection of objects all become unreachable simultaneously (for example, the last reference to any Messages object is dropped,

Memory management practices

2011-09-08 Thread Sebastian Spaeth
On Wed, 7 Sep 2011 23:05:19 -0400, Austin Clements wrote: > Sorry, I went back and re-read your earlier messages and now I see why > your references were the way they were. I stand by the rest of my > previous message though. I think the technique used in the Python > bindings only works

Not much database creation error

2011-09-08 Thread Sebastian Spaeth
On Wed, 07 Sep 2011 01:26:59 -0400, Martin Owens wrote: > As a further question, I have a program opening the database for > READ_WRITE access (this process provides a simple write only dbus > interface) and I want clients to connect to notmuch over a read only > connection. > > A problem I'm

[PATCH] Do not import notmuch in setup.py (again).

2011-09-06 Thread Sebastian Spaeth
On Mon, 05 Sep 2011 09:04:54 -0300, David Bremner wrote: > On Wed, 24 Aug 2011 09:20:51 +0200, Sebastian Spaeth wrote > > Ahh, sorry, I must have missed that patch (or forgotten about it). I > > solved this now by having the version number in version.py (which > > cont

Not much database creation error

2011-09-05 Thread Sebastian Spaeth
On Sun, 04 Sep 2011 00:34:58 -0400, Martin Owens wrote: > I am creating a program using notmuch and the python notmuch API and > have found a problem. when creating or loading a database using a > unicode path, notmuch returns an error: > > Error: Cannot create directory //.notmuch: Permission

Re: Not much database creation error

2011-09-05 Thread Sebastian Spaeth
On Sun, 04 Sep 2011 00:34:58 -0400, Martin Owens docto...@gmail.com wrote: I am creating a program using notmuch and the python notmuch API and have found a problem. when creating or loading a database using a unicode path, notmuch returns an error: Error: Cannot create directory //.notmuch:

  1   2   3   4   5   6   7   >