Re: problem with folder: search in python bindings

2011-03-22 Thread Sebastian Spaeth
On Mon, 21 Mar 2011 11:01:24 -0700, Jameson Rollins 
jroll...@finestructure.net wrote:
 Oh good call, Jesse.  Bonus points for you!  That was the problem.  Damn
 it.  In retrospect that's so obvious, though, isn't it!  I had purged
 the notmuch binary package, but had accidentally left libnotmuch1 and
 libnotmuch-dev installed.  Removing those packages and pointing to my
 locally installed libraries fixed the problem.

Pfeww, I was getting very scared that the python bindings have serious
flaws that I am not aware of. Don't ever do that again to me :-).

Glad you could sort it out. Unfortunately it is not easy to tease out
the path of the libnotmuch being used, otherwise we could debug-output
it.

Sebastian


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


Re: problem with folder: search in python bindings

2011-03-22 Thread Jameson Rollins
On Tue, 22 Mar 2011 10:35:17 +0100, Sebastian Spaeth sebast...@sspaeth.de 
wrote:
 Pfeww, I was getting very scared that the python bindings have serious
 flaws that I am not aware of. Don't ever do that again to me :-).

In the future, we should make sure that all new features are included
since the beginning.  That way we'll avoid all future library
incompatibilities.

jamie.


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


Re: problem with folder: search in python bindings

2011-03-21 Thread Sebastian Spaeth
On Thu, 17 Mar 2011 09:19:29 -0700, Jameson Rollins 
jroll...@finestructure.net wrote:
 Hey, Sebastian.  Can you share your notmuch.py script?

No, it's my secret plan for earning my pension :).
You already got it:
http://git.notmuchmail.org/git/notmuch/blob/HEAD:/bindings/python/notmuch.py

Let me know what you find out.

Sebastian


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


Re: problem with folder: search in python bindings

2011-03-21 Thread Jesse Rosenthal

Hmm, I'm getting the same results from the python implementation.

On Mon, 21 Mar 2011 09:32:52 -0700, Jameson Rollins 
jroll...@finestructure.net wrote:
 Any suggestions about how we might go about debugging this?

One thing to try would be to run it step by step in an interactive session. 
I.e.,

 import notmuch as nm
 db = nm.Database(/where/ever/it/is)
 qry = nm.Query(db, folder:sent)

Then, two things to look at. What's the output of

 qry.count_messages()

and what's the output of 

 len(qry.search_messages())

If you're still getting weird results on both, try dumping the search
results into a list

 msgs = [m for m in qry.search_messages()]

and take a look at them. Anything special about those messages?

Best,
Jesse

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


Re: problem with folder: search in python bindings

2011-03-21 Thread Jameson Rollins
On Mon, 21 Mar 2011 12:45:06 -0400, Jesse Rosenthal jrosent...@jhu.edu wrote:
 One thing to try would be to run it step by step in an interactive session. 
 I.e.,

Hey, Jesse.  So I'm getting different results interactively!:

 import notmuch
 db = notmuch.Database(/home/jrollins/.mail)
 query = notmuch.Query(db, folder:sent)
 query.count_messages()
9L
 len(query.search_messages())
9
 

This same search returns 635 results with the binary, 7 results with the
notmuch.py script, and now 9 in this interactive session.  This is going
to be a pain to debug.

  msgs = [m for m in qry.search_messages()]
 
 and take a look at them. Anything special about those messages?

So I'm seeing quite a few strange things here.

 for m in msgs:
... print m.get_message_id()
... print ' ', m.get_filename()
... 
87tyewtobx@gogo.home
  
/home/jrollins/.mail/mailboxes/snapper/new/1300725908.Vfd05I469d8M318600.snapper
871v20bfij@servo.finestructure.net
  
/home/jrollins/.mail/mailboxes/snapper/new/1300725184.Vfd05I469d6M959989.snapper
87y64dk9da@servo.finestructure.net
  
/home/jrollins/.mail/mailboxes/snapper/new/1300378797.Vfd05I469d8M808571.snapper
87aagv2z92@sspaeth.de
  
/home/jrollins/.mail/mailboxes/snapper/new/1300267540.Vfd05I46a17M964837.snapper
87tyf4xmm1@servo.finestructure.net
  
/home/jrollins/.mail/mailboxes/snapper/new/1300213852.Vfd05I469d8M923454.snapper
1290682750-30283-3-git-send-email-...@dme.org
  
/home/jrollins/.mail/archive/2010/cur/1290698042_0.5764.servo,U=333629,FMD5=7e33429f656f1e6e9d79b29c3f82c57e:2,
8763426kd5@steelpick.2x.cz
  
/home/jrollins/.mail/archive/2010/cur/1270740662_1.29713.servo,U=264838,FMD5=7e33429f656f1e6e9d79b29c3f82c57e:2,
87636feg10@servo.finestructure.net
  /home/jrollins/.mail/archive/2010/cur/1265129567.M505745P5400Q1.servo:2,S
87eil3ehjh@servo.finestructure.net
  /home/jrollins/.mail/archive/2010/cur/1265127608.M500761P12582Q1.servo:2,S
 

First of all, only messages that were sent by me are in my sent folder.
There are no messages in there that are sent by anyone else.  But this
search is returning messages that are from people other than me.  That
makes no sense.

Second, strangely, all of the messages are ones that are sent to the
notmuch list.  Not sure what to make of that except that the messages
that were sent from me to the list are also in my received mail so are
actually duplicated in my mail store.  I have plenty of other messages
that fall into that same condition, though.

It's going to take a lot more digging before I can identify what is
common about these messages and different from all the messages that are
not returned.  For what it's worth, it's not *just* that they were sent
to the list, since the binary is counting 35 messages that are in the
sent folder and sent to the list:

servo:~ 0$ notmuch count folder:sent and to:notmuch
35
servo:~ 0$ 

I'll keep poking at this, but others can test this and report what they
see I would really appreciate it.

jamie.


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


Re: problem with folder: search in python bindings

2011-03-21 Thread Jesse Rosenthal
On Mon, 21 Mar 2011 10:34:29 -0700, Jameson Rollins 
jroll...@finestructure.net wrote:
 It's going to take a lot more digging before I can identify what is
 common about these messages and different from all the messages that are
 not returned.  

One guess: do those messages happen to have folder:sent in the
body? If so, that might point to the possibility that the python
bindings are using a different libnotmuch. Perhaps they have a different
search path (and maybe there's a debian installed library around that
they're finding?).
___
notmuch mailing list
notmuch@notmuchmail.org
http://notmuchmail.org/mailman/listinfo/notmuch


Re: problem with folder: search in python bindings

2011-03-21 Thread Jameson Rollins
On Mon, 21 Mar 2011 13:42:09 -0400, Jesse Rosenthal jrosent...@jhu.edu wrote:
 On Mon, 21 Mar 2011 10:34:29 -0700, Jameson Rollins 
 jroll...@finestructure.net wrote:
  It's going to take a lot more digging before I can identify what is
  common about these messages and different from all the messages that are
  not returned.  
 
 One guess: do those messages happen to have folder:sent in the
 body? If so, that might point to the possibility that the python
 bindings are using a different libnotmuch. Perhaps they have a different
 search path (and maybe there's a debian installed library around that
 they're finding?).

Oh good call, Jesse.  Bonus points for you!  That was the problem.  Damn
it.  In retrospect that's so obvious, though, isn't it!  I had purged
the notmuch binary package, but had accidentally left libnotmuch1 and
libnotmuch-dev installed.  Removing those packages and pointing to my
locally installed libraries fixed the problem.

Sorry for spamming the list with what, in retrospect, I should have been
able to figure out on my own.  Thanks again, Jesse.

jamie.


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


Re: problem with folder: search in python bindings

2011-03-17 Thread Jameson Rollins
On Wed, 16 Mar 2011 10:25:29 +0100, Sebastian Spaeth sebast...@sspaeth.de 
wrote:
 Interesting, this is not at all what I am seeing in the current
 bindings:
 
 cd ~/src/notmuch/bindings/python;./notmuch.py count 'folder:sent'
 1957
 /usr/local/bin/notmuch count  'folder:sent'
 1957

Hey, Sebastian.  Can you share your notmuch.py script?  I want to
compare yours with what I'm doing in my python script.  I don't think
it's a quoting issue, since the quoting I'm using seems to work fine for
other search terms.  It's only with folder: searches that I'm seeing
the problem.

jamie.


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


Re: problem with folder: search in python bindings

2011-03-16 Thread Sebastian Spaeth
On Tue, 15 Mar 2011 11:30:30 -0700, Jameson Rollins 
jroll...@finestructure.net wrote:
 Hey, folks.  I'm seeing something peculiar with the python bindings.
 It seems that I am not able to get any results when doing folder:
 searches with the python bindings.  I'm using a version of notmuch that
 includes the folder index patch.

Interesting, this is not at all what I am seeing in the current
bindings:

cd ~/src/notmuch/bindings/python;./notmuch.py count 'folder:sent'
1957
/usr/local/bin/notmuch count  'folder:sent'
1957

 Anyone have any idea what could be going on here?  I'm not familiar with
 how the python bindings work, unfortunately.

The folder: stuff came after my latest work on the bindings, so I
haven't really tested things with that. But I don't see why it should
work any other than other queries too.

Some quotation issues at work perhaps?

Sebastian


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