--- /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 arlo.cworth.org (Postfix) with ESMTP id 47DF56DE3BB8\r
+ for <notmuch@notmuchmail.org>; Sat, 13 Aug 2016 04:42:06 -0700 (PDT)\r
+X-Virus-Scanned: Debian amavisd-new at cworth.org\r
+X-Amavis-Alert: BAD HEADER SECTION, Duplicate header field: "References"\r
+X-Spam-Flag: NO\r
+X-Spam-Score: 0.258\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=0.258 tagged_above=-999 required=5 tests=[AWL=0.978, \r
+ DKIM_SIGNED=0.1, DKIM_VALID=-0.1, RCVD_IN_DNSWL_LOW=-0.7,\r
+ RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01] autolearn=disabled\r
+Received: from arlo.cworth.org ([127.0.0.1])\r
+ by localhost (arlo.cworth.org [127.0.0.1]) (amavisd-new, port 10024)\r
+ with ESMTP id aX6zWSfjp15I for <notmuch@notmuchmail.org>;\r
+ Sat, 13 Aug 2016 04:41:58 -0700 (PDT)\r
+Received: from mail-wm0-f68.google.com (mail-wm0-f68.google.com\r
+ [74.125.82.68]) by arlo.cworth.org (Postfix) with ESMTPS id 0270D6DE38CC for\r
+ <notmuch@notmuchmail.org>; Sat, 13 Aug 2016 04:39:29 -0700 (PDT)\r
+Received: by mail-wm0-f68.google.com with SMTP id i138so2005161wmf.3\r
+ for <notmuch@notmuchmail.org>; Sat, 13 Aug 2016 04:39:28 -0700 (PDT)\r
+DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;\r
+ d=nikula-org.20150623.gappssmtp.com; s=20150623;\r
+ h=from:to:cc:subject:date:message-id:in-reply-to:references\r
+ :in-reply-to:references;\r
+ bh=sXFKrcZlopHTqxt+2oZpuv7kSjYwfHt0jv/D1LfLMiA=;\r
+ b=Np7vZjo3xd1CpTP3mQA7HMJMgv9MDtF/KyMHr1zBrOKpIr3bpU3g5qM/QSfTPAtsmY\r
+ ZG8PJblGgpb0a7eC9r/2yMdF74rWWGwq/iFq7TOzkGWqbNvG1LmdrQDEVoGtHsa1ddvv\r
+ b2KR5nhcFtDU7ZwAxWOzvWw779DCVAdWGXkIvOMgDkidTFo5rJ2IEg06faG11y9p8ACv\r
+ fK52BLpRRZCz3zh7bjNRUqiD3+x9403nZgxdE4v+jTGA/w4BtzW3vuUHEmLcrY7aY/36\r
+ 2u6diSHbho6ZhubeT8dts6GK2jD1Q7HsbBlR213faUCi8OHbUUFXex1VMdqAqfA/KF5c\r
+ zgiw==\r
+X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;\r
+ d=1e100.net; s=20130820;\r
+ h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to\r
+ :references:in-reply-to:references;\r
+ bh=sXFKrcZlopHTqxt+2oZpuv7kSjYwfHt0jv/D1LfLMiA=;\r
+ b=VaPELLptwrBe8xi37WDKP5TRj5VuqQR9DnHNqOt4v2OUN47qLCxolvwZIbtmlp3W7e\r
+ LI+oYJOXKn844z7va3tncyLq1gCxjCIF51LxRnAGZ8D/YmrVHSXSucmEgEg04ZolsSUw\r
+ mtgVSmV443IcFHeKWFyzCnTo9JXUL0Yc4RiJ+fhAIDQMOEnVCQFXvzZXz4tgeofLbTMv\r
+ T4yC0jjx2M/Urh+vJ7iAvveYwkkbthKpXhAiRjF9ItS9wjcBmtDIyvLQPdHvR6PWyR8q\r
+ BvIT4qVv8zryksxxldsct+5RXTFTmElz2HMJnnrnf9zxWisqx0026Lf9cbl/IR4wgXNg\r
+ 8U8g==\r
+X-Gm-Message-State:\r
+ AEkoousjDToWABSkL+vq3RVgIufxEefVyBqmvAV/Xn0AflD9OwSZElTxsk1ldCWCEdI2VQ==\r
+X-Received: by 10.195.11.104 with SMTP id eh8mr19963139wjd.128.1471088363229; \r
+ Sat, 13 Aug 2016 04:39:23 -0700 (PDT)\r
+Received: from localhost (dsl-hkibrasgw2-58c368-70.dhcp.inet.fi.\r
+ [88.195.104.70])\r
+ by smtp.gmail.com with ESMTPSA id q23sm6814829wme.17.2016.08.13.04.39.22\r
+ (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);\r
+ Sat, 13 Aug 2016 04:39:22 -0700 (PDT)\r
+From: Jani Nikula <jani@nikula.org>\r
+To: notmuch@notmuchmail.org\r
+Cc: Daniel Kahn Gillmor <dkg@fifthhorseman.net>,\r
+ jani@nikula.org\r
+Subject: [PATCH v2 14/14] cli/reply: only pass gmime message to add recipients\r
+ to reply message\r
+Date: Sat, 13 Aug 2016 14:37:38 +0300\r
+Message-Id:\r
+ <2ddcc0d192bf6a9c6296417bc4d7f9ce6b1d27bc.1471088022.git.jani@nikula.org>\r
+X-Mailer: git-send-email 2.1.4\r
+In-Reply-To: <cover.1471088022.git.jani@nikula.org>\r
+References: <cover.1471088022.git.jani@nikula.org>\r
+In-Reply-To: <cover.1471088022.git.jani@nikula.org>\r
+References: <cover.1471088022.git.jani@nikula.org>\r
+X-BeenThere: notmuch@notmuchmail.org\r
+X-Mailman-Version: 2.1.20\r
+Precedence: list\r
+List-Id: "Use and development of the notmuch mail system."\r
+ <notmuch.notmuchmail.org>\r
+List-Unsubscribe: <https://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: <https://notmuchmail.org/mailman/listinfo/notmuch>,\r
+ <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
+X-List-Received-Date: Sat, 13 Aug 2016 11:42:06 -0000\r
+\r
+The notmuch message is no longer needed. Simplify.\r
+---\r
+ notmuch-reply.c | 37 ++++++++++++++-----------------------\r
+ 1 file changed, 14 insertions(+), 23 deletions(-)\r
+\r
+diff --git a/notmuch-reply.c b/notmuch-reply.c\r
+index abf3a6c1824c..8c894974485d 100644\r
+--- a/notmuch-reply.c\r
++++ b/notmuch-reply.c\r
+@@ -272,12 +272,11 @@ reply_to_header_is_redundant (GMimeMessage *message,\r
+ return ret;\r
+ }\r
+ \r
+-static InternetAddressList *get_sender(notmuch_message_t *message,\r
+- GMimeMessage *mime_message)\r
++static InternetAddressList *get_sender(GMimeMessage *message)\r
+ {\r
+ const char *reply_to;\r
+ \r
+- reply_to = g_mime_message_get_reply_to (mime_message);\r
++ reply_to = g_mime_message_get_reply_to (message);\r
+ if (reply_to && *reply_to) {\r
+ InternetAddressList *reply_to_list;\r
+ \r
+@@ -295,35 +294,29 @@ static InternetAddressList *get_sender(notmuch_message_t *message,\r
+ * will always appear in the reply if reply_all is true.\r
+ */\r
+ reply_to_list = internet_address_list_parse_string (reply_to);\r
+- if (! reply_to_header_is_redundant (mime_message, reply_to_list))\r
++ if (! reply_to_header_is_redundant (message, reply_to_list))\r
+ return reply_to_list;\r
+ \r
+ g_object_unref (G_OBJECT (reply_to_list));\r
+ }\r
+ \r
+ return internet_address_list_parse_string (\r
+- g_mime_message_get_sender (mime_message));\r
++ g_mime_message_get_sender (message));\r
+ }\r
+ \r
+-static InternetAddressList *get_to(unused(notmuch_message_t *message),\r
+- GMimeMessage *mime_message)\r
++static InternetAddressList *get_to(GMimeMessage *message)\r
+ {\r
+- return g_mime_message_get_recipients (mime_message,\r
+- GMIME_RECIPIENT_TYPE_TO);\r
++ return g_mime_message_get_recipients (message, GMIME_RECIPIENT_TYPE_TO);\r
+ }\r
+ \r
+-static InternetAddressList *get_cc(unused(notmuch_message_t *message),\r
+- GMimeMessage *mime_message)\r
++static InternetAddressList *get_cc(GMimeMessage *message)\r
+ {\r
+- return g_mime_message_get_recipients (mime_message,\r
+- GMIME_RECIPIENT_TYPE_CC);\r
++ return g_mime_message_get_recipients (message, GMIME_RECIPIENT_TYPE_CC);\r
+ }\r
+ \r
+-static InternetAddressList *get_bcc(unused(notmuch_message_t *message),\r
+- GMimeMessage *mime_message)\r
++static InternetAddressList *get_bcc(GMimeMessage *message)\r
+ {\r
+- return g_mime_message_get_recipients (mime_message,\r
+- GMIME_RECIPIENT_TYPE_BCC);\r
++ return g_mime_message_get_recipients (message, GMIME_RECIPIENT_TYPE_BCC);\r
+ }\r
+ \r
+ /* Augment the recipients of 'reply' from the "Reply-to:", "From:",\r
+@@ -341,13 +334,11 @@ static InternetAddressList *get_bcc(unused(notmuch_message_t *message),\r
+ static const char *\r
+ add_recipients_from_message (GMimeMessage *reply,\r
+ notmuch_config_t *config,\r
+- notmuch_message_t *message,\r
+- GMimeMessage *mime_message,\r
++ GMimeMessage *message,\r
+ notmuch_bool_t reply_all)\r
+ {\r
+ struct {\r
+- InternetAddressList * (*get_header)(notmuch_message_t *message,\r
+- GMimeMessage *mime_message);\r
++ InternetAddressList * (*get_header)(GMimeMessage *message);\r
+ GMimeRecipientType recipient_type;\r
+ } reply_to_map[] = {\r
+ { get_sender, GMIME_RECIPIENT_TYPE_TO },\r
+@@ -362,7 +353,7 @@ add_recipients_from_message (GMimeMessage *reply,\r
+ for (i = 0; i < ARRAY_SIZE (reply_to_map); i++) {\r
+ InternetAddressList *recipients;\r
+ \r
+- recipients = reply_to_map[i].get_header (message, mime_message);\r
++ recipients = reply_to_map[i].get_header (message);\r
+ \r
+ n += scan_address_list (recipients, config, reply,\r
+ reply_to_map[i].recipient_type, &from_addr);\r
+@@ -567,7 +558,7 @@ create_reply_message(void *ctx,\r
+ \r
+ g_mime_object_set_header (GMIME_OBJECT (reply), "References", references);\r
+ \r
+- from_addr = add_recipients_from_message (reply, config, message,\r
++ from_addr = add_recipients_from_message (reply, config,\r
+ mime_message, reply_all);\r
+ \r
+ /* The above is all that is needed for limited headers. */\r
+-- \r
+2.1.4\r
+\r