From: Jani Nikula Date: Sat, 18 Jun 2016 21:31:28 +0000 (+0300) Subject: [PATCH 2/7] cli/reply: reuse show_reply_headers() in headers-only format X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=33f4bd23299ad62d26da87c74606dc9f990e0185;p=notmuch-archives.git [PATCH 2/7] cli/reply: reuse show_reply_headers() in headers-only format --- diff --git a/a0/604734cb524bcdc190e28b2799a6442e0fa332 b/a0/604734cb524bcdc190e28b2799a6442e0fa332 new file mode 100644 index 000000000..9f0fb86b8 --- /dev/null +++ b/a0/604734cb524bcdc190e28b2799a6442e0fa332 @@ -0,0 +1,114 @@ +Return-Path: +X-Original-To: notmuch@notmuchmail.org +Delivered-To: notmuch@notmuchmail.org +Received: from localhost (localhost [127.0.0.1]) + by arlo.cworth.org (Postfix) with ESMTP id 412706DE0363 + for ; Sat, 18 Jun 2016 14:33:17 -0700 (PDT) +X-Virus-Scanned: Debian amavisd-new at cworth.org +X-Amavis-Alert: BAD HEADER SECTION, Duplicate header field: "References" +X-Spam-Flag: NO +X-Spam-Score: -0.563 +X-Spam-Level: +X-Spam-Status: No, score=-0.563 tagged_above=-999 required=5 tests=[AWL=0.157, + DKIM_SIGNED=0.1, DKIM_VALID=-0.1, RCVD_IN_DNSWL_LOW=-0.7, + RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01] autolearn=disabled +Received: from arlo.cworth.org ([127.0.0.1]) + by localhost (arlo.cworth.org [127.0.0.1]) (amavisd-new, port 10024) + with ESMTP id suJ-fmqOwxVx for ; + Sat, 18 Jun 2016 14:33:09 -0700 (PDT) +Received: from mail-wm0-f65.google.com (mail-wm0-f65.google.com + [74.125.82.65]) by arlo.cworth.org (Postfix) with ESMTPS id 5D7386DE01F7 for + ; Sat, 18 Jun 2016 14:33:02 -0700 (PDT) +Received: by mail-wm0-f65.google.com with SMTP id r201so5509900wme.0 + for ; Sat, 18 Jun 2016 14:33:02 -0700 (PDT) +DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; + d=nikula-org.20150623.gappssmtp.com; s=20150623; + h=from:to:cc:subject:date:message-id:in-reply-to:references + :in-reply-to:references; + bh=GFqnarJmTYg+4pHdwcGqpO6WWa2zlvunnPT4GDJLQjM=; + b=MmQ+ODUFwpDhBJTuV1CkfdOO9/0l5uR2evQohf3ViMrn3MWKWwIXavJve+N/7Fw8Xy + tX+EMGiBO6lu4uKWp7IG7eOQZ90J7PgQ8yqpsB6Q3TDp4kuT8NbFSc3LDUNHZxUQpBvo + LAKyZTYGa4qXcrKihRVpx1U5XZVlaf2v+S6fSUwNfk6bvqBV3NASTF1iBNmg3jnmUbwH + APP1uoYqQ8+pKLshdhImUK5cDCAUcaCZGfTGK1fbMLpRT65e4AS5ctPUuqym0sQIpDIu + GDAwD0l5rXoOu3ZFwuJ4PxOPYG/c4HC6RgQhA0fnczINKzsmYgHOy1pkdo5zqEIU+q/+ + wsPQ== +X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; + d=1e100.net; s=20130820; + h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to + :references:in-reply-to:references; + bh=GFqnarJmTYg+4pHdwcGqpO6WWa2zlvunnPT4GDJLQjM=; + b=YDPQWGdt6dFSdLJGzsOwYvBGwEj7RT/eFyc3YRZ4FPWca6qjOlz74/LJcdPxfSTsQS + XWbbjxmwmg9Z8N3Ujf/kscraKVH/ldscGyacDQ3Ovu4ztyP37Ok3O2EdViShrtljwk+Z + tFB6zvFmk1Bp+GTE9bGDzRf/QxgL232sVGQmgkWbSCJeO6717e1cErSux8thlP1WGRiF + 0LR9GZXRJLhCjOzZiFhoROaNAY9DbUE/YnxmVr8GJjvTwASAGr48ZLkTIHFx9WQlmx6C + QeKDY3UdraLtpZSk+Nz+7Hv6Z4hrNYoO5YMO+Vip+0DlM2XLPZbSaCbaTkvKF9pcUwUh + 6loQ== +X-Gm-Message-State: + ALyK8tLT3fCpv1SmDmtn/QavOPr3NAhVkTjRzkw2GIRk+oVj/Sqrhs/O5QLh4iMM02vkYA== +X-Received: by 10.28.126.2 with SMTP id z2mr4456655wmc.73.1466285580934; + Sat, 18 Jun 2016 14:33:00 -0700 (PDT) +Received: from localhost (mobile-access-bcee4e-81.dhcp.inet.fi. + [188.238.78.81]) + by smtp.gmail.com with ESMTPSA id t190sm315649wmt.24.2016.06.18.14.33.00 + (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); + Sat, 18 Jun 2016 14:33:00 -0700 (PDT) +From: Jani Nikula +To: notmuch@notmuchmail.org +Cc: jani@nikula.org, + Daniel Kahn Gillmor +Subject: [PATCH 2/7] cli/reply: reuse show_reply_headers() in headers-only + format +Date: Sun, 19 Jun 2016 00:31:28 +0300 +Message-Id: + +X-Mailer: git-send-email 2.1.4 +In-Reply-To: +References: +In-Reply-To: +References: +X-BeenThere: notmuch@notmuchmail.org +X-Mailman-Version: 2.1.20 +Precedence: list +List-Id: "Use and development of the notmuch mail system." + +List-Unsubscribe: , + +List-Archive: +List-Post: +List-Help: +List-Subscribe: , + +X-List-Received-Date: Sat, 18 Jun 2016 21:33:17 -0000 + +Align the code with default format reply. There should be no changes +in output. +--- + notmuch-reply.c | 5 +---- + 1 file changed, 1 insertion(+), 4 deletions(-) + +diff --git a/notmuch-reply.c b/notmuch-reply.c +index 847e306f94d2..5adbab624ad7 100644 +--- a/notmuch-reply.c ++++ b/notmuch-reply.c +@@ -668,7 +668,6 @@ notmuch_reply_format_headers_only(void *ctx, + { + GMimeMessage *reply; + const char *in_reply_to, *orig_references, *references; +- char *reply_headers; + + /* The 0 means we do not want headers in a "pretty" order. */ + reply = g_mime_message_new (0); +@@ -697,9 +696,7 @@ notmuch_reply_format_headers_only(void *ctx, + + (void)add_recipients_from_message (reply, config, message, reply_all); + +- reply_headers = g_mime_object_to_string (GMIME_OBJECT (reply)); +- printf ("%s", reply_headers); +- free (reply_headers); ++ show_reply_headers (reply); + + g_object_unref (G_OBJECT (reply)); + +-- +2.1.4 +