1 Return-Path: <dme@dme.org>
\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 E715B41A546
\r
6 for <notmuch@notmuchmail.org>; Mon, 29 Nov 2010 02:30:42 -0800 (PST)
\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
\r
12 tests=[RCVD_IN_DNSWL_NONE=-0.0001] autolearn=disabled
\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 JXm-ce+1qC1B for <notmuch@notmuchmail.org>;
\r
16 Mon, 29 Nov 2010 02:30:42 -0800 (PST)
\r
17 Received: from mail-ww0-f45.google.com (mail-ww0-f45.google.com
\r
18 [74.125.82.45]) by olra.theworths.org (Postfix) with ESMTP id 4D678431FB5 for
\r
19 <notmuch@notmuchmail.org>; Mon, 29 Nov 2010 02:30:42 -0800 (PST)
\r
20 Received: by wwi17 with SMTP id 17so52759wwi.2
\r
21 for <notmuch@notmuchmail.org>; Mon, 29 Nov 2010 02:30:41 -0800 (PST)
\r
22 Received: by 10.216.231.168 with SMTP id l40mr662484weq.18.1291026641102;
\r
23 Mon, 29 Nov 2010 02:30:41 -0800 (PST)
\r
24 Received: from ut.hh.sledj.net (host81-149-164-25.in-addr.btopenworld.com
\r
26 by mx.google.com with ESMTPS id h53sm2294148wee.45.2010.11.29.02.30.38
\r
27 (version=TLSv1/SSLv3 cipher=RC4-MD5);
\r
28 Mon, 29 Nov 2010 02:30:40 -0800 (PST)
\r
29 Received: by ut.hh.sledj.net (Postfix, from userid 1000)
\r
30 id 7C6AE594235; Mon, 29 Nov 2010 10:30:06 +0000 (GMT)
\r
31 From: David Edmondson <dme@dme.org>
\r
32 To: notmuch@notmuchmail.org
\r
33 Subject: [PATCH 1/3] notmuch: Add `date_relative' to JSON search output.
\r
34 Date: Mon, 29 Nov 2010 10:29:57 +0000
\r
35 Message-Id: <1291026599-14795-2-git-send-email-dme@dme.org>
\r
36 X-Mailer: git-send-email 1.7.2.3
\r
37 In-Reply-To: <1291026599-14795-1-git-send-email-dme@dme.org>
\r
38 References: <1291026599-14795-1-git-send-email-dme@dme.org>
\r
39 X-BeenThere: notmuch@notmuchmail.org
\r
40 X-Mailman-Version: 2.1.13
\r
42 List-Id: "Use and development of the notmuch mail system."
\r
43 <notmuch.notmuchmail.org>
\r
44 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,
\r
45 <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>
\r
46 List-Archive: <http://notmuchmail.org/pipermail/notmuch>
\r
47 List-Post: <mailto:notmuch@notmuchmail.org>
\r
48 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>
\r
49 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,
\r
50 <mailto:notmuch-request@notmuchmail.org?subject=subscribe>
\r
51 X-List-Received-Date: Mon, 29 Nov 2010 10:30:43 -0000
\r
53 Provide consumers of the JSON search output with the standard notmuch
\r
54 relative date for each thread.
\r
56 notmuch-search.c | 2 ++
\r
57 1 files changed, 2 insertions(+), 0 deletions(-)
\r
59 diff --git a/notmuch-search.c b/notmuch-search.c
\r
60 index c628b36..d49556b 100644
\r
61 --- a/notmuch-search.c
\r
62 +++ b/notmuch-search.c
\r
63 @@ -152,12 +152,14 @@ format_thread_json (const void *ctx,
\r
65 printf ("\"thread\": %s,\n"
\r
66 "\"timestamp\": %ld,\n"
\r
67 + "\"date_relative\": %s,\n"
\r
68 "\"matched\": %d,\n"
\r
70 "\"authors\": %s,\n"
\r
71 "\"subject\": %s,\n",
\r
72 json_quote_str (ctx_quote, thread_id),
\r
74 + json_quote_str (ctx_quote, notmuch_time_relative_date (ctx, date)),
\r
77 json_quote_str (ctx_quote, authors),
\r