RE: Reply all - issue
[notmuch-archives.git] / 00 / 96f6ba1bc0d377e2f992260f279d1057999c0d
1 Return-Path: <patricktotzke@googlemail.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 14E59431FD0\r
6         for <notmuch@notmuchmail.org>; Thu, 14 Jul 2011 15:23:07 -0700 (PDT)\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
8 X-Spam-Flag: NO\r
9 X-Spam-Score: -0.799\r
10 X-Spam-Level: \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 epg+TM42Wqp0 for <notmuch@notmuchmail.org>;\r
17         Thu, 14 Jul 2011 15:23:05 -0700 (PDT)\r
18 Received: from mail-ww0-f45.google.com (mail-ww0-f45.google.com\r
19  [74.125.82.45])        (using TLSv1 with cipher RC4-SHA (128/128 bits))        (No client\r
20  certificate requested) by olra.theworths.org (Postfix) with ESMTPS id\r
21  F0ED1431FB6    for <notmuch@notmuchmail.org>; Thu, 14 Jul 2011 15:23:04 -0700\r
22  (PDT)\r
23 Received: by wwj40 with SMTP id 40so634382wwj.2\r
24         for <notmuch@notmuchmail.org>; Thu, 14 Jul 2011 15:23:03 -0700 (PDT)\r
25 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;\r
26         d=googlemail.com; s=gamma;\r
27         h=date:from:to:subject:message-id:mime-version:content-type\r
28         :content-disposition:user-agent;\r
29         bh=wT1UWgEjtDbBEcclRPmrMZYgaS4nGGu+z8KL1XAGJPs=;\r
30         b=cB6km0H9fOAwdcE1UO6Hst+qEP9CvPJzSb//Ue80A8sdf5U1ll1fZDWlH6E+se4pOQ\r
31         IdmhQoaXXSUVErtG+rTqyghER/a6DEgE6ieopgrpl9l5jSB9oJwiCA0NofaT7IOFG2z4\r
32         RflZ0a6Phyr5JR9Xf2s6WUFp9pghKtuPNsIRA=\r
33 Received: by 10.216.60.74 with SMTP id t52mr2721330wec.30.1310682183641;\r
34         Thu, 14 Jul 2011 15:23:03 -0700 (PDT)\r
35 Received: from brick.lan (cpc1-sgyl2-0-0-cust47.sgyl.cable.virginmedia.com\r
36         [80.192.18.48])\r
37         by mx.google.com with ESMTPS id r48sm419597weq.26.2011.07.14.15.23.01\r
38         (version=TLSv1/SSLv3 cipher=OTHER);\r
39         Thu, 14 Jul 2011 15:23:02 -0700 (PDT)\r
40 Date: Thu, 14 Jul 2011 23:22:58 +0100\r
41 From: Patrick Totzke <patricktotzke@googlemail.com>\r
42 To: notmuch@notmuchmail.org\r
43 Subject: date_relative in notmuch-search\r
44 Message-ID: <20110714222258.GA11914@brick.lan>\r
45 MIME-Version: 1.0\r
46 Content-Type: multipart/signed; micalg=pgp-sha1;\r
47         protocol="application/pgp-signature"; boundary="yrj/dFKFPuw6o+aM"\r
48 Content-Disposition: inline\r
49 User-Agent: Mutt/1.5.21 (2010-09-15)\r
50 X-BeenThere: notmuch@notmuchmail.org\r
51 X-Mailman-Version: 2.1.13\r
52 Precedence: list\r
53 List-Id: "Use and development of the notmuch mail system."\r
54         <notmuch.notmuchmail.org>\r
55 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
56         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
57 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
58 List-Post: <mailto:notmuch@notmuchmail.org>\r
59 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
60 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
61         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
62 X-List-Received-Date: Thu, 14 Jul 2011 22:23:07 -0000\r
63 \r
64 \r
65 --yrj/dFKFPuw6o+aM\r
66 Content-Type: text/plain; charset=us-ascii\r
67 Content-Disposition: inline\r
68 Content-Transfer-Encoding: quoted-printable\r
69 \r
70 Hi,\r
71 \r
72 I wodered why "notmuch search --format=3Djson" doesn't provide the "date_re=\r
73 lative" field for\r
74 results, as the show command does.\r
75 \r
76 I'm not expert on notmuch internals but I got it working like this:\r
77 \r
78 diff --git a/notmuch-search.c b/notmuch-search.c\r
79 index faccaf7..b1adc03 100644\r
80 --- a/notmuch-search.c\r
81 +++ b/notmuch-search.c\r
82 @@ -176,12 +176,14 @@ format_thread_json (const void *ctx,\r
83 =20\r
84      printf ("\"thread\": %s,\n"\r
85             "\"timestamp\": %ld,\n"\r
86 +           "\"date_relative\": \"%s\",\n"\r
87             "\"matched\": %d,\n"\r
88             "\"total\": %d,\n"\r
89             "\"authors\": %s,\n"\r
90             "\"subject\": %s,\n",\r
91             json_quote_str (ctx_quote, thread_id),\r
92             date,\r
93 +           notmuch_time_relative_date (ctx, date),\r
94 \r
95 I'm unsure it it's better to use json_quote_str here but you tell me :)\r
96 Best,\r
97 /p\r
98 \r
99 --yrj/dFKFPuw6o+aM\r
100 Content-Type: application/pgp-signature; name="signature.asc"\r
101 Content-Description: Digital signature\r
102 \r
103 -----BEGIN PGP SIGNATURE-----\r
104 Version: GnuPG v1.4.11 (GNU/Linux)\r
105 \r
106 iEYEARECAAYFAk4fbEIACgkQlDQDZ9fWxap2VACbB9QuKVruDsqETkeutXvmq0E3\r
107 bA0AnjwNUE6Pu4qenR3gN7gt+/SODbMJ\r
108 =tKq5\r
109 -----END PGP SIGNATURE-----\r
110 \r
111 --yrj/dFKFPuw6o+aM--\r