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()
>>> len(query.search_messages())

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()

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
servo:~ 0$ 

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


Attachment: pgpPG3r8AFELF.pgp
Description: PGP signature

notmuch mailing list

Reply via email to