Re: [PATCH] Fix typo in Message.maildir_flags_to_tags
[notmuch-archives.git] / 16 / 42ad8d30236ed4f5a0d648f19134a8e0515125
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 D3676421198\r
6         for <notmuch@notmuchmail.org>; Sun, 22 Jan 2012 20:24:58 -0800 (PST)\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
8 X-Spam-Flag: NO\r
9 X-Spam-Score: -0.7\r
10 X-Spam-Level: \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 4UvkTwfrQRnd for <notmuch@notmuchmail.org>;\r
16         Sun, 22 Jan 2012 20:24:58 -0800 (PST)\r
17 Received: from mail-ww0-f45.google.com (mail-ww0-f45.google.com\r
18  [74.125.82.45])        (using TLSv1 with cipher RC4-SHA (128/128 bits))        (No client\r
19  certificate requested) by olra.theworths.org (Postfix) with ESMTPS id\r
20  3839442119C    for <notmuch@notmuchmail.org>; Sun, 22 Jan 2012 20:24:58 -0800\r
21  (PST)\r
22 Received: by mail-ww0-f45.google.com with SMTP id dt12so2215149wgb.2\r
23         for <notmuch@notmuchmail.org>; Sun, 22 Jan 2012 20:24:57 -0800 (PST)\r
24 MIME-Version: 1.0\r
25 Received: by 10.180.96.161 with SMTP id dt1mr11194874wib.13.1327292697862;\r
26         Sun, 22 Jan 2012 20:24:57 -0800 (PST)\r
27 Received: from localhost ([109.131.95.182])\r
28         by mx.google.com with ESMTPS id ex2sm36898420wib.1.2012.01.22.20.24.57\r
29         (version=TLSv1/SSLv3 cipher=OTHER);\r
30         Sun, 22 Jan 2012 20:24:57 -0800 (PST)\r
31 From: Pieter Praet <pieter@praet.org>\r
32 To: Austin Clements <amdragon@mit.edu>\r
33 Subject: [PATCH v2 5/6] setup: prompt user for search.exclude_tags value\r
34 Date: Mon, 23 Jan 2012 05:22:36 +0100\r
35 Message-Id: <1327292557-7701-5-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 X-Gm-Message-State:\r
40  ALoCoQm3q+r4I6IDPmg6sM8ycVGrSKjPgVExGWdF/cAMfbysdK7kENFZOaRWYAjYsTxSrlDFnbBh\r
41 Cc: Notmuch Mail <notmuch@notmuchmail.org>\r
42 X-BeenThere: notmuch@notmuchmail.org\r
43 X-Mailman-Version: 2.1.13\r
44 Precedence: list\r
45 List-Id: "Use and development of the notmuch mail system."\r
46         <notmuch.notmuchmail.org>\r
47 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
48         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
49 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
50 List-Post: <mailto:notmuch@notmuchmail.org>\r
51 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
52 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
53         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
54 X-List-Received-Date: Mon, 23 Jan 2012 04:24:59 -0000\r
55 \r
56 Allow users to customize the search.exclude_tags option during setup.\r
57 ---\r
58  notmuch-setup.c |   21 +++++++++++++++++++++\r
59  1 files changed, 21 insertions(+), 0 deletions(-)\r
60 \r
61 diff --git a/notmuch-setup.c b/notmuch-setup.c\r
62 index dcfa607..0d75adc 100644\r
63 --- a/notmuch-setup.c\r
64 +++ b/notmuch-setup.c\r
65 @@ -133,6 +133,8 @@ notmuch_setup_command (unused (void *ctx),\r
66      int is_new;\r
67      const char **new_tags;\r
68      size_t new_tags_len;\r
69 +    const char **search_exclude_tags;\r
70 +    size_t search_exclude_tags_len;\r
71  \r
72  #define prompt(format, ...)                                    \\r
73      do {                                                       \\r
74 @@ -208,6 +210,25 @@ notmuch_setup_command (unused (void *ctx),\r
75         g_ptr_array_free (tags, TRUE);\r
76      }\r
77  \r
78 +\r
79 +    search_exclude_tags = notmuch_config_get_search_exclude_tags (config, &search_exclude_tags_len);\r
80 +\r
81 +    printf ("Tags to exclude when searching messages (separated by spaces) [");\r
82 +    print_tag_list(search_exclude_tags, search_exclude_tags_len);\r
83 +    prompt ("]: ");\r
84 +\r
85 +    if (strlen (response)) {\r
86 +       GPtrArray *tags = parse_tag_list (ctx, response);\r
87 +\r
88 +       notmuch_config_set_search_exclude_tags (config,\r
89 +                                               (const char **)\r
90 +                                               tags->pdata,\r
91 +                                               tags->len);\r
92 +\r
93 +       g_ptr_array_free (tags, TRUE);\r
94 +    }\r
95 +\r
96 +\r
97      if (! notmuch_config_save (config)) {\r
98         if (is_new)\r
99           welcome_message_post_setup ();\r
100 -- \r
101 1.7.8.1\r
102 \r