--- /dev/null
+Return-Path: <markwalters1009@gmail.com>\r
+X-Original-To: notmuch@notmuchmail.org\r
+Delivered-To: notmuch@notmuchmail.org\r
+Received: from localhost (localhost [127.0.0.1])\r
+ by olra.theworths.org (Postfix) with ESMTP id 91F87431FBC\r
+ for <notmuch@notmuchmail.org>; Mon, 12 Mar 2012 04:32:00 -0700 (PDT)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: 0.201\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=0.201 tagged_above=-999 required=5\r
+ tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1,\r
+ FREEMAIL_ENVFROM_END_DIGIT=1, FREEMAIL_FROM=0.001,\r
+ RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled\r
+Received: from olra.theworths.org ([127.0.0.1])\r
+ by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
+ with ESMTP id RsF9eFsjADKi for <notmuch@notmuchmail.org>;\r
+ Mon, 12 Mar 2012 04:32:00 -0700 (PDT)\r
+Received: from mail-wi0-f173.google.com (mail-wi0-f173.google.com\r
+ [209.85.212.173]) (using TLSv1 with cipher RC4-SHA (128/128 bits))\r
+ (No client certificate requested)\r
+ by olra.theworths.org (Postfix) with ESMTPS id E88BE431FAF\r
+ for <notmuch@notmuchmail.org>; Mon, 12 Mar 2012 04:31:59 -0700 (PDT)\r
+Received: by wibhq7 with SMTP id hq7so2904632wib.2\r
+ for <notmuch@notmuchmail.org>; Mon, 12 Mar 2012 04:31:57 -0700 (PDT)\r
+DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;\r
+ h=from:to:cc:subject:date:message-id:x-mailer;\r
+ bh=7YwI1ObKT+bhsuMwaWW/z5wczxWJB2fdSIWS755T4Iw=;\r
+ b=NnWjT7j04+0BwUSGTCNrNA0Pbf+ukQx10DhVAc11GONSw7p8N4g9kxY3SGVlRu/oCy\r
+ +niQjPbcskxU9D682H1Kp2mCSgBdr2rXqsJM5/yV0tFNELC50FEM1hlZ8JfGglG9Sqig\r
+ q9l/3Vk94VEZ7H1eZVkP/9fuihPi6EmjeQMAR9IuLy7uYh7fI1epAuuoiVlfNj56ppzM\r
+ 919a0zztfQDg8Gy2nM7sYpr3u2w5WkL3B7o13CjMRqWDPRaX2n7z+frSoO7BSnaP36RB\r
+ qcvE3TGnDmK0WfmhbrEu/UZrZzBEPARvaeMTuON0GUFta4+dXaLtWs1I7p6R5SGbjCCB\r
+ tgwQ==\r
+Received: by 10.180.79.231 with SMTP id m7mr26349093wix.11.1331551917441;\r
+ Mon, 12 Mar 2012 04:31:57 -0700 (PDT)\r
+Received: from localhost (94-192-233-223.zone6.bethere.co.uk.\r
+ [94.192.233.223]) by mx.google.com with ESMTPS id\r
+ t20sm57024857wiv.0.2012.03.12.04.31.55 (version=TLSv1/SSLv3 cipher=OTHER);\r
+ Mon, 12 Mar 2012 04:31:56 -0700 (PDT)\r
+From: Mark Walters <markwalters1009@gmail.com>\r
+To: notmuch@notmuchmail.org\r
+Subject: [PATCH 0/2] A bug in the exclude code\r
+Date: Mon, 12 Mar 2012 11:31:52 +0000\r
+Message-Id: <1331551914-28323-1-git-send-email-markwalters1009@gmail.com>\r
+X-Mailer: git-send-email 1.7.9.1\r
+X-BeenThere: notmuch@notmuchmail.org\r
+X-Mailman-Version: 2.1.13\r
+Precedence: list\r
+List-Id: "Use and development of the notmuch mail system."\r
+ <notmuch.notmuchmail.org>\r
+List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
+ <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
+List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
+List-Post: <mailto:notmuch@notmuchmail.org>\r
+List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
+List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
+ <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
+X-List-Received-Date: Mon, 12 Mar 2012 11:32:00 -0000\r
+\r
+There is a bug in the exclude code (found by jrollins in the\r
+--with-excluded series) but also present in master. None of the\r
+current tests were finding it so the first patch adds two tests.\r
+\r
+The bug (and test failure) do not appear in all configuations: on my\r
+main test machine (an oldish debian testing 32bit userspace with a\r
+64bit kernel and xapian 1.2.7) all tests pass. On my laptop (a recent\r
+debian testing 64bit userspace and xapian 1.2.8) one of the new tests\r
+fails.\r
+\r
+The second patch fixes the behaviour for me but I don't see why it\r
+should make a difference: searches for A and not B should give the\r
+same results as A and not (A and B). It could be a bug in xapian, it\r
+could be that I am not allowed to reuse queries as I do (is query1 =\r
+query1 and query2 allowed?) or it could be some memory use bug on my\r
+part.\r
+\r
+Anyway the "fix" is small which should help narrow down the actual\r
+cause.\r
+\r
+Best wishes\r
+\r
+Mark \r
+\r
+Mark Walters (2):\r
+ test: add tests for message only search\r
+ lib: fix an exclude bug\r
+\r
+ lib/query.cc | 5 +++--\r
+ test/search | 11 +++++++++++\r
+ 2 files changed, 14 insertions(+), 2 deletions(-)\r
+\r
+-- \r
+1.7.9.1\r
+\r