Re: [notmuch] "notmuch help" outputs to stderr?
authorCarl Worth <cworth@cworth.org>
Wed, 18 Nov 2009 16:29:20 +0000 (08:29 +1600)
committerW. Trevor King <wking@tremily.us>
Fri, 7 Nov 2014 17:35:36 +0000 (09:35 -0800)
07/6497d46697938575dbbbfc9c11d1b39b8a6d46 [new file with mode: 0644]

diff --git a/07/6497d46697938575dbbbfc9c11d1b39b8a6d46 b/07/6497d46697938575dbbbfc9c11d1b39b8a6d46
new file mode 100644 (file)
index 0000000..80dccbb
--- /dev/null
@@ -0,0 +1,103 @@
+Return-Path: <cworth@cworth.org>\r
+X-Original-To: notmuch@notmuchmail.org\r
+Delivered-To: notmuch@notmuchmail.org\r
+Received: from localhost (localhost [127.0.0.1])\r
+       by olra.theworths.org (Postfix) with ESMTP id 086BC431FC2;\r
+       Wed, 18 Nov 2009 08:29:37 -0800 (PST)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+Received: from olra.theworths.org ([127.0.0.1])\r
+       by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
+       with ESMTP id DsOqqwEWzYp2; Wed, 18 Nov 2009 08:29:36 -0800 (PST)\r
+Received: from cworth.org (localhost [127.0.0.1])\r
+       by olra.theworths.org (Postfix) with ESMTP id A961F431FBF;\r
+       Wed, 18 Nov 2009 08:29:35 -0800 (PST)\r
+From: Carl Worth <cworth@cworth.org>\r
+To: Lars Kellogg-Stedman <lars@seas.harvard.edu>, notmuch\r
+       <notmuch@notmuchmail.org>\r
+In-Reply-To: <20091118010116.GC25380@dottiness.seas.harvard.edu>\r
+References: <20091118005829.GB25380@dottiness.seas.harvard.edu>\r
+       <20091118010116.GC25380@dottiness.seas.harvard.edu>\r
+Date: Wed, 18 Nov 2009 08:29:20 -0800\r
+Message-ID: <874ooraja7.fsf@yoom.home.cworth.org>\r
+MIME-Version: 1.0\r
+Content-Type: text/plain; charset=us-ascii\r
+Subject: Re: [notmuch] "notmuch help" outputs to stderr?\r
+X-BeenThere: notmuch@notmuchmail.org\r
+X-Mailman-Version: 2.1.12\r
+Precedence: list\r
+List-Id: "Use and development of the notmuch mail system."\r
+       <notmuch.notmuchmail.org>\r
+List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
+       <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
+List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
+List-Post: <mailto:notmuch@notmuchmail.org>\r
+List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
+List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
+       <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
+X-List-Received-Date: Wed, 18 Nov 2009 16:29:37 -0000\r
+\r
+On Tue, 17 Nov 2009 20:01:16 -0500, Lars Kellogg-Stedman <lars@seas.harvard.edu> wrote:\r
+> > I've attached a patch that lets usage() take a FILE * argument so that\r
+> > you can output to stderr in response to usage errors, and stdout in\r
+> > response to an explicit request.\r
+> \r
+> Whoops, missed a couple of stderr's in that last patch.  New one\r
+> attached.\r
+> \r
+> -- \r
+> Lars Kellogg-Stedman <lars@seas.harvard.edu>\r
+> Senior Technologist, Computing and Information Technology\r
+> Harvard University School of Engineering and Applied Sciences\r
+\r
+Thanks Lars!\r
+\r
+That was obviously a bug, so I really appreciate both your report and\r
+your fix.\r
+\r
+BTW, for future patches, it would be easier for me, (and hopefully not\r
+too much harder for you), if you could format your mails so that "git\r
+am" will find a good commit message in them. There are a few different\r
+ways you can do that:\r
+\r
+Option (1) takes more work upfront to get comfortable with it and to\r
+make sure it works, but it's probably less work (particuarly 1.b with\r
+"git send-email) once you get into the flow of it. Option (2) is\r
+probably the least different from what you're currently doing.\r
+\r
+1. Make a commit locally with the commit message. Then run "git\r
+   format-patch", (with "git format-patch HEAD~N" where N is the number\r
+   of commits you want to generate), to generate formatted email\r
+   messages, (or even an entire mbox).\r
+\r
+   a. Suck those messages up into an email program. Add any commentary\r
+      (to not be part of the commit message) after the --- separator and\r
+      send.\r
+\r
+   b. Use "git send-email" to fire the messages off.\r
+\r
+2. Just attach the "git diff" output like you did, but then carefully\r
+   word the subject and body of the email message to look like a commit\r
+   message. You can again use a --- separator for commentary that's not\r
+   part of the patch.\r
+\r
+For example, option (2) would have looked like the below to generate the\r
+commit message I ended up using for your commit.\r
+\r
+Anyway, thanks again,\r
+\r
+-Carl\r
+\r
+Subject: [Patch] notmuch help: Print to stdout, not to stderr.\r
+\r
+Let usage() take a FILE * argument so that you can output to stderr in\r
+response to usage errors, and stdout in response to an explicit request.\r
+\r
+---\r
+\r
+Whoops, missed a couple of stderr's in that last patch.  New one\r
+attached.\r
+\r
+-- \r
+Lars Kellogg-Stedman <lars@seas.harvard.edu>\r
+Senior Technologist, Computing and Information Technology\r
+Harvard University School of Engineering and Applied Sciences\r