From: Jameson Rollins <jrollins@finestructure.net>
To: racin@free.fr, Sebastian Spaeth <Sebastian@SSpaeth.de>
Cc: notmuch@notmuchmail.org
Subject: Re: JSON output as default [was: Re: [PATCH] Add an "--output=(json|text|)" command-line option...]
Date: Wed, 24 Feb 2010 09:56:09 -0500 [thread overview]
Message-ID: <878wai3com.fsf@servo.finestructure.net> (raw)
In-Reply-To: <74981806.5014941267021638774.JavaMail.root@zimbra1-e1.priv.proxad.net>
[-- Attachment #1: Type: text/plain, Size: 1592 bytes --]
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.
> >
> > 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:
> >
> > notmuch show to:Diana --output=to --sort=relevance --limit=20
> >
> > just getting back a plain list of mail addresses is the easiest to
> > handle.
>
> 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 fields in all messages in plain text
> separated by newlines (this is even easier to handle in emacs code than JSON). 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.
[-- Attachment #2: Type: application/pgp-signature, Size: 835 bytes --]
next prev parent reply other threads:[~2010-02-24 14:56 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1257161639.5014171267021461605.JavaMail.root@zimbra1-e1.priv.proxad.net>
2010-02-24 14:27 ` JSON output as default [was: Re: [PATCH] Add an "--output=(json|text|)" command-line option...] racin
2010-02-24 14:56 ` Jameson Rollins [this message]
2009-12-18 5:33 [PATCH] JSON output for notmuch-search and notmuch-show Scott Robinson
2009-12-18 12:59 ` [PATCH] Add an "--output=(json|text|)" command-line option to both " david
2010-02-23 19:56 ` Carl Worth
2010-02-23 21:00 ` JSON output as default [was: Re: [PATCH] Add an "--output=(json|text|)" command-line option...] Jameson Rollins
2010-02-23 23:35 ` Carl Worth
2010-02-24 13:54 ` Sebastian Spaeth
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://notmuchmail.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=878wai3com.fsf@servo.finestructure.net \
--to=jrollins@finestructure.net \
--cc=Sebastian@SSpaeth.de \
--cc=notmuch@notmuchmail.org \
--cc=racin@free.fr \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://yhetil.org/notmuch.git/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).