From 5622a3ed7b486edc360ffa764756ce76f69ac032 Mon Sep 17 00:00:00 2001 From: Mark Walters Date: Tue, 14 Feb 2012 19:33:56 +0000 Subject: [PATCH 1/2] cli: notmuch-show with framing newlines between threads in JSON Add newlines between complete threads to make asynchronous parsing of the JSON easier --- notmuch-show.c | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-) diff --git a/notmuch-show.c b/notmuch-show.c index 3f8618b..a7cc684 100644 --- a/notmuch-show.c +++ b/notmuch-show.c @@ -912,6 +912,7 @@ do_show_messages (void *ctx, int first_set = 1; fputs (format->message_set_start, stdout); + fputs ("\n", stdout); messages = notmuch_query_search_messages (query); for (; @@ -939,6 +940,7 @@ do_show_messages (void *ctx, fputs (format->message_set_end, stdout); fputs (format->message_set_end, stdout); + fputs ("\n", stdout); } fputs (format->message_set_end, stdout); @@ -1029,6 +1031,7 @@ do_show (void *ctx, int first_toplevel = 1; fputs (format->message_set_start, stdout); + fputs ("\n", stdout); for (threads = notmuch_query_search_threads (query); notmuch_threads_valid (threads); @@ -1047,6 +1050,7 @@ do_show (void *ctx, first_toplevel = 0; show_messages (ctx, format, messages, 0, params); + fputs ("\n", stdout); notmuch_thread_destroy (thread); -- 1.7.2.3