[PATCH 2/7] cli/reply: reuse show_reply_headers() in headers-only format
authorJani Nikula <jani@nikula.org>
Sat, 18 Jun 2016 21:31:28 +0000 (00:31 +0300)
committerW. Trevor King <wking@tremily.us>
Sat, 20 Aug 2016 23:22:06 +0000 (16:22 -0700)
a0/604734cb524bcdc190e28b2799a6442e0fa332 [new file with mode: 0644]

diff --git a/a0/604734cb524bcdc190e28b2799a6442e0fa332 b/a0/604734cb524bcdc190e28b2799a6442e0fa332
new file mode 100644 (file)
index 0000000..9f0fb86
--- /dev/null
@@ -0,0 +1,114 @@
+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 412706DE0363\r
+ for <notmuch@notmuchmail.org>; Sat, 18 Jun 2016 14:33:17 -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.563\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=-0.563 tagged_above=-999 required=5 tests=[AWL=0.157,\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 suJ-fmqOwxVx for <notmuch@notmuchmail.org>;\r
+ Sat, 18 Jun 2016 14:33:09 -0700 (PDT)\r
+Received: from mail-wm0-f65.google.com (mail-wm0-f65.google.com\r
+ [74.125.82.65]) by arlo.cworth.org (Postfix) with ESMTPS id 5D7386DE01F7 for\r
+ <notmuch@notmuchmail.org>; Sat, 18 Jun 2016 14:33:02 -0700 (PDT)\r
+Received: by mail-wm0-f65.google.com with SMTP id r201so5509900wme.0\r
+ for <notmuch@notmuchmail.org>; Sat, 18 Jun 2016 14:33:02 -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=GFqnarJmTYg+4pHdwcGqpO6WWa2zlvunnPT4GDJLQjM=;\r
+ b=MmQ+ODUFwpDhBJTuV1CkfdOO9/0l5uR2evQohf3ViMrn3MWKWwIXavJve+N/7Fw8Xy\r
+ tX+EMGiBO6lu4uKWp7IG7eOQZ90J7PgQ8yqpsB6Q3TDp4kuT8NbFSc3LDUNHZxUQpBvo\r
+ LAKyZTYGa4qXcrKihRVpx1U5XZVlaf2v+S6fSUwNfk6bvqBV3NASTF1iBNmg3jnmUbwH\r
+ APP1uoYqQ8+pKLshdhImUK5cDCAUcaCZGfTGK1fbMLpRT65e4AS5ctPUuqym0sQIpDIu\r
+ GDAwD0l5rXoOu3ZFwuJ4PxOPYG/c4HC6RgQhA0fnczINKzsmYgHOy1pkdo5zqEIU+q/+\r
+ wsPQ==\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=GFqnarJmTYg+4pHdwcGqpO6WWa2zlvunnPT4GDJLQjM=;\r
+ b=YDPQWGdt6dFSdLJGzsOwYvBGwEj7RT/eFyc3YRZ4FPWca6qjOlz74/LJcdPxfSTsQS\r
+ XWbbjxmwmg9Z8N3Ujf/kscraKVH/ldscGyacDQ3Ovu4ztyP37Ok3O2EdViShrtljwk+Z\r
+ tFB6zvFmk1Bp+GTE9bGDzRf/QxgL232sVGQmgkWbSCJeO6717e1cErSux8thlP1WGRiF\r
+ 0LR9GZXRJLhCjOzZiFhoROaNAY9DbUE/YnxmVr8GJjvTwASAGr48ZLkTIHFx9WQlmx6C\r
+ QeKDY3UdraLtpZSk+Nz+7Hv6Z4hrNYoO5YMO+Vip+0DlM2XLPZbSaCbaTkvKF9pcUwUh\r
+ 6loQ==\r
+X-Gm-Message-State:\r
+ ALyK8tLT3fCpv1SmDmtn/QavOPr3NAhVkTjRzkw2GIRk+oVj/Sqrhs/O5QLh4iMM02vkYA==\r
+X-Received: by 10.28.126.2 with SMTP id z2mr4456655wmc.73.1466285580934;\r
+ Sat, 18 Jun 2016 14:33:00 -0700 (PDT)\r
+Received: from localhost (mobile-access-bcee4e-81.dhcp.inet.fi.\r
+ [188.238.78.81])\r
+ by smtp.gmail.com with ESMTPSA id t190sm315649wmt.24.2016.06.18.14.33.00\r
+ (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);\r
+ Sat, 18 Jun 2016 14:33:00 -0700 (PDT)\r
+From: Jani Nikula <jani@nikula.org>\r
+To: notmuch@notmuchmail.org\r
+Cc: jani@nikula.org,\r
+       Daniel Kahn Gillmor <dkg@fifthhorseman.net>\r
+Subject: [PATCH 2/7] cli/reply: reuse show_reply_headers() in headers-only\r
+ format\r
+Date: Sun, 19 Jun 2016 00:31:28 +0300\r
+Message-Id:\r
+ <bff3ad5926a90b776542dee9a8a4f4f187def901.1466284726.git.jani@nikula.org>\r
+X-Mailer: git-send-email 2.1.4\r
+In-Reply-To: <cover.1466284726.git.jani@nikula.org>\r
+References: <cover.1466284726.git.jani@nikula.org>\r
+In-Reply-To: <cover.1466284726.git.jani@nikula.org>\r
+References: <cover.1466284726.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, 18 Jun 2016 21:33:17 -0000\r
+\r
+Align the code with default format reply. There should be no changes\r
+in output.\r
+---\r
+ notmuch-reply.c | 5 +----\r
+ 1 file changed, 1 insertion(+), 4 deletions(-)\r
+\r
+diff --git a/notmuch-reply.c b/notmuch-reply.c\r
+index 847e306f94d2..5adbab624ad7 100644\r
+--- a/notmuch-reply.c\r
++++ b/notmuch-reply.c\r
+@@ -668,7 +668,6 @@ notmuch_reply_format_headers_only(void *ctx,\r
+ {\r
+     GMimeMessage *reply;\r
+     const char *in_reply_to, *orig_references, *references;\r
+-    char *reply_headers;\r
\r
+     /* The 0 means we do not want headers in a "pretty" order. */\r
+     reply = g_mime_message_new (0);\r
+@@ -697,9 +696,7 @@ notmuch_reply_format_headers_only(void *ctx,\r
\r
+     (void)add_recipients_from_message (reply, config, message, reply_all);\r
\r
+-    reply_headers = g_mime_object_to_string (GMIME_OBJECT (reply));\r
+-    printf ("%s", reply_headers);\r
+-    free (reply_headers);\r
++    show_reply_headers (reply);\r
\r
+     g_object_unref (G_OBJECT (reply));\r
\r
+-- \r
+2.1.4\r
+\r