[PATCH v2 1/2] show: include Reply-To header in json output
authorPeter Wang <novalazy@gmail.com>
Tue, 30 Oct 2012 10:12:46 +0000 (21:12 +1100)
committerW. Trevor King <wking@tremily.us>
Fri, 7 Nov 2014 17:50:11 +0000 (09:50 -0800)
3e/b9f75cc1c4c9d380cf8965ded4166c778ab096 [new file with mode: 0644]

diff --git a/3e/b9f75cc1c4c9d380cf8965ded4166c778ab096 b/3e/b9f75cc1c4c9d380cf8965ded4166c778ab096
new file mode 100644 (file)
index 0000000..15c1ce5
--- /dev/null
@@ -0,0 +1,98 @@
+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 772BC431FBC\r
+       for <notmuch@notmuchmail.org>; Tue, 30 Oct 2012 03:13:20 -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 9+4opW1UyQfd for <notmuch@notmuchmail.org>;\r
+       Tue, 30 Oct 2012 03:13:20 -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-SHA (128/128 bits))\r
+       (No client certificate requested)\r
+       by olra.theworths.org (Postfix) with ESMTPS id 0DCAF431FAF\r
+       for <notmuch@notmuchmail.org>; Tue, 30 Oct 2012 03:13:19 -0700 (PDT)\r
+Received: by mail-pb0-f53.google.com with SMTP id wz12so83419pbc.26\r
+       for <notmuch@notmuchmail.org>; Tue, 30 Oct 2012 03:13: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=WKilJ/kbLYgPU+iQuyeOvlmU6wvs36NJlfzloqWS+5Q=;\r
+       b=cuAZww0CQiRUEDVYNasiflzUC8yZw80/xhS2LWqldNp8qPswGHzmYs+Jkn+x/f6WGc\r
+       YoRx1/XwAyp709Nx0Z0btlaR4s05uQLP9TUQSxnxmX+u9/HA4XxSP7luys6Wt3vQ2EQT\r
+       6YT2fJMlX5LyQTvSJT5ImjZa0tKIufc4uy5XD9xr3VHvRswvbjpp7svpN2gRgUMh9FVN\r
+       UfKnuV6H+R/7fmk/7j5Fb5HIWVf0E8b3QBXCJX+i+3TRc/Qzn6PDJzXY6dVnjxkY2nlC\r
+       Ba8iCtcDfwPhdjXEM1AjwyFIodyBj9nfDwldWcIEOdT7ujOlc8dpb4Nobzk+nm9otxWj\r
+       VP6A==\r
+Received: by 10.68.228.130 with SMTP id si2mr82749405pbc.126.1351591999326;\r
+       Tue, 30 Oct 2012 03:13: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 az8sm176798pab.24.2012.10.30.03.13.16\r
+       (version=TLSv1/SSLv3 cipher=OTHER);\r
+       Tue, 30 Oct 2012 03:13:18 -0700 (PDT)\r
+From: Peter Wang <novalazy@gmail.com>\r
+To: notmuch@notmuchmail.org\r
+Subject: [PATCH v2 1/2] show: include Reply-To header in json output\r
+Date: Tue, 30 Oct 2012 21:12:46 +1100\r
+Message-Id: <1351591967-17438-2-git-send-email-novalazy@gmail.com>\r
+X-Mailer: git-send-email 1.7.12.1\r
+In-Reply-To: <1351591967-17438-1-git-send-email-novalazy@gmail.com>\r
+References: <1351591967-17438-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: Tue, 30 Oct 2012 10:13:20 -0000\r
+\r
+Output the Reply-To header field if present in a message.\r
+I want to be able to see what the sender intended in my mail client,\r
+before hitting the reply key.  Only json output is changed,\r
+like the recently added Bcc field.\r
+---\r
+ notmuch-show.c | 7 +++++++\r
+ 1 file changed, 7 insertions(+)\r
+\r
+diff --git a/notmuch-show.c b/notmuch-show.c\r
+index 0b7abf1..f758f56 100644\r
+--- a/notmuch-show.c\r
++++ b/notmuch-show.c\r
+@@ -210,6 +210,7 @@ format_headers_json (sprinter_t *sp, GMimeMessage *message,\r
+ {\r
+     InternetAddressList *recipients;\r
+     const char *recipients_string;\r
++    const char *reply_to_string;\r
\r
+     sp->begin_map (sp);\r
\r
+@@ -240,6 +241,12 @@ format_headers_json (sprinter_t *sp, GMimeMessage *message,\r
+       sp->string (sp, recipients_string);\r
+     }\r
\r
++    reply_to_string = g_mime_message_get_reply_to (message);\r
++    if (reply_to_string) {\r
++      sp->map_key (sp, "Reply-To");\r
++      sp->string (sp, reply_to_string);\r
++    }\r
++\r
+     if (reply) {\r
+       sp->map_key (sp, "In-reply-to");\r
+       sp->string (sp, g_mime_object_get_header (GMIME_OBJECT (message), "In-reply-to"));\r
+-- \r
+1.7.12.1\r
+\r