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 A4A77431FBF;
\r
6 Fri, 25 Dec 2009 13:33:13 -0800 (PST)
\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org
\r
8 Received: from olra.theworths.org ([127.0.0.1])
\r
9 by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)
\r
10 with ESMTP id bkPIa2Zr9bO2; Fri, 25 Dec 2009 13:33:13 -0800 (PST)
\r
11 Received: from yoom.home.cworth.org (localhost [127.0.0.1])
\r
12 by olra.theworths.org (Postfix) with ESMTP id CDF18431FBC;
\r
13 Fri, 25 Dec 2009 13:33:12 -0800 (PST)
\r
14 Received: by yoom.home.cworth.org (Postfix, from userid 1000)
\r
15 id 67751254307; Tue, 22 Dec 2009 21:58:53 -0800 (PST)
\r
16 From: Carl Worth <cworth@cworth.org>
\r
17 To: David Bremner <david@tethera.net>, notmuch@notmuchmail.org
\r
18 In-Reply-To: <871virsstp.fsf@pivot.cs.unb.ca>
\r
19 References: <1261114167-sup-8228@lisa>
\r
20 <1261141195-5469-1-git-send-email-david@tethera.net>
\r
21 <87iqc4yyo8.fsf@yoom.home.cworth.org> <871virsstp.fsf@pivot.cs.unb.ca>
\r
22 Date: Tue, 22 Dec 2009 21:58:52 -0800
\r
23 Message-ID: <87d426nsdf.fsf@yoom.home.cworth.org>
\r
25 Content-Type: multipart/signed; boundary="=-=-=";
\r
26 micalg=pgp-sha1; protocol="application/pgp-signature"
\r
27 Subject: Re: [notmuch] [PATCH] Add an "--output=(json|text|)" command-line
\r
28 option to both notmuch-search and notmuch-show.
\r
29 X-BeenThere: notmuch@notmuchmail.org
\r
30 X-Mailman-Version: 2.1.12
\r
32 List-Id: "Use and development of the notmuch mail system."
\r
33 <notmuch.notmuchmail.org>
\r
34 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,
\r
35 <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>
\r
36 List-Archive: <http://notmuchmail.org/pipermail/notmuch>
\r
37 List-Post: <mailto:notmuch@notmuchmail.org>
\r
38 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>
\r
39 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,
\r
40 <mailto:notmuch-request@notmuchmail.org?subject=subscribe>
\r
41 X-List-Received-Date: Fri, 25 Dec 2009 21:33:13 -0000
\r
44 Content-Transfer-Encoding: quoted-printable
\r
46 On Fri, 18 Dec 2009 20:36:34 -0400, David Bremner <david@tethera.net> wrote:
\r
47 > It's a detail, but could you choose two names that are not substrings of
\r
48 > each other? Eventually we do want tab completion on the command line to
\r
51 Yes, that's a good point.
\r
53 > Also, "search --for tags foo" suggests to me that
\r
54 > searching for tags matching foo. What about using --output for that?
\r
56 OK. "--output" sounds good to me here.
\r
58 > One thing that is not completely clear to me at this point is what the
\r
59 > difference is between=20
\r
61 > notmuch search --for messages search-terms
\r
65 > notmuch show search-terms
\r
67 So, "notmuch show <search-terms>" is clear enough---it works as it does
\r
70 The new command, ("notmuch search --output=3Dmessages"), would be quite
\r
71 different. It would have single-line output for each message, (as
\r
72 "notmuch search" has single line-output already, but for threads by
\r
73 default). You can see behavior like this in the "notmuch
\r
74 search-messages" command for which I sent a patch a while ago, (but have
\r
77 The idea is that "notmuch search" would always give single-line output
\r
78 suitable for various kinds of processing.
\r
80 For example. How much mail have I sent?
\r
82 notmuch search --output=3Dmessages tag:sent | wc -l
\r
84 That's something you can't do with a thread-based search, (and it's not
\r
85 convenient to get a robust result from "notmuch show").
\r
87 Once this is combined with a new --format to select what gets printed, I
\r
88 can imagine a lot of useful things, like collecting email addresses:
\r
90 notmuch search --output=3Dmessages --format=3D"${FROM}" to:cworth@cworth.o=
\r
93 or whatever. I can imagine a lot of different queries I'd like to be
\r
94 able to make of my mail store with things like this.
\r
99 Content-Type: application/pgp-signature
\r
101 -----BEGIN PGP SIGNATURE-----
\r
102 Version: GnuPG v1.4.10 (GNU/Linux)
\r
104 iD8DBQFLMbGd6JDdNq8qSWgRAjB7AKCgsrVNgTYFswiSJXY3i/w7dOUAQgCgoAKC
\r
105 O/JDJ9YCvzdygtxPMOjeFpY=
\r
107 -----END PGP SIGNATURE-----
\r