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 9AA93429E54
\r
6 for <notmuch@notmuchmail.org>; Sun, 22 Jan 2012 20:24:40 -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 VuHBA0wCh23t for <notmuch@notmuchmail.org>;
\r
16 Sun, 22 Jan 2012 20:24:40 -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 A92CC429E40
\r
21 for <notmuch@notmuchmail.org>; Sun, 22 Jan 2012 20:24:39 -0800 (PST)
\r
22 Received: by werb10 with SMTP id b10so2114400wer.26
\r
23 for <notmuch@notmuchmail.org>; Sun, 22 Jan 2012 20:24:38 -0800 (PST)
\r
24 Received: by 10.216.137.210 with SMTP id y60mr2973975wei.14.1327292678303;
\r
25 Sun, 22 Jan 2012 20:24:38 -0800 (PST)
\r
26 Received: from localhost ([109.131.95.182])
\r
27 by mx.google.com with ESMTPS id gy6sm10720175wib.11.2012.01.22.20.24.37
\r
28 (version=TLSv1/SSLv3 cipher=OTHER);
\r
29 Sun, 22 Jan 2012 20:24:37 -0800 (PST)
\r
30 From: Pieter Praet <pieter@praet.org>
\r
31 To: Austin Clements <amdragon@mit.edu>
\r
32 Subject: [PATCH v2 1/6] search: rename auto_exclude_tags to {search,
\r
34 Date: Mon, 23 Jan 2012 05:22:32 +0100
\r
35 Message-Id: <1327292557-7701-1-git-send-email-pieter@praet.org>
\r
36 X-Mailer: git-send-email 1.7.8.1
\r
37 In-Reply-To: <87obtvaw8h.fsf@praet.org>
\r
38 References: <87obtvaw8h.fsf@praet.org>
\r
39 Cc: Notmuch Mail <notmuch@notmuchmail.org>
\r
40 X-BeenThere: notmuch@notmuchmail.org
\r
41 X-Mailman-Version: 2.1.13
\r
43 List-Id: "Use and development of the notmuch mail system."
\r
44 <notmuch.notmuchmail.org>
\r
45 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,
\r
46 <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>
\r
47 List-Archive: <http://notmuchmail.org/pipermail/notmuch>
\r
48 List-Post: <mailto:notmuch@notmuchmail.org>
\r
49 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>
\r
50 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,
\r
51 <mailto:notmuch-request@notmuchmail.org?subject=subscribe>
\r
52 X-List-Received-Date: Mon, 23 Jan 2012 04:24:40 -0000
\r
54 All other config-related functions and args include the section
\r
55 title in their name, so for the sake of consistency, mirror that.
\r
57 Also, the "auto"matic part is a given, so that was dropped.
\r
59 notmuch-client.h | 4 ++--
\r
60 notmuch-config.c | 28 ++++++++++++++--------------
\r
61 notmuch-count.c | 12 ++++++------
\r
62 notmuch-search.c | 12 ++++++------
\r
63 4 files changed, 28 insertions(+), 28 deletions(-)
\r
65 diff --git a/notmuch-client.h b/notmuch-client.h
\r
66 index 9c1d383..f5414f6 100644
\r
67 --- a/notmuch-client.h
\r
68 +++ b/notmuch-client.h
\r
69 @@ -252,10 +252,10 @@ notmuch_config_set_maildir_synchronize_flags (notmuch_config_t *config,
\r
70 notmuch_bool_t synchronize_flags);
\r
73 -notmuch_config_get_auto_exclude_tags (notmuch_config_t *config, size_t *length);
\r
74 +notmuch_config_get_search_exclude_tags (notmuch_config_t *config, size_t *length);
\r
77 -notmuch_config_set_auto_exclude_tags (notmuch_config_t *config,
\r
78 +notmuch_config_set_search_exclude_tags (notmuch_config_t *config,
\r
82 diff --git a/notmuch-config.c b/notmuch-config.c
\r
83 index 8dcfe86..39da888 100644
\r
84 --- a/notmuch-config.c
\r
85 +++ b/notmuch-config.c
\r
86 @@ -89,7 +89,7 @@ static const char search_config_comment[] =
\r
88 " The following option is supported here:\n"
\r
90 - "\tauto_exclude_tags\n"
\r
91 + "\texclude_tags\n"
\r
92 "\t\tA ;-separated list of tags that will be excluded from\n"
\r
93 "\t\tsearch results by default. Using an excluded tag in a\n"
\r
94 "\t\tquery will override that exclusion.\n";
\r
95 @@ -106,8 +106,8 @@ struct _notmuch_config {
\r
96 const char **new_tags;
\r
97 size_t new_tags_length;
\r
98 notmuch_bool_t maildir_synchronize_flags;
\r
99 - const char **auto_exclude_tags;
\r
100 - size_t auto_exclude_tags_length;
\r
101 + const char **search_exclude_tags;
\r
102 + size_t search_exclude_tags_length;
\r
106 @@ -265,8 +265,8 @@ notmuch_config_open (void *ctx,
\r
107 config->new_tags = NULL;
\r
108 config->new_tags_length = 0;
\r
109 config->maildir_synchronize_flags = TRUE;
\r
110 - config->auto_exclude_tags = NULL;
\r
111 - config->auto_exclude_tags_length = 0;
\r
112 + config->search_exclude_tags = NULL;
\r
113 + config->search_exclude_tags_length = 0;
\r
115 if (! g_key_file_load_from_file (config->key_file,
\r
117 @@ -361,9 +361,9 @@ notmuch_config_open (void *ctx,
\r
118 notmuch_config_set_new_tags (config, tags, 2);
\r
121 - if (notmuch_config_get_auto_exclude_tags (config, &tmp) == NULL) {
\r
122 + if (notmuch_config_get_search_exclude_tags (config, &tmp) == NULL) {
\r
123 const char *tags[] = { "deleted", "spam" };
\r
124 - notmuch_config_set_auto_exclude_tags (config, tags, 2);
\r
125 + notmuch_config_set_search_exclude_tags (config, tags, 2);
\r
129 @@ -624,20 +624,20 @@ notmuch_config_set_new_tags (notmuch_config_t *config,
\r
133 -notmuch_config_get_auto_exclude_tags (notmuch_config_t *config, size_t *length)
\r
134 +notmuch_config_get_search_exclude_tags (notmuch_config_t *config, size_t *length)
\r
136 - return _config_get_list (config, "search", "auto_exclude_tags",
\r
137 - &(config->auto_exclude_tags),
\r
138 - &(config->auto_exclude_tags_length), length);
\r
139 + return _config_get_list (config, "search", "exclude_tags",
\r
140 + &(config->search_exclude_tags),
\r
141 + &(config->search_exclude_tags_length), length);
\r
145 -notmuch_config_set_auto_exclude_tags (notmuch_config_t *config,
\r
146 +notmuch_config_set_search_exclude_tags (notmuch_config_t *config,
\r
147 const char *list[],
\r
150 - _config_set_list (config, "search", "auto_exclude_tags", list, length,
\r
151 - &(config->auto_exclude_tags));
\r
152 + _config_set_list (config, "search", "exclude_tags", list, length,
\r
153 + &(config->search_exclude_tags));
\r
156 /* Given a configuration item of the form <group>.<key> return the
\r
157 diff --git a/notmuch-count.c b/notmuch-count.c
\r
158 index f77861e..63459fb 100644
\r
159 --- a/notmuch-count.c
\r
160 +++ b/notmuch-count.c
\r
161 @@ -35,8 +35,8 @@ notmuch_count_command (void *ctx, int argc, char *argv[])
\r
164 int output = OUTPUT_MESSAGES;
\r
165 - const char **auto_exclude_tags;
\r
166 - size_t auto_exclude_tags_length;
\r
167 + const char **search_exclude_tags;
\r
168 + size_t search_exclude_tags_length;
\r
171 notmuch_opt_desc_t options[] = {
\r
172 @@ -78,10 +78,10 @@ notmuch_count_command (void *ctx, int argc, char *argv[])
\r
176 - auto_exclude_tags = notmuch_config_get_auto_exclude_tags
\r
177 - (config, &auto_exclude_tags_length);
\r
178 - for (i = 0; i < auto_exclude_tags_length; i++)
\r
179 - notmuch_query_add_tag_exclude (query, auto_exclude_tags[i]);
\r
180 + search_exclude_tags = notmuch_config_get_search_exclude_tags
\r
181 + (config, &search_exclude_tags_length);
\r
182 + for (i = 0; i < search_exclude_tags_length; i++)
\r
183 + notmuch_query_add_tag_exclude (query, search_exclude_tags[i]);
\r
186 case OUTPUT_MESSAGES:
\r
187 diff --git a/notmuch-search.c b/notmuch-search.c
\r
188 index 8867aab..d504051 100644
\r
189 --- a/notmuch-search.c
\r
190 +++ b/notmuch-search.c
\r
191 @@ -423,8 +423,8 @@ notmuch_search_command (void *ctx, int argc, char *argv[])
\r
192 output_t output = OUTPUT_SUMMARY;
\r
194 int limit = -1; /* unlimited */
\r
195 - const char **auto_exclude_tags;
\r
196 - size_t auto_exclude_tags_length;
\r
197 + const char **search_exclude_tags;
\r
198 + size_t search_exclude_tags_length;
\r
201 enum { NOTMUCH_FORMAT_JSON, NOTMUCH_FORMAT_TEXT }
\r
202 @@ -493,10 +493,10 @@ notmuch_search_command (void *ctx, int argc, char *argv[])
\r
204 notmuch_query_set_sort (query, sort);
\r
206 - auto_exclude_tags = notmuch_config_get_auto_exclude_tags
\r
207 - (config, &auto_exclude_tags_length);
\r
208 - for (i = 0; i < auto_exclude_tags_length; i++)
\r
209 - notmuch_query_add_tag_exclude (query, auto_exclude_tags[i]);
\r
210 + search_exclude_tags = notmuch_config_get_search_exclude_tags
\r
211 + (config, &search_exclude_tags_length);
\r
212 + for (i = 0; i < search_exclude_tags_length; i++)
\r
213 + notmuch_query_add_tag_exclude (query, search_exclude_tags[i]);
\r