From: David Bremner Date: Sat, 11 Apr 2015 00:01:54 +0000 (+0900) Subject: Re: argument parsing refactoring round3 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=a3ccc352591ebce954a6e8193eb8e736b97785ce;p=notmuch-archives.git Re: argument parsing refactoring round3 --- diff --git a/40/ad0be2a47058b157cf710d0c5f8178eab9f220 b/40/ad0be2a47058b157cf710d0c5f8178eab9f220 new file mode 100644 index 000000000..dd4e68123 --- /dev/null +++ b/40/ad0be2a47058b157cf710d0c5f8178eab9f220 @@ -0,0 +1,71 @@ +Return-Path: +X-Original-To: notmuch@notmuchmail.org +Delivered-To: notmuch@notmuchmail.org +Received: from localhost (localhost [127.0.0.1]) + by arlo.cworth.org (Postfix) with ESMTP id E89796DE173B + for ; Fri, 10 Apr 2015 17:03:20 -0700 (PDT) +X-Virus-Scanned: Debian amavisd-new at cworth.org +X-Spam-Flag: NO +X-Spam-Score: 0.375 +X-Spam-Level: +X-Spam-Status: No, score=0.375 tagged_above=-999 required=5 tests=[AWL=0.375] + autolearn=disabled +Received: from arlo.cworth.org ([127.0.0.1]) + by localhost (arlo.cworth.org [127.0.0.1]) (amavisd-new, port 10024) + with ESMTP id 1ir_tc0wu8IY for ; + Fri, 10 Apr 2015 17:03:18 -0700 (PDT) +Received: from mx.xen14.node3324.gplhost.com (gitolite.debian.net + [87.98.215.224]) + by arlo.cworth.org (Postfix) with ESMTPS id A9E1B6DE15E7 + for ; Fri, 10 Apr 2015 17:03:18 -0700 (PDT) +Received: from remotemail by mx.xen14.node3324.gplhost.com with local (Exim + 4.80) (envelope-from ) + id 1YgisF-0006oY-HO; Sat, 11 Apr 2015 00:02:11 +0000 +Received: (nullmailer pid 21856 invoked by uid 1000); Sat, 11 Apr 2015 + 00:01:54 -0000 +From: David Bremner +To: guyzmo +Subject: Re: argument parsing refactoring round3 +In-Reply-To: <87oamy41nv.fsf@maritornes.cs.unb.ca> +References: <871tjws8w8.fsf@qmul.ac.uk> + <1428435042-16503-1-git-send-email-david@tethera.net> + <20150408143147.GD5218@vilya.online.net> + <87oamy41nv.fsf@maritornes.cs.unb.ca> +User-Agent: Notmuch/0.19+96~g703c8f9 (http://notmuchmail.org) Emacs/24.4.1 + (x86_64-pc-linux-gnu) +Date: Sat, 11 Apr 2015 09:01:54 +0900 +Message-ID: <87mw2fwn0t.fsf@maritornes.cs.unb.ca> +MIME-Version: 1.0 +Content-Type: text/plain +Cc: notmuch@notmuchmail.org +X-BeenThere: notmuch@notmuchmail.org +X-Mailman-Version: 2.1.18 +Precedence: list +List-Id: "Use and development of the notmuch mail system." + +List-Unsubscribe: , + +List-Archive: +List-Post: +List-Help: +List-Subscribe: , + +X-List-Received-Date: Sat, 11 Apr 2015 00:03:21 -0000 + +David Bremner writes: + +> guyzmo writes: +> +>> I was wondering whether you had considered actually using `docopt` to +>> generate the CLI parser from the output. + +> As it stands, I'm not particularly annoyed with the notmuch argument +> parsing code, so I mainly see negative issues about your proposal. + +On the other hand, I do find the config handling code annoying, so if +people have some ideas about that, I am interested to hear them. There +is now almost 1000 lines of C in notmuch-config.c, and despite some +efforts to streamline things, there is a lot of copying and pasting +every time someone wants to add a configuration option. + +d