gmail syncing sort of working

2011-09-05 Thread David Bremner
On Wed, 17 Aug 2011 19:31:36 -0700, Alex Botero-Lowry  wrote:
> p.s. I also ran into an issue with the notmuch python bindings where I had
> to wrap every c_void_p in POINTER() or it would segfault for any method that
> tried to use a pointer. Also the sed command that tries to build notmuch.sym
> doesn't work on freebsd, i changed it to work, but i'm pretty sure it won't
> work on linux anymore. :) I wonder if using ctags might actually work for
> that.

Please test current git master on freebsd for issues with building
notmuch.sym, there are several BSD oriented fixes lately.

I don't know ctags well, but I would be surprised if it can do the hairy
stuff with exceptions that we seem to need.

d


Re: gmail syncing sort of working

2011-09-05 Thread David Bremner
On Wed, 17 Aug 2011 19:31:36 -0700, Alex Botero-Lowry 
alex.boterolo...@gmail.com wrote:
 p.s. I also ran into an issue with the notmuch python bindings where I had
 to wrap every c_void_p in POINTER() or it would segfault for any method that
 tried to use a pointer. Also the sed command that tries to build notmuch.sym
 doesn't work on freebsd, i changed it to work, but i'm pretty sure it won't
 work on linux anymore. :) I wonder if using ctags might actually work for
 that.

Please test current git master on freebsd for issues with building
notmuch.sym, there are several BSD oriented fixes lately.

I don't know ctags well, but I would be surprised if it can do the hairy
stuff with exceptions that we seem to need.

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


gmail syncing sort of working

2011-08-18 Thread Sebastian Spaeth
On Wed, 17 Aug 2011 19:31:36 -0700, Alex Botero-Lowry  wrote:
> p.s. I also ran into an issue with the notmuch python bindings where I had
> to wrap every c_void_p in POINTER() or it would segfault for any method that
> tried to use a pointer. Also the sed command that tries to build notmuch.sym
> doesn't work on freebsd, i changed it to work, but i'm pretty sure it won't
> work on linux anymore. :) I wonder if using ctags might actually work for
> that.

Can someone with experience on python's ctypes comment on that? I read
the terse documentation and tutorial on ctypes, and it doesn't say that
one shouldn't be able to use c_void_p as a pointer, and it doesn't
really say how using POINTER could change things (it seems to create a
new pointer type, but I fail to see why that should help?)

That having said, if you provide a patch, I'll be applying it if it
fixes things.

Sebastian
-- next part --
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: not available
URL: 



Re: gmail syncing sort of working

2011-08-18 Thread Sebastian Spaeth
On Wed, 17 Aug 2011 19:31:36 -0700, Alex Botero-Lowry 
alex.boterolo...@gmail.com wrote:
 p.s. I also ran into an issue with the notmuch python bindings where I had
 to wrap every c_void_p in POINTER() or it would segfault for any method that
 tried to use a pointer. Also the sed command that tries to build notmuch.sym
 doesn't work on freebsd, i changed it to work, but i'm pretty sure it won't
 work on linux anymore. :) I wonder if using ctags might actually work for
 that.

Can someone with experience on python's ctypes comment on that? I read
the terse documentation and tutorial on ctypes, and it doesn't say that
one shouldn't be able to use c_void_p as a pointer, and it doesn't
really say how using POINTER could change things (it seems to create a
new pointer type, but I fail to see why that should help?)

That having said, if you provide a patch, I'll be applying it if it
fixes things.

Sebastian


pgpk5SLtfWL44.pgp
Description: PGP signature
___
notmuch mailing list
notmuch@notmuchmail.org
http://notmuchmail.org/mailman/listinfo/notmuch


gmail syncing sort of working

2011-08-17 Thread Alex Botero-Lowry
I finally got around to working on it and over the last two days have gotten
two-way gmail syncing with labels working.

The list of caveats is much longer than the list of details:

1) only tested with 100 messages, which is hard coded
2) doesn't update UIDs of messages on disk, though it mostly avoids
situations where that would be an issue
3) Can only do a full, scan every file sync, but it assumes that message
content is immutable so only adds new messages
4) Doesn't support syncing new/deleted messages from notmuch -> gmail (not
sure this is worth the trouble)
5) Quoting issues, i'm sure.


The basic approach is to get the difference between a the last sync and the
current notmuch state, sync the diff of labels to gmail, than we request
UID, X-GM-MSGID, Message-ID, and X-GM-LABELS from gmail for every message,
if it lacks a message-id we build a notmuch-sha1- one, hopefully that
approach won't change, we then write new messages to disk by using the
filename GMID=...,UID= to store that information, and then sync the
labels (with a mapping for special labels like sent, etc), then we look for
messages that have changed in gmail but not changed locally, and sync their
labels.

I'm sure it won't work for you, but you might try it. :)

source is at http://alexbl.net/~alexbl/imapsync.py

p.s. I also ran into an issue with the notmuch python bindings where I had
to wrap every c_void_p in POINTER() or it would segfault for any method that
tried to use a pointer. Also the sed command that tries to build notmuch.sym
doesn't work on freebsd, i changed it to work, but i'm pretty sure it won't
work on linux anymore. :) I wonder if using ctags might actually work for
that.

alex
-- next part --
An HTML attachment was scrubbed...
URL: 



gmail syncing sort of working

2011-08-17 Thread Alex Botero-Lowry
I finally got around to working on it and over the last two days have gotten
two-way gmail syncing with labels working.

The list of caveats is much longer than the list of details:

1) only tested with 100 messages, which is hard coded
2) doesn't update UIDs of messages on disk, though it mostly avoids
situations where that would be an issue
3) Can only do a full, scan every file sync, but it assumes that message
content is immutable so only adds new messages
4) Doesn't support syncing new/deleted messages from notmuch - gmail (not
sure this is worth the trouble)
5) Quoting issues, i'm sure.


The basic approach is to get the difference between a the last sync and the
current notmuch state, sync the diff of labels to gmail, than we request
UID, X-GM-MSGID, Message-ID, and X-GM-LABELS from gmail for every message,
if it lacks a message-id we build a notmuch-sha1- one, hopefully that
approach won't change, we then write new messages to disk by using the
filename GMID=...,UID= to store that information, and then sync the
labels (with a mapping for special labels like sent, etc), then we look for
messages that have changed in gmail but not changed locally, and sync their
labels.

I'm sure it won't work for you, but you might try it. :)

source is at http://alexbl.net/~alexbl/imapsync.py

p.s. I also ran into an issue with the notmuch python bindings where I had
to wrap every c_void_p in POINTER() or it would segfault for any method that
tried to use a pointer. Also the sed command that tries to build notmuch.sym
doesn't work on freebsd, i changed it to work, but i'm pretty sure it won't
work on linux anymore. :) I wonder if using ctags might actually work for
that.

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