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 382FC431FBC
\r
6 for <notmuch@notmuchmail.org>; Tue, 17 Nov 2009 16:58:31 -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 SP9jWc9RTkoz for <notmuch@notmuchmail.org>;
\r
11 Tue, 17 Nov 2009 16:58:30 -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 80C56431FAE
\r
15 for <notmuch@notmuchmail.org>; Tue, 17 Nov 2009 16:58:30 -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 19:58:29 -0500
\r
21 Received: by dottiness.seas.harvard.edu (sSMTP sendmail emulation);
\r
22 Tue, 17 Nov 2009 19:58:29 -0500
\r
23 Date: Tue, 17 Nov 2009 19:58:29 -0500
\r
24 From: Lars Kellogg-Stedman <lars@seas.harvard.edu>
\r
25 To: notmuch <notmuch@notmuchmail.org>
\r
26 Message-ID: <20091118005829.GB25380@dottiness.seas.harvard.edu>
\r
28 Content-Type: multipart/signed; micalg=pgp-sha256;
\r
29 protocol="application/pgp-signature"; boundary="L6iaP+gRLNZHKoI4"
\r
30 Content-Disposition: inline
\r
31 User-Agent: Mutt/1.5.19 (2009-01-05)
\r
32 Subject: [notmuch] "notmuch help" outputs to stderr?
\r
33 X-BeenThere: notmuch@notmuchmail.org
\r
34 X-Mailman-Version: 2.1.12
\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: Wed, 18 Nov 2009 00:58:31 -0000
\r
49 Content-Type: multipart/mixed; boundary="z6Eq5LdranGa6ru8"
\r
50 Content-Disposition: inline
\r
54 Content-Type: text/plain; charset=us-ascii
\r
55 Content-Disposition: inline
\r
56 Content-Transfer-Encoding: quoted-printable
\r
58 I'm just noticing that 'notmuch help ...' outputs to stderr, which
\r
59 isn't terribly intuitive. For example, the obvious invocation:
\r
63 =2E..isn't terribly helpful.
\r
65 I've attached a patch that lets usage() take a FILE * argument so that
\r
66 you can output to stderr in response to usage errors, and stdout in
\r
67 response to an explicit request.
\r
70 Lars Kellogg-Stedman <lars@seas.harvard.edu>
\r
71 Senior Technologist, Computing and Information Technology
\r
72 Harvard University School of Engineering and Applied Sciences
\r
76 Content-Type: text/plain; charset=us-ascii
\r
77 Content-Disposition: attachment; filename="notmuch-help.patch"
\r
78 Content-Transfer-Encoding: quoted-printable
\r
80 diff --git a/notmuch.c b/notmuch.c
\r
81 index c47e640..a35cb99 100644
\r
84 @@ -157,23 +157,23 @@ command_t commands[] =3D {
\r
94 - fprintf (stderr, "Usage: notmuch <command> [args...]\n");
\r
95 - fprintf (stderr, "\n");
\r
96 - fprintf (stderr, "Where <command> and [args...] are as follows:\n");
\r
97 - fprintf (stderr, "\n");
\r
98 + fprintf (out, "Usage: notmuch <command> [args...]\n");
\r
99 + fprintf (out, "\n");
\r
100 + fprintf (out, "Where <command> and [args...] are as follows:\n");
\r
101 + fprintf (out, "\n");
\r
103 for (i =3D 0; i < ARRAY_SIZE (commands); i++) {
\r
104 command =3D &commands[i];
\r
106 - fprintf (stderr, "\t%s\t%s\n\n", command->name, command->summary);
\r
107 + fprintf (out, "\t%s\t%s\n\n", command->name, command->summary);
\r
110 - fprintf (stderr, "Use \"notmuch help <command>\" for more details on e=
\r
111 ach command.\n\n");
\r
112 + fprintf (out, "Use \"notmuch help <command>\" for more details on each=
\r
117 @@ -183,8 +183,8 @@ notmuch_help_command (unused (void *ctx), int argc, cha=
\r
121 if (argc =3D=3D 0) {
\r
122 - fprintf (stderr, "The notmuch mail system.\n\n");
\r
124 + fprintf (stdout, "The notmuch mail system.\n\n");
\r
130 --z6Eq5LdranGa6ru8--
\r
133 Content-Type: application/pgp-signature
\r
134 Content-Disposition: inline
\r
136 -----BEGIN PGP SIGNATURE-----
\r
137 Version: GnuPG v1.4.9 (GNU/Linux)
\r
139 iQEcBAEBCAAGBQJLA0a1AAoJENdGlQYxQazYr78IAJtqTWIpBqSdOWqTzt/r4XNn
\r
140 KJ5mWAoNfq4H+3kx3xoWOFYS7qAYeJoHQWCDbMdb+zEXvPX6hMFn9+OxRN+N5FdQ
\r
141 uxGTugSG9xSsK28oGDCQUtr5uheo+tH0jygPjI+LTD97vjUYS4K2qzhLGFJmpLcj
\r
142 1akMJXM0gSdPZT8dJyjxvC15pgboLspE4+b6jexXmd4UoFvXgqvjkYHeV4Wk+s0L
\r
143 xu+HkCGXL9WHYc3t171fFAru4Zd1AUxFQl4BZ2Y+OqRZUrD28Mtz3zGQxbJQoifl
\r
144 JFrgPAWioLN71SkVq/y+efjvGSl0osPpKU5dftMmyY1zV7k7mMlO08ZSJU+wANA=
\r
146 -----END PGP SIGNATURE-----
\r
148 --L6iaP+gRLNZHKoI4--
\r