Re: [PATCH 0/4] Allow specifying alternate names for addresses in other_email
[notmuch-archives.git] / 00 / 7598010cf41d7131dc288a6db625c0fe36d337
1 Return-Path: <guyzmo@vilya.m0g.net>\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 arlo.cworth.org (Postfix) with ESMTP id 401726DE1997\r
6  for <notmuch@notmuchmail.org>; Wed,  8 Apr 2015 07:40:24 -0700 (PDT)\r
7 X-Virus-Scanned: Debian amavisd-new at cworth.org\r
8 X-Spam-Flag: NO\r
9 X-Spam-Score: -0.27\r
10 X-Spam-Level: \r
11 X-Spam-Status: No, score=-0.27 tagged_above=-999 required=5 tests=[AWL=0.280, \r
12  RP_MATCHES_RCVD=-0.55] autolearn=disabled\r
13 Received: from arlo.cworth.org ([127.0.0.1])\r
14  by localhost (arlo.cworth.org [127.0.0.1]) (amavisd-new, port 10024)\r
15  with ESMTP id oeFwnJYdtFaY for <notmuch@notmuchmail.org>;\r
16  Wed,  8 Apr 2015 07:40:21 -0700 (PDT)\r
17 X-Greylist: delayed 508 seconds by postgrey-1.35 at arlo;\r
18  Wed, 08 Apr 2015 07:40:21 PDT\r
19 Received: from mail.m0g.net (vilya.m0g.net [195.154.74.47])\r
20  by arlo.cworth.org (Postfix) with ESMTP id 984B46DE198A\r
21  for <notmuch@notmuchmail.org>; Wed,  8 Apr 2015 07:40:21 -0700 (PDT)\r
22 Received: from localhost (localhost [127.0.0.1])\r
23  by mail.m0g.net (Postfix) with ESMTP id 2A3403E3993;\r
24  Wed,  8 Apr 2015 16:31:52 +0200 (CEST)\r
25 X-Virus-Scanned: Debian amavisd-new at vilya.m0g.net\r
26 Received: from mail.m0g.net ([127.0.0.1])\r
27  by localhost (sd-38500.dedibox.fr [127.0.0.1]) (amavisd-new, port 10024)\r
28  with ESMTP id IDKlQ1AwUgej; Wed,  8 Apr 2015 16:31:51 +0200 (CEST)\r
29 Received: by mail.m0g.net (Postfix, from userid 1000)\r
30  id C40033E63D7; Wed,  8 Apr 2015 16:31:50 +0200 (CEST)\r
31 Date: Wed, 8 Apr 2015 16:31:47 +0200\r
32 From: guyzmo <guyzmo+notmuch@m0g.net>\r
33 To: David Bremner <david@tethera.net>\r
34 Subject: Re: argument parsing refactoring round3\r
35 Message-ID: <20150408143147.GD5218@vilya.online.net>\r
36 References: <871tjws8w8.fsf@qmul.ac.uk>\r
37  <1428435042-16503-1-git-send-email-david@tethera.net>\r
38 MIME-Version: 1.0\r
39 Content-Type: text/plain; charset=utf-8\r
40 Content-Disposition: inline\r
41 Content-Transfer-Encoding: 8bit\r
42 In-Reply-To: <1428435042-16503-1-git-send-email-david@tethera.net>\r
43 User-Agent: Mutt/1.5.23.1-rc1 (2014-03-12)\r
44 Cc: notmuch@notmuchmail.org\r
45 X-BeenThere: notmuch@notmuchmail.org\r
46 X-Mailman-Version: 2.1.18\r
47 Precedence: list\r
48 List-Id: "Use and development of the notmuch mail system."\r
49  <notmuch.notmuchmail.org>\r
50 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
51  <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
52 List-Archive: <http://notmuchmail.org/pipermail/notmuch/>\r
53 List-Post: <mailto:notmuch@notmuchmail.org>\r
54 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
55 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
56  <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
57 X-List-Received-Date: Wed, 08 Apr 2015 14:40:24 -0000\r
58 \r
59 Hi David,\r
60 \r
61 On Wed, Apr 08, 2015 at 04:30:38AM +0900, David Bremner wrote:\r
62 > I think a dealt with all of Mark's comments, even "notmuch help\r
63 > --help".\r
64\r
65 > I ended up creating a new function for the places where we want to\r
66 > process _only_ the shared options (config, setup, and help)\r
67 \r
68 I see you patching and repatching notmuch's CLI to improve it, and I was\r
69 wondering whether you had considered actually using `docopt` to generate\r
70 the CLI parser from the output.\r
71 \r
72 It's possible to chain docopts to create a CLI UI very much alike the\r
73 git command, and it's more easily maintainable, as you're actually\r
74 generating the code from the `--help` page instead of the other way\r
75 around, making you focus on how you want the user to use the CLI only.\r
76 \r
77 Here's the link to the C parser generator:\r
78 \r
79     https://github.com/docopt/docopt.c\r
80 \r
81 it might not be perfect as is, but it could be worth trying out? I\r
82 actually never tried the .c version of docopt.\r
83 \r
84 I had a more extensive experience with the python version, and since\r
85 then I totally dropped argparse.\r
86 \r
87     https://github.com/docopt/docopt.c\r
88 \r
89 I even tend to believe that one could create a full CLI using\r
90 python+docopt to actually control notmuch using the python notmuch\r
91 interface… Even though I'm pretty sure some would yell at me and\r
92 want to burn me as an heretic just for suggesting that :-)\r
93 \r
94 what do you believe?\r
95 \r
96 -- \r
97 Guyzmo\r