1 Return-path: <notmuch-bounces@notmuchmail.org>
2 Envelope-to: cworth@localhost
3 Delivery-date: Wed, 18 Nov 2009 01:43:47 -0800
4 Received: from yoom.home.cworth.org ([127.0.0.1])
5 by yoom.home.cworth.org with esmtp (Exim 4.69)
6 (envelope-from <notmuch-bounces@notmuchmail.org>)
8 for cworth@localhost; Wed, 18 Nov 2009 01:27:47 -0800
9 X-Original-To: cworth@cworth.org
10 Delivered-To: cworth@cworth.org
11 Received: from olra.theworths.org [82.165.184.25]
12 by yoom.home.cworth.org with IMAP (fetchmail-6.3.9-rc2)
13 for <cworth@localhost> (single-drop); Wed, 18 Nov 2009 01:27:47 -0800 (PST)
14 Received: from localhost (localhost [127.0.0.1])
15 by olra.theworths.org (Postfix) with ESMTP id 12248431FC3
16 for <cworth@cworth.org>; Tue, 17 Nov 2009 17:01:22 -0800 (PST)
17 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org
21 X-Spam-Status: No, score=-6.17 tagged_above=-999 required=2 tests=[AWL=0.429,
22 BAYES_00=-2.599, RCVD_IN_DNSWL_MED=-4] autolearn=unavailable
23 Received: from olra.theworths.org ([127.0.0.1])
24 by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)
25 with ESMTP id TmBdVd1i-Wjb; Tue, 17 Nov 2009 17:01:20 -0800 (PST)
26 Received: from olra.theworths.org (localhost [127.0.0.1])
27 by olra.theworths.org (Postfix) with ESMTP id AF876431FBC;
28 Tue, 17 Nov 2009 17:01:20 -0800 (PST)
29 X-Original-To: notmuch@notmuchmail.org
30 Delivered-To: notmuch@notmuchmail.org
31 Received: from localhost (localhost [127.0.0.1])
32 by olra.theworths.org (Postfix) with ESMTP id 75784431FBC
33 for <notmuch@notmuchmail.org>; Tue, 17 Nov 2009 17:01:19 -0800 (PST)
34 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org
35 Received: from olra.theworths.org ([127.0.0.1])
36 by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)
37 with ESMTP id IoYHzHoKBskU for <notmuch@notmuchmail.org>;
38 Tue, 17 Nov 2009 17:01:18 -0800 (PST)
39 Received: from smtp-outbound.seas.harvard.edu (smtp-outbound.seas.harvard.edu
41 by olra.theworths.org (Postfix) with ESMTP id 7E033431FAE
42 for <notmuch@notmuchmail.org>; Tue, 17 Nov 2009 17:01:18 -0800 (PST)
43 Received: from dottiness.seas.harvard.edu (dottiness.seas.harvard.edu
45 by smtp-outbound.seas.harvard.edu (8.13.8/8.13.8) with SMTP id
47 for <notmuch@notmuchmail.org>; Tue, 17 Nov 2009 20:01:16 -0500
48 Received: by dottiness.seas.harvard.edu (sSMTP sendmail emulation);
49 Tue, 17 Nov 2009 20:01:16 -0500
50 Date: Tue, 17 Nov 2009 20:01:16 -0500
51 From: Lars Kellogg-Stedman <lars@seas.harvard.edu>
52 To: notmuch <notmuch@notmuchmail.org>
53 Message-ID: <20091118010116.GC25380@dottiness.seas.harvard.edu>
54 References: <20091118005829.GB25380@dottiness.seas.harvard.edu>
56 In-Reply-To: <20091118005829.GB25380@dottiness.seas.harvard.edu>
57 User-Agent: Mutt/1.5.19 (2009-01-05)
58 Subject: Re: [notmuch] "notmuch help" outputs to stderr?
59 X-BeenThere: notmuch@notmuchmail.org
60 X-Mailman-Version: 2.1.12
62 List-Id: "Use and development of the notmuch mail system."
63 <notmuch.notmuchmail.org>
64 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,
65 <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>
66 List-Archive: <http://notmuchmail.org/pipermail/notmuch>
67 List-Post: <mailto:notmuch@notmuchmail.org>
68 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>
69 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,
70 <mailto:notmuch-request@notmuchmail.org?subject=subscribe>
71 Content-Type: multipart/mixed; boundary="===============0848253760=="
72 Sender: notmuch-bounces@notmuchmail.org
73 Errors-To: notmuch-bounces@notmuchmail.org
76 --===============0848253760==
77 Content-Type: multipart/signed; micalg=pgp-sha256;
78 protocol="application/pgp-signature"; boundary="ZInfyf7laFu/Kiw7"
79 Content-Disposition: inline
83 Content-Type: multipart/mixed; boundary="KdquIMZPjGJQvRdI"
84 Content-Disposition: inline
88 Content-Type: text/plain; charset=us-ascii
89 Content-Disposition: inline
90 Content-Transfer-Encoding: quoted-printable
92 > I've attached a patch that lets usage() take a FILE * argument so that
93 > you can output to stderr in response to usage errors, and stdout in
94 > response to an explicit request.
96 Whoops, missed a couple of stderr's in that last patch. New one
100 Lars Kellogg-Stedman <lars@seas.harvard.edu>
101 Senior Technologist, Computing and Information Technology
102 Harvard University School of Engineering and Applied Sciences
106 Content-Type: text/plain; charset=us-ascii
107 Content-Disposition: attachment; filename="notmuch-help.patch"
108 Content-Transfer-Encoding: quoted-printable
110 diff --git a/notmuch.c b/notmuch.c
111 index c47e640..446c810 100644
114 @@ -157,23 +157,23 @@ command_t commands[] =3D {
124 - fprintf (stderr, "Usage: notmuch <command> [args...]\n");
125 - fprintf (stderr, "\n");
126 - fprintf (stderr, "Where <command> and [args...] are as follows:\n");
127 - fprintf (stderr, "\n");
128 + fprintf (out, "Usage: notmuch <command> [args...]\n");
129 + fprintf (out, "\n");
130 + fprintf (out, "Where <command> and [args...] are as follows:\n");
131 + fprintf (out, "\n");
133 for (i =3D 0; i < ARRAY_SIZE (commands); i++) {
134 command =3D &commands[i];
136 - fprintf (stderr, "\t%s\t%s\n\n", command->name, command->summary);
137 + fprintf (out, "\t%s\t%s\n\n", command->name, command->summary);
140 - fprintf (stderr, "Use \"notmuch help <command>\" for more details on e=
142 + fprintf (out, "Use \"notmuch help <command>\" for more details on each=
147 @@ -183,8 +183,8 @@ notmuch_help_command (unused (void *ctx), int argc, cha=
152 - fprintf (stderr, "The notmuch mail system.\n\n");
154 + fprintf (stdout, "The notmuch mail system.\n\n");
159 @@ -192,8 +192,8 @@ notmuch_help_command (unused (void *ctx), int argc, cha=
161 command =3D &commands[i];
163 if (strcmp (argv[0], command->name) =3D=3D 0) {
164 - fprintf (stderr, "Help for \"notmuch %s\":\n\n", argv[0]);
165 - fprintf (stderr, "\t%s\t%s\n\n%s\n\n", command->name,
166 + fprintf (stdout, "Help for \"notmuch %s\":\n\n", argv[0]);
167 + fprintf (stdout, "\t%s\t%s\n\n%s\n\n", command->name,
168 command->summary, command->documentation);
175 Content-Type: application/pgp-signature
176 Content-Disposition: inline
178 -----BEGIN PGP SIGNATURE-----
179 Version: GnuPG v1.4.9 (GNU/Linux)
181 iQEcBAEBCAAGBQJLA0dcAAoJENdGlQYxQazY4nIIAIBCds86/uTmnouvyoPruUUR
182 Bg5mXcnjuopz1Nwotl9s9U5sGeZuZngxyEvDz1Z1aTEjwab8ndNTf1xCwIoqBs+l
183 i/sc4nPYubLdy1Ab/84DKVtCSbj+v5rtqhegwUWV7S1BY7t8dKNPNv7YBg7P0Azs
184 6s3CUxDV5eJCcxCGxxWHH8JDKRf7rDs6vzDwyPWLxlg1Xb1lEM/sRgPCKiShPdO3
185 Ak2hECusjskALhSDYX8/FLMd9HwLBC13sfWuSi/pHUAIOI2jru2p5sXrVSlTnFIJ
186 fiMbPhKWiEaJj2kmm4pRwAhbTWp/J8ZvXWp0AyosxXQhQUWqujiyxgfiXS70SdQ=
188 -----END PGP SIGNATURE-----
192 --===============0848253760==
193 Content-Type: text/plain; charset="us-ascii"
195 Content-Transfer-Encoding: 7bit
196 Content-Disposition: inline
198 _______________________________________________
200 notmuch@notmuchmail.org
201 http://notmuchmail.org/mailman/listinfo/notmuch
203 --===============0848253760==--