Re: [PATCH] emacs: wash: make word-wrap bound message width
[notmuch-archives.git] / 5c / 241588b7ab1bd09e8ac50eab06ae9b82f36a7b
1 Return-Path: <markwalters1009@gmail.com>\r
2 X-Original-To: notmuch@notmuchmail.org\r
3 Delivered-To: notmuch@notmuchmail.org\r
4 Received: from localhost (localhost [127.0.0.1])\r
5         by olra.theworths.org (Postfix) with ESMTP id E7157431FDE\r
6         for <notmuch@notmuchmail.org>; Wed, 14 Mar 2012 05:27:06 -0700 (PDT)\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
8 X-Spam-Flag: NO\r
9 X-Spam-Score: 0.201\r
10 X-Spam-Level: \r
11 X-Spam-Status: No, score=0.201 tagged_above=-999 required=5\r
12         tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1,\r
13         FREEMAIL_ENVFROM_END_DIGIT=1, FREEMAIL_FROM=0.001,\r
14         RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled\r
15 Received: from olra.theworths.org ([127.0.0.1])\r
16         by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
17         with ESMTP id n0QcI5qiqHeu for <notmuch@notmuchmail.org>;\r
18         Wed, 14 Mar 2012 05:27:05 -0700 (PDT)\r
19 Received: from mail-we0-f181.google.com (mail-we0-f181.google.com\r
20         [74.125.82.181]) (using TLSv1 with cipher RC4-SHA (128/128 bits))\r
21         (No client certificate requested)\r
22         by olra.theworths.org (Postfix) with ESMTPS id D6E4B431FD6\r
23         for <notmuch@notmuchmail.org>; Wed, 14 Mar 2012 05:27:02 -0700 (PDT)\r
24 Received: by mail-we0-f181.google.com with SMTP id m13so1833650wer.26\r
25         for <notmuch@notmuchmail.org>; Wed, 14 Mar 2012 05:27:02 -0700 (PDT)\r
26 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;\r
27         h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references;\r
28         bh=qGAcE0aauquirs3S+jhs4dMMEvWnZA6XIt7MKSZ4DpE=;\r
29         b=OBBbx7AoE8MjI9rXc285vlSjkjAQy5DGsaciWPfl6PhdqCwXHiSmkqZx1Fh10LRtM+\r
30         n7Tj500/c+1eoDsby6uPdxb8DR/NHB5O9ZyjWK70irfzZmXvBKt1DMnRNHNtcPbaBMYv\r
31         8wvMEngidFSxaNICfyDlE2w1dIqA0/7B1T9BDHoc758gP92M78a9aVyIJZnpKAqUv0Bv\r
32         CmVOsvcyLG9IsnM2WIcw+jEAivJWxfu6WVuTDy8ie2eLtKmDSi2unUZ7REONUuZCH3nG\r
33         xNtQShLlgjNVsWlnS57ScZ4aAqLoItGei3R1QwPY66i53CMRFwAFXUPpNZUcP1PmH3ME\r
34         nJwg==\r
35 Received: by 10.180.14.230 with SMTP id s6mr5983517wic.2.1331728022526;\r
36         Wed, 14 Mar 2012 05:27:02 -0700 (PDT)\r
37 Received: from localhost (94-192-233-223.zone6.bethere.co.uk.\r
38  [94.192.233.223])      by mx.google.com with ESMTPS id\r
39  fi4sm11246234wib.4.2012.03.14.05.27.01 (version=TLSv1/SSLv3 cipher=OTHER);\r
40         Wed, 14 Mar 2012 05:27:01 -0700 (PDT)\r
41 From: Mark Walters <markwalters1009@gmail.com>\r
42 To: notmuch@notmuchmail.org\r
43 Subject: [Patch v2 3/3] lib: fix an exclude bug\r
44 Date: Wed, 14 Mar 2012 12:26:54 +0000\r
45 Message-Id: <1331728014-32698-4-git-send-email-markwalters1009@gmail.com>\r
46 X-Mailer: git-send-email 1.7.9.1\r
47 In-Reply-To: <1331728014-32698-1-git-send-email-markwalters1009@gmail.com>\r
48 References: <1331728014-32698-1-git-send-email-markwalters1009@gmail.com>\r
49 X-BeenThere: notmuch@notmuchmail.org\r
50 X-Mailman-Version: 2.1.13\r
51 Precedence: list\r
52 List-Id: "Use and development of the notmuch mail system."\r
53         <notmuch.notmuchmail.org>\r
54 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
55         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
56 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
57 List-Post: <mailto:notmuch@notmuchmail.org>\r
58 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
59 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
60         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
61 X-List-Received-Date: Wed, 14 Mar 2012 12:27:07 -0000\r
62 \r
63 When the exclude tags contain a tag that does not occur anywhere in\r
64 the Xapian database the exclusion fails. We modify the way the query\r
65 is constructed to `work around' this. (In fact the new code is cleaner\r
66 anyway.)\r
67 \r
68 It also seems to fix another exclusion failure bug reported by\r
69 jrollins but we have not yet worked out why it helps in that case.\r
70 ---\r
71  lib/query.cc |    5 +++--\r
72  1 files changed, 3 insertions(+), 2 deletions(-)\r
73 \r
74 diff --git a/lib/query.cc b/lib/query.cc\r
75 index ab18fbc..2b73d72 100644\r
76 --- a/lib/query.cc\r
77 +++ b/lib/query.cc\r
78 @@ -213,13 +213,14 @@ notmuch_query_search_messages (notmuch_query_t *query)\r
79  \r
80         if (query->exclude_terms) {\r
81             exclude_query = _notmuch_exclude_tags (query, final_query);\r
82 -           exclude_query = Xapian::Query (Xapian::Query::OP_AND,\r
83 -                                          exclude_query, final_query);\r
84  \r
85             if (query->omit_excluded_messages)\r
86                 final_query = Xapian::Query (Xapian::Query::OP_AND_NOT,\r
87                                              final_query, exclude_query);\r
88             else {\r
89 +               exclude_query = Xapian::Query (Xapian::Query::OP_AND,\r
90 +                                          exclude_query, final_query);\r
91 +\r
92                 enquire.set_weighting_scheme (Xapian::BoolWeight());\r
93                 enquire.set_query (exclude_query);\r
94  \r
95 -- \r
96 1.7.9.1\r
97 \r