Return-Path: X-Original-To: notmuch@notmuchmail.org Delivered-To: notmuch@notmuchmail.org Received: from localhost (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id E715B41A546 for ; Mon, 29 Nov 2010 02:30:42 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org X-Spam-Flag: NO X-Spam-Score: 0 X-Spam-Level: X-Spam-Status: No, score=0 tagged_above=-999 required=5 tests=[RCVD_IN_DNSWL_NONE=-0.0001] autolearn=disabled Received: from olra.theworths.org ([127.0.0.1]) by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id JXm-ce+1qC1B for ; Mon, 29 Nov 2010 02:30:42 -0800 (PST) Received: from mail-ww0-f45.google.com (mail-ww0-f45.google.com [74.125.82.45]) by olra.theworths.org (Postfix) with ESMTP id 4D678431FB5 for ; Mon, 29 Nov 2010 02:30:42 -0800 (PST) Received: by wwi17 with SMTP id 17so52759wwi.2 for ; Mon, 29 Nov 2010 02:30:41 -0800 (PST) Received: by 10.216.231.168 with SMTP id l40mr662484weq.18.1291026641102; Mon, 29 Nov 2010 02:30:41 -0800 (PST) Received: from ut.hh.sledj.net (host81-149-164-25.in-addr.btopenworld.com [81.149.164.25]) by mx.google.com with ESMTPS id h53sm2294148wee.45.2010.11.29.02.30.38 (version=TLSv1/SSLv3 cipher=RC4-MD5); Mon, 29 Nov 2010 02:30:40 -0800 (PST) Received: by ut.hh.sledj.net (Postfix, from userid 1000) id 7C6AE594235; Mon, 29 Nov 2010 10:30:06 +0000 (GMT) From: David Edmondson To: notmuch@notmuchmail.org Subject: [PATCH 1/3] notmuch: Add `date_relative' to JSON search output. Date: Mon, 29 Nov 2010 10:29:57 +0000 Message-Id: <1291026599-14795-2-git-send-email-dme@dme.org> X-Mailer: git-send-email 1.7.2.3 In-Reply-To: <1291026599-14795-1-git-send-email-dme@dme.org> References: <1291026599-14795-1-git-send-email-dme@dme.org> X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: "Use and development of the notmuch mail system." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Nov 2010 10:30:43 -0000 Provide consumers of the JSON search output with the standard notmuch relative date for each thread. --- notmuch-search.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/notmuch-search.c b/notmuch-search.c index c628b36..d49556b 100644 --- a/notmuch-search.c +++ b/notmuch-search.c @@ -152,12 +152,14 @@ format_thread_json (const void *ctx, printf ("\"thread\": %s,\n" "\"timestamp\": %ld,\n" + "\"date_relative\": %s,\n" "\"matched\": %d,\n" "\"total\": %d,\n" "\"authors\": %s,\n" "\"subject\": %s,\n", json_quote_str (ctx_quote, thread_id), date, + json_quote_str (ctx_quote, notmuch_time_relative_date (ctx, date)), matched, total, json_quote_str (ctx_quote, authors), -- 1.7.2.3