1 Return-Path: <dmitry.kurochkin@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 33C4E431FAF
\r
6 for <notmuch@notmuchmail.org>; Sat, 30 Jun 2012 00:45:06 -0700 (PDT)
\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org
\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 CX7oZy3ruWyx for <notmuch@notmuchmail.org>;
\r
17 Sat, 30 Jun 2012 00:45:05 -0700 (PDT)
\r
18 Received: from mail-lb0-f181.google.com (mail-lb0-f181.google.com
\r
19 [209.85.217.181]) (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 4EA86431FAE
\r
22 for <notmuch@notmuchmail.org>; Sat, 30 Jun 2012 00:45:05 -0700 (PDT)
\r
23 Received: by lbbgk8 with SMTP id gk8so5733047lbb.26
\r
24 for <notmuch@notmuchmail.org>; Sat, 30 Jun 2012 00:45:02 -0700 (PDT)
\r
25 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
\r
26 h=from:to:subject:in-reply-to:references:user-agent:date:message-id
\r
27 :mime-version:content-type;
\r
28 bh=zPh0bbKpYtoRjHu0z10guvCDYNkx0gAvLwP2YxWfhAw=;
\r
29 b=enekhQLwhHZaqRrn7yC9xZTD8UhSBbh2273Shie8gSliG2nO/0z1DlCpiwV3OWHX2I
\r
30 3cae3QQBSf4PCPSSb2ZJL9FjjctjuKvuUS6RtADfDMJqdvgbNxqaUf0P3PZt7UaSpZUL
\r
31 o/p6LhBFZoOFWyFFIYnUHLdjdUZrjTYeYnHhvAWPafQmSxkN/JlLV/jNiPZ3uS7r8qbF
\r
32 BQufIfheqO00X/H5flH5DtX02iTSh0EtBN4wZzRYhgp7k6hh2VdXMDvwlkBRaawBuBlv
\r
33 zdheSzG9Ez9G7MdgVohDOA48PONf4H2hd+86IL2Ru6OEgpaX/9r5d7QQASYoj3pCVAtM
\r
35 Received: by 10.112.32.35 with SMTP id f3mr2641468lbi.47.1341042302389;
\r
36 Sat, 30 Jun 2012 00:45:02 -0700 (PDT)
\r
37 Received: from localhost ([46.251.86.61])
\r
38 by mx.google.com with ESMTPS id lv13sm9801766lab.8.2012.06.30.00.45.00
\r
39 (version=TLSv1/SSLv3 cipher=OTHER);
\r
40 Sat, 30 Jun 2012 00:45:01 -0700 (PDT)
\r
41 From: Dmitry Kurochkin <dmitry.kurochkin@gmail.com>
\r
42 To: Mark Walters <markwalters1009@gmail.com>, notmuch@notmuchmail.org
\r
43 Subject: Re: [PATCH] cli: notmuch-show with framing newlines between threads
\r
45 In-Reply-To: <1341041024-5342-1-git-send-email-markwalters1009@gmail.com>
\r
46 References: <1341041024-5342-1-git-send-email-markwalters1009@gmail.com>
\r
47 User-Agent: Notmuch/0.13.2+47~ga7bc1c7 (http://notmuchmail.org) Emacs/23.4.1
\r
48 (x86_64-pc-linux-gnu)
\r
49 Date: Sat, 30 Jun 2012 11:42:40 +0400
\r
50 Message-ID: <87pq8hnt3j.fsf@gmail.com>
\r
52 Content-Type: text/plain; charset=us-ascii
\r
53 X-BeenThere: notmuch@notmuchmail.org
\r
54 X-Mailman-Version: 2.1.13
\r
56 List-Id: "Use and development of the notmuch mail system."
\r
57 <notmuch.notmuchmail.org>
\r
58 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,
\r
59 <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>
\r
60 List-Archive: <http://notmuchmail.org/pipermail/notmuch>
\r
61 List-Post: <mailto:notmuch@notmuchmail.org>
\r
62 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>
\r
63 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,
\r
64 <mailto:notmuch-request@notmuchmail.org?subject=subscribe>
\r
65 X-List-Received-Date: Sat, 30 Jun 2012 07:45:06 -0000
\r
69 Mark Walters <markwalters1009@gmail.com> writes:
\r
71 > Add newlines between complete threads to make asynchronous parsing
\r
72 > of the JSON easier.
\r
75 > notmuch-pick uses the JSON output of notmuch show but, in many cases,
\r
76 > for many threads. This can take quite a long time when displaying a
\r
77 > large number of messages (say 20 seconds for the 10,000 messages in
\r
78 > the notmuch archive). Thus it is desirable to display results
\r
79 > incrementally in the same way that search currently does.
\r
81 > To make this easier this patch adds newlines between each toplevel
\r
82 > thread. So the ouput becomes
\r
92 > Thus the parser can easily tell if it has enough data to do some more
\r
95 > Obviously, this changes the JSON output. This should not break any
\r
96 > consumer as the JSON parsers should not mind. However, it does break
\r
99 I think this should be part of the commit message since it explains the
\r
100 rationale behind the change.
\r
105 > Obviously, I will fix these but I wanted to check if
\r
106 > people were basically happy with the change first.
\r
108 > Also, should devel/schemata be updated? It seems a little unclear as
\r
109 > this is not really a "JSON" change as the JSON does not care about the
\r
117 > notmuch-show.c | 5 +++++
\r
118 > 1 files changed, 5 insertions(+), 0 deletions(-)
\r
120 > diff --git a/notmuch-show.c b/notmuch-show.c
\r
121 > index 195e318..4a1d699 100644
\r
122 > --- a/notmuch-show.c
\r
123 > +++ b/notmuch-show.c
\r
124 > @@ -942,6 +942,8 @@ do_show (void *ctx,
\r
126 > if (format->message_set_start)
\r
127 > fputs (format->message_set_start, stdout);
\r
128 > + if (format == &format_json)
\r
129 > + fputs ("\n", stdout);
\r
131 > for (threads = notmuch_query_search_threads (query);
\r
132 > notmuch_threads_valid (threads);
\r
133 > @@ -963,6 +965,9 @@ do_show (void *ctx,
\r
134 > if (status && !res)
\r
137 > + if (format == &format_json)
\r
138 > + fputs ("\n", stdout);
\r
140 > notmuch_thread_destroy (thread);
\r
146 > _______________________________________________
\r
147 > notmuch mailing list
\r
148 > notmuch@notmuchmail.org
\r
149 > http://notmuchmail.org/mailman/listinfo/notmuch
\r