From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: =?UTF-8?Q?Linus_Bj=C3=B6rnstam?= Newsgroups: gmane.lisp.guile.user Subject: Re: SRFI-37 and short-name option with optional argument Date: Tue, 12 May 2020 22:28:50 +0200 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain;charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="63839"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Cyrus-JMAP/3.3.0-dev0-413-g750b809-fmstable-20200507v1 To: zimoun , "Guile User" Original-X-From: guile-user-bounces+guile-user=m.gmane-mx.org@gnu.org Tue May 12 22:29:52 2020 Return-path: Envelope-to: guile-user@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jYbXC-000GSx-8H for guile-user@m.gmane-mx.org; Tue, 12 May 2020 22:29:50 +0200 Original-Received: from localhost ([::1]:37126 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jYbXB-0003zc-9A for guile-user@m.gmane-mx.org; Tue, 12 May 2020 16:29:49 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:54562) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jYbWd-0003Y4-0n for guile-user@gnu.org; Tue, 12 May 2020 16:29:15 -0400 Original-Received: from out5-smtp.messagingengine.com ([66.111.4.29]:43499) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jYbWb-0007dk-Ow for guile-user@gnu.org; Tue, 12 May 2020 16:29:14 -0400 Original-Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.nyi.internal (Postfix) with ESMTP id A5A815C01E2; Tue, 12 May 2020 16:29:11 -0400 (EDT) Original-Received: from imap1 ([10.202.2.51]) by compute4.internal (MEProxy); Tue, 12 May 2020 16:29:11 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fastmail.se; h= mime-version:message-id:in-reply-to:references:date:from:to :subject:content-type:content-transfer-encoding; s=fm3; bh=orB+3 SgteF7X7mvjXxWew+HRceCM85WdwzQFvmy8+FE=; b=qXf/7J5l9FKuWTvaufdlS 3uN6aELASEudqo4g3kg4NAiT/dHpDGLRPXVY428lOWVxfT+Whr6ZZqO8Yjk0xLLV iXwH7JI+8QpQ9UPXh0ijfOLZh9zlYqB/5aRiT0SoMYRbnEl+DWtGswVLvY2CJqaz YZdrPq1fKAFyG6UvN/Nu/rB/0RLEmL6JqaoECyut10z58aX1aEAAgrY/VzOieYy3 KZrym263s9J4XG+eSlUB+DE5Q98nZIp/RB/YUxk6XIOELmyXyAsfzeIMRMzWjyyq tmJoATY/b9Dlg2oU9m/EE3SDVF5vBccWnxlV9oFu9LwRTqKj0GEXlnriRfQzDZcd w== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm2; bh=orB+3SgteF7X7mvjXxWew+HRceCM85WdwzQFvmy8+ FE=; b=4mJ+U5PCq+IEPpN/UE3TV3zXVESJ0nnN0LixHkYvES4DFu9B9l++8d/0E 9wK/RSJcn8MWvOC3/oosJRra181SKXqUwMNCnqdQnhzRKY8GaOdtzOwIHpACAZ+2 H8CA6FivOuHx5yFJEkTbIGAXSqlvOc/1lJKF/2NMbMnifocEsJt7F9ktDU5vLFoE HXTfzAmwTBWHyfCKSdL8dHX8HTnA86viVmyp+Sh5wxp5VUW5BSSYaXJgl87BlU9D ojR246gAt+OPZucic+J9GunlT+b0zLGrdbI/zTG2Q4b6yUNxowGqRzY0fkE2he8j EjX5ilJdlDqo6CBUcFQd33Vz2+CFw== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduhedrledvgddugeeiucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepofgfggfkjghffffhvffutgfgsehtqhertderreejnecuhfhrohhmpefnihhn uhhspgeujhpnrhhnshhtrghmuceolhhinhhushdrihhnthgvrhhnvghtsehfrghsthhmrg hilhdrshgvqeenucggtffrrghtthgvrhhnpedtfedvtdefvdefuedukeeluddtgfdtgeeh geeljeeuvedvteekgfehjefgvdeggeenucffohhmrghinhepghhnuhdrohhrghenucevlh hushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehlihhnuhhsrdhi nhhtvghrnhgvthesfhgrshhtmhgrihhlrdhsvg X-ME-Proxy: Original-Received: by mailuser.nyi.internal (Postfix, from userid 501) id 53074C200A4; Tue, 12 May 2020 16:29:11 -0400 (EDT) X-Mailer: MessagingEngine.com Webmail Interface In-Reply-To: Received-SPF: pass client-ip=66.111.4.29; envelope-from=linus.internet@fastmail.se; helo=out5-smtp.messagingengine.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/05/12 16:29:11 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-BeenThere: guile-user@gnu.org X-Mailman-Version: 2.1.23 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-mx.org@gnu.org Original-Sender: "guile-user" Xref: news.gmane.io gmane.lisp.guile.user:16447 Archived-At: I Sony have an answer to your question, but using (ice-9 getopt-long)is = usually the library guilers reach for unless they want to install third = party libraries: https://www.gnu.org/software/guile/manual/html_node/get= opt_002dlong.html#getopt_002dlong --=20 Linus Bj=C3=B6rnstam On Tue, 12 May 2020, at 22:14, zimoun wrote: > Dear, >=20 > The semantic of short-name option with optional argument is not clear > as the comment says: >=20 > http://git.savannah.gnu.org/cgit/guile.git/tree/module/srfi/srfi-37.sc= m#n58 >=20 > Let consider that the option '-a, --long-a' has an optional argument > and '-b, --long-b' another option. Currently, from my tests using > SRFI-37: >=20 > -a X -b # OK (1) > -aX -b # OK (2) > --long-a -b # OK >=20 > -a -b # KO (3) >=20 > The semantic of (3) is ambiguous, obviously. :-) >=20 > So, it seems that the argument is not optional for the short-name > case. One way to resolve such case is to remove the form (1) when the= > short-name '-a' accepts an optional argument. >=20 > Does it make sense? >=20 >=20 > Thank you in advance for your wise advice. >=20 > Best regards, > simon >=20 >