From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Andrew Horton Newsgroups: gmane.lisp.guile.user Subject: Re: getopt-long Date: Mon, 5 Dec 2011 20:00:01 +0000 Message-ID: References: <4ED767B8.9000107@gmail.com> <87wraa988g.fsf@ambire.localdomain> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable X-Trace: dough.gmane.org 1323115214 24703 80.91.229.12 (5 Dec 2011 20:00:14 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Mon, 5 Dec 2011 20:00:14 +0000 (UTC) Cc: guile-user@gnu.org To: Thien-Thi Nguyen Original-X-From: guile-user-bounces+guile-user=m.gmane.org@gnu.org Mon Dec 05 21:00:10 2011 Return-path: Envelope-to: guile-user@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 1RXeht-000244-QC for guile-user@m.gmane.org; Mon, 05 Dec 2011 21:00:09 +0100 Original-Received: from localhost ([::1]:35361 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RXeht-0001tT-4n for guile-user@m.gmane.org; Mon, 05 Dec 2011 15:00:09 -0500 Original-Received: from eggs.gnu.org ([140.186.70.92]:41461) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RXeho-0001sP-PO for guile-user@gnu.org; Mon, 05 Dec 2011 15:00:06 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RXehn-0005o2-Jn for guile-user@gnu.org; Mon, 05 Dec 2011 15:00:04 -0500 Original-Received: from mail-vx0-f169.google.com ([209.85.220.169]:52359) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RXehn-0005nm-HU for guile-user@gnu.org; Mon, 05 Dec 2011 15:00:03 -0500 Original-Received: by vcbfk26 with SMTP id fk26so4981165vcb.0 for ; Mon, 05 Dec 2011 12:00:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; bh=Q+loGqn0E0rp2SYLXdGIQXgIDQq2XNalIg+BCnKYn08=; b=IuV4XeaLHXPf6IwtO9c1FI1B8EBdjVuw8hQCRYdlhluc8Zi7t8dGfoLUQos18nQT2x JkoA6CX6h3osryeZnb2cDITd9eTshS+b6d5K3sB2yKkMaXZAM1r93BgnAGBU2vdRKviL jRiZJLG8IHrDF0bVejVK44D1mQWyKdJNDN0v0= Original-Received: by 10.220.147.130 with SMTP id l2mr1057361vcv.275.1323115201074; Mon, 05 Dec 2011 12:00:01 -0800 (PST) Original-Received: by 10.52.19.109 with HTTP; Mon, 5 Dec 2011 12:00:01 -0800 (PST) In-Reply-To: <87wraa988g.fsf@ambire.localdomain> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 209.85.220.169 X-BeenThere: guile-user@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: General Guile related discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guile-user-bounces+guile-user=m.gmane.org@gnu.org Original-Sender: guile-user-bounces+guile-user=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.user:9031 Archived-At: That would do the trick. I've also thought that a (help "...") for each option would also be useful, which could append the string for each arg to the "--help" option text automatically (somehow). On 5 December 2011 18:35, Thien-Thi Nguyen wrote: > () Andrew Horton > () Thu, 01 Dec 2011 11:40:40 +0000 > > =A0 recognize multiple use of an option when using getopt-long. > > Guile 1.4.x extended (ice-9 getopt-long) to handle multiple occurances. > Here is an excerpt from (info "(guile) getopt-long Reference"): > > =A0`(merge-multiple? BOOL)' > =A0 =A0 =A0 =A0If BOOL is `#t' and the `value' property is not `#f', all > =A0 =A0 =A0 =A0(one or multiple) occurrances are merged into a list with > =A0 =A0 =A0 =A0order retained. =A0If `#f', each instance of the option re= sults > =A0 =A0 =A0 =A0in a separate entry in the resulting alist. > > Subsequently, this rat jumped to the non-(not-yet?)-sinking ttn-do > as module =91(ttn-do zzz bamboozled)=92. =A0More info online: > > http://www.gnuvola.org/software/guile/doc/getopt_002dlong-Reference.html > http://www.gnuvola.org/software/ttn-do/ttn-do.html.gz#zzz-bamboozled > > I think it would be cool if this were to find berth in official Guile.