[PATCH 6/8] CLI: refactor dumping of tags.
[notmuch-archives.git] / 23 / 6f639328ad003fd8f7e71cca2dba1d2f9a1166
1 Return-Path: <dme@dme.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 D9F81431FC7\r
6         for <notmuch@notmuchmail.org>; Thu, 30 Oct 2014 01:20:02 -0700 (PDT)\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
8 X-Spam-Flag: NO\r
9 X-Spam-Score: -0.699\r
10 X-Spam-Level: \r
11 X-Spam-Status: No, score=-0.699 tagged_above=-999 required=5\r
12         tests=[RCVD_IN_DNSWL_LOW=-0.7, UNPARSEABLE_RELAY=0.001]\r
13         autolearn=disabled\r
14 Received: from olra.theworths.org ([127.0.0.1])\r
15         by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
16         with ESMTP id TlsvqjIrk1OB for <notmuch@notmuchmail.org>;\r
17         Thu, 30 Oct 2014 01:19:58 -0700 (PDT)\r
18 Received: from mail-wg0-f42.google.com (mail-wg0-f42.google.com\r
19  [74.125.82.42])        (using TLSv1 with cipher RC4-SHA (128/128 bits))        (No client\r
20  certificate requested) by olra.theworths.org (Postfix) with ESMTPS id\r
21  E7D50431FB6    for <notmuch@notmuchmail.org>; Thu, 30 Oct 2014 01:19:57 -0700\r
22  (PDT)\r
23 Received: by mail-wg0-f42.google.com with SMTP id k14so5042381wgh.1\r
24         for <notmuch@notmuchmail.org>; Thu, 30 Oct 2014 01:19:55 -0700 (PDT)\r
25 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;\r
26         d=1e100.net; s=20130820;\r
27         h=x-gm-message-state:to:cc:subject:in-reply-to:references:user-agent\r
28         :from:date:message-id:mime-version:content-type;\r
29         bh=HUqr1yqiBnfc7yjaToIUpRgA2mV2xWBn6da+R2mpJNk=;\r
30         b=ieoOO5W23sOnmTDO9AV1bAl3dPO/D+vEBf2klY9GLDLXT/UDK3b1wRRGgJGbYOXCl5\r
31         A1OHV5Q7rEVWVhU5rXX3Q0mwoIWa3E/vlhJsaGWOruP4GE4/EleL7xwQkBcfXKI70Kyi\r
32         0FVcupLWmDrl9AT5hYpL3brFNlreNTNhnpHMHwPScvFoFvZKnNx3W7JOMN9LVUmMpvgF\r
33         YsdIMNlOITBqZyuyRYQAvn4ycd1qJ2f32pImVGX2PYS/SovzwNXMA75fQAcbYGxpNXie\r
34         o3SVZWzBYtfb0u/e28NjuX59X9NbxCdLpGC3p6zdRHzuFbfZ5hlnSnr97jzsx5TPuefL\r
35         CfQg==\r
36 X-Gm-Message-State:\r
37  ALoCoQn70u0XxPsO0bgL5MD9ONztI3p2ZAw7h74cgzCpbI0aEYXtaZ55qaZJ2NcMtCFQ/EHcOoJn\r
38 X-Received: by 10.194.216.162 with SMTP id or2mr18332831wjc.68.1414657195578; \r
39         Thu, 30 Oct 2014 01:19:55 -0700 (PDT)\r
40 Received: from disaster-area.hh.sledj.net\r
41         ([2a01:348:1a2:1:ea39:35ff:fe2c:a227])\r
42         by mx.google.com with ESMTPSA id\r
43         bv17sm21346014wib.13.2014.10.30.01.19.54 for <multiple recipients>\r
44         (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);\r
45         Thu, 30 Oct 2014 01:19:54 -0700 (PDT)\r
46 Received: from localhost (30000@localhost [local]);\r
47         by localhost (OpenSMTPD) with ESMTPA id e5f5b7d4;\r
48         Thu, 30 Oct 2014 08:19:52 +0000 (UTC)\r
49 To: Jani Nikula <jani@nikula.org>, notmuch@notmuchmail.org\r
50 Subject: Re: [PATCH] cli: notmuch search --duplicate=N is only supported with\r
51         --output=files\r
52 In-Reply-To: <1414611043-3498-1-git-send-email-jani@nikula.org>\r
53 References: <cunr3xqolg8.fsf@gargravarr.hh.sledj.net>\r
54         <1414611043-3498-1-git-send-email-jani@nikula.org>\r
55 User-Agent: Notmuch/0.18.1 (http://notmuchmail.org) Emacs/24.3.1\r
56         (x86_64-apple-darwin14.0.0)\r
57 From: David Edmondson <dme@dme.org>\r
58 Date: Thu, 30 Oct 2014 08:19:53 +0000\r
59 Message-ID: <m28ujy6kba.fsf@dme.org>\r
60 MIME-Version: 1.0\r
61 Content-Type: text/plain\r
62 X-BeenThere: notmuch@notmuchmail.org\r
63 X-Mailman-Version: 2.1.13\r
64 Precedence: list\r
65 List-Id: "Use and development of the notmuch mail system."\r
66         <notmuch.notmuchmail.org>\r
67 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
68         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
69 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
70 List-Post: <mailto:notmuch@notmuchmail.org>\r
71 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
72 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
73         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
74 X-List-Received-Date: Thu, 30 Oct 2014 08:20:03 -0000\r
75 \r
76 This works, in so much as it doesn't allow the deranged behaviour.\r
77 \r
78 Consequentially, --duplicate seems a bit useless. Unless I feed it a\r
79 single id: as an argument (in which case I could use --output=files), I\r
80 have to figure out which of the files output are duplicates of each\r
81 other and which are from different messages. How is that useful?\r
82 \r
83 On Wed, Oct 29 2014, Jani Nikula wrote:\r
84 > Check the supported combination, and bail out for other combinations.\r
85 > ---\r
86 >  notmuch-search.c | 5 +++++\r
87 >  1 file changed, 5 insertions(+)\r
88 >\r
89 > diff --git a/notmuch-search.c b/notmuch-search.c\r
90 > index bc9be4593ecc..3bb5a7fbc885 100644\r
91 > --- a/notmuch-search.c\r
92 > +++ b/notmuch-search.c\r
93 > @@ -387,6 +387,11 @@ notmuch_search_command (notmuch_config_t *config, int argc, char *argv[])\r
94 >      if (opt_index < 0)\r
95 >       return EXIT_FAILURE;\r
96 >  \r
97 > +    if (output != OUTPUT_FILES && dupe != -1) {\r
98 > +     fprintf (stderr, "Error: --duplicate=N is only supported with --output=files.\n");\r
99 > +     return EXIT_FAILURE;\r
100 > +    }\r
101 > +\r
102 >      switch (format_sel) {\r
103 >      case NOTMUCH_FORMAT_TEXT:\r
104 >       format = sprinter_text_create (config, stdout);\r
105 > -- \r
106 > 2.1.1\r