Re: [PATCH] configure: add --without-api-docs option
[notmuch-archives.git] / 67 / 2cee868e862af02675d7db7ede32410c157b4f
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 54D5840D152\r
6         for <notmuch@notmuchmail.org>; Thu, 28 Oct 2010 12:24:56 -0700 (PDT)\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
8 X-Spam-Flag: NO\r
9 X-Spam-Score: -2.89\r
10 X-Spam-Level: \r
11 X-Spam-Status: No, score=-2.89 tagged_above=-999 required=5\r
12         tests=[ALL_TRUSTED=-1, BAYES_00=-1.9, T_MIME_NO_TEXT=0.01]\r
13         autolearn=ham\r
14 Received: from olra.theworths.org ([127.0.0.1])\r
15         by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
16         with ESMTP id XxyK1yAkCeKW for <notmuch@notmuchmail.org>;\r
17         Thu, 28 Oct 2010 12:24:46 -0700 (PDT)\r
18 Received: from yoom.home.cworth.org (localhost [127.0.0.1])\r
19         by olra.theworths.org (Postfix) with ESMTP id 1DD1A40D157\r
20         for <notmuch@notmuchmail.org>; Thu, 28 Oct 2010 12:24:46 -0700 (PDT)\r
21 Received: by yoom.home.cworth.org (Postfix, from userid 1000)\r
22         id C3C5F2540F4; Thu, 28 Oct 2010 12:24:45 -0700 (PDT)\r
23 From: Carl Worth <cworth@cworth.org>\r
24 To: notmuch@notmuchmail.org\r
25 Subject: Notmuch scripters rejoice! New "notmuch search --output=(...)"\r
26 User-Agent: Notmuch/0.3.1-124-gc9e0da3 (http://notmuchmail.org) Emacs/23.2.1\r
27         (i486-pc-linux-gnu)\r
28 Date: Thu, 28 Oct 2010 12:24:45 -0700\r
29 Message-ID: <8762wmglxe.fsf@yoom.home.cworth.org>\r
30 MIME-Version: 1.0\r
31 Content-Type: multipart/signed; boundary="=-=-=";\r
32         micalg=pgp-sha1; protocol="application/pgp-signature"\r
33 X-BeenThere: notmuch@notmuchmail.org\r
34 X-Mailman-Version: 2.1.13\r
35 Precedence: list\r
36 List-Id: "Use and development of the notmuch mail system."\r
37         <notmuch.notmuchmail.org>\r
38 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
39         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
40 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
41 List-Post: <mailto:notmuch@notmuchmail.org>\r
42 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
43 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
44         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
45 X-List-Received-Date: Thu, 28 Oct 2010 19:24:56 -0000\r
46 \r
47 --=-=-=\r
48 Content-Transfer-Encoding: quoted-printable\r
49 \r
50 I just added a new feature to notmuch that I've been wanting for a very\r
51 long time. It's a new option to "notmuch search" as follows:\r
52 \r
53         --output=3D(summary|threads|messages|files|tags)\r
54 \r
55 The "summary" value is the default and behaves as "notmuch search"\r
56 always has, (printing a one-line summary with a bunch of information\r
57 about each thread).\r
58 \r
59 Each of the other options causes "notmuch search" to print only a single\r
60 value, (thread ID, message ID, filename, or tag), one-per-line[*]. This\r
61 is intended to be useful in scripts to do things as follows:\r
62 \r
63         for spamfile in $(notmuch search tag:spam); do\r
64                 rm $spamfile\r
65         done\r
66 \r
67 Or what have you.\r
68 \r
69 I hope people find this useful. See "notmuch help search" for more\r
70 details.\r
71 \r
72 Oh, and with this change, the existing "notmuch search-tags" command is\r
73 redundant, (it behaves in the same way as "notmuch search\r
74 =2D-output=3Dtags"). I think I'll drop search-tags from the list of\r
75 documented commands, (but it probably won't be too painful to continue\r
76 to support it as a deprecated command name).\r
77 \r
78 I'm also wondering about "notmuch count". With the new feature above,\r
79 one could count matching messages as "notmuch count" does with something\r
80 like:\r
81 \r
82         notmuch search --output=3Dmessages <search-terms> | wc -l\r
83 \r
84 That's a bit of a mouthful compared to "notmuch count", but the new\r
85 command also enables the counting of matching threads:\r
86 \r
87         notmuch search --output=3Dthreads <search-terms> | wc -l\r
88 \r
89 which is something that "notmuch count" doesn't do.\r
90 \r
91 I don't think I'll change "notmuch count". It's probably still useful,\r
92 (doing what it's documented to do), and it's also likely much more\r
93 efficient than either of the above "notmuch search" pipelines.\r
94 \r
95 =2DCarl\r
96 \r
97 [*] Or, when under the influence of --format=3Djson, the results are\r
98 printed as a single JSON array.\r
99 \r
100 =2D-=20\r
101 carl.d.worth@intel.com\r
102 \r
103 --=-=-=\r
104 Content-Type: application/pgp-signature\r
105 \r
106 -----BEGIN PGP SIGNATURE-----\r
107 Version: GnuPG v1.4.10 (GNU/Linux)\r
108 \r
109 iD8DBQFMyc396JDdNq8qSWgRApC+AJ9PjIt7juIEoNaPoh4U1walfTI8LwCeLFCU\r
110 U89KquzFAmV9eUeaAeu2blE=\r
111 =JiNM\r
112 -----END PGP SIGNATURE-----\r
113 --=-=-=--\r