aboutsummaryrefslogtreecommitdiffhomepage
path: root/notmuch-setup.c
diff options
context:
space:
mode:
authorGravatar David Bremner <bremner@debian.org>2012-03-03 08:56:15 -0400
committerGravatar David Bremner <bremner@debian.org>2012-03-03 11:56:47 -0400
commit4b3af0e4443f88f302f09a7a6099a31103d862d6 (patch)
tree09faebca5b0705650751c066502be18ab753d52d /notmuch-setup.c
parentad6a6edb38e428f7bbcd81b49fd2ef1e5197f8c7 (diff)
Make exclusion visible again
This reverts dfee0f9 man: remove search.exclude_tags from notmuch-config.1 for 0.12 e83409d NEWS: revert NEWS item for exclude tags for 0.12 e77b031 config: disable addition of exclude tags for 0.12
Diffstat (limited to 'notmuch-setup.c')
-rw-r--r--notmuch-setup.c19
1 files changed, 18 insertions, 1 deletions
diff --git a/notmuch-setup.c b/notmuch-setup.c
index 307231d5..94d0aa7b 100644
--- a/notmuch-setup.c
+++ b/notmuch-setup.c
@@ -133,6 +133,8 @@ notmuch_setup_command (unused (void *ctx),
int is_new;
const char **new_tags;
size_t new_tags_len;
+ const char **search_exclude_tags;
+ size_t search_exclude_tags_len;
#define prompt(format, ...) \
do { \
@@ -209,7 +211,22 @@ notmuch_setup_command (unused (void *ctx),
}
- /* Temporarily remove exclude tag support for 0.12 */
+ search_exclude_tags = notmuch_config_get_search_exclude_tags (config, &search_exclude_tags_len);
+
+ printf ("Tags to exclude when searching messages (separated by spaces) [");
+ print_tag_list (search_exclude_tags, search_exclude_tags_len);
+ prompt ("]: ");
+
+ if (strlen (response)) {
+ GPtrArray *tags = parse_tag_list (ctx, response);
+
+ notmuch_config_set_search_exclude_tags (config,
+ (const char **) tags->pdata,
+ tags->len);
+
+ g_ptr_array_free (tags, TRUE);
+ }
+
if (! notmuch_config_save (config)) {
if (is_new)