From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Dale Mellor Newsgroups: gmane.lisp.guile.devel Subject: Re: [PATCH] getopt-long permits numbers for short options. Date: Tue, 05 Sep 2023 12:08:46 +0100 Organization: DM Bespoke Computer Solutions Ltd Message-ID: <8d523c1b6f6e63f879eccfe1d43f745571317172.camel@rdmp.org> References: <20230905060454.16247-1-marius@gnu.org> <87fs3txhjn.fsf@gnu.org> Reply-To: mcron-lsfnyl@rdmp.org Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="18324"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Evolution 3.46.4 Cc: guile-devel@gnu.org To: Janneke Nieuwenhuizen , Marius Bakke Original-X-From: guile-devel-bounces+guile-devel=m.gmane-mx.org@gnu.org Tue Sep 05 14:54:44 2023 Return-path: Envelope-to: guile-devel@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 1qdVZs-0004Y5-Hw for guile-devel@m.gmane-mx.org; Tue, 05 Sep 2023 14:54:44 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qdVZQ-00013T-Kz; Tue, 05 Sep 2023 08:54:16 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qdUGH-0000Hc-Oc for guile-devel@gnu.org; Tue, 05 Sep 2023 07:30:28 -0400 Original-Received: from rdmp.org ([52.19.174.175]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qdUGF-0006pn-II; Tue, 05 Sep 2023 07:30:25 -0400 Original-Received: from [127.0.0.1] (helo=[IPv6:::1]) by rdmp.org with esmtp (Exim 4.94) (envelope-from ) id 1qdTvL-0000bF-A1; Tue, 05 Sep 2023 11:08:47 +0000 In-Reply-To: <87fs3txhjn.fsf@gnu.org> Received-SPF: pass client-ip=52.19.174.175; envelope-from=no-reply@rdmp.org; helo=rdmp.org X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Mailman-Approved-At: Tue, 05 Sep 2023 08:54:15 -0400 X-BeenThere: guile-devel@gnu.org X-Mailman-Version: 2.1.29 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-mx.org@gnu.org Original-Sender: guile-devel-bounces+guile-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.lisp.guile.devel:21943 Archived-At: On Tue, 2023-09-05 at 08:25 +0200, Janneke Nieuwenhuizen wrote: > Marius Bakke writes: >=20 > > * module/ice-9/getopt-long.scm (short-opt-rx): Add 0-9. >=20 > Hehe, reminds me of >=20 > =C2=A0=C2=A0=C2=A0 > https://lists.gnu.org/archive/html/bug-guile/2018-07/msg00009.html >=20 >=20 Also note https://debbugs.gnu.org/db/42/42669.html. You see, your solution fails if '-1' were supposed to be read literally as a positional parameter. The only solution is to make getopt-long more intelligent in how it applies the pattern specification. On the whole, both mine and Marius' patches are now years old and the outstanding bug list is massive; these things are not going to get done without a sea-change in the project administration. Dale