--- /dev/null
+Return-Path: <jani@nikula.org>\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 7F119431FBC\r
+ for <notmuch@notmuchmail.org>; Fri, 9 Mar 2012 15:01:03 -0800 (PST)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: -0.7\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=-0.7 tagged_above=-999 required=5\r
+ tests=[RCVD_IN_DNSWL_LOW=-0.7] 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 SKpXuWLlrQvq for <notmuch@notmuchmail.org>;\r
+ Fri, 9 Mar 2012 15:01:01 -0800 (PST)\r
+Received: from mail-lpp01m010-f53.google.com (mail-lpp01m010-f53.google.com\r
+ [209.85.215.53]) (using TLSv1 with cipher RC4-SHA (128/128 bits))\r
+ (No client certificate requested)\r
+ by olra.theworths.org (Postfix) with ESMTPS id 4AD36431FAE\r
+ for <notmuch@notmuchmail.org>; Fri, 9 Mar 2012 15:01:01 -0800 (PST)\r
+Received: by lahc1 with SMTP id c1so2270700lah.26\r
+ for <notmuch@notmuchmail.org>; Fri, 09 Mar 2012 15:00:59 -0800 (PST)\r
+X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;\r
+ d=google.com; s=20120113;\r
+ h=from:to:subject:in-reply-to:references:user-agent:date:message-id\r
+ :mime-version:content-type:x-gm-message-state;\r
+ bh=JSrPuOJ0OocCLZ9O/qmQ7nI2ulpRYOOj5+ZuQIsRLq0=;\r
+ b=M5/Hl4aMnvK5YuMK9mNd1++77jmVvOfc8F3hwqTz1UOR2LKK2uBJxlT3FBbw8z1kdp\r
+ Ml5vaHUtbNn1on9iXWMQ9H2uHHzQTtOpZhqnPPYaWJ0J+79M4fI8qzTMQHWC48s5YREO\r
+ oBok4NU5+fmooh4NgPkvJdx5BmwC4ySFkiw/UGsfN83CJQYuTrVvTszZcbHvkaffALBz\r
+ Z3oaOQivL0PIlWTHEo4O/zDWHbsIStBX3V84i8vUkmz5w5hyqYa7hn8Z8gqc49GZ+lh4\r
+ +QuZYbgRZ+KXyHSouMLE+wJMdZrCEDxyetvoX5r7+V5HV54Grrh85CPcZosQsQxlgya8\r
+ d77Q==\r
+Received: by 10.112.36.65 with SMTP id o1mr1499718lbj.32.1331334059581;\r
+ Fri, 09 Mar 2012 15:00:59 -0800 (PST)\r
+Received: from localhost (dsl-hkibrasgw4-fe50f800-253.dhcp.inet.fi.\r
+ [84.248.80.253])\r
+ by mx.google.com with ESMTPS id a8sm8039538lba.15.2012.03.09.15.00.57\r
+ (version=SSLv3 cipher=OTHER); Fri, 09 Mar 2012 15:00:58 -0800 (PST)\r
+From: Jani Nikula <jani@nikula.org>\r
+To: Adam Wolfe Gordon <awg+notmuch@xvx.ca>, notmuch@notmuchmail.org\r
+Subject: Re: [PATCH v6 03/10] reply: Require that only one message is returned\r
+In-Reply-To: <1329893199-21630-4-git-send-email-awg+notmuch@xvx.ca>\r
+References: <1329893199-21630-1-git-send-email-awg+notmuch@xvx.ca>\r
+ <1329893199-21630-4-git-send-email-awg+notmuch@xvx.ca>\r
+User-Agent: Notmuch/0.11.1+295~g780f284 (http://notmuchmail.org) Emacs/23.3.1\r
+ (i686-pc-linux-gnu)\r
+Date: Sat, 10 Mar 2012 01:00:54 +0200\r
+Message-ID: <87fwdh8jmh.fsf@nikula.org>\r
+MIME-Version: 1.0\r
+Content-Type: text/plain; charset=us-ascii\r
+X-Gm-Message-State:\r
+ ALoCoQm1+QFpoc6BcDfyW5VvtsOGLFjAH2uWVne1Jm30EVJVeDsu9/oB1axGIn4EfpA3uiB6590v\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: Fri, 09 Mar 2012 23:01:03 -0000\r
+\r
+On Tue, 21 Feb 2012 23:46:32 -0700, Adam Wolfe Gordon <awg+notmuch@xvx.ca> wrote:\r
+> As the semantics of replying to multiple messages have not yet been\r
+> defined well, make notmuch reply require that the search given returns\r
+> only a single message.\r
+\r
+Is there any real reason, apart from consistency between\r
+--format=default and --format=json, to disable the current multiple\r
+message reply? Also "notmuch show" has format specific features and\r
+limitations.\r
+\r
+I agree the semantics should be clarified, and eventually multiple\r
+message reply should be uniformly supported by all formats, including\r
+--format=json, but IMHO this patch should be dropped (and the TODO patch\r
+amended accordingly).\r
+\r
+BR,\r
+Jani.\r
+\r
+\r
+> ---\r
+> notmuch-reply.c | 36 +++++++++++++++++++-----------------\r
+> 1 files changed, 19 insertions(+), 17 deletions(-)\r
+> \r
+> diff --git a/notmuch-reply.c b/notmuch-reply.c\r
+> index 8e56245..177e6ca 100644\r
+> --- a/notmuch-reply.c\r
+> +++ b/notmuch-reply.c\r
+> @@ -572,30 +572,32 @@ notmuch_reply_format_default(void *ctx,\r
+> notmuch_message_t *message;\r
+> const notmuch_show_format_t *format = &format_reply;\r
+> \r
+> - for (messages = notmuch_query_search_messages (query);\r
+> - notmuch_messages_valid (messages);\r
+> - notmuch_messages_move_to_next (messages))\r
+> - {\r
+> - message = notmuch_messages_get (messages);\r
+> + if (notmuch_query_count_messages (query) != 1) {\r
+> + fprintf (stderr, "Error: search term did not match precisely one message.\n");\r
+> + return 1;\r
+> + }\r
+> \r
+> - reply = create_reply_message (ctx, config, message, reply_all);\r
+> + messages = notmuch_query_search_messages (query);\r
+> + message = notmuch_messages_get (messages);\r
+> \r
+> - if (!reply)\r
+> - continue;\r
+> + reply = create_reply_message (ctx, config, message, reply_all);\r
+> \r
+> - show_reply_headers (reply);\r
+> + if (!reply)\r
+> + return 1;\r
+> \r
+> - g_object_unref (G_OBJECT (reply));\r
+> - reply = NULL;\r
+> + show_reply_headers (reply);\r
+> \r
+> - printf ("On %s, %s wrote:\n",\r
+> - notmuch_message_get_header (message, "date"),\r
+> - notmuch_message_get_header (message, "from"));\r
+> + g_object_unref (G_OBJECT (reply));\r
+> + reply = NULL;\r
+> \r
+> - show_message_body (message, format, params);\r
+> + printf ("On %s, %s wrote:\n",\r
+> + notmuch_message_get_header (message, "date"),\r
+> + notmuch_message_get_header (message, "from"));\r
+> +\r
+> + show_message_body (message, format, params);\r
+> +\r
+> + notmuch_message_destroy (message);\r
+> \r
+> - notmuch_message_destroy (message);\r
+> - }\r
+> return 0;\r
+> }\r
+> \r
+> -- \r
+> 1.7.5.4\r
+> \r
+> _______________________________________________\r
+> notmuch mailing list\r
+> notmuch@notmuchmail.org\r
+> http://notmuchmail.org/mailman/listinfo/notmuch\r