1 Return-Path: <tomi.ollila@iki.fi>
\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 42606431FD5
\r
6 for <notmuch@notmuchmail.org>; Tue, 7 Aug 2012 06:06:57 -0700 (PDT)
\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org
\r
11 X-Spam-Status: No, score=0 tagged_above=-999 required=5 tests=[none]
\r
13 Received: from olra.theworths.org ([127.0.0.1])
\r
14 by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)
\r
15 with ESMTP id xnYNP4va3FDX for <notmuch@notmuchmail.org>;
\r
16 Tue, 7 Aug 2012 06:06:56 -0700 (PDT)
\r
17 Received: from guru.guru-group.fi (guru.guru-group.fi [46.183.73.34])
\r
18 by olra.theworths.org (Postfix) with ESMTP id 6EB50431FAF
\r
19 for <notmuch@notmuchmail.org>; Tue, 7 Aug 2012 06:06:56 -0700 (PDT)
\r
20 Received: by guru.guru-group.fi (Postfix, from userid 501)
\r
21 id 7ED9E1002A4; Tue, 7 Aug 2012 16:07:04 +0300 (EEST)
\r
22 From: Tomi Ollila <tomi.ollila@iki.fi>
\r
23 To: Austin Clements <amdragon@MIT.EDU>, notmuch@notmuchmail.org
\r
24 Subject: Re: [PATCH] reply: Convert JSON format to use sprinter
\r
25 In-Reply-To: <1344344230-9937-1-git-send-email-amdragon@mit.edu>
\r
26 References: <1344344230-9937-1-git-send-email-amdragon@mit.edu>
\r
27 User-Agent: Notmuch/0.13.2+128~g07453d8 (http://notmuchmail.org) Emacs/23.1.1
\r
28 (x86_64-redhat-linux-gnu)
\r
29 X-Face: HhBM'cA~<r"^Xv\KRN0P{vn'Y"Kd;zg_y3S[4)KSN~s?O\"QPoL
\r
30 $[Xv_BD:i/F$WiEWax}R(MPS`^UaptOGD`*/=@\1lKoVa9tnrg0TW?"r7aRtgk[F
\r
31 !)g;OY^,BjTbr)Np:%c_o'jj,Z
\r
32 Date: Tue, 07 Aug 2012 16:07:04 +0300
\r
33 Message-ID: <m21ujisvev.fsf@guru.guru-group.fi>
\r
35 Content-Type: text/plain; charset=us-ascii
\r
36 X-BeenThere: notmuch@notmuchmail.org
\r
37 X-Mailman-Version: 2.1.13
\r
39 List-Id: "Use and development of the notmuch mail system."
\r
40 <notmuch.notmuchmail.org>
\r
41 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,
\r
42 <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>
\r
43 List-Archive: <http://notmuchmail.org/pipermail/notmuch>
\r
44 List-Post: <mailto:notmuch@notmuchmail.org>
\r
45 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>
\r
46 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,
\r
47 <mailto:notmuch-request@notmuchmail.org?subject=subscribe>
\r
48 X-List-Received-Date: Tue, 07 Aug 2012 13:06:57 -0000
\r
50 On Tue, Aug 07 2012, Austin Clements <amdragon@MIT.EDU> wrote:
\r
52 > Almost all of reply was already being formatted using the sprinter.
\r
53 > This patch converts the top-level dictionary to use the sprinter
\r
63 > One last sprinter piece that had slipped through the cracks.
\r
65 > notmuch-reply.c | 8 ++++----
\r
66 > 1 file changed, 4 insertions(+), 4 deletions(-)
\r
68 > diff --git a/notmuch-reply.c b/notmuch-reply.c
\r
69 > index fa6665f..e60a264 100644
\r
70 > --- a/notmuch-reply.c
\r
71 > +++ b/notmuch-reply.c
\r
72 > @@ -614,20 +614,20 @@ notmuch_reply_format_json(void *ctx,
\r
75 > sp = sprinter_json_create (ctx, stdout);
\r
76 > + sp->begin_map (sp);
\r
78 > /* The headers of the reply message we've created */
\r
79 > - printf ("{\"reply-headers\": ");
\r
80 > + sp->map_key (sp, "reply-headers");
\r
81 > format_headers_json (sp, reply, TRUE);
\r
82 > g_object_unref (G_OBJECT (reply));
\r
85 > /* Start the original */
\r
86 > - printf (", \"original\": ");
\r
88 > + sp->map_key (sp, "original");
\r
89 > format_part_json (ctx, sp, node, TRUE, TRUE);
\r
94 > notmuch_message_destroy (message);
\r
100 > _______________________________________________
\r
101 > notmuch mailing list
\r
102 > notmuch@notmuchmail.org
\r
103 > http://notmuchmail.org/mailman/listinfo/notmuch
\r