1 Return-Path: <lars@seas.harvard.edu>
\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 75784431FBC
\r
6 for <notmuch@notmuchmail.org>; Tue, 17 Nov 2009 17:01:19 -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 IoYHzHoKBskU for <notmuch@notmuchmail.org>;
\r
11 Tue, 17 Nov 2009 17:01:18 -0800 (PST)
\r
12 Received: from smtp-outbound.seas.harvard.edu (smtp-outbound.seas.harvard.edu
\r
14 by olra.theworths.org (Postfix) with ESMTP id 7E033431FAE
\r
15 for <notmuch@notmuchmail.org>; Tue, 17 Nov 2009 17:01:18 -0800 (PST)
\r
16 Received: from dottiness.seas.harvard.edu (dottiness.seas.harvard.edu
\r
18 by smtp-outbound.seas.harvard.edu (8.13.8/8.13.8) with SMTP id
\r
20 for <notmuch@notmuchmail.org>; Tue, 17 Nov 2009 20:01:16 -0500
\r
21 Received: by dottiness.seas.harvard.edu (sSMTP sendmail emulation);
\r
22 Tue, 17 Nov 2009 20:01:16 -0500
\r
23 Date: Tue, 17 Nov 2009 20:01:16 -0500
\r
24 From: Lars Kellogg-Stedman <lars@seas.harvard.edu>
\r
25 To: notmuch <notmuch@notmuchmail.org>
\r
26 Message-ID: <20091118010116.GC25380@dottiness.seas.harvard.edu>
\r
27 References: <20091118005829.GB25380@dottiness.seas.harvard.edu>
\r
29 Content-Type: multipart/signed; micalg=pgp-sha256;
\r
30 protocol="application/pgp-signature"; boundary="ZInfyf7laFu/Kiw7"
\r
31 Content-Disposition: inline
\r
32 In-Reply-To: <20091118005829.GB25380@dottiness.seas.harvard.edu>
\r
33 User-Agent: Mutt/1.5.19 (2009-01-05)
\r
34 Subject: Re: [notmuch] "notmuch help" outputs to stderr?
\r
35 X-BeenThere: notmuch@notmuchmail.org
\r
36 X-Mailman-Version: 2.1.12
\r
38 List-Id: "Use and development of the notmuch mail system."
\r
39 <notmuch.notmuchmail.org>
\r
40 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,
\r
41 <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>
\r
42 List-Archive: <http://notmuchmail.org/pipermail/notmuch>
\r
43 List-Post: <mailto:notmuch@notmuchmail.org>
\r
44 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>
\r
45 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,
\r
46 <mailto:notmuch-request@notmuchmail.org?subject=subscribe>
\r
47 X-List-Received-Date: Wed, 18 Nov 2009 01:01:19 -0000
\r
51 Content-Type: multipart/mixed; boundary="KdquIMZPjGJQvRdI"
\r
52 Content-Disposition: inline
\r
56 Content-Type: text/plain; charset=us-ascii
\r
57 Content-Disposition: inline
\r
58 Content-Transfer-Encoding: quoted-printable
\r
60 > I've attached a patch that lets usage() take a FILE * argument so that
\r
61 > you can output to stderr in response to usage errors, and stdout in
\r
62 > response to an explicit request.
\r
64 Whoops, missed a couple of stderr's in that last patch. New one
\r
68 Lars Kellogg-Stedman <lars@seas.harvard.edu>
\r
69 Senior Technologist, Computing and Information Technology
\r
70 Harvard University School of Engineering and Applied Sciences
\r
74 Content-Type: text/plain; charset=us-ascii
\r
75 Content-Disposition: attachment; filename="notmuch-help.patch"
\r
76 Content-Transfer-Encoding: quoted-printable
\r
78 diff --git a/notmuch.c b/notmuch.c
\r
79 index c47e640..446c810 100644
\r
82 @@ -157,23 +157,23 @@ command_t commands[] =3D {
\r
92 - fprintf (stderr, "Usage: notmuch <command> [args...]\n");
\r
93 - fprintf (stderr, "\n");
\r
94 - fprintf (stderr, "Where <command> and [args...] are as follows:\n");
\r
95 - fprintf (stderr, "\n");
\r
96 + fprintf (out, "Usage: notmuch <command> [args...]\n");
\r
97 + fprintf (out, "\n");
\r
98 + fprintf (out, "Where <command> and [args...] are as follows:\n");
\r
99 + fprintf (out, "\n");
\r
101 for (i =3D 0; i < ARRAY_SIZE (commands); i++) {
\r
102 command =3D &commands[i];
\r
104 - fprintf (stderr, "\t%s\t%s\n\n", command->name, command->summary);
\r
105 + fprintf (out, "\t%s\t%s\n\n", command->name, command->summary);
\r
108 - fprintf (stderr, "Use \"notmuch help <command>\" for more details on e=
\r
109 ach command.\n\n");
\r
110 + fprintf (out, "Use \"notmuch help <command>\" for more details on each=
\r
115 @@ -183,8 +183,8 @@ notmuch_help_command (unused (void *ctx), int argc, cha=
\r
119 if (argc =3D=3D 0) {
\r
120 - fprintf (stderr, "The notmuch mail system.\n\n");
\r
122 + fprintf (stdout, "The notmuch mail system.\n\n");
\r
127 @@ -192,8 +192,8 @@ notmuch_help_command (unused (void *ctx), int argc, cha=
\r
129 command =3D &commands[i];
\r
131 if (strcmp (argv[0], command->name) =3D=3D 0) {
\r
132 - fprintf (stderr, "Help for \"notmuch %s\":\n\n", argv[0]);
\r
133 - fprintf (stderr, "\t%s\t%s\n\n%s\n\n", command->name,
\r
134 + fprintf (stdout, "Help for \"notmuch %s\":\n\n", argv[0]);
\r
135 + fprintf (stdout, "\t%s\t%s\n\n%s\n\n", command->name,
\r
136 command->summary, command->documentation);
\r
140 --KdquIMZPjGJQvRdI--
\r
143 Content-Type: application/pgp-signature
\r
144 Content-Disposition: inline
\r
146 -----BEGIN PGP SIGNATURE-----
\r
147 Version: GnuPG v1.4.9 (GNU/Linux)
\r
149 iQEcBAEBCAAGBQJLA0dcAAoJENdGlQYxQazY4nIIAIBCds86/uTmnouvyoPruUUR
\r
150 Bg5mXcnjuopz1Nwotl9s9U5sGeZuZngxyEvDz1Z1aTEjwab8ndNTf1xCwIoqBs+l
\r
151 i/sc4nPYubLdy1Ab/84DKVtCSbj+v5rtqhegwUWV7S1BY7t8dKNPNv7YBg7P0Azs
\r
152 6s3CUxDV5eJCcxCGxxWHH8JDKRf7rDs6vzDwyPWLxlg1Xb1lEM/sRgPCKiShPdO3
\r
153 Ak2hECusjskALhSDYX8/FLMd9HwLBC13sfWuSi/pHUAIOI2jru2p5sXrVSlTnFIJ
\r
154 fiMbPhKWiEaJj2kmm4pRwAhbTWp/J8ZvXWp0AyosxXQhQUWqujiyxgfiXS70SdQ=
\r
156 -----END PGP SIGNATURE-----
\r
158 --ZInfyf7laFu/Kiw7--
\r