Return-Path: X-Original-To: notmuch@notmuchmail.org Delivered-To: notmuch@notmuchmail.org Received: from localhost (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id BE3A7429E20 for ; Mon, 21 Mar 2011 10:34:39 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org X-Spam-Flag: NO X-Spam-Score: 0.01 X-Spam-Level: X-Spam-Status: No, score=0.01 tagged_above=-999 required=5 tests=[T_MIME_NO_TEXT=0.01] autolearn=disabled Received: from olra.theworths.org ([127.0.0.1]) by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id mPR2g9tQL8v6 for ; Mon, 21 Mar 2011 10:34:38 -0700 (PDT) Received: from tarap.cc.columbia.edu (tarap.cc.columbia.edu [128.59.29.7]) by olra.theworths.org (Postfix) with ESMTP id 9AB80431FD0 for ; Mon, 21 Mar 2011 10:34:38 -0700 (PDT) Received: from servo.finestructure.net (cpe-98-149-172-122.socal.res.rr.com [98.149.172.122]) (user=jgr2110 author=jrollins@servo.finestructure.net mech=PLAIN bits=0) by tarap.cc.columbia.edu (8.14.4/8.14.3) with ESMTP id p2LHYZY6004814 (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=NOT); Mon, 21 Mar 2011 13:34:36 -0400 (EDT) Received: from jrollins by servo.finestructure.net with local (Exim 4.74) (envelope-from ) id 1Q1izw-0002Zn-IY; Mon, 21 Mar 2011 10:34:32 -0700 From: Jameson Rollins To: Jesse Rosenthal , Sebastian Spaeth , Notmuch Mail Subject: Re: problem with folder: search in python bindings In-Reply-To: <87tyewtobx.fsf@gogo.home> References: <87tyf4xmm1.fsf@servo.finestructure.net> <87aagv2z92.fsf@SSpaeth.de> <87y64dk9da.fsf@servo.finestructure.net> <877hbsfq4q.fsf@SSpaeth.de> <871v20bfij.fsf@servo.finestructure.net> <87tyewtobx.fsf@gogo.home> User-Agent: Notmuch/0.5-137-g2e489e3 (http://notmuchmail.org) Emacs/23.2.1 (i486-pc-linux-gnu) Date: Mon, 21 Mar 2011 10:34:29 -0700 Message-ID: <87hbaw9y3e.fsf@servo.finestructure.net> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" X-No-Spam-Score: Local X-Scanned-By: MIMEDefang 2.68 on 128.59.29.7 X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: "Use and development of the notmuch mail system." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 Mar 2011 17:34:39 -0000 --=-=-= Content-Transfer-Encoding: quoted-printable On Mon, 21 Mar 2011 12:45:06 -0400, Jesse Rosenthal wr= ote: > One thing to try would be to run it step by step in an interactive sessio= n. I.e., Hey, Jesse. So I'm getting different results interactively!: >>> import notmuch >>> db =3D notmuch.Database("/home/jrollins/.mail") >>> query =3D notmuch.Query(db, "folder:sent") >>> query.count_messages() 9L >>> len(query.search_messages()) 9 >>>=20 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 =3D [m for m in qry.search_messages()] >=20 > 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() ...=20 87tyewtobx.fsf@gogo.home /home/jrollins/.mail/mailboxes/snapper/new/1300725908.Vfd05I469d8M318600.= snapper 871v20bfij.fsf@servo.finestructure.net /home/jrollins/.mail/mailboxes/snapper/new/1300725184.Vfd05I469d6M959989.= snapper 87y64dk9da.fsf@servo.finestructure.net /home/jrollins/.mail/mailboxes/snapper/new/1300378797.Vfd05I469d8M808571.= snapper 87aagv2z92.fsf@SSpaeth.de /home/jrollins/.mail/mailboxes/snapper/new/1300267540.Vfd05I46a17M964837.= snapper 87tyf4xmm1.fsf@servo.finestructure.net /home/jrollins/.mail/mailboxes/snapper/new/1300213852.Vfd05I469d8M923454.= snapper 1290682750-30283-3-git-send-email-dme@dme.org /home/jrollins/.mail/archive/2010/cur/1290698042_0.5764.servo,U=3D333629,= FMD5=3D7e33429f656f1e6e9d79b29c3f82c57e:2, 8763426kd5.fsf@steelpick.2x.cz /home/jrollins/.mail/archive/2010/cur/1270740662_1.29713.servo,U=3D264838= ,FMD5=3D7e33429f656f1e6e9d79b29c3f82c57e:2, 87636feg10.fsf@servo.finestructure.net /home/jrollins/.mail/archive/2010/cur/1265129567.M505745P5400Q1.servo:2,S 87eil3ehjh.fsf@servo.finestructure.net /home/jrollins/.mail/archive/2010/cur/1265127608.M500761P12582Q1.servo:2,S >>>=20 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$=20 I'll keep poking at this, but others can test this and report what they see I would really appreciate it. jamie. --=-=-= Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (GNU/Linux) iQIcBAEBCAAGBQJNh4wlAAoJEO00zqvie6q8XSEP/jUHlD+r1fY86sPl61tDmQtE P+jRj8FFe0ehcZFhQWhblXANSqdcmFkSZKc6wxFG/AK1zJs8/V1y9mH1WvsKvNVJ PdNQqvDdnAjhpCx0zLZFKn81ySV8tl50IuIPms1GA2vIFxRcfkGhaBQrW99P22QJ 5G7pL1G6S+rkZadP3EYzNfH8e3njkoJMr5tG/JOe7POy2G59q+5iqQ1JHdg/iU5i 3gm8sH+4N7vwzNyUFvgNRk9jy3ECHBDcJcGwDcOoSWW8fQ9ZpfkjuaVcBUM9/gGi p6rddMKVDZuhl3mjTCYnxTCJbTzD2fNOW2jWmx7lVoTbEwIvRBCzZp0r7Vh13o+n OM5xZeoAYiPAhAd64+WMNZ+5NQ6J1iBW41TdGabQQVK0uqVezMGfmQb6g4ORfaMC wY2AgpOnHQ7vUJLopz3byXhVY55zqGfrmxuFnQLbWqSCfVB9sbmyIbwmCVao3EGD 7EpNDUveoI/6zIvY9Lo5dTctHQOGRaebYo05kvaZ8ju+UFbkEZtR4zKieAGmKKhB T3Dwo53teS6ZIimAwT3uGY/FSYkbp5QyM/pGmEX39Uimul9bjfkLB8s6gRcUpnYl MLYfcVbZ5MAPc4O3YvuaIeHlNG1cVhvhRUnL4vi88iN2rff+GnqV72fXTiIZEICo b9x9+G87gCTVXQFESjzi =kQv5 -----END PGP SIGNATURE----- --=-=-=--