From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Neil Jerram Newsgroups: gmane.lisp.guile.devel Subject: [PATCH] Simplifying guile-tools Date: Sun, 8 May 2011 23:18:12 +0100 Message-ID: <1304893097-10889-1-git-send-email-neil@ossau.uklinux.net> NNTP-Posting-Host: lo.gmane.org X-Trace: dough.gmane.org 1304893176 27010 80.91.229.12 (8 May 2011 22:19:36 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sun, 8 May 2011 22:19:36 +0000 (UTC) To: guile-devel@gnu.org Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Mon May 09 00:19:30 2011 Return-path: Envelope-to: guile-devel@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1QJCK1-0003jB-Ui for guile-devel@m.gmane.org; Mon, 09 May 2011 00:19:30 +0200 Original-Received: from localhost ([::1]:37053 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QJCK1-0000Ux-EX for guile-devel@m.gmane.org; Sun, 08 May 2011 18:19:29 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]:41925) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QJCJy-0000Up-RG for guile-devel@gnu.org; Sun, 08 May 2011 18:19:27 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QJCJy-0002nc-0K for guile-devel@gnu.org; Sun, 08 May 2011 18:19:26 -0400 Original-Received: from mail3.uklinux.net ([80.84.72.33]:51987) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QJCJx-0002lW-Pl for guile-devel@gnu.org; Sun, 08 May 2011 18:19:25 -0400 Original-Received: from arudy (unknown [78.149.196.143]) by mail3.uklinux.net (Postfix) with ESMTP id 3706E1F6657 for ; Sun, 8 May 2011 23:18:36 +0100 (BST) Original-Received: from neil-laptop.520b.com (unknown [192.168.11.9]) by arudy (Postfix) with ESMTP id DF48838038 for ; Sun, 8 May 2011 23:18:29 +0100 (BST) X-Mailer: git-send-email 1.7.4.1 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4-2.6 X-Received-From: 80.84.72.33 X-BeenThere: guile-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Developers list for Guile, the GNU extensibility library" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Original-Sender: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.devel:12464 Archived-At: Hi there! While we were discussing the name of guile-tools, back in March, I wrote: > I think I might find guile-tools (as is) less bothering if its > built-in commands (help, version and list) were rewritten as scripts > themselves. Then it would be clearer that the remaining code in > guile-tools was just implementing the main-invocation convention for > scripts/*. Following this email is a series of patches in this direction. It didn't work to try to move `help' and `version' into separate scripts because those are given as options and not script names. But it did work out nicely for `list', and also I managed to simplify and enhance (ice-9 getopt-long) such that guile-tools doesn't need to have its own getopt variant. The end result is that guile-tools is a lot shorter and (IMO) sweeter. Here are the titles of the following patches. [PATCH 1/5] Fix "occurrances" typos in getopt-long code and test [PATCH 2/5] Simplify getopt-long handling of option values, esp with multiple occurrences [PATCH 3/5] Handle short option unclumping progressively, instead of all upfront [PATCH 4/5] Implement #:stop-at-first-non-option option for getopt-long [PATCH 5/5] Reveal guile-tools's inner simplicity... What do you think? Thanks, Neil