[PATCH 2/3] show: output Reply-To headers
Peter Wang
novalazy at gmail.com
Sat Jun 23 20:27:49 PDT 2012
Output Reply-To headers when present in a message.
These were missing in text and json output formats.
---
notmuch-show.c | 10 ++++++++++
1 files changed, 10 insertions(+), 0 deletions(-)
diff --git a/notmuch-show.c b/notmuch-show.c
index 8247f1d..de63f06 100644
--- a/notmuch-show.c
+++ b/notmuch-show.c
@@ -198,6 +198,7 @@ format_headers_json (const void *ctx, GMimeMessage *message, notmuch_bool_t repl
void *local = talloc_new (ctx);
InternetAddressList *recipients;
const char *recipients_string;
+ const char *reply_to_string;
printf ("{%s: %s",
json_quote_str (local, "Subject"),
@@ -217,6 +218,11 @@ format_headers_json (const void *ctx, GMimeMessage *message, notmuch_bool_t repl
printf (", %s: %s",
json_quote_str (local, "Cc"),
json_quote_str (local, recipients_string));
+ reply_to_string = g_mime_message_get_reply_to (message);
+ if (reply_to_string)
+ printf (", %s: %s",
+ json_quote_str (local, "Reply-To"),
+ json_quote_str (local, reply_to_string));
if (reply) {
printf (", %s: %s",
@@ -512,6 +518,7 @@ format_part_text (const void *ctx, mime_node_t *node,
GMimeMessage *message = GMIME_MESSAGE (node->part);
InternetAddressList *recipients;
const char *recipients_string;
+ const char *reply_to_string;
printf ("\fheader{\n");
if (node->envelope_file)
@@ -526,6 +533,9 @@ format_part_text (const void *ctx, mime_node_t *node,
recipients_string = internet_address_list_to_string (recipients, 0);
if (recipients_string)
printf ("Cc: %s\n", recipients_string);
+ reply_to_string = g_mime_message_get_reply_to (message);
+ if (reply_to_string)
+ printf ("Reply-To: %s\n", reply_to_string);
printf ("Date: %s\n", g_mime_message_get_date_as_string (message));
printf ("\fheader}\n");
--
1.7.4.4
More information about the notmuch
mailing list