Re: [PATCH] emacs: wash: make word-wrap bound message width
[notmuch-archives.git] / 66 / 2cc4045f4eb03ebc8fb4c27fc53010bfbc8407
1 Return-Path: <novalazy@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 7CF66431FD9\r
6         for <notmuch@notmuchmail.org>; Wed, 20 Jun 2012 06:30:22 -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.799\r
10 X-Spam-Level: \r
11 X-Spam-Status: No, score=-0.799 tagged_above=-999 required=5\r
12         tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1,\r
13         FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled\r
14 Received: from olra.theworths.org ([127.0.0.1])\r
15         by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
16         with ESMTP id oY+9lM0NMQbv for <notmuch@notmuchmail.org>;\r
17         Wed, 20 Jun 2012 06:30:21 -0700 (PDT)\r
18 Received: from mail-pz0-f53.google.com (mail-pz0-f53.google.com\r
19         [209.85.210.53]) (using TLSv1 with cipher RC4-MD5 (128/128 bits))\r
20         (No client certificate requested)\r
21         by olra.theworths.org (Postfix) with ESMTPS id 0CFBF431FDB\r
22         for <notmuch@notmuchmail.org>; Wed, 20 Jun 2012 06:30:10 -0700 (PDT)\r
23 Received: by mail-pz0-f53.google.com with SMTP id g9so12291942dad.26\r
24         for <notmuch@notmuchmail.org>; Wed, 20 Jun 2012 06:30:10 -0700 (PDT)\r
25 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;\r
26         h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references;\r
27         bh=qeK3JsuG++4SIJ2oKRpMtb7svc/cvMCELKKPjgtCX4Y=;\r
28         b=y70GaxpWPaizfgajaqCnu5sTMUAm/I1jso86OpUjrrDSNO1bLnvocM60gUCjPFvSEp\r
29         rdjGxpd4FAJ1dOyGkYT6+b42S5Dq77j88jjL/BocgoElM9yA56tKbl2N56NfP0NCW7WV\r
30         XC6mM30cUFyRAUK4bm0/6igdqGqvmi+/WQvd7eC7joDcQLVi3z5/p6eOsd6oTV2x8Vtv\r
31         sX6rDeeavCpV1Zhddxd2kYU/qcEPVyjX8tpukAyUht86gkdHeKlm4h79jt+jfJkoV61s\r
32         1bmhPjbPDTT0PvDaE8a7zPvze+E2N/zR38GpL3Wk8l0r+/wkYmxlF/3PPWz641WRAq42\r
33         0Dbg==\r
34 Received: by 10.68.226.65 with SMTP id rq1mr3224564pbc.25.1340199010873;\r
35         Wed, 20 Jun 2012 06:30:10 -0700 (PDT)\r
36 Received: from localhost (215.42.233.220.static.exetel.com.au.\r
37         [220.233.42.215])\r
38         by mx.google.com with ESMTPS id mt9sm31949288pbb.14.2012.06.20.06.30.08\r
39         (version=TLSv1/SSLv3 cipher=OTHER);\r
40         Wed, 20 Jun 2012 06:30:09 -0700 (PDT)\r
41 From: Peter Wang <novalazy@gmail.com>\r
42 To: notmuch@notmuchmail.org\r
43 Subject: [PATCH 7/8] lib: add NOTMUCH_EXCLUDE_FLAG to notmuch_exclude_t\r
44 Date: Wed, 20 Jun 2012 23:29:06 +1000\r
45 Message-Id: <1340198947-29370-8-git-send-email-novalazy@gmail.com>\r
46 X-Mailer: git-send-email 1.7.4.4\r
47 In-Reply-To: <1340198947-29370-1-git-send-email-novalazy@gmail.com>\r
48 References: <1340198947-29370-1-git-send-email-novalazy@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, 20 Jun 2012 13:30:22 -0000\r
62 \r
63 Add NOTMUCH_EXCLUDE_FLAG to notmuch_exclude_t so that it can\r
64 cover all four values of search --exclude in the cli.\r
65 ---\r
66  lib/notmuch.h    |    1 +\r
67  lib/query.cc     |    6 ++++--\r
68  notmuch-search.c |    2 +-\r
69  3 files changed, 6 insertions(+), 3 deletions(-)\r
70 \r
71 diff --git a/lib/notmuch.h b/lib/notmuch.h\r
72 index 1280afd..f4381ae 100644\r
73 --- a/lib/notmuch.h\r
74 +++ b/lib/notmuch.h\r
75 @@ -504,6 +504,7 @@ notmuch_query_get_query_string (notmuch_query_t *query);\r
76  typedef enum {\r
77      NOTMUCH_EXCLUDE_FALSE,\r
78      NOTMUCH_EXCLUDE_TRUE,\r
79 +    NOTMUCH_EXCLUDE_FLAG,\r
80      NOTMUCH_EXCLUDE_ALL\r
81  } notmuch_exclude_t;\r
82  \r
83 diff --git a/lib/query.cc b/lib/query.cc\r
84 index f752452..1e0f292 100644\r
85 --- a/lib/query.cc\r
86 +++ b/lib/query.cc\r
87 @@ -221,10 +221,12 @@ notmuch_query_search_messages (notmuch_query_t *query)\r
88         if (query->exclude_terms) {\r
89             exclude_query = _notmuch_exclude_tags (query, final_query);\r
90  \r
91 -           if (query->omit_excluded != NOTMUCH_EXCLUDE_FALSE)\r
92 +           if (query->omit_excluded == NOTMUCH_EXCLUDE_TRUE ||\r
93 +               query->omit_excluded == NOTMUCH_EXCLUDE_ALL)\r
94 +           {\r
95                 final_query = Xapian::Query (Xapian::Query::OP_AND_NOT,\r
96                                              final_query, exclude_query);\r
97 -           else {\r
98 +           } else {\r
99                 exclude_query = Xapian::Query (Xapian::Query::OP_AND,\r
100                                            exclude_query, final_query);\r
101  \r
102 diff --git a/notmuch-search.c b/notmuch-search.c\r
103 index 89b5bf9..027923d 100644\r
104 --- a/notmuch-search.c\r
105 +++ b/notmuch-search.c\r
106 @@ -527,7 +527,7 @@ notmuch_search_command (void *ctx, int argc, char *argv[])\r
107         for (i = 0; i < search_exclude_tags_length; i++)\r
108             notmuch_query_add_tag_exclude (query, search_exclude_tags[i]);\r
109         if (exclude == EXCLUDE_FLAG)\r
110 -           notmuch_query_set_omit_excluded (query, NOTMUCH_EXCLUDE_FALSE);\r
111 +           notmuch_query_set_omit_excluded (query, NOTMUCH_EXCLUDE_FLAG);\r
112         if (exclude == EXCLUDE_ALL)\r
113             notmuch_query_set_omit_excluded (query, NOTMUCH_EXCLUDE_ALL);\r
114      }\r
115 -- \r
116 1.7.4.4\r
117 \r