From ca63531029078a27270f014452913969766c483f Mon Sep 17 00:00:00 2001 From: Peter Wang Date: Sun, 24 Jun 2012 13:27:49 +1000 Subject: [PATCH] [PATCH 2/3] show: output Reply-To headers --- aa/8b2edacd9305f34095a2df8f2bf92eb995f388 | 113 ++++++++++++++++++++++ 1 file changed, 113 insertions(+) create mode 100644 aa/8b2edacd9305f34095a2df8f2bf92eb995f388 diff --git a/aa/8b2edacd9305f34095a2df8f2bf92eb995f388 b/aa/8b2edacd9305f34095a2df8f2bf92eb995f388 new file mode 100644 index 000000000..18763bce7 --- /dev/null +++ b/aa/8b2edacd9305f34095a2df8f2bf92eb995f388 @@ -0,0 +1,113 @@ +Return-Path: +X-Original-To: notmuch@notmuchmail.org +Delivered-To: notmuch@notmuchmail.org +Received: from localhost (localhost [127.0.0.1]) + by olra.theworths.org (Postfix) with ESMTP id 6FB9D431FBD + for ; Sat, 23 Jun 2012 20:28:22 -0700 (PDT) +X-Virus-Scanned: Debian amavisd-new at olra.theworths.org +X-Spam-Flag: NO +X-Spam-Score: -0.799 +X-Spam-Level: +X-Spam-Status: No, score=-0.799 tagged_above=-999 required=5 + tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, + FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled +Received: from olra.theworths.org ([127.0.0.1]) + by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024) + with ESMTP id HklqSgLfIHx7 for ; + Sat, 23 Jun 2012 20:28:21 -0700 (PDT) +Received: from mail-pb0-f53.google.com (mail-pb0-f53.google.com + [209.85.160.53]) (using TLSv1 with cipher RC4-MD5 (128/128 bits)) + (No client certificate requested) + by olra.theworths.org (Postfix) with ESMTPS id 1A466431FC9 + for ; Sat, 23 Jun 2012 20:28:20 -0700 (PDT) +Received: by pbbrr13 with SMTP id rr13so6402052pbb.26 + for ; Sat, 23 Jun 2012 20:28:19 -0700 (PDT) +DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; + h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references; + bh=DbV9hiTta8pBYG6cJq/FRj+P7+1gy9JCGd6XTdNvf7U=; + b=CzNpnnCqVhLJN/T/MasnIMKcQqYJHOV6GCbuAbGpN8J5OuKgMgvw84I22Qy+3HnqdI + JNX88XGp584VKT/Ew+dpbg/5vcY4duOicUNtH/9FGIeOMqvdZw6ROdsNspPxMgVMVlRy + gHuCYkTiqAR0WJCuHCOURsznIEdj8J9qUtiY2i9vqhWWS6MvXdCggIpof/mQbRjMLrmm + L4mJGJ5iVVGl0F68r3n7FuI8cjvNEnkW8mKG24808i3Uce0PGY7QTj9QVEYDC+1hXple + UK8eGt7ZTagW2SWI6Wt6mV59/u2Gt7axzoEca3+XtiRb4tdEdzYHuLjAcUshxXdwtCaH + IuHA== +Received: by 10.68.237.74 with SMTP id va10mr26656909pbc.46.1340508499028; + Sat, 23 Jun 2012 20:28:19 -0700 (PDT) +Received: from localhost (215.42.233.220.static.exetel.com.au. + [220.233.42.215]) + by mx.google.com with ESMTPS id oy8sm4080729pbc.52.2012.06.23.20.28.16 + (version=TLSv1/SSLv3 cipher=OTHER); + Sat, 23 Jun 2012 20:28:18 -0700 (PDT) +From: Peter Wang +To: notmuch@notmuchmail.org +Subject: [PATCH 2/3] show: output Reply-To headers +Date: Sun, 24 Jun 2012 13:27:49 +1000 +Message-Id: <1340508470-16606-2-git-send-email-novalazy@gmail.com> +X-Mailer: git-send-email 1.7.4.4 +In-Reply-To: <1340508470-16606-1-git-send-email-novalazy@gmail.com> +References: <1340508470-16606-1-git-send-email-novalazy@gmail.com> +X-BeenThere: notmuch@notmuchmail.org +X-Mailman-Version: 2.1.13 +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: Sun, 24 Jun 2012 03:28:22 -0000 + +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 + -- 2.26.2