Re: [PATCH 1/2] cli: convert "notmuch show" to use the new argument parser
authorAustin Clements <amdragon@MIT.EDU>
Mon, 6 Feb 2012 14:14:39 +0000 (09:14 +1900)
committerW. Trevor King <wking@tremily.us>
Fri, 7 Nov 2014 17:44:12 +0000 (09:44 -0800)
7b/bc4c07185a83261dd2dfe47e9f691f53298633 [new file with mode: 0644]

diff --git a/7b/bc4c07185a83261dd2dfe47e9f691f53298633 b/7b/bc4c07185a83261dd2dfe47e9f691f53298633
new file mode 100644 (file)
index 0000000..b459c1b
--- /dev/null
@@ -0,0 +1,101 @@
+Return-Path: <amdragon@mit.edu>\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 3589F431FAF\r
+       for <notmuch@notmuchmail.org>; Mon,  6 Feb 2012 06:15:58 -0800 (PST)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: -0.7\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=-0.7 tagged_above=-999 required=5\r
+       tests=[RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled\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 5mPj3XL-ZhzY for <notmuch@notmuchmail.org>;\r
+       Mon,  6 Feb 2012 06:15:57 -0800 (PST)\r
+Received: from dmz-mailsec-scanner-5.mit.edu (DMZ-MAILSEC-SCANNER-5.MIT.EDU\r
+       [18.7.68.34])\r
+       by olra.theworths.org (Postfix) with ESMTP id 82B8E431FAE\r
+       for <notmuch@notmuchmail.org>; Mon,  6 Feb 2012 06:15:57 -0800 (PST)\r
+X-AuditID: 12074422-b7fd66d0000008f9-4f-4f2fe09adbbb\r
+Received: from mailhub-auth-2.mit.edu ( [18.7.62.36])\r
+       by dmz-mailsec-scanner-5.mit.edu (Symantec Messaging Gateway) with SMTP\r
+       id 99.88.02297.A90EF2F4; Mon,  6 Feb 2012 09:15:54 -0500 (EST)\r
+Received: from outgoing.mit.edu (OUTGOING-AUTH.MIT.EDU [18.7.22.103])\r
+       by mailhub-auth-2.mit.edu (8.13.8/8.9.2) with ESMTP id q16EFrZi010758; \r
+       Mon, 6 Feb 2012 09:15:54 -0500\r
+Received: from awakening.csail.mit.edu (awakening.csail.mit.edu [18.26.4.91])\r
+       (authenticated bits=0)\r
+       (User authenticated as amdragon@ATHENA.MIT.EDU)\r
+       by outgoing.mit.edu (8.13.6/8.12.4) with ESMTP id q16EFonX022585\r
+       (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=NOT);\r
+       Mon, 6 Feb 2012 09:15:53 -0500 (EST)\r
+Received: from amthrax by awakening.csail.mit.edu with local (Exim 4.77)\r
+       (envelope-from <amdragon@mit.edu>)\r
+       id 1RuPL5-0006ur-Q4; Mon, 06 Feb 2012 09:14:39 -0500\r
+Date: Mon, 6 Feb 2012 09:14:39 -0500\r
+From: Austin Clements <amdragon@MIT.EDU>\r
+To: Jani Nikula <jani@nikula.org>\r
+Subject: Re: [PATCH 1/2] cli: convert "notmuch show" to use the new argument\r
+       parser\r
+Message-ID: <20120206141439.GR10898@mit.edu>\r
+References:\r
+ <df2e9bd7682e9c81e1b205cc1d92a1526cdd1a9b.1328308635.git.jani@nikula.org>\r
+       <20120206041205.GP10898@mit.edu> <87ty34bdnp.fsf@nikula.org>\r
+MIME-Version: 1.0\r
+Content-Type: text/plain; charset=us-ascii\r
+Content-Disposition: inline\r
+In-Reply-To: <87ty34bdnp.fsf@nikula.org>\r
+User-Agent: Mutt/1.5.21 (2010-09-15)\r
+X-Brightmail-Tracker:\r
+ H4sIAAAAAAAAA+NgFvrHIsWRmVeSWpSXmKPExsUixG6nojvrgb6/wcw3uhZN050trt+cyezA\r
+       5HHr/mt2j2erbjEHMEVx2aSk5mSWpRbp2yVwZey684K94Bh7xekp55kbGF+zdjFyckgImEi8\r
+       a3/ICGGLSVy4t54NxBYS2Mco0dcnC2GvZ5To7+CEsE8wSXS3+XcxcgHZSxglbvydAzSIg4NF\r
+       QEVi1QNRkBo2AQ2JbfuXg80UEVCU2HxyP5jNLCAt8e13MxOILSwQKvF31UR2EJtXQEdi9o0G\r
+       Voj50xglvu6QhIgLSpyc+YQFoldL4sa/l0wgq0DmLP/HAWJyAq26t0kBpEIU6IApJ7exTWAU\r
+       moWkeRaS5lkIzQsYmVcxyqbkVunmJmbmFKcm6xYnJ+blpRbpmurlZpbopaaUbmIEB7OL0g7G\r
+       nweVDjEKcDAq8fAqmuj7C7EmlhVX5h5ilORgUhLl5QPGghBfUn5KZUZicUZ8UWlOavEhRgkO\r
+       ZiURXrVJQDnelMTKqtSifJiUNAeLkjivutY7PyGB9MSS1OzU1ILUIpisDAeHkgSvHMhQwaLU\r
+       9NSKtMycEoQ0EwcnyHAeoOGSIDW8xQWJucWZ6RD5U4yKUuK83+8DJQRAEhmleXC9sGTzilEc\r
+       6BVh3o8gVTzARAXX/QpoMBPQ4H1suiCDSxIRUlINjEJuR7+K9ixjKTTY1flwVT5zqKRgheT9\r
+       CZvvXfP5teaAgbWZ84MVXA9sU703uzR8S7p4RfTsRcMLPYE/TCrSdR8YfXfk5P93clVp4erS\r
+       d3tPKu1/U1EmeE37vyPXN52kcPm0bedaTZbt+9vkenqPyu7F7z4+fmI+y0N6w+FYo7anq3uf\r
+       pR6UvarEUpyRaKjFXFScCADwROTxEQMAAA==\r
+Cc: notmuch@notmuchmail.org\r
+X-BeenThere: notmuch@notmuchmail.org\r
+X-Mailman-Version: 2.1.13\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: Mon, 06 Feb 2012 14:15:58 -0000\r
+\r
+Quoth Jani Nikula on Feb 06 at  7:54 am:\r
+> On Sun, 5 Feb 2012 23:12:05 -0500, Austin Clements <amdragon@MIT.EDU> wrote:\r
+> > Yikes.  I don't envy you this patch.  Two minor nits, otherwise this\r
+> > and the next patch LGTM.\r
+> \r
+> Thanks for the review. I'll roll another version, I think it will be\r
+> better with your suggestions incorporated.\r
+> \r
+> > Quoth Jani Nikula on Feb 04 at 12:41 am:\r
+> > > Use the new notmuch argument parser to handle arguments in "notmuch\r
+> > > show". There are two corner case functional changes:\r
+> > > \r
+> > > 1) Also set params.raw = 1 when defaulting to raw format when part is\r
+> > >    requested but format is not specified.\r
+> > \r
+> > Huh.  So "notmuch show --part=0 <query>" was broken before.\r
+> \r
+> Hmm, yes, it seems so. Do you think I should make this a separate fix?\r
+\r
+I wouldn't bother.  Since this usage would throw --format=raw into\r
+"useless mode", clearly no one cared.  No sense throwing good code\r
+after bad.\r