[notmuch] Indexing without files and directories

2010-01-27 Thread Simon Cozens
Hi all,
I don't want to throw a spanner in the works, but I am intending to use
notmuch for indexing in a scenario where the email doesn't hit the disk
- the notmuch model seems to rely pretty heavily on directories and
files but I'm working with email being delivered to a script for
indexing and then stored into a database. So far I've been hacking it by
feeding "/dev/stdin" as a filename but that leads to interesting fun
when I forget and try to access something via a notmuch_message object.
With all this talk of a new object store, can I put in a plea for - at
least at the API level - some way of indexing based on a user-defined
location identifier? (In my case, a database row ID.)

Thanks,
Simon


[notmuch] Indexing without files and directories

2010-01-27 Thread Simon Cozens
Hi all,
I don't want to throw a spanner in the works, but I am intending to use
notmuch for indexing in a scenario where the email doesn't hit the disk
- the notmuch model seems to rely pretty heavily on directories and
files but I'm working with email being delivered to a script for
indexing and then stored into a database. So far I've been hacking it by
feeding "/dev/stdin" as a filename but that leads to interesting fun
when I forget and try to access something via a notmuch_message object.
With all this talk of a new object store, can I put in a plea for - at
least at the API level - some way of indexing based on a user-defined
location identifier? (In my case, a database row ID.)

Thanks,
Simon
___
notmuch mailing list
notmuch@notmuchmail.org
http://notmuchmail.org/mailman/listinfo/notmuch


[notmuch] [PATCH] Mail::Notmuch Perl wrapper

2010-01-26 Thread Simon Cozens
On 26/01/2010 03:30, Ben Gamari wrote:
> I know practically nothing about writing Perl bindings,

I recommend http://www.manning.com/jenness/ ;)

> but it seems
> like this might be work better left to a bindings generator. I currently
> have a patch which enables binding generation through SWIG. It works
> well, although SWIG unfortunately doesn't have very good support for
> exposing object-oriented C interfaces like notmuchs' through the target
> language's type system.

Yes, this is why I chose not to use SWIG: if I'm going to automatically
get code that doesn't do what I want and then have to manually write
code that does, why not just manually write code that does? (well,
semi-manually: xsubpp extracted all the function signatures for me.)

I guess the advantage of SWIG is that it gets you code that you don't
want in many different languages.

Anyway, whichever way you do it, you'll still need the class
documentation and the tests - feel free to take them from my patch if
you end up going the SWIG route for Perl.

Simon


Re: [notmuch] [PATCH] Mail::Notmuch Perl wrapper

2010-01-26 Thread Simon Cozens
On 26/01/2010 03:30, Ben Gamari wrote:
> I know practically nothing about writing Perl bindings,

I recommend http://www.manning.com/jenness/ ;)

> but it seems
> like this might be work better left to a bindings generator. I currently
> have a patch which enables binding generation through SWIG. It works
> well, although SWIG unfortunately doesn't have very good support for
> exposing object-oriented C interfaces like notmuchs' through the target
> language's type system.

Yes, this is why I chose not to use SWIG: if I'm going to automatically
get code that doesn't do what I want and then have to manually write
code that does, why not just manually write code that does? (well,
semi-manually: xsubpp extracted all the function signatures for me.)

I guess the advantage of SWIG is that it gets you code that you don't
want in many different languages.

Anyway, whichever way you do it, you'll still need the class
documentation and the tests - feel free to take them from my patch if
you end up going the SWIG route for Perl.

Simon
___
notmuch mailing list
notmuch@notmuchmail.org
http://notmuchmail.org/mailman/listinfo/notmuch


[notmuch] [PATCH] Mail::Notmuch Perl wrapper

2010-01-25 Thread Simon Cozens
(Resent with compressed patch)

Hi there,
Here's a Perl library, Mail::Notmuch, which wraps the notmuch library.
I've attached it because it's pretty huge. It requires you to
build notmuch as a shared library - there's a patch on the mailing list
earlier which does that.
Notmuch else to say, really. Enjoy.

Simon
-- next part --
A non-text attachment was scrubbed...
Name: Mail-Notmuch-perl.patch.gz
Type: application/x-gzip
Size: 55832 bytes
Desc: not available
URL: