Re: [notmuch] JSON output as default [was: Re: [PATCH] Add an "--output=(json|text...
authorracin <racin@free.fr>
Wed, 24 Feb 2010 14:27:18 +0000 (15:27 +0100)
committerW. Trevor King <wking@tremily.us>
Fri, 7 Nov 2014 17:36:16 +0000 (09:36 -0800)
40/d6776bc282e1cc8a01f6e0fb6ae9be7cd38dfc [new file with mode: 0644]

diff --git a/40/d6776bc282e1cc8a01f6e0fb6ae9be7cd38dfc b/40/d6776bc282e1cc8a01f6e0fb6ae9be7cd38dfc
new file mode 100644 (file)
index 0000000..b5e3038
--- /dev/null
@@ -0,0 +1,75 @@
+Return-Path: <racin@free.fr>\r
+X-Original-To: notmuch@notmuchmail.org\r
+Delivered-To: notmuch@notmuchmail.org\r
+Received: from localhost (localhost [127.0.0.1])\r
+       by olra.theworths.org (Postfix) with ESMTP id C3EDC431FBC\r
+       for <notmuch@notmuchmail.org>; Wed, 24 Feb 2010 06:27:32 -0800 (PST)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: -0.389\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=-0.389 tagged_above=-999 required=5\r
+       tests=[AWL=-0.390, BAYES_50=0.001] autolearn=ham\r
+Received: from olra.theworths.org ([127.0.0.1])\r
+       by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
+       with ESMTP id DH4o4QvgULH1 for <notmuch@notmuchmail.org>;\r
+       Wed, 24 Feb 2010 06:27:31 -0800 (PST)\r
+Received: from smtp5-g21.free.fr (smtp5-g21.free.fr [212.27.42.5])\r
+       by olra.theworths.org (Postfix) with ESMTP id B8A79431FAE\r
+       for <notmuch@notmuchmail.org>; Wed, 24 Feb 2010 06:27:30 -0800 (PST)\r
+Received: from smtp5-g21.free.fr (localhost [127.0.0.1])\r
+       by smtp5-g21.free.fr (Postfix) with ESMTP id 29336D480AF;\r
+       Wed, 24 Feb 2010 15:27:21 +0100 (CET)\r
+Received: from zimbra1-e1.priv.proxad.net (zimbra1-e1.priv.proxad.net\r
+       [172.20.243.151])\r
+       by smtp5-g21.free.fr (Postfix) with ESMTP id 1F905D4819D;\r
+       Wed, 24 Feb 2010 15:27:18 +0100 (CET)\r
+Date: Wed, 24 Feb 2010 15:27:18 +0100 (CET)\r
+From: racin@free.fr\r
+To: Sebastian Spaeth <Sebastian@SSpaeth.de>\r
+Message-ID:\r
+ <74981806.5014941267021638774.JavaMail.root@zimbra1-e1.priv.proxad.net>\r
+In-Reply-To:\r
+ <1257161639.5014171267021461605.JavaMail.root@zimbra1-e1.priv.proxad.net>\r
+MIME-Version: 1.0\r
+Content-Type: text/plain; charset=utf-8\r
+Content-Transfer-Encoding: 7bit\r
+X-Originating-IP: [132.166.135.72]\r
+X-Mailer: Zimbra 5.0 (ZimbraWebClient - FF3.0\r
+       (Linux)/5.0.15_GA_2815.UBUNTU8_64)\r
+X-Authenticated-User: racin@free.fr\r
+Cc: notmuch@notmuchmail.org\r
+Subject: Re: [notmuch] JSON output as default [was: Re: [PATCH] Add an\r
+ "--output=(json|text|)" command-line option...]\r
+X-BeenThere: notmuch@notmuchmail.org\r
+X-Mailman-Version: 2.1.13\r
+Precedence: list\r
+List-Id: "Use and development of the notmuch mail system."\r
+       <notmuch.notmuchmail.org>\r
+List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
+       <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
+List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
+List-Post: <mailto:notmuch@notmuchmail.org>\r
+List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
+List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
+       <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
+X-List-Received-Date: Wed, 24 Feb 2010 14:27:32 -0000\r
+\r
+\r
+> > I definitely want to be able to pipe single-field lists coming from\r
+> > notmuch to grep, xargs, shell for loops, etc. without having to\r
+> decode\r
+> > JSON.\r
+> \r
+> While I would love to see JSON (even by default), I agree. If I just\r
+> want to code up a notmuch-based address book with sth like:\r
+> \r
+> notmuch show to:Diana --output=to --sort=relevance --limit=20\r
+> \r
+> just getting back a plain list of mail addresses is the easiest to\r
+> handle.\r
+\r
+This would also be useful for the Emacs/Vim interfaces. For instance, my smart completion patch\r
+would really benefit from notmuch being capable of outputing various fields in all messages in plain text\r
+separated by newlines (this is even easier to handle in emacs code than JSON). In fact, most of the C code I had\r
+to write for this patch is better replaced by the --output option...\r