[PATCH 2/3] show: output Reply-To headers
authorPeter Wang <novalazy@gmail.com>
Sun, 24 Jun 2012 03:27:49 +0000 (13:27 +1000)
committerW. Trevor King <wking@tremily.us>
Fri, 7 Nov 2014 17:47:46 +0000 (09:47 -0800)
aa/8b2edacd9305f34095a2df8f2bf92eb995f388 [new file with mode: 0644]

diff --git a/aa/8b2edacd9305f34095a2df8f2bf92eb995f388 b/aa/8b2edacd9305f34095a2df8f2bf92eb995f388
new file mode 100644 (file)
index 0000000..18763bc
--- /dev/null
@@ -0,0 +1,113 @@
+Return-Path: <novalazy@gmail.com>\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 6FB9D431FBD\r
+       for <notmuch@notmuchmail.org>; Sat, 23 Jun 2012 20:28:22 -0700 (PDT)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: -0.799\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=-0.799 tagged_above=-999 required=5\r
+       tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1,\r
+       FREEMAIL_FROM=0.001, 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 HklqSgLfIHx7 for <notmuch@notmuchmail.org>;\r
+       Sat, 23 Jun 2012 20:28:21 -0700 (PDT)\r
+Received: from mail-pb0-f53.google.com (mail-pb0-f53.google.com\r
+       [209.85.160.53]) (using TLSv1 with cipher RC4-MD5 (128/128 bits))\r
+       (No client certificate requested)\r
+       by olra.theworths.org (Postfix) with ESMTPS id 1A466431FC9\r
+       for <notmuch@notmuchmail.org>; Sat, 23 Jun 2012 20:28:20 -0700 (PDT)\r
+Received: by pbbrr13 with SMTP id rr13so6402052pbb.26\r
+       for <notmuch@notmuchmail.org>; Sat, 23 Jun 2012 20:28:19 -0700 (PDT)\r
+DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;\r
+       h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references;\r
+       bh=DbV9hiTta8pBYG6cJq/FRj+P7+1gy9JCGd6XTdNvf7U=;\r
+       b=CzNpnnCqVhLJN/T/MasnIMKcQqYJHOV6GCbuAbGpN8J5OuKgMgvw84I22Qy+3HnqdI\r
+       JNX88XGp584VKT/Ew+dpbg/5vcY4duOicUNtH/9FGIeOMqvdZw6ROdsNspPxMgVMVlRy\r
+       gHuCYkTiqAR0WJCuHCOURsznIEdj8J9qUtiY2i9vqhWWS6MvXdCggIpof/mQbRjMLrmm\r
+       L4mJGJ5iVVGl0F68r3n7FuI8cjvNEnkW8mKG24808i3Uce0PGY7QTj9QVEYDC+1hXple\r
+       UK8eGt7ZTagW2SWI6Wt6mV59/u2Gt7axzoEca3+XtiRb4tdEdzYHuLjAcUshxXdwtCaH\r
+       IuHA==\r
+Received: by 10.68.237.74 with SMTP id va10mr26656909pbc.46.1340508499028;\r
+       Sat, 23 Jun 2012 20:28:19 -0700 (PDT)\r
+Received: from localhost (215.42.233.220.static.exetel.com.au.\r
+       [220.233.42.215])\r
+       by mx.google.com with ESMTPS id oy8sm4080729pbc.52.2012.06.23.20.28.16\r
+       (version=TLSv1/SSLv3 cipher=OTHER);\r
+       Sat, 23 Jun 2012 20:28:18 -0700 (PDT)\r
+From: Peter Wang <novalazy@gmail.com>\r
+To: notmuch@notmuchmail.org\r
+Subject: [PATCH 2/3] show: output Reply-To headers\r
+Date: Sun, 24 Jun 2012 13:27:49 +1000\r
+Message-Id: <1340508470-16606-2-git-send-email-novalazy@gmail.com>\r
+X-Mailer: git-send-email 1.7.4.4\r
+In-Reply-To: <1340508470-16606-1-git-send-email-novalazy@gmail.com>\r
+References: <1340508470-16606-1-git-send-email-novalazy@gmail.com>\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: Sun, 24 Jun 2012 03:28:22 -0000\r
+\r
+Output Reply-To headers when present in a message.\r
+These were missing in text and json output formats.\r
+---\r
+ notmuch-show.c |   10 ++++++++++\r
+ 1 files changed, 10 insertions(+), 0 deletions(-)\r
+\r
+diff --git a/notmuch-show.c b/notmuch-show.c\r
+index 8247f1d..de63f06 100644\r
+--- a/notmuch-show.c\r
++++ b/notmuch-show.c\r
+@@ -198,6 +198,7 @@ format_headers_json (const void *ctx, GMimeMessage *message, notmuch_bool_t repl\r
+     void *local = talloc_new (ctx);\r
+     InternetAddressList *recipients;\r
+     const char *recipients_string;\r
++    const char *reply_to_string;\r
\r
+     printf ("{%s: %s",\r
+           json_quote_str (local, "Subject"),\r
+@@ -217,6 +218,11 @@ format_headers_json (const void *ctx, GMimeMessage *message, notmuch_bool_t repl\r
+       printf (", %s: %s",\r
+               json_quote_str (local, "Cc"),\r
+               json_quote_str (local, recipients_string));\r
++    reply_to_string = g_mime_message_get_reply_to (message);\r
++    if (reply_to_string)\r
++      printf (", %s: %s",\r
++              json_quote_str (local, "Reply-To"),\r
++              json_quote_str (local, reply_to_string));\r
\r
+     if (reply) {\r
+       printf (", %s: %s",\r
+@@ -512,6 +518,7 @@ format_part_text (const void *ctx, mime_node_t *node,\r
+       GMimeMessage *message = GMIME_MESSAGE (node->part);\r
+       InternetAddressList *recipients;\r
+       const char *recipients_string;\r
++      const char *reply_to_string;\r
\r
+       printf ("\fheader{\n");\r
+       if (node->envelope_file)\r
+@@ -526,6 +533,9 @@ format_part_text (const void *ctx, mime_node_t *node,\r
+       recipients_string = internet_address_list_to_string (recipients, 0);\r
+       if (recipients_string)\r
+           printf ("Cc: %s\n", recipients_string);\r
++      reply_to_string = g_mime_message_get_reply_to (message);\r
++      if (reply_to_string)\r
++          printf ("Reply-To: %s\n", reply_to_string);\r
+       printf ("Date: %s\n", g_mime_message_get_date_as_string (message));\r
+       printf ("\fheader}\n");\r
\r
+-- \r
+1.7.4.4\r
+\r