1 Return-Path: <pieter@praet.org>
\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 33456431FC0
\r
6 for <notmuch@notmuchmail.org>; Thu, 19 Jan 2012 11:21:06 -0800 (PST)
\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org
\r
11 X-Spam-Status: No, score=-0.7 tagged_above=-999 required=5
\r
12 tests=[RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled
\r
13 Received: from olra.theworths.org ([127.0.0.1])
\r
14 by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)
\r
15 with ESMTP id 4uWDBNg2dHWJ for <notmuch@notmuchmail.org>;
\r
16 Thu, 19 Jan 2012 11:21:04 -0800 (PST)
\r
17 Received: from mail-we0-f181.google.com (mail-we0-f181.google.com
\r
18 [74.125.82.181]) (using TLSv1 with cipher RC4-SHA (128/128 bits))
\r
19 (No client certificate requested)
\r
20 by olra.theworths.org (Postfix) with ESMTPS id 4A89C431FAE
\r
21 for <notmuch@notmuchmail.org>; Thu, 19 Jan 2012 11:21:04 -0800 (PST)
\r
22 Received: by mail-we0-f181.google.com with SMTP id p13so279138wer.26
\r
23 for <notmuch@notmuchmail.org>; Thu, 19 Jan 2012 11:21:03 -0800 (PST)
\r
24 Received: by 10.216.133.71 with SMTP id p49mr1410158wei.8.1327000863899;
\r
25 Thu, 19 Jan 2012 11:21:03 -0800 (PST)
\r
26 Received: from localhost ([109.131.97.13])
\r
27 by mx.google.com with ESMTPS id df2sm22037996wib.4.2012.01.19.11.21.03
\r
28 (version=TLSv1/SSLv3 cipher=OTHER);
\r
29 Thu, 19 Jan 2012 11:21:03 -0800 (PST)
\r
30 From: Pieter Praet <pieter@praet.org>
\r
31 To: Austin Clements <amdragon@MIT.EDU>
\r
32 Subject: [PATCH 1/4] search: rename auto_exclude_tags to {search,
\r
34 Date: Thu, 19 Jan 2012 20:19:01 +0100
\r
35 Message-Id: <1327000744-25463-2-git-send-email-pieter@praet.org>
\r
36 X-Mailer: git-send-email 1.7.8.1
\r
37 In-Reply-To: <1327000744-25463-1-git-send-email-pieter@praet.org>
\r
38 References: <1326586654-16840-3-git-send-email-amdragon@mit.edu>
\r
39 <1327000744-25463-1-git-send-email-pieter@praet.org>
\r
40 Cc: Notmuch Mail <notmuch@notmuchmail.org>
\r
41 X-BeenThere: notmuch@notmuchmail.org
\r
42 X-Mailman-Version: 2.1.13
\r
44 List-Id: "Use and development of the notmuch mail system."
\r
45 <notmuch.notmuchmail.org>
\r
46 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,
\r
47 <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>
\r
48 List-Archive: <http://notmuchmail.org/pipermail/notmuch>
\r
49 List-Post: <mailto:notmuch@notmuchmail.org>
\r
50 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>
\r
51 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,
\r
52 <mailto:notmuch-request@notmuchmail.org?subject=subscribe>
\r
53 X-List-Received-Date: Thu, 19 Jan 2012 19:21:06 -0000
\r
55 All other config-related functions and args include the section
\r
56 title in their name, so for the sake of consistency, mirror that.
\r
58 Also, the "auto"matic part is a given, so that was dropped.
\r
60 notmuch-client.h | 4 ++--
\r
61 notmuch-config.c | 32 ++++++++++++++++----------------
\r
62 notmuch-count.c | 12 ++++++------
\r
63 notmuch-search.c | 12 ++++++------
\r
64 4 files changed, 30 insertions(+), 30 deletions(-)
\r
66 diff --git a/notmuch-client.h b/notmuch-client.h
\r
67 index 62ede28..4bc7320 100644
\r
68 --- a/notmuch-client.h
\r
69 +++ b/notmuch-client.h
\r
70 @@ -236,10 +236,10 @@ notmuch_config_set_maildir_synchronize_flags (notmuch_config_t *config,
\r
71 notmuch_bool_t synchronize_flags);
\r
74 -notmuch_config_get_auto_exclude_tags (notmuch_config_t *config, size_t *length);
\r
75 +notmuch_config_get_search_exclude_tags (notmuch_config_t *config, size_t *length);
\r
78 -notmuch_config_set_auto_exclude_tags (notmuch_config_t *config,
\r
79 +notmuch_config_set_search_exclude_tags (notmuch_config_t *config,
\r
83 diff --git a/notmuch-config.c b/notmuch-config.c
\r
84 index 3d4d5b9..687bd76 100644
\r
85 --- a/notmuch-config.c
\r
86 +++ b/notmuch-config.c
\r
87 @@ -89,9 +89,9 @@ static const char search_config_comment[] =
\r
89 " The following option is supported here:\n"
\r
91 - "\tauto_exclude_tags A ;-separated list of tags that will be\n"
\r
92 - "\t excluded from search results by default. Using an excluded tag\n"
\r
93 - "\t in a query will override that exclusion.\n";
\r
94 + "\texclude_tags A list (separated by ';') of the tags that will be\n"
\r
95 + "\t\texcluded from search results by default. Using an excluded tag in a\n"
\r
96 + "\t\tquery will override that exclusion.\n";
\r
98 struct _notmuch_config {
\r
100 @@ -105,8 +105,8 @@ struct _notmuch_config {
\r
101 const char **new_tags;
\r
102 size_t new_tags_length;
\r
103 notmuch_bool_t maildir_synchronize_flags;
\r
104 - const char **auto_exclude_tags;
\r
105 - size_t auto_exclude_tags_length;
\r
106 + const char **search_exclude_tags;
\r
107 + size_t search_exclude_tags_length;
\r
111 @@ -264,8 +264,8 @@ notmuch_config_open (void *ctx,
\r
112 config->new_tags = NULL;
\r
113 config->new_tags_length = 0;
\r
114 config->maildir_synchronize_flags = TRUE;
\r
115 - config->auto_exclude_tags = NULL;
\r
116 - config->auto_exclude_tags_length = 0;
\r
117 + config->search_exclude_tags = NULL;
\r
118 + config->search_exclude_tags_length = 0;
\r
120 if (! g_key_file_load_from_file (config->key_file,
\r
122 @@ -360,9 +360,9 @@ notmuch_config_open (void *ctx,
\r
123 notmuch_config_set_new_tags (config, tags, 2);
\r
126 - if (notmuch_config_get_auto_exclude_tags (config, &tmp) == NULL) {
\r
127 + if (notmuch_config_get_search_exclude_tags (config, &tmp) == NULL) {
\r
128 const char *tags[] = { "deleted", "spam" };
\r
129 - notmuch_config_set_auto_exclude_tags (config, tags, 2);
\r
130 + notmuch_config_set_search_exclude_tags (config, tags, 2);
\r
134 @@ -623,20 +623,20 @@ notmuch_config_set_new_tags (notmuch_config_t *config,
\r
138 -notmuch_config_get_auto_exclude_tags (notmuch_config_t *config, size_t *length)
\r
139 +notmuch_config_get_search_exclude_tags (notmuch_config_t *config, size_t *length)
\r
141 - return _config_get_list (config, "search", "auto_exclude_tags",
\r
142 - &(config->auto_exclude_tags),
\r
143 - &(config->auto_exclude_tags_length), length);
\r
144 + return _config_get_list (config, "search", "exclude_tags",
\r
145 + &(config->search_exclude_tags),
\r
146 + &(config->search_exclude_tags_length), length);
\r
150 -notmuch_config_set_auto_exclude_tags (notmuch_config_t *config,
\r
151 +notmuch_config_set_search_exclude_tags (notmuch_config_t *config,
\r
152 const char *list[],
\r
155 - _config_set_list (config, "search", "auto_exclude_tags", list, length,
\r
156 - &(config->auto_exclude_tags));
\r
157 + _config_set_list (config, "search", "exclude_tags", list, length,
\r
158 + &(config->search_exclude_tags));
\r
161 /* Given a configuration item of the form <group>.<key> return the
\r
162 diff --git a/notmuch-count.c b/notmuch-count.c
\r
163 index f77861e..63459fb 100644
\r
164 --- a/notmuch-count.c
\r
165 +++ b/notmuch-count.c
\r
166 @@ -35,8 +35,8 @@ notmuch_count_command (void *ctx, int argc, char *argv[])
\r
169 int output = OUTPUT_MESSAGES;
\r
170 - const char **auto_exclude_tags;
\r
171 - size_t auto_exclude_tags_length;
\r
172 + const char **search_exclude_tags;
\r
173 + size_t search_exclude_tags_length;
\r
176 notmuch_opt_desc_t options[] = {
\r
177 @@ -78,10 +78,10 @@ notmuch_count_command (void *ctx, int argc, char *argv[])
\r
181 - auto_exclude_tags = notmuch_config_get_auto_exclude_tags
\r
182 - (config, &auto_exclude_tags_length);
\r
183 - for (i = 0; i < auto_exclude_tags_length; i++)
\r
184 - notmuch_query_add_tag_exclude (query, auto_exclude_tags[i]);
\r
185 + search_exclude_tags = notmuch_config_get_search_exclude_tags
\r
186 + (config, &search_exclude_tags_length);
\r
187 + for (i = 0; i < search_exclude_tags_length; i++)
\r
188 + notmuch_query_add_tag_exclude (query, search_exclude_tags[i]);
\r
191 case OUTPUT_MESSAGES:
\r
192 diff --git a/notmuch-search.c b/notmuch-search.c
\r
193 index 8867aab..d504051 100644
\r
194 --- a/notmuch-search.c
\r
195 +++ b/notmuch-search.c
\r
196 @@ -423,8 +423,8 @@ notmuch_search_command (void *ctx, int argc, char *argv[])
\r
197 output_t output = OUTPUT_SUMMARY;
\r
199 int limit = -1; /* unlimited */
\r
200 - const char **auto_exclude_tags;
\r
201 - size_t auto_exclude_tags_length;
\r
202 + const char **search_exclude_tags;
\r
203 + size_t search_exclude_tags_length;
\r
206 enum { NOTMUCH_FORMAT_JSON, NOTMUCH_FORMAT_TEXT }
\r
207 @@ -493,10 +493,10 @@ notmuch_search_command (void *ctx, int argc, char *argv[])
\r
209 notmuch_query_set_sort (query, sort);
\r
211 - auto_exclude_tags = notmuch_config_get_auto_exclude_tags
\r
212 - (config, &auto_exclude_tags_length);
\r
213 - for (i = 0; i < auto_exclude_tags_length; i++)
\r
214 - notmuch_query_add_tag_exclude (query, auto_exclude_tags[i]);
\r
215 + search_exclude_tags = notmuch_config_get_search_exclude_tags
\r
216 + (config, &search_exclude_tags_length);
\r
217 + for (i = 0; i < search_exclude_tags_length; i++)
\r
218 + notmuch_query_add_tag_exclude (query, search_exclude_tags[i]);
\r