[PATCH 06/10] cli: Introduce "notmuch address" command
[notmuch-archives.git] / 3e / b9f75cc1c4c9d380cf8965ded4166c778ab096
1 Return-Path: <novalazy@gmail.com>\r
2 X-Original-To: notmuch@notmuchmail.org\r
3 Delivered-To: notmuch@notmuchmail.org\r
4 Received: from localhost (localhost [127.0.0.1])\r
5         by olra.theworths.org (Postfix) with ESMTP id 772BC431FBC\r
6         for <notmuch@notmuchmail.org>; Tue, 30 Oct 2012 03:13:20 -0700 (PDT)\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
8 X-Spam-Flag: NO\r
9 X-Spam-Score: -0.799\r
10 X-Spam-Level: \r
11 X-Spam-Status: No, score=-0.799 tagged_above=-999 required=5\r
12         tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1,\r
13         FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled\r
14 Received: from olra.theworths.org ([127.0.0.1])\r
15         by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
16         with ESMTP id 9+4opW1UyQfd for <notmuch@notmuchmail.org>;\r
17         Tue, 30 Oct 2012 03:13:20 -0700 (PDT)\r
18 Received: from mail-pb0-f53.google.com (mail-pb0-f53.google.com\r
19         [209.85.160.53]) (using TLSv1 with cipher RC4-SHA (128/128 bits))\r
20         (No client certificate requested)\r
21         by olra.theworths.org (Postfix) with ESMTPS id 0DCAF431FAF\r
22         for <notmuch@notmuchmail.org>; Tue, 30 Oct 2012 03:13:19 -0700 (PDT)\r
23 Received: by mail-pb0-f53.google.com with SMTP id wz12so83419pbc.26\r
24         for <notmuch@notmuchmail.org>; Tue, 30 Oct 2012 03:13:19 -0700 (PDT)\r
25 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;\r
26         h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references;\r
27         bh=WKilJ/kbLYgPU+iQuyeOvlmU6wvs36NJlfzloqWS+5Q=;\r
28         b=cuAZww0CQiRUEDVYNasiflzUC8yZw80/xhS2LWqldNp8qPswGHzmYs+Jkn+x/f6WGc\r
29         YoRx1/XwAyp709Nx0Z0btlaR4s05uQLP9TUQSxnxmX+u9/HA4XxSP7luys6Wt3vQ2EQT\r
30         6YT2fJMlX5LyQTvSJT5ImjZa0tKIufc4uy5XD9xr3VHvRswvbjpp7svpN2gRgUMh9FVN\r
31         UfKnuV6H+R/7fmk/7j5Fb5HIWVf0E8b3QBXCJX+i+3TRc/Qzn6PDJzXY6dVnjxkY2nlC\r
32         Ba8iCtcDfwPhdjXEM1AjwyFIodyBj9nfDwldWcIEOdT7ujOlc8dpb4Nobzk+nm9otxWj\r
33         VP6A==\r
34 Received: by 10.68.228.130 with SMTP id si2mr82749405pbc.126.1351591999326;\r
35         Tue, 30 Oct 2012 03:13:19 -0700 (PDT)\r
36 Received: from localhost (215.42.233.220.static.exetel.com.au.\r
37         [220.233.42.215])\r
38         by mx.google.com with ESMTPS id az8sm176798pab.24.2012.10.30.03.13.16\r
39         (version=TLSv1/SSLv3 cipher=OTHER);\r
40         Tue, 30 Oct 2012 03:13:18 -0700 (PDT)\r
41 From: Peter Wang <novalazy@gmail.com>\r
42 To: notmuch@notmuchmail.org\r
43 Subject: [PATCH v2 1/2] show: include Reply-To header in json output\r
44 Date: Tue, 30 Oct 2012 21:12:46 +1100\r
45 Message-Id: <1351591967-17438-2-git-send-email-novalazy@gmail.com>\r
46 X-Mailer: git-send-email 1.7.12.1\r
47 In-Reply-To: <1351591967-17438-1-git-send-email-novalazy@gmail.com>\r
48 References: <1351591967-17438-1-git-send-email-novalazy@gmail.com>\r
49 X-BeenThere: notmuch@notmuchmail.org\r
50 X-Mailman-Version: 2.1.13\r
51 Precedence: list\r
52 List-Id: "Use and development of the notmuch mail system."\r
53         <notmuch.notmuchmail.org>\r
54 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
55         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
56 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
57 List-Post: <mailto:notmuch@notmuchmail.org>\r
58 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
59 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
60         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
61 X-List-Received-Date: Tue, 30 Oct 2012 10:13:20 -0000\r
62 \r
63 Output the Reply-To header field if present in a message.\r
64 I want to be able to see what the sender intended in my mail client,\r
65 before hitting the reply key.  Only json output is changed,\r
66 like the recently added Bcc field.\r
67 ---\r
68  notmuch-show.c | 7 +++++++\r
69  1 file changed, 7 insertions(+)\r
70 \r
71 diff --git a/notmuch-show.c b/notmuch-show.c\r
72 index 0b7abf1..f758f56 100644\r
73 --- a/notmuch-show.c\r
74 +++ b/notmuch-show.c\r
75 @@ -210,6 +210,7 @@ format_headers_json (sprinter_t *sp, GMimeMessage *message,\r
76  {\r
77      InternetAddressList *recipients;\r
78      const char *recipients_string;\r
79 +    const char *reply_to_string;\r
80  \r
81      sp->begin_map (sp);\r
82  \r
83 @@ -240,6 +241,12 @@ format_headers_json (sprinter_t *sp, GMimeMessage *message,\r
84         sp->string (sp, recipients_string);\r
85      }\r
86  \r
87 +    reply_to_string = g_mime_message_get_reply_to (message);\r
88 +    if (reply_to_string) {\r
89 +       sp->map_key (sp, "Reply-To");\r
90 +       sp->string (sp, reply_to_string);\r
91 +    }\r
92 +\r
93      if (reply) {\r
94         sp->map_key (sp, "In-reply-to");\r
95         sp->string (sp, g_mime_object_get_header (GMIME_OBJECT (message), "In-reply-to"));\r
96 -- \r
97 1.7.12.1\r
98 \r