--- /dev/null
+Return-Path: <m.walters@qmul.ac.uk>\r
+X-Original-To: notmuch@notmuchmail.org\r
+Delivered-To: notmuch@notmuchmail.org\r
+Received: from localhost (localhost [127.0.0.1])\r
+ by olra.theworths.org (Postfix) with ESMTP id 371FA429E37\r
+ for <notmuch@notmuchmail.org>; Tue, 4 Nov 2014 00:58:50 -0800 (PST)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: -1.098\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=-1.098 tagged_above=-999 required=5\r
+ tests=[DKIM_ADSP_CUSTOM_MED=0.001, FREEMAIL_FROM=0.001,\r
+ NML_ADSP_CUSTOM_MED=1.2, RCVD_IN_DNSWL_MED=-2.3] autolearn=disabled\r
+Received: from olra.theworths.org ([127.0.0.1])\r
+ by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
+ with ESMTP id 3c0Sy8otcRZX for <notmuch@notmuchmail.org>;\r
+ Tue, 4 Nov 2014 00:58:46 -0800 (PST)\r
+Received: from mail2.qmul.ac.uk (mail2.qmul.ac.uk [138.37.6.6])\r
+ (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))\r
+ (No client certificate requested)\r
+ by olra.theworths.org (Postfix) with ESMTPS id D7E6E429E35\r
+ for <notmuch@notmuchmail.org>; Tue, 4 Nov 2014 00:58:45 -0800 (PST)\r
+Received: from smtp.qmul.ac.uk ([138.37.6.40])\r
+ by mail2.qmul.ac.uk with esmtp (Exim 4.71)\r
+ (envelope-from <m.walters@qmul.ac.uk>)\r
+ id 1XlZwV-00026G-7W; Tue, 04 Nov 2014 08:58:41 +0000\r
+Received: from 5751dfa2.skybroadband.com ([87.81.223.162] helo=localhost)\r
+ by smtp.qmul.ac.uk with esmtpsa (TLSv1:AES128-SHA:128) (Exim 4.71)\r
+ (envelope-from <m.walters@qmul.ac.uk>)\r
+ id 1XlZwU-0002Lx-SP; Tue, 04 Nov 2014 08:58:23 +0000\r
+From: Mark Walters <markwalters1009@gmail.com>\r
+To: Michal Sojka <sojkam1@fel.cvut.cz>, notmuch@notmuchmail.org\r
+Subject: Re: [PATCH v2 07/10] cli: search: Convert --output to keyword\r
+ argument\r
+In-Reply-To: <1415058622-21162-8-git-send-email-sojkam1@fel.cvut.cz>\r
+References: <1415058622-21162-1-git-send-email-sojkam1@fel.cvut.cz>\r
+ <1415058622-21162-8-git-send-email-sojkam1@fel.cvut.cz>\r
+User-Agent: Notmuch/0.18.1+86~gef5e66a (http://notmuchmail.org) Emacs/23.4.1\r
+ (x86_64-pc-linux-gnu)\r
+Date: Tue, 04 Nov 2014 08:58:19 +0000\r
+Message-ID: <87389z4a1g.fsf@qmul.ac.uk>\r
+MIME-Version: 1.0\r
+Content-Type: text/plain; charset=us-ascii\r
+X-Sender-Host-Address: 87.81.223.162\r
+X-QM-Geographic: According to ripencc,\r
+ this message was delivered by a machine in Britain (UK) (GB).\r
+X-QM-SPAM-Info: Sender has good ham record. :)\r
+X-QM-Body-MD5: 2ffed30c683d5ec2a31957858d855520 (of first 20000 bytes)\r
+X-SpamAssassin-Score: -0.1\r
+X-SpamAssassin-SpamBar: /\r
+X-SpamAssassin-Report: The QM spam filters have analysed this message to\r
+ determine if it is\r
+ spam. We require at least 5.0 points to mark a message as spam.\r
+ This message scored -0.1 points.\r
+ Summary of the scoring: \r
+ * 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail\r
+ provider * (markwalters1009[at]gmail.com)\r
+ * -0.1 AWL AWL: From: address is in the auto white-list\r
+X-QM-Scan-Virus: ClamAV says the message is clean\r
+X-BeenThere: notmuch@notmuchmail.org\r
+X-Mailman-Version: 2.1.13\r
+Precedence: list\r
+List-Id: "Use and development of the notmuch mail system."\r
+ <notmuch.notmuchmail.org>\r
+List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
+ <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
+List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
+List-Post: <mailto:notmuch@notmuchmail.org>\r
+List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
+List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
+ <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
+X-List-Received-Date: Tue, 04 Nov 2014 08:58:50 -0000\r
+\r
+\r
+Hi\r
+\r
+On Mon, 03 Nov 2014, Michal Sojka <sojkam1@fel.cvut.cz> wrote:\r
+> Now, when address related outputs are in a separate command, it makes\r
+> no sense to combine multiple --output options in search command line.\r
+> Using switch statement to handle different outputs is more readable\r
+> than a series of if statements.\r
+\r
+I am not keen on this change: I think the user should always be able to\r
+force the default output by setting command line options (which should\r
+protect against future changes in the default). Thus I would like to\r
+continue to allow --output=sender --output=recipients. \r
+\r
+I do approve of making the default do something useful but whether it\r
+should be both or just sender (which is much faster) is unclear to me.\r
+\r
+Best wishes\r
+\r
+Mark\r
+\r
+ \r
+> ---\r
+> doc/man1/notmuch-search.rst | 3 ---\r
+> notmuch-search.c | 25 +++++++++++++------------\r
+> 2 files changed, 13 insertions(+), 15 deletions(-)\r
+>\r
+> diff --git a/doc/man1/notmuch-search.rst b/doc/man1/notmuch-search.rst\r
+> index 65df288..0cc2911 100644\r
+> --- a/doc/man1/notmuch-search.rst\r
+> +++ b/doc/man1/notmuch-search.rst\r
+> @@ -78,9 +78,6 @@ Supported options for **search** include\r
+> by null characters (--format=text0), as a JSON array\r
+> (--format=json), or as an S-Expression list (--format=sexp).\r
+> \r
+> - This option can be given multiple times to combine different\r
+> - outputs.\r
+> -\r
+> ``--sort=``\ (**newest-first**\ \|\ **oldest-first**)\r
+> This option can be used to present results in either\r
+> chronological order (**oldest-first**) or reverse chronological\r
+> diff --git a/notmuch-search.c b/notmuch-search.c\r
+> index cbd84f5..402e860 100644\r
+> --- a/notmuch-search.c\r
+> +++ b/notmuch-search.c\r
+> @@ -593,7 +593,7 @@ notmuch_search_command (notmuch_config_t *config, int argc, char *argv[])\r
+> int opt_index, ret;\r
+> \r
+> notmuch_opt_desc_t options[] = {\r
+> - { NOTMUCH_OPT_KEYWORD_FLAGS, &ctx->output, "output", 'o',\r
+> + { NOTMUCH_OPT_KEYWORD, &ctx->output, "output", 'o',\r
+> (notmuch_keyword_t []){ { "summary", OUTPUT_SUMMARY },\r
+> { "threads", OUTPUT_THREADS },\r
+> { "messages", OUTPUT_MESSAGES },\r
+> @@ -607,13 +607,11 @@ notmuch_search_command (notmuch_config_t *config, int argc, char *argv[])\r
+> { 0, 0, 0, 0, 0 }\r
+> };\r
+> \r
+> + ctx->output = OUTPUT_SUMMARY;\r
+> opt_index = parse_arguments (argc, argv, options, 1);\r
+> if (opt_index < 0)\r
+> return EXIT_FAILURE;\r
+> \r
+> - if (! ctx->output)\r
+> - ctx->output = OUTPUT_SUMMARY;\r
+> -\r
+> if (ctx->output != OUTPUT_FILES && ctx->output != OUTPUT_MESSAGES &&\r
+> ctx->dupe != -1) {\r
+> fprintf (stderr, "Error: --duplicate=N is only supported with --output=files and --output=messages.\n");\r
+> @@ -624,17 +622,20 @@ notmuch_search_command (notmuch_config_t *config, int argc, char *argv[])\r
+> argc - opt_index, argv + opt_index))\r
+> return EXIT_FAILURE;\r
+> \r
+> - if (ctx->output == OUTPUT_SUMMARY ||\r
+> - ctx->output == OUTPUT_THREADS)\r
+> + switch (ctx->output) {\r
+> + case OUTPUT_SUMMARY:\r
+> + case OUTPUT_THREADS:\r
+> ret = do_search_threads (ctx);\r
+> - else if (ctx->output == OUTPUT_MESSAGES ||\r
+> - ctx->output == OUTPUT_FILES)\r
+> + break;\r
+> + case OUTPUT_MESSAGES:\r
+> + case OUTPUT_FILES:\r
+> ret = do_search_messages (ctx);\r
+> - else if (ctx->output == OUTPUT_TAGS)\r
+> + break;\r
+> + case OUTPUT_TAGS:\r
+> ret = do_search_tags (ctx);\r
+> - else {\r
+> - fprintf (stderr, "Error: the combination of outputs is not supported.\n");\r
+> - ret = 1;\r
+> + break;\r
+> + default:\r
+> + INTERNAL_ERROR ("Unexpected output");\r
+> }\r
+> \r
+> _notmuch_search_cleanup (ctx);\r
+> -- \r
+> 2.1.1\r
+>\r
+> _______________________________________________\r
+> notmuch mailing list\r
+> notmuch@notmuchmail.org\r
+> http://notmuchmail.org/mailman/listinfo/notmuch\r