--- /dev/null
+Return-Path: <guyzmo@vilya.m0g.net>\r
+X-Original-To: notmuch@notmuchmail.org\r
+Delivered-To: notmuch@notmuchmail.org\r
+Received: from localhost (localhost [127.0.0.1])\r
+ by arlo.cworth.org (Postfix) with ESMTP id 401726DE1997\r
+ for <notmuch@notmuchmail.org>; Wed, 8 Apr 2015 07:40:24 -0700 (PDT)\r
+X-Virus-Scanned: Debian amavisd-new at cworth.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: -0.27\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=-0.27 tagged_above=-999 required=5 tests=[AWL=0.280, \r
+ RP_MATCHES_RCVD=-0.55] autolearn=disabled\r
+Received: from arlo.cworth.org ([127.0.0.1])\r
+ by localhost (arlo.cworth.org [127.0.0.1]) (amavisd-new, port 10024)\r
+ with ESMTP id oeFwnJYdtFaY for <notmuch@notmuchmail.org>;\r
+ Wed, 8 Apr 2015 07:40:21 -0700 (PDT)\r
+X-Greylist: delayed 508 seconds by postgrey-1.35 at arlo;\r
+ Wed, 08 Apr 2015 07:40:21 PDT\r
+Received: from mail.m0g.net (vilya.m0g.net [195.154.74.47])\r
+ by arlo.cworth.org (Postfix) with ESMTP id 984B46DE198A\r
+ for <notmuch@notmuchmail.org>; Wed, 8 Apr 2015 07:40:21 -0700 (PDT)\r
+Received: from localhost (localhost [127.0.0.1])\r
+ by mail.m0g.net (Postfix) with ESMTP id 2A3403E3993;\r
+ Wed, 8 Apr 2015 16:31:52 +0200 (CEST)\r
+X-Virus-Scanned: Debian amavisd-new at vilya.m0g.net\r
+Received: from mail.m0g.net ([127.0.0.1])\r
+ by localhost (sd-38500.dedibox.fr [127.0.0.1]) (amavisd-new, port 10024)\r
+ with ESMTP id IDKlQ1AwUgej; Wed, 8 Apr 2015 16:31:51 +0200 (CEST)\r
+Received: by mail.m0g.net (Postfix, from userid 1000)\r
+ id C40033E63D7; Wed, 8 Apr 2015 16:31:50 +0200 (CEST)\r
+Date: Wed, 8 Apr 2015 16:31:47 +0200\r
+From: guyzmo <guyzmo+notmuch@m0g.net>\r
+To: David Bremner <david@tethera.net>\r
+Subject: Re: argument parsing refactoring round3\r
+Message-ID: <20150408143147.GD5218@vilya.online.net>\r
+References: <871tjws8w8.fsf@qmul.ac.uk>\r
+ <1428435042-16503-1-git-send-email-david@tethera.net>\r
+MIME-Version: 1.0\r
+Content-Type: text/plain; charset=utf-8\r
+Content-Disposition: inline\r
+Content-Transfer-Encoding: 8bit\r
+In-Reply-To: <1428435042-16503-1-git-send-email-david@tethera.net>\r
+User-Agent: Mutt/1.5.23.1-rc1 (2014-03-12)\r
+Cc: notmuch@notmuchmail.org\r
+X-BeenThere: notmuch@notmuchmail.org\r
+X-Mailman-Version: 2.1.18\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, 08 Apr 2015 14:40:24 -0000\r
+\r
+Hi David,\r
+\r
+On Wed, Apr 08, 2015 at 04:30:38AM +0900, David Bremner wrote:\r
+> I think a dealt with all of Mark's comments, even "notmuch help\r
+> --help".\r
+> \r
+> I ended up creating a new function for the places where we want to\r
+> process _only_ the shared options (config, setup, and help)\r
+\r
+I see you patching and repatching notmuch's CLI to improve it, and I was\r
+wondering whether you had considered actually using `docopt` to generate\r
+the CLI parser from the output.\r
+\r
+It's possible to chain docopts to create a CLI UI very much alike the\r
+git command, and it's more easily maintainable, as you're actually\r
+generating the code from the `--help` page instead of the other way\r
+around, making you focus on how you want the user to use the CLI only.\r
+\r
+Here's the link to the C parser generator:\r
+\r
+ https://github.com/docopt/docopt.c\r
+\r
+it might not be perfect as is, but it could be worth trying out? I\r
+actually never tried the .c version of docopt.\r
+\r
+I had a more extensive experience with the python version, and since\r
+then I totally dropped argparse.\r
+\r
+ https://github.com/docopt/docopt.c\r
+\r
+I even tend to believe that one could create a full CLI using\r
+python+docopt to actually control notmuch using the python notmuch\r
+interface… Even though I'm pretty sure some would yell at me and\r
+want to burn me as an heretic just for suggesting that :-)\r
+\r
+what do you believe?\r
+\r
+-- \r
+Guyzmo\r