Re: [PATCH] emacs: wash: make word-wrap bound message width
[notmuch-archives.git] / 71 / 71dc091d0c1ec71e67ccc1b520edcbecdc8668
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 84911431FAE\r
6         for <notmuch@notmuchmail.org>; Sat, 11 May 2013 12:51:05 -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 j0boS9StpVLU for <notmuch@notmuchmail.org>;\r
18         Sat, 11 May 2013 12:51:01 -0700 (PDT)\r
19 Received: from mail-wi0-f174.google.com (mail-wi0-f174.google.com\r
20         [209.85.212.174]) (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 7E687431FB6\r
23         for <notmuch@notmuchmail.org>; Sat, 11 May 2013 12:50:33 -0700 (PDT)\r
24 Received: by mail-wi0-f174.google.com with SMTP id m6so1665855wiv.13\r
25         for <notmuch@notmuchmail.org>; Sat, 11 May 2013 12:50:32 -0700 (PDT)\r
26 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;\r
27         h=x-received:from:to:cc:subject:date:message-id:x-mailer:in-reply-to\r
28         :references; bh=WhkSakuUpmVWKTAeP5Lf7/ylkSaMYytH53P0lW8xkg4=;\r
29         b=0xiJbZMk99ZgZCzbiq6DsuhFSpnjKdSUc2AqkOW3N4UehniU6M1bYeJd5Oe0YHnzVo\r
30         yFLLGjomNZv638ZuGDZiXn5cN6CRn7Oott3ZBU7Lc/uhJdj9F4rtXEFR9PUBzrYdx8a/\r
31         o8FdO3LOurFZ5cPmiK9/+MSbLJpuOAVvoUoxNKyHPa55m7nXcBXCTMt4Ub6PaS5tdkv6\r
32         RVod5KPAPl//ZuDuAUhlL07nSCTbNpUAwlWp8gDuJYzooRx8oHit+a5/87SYRNOfefaA\r
33         2LR2U1p+G9RTNKues1QUbp/PQFZQQ97/lqROfUlsMf2RNXQngeFw2Dt5g2tsi0CDRC5C\r
34         5RWg==\r
35 X-Received: by 10.194.133.232 with SMTP id pf8mr9741120wjb.40.1368301832459;\r
36         Sat, 11 May 2013 12:50:32 -0700 (PDT)\r
37 Received: from localhost (93-97-24-31.zone5.bethere.co.uk. [93.97.24.31])\r
38         by mx.google.com with ESMTPSA id bs20sm5729767wib.0.2013.05.11.12.50.31\r
39         for <multiple recipients>\r
40         (version=TLSv1.2 cipher=RC4-SHA bits=128/128);\r
41         Sat, 11 May 2013 12:50:32 -0700 (PDT)\r
42 From: Mark Walters <markwalters1009@gmail.com>\r
43 To: notmuch@notmuchmail.org\r
44 Subject: [PATCH v2 8/8] cli: use notmuch_exclude_t in option parser\r
45 Date: Sat, 11 May 2013 20:50:09 +0100\r
46 Message-Id: <1368301809-12532-9-git-send-email-markwalters1009@gmail.com>\r
47 X-Mailer: git-send-email 1.7.9.1\r
48 In-Reply-To: <1368301809-12532-1-git-send-email-markwalters1009@gmail.com>\r
49 References: <1368301809-12532-1-git-send-email-markwalters1009@gmail.com>\r
50 X-BeenThere: notmuch@notmuchmail.org\r
51 X-Mailman-Version: 2.1.13\r
52 Precedence: list\r
53 List-Id: "Use and development of the notmuch mail system."\r
54         <notmuch.notmuchmail.org>\r
55 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
56         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
57 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
58 List-Post: <mailto:notmuch@notmuchmail.org>\r
59 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
60 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
61         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
62 X-List-Received-Date: Sat, 11 May 2013 19:51:05 -0000\r
63 \r
64 From: Peter Wang <novalazy@gmail.com>\r
65 \r
66 Use notmuch_exclude_t constants directly instead of a redundant\r
67 enumeration while parsing search --exclude keyword arguments.\r
68 ---\r
69  notmuch-search.c |   28 +++++++++-------------------\r
70  1 files changed, 9 insertions(+), 19 deletions(-)\r
71 \r
72 diff --git a/notmuch-search.c b/notmuch-search.c\r
73 index a20791a..a96f07d 100644\r
74 --- a/notmuch-search.c\r
75 +++ b/notmuch-search.c\r
76 @@ -283,13 +283,6 @@ do_search_tags (notmuch_database_t *notmuch,\r
77      return 0;\r
78  }\r
79  \r
80 -enum {\r
81 -    EXCLUDE_TRUE,\r
82 -    EXCLUDE_FALSE,\r
83 -    EXCLUDE_FLAG,\r
84 -    EXCLUDE_ALL\r
85 -};\r
86 -\r
87  int\r
88  notmuch_search_command (notmuch_config_t *config, int argc, char *argv[])\r
89  {\r
90 @@ -302,7 +295,7 @@ notmuch_search_command (notmuch_config_t *config, int argc, char *argv[])\r
91      output_t output = OUTPUT_SUMMARY;\r
92      int offset = 0;\r
93      int limit = -1; /* unlimited */\r
94 -    int exclude = EXCLUDE_TRUE;\r
95 +    notmuch_exclude_t exclude = NOTMUCH_EXCLUDE_TRUE;\r
96      unsigned int i;\r
97  \r
98      enum {\r
99 @@ -332,10 +325,10 @@ notmuch_search_command (notmuch_config_t *config, int argc, char *argv[])\r
100                                   { "tags", OUTPUT_TAGS },\r
101                                   { 0, 0 } } },\r
102          { NOTMUCH_OPT_KEYWORD, &exclude, "exclude", 'x',\r
103 -          (notmuch_keyword_t []){ { "true", EXCLUDE_TRUE },\r
104 -                                  { "false", EXCLUDE_FALSE },\r
105 -                                  { "flag", EXCLUDE_FLAG },\r
106 -                                  { "all", EXCLUDE_ALL },\r
107 +          (notmuch_keyword_t []){ { "true", NOTMUCH_EXCLUDE_TRUE },\r
108 +                                  { "false", NOTMUCH_EXCLUDE_FALSE },\r
109 +                                  { "flag", NOTMUCH_EXCLUDE_FLAG },\r
110 +                                  { "all", NOTMUCH_EXCLUDE_ALL },\r
111                                    { 0, 0 } } },\r
112         { NOTMUCH_OPT_INT, &offset, "offset", 'O', 0 },\r
113         { NOTMUCH_OPT_INT, &limit, "limit", 'L', 0  },\r
114 @@ -394,15 +387,15 @@ notmuch_search_command (notmuch_config_t *config, int argc, char *argv[])\r
115  \r
116      notmuch_query_set_sort (query, sort);\r
117  \r
118 -    if (exclude == EXCLUDE_FLAG && output != OUTPUT_SUMMARY) {\r
119 +    if (exclude == NOTMUCH_EXCLUDE_FLAG && output != OUTPUT_SUMMARY) {\r
120         /* If we are not doing summary output there is nowhere to\r
121          * print the excluded flag so fall back on including the\r
122          * excluded messages. */\r
123         fprintf (stderr, "Warning: this output format cannot flag excluded messages.\n");\r
124 -       exclude = EXCLUDE_FALSE;\r
125 +       exclude = NOTMUCH_EXCLUDE_FALSE;\r
126      }\r
127  \r
128 -    if (exclude != EXCLUDE_FALSE) {\r
129 +    if (exclude != NOTMUCH_EXCLUDE_FALSE) {\r
130         const char **search_exclude_tags;\r
131         size_t search_exclude_tags_length;\r
132  \r
133 @@ -410,10 +403,7 @@ notmuch_search_command (notmuch_config_t *config, int argc, char *argv[])\r
134             (config, &search_exclude_tags_length);\r
135         for (i = 0; i < search_exclude_tags_length; i++)\r
136             notmuch_query_add_tag_exclude (query, search_exclude_tags[i]);\r
137 -       if (exclude == EXCLUDE_FLAG)\r
138 -           notmuch_query_set_omit_excluded (query, NOTMUCH_EXCLUDE_FLAG);\r
139 -       if (exclude == EXCLUDE_ALL)\r
140 -           notmuch_query_set_omit_excluded (query, NOTMUCH_EXCLUDE_ALL);\r
141 +       notmuch_query_set_omit_excluded (query, exclude);\r
142      }\r
143  \r
144      switch (output) {\r
145 -- \r
146 1.7.9.1\r
147 \r