Return-Path: X-Original-To: notmuch@notmuchmail.org Delivered-To: notmuch@notmuchmail.org Received: from localhost (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id 16DE6429E54 for ; Sun, 22 Jan 2012 20:35:06 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org X-Spam-Flag: NO X-Spam-Score: -0.7 X-Spam-Level: X-Spam-Status: No, score=-0.7 tagged_above=-999 required=5 tests=[RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled Received: from olra.theworths.org ([127.0.0.1]) by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id prRedKb+PTPe for ; Sun, 22 Jan 2012 20:35:05 -0800 (PST) Received: from dmz-mailsec-scanner-6.mit.edu (DMZ-MAILSEC-SCANNER-6.MIT.EDU [18.7.68.35]) by olra.theworths.org (Postfix) with ESMTP id 8E2D9429E40 for ; Sun, 22 Jan 2012 20:35:05 -0800 (PST) X-AuditID: 12074423-b7f9c6d0000008c3-98-4f1ce379d373 Received: from mailhub-auth-3.mit.edu ( [18.9.21.43]) by dmz-mailsec-scanner-6.mit.edu (Symantec Messaging Gateway) with SMTP id 96.CD.02243.973EC1F4; Sun, 22 Jan 2012 23:35:05 -0500 (EST) Received: from outgoing.mit.edu (OUTGOING-AUTH.MIT.EDU [18.7.22.103]) by mailhub-auth-3.mit.edu (8.13.8/8.9.2) with ESMTP id q0N4Z4ep029157; Sun, 22 Jan 2012 23:35:04 -0500 Received: from awakening.csail.mit.edu (awakening.csail.mit.edu [18.26.4.91]) (authenticated bits=0) (User authenticated as amdragon@ATHENA.MIT.EDU) by outgoing.mit.edu (8.13.6/8.12.4) with ESMTP id q0N4Z2dm023568 (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=NOT); Sun, 22 Jan 2012 23:35:03 -0500 (EST) Received: from amthrax by awakening.csail.mit.edu with local (Exim 4.77) (envelope-from ) id 1RpBc3-0002LU-5f; Sun, 22 Jan 2012 23:34:35 -0500 Date: Sun, 22 Jan 2012 23:34:35 -0500 From: Austin Clements To: Pieter Praet Subject: Re: [PATCH v2 5/6] setup: prompt user for search.exclude_tags value Message-ID: <20120123043435.GR16740@mit.edu> References: <87obtvaw8h.fsf@praet.org> <1327292557-7701-5-git-send-email-pieter@praet.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1327292557-7701-5-git-send-email-pieter@praet.org> User-Agent: Mutt/1.5.21 (2010-09-15) X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFmpmleLIzCtJLcpLzFFi42IR4hTV1q18LONvcOkBl8X1mzOZLX6/vsHs wOTxbNUtZo+OfZdZA5iiuGxSUnMyy1KL9O0SuDIeP3EqaOWpaN32kKmBcRZnFyMnh4SAiUTb 7bssELaYxIV769m6GLk4hAT2MUq0nVnFBOFsYJTo37qXBcI5ySQx5+9fVghnCaPE16ldzCD9 LAKqEot+vmUCsdkENCS27V/OCGKLCChLnH7ykx3EZhbQkti68QNYXFjAR+L4nL9sIDavgI7E xiv3weYICcRIvD65ixEiLihxcuYTFpjeG/9eAs3nALKlJZb/4wAJcwo4SJzbvxKsXFRARWLK yW1sExiFZiHpnoWkexZC9wJG5lWMsim5Vbq5iZk5xanJusXJiXl5qUW6Znq5mSV6qSmlmxhB Yc3uoryD8c9BpUOMAhyMSjy8kUtl/IVYE8uKK3MPMUpyMCmJ8q69CxTiS8pPqcxILM6ILyrN SS0+xCjBwawkwuv8WdpfiDclsbIqtSgfJiXNwaIkzquh9c5PSCA9sSQ1OzW1ILUIJivDwaEk wXvrEdBQwaLU9NSKtMycEoQ0EwcnyHAeoOGMwDQgxFtckJhbnJkOkT/FqCglzvsMpFkAJJFR mgfXC0s7rxjFgV4R5mUAaecBpiy47ldAg5mABnPkSYEMLklESEk1MK49Zes06fYquXyLPWlB zqqXq+uVH2xNN1nQ+m9VtyN33q7GcP8EpwA2punX1nQyeFy89/j3nYQf3xv3/l0zb66naOiT 9tCzUzZx/bap3tZufvFDnNK7tTbyXRsOq7x/JRLoJdxqIPkvfpfldae7FSx6IW3eNa8e1Sk5 cp2MFXx9fPkZ3jtV7kosxRmJhlrMRcWJABOcAGMWAwAA Cc: Notmuch Mail X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: "Use and development of the notmuch mail system." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Jan 2012 04:35:06 -0000 Quoth Pieter Praet on Jan 23 at 5:22 am: > Allow users to customize the search.exclude_tags option during setup. > --- > notmuch-setup.c | 21 +++++++++++++++++++++ > 1 files changed, 21 insertions(+), 0 deletions(-) > > diff --git a/notmuch-setup.c b/notmuch-setup.c > index dcfa607..0d75adc 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 { \ > @@ -208,6 +210,25 @@ notmuch_setup_command (unused (void *ctx), > g_ptr_array_free (tags, TRUE); > } > > + > + 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); Missing space before paren. > + prompt ("]: "); > + > + if (strlen (response)) { > + GPtrArray *tags = parse_tag_list (ctx, response); > + > + notmuch_config_set_search_exclude_tags (config, > + (const char **) > + tags->pdata, No newline is needed between the case and the value. > + tags->len); > + > + g_ptr_array_free (tags, TRUE); > + } > + > + > if (! notmuch_config_save (config)) { > if (is_new) > welcome_message_post_setup ();