1 Return-Path: <cworth@cworth.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 30F1C429E36
\r
6 for <notmuch@notmuchmail.org>; Fri, 28 Jan 2011 14:03:00 -0800 (PST)
\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org
\r
11 X-Spam-Status: No, score=-0.99 tagged_above=-999 required=5
\r
12 tests=[ALL_TRUSTED=-1, T_MIME_NO_TEXT=0.01] 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 D0FEOGBizDV4; Fri, 28 Jan 2011 14:02:59 -0800 (PST)
\r
16 Received: from yoom.home.cworth.org (localhost [127.0.0.1])
\r
17 by olra.theworths.org (Postfix) with ESMTP id 95515429E2E;
\r
18 Fri, 28 Jan 2011 14:02:53 -0800 (PST)
\r
19 Received: by yoom.home.cworth.org (Postfix, from userid 1000)
\r
20 id 2BA692540E1; Sat, 29 Jan 2011 06:44:40 +1000 (EST)
\r
21 From: Carl Worth <cworth@cworth.org>
\r
22 To: Mike Kelly <pioto@pioto.org>, notmuch@notmuchmail.org
\r
23 Subject: Re: About the json output and the number of results shown.
\r
24 In-Reply-To: <1294871985-ner-781@everglades>
\r
25 References: <AANLkTi=Mzu9bu3y0RKB5YZUpZOT9qujXgxtpB-8Bvk=2@mail.gmail.com>
\r
26 <1294871985-ner-781@everglades>
\r
27 User-Agent: Notmuch/0.5 (http://notmuchmail.org) Emacs/23.2.1
\r
29 Date: Sat, 29 Jan 2011 06:44:40 +1000
\r
30 Message-ID: <87mxmkn4g7.fsf@yoom.home.cworth.org>
\r
32 Content-Type: multipart/signed; boundary="=-=-=";
\r
33 micalg=pgp-sha1; protocol="application/pgp-signature"
\r
34 X-BeenThere: notmuch@notmuchmail.org
\r
35 X-Mailman-Version: 2.1.13
\r
37 List-Id: "Use and development of the notmuch mail system."
\r
38 <notmuch.notmuchmail.org>
\r
39 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,
\r
40 <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>
\r
41 List-Archive: <http://notmuchmail.org/pipermail/notmuch>
\r
42 List-Post: <mailto:notmuch@notmuchmail.org>
\r
43 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>
\r
44 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,
\r
45 <mailto:notmuch-request@notmuchmail.org?subject=subscribe>
\r
46 X-List-Received-Date: Fri, 28 Jan 2011 22:03:00 -0000
\r
49 Content-Transfer-Encoding: quoted-printable
\r
51 On Wed, 12 Jan 2011 22:39:45 +0000, Mike Kelly <pioto@pioto.org> wrote:
\r
52 > For starters, if I'm simply trying to retrieve a single message, the
\r
53 > interface is rather awkard. I seem to need to do something like:
\r
55 > my $json =3D `notmuch show --format=3Djson id:$message_id`;
\r
56 > my $parsed_json =3D decode_json($json);
\r
57 > my $message =3D $parsed_json->[0][0][0];
\r
59 That does seem fairly awkward, yes. Do you have a suggestion for how
\r
60 you'd like the output to be structured instead?
\r
62 > And, when I'm doing my search earlier to even find those message ids, I
\r
63 > need to do a check to `notmuch count` first to see if I'll even get any
\r
64 > results, because the 0 result case is not valid JSON.
\r
66 Yikes! That's a bug in notmuch that we should get fixed rather than you
\r
67 just working around it. I just started adding a test for this
\r
70 notmuch search --format=3Djson "string that matches nothing"
\r
72 returns nothing. Presumably, this should return just an empty json array
\r
73 instead, (that is, "[]")?
\r
78 carl.d.worth@intel.com
\r
81 Content-Type: application/pgp-signature
\r
83 -----BEGIN PGP SIGNATURE-----
\r
84 Version: GnuPG v1.4.10 (GNU/Linux)
\r
86 iD8DBQFNQyq46JDdNq8qSWgRAly6AJ9QjEtHZevh+qJHcFuTtWWZix1ZrwCeLP7t
\r
87 12veyy5EkXjDbL0H7aNztI8=
\r
89 -----END PGP SIGNATURE-----
\r