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 7EB1B431FBC for ; Wed, 24 Feb 2010 06:56:21 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org X-Spam-Flag: NO X-Spam-Score: -4.035 X-Spam-Level: X-Spam-Status: No, score=-4.035 tagged_above=-999 required=5 tests=[AWL=-0.036, BAYES_50=0.001, RCVD_IN_DNSWL_MED=-4] autolearn=ham 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 SdV3yWx4D7+N for ; Wed, 24 Feb 2010 06:56:20 -0800 (PST) Received: from serrano.cc.columbia.edu (serrano.cc.columbia.edu [128.59.29.6]) by olra.theworths.org (Postfix) with ESMTP id CA499431FAE for ; Wed, 24 Feb 2010 06:56:20 -0800 (PST) Received: from servo.finestructure.net (geco.phys.columbia.edu [128.59.170.159]) (user=jgr2110 author=jrollins@finestructure.net mech=PLAIN bits=0) by serrano.cc.columbia.edu (8.14.3/8.14.3) with ESMTP id o1OEuGcv023750 (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=NOT); Wed, 24 Feb 2010 09:56:16 -0500 (EST) Received: from jrollins by servo.finestructure.net with local (Exim 4.71) (envelope-from ) id 1NkIeu-00010w-6w; Wed, 24 Feb 2010 09:56:16 -0500 From: Jameson Rollins To: racin@free.fr, Sebastian Spaeth In-Reply-To: <74981806.5014941267021638774.JavaMail.root@zimbra1-e1.priv.proxad.net> References: <74981806.5014941267021638774.JavaMail.root@zimbra1-e1.priv.proxad.net> Date: Wed, 24 Feb 2010 09:56:09 -0500 Message-ID: <878wai3com.fsf@servo.finestructure.net> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" X-No-Spam-Score: Local X-Scanned-By: MIMEDefang 2.68 on 128.59.29.6 Cc: notmuch@notmuchmail.org Subject: Re: [notmuch] JSON output as default [was: Re: [PATCH] Add an "--output=(json|text|)" command-line option...] 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: Wed, 24 Feb 2010 14:56:21 -0000 --=-=-= Content-Transfer-Encoding: quoted-printable On Wed, 24 Feb 2010 15:27:18 +0100 (CET), racin@free.fr wrote: > > > I definitely want to be able to pipe single-field lists coming from > > > notmuch to grep, xargs, shell for loops, etc. without having to > > decode > > > JSON. > >=20 > > While I would love to see JSON (even by default), I agree. If I just > > want to code up a notmuch-based address book with sth like: > >=20 > > notmuch show to:Diana --output=3Dto --sort=3Drelevance --limit=3D20 > >=20 > > just getting back a plain list of mail addresses is the easiest to > > handle. >=20 > This would also be useful for the Emacs/Vim interfaces. For instance, my = smart completion patch > would really benefit from notmuch being capable of outputing various fiel= ds in all messages in plain text > separated by newlines (this is even easier to handle in emacs code than J= SON). In fact, most of the C code I had > to write for this patch is better replaced by the --output option... Ok, I'm convinced. I can see how they're both useful. I had been thinking more about the fact that text output isn't so useful for multiline content (like message content), but I can see how it would be useful for single line output. I had also been thinking about the fact that the current "text" output, specifically for the "show" command, *is* structured, but just not according to any standard that I know of. If the output is going to be structured (ie. "show" output) then it should be in JSON format. If not, like the output of a single field that is a single line, then having text output is definitely useful. jamie. --=-=-= Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (GNU/Linux) iQIcBAEBCAAGBQJLhT4KAAoJEO00zqvie6q8ecQP/RQkakG2wZzhPsP4TvKhaNqn J8kwCHgKflf2JsGxHIhbkfwikGpad4OulaRFoTVmsVHcAhhCy2oF9jqeFO/vgNJE aVFckPrOIpgappRKuXKqAO1HYcFGyJKyFu45LczgKtnrGaW2vmKRIy2+lEHbbHUW TyBi8QOFP6z4WLyv+xow+kkph8itPtB8G/0X7aWSzqCxZWptjyG/q/XBCSg69//9 uKjQ2sUfVNNcqwKVayh2Fm7+KDMj48Im8pYhaymFocH0N8MB4iJtmsEioM7SPKGV VcW0pv2YRJ5RwU/G81aaktqHN37H/5AbQKv3CFW3PRgHk7M0ux1hhVncUK2fv5ta Fo7jsMz6gw+FUQ4zWzHNE+Z3vECkSKgZhAGQnCcExkod7UFQ+aBlWaY16AfRSVJ+ UPHX8EjpDnDqRINsLUJGEUcyId0LfQEGDmS/v+C3rudd3vhMb3lqMg42yEVIMMLT MKwAPr0E7/LWYY4Ejxd4fQtZ/YA21fFO16Ekn5NXZwFnTU/53o2QaxIOvkYYpBKL rLR5B5LOCJKOrz/GEpHz5XbBsT9aJYEm/7sn36NaC9l/oQ0/U7zc2M+u/HTRv1ll LcgUDUye5k5VKfWDRHfU/Wk+OJ69yNvt/zrSxHmQaU2PLHITanQlgcBASqKWR4i7 +gUCzZ1d/ym5dVl79zIt =IcAJ -----END PGP SIGNATURE----- --=-=-=--