GNU bug report logs - #40549
[usability] revert last generation

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: guix; Reported by: Tom Zander <tomz@HIDDEN>; dated Sat, 11 Apr 2020 09:25:01 UTC; Maintainer for guix is bug-guix@HIDDEN.

Message received at 40549 <at> debbugs.gnu.org:


Received: (at 40549) by debbugs.gnu.org; 14 May 2020 08:15:57 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu May 14 04:15:57 2020
Received: from localhost ([127.0.0.1]:60131 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1jZ925-0003tS-F1
	for submit <at> debbugs.gnu.org; Thu, 14 May 2020 04:15:57 -0400
Received: from flashner.co.il ([178.62.234.194]:52806)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <efraim@HIDDEN>) id 1jZ924-0003t5-1g
 for 40549 <at> debbugs.gnu.org; Thu, 14 May 2020 04:15:56 -0400
Received: from localhost (unknown [188.120.128.132])
 by flashner.co.il (Postfix) with ESMTPSA id 65E5D4018D;
 Thu, 14 May 2020 08:15:49 +0000 (UTC)
Date: Thu, 14 May 2020 11:15:16 +0300
From: Efraim Flashner <efraim@HIDDEN>
To: zimoun <zimon.toutoune@HIDDEN>
Subject: Re: bug#40549: More usability issues:
Message-ID: <20200514081516.GN918@E5400>
References: <6171889.DvuYhMxLoT@cherry> <3827671.e9J7NaK4W3@peach>
 <CAJ3okZ1AH-yJC1t634YiNUR09LVdv_dfmjnM+W9mZmd_0hkYTg@HIDDEN>
MIME-Version: 1.0
Content-Type: multipart/signed; micalg=pgp-sha512;
 protocol="application/pgp-signature"; boundary="RtGa12sjXv8gVUZO"
Content-Disposition: inline
In-Reply-To: <CAJ3okZ1AH-yJC1t634YiNUR09LVdv_dfmjnM+W9mZmd_0hkYTg@HIDDEN>
X-PGP-Key-ID: 0x41AAE7DCCA3D8351
X-PGP-Key: https://flashner.co.il/~efraim/efraim_flashner.asc
X-PGP-Fingerprint: A28B F40C 3E55 1372 662D  14F7 41AA E7DC CA3D 8351
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: 40549
Cc: 40549 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)


--RtGa12sjXv8gVUZO
Content-Type: text/plain; charset=utf-8
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Fri, Apr 24, 2020 at 10:28:50AM +0200, zimoun wrote:
> On Thu, 23 Apr 2020 at 21:52, Tom via Bug reports for GNU Guix
> <bug-guix@HIDDEN> wrote:
> >
> > To add detail here:
> >
> > Doing `guix package -d 18 -S 17` actually works.
> >
> > This gives me the impression that the order of arguments is relevant to=
 the
> > processing of them.
>=20
> It is known and cumbersome: a feature? ;-)
>=20
> Other examples:
>=20
>   guix package -I -A # does nothing
>   guix package -A -I # list available
>=20
>=20
> > Another, similar, example is:
> >
> >    guix package -l --profile=3Da
> >
> > this doesn't work. But the most curious thing is that this does:
> >
> >    guix package --list-installed --profile=3Da
>=20
> It is worse than that.
>=20
> --8<---------------cut here---------------start------------->8---
> # OK
>  guix package --list-generations -p /path/to/profile
>  guix package --list-installed -p /path/to/profile
>=20
> # KO
>  guix package -l -p /path/to/profile
>  guix package -I -p /path/to/profile
>=20
> # OK
>  guix package -p /path/to/profile -l
>  guix package -p /path/to/profile -I
>=20
> # KO
>  guix package -l --profile=3D/path/to/profile
>=20
> # Do nothing
>  guix package -I --profile=3D/path/to/profile
>=20
> # OK
>  guix package -l --profile=3D/path/to/profile -l
>  guix package -I --profile=3D/path/to/profile -I
> --8<---------------cut here---------------end--------------->8---
>=20
>=20
> Well, it seems there is a bug. :-)
>=20
> Back to the first examples:
>=20
> --8<---------------cut here---------------start------------->8---
> # Do something
>  guix package --list-installed -A
>=20
> # Do nothing
>  guix package -I -A
> --8<---------------cut here---------------end--------------->8---
>=20
>=20
> Thanks for reporting.
>=20
> All the best,
> simon
>=20

To add to this:

$ guix package -p profile1 -p profile2 -I | wc -l
91
$ guix package -p profile2 -p profile1 -I | wc -l
12

--=20
Efraim Flashner   <efraim@HIDDEN>   =D7=90=D7=A4=D7=A8=D7=99=D7=9D =
=D7=A4=D7=9C=D7=A9=D7=A0=D7=A8
GPG key =3D A28B F40C 3E55 1372 662D  14F7 41AA E7DC CA3D 8351
Confidentiality cannot be guaranteed on emails sent or received unencrypted

--RtGa12sjXv8gVUZO
Content-Type: application/pgp-signature; name="signature.asc"

-----BEGIN PGP SIGNATURE-----

iQIzBAABCgAdFiEEoov0DD5VE3JmLRT3Qarn3Mo9g1EFAl68/hEACgkQQarn3Mo9
g1FqahAAsdDBydVuPAmxANzoODf6CZHuInLkevQ0JshaFEPlCZrZge66c3qZsnTp
+dpysXu3Sl3Rv70gYUwg9moHblp7b9qFoszc6KbSfncftKJG/ZW5o5benJs5FSSl
TXcZCvyyKzsQhzwecDcdi3+nr3ytlBfzeC4MA+u0xH50fLkH2Oo9s+rjfDzkRh90
U520lhV05kHxF6nivRpTr9VVFLhXI48eJIGD+pAoSSSmz3EiJ/yaS8cKaFYVL2JL
u4Brm3H0oq7+j05OV+wDauO6kZroUX9McoeAfJNwPZ9BNHUQ77nPzRu40JXW3xMi
j58d6hbIIc5M9YQjVWYK+Inh5kxNOB8OScbaH4mzIxT4UVJkhBxRWoIDmiPvtQ5R
uO4w0Z4/c8FgUKXCdJTK09M9i8sBIQ4T+NjmyW1msQgdwbIwC8U+oWOizvLWZwYn
jFXYM9Kh2+jPfDYcx/GTjtQo4IoWIYoUO+I7H9MrlBdGDXYuueG4mi8GGzILIcF/
QjaU/B5H9w6w9L/0ReMO1tXQQBMyGcRRPsH29WRkVEQgyMoXYslLW6fuXu7SX/S4
hTxmc4gKfYpM3eiNLHf5FeYA0PoHaKOVjK3mAvwoxCcyeQeqalT32Sg4vMaAyT6L
11lYnY9CF1z2Jc6rw58OvcAcehMHg3R+/+DEeopJGmj/c1rnVNk=
=I7So
-----END PGP SIGNATURE-----

--RtGa12sjXv8gVUZO--




Information forwarded to bug-guix@HIDDEN:
bug#40549; Package guix. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 13 May 2020 18:54:04 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed May 13 14:54:04 2020
Received: from localhost ([127.0.0.1]:59542 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1jYwW4-0004r5-JI
	for submit <at> debbugs.gnu.org; Wed, 13 May 2020 14:54:04 -0400
Received: from lists.gnu.org ([209.51.188.17]:33046)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <arne_bab@HIDDEN>) id 1jYwW3-0004qw-2R
 for submit <at> debbugs.gnu.org; Wed, 13 May 2020 14:54:03 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:41870)
 by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <arne_bab@HIDDEN>) id 1jYwW2-0000kr-RF
 for bug-guix@HIDDEN; Wed, 13 May 2020 14:54:02 -0400
Received: from mout.web.de ([212.227.17.11]:44779)
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)
 (Exim 4.90_1) (envelope-from <arne_bab@HIDDEN>) id 1jYwW1-0001IT-S4
 for bug-guix@HIDDEN; Wed, 13 May 2020 14:54:02 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=web.de;
 s=dbaedf251592; t=1589396031;
 bh=RwD2BgS0RkYgcgFBFm4HHED+BpQrJS8KKphYjjLfizE=;
 h=X-UI-Sender-Class:References:From:To:Cc:Subject:In-reply-to:Date;
 b=mIZpxP1zVWZz/g8uQ0jTpTupaG1/EVMrDDMmE25McrX/qrW0Sz/pzfL9exSrLskah
 hsyGHuxq9LJajd10862tadEYZrPUSVqn9PF26OrDKZB5bkxVnpPA7KNvRogP1vgFmm
 1zVOlXjSckT71xKwYe3FPUlfbQWyyTjB4k9bQT0o=
X-UI-Sender-Class: c548c8c5-30a9-4db5-a2e7-cb6cb037b8f9
Received: from fluss ([84.165.26.28]) by smtp.web.de (mrweb106
 [213.165.67.124]) with ESMTPSA (Nemesis) id 1Mmymz-1iqqW82Gtb-00jwA8; Wed, 13
 May 2020 20:53:51 +0200
References: <6171889.DvuYhMxLoT@cherry> <1804825.CQOukoFCf9@cherry>
 <CAJ3okZ16sBU0Pj+8Xeg_icNCGuonBxii9=pHZ6HZEnngk2=YQA@HIDDEN>
 <5565734.MhkbZ0Pkbq@cherry> <87zhabx0br.fsf@HIDDEN>
 <CAJ3okZ0406hPp5437nYePZ1cZW7aw_6+oqdnca2Jq8SqgyT38w@HIDDEN>
User-agent: mu4e 1.4.4; emacs 26.3
From: Arne Babenhauserheide <arne_bab@HIDDEN>
To: zimoun <zimon.toutoune@HIDDEN>
Subject: Re: bug#40549: More usability issues:
In-reply-to: <CAJ3okZ0406hPp5437nYePZ1cZW7aw_6+oqdnca2Jq8SqgyT38w@HIDDEN>
Date: Wed, 13 May 2020 20:53:50 +0200
Message-ID: <87o8qrwts1.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Provags-ID: V03:K1:KBfDMFHHJCGLtwBbecf6ZME+8qBnXiszeco0RlRZyxgA3wurZEx
 9JHrb4mLoyNKq86mUdjBH1+QJhGdwXoYw+Xuual6rLwQQfNKlTxWNDEHRpVW8C4I+xcvfai
 CJ6VhvGGgnUDrW4o0eT2RzBNAR9NIrvyxUpYEoqaQz16seGKRsj0d7j8SN9VcVILujF1YpE
 ReH9PgxJ9JBLkj0QDjYbQ==
X-Spam-Flag: NO
X-UI-Out-Filterresults: notjunk:1;V03:K0:4c2TI15ZC8g=:UwL3scTSetW6npCyPX8Pe7
 HcLxFPVYkhGRMHe02k6lLBM2gO7/pZsYkAdfdxqsqrFIT9x/nBVEgyk9ddwq/GYhORPbYsaiO
 VIBWN2OdKHpL75N1szIsy9mcsn2krkkG0Jc/mX226oYBHvT7oTKe/rZEtAMdh5fuPLB8eiQ4B
 bwYCuiVX5bfJhhMvAjup6hzbMGnJeV8nflrg1OgvWQOPKfkozE3T0Heuyr8ihnl30iX9/ZnRQ
 6hDzKYRRhFJog5eUSS9RSByZcDUlZn3cCqDVfECQzXeg5HRTAS4zN2/I1vM1DHX+Bj3rRWkCR
 V1Xl3ObJZCsqqmhH5swADwjfPYrwEH8UmgVI38N+lMEeNH59172GuyZtQXP9mV3rA+26hzfpb
 YyHKgQ531eIGx4Xw6thvqC8b457RYUGqEnQhuWxeu7ZkXMe7YDgn6Ma3KY6ehIsqSR4VHRt0Q
 4LytwKwqZhO8Ot1vyFLSZZpXY6neW2ctLAY0yVHk300aBaC40gvGQjwddIC7v9CTuvMBdF4Uk
 4taPmsjzQU7EjkF6RUQj12B3rRLM1a2ye37+PGvy9ELW35CHudfsUdTIbGCG57qypm1YrLRS0
 mZfI04pd11PUpYaakfmdmNNR8X+RMsAT5iDDEJhRlPr0NePkm/PNdDwphL6mV3L2/HRUjliUu
 bB39AD1cU5xpRz56ZorV5/n+9gMxcnxqnepLffYa9AtE2ZvBU930MBtvaYgLjCYyAsf3RvuS8
 ML7p2qb/xxAMrOtWJTcqO1UajV4aX9YbO8RIQe/YBWkpFiK8GZeAjG4pQoO5Rk6bX0jRm0VNn
 Z1dqsGdLWo+7iNmin1yXfIvSfxG0PPgFvB+3Ql13rm3r9OtXwnmG+jboV7kjKkUs24FBzzjpA
 0cwxspBFx1JUIkYm9YTaRFgPOIAqdMKQy2kPkGrS0k8LrTyahQeVZaVKiu9oGsbyo+gSdeOmf
 LCgOiOWfVA5Hg0Y9sApD4AG/O7KgGTgNBI1zDpYfSU4NJ5wldvEliKmtDXG0YhYTXUeXQfoYF
 spzO//Y8L7v0QMqqV1B6RAy3Rfls82wCA8NV3t3Oaxp3/KPzZxqNBUoEqb4zLrvfZKrmdaOCt
 Uw9gcsbRBGq5gr32SWdiuXCexawSQ6WJkjAlJHT4Wl2mmLoi1CvWujxXPvLfGPN1E356pSZYT
 okGek0b7A7/nK4oxHll9RIbH85ejnGmvzZQ+uEVUNQlZf7KR3k9+clM6mkQbRYYShjwQd4rgB
 /Vhhwvh/H3kfCAmFq
Received-SPF: pass client-ip=212.227.17.11; envelope-from=arne_bab@HIDDEN;
 helo=mout.web.de
X-detected-operating-system: by eggs.gnu.org: First seen = 2020/05/13 12:32:34
X-ACL-Warn: Detected OS   = Linux 2.2.x-3.x [generic]
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_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN
X-Spam_action: no action
X-Spam-Score: -1.4 (-)
X-Debbugs-Envelope-To: submit
Cc: 40549 <at> debbugs.gnu.org, Tom Zander <tomz@HIDDEN>, bug-guix@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -2.4 (--)

Dear zimoun,

zimoun <zimon.toutoune@HIDDEN> writes:
> It would like it works.  And to do so, I accept that "guix package -I
> regexp -p /tmp/profile" does not anymore and would be replaced by
> "guix package -Iregexp -p /tmp/profile" which already works (as
> specified by SRFI-37).

Wow, this surprised me. I expected

   guix package -Iregexp

to be equivalent to

   guix package -I -r -e -g -e -x -p

which is how getopt long works in the shell.

> Today, the Guix manual is lying because the optional argument for
> short-name is *not* optional depending on its position.  And that
> leads to surprise:
>
>    guix package -I -p /tmp/profile # fails
>    guix package -p /tmp/profile -I # works
>
> And this is really really annoying!  It is hard to understand why such
> different behaviour.

Yes, this seems annoying.

> Instead of what I am proposing, what do you suggest?

What I would suggets would break -Iregexp and as such deviate from
SRFI-37, so it wouldn=E2=80=99t be optimal.

It would first need another SRFI so it=E2=80=99s no shortterm fix :-)

The commandline handling I want is this:
https://www.draketo.de/english/free-software/shell-argument-parsing

But I don=E2=80=99t yet have a good way to do it in Guile.

Best wishes,
Arne
--=20
Unpolitisch sein
hei=C3=9Ft politisch sein
ohne es zu merken




Information forwarded to bug-guix@HIDDEN:
bug#40549; Package guix. Full text available.

Message received at 40549 <at> debbugs.gnu.org:


Received: (at 40549) by debbugs.gnu.org; 13 May 2020 18:54:01 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed May 13 14:54:01 2020
Received: from localhost ([127.0.0.1]:59538 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1jYwW1-0004qQ-CL
	for submit <at> debbugs.gnu.org; Wed, 13 May 2020 14:54:01 -0400
Received: from mout.web.de ([212.227.17.11]:36851)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <arne_bab@HIDDEN>) id 1jYwVz-0004qC-EE
 for 40549 <at> debbugs.gnu.org; Wed, 13 May 2020 14:54:00 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=web.de;
 s=dbaedf251592; t=1589396031;
 bh=RwD2BgS0RkYgcgFBFm4HHED+BpQrJS8KKphYjjLfizE=;
 h=X-UI-Sender-Class:References:From:To:Cc:Subject:In-reply-to:Date;
 b=mIZpxP1zVWZz/g8uQ0jTpTupaG1/EVMrDDMmE25McrX/qrW0Sz/pzfL9exSrLskah
 hsyGHuxq9LJajd10862tadEYZrPUSVqn9PF26OrDKZB5bkxVnpPA7KNvRogP1vgFmm
 1zVOlXjSckT71xKwYe3FPUlfbQWyyTjB4k9bQT0o=
X-UI-Sender-Class: c548c8c5-30a9-4db5-a2e7-cb6cb037b8f9
Received: from fluss ([84.165.26.28]) by smtp.web.de (mrweb106
 [213.165.67.124]) with ESMTPSA (Nemesis) id 1Mmymz-1iqqW82Gtb-00jwA8; Wed, 13
 May 2020 20:53:51 +0200
References: <6171889.DvuYhMxLoT@cherry> <1804825.CQOukoFCf9@cherry>
 <CAJ3okZ16sBU0Pj+8Xeg_icNCGuonBxii9=pHZ6HZEnngk2=YQA@HIDDEN>
 <5565734.MhkbZ0Pkbq@cherry> <87zhabx0br.fsf@HIDDEN>
 <CAJ3okZ0406hPp5437nYePZ1cZW7aw_6+oqdnca2Jq8SqgyT38w@HIDDEN>
User-agent: mu4e 1.4.4; emacs 26.3
From: Arne Babenhauserheide <arne_bab@HIDDEN>
To: zimoun <zimon.toutoune@HIDDEN>
Subject: Re: bug#40549: More usability issues:
In-reply-to: <CAJ3okZ0406hPp5437nYePZ1cZW7aw_6+oqdnca2Jq8SqgyT38w@HIDDEN>
Date: Wed, 13 May 2020 20:53:50 +0200
Message-ID: <87o8qrwts1.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Provags-ID: V03:K1:KBfDMFHHJCGLtwBbecf6ZME+8qBnXiszeco0RlRZyxgA3wurZEx
 9JHrb4mLoyNKq86mUdjBH1+QJhGdwXoYw+Xuual6rLwQQfNKlTxWNDEHRpVW8C4I+xcvfai
 CJ6VhvGGgnUDrW4o0eT2RzBNAR9NIrvyxUpYEoqaQz16seGKRsj0d7j8SN9VcVILujF1YpE
 ReH9PgxJ9JBLkj0QDjYbQ==
X-Spam-Flag: NO
X-UI-Out-Filterresults: notjunk:1;V03:K0:4c2TI15ZC8g=:UwL3scTSetW6npCyPX8Pe7
 HcLxFPVYkhGRMHe02k6lLBM2gO7/pZsYkAdfdxqsqrFIT9x/nBVEgyk9ddwq/GYhORPbYsaiO
 VIBWN2OdKHpL75N1szIsy9mcsn2krkkG0Jc/mX226oYBHvT7oTKe/rZEtAMdh5fuPLB8eiQ4B
 bwYCuiVX5bfJhhMvAjup6hzbMGnJeV8nflrg1OgvWQOPKfkozE3T0Heuyr8ihnl30iX9/ZnRQ
 6hDzKYRRhFJog5eUSS9RSByZcDUlZn3cCqDVfECQzXeg5HRTAS4zN2/I1vM1DHX+Bj3rRWkCR
 V1Xl3ObJZCsqqmhH5swADwjfPYrwEH8UmgVI38N+lMEeNH59172GuyZtQXP9mV3rA+26hzfpb
 YyHKgQ531eIGx4Xw6thvqC8b457RYUGqEnQhuWxeu7ZkXMe7YDgn6Ma3KY6ehIsqSR4VHRt0Q
 4LytwKwqZhO8Ot1vyFLSZZpXY6neW2ctLAY0yVHk300aBaC40gvGQjwddIC7v9CTuvMBdF4Uk
 4taPmsjzQU7EjkF6RUQj12B3rRLM1a2ye37+PGvy9ELW35CHudfsUdTIbGCG57qypm1YrLRS0
 mZfI04pd11PUpYaakfmdmNNR8X+RMsAT5iDDEJhRlPr0NePkm/PNdDwphL6mV3L2/HRUjliUu
 bB39AD1cU5xpRz56ZorV5/n+9gMxcnxqnepLffYa9AtE2ZvBU930MBtvaYgLjCYyAsf3RvuS8
 ML7p2qb/xxAMrOtWJTcqO1UajV4aX9YbO8RIQe/YBWkpFiK8GZeAjG4pQoO5Rk6bX0jRm0VNn
 Z1dqsGdLWo+7iNmin1yXfIvSfxG0PPgFvB+3Ql13rm3r9OtXwnmG+jboV7kjKkUs24FBzzjpA
 0cwxspBFx1JUIkYm9YTaRFgPOIAqdMKQy2kPkGrS0k8LrTyahQeVZaVKiu9oGsbyo+gSdeOmf
 LCgOiOWfVA5Hg0Y9sApD4AG/O7KgGTgNBI1zDpYfSU4NJ5wldvEliKmtDXG0YhYTXUeXQfoYF
 spzO//Y8L7v0QMqqV1B6RAy3Rfls82wCA8NV3t3Oaxp3/KPzZxqNBUoEqb4zLrvfZKrmdaOCt
 Uw9gcsbRBGq5gr32SWdiuXCexawSQ6WJkjAlJHT4Wl2mmLoi1CvWujxXPvLfGPN1E356pSZYT
 okGek0b7A7/nK4oxHll9RIbH85ejnGmvzZQ+uEVUNQlZf7KR3k9+clM6mkQbRYYShjwQd4rgB
 /Vhhwvh/H3kfCAmFq
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 40549
Cc: 40549 <at> debbugs.gnu.org, Tom Zander <tomz@HIDDEN>, bug-guix@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

Dear zimoun,

zimoun <zimon.toutoune@HIDDEN> writes:
> It would like it works.  And to do so, I accept that "guix package -I
> regexp -p /tmp/profile" does not anymore and would be replaced by
> "guix package -Iregexp -p /tmp/profile" which already works (as
> specified by SRFI-37).

Wow, this surprised me. I expected

   guix package -Iregexp

to be equivalent to

   guix package -I -r -e -g -e -x -p

which is how getopt long works in the shell.

> Today, the Guix manual is lying because the optional argument for
> short-name is *not* optional depending on its position.  And that
> leads to surprise:
>
>    guix package -I -p /tmp/profile # fails
>    guix package -p /tmp/profile -I # works
>
> And this is really really annoying!  It is hard to understand why such
> different behaviour.

Yes, this seems annoying.

> Instead of what I am proposing, what do you suggest?

What I would suggets would break -Iregexp and as such deviate from
SRFI-37, so it wouldn=E2=80=99t be optimal.

It would first need another SRFI so it=E2=80=99s no shortterm fix :-)

The commandline handling I want is this:
https://www.draketo.de/english/free-software/shell-argument-parsing

But I don=E2=80=99t yet have a good way to do it in Guile.

Best wishes,
Arne
--=20
Unpolitisch sein
hei=C3=9Ft politisch sein
ohne es zu merken




Information forwarded to bug-guix@HIDDEN:
bug#40549; Package guix. Full text available.

Message received at 40549 <at> debbugs.gnu.org:


Received: (at 40549) by debbugs.gnu.org; 13 May 2020 18:02:23 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed May 13 14:02:23 2020
Received: from localhost ([127.0.0.1]:59464 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1jYvi3-0003Ox-1P
	for submit <at> debbugs.gnu.org; Wed, 13 May 2020 14:02:23 -0400
Received: from mail-qt1-f182.google.com ([209.85.160.182]:38933)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <zimon.toutoune@HIDDEN>) id 1jYvi0-0003IW-DC
 for 40549 <at> debbugs.gnu.org; Wed, 13 May 2020 14:02:20 -0400
Received: by mail-qt1-f182.google.com with SMTP id l1so574601qtp.6
 for <40549 <at> debbugs.gnu.org>; Wed, 13 May 2020 11:02:20 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
 h=mime-version:references:in-reply-to:from:date:message-id:subject:to
 :cc:content-transfer-encoding;
 bh=PanJAsMsg1Bzc8/9CrMtESnLTe2HiRJQuudpVdVkbXc=;
 b=KgkUG4trllimdcHe7jIVoe4LzP7RTvEwjM977tikxOalv46JKNpb4HSRMs/dcV7c41
 cTLpYtNJSLBkSG/O6vYaKevJ9yWyjZ3WnMkoy2DlDKwfjSHLIyo5OOiF1tQwdptoJI7G
 9zrlRoVLo8w/7JcQcYifZyt3dLOwzVMiOVWtzoS6WU70z+uRT9HyYLEvKOnCNphFrP5d
 Sb9ObaQeN5ffvewflygkvli5YWnsq+es29/Uttc5oagPDpHIcW8isOWnPL6rnklqQkPf
 KHQAP6WZGxZbugXxzADT9Kqz/02hnK8nmy4zSHTM0HW7yNvLd0u44sjywCAaiJELruMk
 KJHQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:mime-version:references:in-reply-to:from:date
 :message-id:subject:to:cc:content-transfer-encoding;
 bh=PanJAsMsg1Bzc8/9CrMtESnLTe2HiRJQuudpVdVkbXc=;
 b=t/txMWroJqFRmTUWLbVPw9TG8IMRTsWgALyQKtfRtrF1KQAtrnTCVy/2ao1XavaUmy
 i92WR56sOTHH6bdE0UxEBqLXNnbWZY3B2os18wajr02Da1g1tyhn8oQzK0K4kww5DocK
 OofIbDc5t9RZ64zduSDCdVFyFXz/KvxgNYUaY8nKIulXQBkLBtExG1KnNACFUNUVWpSN
 2aMNJrA7KMLM3AxU0rfEbxOiBg3jKlQ9bt0N9q40deAPtUbtsp8g2ltk103Bj6xA8ztc
 tsIZm321eAy0Xqr8CLpWazz93/MQPB+OxOzk+vK9egeqckVwlJwoZJy+ntdMXG1r1tpl
 Vokg==
X-Gm-Message-State: AOAM531H0gzg8Nfv8/hrrrw4NHOj8LjIMA2w3pMeHzCe0D6aWpF/+4aO
 PrtPHomEH2KQYIVXe02f2oc7FTrRoFkFLTfmbAA=
X-Google-Smtp-Source: ABdhPJyPEVtUWw4uPWihRtNjgE0CjW7V5z9HbuDonAWAAJulP/idSF/H9MDZrcf/U7Wh0rK/Ur2DZWHpotYBdCqBB/Y=
X-Received: by 2002:aed:2d44:: with SMTP id h62mr309688qtd.217.1589392934588; 
 Wed, 13 May 2020 11:02:14 -0700 (PDT)
MIME-Version: 1.0
References: <6171889.DvuYhMxLoT@cherry> <1804825.CQOukoFCf9@cherry>
 <CAJ3okZ16sBU0Pj+8Xeg_icNCGuonBxii9=pHZ6HZEnngk2=YQA@HIDDEN>
 <5565734.MhkbZ0Pkbq@cherry> <87zhabx0br.fsf@HIDDEN>
In-Reply-To: <87zhabx0br.fsf@HIDDEN>
From: zimoun <zimon.toutoune@HIDDEN>
Date: Wed, 13 May 2020 20:02:03 +0200
Message-ID: <CAJ3okZ0406hPp5437nYePZ1cZW7aw_6+oqdnca2Jq8SqgyT38w@HIDDEN>
Subject: Re: bug#40549: More usability issues:
To: Arne Babenhauserheide <arne_bab@HIDDEN>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 40549
Cc: 40549 <at> debbugs.gnu.org, Tom Zander <tomz@HIDDEN>, bug-guix@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

Dear Arne,

On Wed, 13 May 2020 at 18:32, Arne Babenhauserheide <arne_bab@HIDDEN> wrote=
:

> And please don=E2=80=99t do radical changes on guix package. That would b=
reak
> the workflow of every slightly longer term guix user.

I do not want to do radical changes.  The parser of the command-line
is SRFI-37.  So it is documented and the command-line follows guide
lines that will not change.

The change I am asking for is only the short-name option with optional
argument.  In such case the optional argument is not optional.  Other
said, the issue is rooted in a bad practise and, AFAIK, Guix does not
follow what other GNU tools follow: no short-name with optional
argument.  And the Guile implementation of SRFI-37 says that the
semantic of short-name with optional argument leads to an issue.  But
now, it is here so what do we do?

In the end, there is annoyance.  And the goal is to discuss what could
be changed to reduce the annoyance, on all sides.

For example, I am always annoyed by:

   guix package -I -p /tmp/profile

It would like it works.  And to do so, I accept that "guix package -I
regexp -p /tmp/profile" does not anymore and would be replaced by
"guix package -Iregexp -p /tmp/profile" which already works (as
specified by SRFI-37).


Today, the Guix manual is lying because the optional argument for
short-name is *not* optional depending on its position.  And that
leads to surprise:

   guix package -I -p /tmp/profile # fails
   guix package -p /tmp/profile -I # works

And this is really really annoying!  It is hard to understand why such
different behaviour.


Instead of what I am proposing, what do you suggest?


Best regards,
simon




Information forwarded to bug-guix@HIDDEN:
bug#40549; Package guix. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 13 May 2020 18:02:22 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed May 13 14:02:22 2020
Received: from localhost ([127.0.0.1]:59462 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1jYvi1-0003Nr-KR
	for submit <at> debbugs.gnu.org; Wed, 13 May 2020 14:02:22 -0400
Received: from lists.gnu.org ([209.51.188.17]:46974)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <zimon.toutoune@HIDDEN>) id 1jYvhz-0003LV-3l
 for submit <at> debbugs.gnu.org; Wed, 13 May 2020 14:02:19 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:35046)
 by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <zimon.toutoune@HIDDEN>)
 id 1jYvhy-0007MM-RS
 for bug-guix@HIDDEN; Wed, 13 May 2020 14:02:18 -0400
Received: from mail-qt1-x82c.google.com ([2607:f8b0:4864:20::82c]:45275)
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)
 (Exim 4.90_1) (envelope-from <zimon.toutoune@HIDDEN>)
 id 1jYvhv-0007P9-M7
 for bug-guix@HIDDEN; Wed, 13 May 2020 14:02:18 -0400
Received: by mail-qt1-x82c.google.com with SMTP id j2so536472qtr.12
 for <bug-guix@HIDDEN>; Wed, 13 May 2020 11:02:15 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
 h=mime-version:references:in-reply-to:from:date:message-id:subject:to
 :cc:content-transfer-encoding;
 bh=PanJAsMsg1Bzc8/9CrMtESnLTe2HiRJQuudpVdVkbXc=;
 b=KgkUG4trllimdcHe7jIVoe4LzP7RTvEwjM977tikxOalv46JKNpb4HSRMs/dcV7c41
 cTLpYtNJSLBkSG/O6vYaKevJ9yWyjZ3WnMkoy2DlDKwfjSHLIyo5OOiF1tQwdptoJI7G
 9zrlRoVLo8w/7JcQcYifZyt3dLOwzVMiOVWtzoS6WU70z+uRT9HyYLEvKOnCNphFrP5d
 Sb9ObaQeN5ffvewflygkvli5YWnsq+es29/Uttc5oagPDpHIcW8isOWnPL6rnklqQkPf
 KHQAP6WZGxZbugXxzADT9Kqz/02hnK8nmy4zSHTM0HW7yNvLd0u44sjywCAaiJELruMk
 KJHQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:mime-version:references:in-reply-to:from:date
 :message-id:subject:to:cc:content-transfer-encoding;
 bh=PanJAsMsg1Bzc8/9CrMtESnLTe2HiRJQuudpVdVkbXc=;
 b=lXYgMVJuo9kNNCEdWx25TMtAzDAsUzJ5v1Z0zfp2wukh6kmOtvxRoB5LAQFnHlJloH
 j6lLyq8GBmRTzc4Mj3sVNNPKFeRDwRtR7UdlThdT6FGWtc5XkBvUAKsQ1xzSwphEyK1H
 M3Kacb1muxImsmvt4k6XVKWUA2la8MXlyUSTDeS/V2zJGlqFz5l1zObOwheclqSjEQOf
 +hAm8DWYiiMUmWRdpE5OTvySMGjUvPaSnQdJJ6Zb2O/K4EbBV8gnmfJxDlRZPbn5+Kiy
 h8D9JEpTKJjTrH9vRfSzn8OrAymniYCOHEajQks5FpE069RBIRMSOzqZpo3hgv51OCMI
 htFA==
X-Gm-Message-State: AOAM532loasNHJDJ1UpPg/JB+8ovDpbLCx2wdkZryjwVneJZptCNrlfn
 I5rw1QwsmVCqxBsJ1gH5LTm843VT80fIFEsF5TmzFg==
X-Google-Smtp-Source: ABdhPJyPEVtUWw4uPWihRtNjgE0CjW7V5z9HbuDonAWAAJulP/idSF/H9MDZrcf/U7Wh0rK/Ur2DZWHpotYBdCqBB/Y=
X-Received: by 2002:aed:2d44:: with SMTP id h62mr309688qtd.217.1589392934588; 
 Wed, 13 May 2020 11:02:14 -0700 (PDT)
MIME-Version: 1.0
References: <6171889.DvuYhMxLoT@cherry> <1804825.CQOukoFCf9@cherry>
 <CAJ3okZ16sBU0Pj+8Xeg_icNCGuonBxii9=pHZ6HZEnngk2=YQA@HIDDEN>
 <5565734.MhkbZ0Pkbq@cherry> <87zhabx0br.fsf@HIDDEN>
In-Reply-To: <87zhabx0br.fsf@HIDDEN>
From: zimoun <zimon.toutoune@HIDDEN>
Date: Wed, 13 May 2020 20:02:03 +0200
Message-ID: <CAJ3okZ0406hPp5437nYePZ1cZW7aw_6+oqdnca2Jq8SqgyT38w@HIDDEN>
Subject: Re: bug#40549: More usability issues:
To: Arne Babenhauserheide <arne_bab@HIDDEN>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
Received-SPF: pass client-ip=2607:f8b0:4864:20::82c;
 envelope-from=zimon.toutoune@HIDDEN; helo=mail-qt1-x82c.google.com
X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache.
 That's all we know.
X-Spam_score_int: -20
X-Spam_score: -2.1
X-Spam_bar: --
X-Spam_report: (-2.1 / 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_NONE=-0.0001, SPF_PASS=-0.001 autolearn=_AUTOLEARN
X-Spam_action: no action
X-Spam-Score: -1.3 (-)
X-Debbugs-Envelope-To: submit
Cc: 40549 <at> debbugs.gnu.org, Tom Zander <tomz@HIDDEN>, bug-guix@HIDDEN
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -2.3 (--)

Dear Arne,

On Wed, 13 May 2020 at 18:32, Arne Babenhauserheide <arne_bab@HIDDEN> wrote=
:

> And please don=E2=80=99t do radical changes on guix package. That would b=
reak
> the workflow of every slightly longer term guix user.

I do not want to do radical changes.  The parser of the command-line
is SRFI-37.  So it is documented and the command-line follows guide
lines that will not change.

The change I am asking for is only the short-name option with optional
argument.  In such case the optional argument is not optional.  Other
said, the issue is rooted in a bad practise and, AFAIK, Guix does not
follow what other GNU tools follow: no short-name with optional
argument.  And the Guile implementation of SRFI-37 says that the
semantic of short-name with optional argument leads to an issue.  But
now, it is here so what do we do?

In the end, there is annoyance.  And the goal is to discuss what could
be changed to reduce the annoyance, on all sides.

For example, I am always annoyed by:

   guix package -I -p /tmp/profile

It would like it works.  And to do so, I accept that "guix package -I
regexp -p /tmp/profile" does not anymore and would be replaced by
"guix package -Iregexp -p /tmp/profile" which already works (as
specified by SRFI-37).


Today, the Guix manual is lying because the optional argument for
short-name is *not* optional depending on its position.  And that
leads to surprise:

   guix package -I -p /tmp/profile # fails
   guix package -p /tmp/profile -I # works

And this is really really annoying!  It is hard to understand why such
different behaviour.


Instead of what I am proposing, what do you suggest?


Best regards,
simon




Information forwarded to bug-guix@HIDDEN:
bug#40549; Package guix. Full text available.

Message received at 40549 <at> debbugs.gnu.org:


Received: (at 40549) by debbugs.gnu.org; 13 May 2020 16:32:35 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed May 13 12:32:35 2020
Received: from localhost ([127.0.0.1]:59202 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1jYuJ8-0007XY-T4
	for submit <at> debbugs.gnu.org; Wed, 13 May 2020 12:32:35 -0400
Received: from mout.web.de ([212.227.17.11]:56631)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <arne_bab@HIDDEN>) id 1jYuJ7-0007XI-8N
 for 40549 <at> debbugs.gnu.org; Wed, 13 May 2020 12:32:33 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=web.de;
 s=dbaedf251592; t=1589387545;
 bh=NGQdy241E+WbTB9hE4YWdEop8ltYByQW69ImUQF1u74=;
 h=X-UI-Sender-Class:References:From:To:Cc:Subject:In-reply-to:Date;
 b=Ry7Gqg3/QOcFEFiYN4X69n79be09Lfdl4o3TE+yvTWDYgvU0ci1AVKIuFDUWZ9IhP
 PLZmMYDgKUH17siIUJmkNAJONQHd/MfA4tQxqrwzeIQfo+CHk3tbrtEImPOh/hYEnI
 qwRZ2pdHZpw5ZjRL5sKek4xHmTngRc4CZtJbx/oc=
X-UI-Sender-Class: c548c8c5-30a9-4db5-a2e7-cb6cb037b8f9
Received: from fluss ([84.165.26.28]) by smtp.web.de (mrweb105
 [213.165.67.124]) with ESMTPSA (Nemesis) id 1MvKbj-1jHmzg2Xsv-00rGCw; Wed, 13
 May 2020 18:32:25 +0200
References: <6171889.DvuYhMxLoT@cherry> <1804825.CQOukoFCf9@cherry>
 <CAJ3okZ16sBU0Pj+8Xeg_icNCGuonBxii9=pHZ6HZEnngk2=YQA@HIDDEN>
 <5565734.MhkbZ0Pkbq@cherry>
User-agent: mu4e 1.4.4; emacs 26.3
From: Arne Babenhauserheide <arne_bab@HIDDEN>
To: Tom Zander <tomz@HIDDEN>
Subject: Re: bug#40549: More usability issues:
In-reply-to: <5565734.MhkbZ0Pkbq@cherry>
Date: Wed, 13 May 2020 18:32:24 +0200
Message-ID: <87zhabx0br.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Provags-ID: V03:K1:EJYpS4NETSpwQik03hBtXIr0rLUDbIME33PNgE/uKW0MwFiVU3E
 ntISJOKTneYvbrnrzSK3Bxvx52w7/iHbYVXDOUiq7FL5CtYOFGm8AuZZR1i3LXkooMDc+p/
 j3ROCMuQXlMKuyhWZgBQkNcqc6nkkQtwSU11Q8UuS5tvQ3S8tGPXraZmy98p5jk2TVEY6bu
 WcVF7tCZgAODOedeNcs2w==
X-Spam-Flag: NO
X-UI-Out-Filterresults: notjunk:1;V03:K0:pH4y4pzaEDI=:luKev7ru86wU7xuuoTml8h
 ms+tvglhLx5JKwxGbfdspZMM6k2U1Sb9LnHWg8zjNm6SGTd+FJoESOmNJvby1It9RN5SGxvfO
 YMZ8aW0KMLiVk6vespjpUmMPW5cIcTsBrHxACkMGPiMxmRHvNZWL1Co8Do0EQNbqzUihm+cXi
 8lrq8lmgONxqZge/+bZZbSj2VhGcL22EphHwyM4fOsMhQAd6kCT/rrGmTGrazIsAarRZ84AbG
 QW40OYd1Vxw7uC4fjENb8kouXfcHkS4C+7dDoMgBnYJqLQ6siEPv+1d35Kvb7mbWfq45csAiM
 thTsZIVftrqftIUEihD5+Qmqba6sNddJLqN4dff/DGYpnHHWmbqRGNKMbLrHyd5wIpKTnAzHV
 MdlffvdyVa359+tFZWxPyec1loj6HirH1wKKognQdKNXLgSTqiNKktTvbC+N3u/yG6zM3MsVF
 FwY+lBq6avRNpvFVSkmB7i5YRGZKwaHvmK/juAfeaBCVSSCVymYQnqWRiRt4fZs2YwAxURUz/
 dzXgJU1aQnVV+SiLr4va9bkng2z55I7XjMeWgpYBqagJJS0cWhfa/QLiQkfaf4i5RgXrc+8xa
 7Y5et+KjjISoCtXnSj1ox55FsTAoH26RhdIls3dHpmVPWVpZztrgWxcVDieQoGny271E/UBFP
 JI2M0t5gk7xEoTnOi2O4H2gJ1D1eLSg45JKOUs8binvT0hJS+NGIcKQysVnlT0n3cSU4axMND
 m6VkaI1wHI/U+pBbyeUAjQ9Kz2A0ttTIF+mFmEHUB/MgfDhsefIHHXGGmhBZWQd8wdIRJjHTD
 U78yqnOp7HivevMnwt6ffLfLez5omcb0Z4KZFBucmcKa3C3CRQFeNXN/6w6YCHPnoCYuZwiE6
 Bzj2gqWXhMV4M7jBD9AGsQeI0gWFxfNLcDGDI/zrKehuyx+VRsWCPIJKD5gg7KA7daXjFO2Ab
 j/G/kZIPz/wStcjJfEIPxW76iNCzdCNpXg0W09XYcA3aCKANlqYoNVAsOFG0VFMNEbhKF9kZn
 cvZTH/XRMu4jZN+aLMpUKv5ujsn6/hEKiNnjoAh/H+m2fxIfozEMoZnpB8Yn4UgnBQO1BqJqe
 K8p85XThnp/J9pV7HDo2pcUcltwV5MtLQqbWP2aHhsUMt4YKWX3+NIp22txXeo02kC92ugQBn
 pVOU07OCGtHipMQXdlIvkYR8W40f58ceEOYvLnm7ynHfR9VuT8ULOLiBqBVehfsNxJrfnh/N7
 AmSdsdmkHrXV1lIkO
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 40549
Cc: 40549 <at> debbugs.gnu.org, bug-guix@HIDDEN, zimoun <zimon.toutoune@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)


Tom Zander via Bug reports for GNU Guix <bug-guix@HIDDEN> writes:
>> > You asked for an example;  see `git commit -S`. From the manpage:
>> >    -S[<keyid>], --gpg-sign[=3D<keyid>]
>>=20
>> Thank you for the example.   Let me show you that it raises an issue
>> too because it is not so "simple". :-)
>
> Easier example then: from the 'ls(1)' manpage:
>   -I, --ignore=3DPATTERN
>
> seems git is trying to be smart.

Yes =E2=80=94 and in that it often annoys me.

Anytime I use -S I worry about the interpretation of arguments, because
it already bit me a few times.

Git is a counter-example: It=E2=80=99s commandline is as unintuitive as it =
can
get without being an unfinished prototype.

And there really isn=E2=80=99t as much consistency in tools as you state.

Many tools interpret --foo bar as ((foo bar)), while others only accept
--foo=3Dbar as ((foo bar)) and treat --foo bar as ((foo #t) bar).

Some tools only accept options before positional arguments, while others
allow you to intersperse both.

Some tools use named arguments without dash (dd).

GNU tools often differ from BSD tools by allowing options after
positional arguments and treating --foo bar as (foo bar).

And please don=E2=80=99t do radical changes on guix package. That would bre=
ak
the workflow of every slightly longer term guix user.

Best wishes,
Arne
--=20
Unpolitisch sein
hei=C3=9Ft politisch sein
ohne es zu merken




Information forwarded to bug-guix@HIDDEN:
bug#40549; Package guix. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 13 May 2020 16:32:38 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed May 13 12:32:38 2020
Received: from localhost ([127.0.0.1]:59205 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1jYuJC-0007Xo-3z
	for submit <at> debbugs.gnu.org; Wed, 13 May 2020 12:32:38 -0400
Received: from lists.gnu.org ([209.51.188.17]:52638)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <arne_bab@HIDDEN>) id 1jYuJA-0007Xg-Rj
 for submit <at> debbugs.gnu.org; Wed, 13 May 2020 12:32:37 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:47884)
 by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <arne_bab@HIDDEN>) id 1jYuJA-0003X3-I3
 for bug-guix@HIDDEN; Wed, 13 May 2020 12:32:36 -0400
Received: from mout.web.de ([212.227.17.11]:33631)
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)
 (Exim 4.90_1) (envelope-from <arne_bab@HIDDEN>) id 1jYuJ9-0001xJ-Gd
 for bug-guix@HIDDEN; Wed, 13 May 2020 12:32:36 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=web.de;
 s=dbaedf251592; t=1589387545;
 bh=NGQdy241E+WbTB9hE4YWdEop8ltYByQW69ImUQF1u74=;
 h=X-UI-Sender-Class:References:From:To:Cc:Subject:In-reply-to:Date;
 b=Ry7Gqg3/QOcFEFiYN4X69n79be09Lfdl4o3TE+yvTWDYgvU0ci1AVKIuFDUWZ9IhP
 PLZmMYDgKUH17siIUJmkNAJONQHd/MfA4tQxqrwzeIQfo+CHk3tbrtEImPOh/hYEnI
 qwRZ2pdHZpw5ZjRL5sKek4xHmTngRc4CZtJbx/oc=
X-UI-Sender-Class: c548c8c5-30a9-4db5-a2e7-cb6cb037b8f9
Received: from fluss ([84.165.26.28]) by smtp.web.de (mrweb105
 [213.165.67.124]) with ESMTPSA (Nemesis) id 1MvKbj-1jHmzg2Xsv-00rGCw; Wed, 13
 May 2020 18:32:25 +0200
References: <6171889.DvuYhMxLoT@cherry> <1804825.CQOukoFCf9@cherry>
 <CAJ3okZ16sBU0Pj+8Xeg_icNCGuonBxii9=pHZ6HZEnngk2=YQA@HIDDEN>
 <5565734.MhkbZ0Pkbq@cherry>
User-agent: mu4e 1.4.4; emacs 26.3
From: Arne Babenhauserheide <arne_bab@HIDDEN>
To: Tom Zander <tomz@HIDDEN>
Subject: Re: bug#40549: More usability issues:
In-reply-to: <5565734.MhkbZ0Pkbq@cherry>
Date: Wed, 13 May 2020 18:32:24 +0200
Message-ID: <87zhabx0br.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Provags-ID: V03:K1:EJYpS4NETSpwQik03hBtXIr0rLUDbIME33PNgE/uKW0MwFiVU3E
 ntISJOKTneYvbrnrzSK3Bxvx52w7/iHbYVXDOUiq7FL5CtYOFGm8AuZZR1i3LXkooMDc+p/
 j3ROCMuQXlMKuyhWZgBQkNcqc6nkkQtwSU11Q8UuS5tvQ3S8tGPXraZmy98p5jk2TVEY6bu
 WcVF7tCZgAODOedeNcs2w==
X-Spam-Flag: NO
X-UI-Out-Filterresults: notjunk:1;V03:K0:pH4y4pzaEDI=:luKev7ru86wU7xuuoTml8h
 ms+tvglhLx5JKwxGbfdspZMM6k2U1Sb9LnHWg8zjNm6SGTd+FJoESOmNJvby1It9RN5SGxvfO
 YMZ8aW0KMLiVk6vespjpUmMPW5cIcTsBrHxACkMGPiMxmRHvNZWL1Co8Do0EQNbqzUihm+cXi
 8lrq8lmgONxqZge/+bZZbSj2VhGcL22EphHwyM4fOsMhQAd6kCT/rrGmTGrazIsAarRZ84AbG
 QW40OYd1Vxw7uC4fjENb8kouXfcHkS4C+7dDoMgBnYJqLQ6siEPv+1d35Kvb7mbWfq45csAiM
 thTsZIVftrqftIUEihD5+Qmqba6sNddJLqN4dff/DGYpnHHWmbqRGNKMbLrHyd5wIpKTnAzHV
 MdlffvdyVa359+tFZWxPyec1loj6HirH1wKKognQdKNXLgSTqiNKktTvbC+N3u/yG6zM3MsVF
 FwY+lBq6avRNpvFVSkmB7i5YRGZKwaHvmK/juAfeaBCVSSCVymYQnqWRiRt4fZs2YwAxURUz/
 dzXgJU1aQnVV+SiLr4va9bkng2z55I7XjMeWgpYBqagJJS0cWhfa/QLiQkfaf4i5RgXrc+8xa
 7Y5et+KjjISoCtXnSj1ox55FsTAoH26RhdIls3dHpmVPWVpZztrgWxcVDieQoGny271E/UBFP
 JI2M0t5gk7xEoTnOi2O4H2gJ1D1eLSg45JKOUs8binvT0hJS+NGIcKQysVnlT0n3cSU4axMND
 m6VkaI1wHI/U+pBbyeUAjQ9Kz2A0ttTIF+mFmEHUB/MgfDhsefIHHXGGmhBZWQd8wdIRJjHTD
 U78yqnOp7HivevMnwt6ffLfLez5omcb0Z4KZFBucmcKa3C3CRQFeNXN/6w6YCHPnoCYuZwiE6
 Bzj2gqWXhMV4M7jBD9AGsQeI0gWFxfNLcDGDI/zrKehuyx+VRsWCPIJKD5gg7KA7daXjFO2Ab
 j/G/kZIPz/wStcjJfEIPxW76iNCzdCNpXg0W09XYcA3aCKANlqYoNVAsOFG0VFMNEbhKF9kZn
 cvZTH/XRMu4jZN+aLMpUKv5ujsn6/hEKiNnjoAh/H+m2fxIfozEMoZnpB8Yn4UgnBQO1BqJqe
 K8p85XThnp/J9pV7HDo2pcUcltwV5MtLQqbWP2aHhsUMt4YKWX3+NIp22txXeo02kC92ugQBn
 pVOU07OCGtHipMQXdlIvkYR8W40f58ceEOYvLnm7ynHfR9VuT8ULOLiBqBVehfsNxJrfnh/N7
 AmSdsdmkHrXV1lIkO
Received-SPF: pass client-ip=212.227.17.11; envelope-from=arne_bab@HIDDEN;
 helo=mout.web.de
X-detected-operating-system: by eggs.gnu.org: First seen = 2020/05/13 12:32:34
X-ACL-Warn: Detected OS   = Linux 2.2.x-3.x [generic]
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_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN
X-Spam_action: no action
X-Spam-Score: -1.4 (-)
X-Debbugs-Envelope-To: submit
Cc: 40549 <at> debbugs.gnu.org, bug-guix@HIDDEN, zimoun <zimon.toutoune@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -2.4 (--)


Tom Zander via Bug reports for GNU Guix <bug-guix@HIDDEN> writes:
>> > You asked for an example;  see `git commit -S`. From the manpage:
>> >    -S[<keyid>], --gpg-sign[=3D<keyid>]
>>=20
>> Thank you for the example.   Let me show you that it raises an issue
>> too because it is not so "simple". :-)
>
> Easier example then: from the 'ls(1)' manpage:
>   -I, --ignore=3DPATTERN
>
> seems git is trying to be smart.

Yes =E2=80=94 and in that it often annoys me.

Anytime I use -S I worry about the interpretation of arguments, because
it already bit me a few times.

Git is a counter-example: It=E2=80=99s commandline is as unintuitive as it =
can
get without being an unfinished prototype.

And there really isn=E2=80=99t as much consistency in tools as you state.

Many tools interpret --foo bar as ((foo bar)), while others only accept
--foo=3Dbar as ((foo bar)) and treat --foo bar as ((foo #t) bar).

Some tools only accept options before positional arguments, while others
allow you to intersperse both.

Some tools use named arguments without dash (dd).

GNU tools often differ from BSD tools by allowing options after
positional arguments and treating --foo bar as (foo bar).

And please don=E2=80=99t do radical changes on guix package. That would bre=
ak
the workflow of every slightly longer term guix user.

Best wishes,
Arne
--=20
Unpolitisch sein
hei=C3=9Ft politisch sein
ohne es zu merken




Information forwarded to bug-guix@HIDDEN:
bug#40549; Package guix. Full text available.

Message received at 40549 <at> debbugs.gnu.org:


Received: (at 40549) by debbugs.gnu.org; 13 May 2020 06:22:28 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed May 13 02:22:28 2020
Received: from localhost ([127.0.0.1]:57172 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1jYkmh-0008Ei-T4
	for submit <at> debbugs.gnu.org; Wed, 13 May 2020 02:22:28 -0400
Received: from mx.kolabnow.com ([95.128.36.41]:47802)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <tomz@HIDDEN>) id 1jYkmf-0008EN-EJ
 for 40549 <at> debbugs.gnu.org; Wed, 13 May 2020 02:22:26 -0400
Received: from localhost (unknown [127.0.0.1])
 by ext-mx-out001.mykolab.com (Postfix) with ESMTP id 147376FA;
 Wed, 13 May 2020 08:22:19 +0200 (CEST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freedommail.ch;
 h=content-type:content-type:content-transfer-encoding
 :mime-version:references:in-reply-to:message-id:date:date
 :subject:subject:from:from:received:received:received; s=
 dkim20160331; t=1589350938; x=1591165339; bh=O4t2pueh/tyjAVg4tRa
 RJXE1TEWnPhiM64LXa4Le+g4=; b=HFh7t4q+Zp4/vs0zwZsQfjZS+6bCn3RfZ0D
 jyWhiy+DnBH6aLcFSbYvSM5bA54yDeK756N65oSHHVJSrjF/OSJGiXbq4rJASmIQ
 lhABUGfcJQc/l3aOEW96Rn9ncKvhFQwf6/wLaeisc73676ZjmH8mjYb8Dcj7wBE9
 g/joRmqu8776iYWhOtCf5a9YT1Nb+pdR9Um/rjP+GRjE07DWFp9J0vsbVFf+uWu3
 osZ2Gm7XRpVirgBpSsBd73UgwQAlvoy6ongegafSdo1d2/6P0dmL8rd7ykSFVQof
 +9p4zbxFSgBX6VP0SWYhNItNBbi/3FFyHo5RRkaJUxDSKFeUgROMX5KZ354HpSWH
 D8Haxmr8r4YScCIWXAqmxB/Vi4QVNvoIAE9wACMKJFEWdrdL/u3pmTqlLY4Y9fwQ
 vgo0ORogmta07x/+UeQuArUm4497u5P5sQ5pQ2w5zA+eXL/yqa/weEsg7k5qgZSX
 1ozj8lrFEhLOvsOhv14ZZtMhv8oSyEF5Td2rX5qu1xD8OX5nP4q92QZe8Cr55s2E
 mFlrVDg2mmOYgT2YKQZmAjXkc1Ce3mCbiUN1M68AHS6OQ3XpzxYRBlWKjs1pWW8e
 ei1RJrZ2Yal7zyYim4s+9CNASDIPV2TIs0eMohf1ZKEY7J8zv32QquqCXkB+y1N3
 s85B8yPo=
X-Virus-Scanned: amavisd-new at mykolab.com
X-Spam-Flag: NO
X-Spam-Score: -1.9
X-Spam-Level: 
X-Spam-Status: No, score=-1.9 tagged_above=-10 required=5
 tests=[BAYES_00=-1.9] autolearn=ham autolearn_force=no
Received: from mx.kolabnow.com ([127.0.0.1])
 by localhost (ext-mx-out001.mykolab.com [127.0.0.1]) (amavisd-new, port 10024)
 with ESMTP id hAG75t2pWeAO; Wed, 13 May 2020 08:22:18 +0200 (CEST)
Received: from int-mx003.mykolab.com (unknown [10.9.13.3])
 by ext-mx-out001.mykolab.com (Postfix) with ESMTPS id 559D965E;
 Wed, 13 May 2020 08:22:18 +0200 (CEST)
Received: from ext-subm002.mykolab.com (unknown [10.9.6.2])
 by int-mx003.mykolab.com (Postfix) with ESMTPS id E2C86B0F;
 Wed, 13 May 2020 08:22:17 +0200 (CEST)
From: Tom Zander <tomz@HIDDEN>
To: zimoun <zimon.toutoune@HIDDEN>
Subject: Re: bug#40549: More usability issues:
Date: Wed, 13 May 2020 08:22:16 +0200
Message-ID: <5420431.DvuYhMxLoT@cherry>
In-Reply-To: <CAJ3okZ3CBnFVec601MucSY0BiVifNBPQiB_V0rca12ZhY2txUQ@HIDDEN>
References: <6171889.DvuYhMxLoT@cherry> <5565734.MhkbZ0Pkbq@cherry>
 <CAJ3okZ3CBnFVec601MucSY0BiVifNBPQiB_V0rca12ZhY2txUQ@HIDDEN>
MIME-Version: 1.0
Content-Transfer-Encoding: 7Bit
Content-Type: text/plain; charset="us-ascii"
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 40549
Cc: 40549 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

It looks like I was wrong on the ls example,

more importantly, it seems we all agree that short options with optional 
arguments are messy, at best.

I think the best course of action is to take a look at the guix command line 
design and find a way to move away from depending on them. Maybe some iterative 
change its approach.






Information forwarded to bug-guix@HIDDEN:
bug#40549; Package guix. Full text available.

Message received at 40549 <at> debbugs.gnu.org:


Received: (at 40549) by debbugs.gnu.org; 12 May 2020 21:39:09 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue May 12 17:39:09 2020
Received: from localhost ([127.0.0.1]:56716 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1jYccH-0002Kt-FH
	for submit <at> debbugs.gnu.org; Tue, 12 May 2020 17:39:09 -0400
Received: from mail-qk1-f195.google.com ([209.85.222.195]:42644)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <zimon.toutoune@HIDDEN>) id 1jYccF-0002Kf-Ni
 for 40549 <at> debbugs.gnu.org; Tue, 12 May 2020 17:39:08 -0400
Received: by mail-qk1-f195.google.com with SMTP id b188so15277581qkd.9
 for <40549 <at> debbugs.gnu.org>; Tue, 12 May 2020 14:39:07 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
 h=mime-version:references:in-reply-to:from:date:message-id:subject:to
 :cc; bh=8+dRCjOSwW3STRioOUX52mkxCTBqOmn7BiGvSRlmU6o=;
 b=cvehMKHeL/Z20M2gBpWKhCmqQo0fGUWnCRwdBrBfaN9HuFsdLguCvz9AuLsiunT21V
 WOt1/nWJYJ0VnSfYPvpb6XLrPhjLce1IFUcsUrUvu5Z5Yv8KhsBBzq4xtmq0L9mLBeKn
 dga2kYcTCufOikIEJ2S3v7nMlBCFdlubTz6cAMn3tRSs+PXHTGBmJQ4v8phSQbjNyvDz
 v4TuQioN1fdcbKHIMWv3uM+1iMzumFk/yGl0pcQlIQmL/tZ9Ec5i3Mn2dm6N4WZNeZeN
 iiNmv1/MGKwlmDA1chiZ9/uthymFHrBMvT8dQv7BKvyxcBxDhT/RNYEpmtLggAhkWILG
 WssQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:mime-version:references:in-reply-to:from:date
 :message-id:subject:to:cc;
 bh=8+dRCjOSwW3STRioOUX52mkxCTBqOmn7BiGvSRlmU6o=;
 b=MM2HLiGYrR8eNY8wPJqlU2vA8ccFxs343KrdXbTPNxBPfkwOInoy2R7k1A304Ezrh2
 pLnOxjfNKV3Owu7QBmctEymiVYRiJlTdrLUpeGg42wh/0g4Q5SXcuazyeVvGeSewbKWJ
 yd3gaSsToBiTC7rxWSyQ1nGnkKqjZ7M4D+HoLhDlIyL2OyRz6rq//3SEHjk7TOXmL2J9
 uQm9TJHPeDkjfIfRqqZsHWV5xLpKa7cUgjYEHy6FtAnVC+5/P/OUoycd89WDo8knuKWz
 q3EXgeXRQXm4JwTzOaZpBJJeLzGejurfBvTdt7uyNh0IA0WCblqmET8oHxnVAj+naM9y
 Q02Q==
X-Gm-Message-State: AGi0PuY+e9fD3qy+C9aFywf7XtxOx1p4Vb7KGsJy6Gboz4Mbyh97KTlu
 Gx9SLzAFMxW6gsOzTk1X99ebir/HhMCKiPOOsRO+tc+Y
X-Google-Smtp-Source: APiQypILMgOYcKhkKvvRpohqDzRJz0hIjeSqzhe/d55fS2xWi8pxcj9iOnbnWX6POTJILHpp8plOmHrloK3k4y5Q+qg=
X-Received: by 2002:a37:4e05:: with SMTP id c5mr22966291qkb.232.1589319542075; 
 Tue, 12 May 2020 14:39:02 -0700 (PDT)
MIME-Version: 1.0
References: <6171889.DvuYhMxLoT@cherry> <1804825.CQOukoFCf9@cherry>
 <CAJ3okZ16sBU0Pj+8Xeg_icNCGuonBxii9=pHZ6HZEnngk2=YQA@HIDDEN>
 <5565734.MhkbZ0Pkbq@cherry>
In-Reply-To: <5565734.MhkbZ0Pkbq@cherry>
From: zimoun <zimon.toutoune@HIDDEN>
Date: Tue, 12 May 2020 23:38:50 +0200
Message-ID: <CAJ3okZ3CBnFVec601MucSY0BiVifNBPQiB_V0rca12ZhY2txUQ@HIDDEN>
Subject: Re: bug#40549: More usability issues:
To: Tom Zander <tomz@HIDDEN>
Content-Type: text/plain; charset="UTF-8"
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 40549
Cc: 40549 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

On Tue, 12 May 2020 at 22:19, Tom Zander <tomz@HIDDEN> wrote:

> They are expected to always be equivalent. It would not be logical to have the
> short one as an alias if they are not equivalent.

I agree.
Note that you cannot have short-name with optional argument or you
have to break a rule; see below.


> > > You asked for an example;  see `git commit -S`. From the manpage:
> > >    -S[<keyid>], --gpg-sign[=<keyid>]
> >
> > Thank you for the example.   Let me show you that it raises an issue
> > too because it is not so "simple". :-)
>
> Easier example then: from the 'ls(1)' manpage:
>   -I, --ignore=PATTERN

No. `ls -I -l` is not doing the right behaviour, i.e., the flag '-l'
is not applied.
PATTERN is not optional.


> seems git is trying to be smart.

Git resolves the ambiguity by removing the form '-S keyid'.
Other said,
(1) '-Skeyid' uses keyid as argument
(2) '-S keyid' fails as I showed you.
(3) '-S' fallbacks to the default (see .gitconfig)

Back to Guix, using the same strategy means:

(1)  guix package -d8 -p /path/to/profile
(2)  guix package -d 8 -p /path/to/profile # fails
(3)  guix pacakge -d -p /path/to/profile # delete all the generations
except the current one

The three cases cannot all works.  You have to choose two cases.
Currently Guix uses (1) and (2); and (3) fails.   Git uses (1) and
(3); and (2) fails.

You have right by remarking that the "git-way" seems more consistent
when flipping the options.  However they are less consistent in regard
with option requiring one argument.

 git commit -S4417B7 -m 'init'

I do not have a strong opinion on the topic.  Even if I am often
annoyed by "guix package -I -p /path/to/profile".


> The point is not to reinvent the wheel that have been invented so many
> times... A command line parser is a known thing that you can, and should,
> mirror how others do things.

Are you aware of the wheel? :-)

https://srfi.schemers.org/srfi-37/srfi-37.html
https://www.gnu.org/software/libc/manual/html_node/Argument-Syntax.html
https://pubs.opengroup.org/onlinepubs/007904975/basedefs/xbd_chap12.html#tag_12_02


> Even 'ls' uses optional short arguments (--ignore). So I'm not sure I agree
> with your line of reasoning.

No, the argument of '--ignore' is not optional.  At least with the GNU
version from coreutils 8.30.
Note the options with optional argument (--color and --hyperlink) do
not have a short-name form.


> Doing;
>   ls -I -v
> clearly understands that '-v' is not to be used as an optional argument.
> The reason, as far as I can tell, is that it does not fit as another argument.

You have wrong.  Compare

   ls -I -l
   ls -l -I
   ls -I '' -l


Because Guix uses SRFI-37 to parse command-line arguments and this
will not change, IMHO, the question asked on guile-devel is the one
explained above about the 3 cases.

All the best,
simon




Information forwarded to bug-guix@HIDDEN:
bug#40549; Package guix. Full text available.

Message received at 40549 <at> debbugs.gnu.org:


Received: (at 40549) by debbugs.gnu.org; 12 May 2020 20:19:34 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue May 12 16:19:34 2020
Received: from localhost ([127.0.0.1]:56572 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1jYbNF-0006TP-QU
	for submit <at> debbugs.gnu.org; Tue, 12 May 2020 16:19:34 -0400
Received: from mx.kolabnow.com ([95.128.36.41]:40038)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <tomz@HIDDEN>) id 1jYbND-0006TB-Mh
 for 40549 <at> debbugs.gnu.org; Tue, 12 May 2020 16:19:32 -0400
Received: from localhost (unknown [127.0.0.1])
 by ext-mx-out001.mykolab.com (Postfix) with ESMTP id 4CC95AEE;
 Tue, 12 May 2020 22:19:25 +0200 (CEST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freedommail.ch;
 h=content-type:content-type:content-transfer-encoding
 :mime-version:references:in-reply-to:message-id:date:date
 :subject:subject:from:from:received:received:received; s=
 dkim20160331; t=1589314764; x=1591129165; bh=VtLsPWcOvp+kKbXyf6T
 91E7jjkcBwu52o8xNYVtkulM=; b=cHfmZ6lFEDXNt5/TW2bNVpAFPdInt51zYpX
 NJeu5stSQbQl17fBu7d/DUP9JYwk/XSplC25mNuexKb1m23ZAx6lEAUjAekf/rgK
 56S2r/Q9AmYzwY5a4of13ilrZSoNu6M20fiMf1OvUa/AeawUXlD1EfxKouhpgv7G
 b5jWwyHi2Z+5Pe5Z1JhzG7MUHpJ+AxtdbCUhMCFDHY1mLRgZVZQAvDBqz+S6WLTq
 7Q3kfD72mvmnTmw/HjkG/XDSpFeRYTCA9LBuOjlBpIgThUiJznZE4jHkXuUHSJQ6
 UjRXTQZrLxe10F7V6+MKTHQ1qi5tQIDMiJu8Jm3pnCZf8/62ACjVsyJvi/QOtaJp
 /iauqk6MCqdjLFyc4nUXkBlxl44wLDnqrCn+KbDlSkfbK3nyxqbTspI5hHy9ZiI4
 n8b0IXH3/zNiGtC7+SlUWwjR3WTCtrYpzuQpcHy4w5kzxPsr8b9lhaP/MTAqaCdN
 QsMEhrj4oNe7LMZwSzvbXANuvbm5yyuYh3pdg12M50GFQaG6l6J4aqplH2jwM3xe
 imKm0jcSsKkQLMU0112xPfqjs0j/oBAZP81QBsfI/SemCX2571nIC384uFx7EYEJ
 HhyO4QuWX3Pzk47jZHoMmOeMNxijJRLP5AkwSMq6S8u0BO1pZz4c4FA94vPZIDjB
 HtPK+V5c=
X-Virus-Scanned: amavisd-new at mykolab.com
X-Spam-Flag: NO
X-Spam-Score: -1.9
X-Spam-Level: 
X-Spam-Status: No, score=-1.9 tagged_above=-10 required=5
 tests=[BAYES_00=-1.9] autolearn=ham autolearn_force=no
Received: from mx.kolabnow.com ([127.0.0.1])
 by localhost (ext-mx-out001.mykolab.com [127.0.0.1]) (amavisd-new, port 10024)
 with ESMTP id bRDvjQnHnPzf; Tue, 12 May 2020 22:19:24 +0200 (CEST)
Received: from int-mx002.mykolab.com (unknown [10.9.13.2])
 by ext-mx-out001.mykolab.com (Postfix) with ESMTPS id 545A212F;
 Tue, 12 May 2020 22:19:24 +0200 (CEST)
Received: from ext-subm003.mykolab.com (unknown [10.9.6.3])
 by int-mx002.mykolab.com (Postfix) with ESMTPS id F33D4380B;
 Tue, 12 May 2020 22:19:23 +0200 (CEST)
From: Tom Zander <tomz@HIDDEN>
To: zimoun <zimon.toutoune@HIDDEN>
Subject: Re: bug#40549: More usability issues:
Date: Tue, 12 May 2020 22:19:22 +0200
Message-ID: <5565734.MhkbZ0Pkbq@cherry>
In-Reply-To: <CAJ3okZ16sBU0Pj+8Xeg_icNCGuonBxii9=pHZ6HZEnngk2=YQA@HIDDEN>
References: <6171889.DvuYhMxLoT@cherry> <1804825.CQOukoFCf9@cherry>
 <CAJ3okZ16sBU0Pj+8Xeg_icNCGuonBxii9=pHZ6HZEnngk2=YQA@HIDDEN>
MIME-Version: 1.0
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain; charset="UTF-8"
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 40549
Cc: 40549 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

On dinsdag 12 mei 2020 20:08:32 CEST zimoun wrote:
> > The design of the short options is that it is an alias. Identical to the
> > software regardless of what the user typed.
>=20
> Yes.  But AFAIU, it is hard -- not impossible -- to detect what is an
> argument or what is another option in the case of optional argument in
> the short-name form.  Because it leads to ambiguous parsing.

The solution here is to be consistent with the way that others do this.
=46or those cases that you highlight the consistent solution elsewhere is=20
something you can apply here too. This follows the rule of the least surpri=
se.
=20
> And try "cut -f -d' '", it raises the error "cut: invalid field value =E2=
=80=98d =E2=80=99".

that is because -f has a required argument. As such I agree with your examp=
le,=20
but ignore it because it is not relevant to our discussion. It is not an=20
optional short option.
=20
> All short-name and long-name are ``equivalent`` when they do not
> require any argument -- for example with cut: -s, --only-delimited --
> *_or_* they require one argument -- for example: -f, --fields=3DLIST.

They are expected to always be equivalent. It would not be logical to have =
the=20
short one as an alias if they are not equivalent.

> But there is an ambiguity for optional argument.  How do you detect if
> the argument is provided or not?
> With the long-name, it is done with the character '=3D'.
> For short-name, it is ambiguous.  Imagine that "guix package" has in

The point here is that there exist rules that others use, to remove this=20
ambiguity. I'm trying to explain them to you to allow guix to behave the sa=
me.
I agree its tricky, the good thing is that it has been solved before.

=46or instance you can provide an argument to short options without spaces =
too:
You can write `cut -f1 -d:`.

> addition to '-S' the option '-2' meaning verbosity to level 2
> (--verbosity=3D2).  Then what is the meaning of:
>=20
>   guix package -S -2

If the user meant the "-2" argument to be an argument to the -S option, the=
y=20
would have to write (again, following the rules used by most software) as:

echo "test" > -bla
ls -I \-bla

or, to comment on your specific example. In git you don't use the dash to h=
ave=20
a negative, they use a different char. The tilde. Or dotdotdot. (think: ran=
ge)
   git show HEAD~
    git diff  ...master

> Is it equivalent to
>   + --switch-generation=3D-2
> or
>   + --switch-generation --verbose=3D2

In most software you would interpret any argument that starts with a dash a=
s=20
an option. For consistency sake you would thus interpret your example as th=
e=20
latter option.
The user can specify what they mean, but preferably you pick your syntax=20
better to avoid the -2 in the example you gave :)


> > You asked for an example;  see `git commit -S`. From the manpage:
> >    -S[<keyid>], --gpg-sign[=3D<keyid>]
>=20
> Thank you for the example.   Let me show you that it raises an issue
> too because it is not so "simple". :-)

Easier example then: from the 'ls(1)' manpage:
  -I, --ignore=3DPATTERN

seems git is trying to be smart.

=20
> > It looks like the parser could be improved by preferring to see any
> > argument with leading dash as a option when it **might** be an argument.
>=20
> It does not work for the general case as you describe.  It is not so simp=
le.
> :-) Because '-d -1' means '--delete-generation=3D-1' and not
> '--delete-generation -1'.

The point is consistency.
The point is not to reinvent the wheel that have been invented so many=20
times... A command line parser is a known thing that you can, and should,=20
mirror how others do things.

So, sure, "-d -1" does not give you what you want. BUT it is consistent with
=2D-delete -1.
This is the point the exercise. The basic premise is that the short version=
 is=20
an alias for the long version.
Yes, you have to be aware of how to format things, how the rules apply. But=
=20
this is the entire point: people should be able to learn it once. And not=20
again for guix because we thought something else worked better...


> From my knowledge, all that is solved by the rule: no short option
> with optional argument.

Sure, you can do that.
You'll probably annoy of a lot of people if you remove the thing they=20
use a lot :)

Even 'ls' uses optional short arguments (--ignore). So I'm not sure I agree=
=20
with your line of reasoning.


> > So; if you type -`guix package -l --help` then your parser **first** fi=
nds
> > all the items with leading dashes and second it tries to find out if
> > there is an argument for the `-l`.
> > In this case I expect the help to be shown.
> >=20
> > This is widely seen as a solution.
> > Users can still use items with leading dashes by using two commonly used
> > tricks.
> > The -l=3Da type of construction allows the argument to be anything.
> > Including it having a leading dash.
> >=20
> > Second is the double-dash argument that stops words leading with dashes
> > being parsed as options.
> >=20
> >   For instance;   grep -- -v *
> >=20
> > the  -v is parsed as an actual string and not an option because it foll=
ows
> > the double dashes.
>=20
> You miss the point, I believe.
> The issue of *any* parser is only for the "flag" with optional
> argument in their short-name form.
> Because, as I explained above, the syntax for such cases is ambiguous.

I'm going to have to disagree with you: this is software. You can **decide*=
*=20
the rule and thus decide the parsing. Making the idea that it is ambiguous=
=20
false. The rules I explained remove the ambiguity. It makes it extremely cl=
ear=20
what happens.
And that -S -2 example has a very clear behavior.

The point of this bugreport is that my suggestion is that the behavior shou=
ld=20
be changed to follow what most other software does.

Doing;
  ls -I -v
clearly understands that '-v' is not to be used as an optional argument.
The reason, as far as I can tell, is that it does not fit as another argume=
nt.


The actual design of the arguments needs a bit of finesse, I agree. The '-d=
 -2'=20
example is really not the best UI design.
Avoidance is best.

Yes, usage of 'guix package [option] is stupid because it generates a lot o=
f=20
cornercases here.
Ideally it would be guix package list [options].

In general I do agree that your solution of dropping all optional short=20
arguments would be the best solution.
They are extremely rare elsewhere.

It would be a bit of a bigger project to make a nice UI without them, thoug=
h.
Please keep as the hard rule that the short version is an ALIAS to the long=
=20
version.

=2D-=20
Tom Zander






Information forwarded to bug-guix@HIDDEN:
bug#40549; Package guix. Full text available.

Message received at 40549 <at> debbugs.gnu.org:


Received: (at 40549) by debbugs.gnu.org; 12 May 2020 18:08:52 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue May 12 14:08:52 2020
Received: from localhost ([127.0.0.1]:56480 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1jYZKl-00034P-TP
	for submit <at> debbugs.gnu.org; Tue, 12 May 2020 14:08:52 -0400
Received: from mail-qt1-f169.google.com ([209.85.160.169]:42099)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <zimon.toutoune@HIDDEN>) id 1jYZKk-00034C-1h
 for 40549 <at> debbugs.gnu.org; Tue, 12 May 2020 14:08:50 -0400
Received: by mail-qt1-f169.google.com with SMTP id x12so11894801qts.9
 for <40549 <at> debbugs.gnu.org>; Tue, 12 May 2020 11:08:50 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
 h=mime-version:references:in-reply-to:from:date:message-id:subject:to
 :cc:content-transfer-encoding;
 bh=pF5zYgaQ5M3r5xolYm/CH9Dz6fMhxYbeQi8wsNVLJpc=;
 b=edBdBQBIxdurZLS447l1wGjTkQzBN8ViwnYw95lHGBRc6vzSpYfDXd/dbK9ewi3YIy
 l8wgjuRmmG6gpv1KFPmCpptdO4u3x7oXL8/lgo6wtecq8kBXaZ2/ykanRpCe41tFbKKr
 RP8hA8GRFlxRicZj15WL9SmWdVt6tVDNsn8HFsLu7Ivr2DdeOKWDaxBC0zCsgq73azSJ
 WG+W8ZZW2vLCug4lSLQVXdwRy7GybvzZ6XeFRZDOU9s9qKwCgToF5Z0MWYPwQiBzxhvQ
 IzPBHCmKK2NbXeIj/n4jOiZ5VS4Sh7EwxOpZON+nlLXvRhQHlcuF/jGpHaroYp81GZH7
 fLGw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:mime-version:references:in-reply-to:from:date
 :message-id:subject:to:cc:content-transfer-encoding;
 bh=pF5zYgaQ5M3r5xolYm/CH9Dz6fMhxYbeQi8wsNVLJpc=;
 b=p9H2uTeDIf7leSyLGyDNq/nlWdU/03523IF8SDn2XKKTTqnMUem30xxWP+RcS6xeED
 seAv8SqFY3OhTZzU55evOBS9p//2QDPhnFodctpQqjkcLbPVlqYb8CAqRuRLp86ThdRb
 XyGCGyhFdcpfk8SX/ZcvmzRIGkIUXRm59owzrdinh4YDkdYW5ZiX7uCp2ryHCwOVYScy
 1Gt6uSennwWdStkcpKPiWe91DILdJ3Ou0uaPO+lqmLm1dVE57ZcyuVcPB6t3Z/XAkNeJ
 1V0erivhAKUY2EroyHZKclsZ1Ygm4LffGXSIPP5ToYParwl13N0e4xXe3V8xIRP98ZUV
 QqiA==
X-Gm-Message-State: AGi0PuaflKnRuonKQvwbFGpP9/CPKNnzuSmf8BIz8PPPcw47rLaVbJW2
 dA49ED02knVXz6jhKhE6eh4bZZWXD6xIVJ+jpb7F3lMI
X-Google-Smtp-Source: APiQypI8qYOx1QKS/jRXOCddZhTr49svoe3Cq6SYQz0m7e6zvvs4Em1YlvV99U1sChiUkv9SYcPEqNX7vl9Eb1Pmkcg=
X-Received: by 2002:ac8:2db0:: with SMTP id p45mr20735487qta.354.1589306924154; 
 Tue, 12 May 2020 11:08:44 -0700 (PDT)
MIME-Version: 1.0
References: <6171889.DvuYhMxLoT@cherry> <5652466.lOV4Wx5bFT@cherry>
 <CAJ3okZ0wZTqKAoC8ZJt=G67Mm0zBRE=n08B9r71irYkYLfnDWg@HIDDEN>
 <1804825.CQOukoFCf9@cherry>
In-Reply-To: <1804825.CQOukoFCf9@cherry>
From: zimoun <zimon.toutoune@HIDDEN>
Date: Tue, 12 May 2020 20:08:32 +0200
Message-ID: <CAJ3okZ16sBU0Pj+8Xeg_icNCGuonBxii9=pHZ6HZEnngk2=YQA@HIDDEN>
Subject: Re: bug#40549: More usability issues:
To: Tom Zander <tomz@HIDDEN>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 40549
Cc: 40549 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

Dear Tom,

On Tue, 12 May 2020 at 18:23, Tom Zander <tomz@HIDDEN> wrote:

> The other is the ordering of arguments being parsed unpredictable.
> The usecase given was the `-d 1 -S 2`  arguments  (see earlier emails for
> details).

Fix for that coming soon. :-)
Thank you for the report.


> > Please could you indicate me command-line tools where short-option
> > with optional-argument is possible.
> > Because if there is one, I could have inspiration to know how it
> > resolves the ambiguity.
>
> The design of the short options is that it is an alias. Identical to the
> software regardless of what the user typed.

Yes.  But AFAIU, it is hard -- not impossible -- to detect what is an
argument or what is another option in the case of optional argument in
the short-name form.  Because it leads to ambiguous parsing.


> So you get 'cut --field 1' or 'cut -f1' or 'cut -f 1' or 'cut -f=3D1'.
> All identical.
> The important part here is that each _option_ is written separately, with=
 a
> leading dash.

And try "cut -f -d' '", it raises the error "cut: invalid field value =E2=
=80=98d =E2=80=99".

All short-name and long-name are ``equivalent`` when they do not
require any argument -- for example with cut: -s, --only-delimited --
*_or_* they require one argument -- for example: -f, --fields=3DLIST.

But there is an ambiguity for optional argument.  How do you detect if
the argument is provided or not?
With the long-name, it is done with the character '=3D'.
For short-name, it is ambiguous.  Imagine that "guix package" has in
addition to '-S' the option '-2' meaning verbosity to level 2
(--verbosity=3D2).  Then what is the meaning of:

  guix package -S -2

?

Is it equivalent to
  + --switch-generation=3D-2
or
  + --switch-generation --verbose=3D2
?


> You asked for an example;  see `git commit -S`. From the manpage:
>
>    -S[<keyid>], --gpg-sign[=3D<keyid>]

Thank you for the example.   Let me show you that it raises an issue
too because it is not so "simple". :-)

--8<---------------cut here---------------start------------->8---
mv ~/.gnupg ~/.gnupg.bak
gpg --gen-key
gpg --list-keys

mkdir -p /tmp/foo
touch /tmp/foo/bar
git -C /tmp/foo init
git -C /tmp/foo/ add  bar

git commit -S -m 'init'
error: gpg failed to sign the data
fatal: failed to write commit object

git -C /tmp/foo commit -S 4417B7AADBEFFBEBE4C201271A6DD2B6218BF4B3 -m 'init=
'
error: pathspec '4417B7AADBEFFBEBE4C201271A6DD2B6218BF4B3' did not
match any file(s) known to git

git -C /tmp/foo commit
--gpg-sig=3D4417B7AADBEFFBEBE4C201271A6DD2B6218BF4B3 -m 'init'
[master (root-commit) f4df0ff] init
 1 file changed, 0 insertions(+), 0 deletions(-)
 create mode 100644 bar

git config --global user.signingkey 4417B7AADBEFFBEBE4C201271A6DD2B6218BF4B=
3

echo ok > /tmp/foo/bar

git -C /tmp/foo commit -S -am 'bis'
[master 639c41e] bis
 1 file changed, 1 insertion(+)
--8<---------------cut here---------------end--------------->8---

Maybe Git manual is lying. ;-)


> > The issue is that Guix uses a bad practise: option with optional-argume=
nt
> >  with both short and long name.  It is a mistake to provide the short-n=
ame
> >  for such case.
>
> It looks like the parser could be improved by preferring to see any argum=
ent
> with leading dash as a option when it **might** be an argument.

It does not work for the general case as you describe.  It is not so simple=
. :-)
Because '-d -1' means '--delete-generation=3D-1' and not '--delete-generati=
on -1'.

So considering the situation '-d -X', the parser needs to guess if
'-X' is the argument of the option '-d' or if it is another option.
Yes, it is possible but it is not so easy -- nor impossible -- because
what does it means '-S -2d'?
   + --switch-generation=3D-2d
or
  + --switch-generation --verbosity=3D2 --delete-generation

From my knowledge, all that is solved by the rule: no short option
with optional argument.


> So; if you type -`guix package -l --help` then your parser **first** find=
s all
> the items with leading dashes and second it tries to find out if there is=
 an
> argument for the `-l`.
> In this case I expect the help to be shown.
>
> This is widely seen as a solution.
> Users can still use items with leading dashes by using two commonly used
> tricks.
> The -l=3Da type of construction allows the argument to be anything. Inclu=
ding it
> having a leading dash.
>
> Second is the double-dash argument that stops words leading with dashes b=
eing
> parsed as options.
>   For instance;   grep -- -v *
> the  -v is parsed as an actual string and not an option because it follow=
s the
> double dashes.

You miss the point, I believe.
The issue of *any* parser is only for the "flag" with optional
argument in their short-name form.
Because, as I explained above, the syntax for such cases is ambiguous.

Otherwise, the parser really behaves as you expect!


> > Now all this is clearer for me and I do not think it is a fixable bug.
>
> It is, just follow the suggestion from me and from zimoun: any command-li=
ne-
> argument that starts with a dash should be preferred to be an option. Onl=
y in
> a second phase do you try to match anything to (optional) options.

You are referring these lines [1] from me, right?

--8<---------------cut here---------------start-------------->8---
srfi-37 should consider that if an argument starts with
dash, then it is not an argument and turn it into an option.
--8<---------------cut here---------------end--------------->8---

I thought that and then I tried to fix it in the Guile implementation
of SRFI-37 [2] and I learned [3] that it is not so simple, as I
explained to you above.

[1] http://issues.guix.gnu.org/40549#7
[2] http://git.savannah.gnu.org/cgit/guile.git/tree/module/srfi/srfi-37.scm
[3] http://issues.guix.gnu.org/40549#10


> As stated, the rest of the world does this, please check out the various
> examples I gave here to confirm that others have solved it and it may be
> possible to solve it for guix too.

Please consider that some people here are long standing GNU hackers. :-)
So they might be the same ones that implemented the "rest of the world" too=
. ;-)

All the best,
simon




Information forwarded to bug-guix@HIDDEN:
bug#40549; Package guix. Full text available.

Message received at 40549 <at> debbugs.gnu.org:


Received: (at 40549) by debbugs.gnu.org; 12 May 2020 16:26:30 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue May 12 12:26:30 2020
Received: from localhost ([127.0.0.1]:56397 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1jYXji-0006jx-7n
	for submit <at> debbugs.gnu.org; Tue, 12 May 2020 12:26:30 -0400
Received: from mx.kolabnow.com ([95.128.36.42]:62114)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <tomz@HIDDEN>) id 1jYXjg-0006jj-SM
 for 40549 <at> debbugs.gnu.org; Tue, 12 May 2020 12:26:29 -0400
Received: from localhost (unknown [127.0.0.1])
 by ext-mx-out002.mykolab.com (Postfix) with ESMTP id 3D97E9FC;
 Tue, 12 May 2020 18:26:23 +0200 (CEST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freedommail.ch;
 h=content-type:content-type:content-transfer-encoding
 :mime-version:references:in-reply-to:message-id:date:date
 :subject:subject:from:from:received:received:received; s=
 dkim20160331; t=1589300782; x=1591115183; bh=PwTCfacKVy8prSvlS10
 swCulu60doj6oG7FsFPCe7ig=; b=OCYvFkoXO/A18CNxaqX92t8h7KpSJ+cGKtv
 ZtyikF16vjjhCAjGUKvqwTuhUiOOUelMrxK9EalnoGl9y7d14DS/HWdFt1Gz9/wQ
 OvbDm/9b88PC83wj+c5DK5ORXwk/OOJPlyMMUT1CZlauYhLZS/jICZW/FsW5PaF/
 N3jOl25XGGcEbX2ue9vqquNwx/2TfG/Ewhnag66GPCyzefaEMdJvk6L7FssBi/MM
 VEvDLT5/ENXTY24hdBTY3JJBvCJzQ+jSa1YeLTTKY2MuulJ3YB1WTOOv9Zfg4pmg
 bBwIRJySXnb6qpFdOOAixayOkHbDDbtrG8uLh8w5GIEFEmZCw0NDY+XDxGlhHXQZ
 aTa7g1U0mB5JxKpDxnF+6CFciQaC+5+F/DoGZzN41cJK7m1XVoUc1RfABZOQippV
 ama9WqLAoLjCpQfupLRbx3/0p0cv6xC0K0d2LcOdIQGn1eQzCj1wV8KkzRfem2Kx
 GhweHAGFjyPH98FBvGLBLqQMgzjPWH9cvXbZjrEqkl/SuUhtvc1pRVrGPUbW45+B
 GQE5EKjaM+R5eZpdUxVRwAwp47pt/OrzflLM1nDNAIg4kC1z0G4nyjMnZhpPgjYR
 CWmkbHxMpYrL3PCcJ4RmvIPsdvENqDSEzqrYjpNxA+abX4t30G7dYkuxVIWvEEL5
 5Xlln1t4=
X-Virus-Scanned: amavisd-new at mykolab.com
X-Spam-Flag: NO
X-Spam-Score: -1.9
X-Spam-Level: 
X-Spam-Status: No, score=-1.9 tagged_above=-10 required=5
 tests=[BAYES_00=-1.9] autolearn=ham autolearn_force=no
Received: from mx.kolabnow.com ([127.0.0.1])
 by localhost (ext-mx-out002.mykolab.com [127.0.0.1]) (amavisd-new, port 10024)
 with ESMTP id Ha9YUL3g0UH9; Tue, 12 May 2020 18:26:22 +0200 (CEST)
Received: from int-mx003.mykolab.com (unknown [10.9.13.3])
 by ext-mx-out002.mykolab.com (Postfix) with ESMTPS id C238D40C;
 Tue, 12 May 2020 18:26:22 +0200 (CEST)
Received: from ext-subm001.mykolab.com (unknown [10.9.6.1])
 by int-mx003.mykolab.com (Postfix) with ESMTPS id 6B621B55;
 Tue, 12 May 2020 18:26:22 +0200 (CEST)
From: Tom Zander <tomz@HIDDEN>
To: 40549 <at> debbugs.gnu.org, zimoun <zimon.toutoune@HIDDEN>
Subject: Re: proposal for 'process-actions'
Date: Tue, 12 May 2020 18:26:20 +0200
Message-ID: <2468105.Lt9SDvczpP@cherry>
In-Reply-To: <CAJ3okZ1C1RkAGCBX-pjYmVyuM6YaZKWQQYCM9iyCWoFiQmEMPw@HIDDEN>
References: <CAJ3okZ1C1RkAGCBX-pjYmVyuM6YaZKWQQYCM9iyCWoFiQmEMPw@HIDDEN>
MIME-Version: 1.0
Content-Transfer-Encoding: 7Bit
Content-Type: text/plain; charset="us-ascii"
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 40549
Cc: Ludovic =?ISO-8859-1?Q?Court=E8s?= <ludo@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

On dinsdag 12 mei 2020 15:03:14 CEST zimoun wrote:
> If yes, I can come up with a patch.

I think that would be much improved, yes.

-- 
Tom Zander






Information forwarded to bug-guix@HIDDEN:
bug#40549; Package guix. Full text available.

Message received at 40549 <at> debbugs.gnu.org:


Received: (at 40549) by debbugs.gnu.org; 12 May 2020 16:23:26 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue May 12 12:23:26 2020
Received: from localhost ([127.0.0.1]:56392 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1jYXgj-0006eq-Lu
	for submit <at> debbugs.gnu.org; Tue, 12 May 2020 12:23:25 -0400
Received: from mx.kolabnow.com ([95.128.36.40]:32554)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <tomz@HIDDEN>) id 1jYXgh-0006eZ-K9
 for 40549 <at> debbugs.gnu.org; Tue, 12 May 2020 12:23:25 -0400
Received: from localhost (unknown [127.0.0.1])
 by ext-mx-out003.mykolab.com (Postfix) with ESMTP id 62B8840788;
 Tue, 12 May 2020 18:23:17 +0200 (CEST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freedommail.ch;
 h=content-type:content-type:content-transfer-encoding
 :mime-version:references:in-reply-to:message-id:date:date
 :subject:subject:from:from:received:received:received; s=
 dkim20160331; t=1589300595; x=1591114996; bh=NDY7VFbqFLuQjJaaRA/
 pE5vMABTmYa1/KMDUkEVC7Uk=; b=IFLuAVGE0FK+1/ByykioEOaCOYKYd26LNEn
 zTChAUn6a/CIKAfKjaX9aCPUs9r7LXg24bDLGdOWJXDMvpMIBeIx1gnwFxb6D5+f
 7hH4GOsAPrboXhC7qO63K9lGiuvl7Jg3hv6mbQ4eoYWBKBxWk/G2hUOK9C/Ubejh
 34wATDnjQVQjwDI48Ud9Ztx5WFdQpkuWq8Xy8mocndZu37DIGAYvYzD4soNntn82
 6PzIyfSy2WtjntZwDMFfVwcaw8uJKuseRDaxbiS3UR0da8z4vj7tUJ9ANvJFdS3H
 6upcbuSSt/PUf4cDYDz6ZTwogvHUfanMUZ/3e/oDVnhcN4ZUfvqUDQfdxSBU9A0F
 nURvdbj+lX/poi4GKQe8UBB5BthcxJPFjqayS/DWLJJcLXxF/IaWgRSm6D3iutSP
 QmAYvc+fRbpa0b2kM1IeMrc2tkkOSiRZo+eCrQOl5kXz3/o/2Sk4kFJLJxLxsCRV
 0hQcUwbxNcfIkFacUOqf6y7qVmphWOsJG5BSpw6MhEIi08OAwcRPMY0sjn9EccRY
 M+lpXAIf6mLbUIHFEDn4cTcQNrZM23EsDF/lAUST1A9pC3PU8PbhgUNn+VrvppiL
 13zUY05pftzamIJ9ogoapUGjVvpBnvDZIo4TMqBYRrcja+rM10pdjKZkjMUcJl5p
 QvTnBJNU=
X-Virus-Scanned: amavisd-new at mykolab.com
X-Spam-Flag: NO
X-Spam-Score: -1.899
X-Spam-Level: 
X-Spam-Status: No, score=-1.899 tagged_above=-10 required=5
 tests=[BAYES_00=-1.9, URIBL_BLOCKED=0.001]
 autolearn=ham autolearn_force=no
Received: from mx.kolabnow.com ([127.0.0.1])
 by localhost (ext-mx-out003.mykolab.com [127.0.0.1]) (amavisd-new, port 10024)
 with ESMTP id A6TLwrCPSl2N; Tue, 12 May 2020 18:23:15 +0200 (CEST)
Received: from int-mx002.mykolab.com (unknown [10.9.13.2])
 by ext-mx-out003.mykolab.com (Postfix) with ESMTPS id BAE6A40589;
 Tue, 12 May 2020 18:23:15 +0200 (CEST)
Received: from ext-subm002.mykolab.com (unknown [10.9.6.2])
 by int-mx002.mykolab.com (Postfix) with ESMTPS id 6880E2366;
 Tue, 12 May 2020 18:23:15 +0200 (CEST)
From: Tom Zander <tomz@HIDDEN>
To: zimoun <zimon.toutoune@HIDDEN>
Subject: Re: bug#40549: More usability issues:
Date: Tue, 12 May 2020 18:23:13 +0200
Message-ID: <1804825.CQOukoFCf9@cherry>
In-Reply-To: <CAJ3okZ0wZTqKAoC8ZJt=G67Mm0zBRE=n08B9r71irYkYLfnDWg@HIDDEN>
References: <6171889.DvuYhMxLoT@cherry> <5652466.lOV4Wx5bFT@cherry>
 <CAJ3okZ0wZTqKAoC8ZJt=G67Mm0zBRE=n08B9r71irYkYLfnDWg@HIDDEN>
MIME-Version: 1.0
Content-Transfer-Encoding: 7Bit
Content-Type: text/plain; charset="us-ascii"
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 40549
Cc: 40549 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

On dinsdag 12 mei 2020 13:35:04 CEST zimoun wrote:
> On Tue, 12 May 2020 at 11:55, Tom Zander via Bug reports for GNU Guix
> 
> <bug-guix@HIDDEN> wrote:
> > the bugreport is a usability bug which stems from the fact that the
> > command
> > line parser behaves differently from every single other commandline parser
> > average people like me have ever used.
> > 
> > A near 100% of the command line tools on your Gnu/Linux box will behave
> > differently than guix does now.
> > 
> > C apps using libc, python apps using their parser, even C++ apps using the
> > Qt commandline classes, all are generally compatible with regards to
> > behavior.
> > 
> > Only Guix is different.
> 
> Could you provide concrete examples?  Other than "guix package"?
> And other than short-option with optional argument?

This report lists two items.

Indeed the short options are a good one. It is unheard of to have an alias not 
be an alias but behave differently.
It also can't be said to be documented as the --help output does not actually 
state this. I only learned this difference today :-)

The other is the ordering of arguments being parsed unpredictable.
The usecase given was the `-d 1 -S 2`  arguments  (see earlier emails for 
details).


> Please could you indicate me command-line tools where short-option
> with optional-argument is possible.
> Because if there is one, I could have inspiration to know how it
> resolves the ambiguity.

The design of the short options is that it is an alias. Identical to the 
software regardless of what the user typed.

So you get 'cut --field 1' or 'cut -f1' or 'cut -f 1' or 'cut -f=1'.
All identical.
The important part here is that each _option_ is written separately, with a 
leading dash.

When you talk about flags you can group them. `mv -vufi` is again identical to
`mv -v -u -f -i`.  But this is irrelevant to your question because, as stated, 
this is about _flags_, not option.

You asked for an example;  see `git commit -S`. From the manpage:

   -S[<keyid>], --gpg-sign[=<keyid>]


> The issue is that Guix uses a bad practise: option with optional-argument
>  with both short and long name.  It is a mistake to provide the short-name
>  for such case.

It looks like the parser could be improved by preferring to see any argument 
with leading dash as a option when it **might** be an argument.

So; if you type -`guix package -l --help` then your parser **first** finds all 
the items with leading dashes and second it tries to find out if there is an 
argument for the `-l`.
In this case I expect the help to be shown.


This is widely seen as a solution.
Users can still use items with leading dashes by using two commonly used 
tricks.
The -l=a type of construction allows the argument to be anything. Including it 
having a leading dash.

Second is the double-dash argument that stops words leading with dashes being 
parsed as options.
  For instance;   grep -- -v *
the  -v is parsed as an actual string and not an option because it follows the 
double dashes.

> Now all this is clearer for me and I do not think it is a fixable bug.

It is, just follow the suggestion from me and from zimoun: any command-line-
argument that starts with a dash should be preferred to be an option. Only in 
a second phase do you try to match anything to (optional) options.

As stated, the rest of the world does this, please check out the various 
examples I gave here to confirm that others have solved it and it may be 
possible to solve it for guix too.
-- 
Tom Zander






Information forwarded to bug-guix@HIDDEN:
bug#40549; Package guix. Full text available.

Message received at 40549 <at> debbugs.gnu.org:


Received: (at 40549) by debbugs.gnu.org; 12 May 2020 14:10:49 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue May 12 10:10:49 2020
Received: from localhost ([127.0.0.1]:56288 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1jYVcP-0003BX-3R
	for submit <at> debbugs.gnu.org; Tue, 12 May 2020 10:10:49 -0400
Received: from mail-qt1-f178.google.com ([209.85.160.178]:38340)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <zimon.toutoune@HIDDEN>) id 1jYVcN-0003BJ-SH
 for 40549 <at> debbugs.gnu.org; Tue, 12 May 2020 10:10:48 -0400
Received: by mail-qt1-f178.google.com with SMTP id i68so11115886qtb.5
 for <40549 <at> debbugs.gnu.org>; Tue, 12 May 2020 07:10:47 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
 h=mime-version:references:in-reply-to:from:date:message-id:subject:to
 :cc; bh=9bEyOdaoG9dko3NhgTL3olohXlBFwadnWDj+c8cInFc=;
 b=SWZrOmgGWddQ+RfT8PU9DTa6dMJ9hQn7+UnlZM7XbFJ9Tm6Mneszx1m+0WPPkWSKgP
 O+YHge4XelUi+FMZjwZWl/IZGkEl1rhVsyT8s8O6Lmw0osiMiqORGkiNYnZH5RQs/FEi
 33VsmwxGsLGFLwtx678kEB98icbzysoHwj1WtDdm/yVatTrVxO7qn48t05XETeISN6LE
 fwXAhDbTKZJ1BmQul0fnLUyy9R1GPbAiolsPw4b/k2wUZu6Xi7LV86xFIpefiqG1aD+O
 teNN1jtiMbWSxsX7KoVfmabyxgBUcN9IzUVSSuYKs1vM1LLi/j5PaDytWo/x3rLhj1xh
 sc5A==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:mime-version:references:in-reply-to:from:date
 :message-id:subject:to:cc;
 bh=9bEyOdaoG9dko3NhgTL3olohXlBFwadnWDj+c8cInFc=;
 b=pGC85CqOdIwS1ooJZJoGX90NHaSR/E8DB/VTcKu1cEN1n4e0kZYwupIX0cyHABurTG
 MRLwuNSI5n7FUMgtnD0kzxBQCeJHLQdPRhcvziaPQQTdLkqlPNS+wU23ejtnefm1iDSF
 P+anfdwQ4woQTq6fO+X7ux0uQttAE8rLHIXnUqGB0yHYvwX2OByLrN1ZWJHI94EvblX4
 b0iBQBDxOLZS20iZVAPurrQxmfVNv3U7Igvzvsjm+cS1ETPzm62DnGAGClNsoH/dcPir
 dwwxESaBqt+kMVTzWSRafYRCE/yuiYs4WxdZT48brGHNKskdh5MDd7LqHhHaftsdgFDA
 QW1g==
X-Gm-Message-State: AGi0PuYy3kIw4pqY7YR/IjDQcx3zYbLK8PauKLx3Hlqspij3KzctUcpO
 UmuQUqOgwGbKCR7yfbUgdqK/2we6K9aX0VvgZKU=
X-Google-Smtp-Source: APiQypLCiSORZHl0pJMGtSvxrn/GaYMak459LsT7anL/82rYYIQQ1V4+D0R/MlQkC83mzku1+4sRs/QtN7uXgSI+SbM=
X-Received: by 2002:ac8:5047:: with SMTP id h7mr17255076qtm.186.1589292641918; 
 Tue, 12 May 2020 07:10:41 -0700 (PDT)
MIME-Version: 1.0
References: <6171889.DvuYhMxLoT@cherry>
 <CAJ3okZ1QTgOB5Dqn4qR8A-Jrz0_Zkx5rJ247RFh5S6M6g06qbg@HIDDEN>
 <87mu6dcz8v.fsf@HIDDEN> <5652466.lOV4Wx5bFT@cherry>
In-Reply-To: <5652466.lOV4Wx5bFT@cherry>
From: zimoun <zimon.toutoune@HIDDEN>
Date: Tue, 12 May 2020 16:10:29 +0200
Message-ID: <CAJ3okZ1GyJL8X4mbifDNa84q466pgsUrTSFudNb7RNfmV3pC=w@HIDDEN>
Subject: Re: bug#40549: More usability issues:
To: Tom Zander <tomz@HIDDEN>
Content-Type: text/plain; charset="UTF-8"
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 40549
Cc: 40549 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

Dear Tom,

On Tue, 12 May 2020 at 11:55, Tom Zander via Bug reports for GNU Guix
<bug-guix@HIDDEN> wrote:

[...]

> C apps using libc, python apps using their parser, even C++ apps using the Qt
> commandline classes, all are generally compatible with regards to behavior.
>
> Only Guix is different.

Please could you indicate me command-line tools where short-option
with optional-argument is possible.
Because if there is one, I could have inspiration to know how it
resolves the ambiguity.


> > However (srfi srfi-37) does it as we see it now.  Fixing it would mean
> > implementing a different option parser.
>
> Then fix that parser. It is inconsistent with the rest of the world and as long
> as it is end-user-facing this inconsistency is a usability bug. A rather
> massive one, I might say as this is about as core to the user-interaction of
> the platform as it can get.

The parser is not inconsistent with the rest of the world.  Or please
indicate with concrete examples what is wrong.

The issue is that Guix uses a bad practise: option with
optional-argument with both short and long name.  It is a mistake to
provide the short-name for such case.


Thank you for the report.  Now all this is clearer for me and I do not
think it is a fixable bug.

All the best,
simon




Information forwarded to bug-guix@HIDDEN:
bug#40549; Package guix. Full text available.

Message received at 40549 <at> debbugs.gnu.org:


Received: (at 40549) by debbugs.gnu.org; 12 May 2020 13:59:04 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue May 12 09:59:04 2020
Received: from localhost ([127.0.0.1]:56279 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1jYVR2-0002s3-ES
	for submit <at> debbugs.gnu.org; Tue, 12 May 2020 09:59:04 -0400
Received: from mail-qk1-f194.google.com ([209.85.222.194]:41360)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <zimon.toutoune@HIDDEN>) id 1jYVR1-0002rW-2R
 for 40549 <at> debbugs.gnu.org; Tue, 12 May 2020 09:59:03 -0400
Received: by mail-qk1-f194.google.com with SMTP id n14so13607736qke.8
 for <40549 <at> debbugs.gnu.org>; Tue, 12 May 2020 06:59:02 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
 h=mime-version:references:in-reply-to:from:date:message-id:subject:to
 :cc:content-transfer-encoding;
 bh=lmEn2u/A9MguYT7fxcXYp5LnhNCo2Vy3DU97M+dWY/E=;
 b=VRpnugIerY25U1rqYSSVY9L6dVg3JXH+NpYSE+X5hHPjsg/aA/7zKIzyHAWTzKAumQ
 a0MFfHYGWSXd952+5U5o+67euuiMsqGk1PXbpaq+3vtZl5poFNIxGJxLxRLODryjxOjT
 yShDquAw6hPq3WjdT6UQvEL/t3p4IpD0aUUSlt/90rkRyqFg+h5bWcWuZpwc7r30s/IO
 yoovYhzpT0ESZqeb5vzCgw92DWUv4CQJfQAW8vTmwJ+gsblCWoW2FpJ9lQHSWsRH7WgI
 IyNCavDDmluHYfVipH5eduKcbrpZpjP2b2yJVEfdDEv1zjiGR/C5cCDRURHJXMjsm0Qx
 duAQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:mime-version:references:in-reply-to:from:date
 :message-id:subject:to:cc:content-transfer-encoding;
 bh=lmEn2u/A9MguYT7fxcXYp5LnhNCo2Vy3DU97M+dWY/E=;
 b=g67+aJnlwaKLCpxCZBysruAlLBFQak+cdC5cwxNJe7tzzd2XJxmMuHjKWVrrEgek/d
 59ie+nMIk5CnIQYmqybn/QfjIUYdoV+3W5EXPOIa+Dbvjyipor6ZZztNSAyNbeMgVw46
 4EwOXn5yB2U5+4Rd66adQJwTKjqPRbv0kVjw+R39ZdANG3yZXP4kWezbOTfmWpbXbqzc
 6H2tRxIYAmaWzlOqV7jdAY/jJwGUtspD3LY6lVgOsYJ3KV28OlvkIcHRsUk6lL94VllB
 2TrdJfhsnWtW3ku5wK+A+IcRvTnaCap94WBP+t8nhd+K4qQoueFE9ilqNF2qPO8C4Twh
 9dNA==
X-Gm-Message-State: AGi0PuZRN4bUwECoKKwy7vxM5pBFXBHAvo3O+bpCLXRvR/QYvJbey5Qc
 y6hpCPgajlQGPbUavGfY3F5AD7n+wDLV1oEpjCY=
X-Google-Smtp-Source: APiQypLcumgOsMt6afJsUoSBlYuXFvRAmmu970g2R9jpJ7RT7/G9v0nrQGfKr8wAQfMYzpSfLaKz6PPYwjpT1GFZbBc=
X-Received: by 2002:a37:4e05:: with SMTP id c5mr20963424qkb.232.1589291937401; 
 Tue, 12 May 2020 06:58:57 -0700 (PDT)
MIME-Version: 1.0
References: <6171889.DvuYhMxLoT@cherry> <3827671.e9J7NaK4W3@peach>
 <CAJ3okZ1AH-yJC1t634YiNUR09LVdv_dfmjnM+W9mZmd_0hkYTg@HIDDEN>
 <CAJ3okZ1QTgOB5Dqn4qR8A-Jrz0_Zkx5rJ247RFh5S6M6g06qbg@HIDDEN>
 <87mu6dcz8v.fsf@HIDDEN>
In-Reply-To: <87mu6dcz8v.fsf@HIDDEN>
From: zimoun <zimon.toutoune@HIDDEN>
Date: Tue, 12 May 2020 15:58:45 +0200
Message-ID: <CAJ3okZ0zP54Q8QXzepF9NNX3cLp5Yo0h_zedj4gbtmuaSeF4uQ@HIDDEN>
Subject: Re: bug#40549: More usability issues:
To: =?UTF-8?Q?Ludovic_Court=C3=A8s?= <ludo@HIDDEN>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 40549
Cc: 40549 <at> debbugs.gnu.org, Tom <tomz@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

On Tue, 12 May 2020 at 10:51, Ludovic Court=C3=A8s <ludo@HIDDEN> wrote:

> Nothing new here, and everything is properly documented.

Using optional argument with short-option names is unusual, AFAIK.
And for sure, there is an ambiguity; as we are seeing here. :-)
However, the only mention of that is in the commentaries of srfi-37.

--8<---------------cut here---------------start------------->8---
;;; `required-arg?' and `optional-arg?' are mutually exclusive
;;; booleans and indicate whether an argument must be or may be
;;; provided.  Besides the obvious, this affects semantics of
;;; short-options, as short-options with a required or optional
;;; argument cannot be followed by other short options in the same
;;; program-arguments string, as they will be interpreted collectively
;;; as the option's argument.
--8<---------------cut here---------------end--------------->8---

http://git.savannah.gnu.org/cgit/guile.git/tree/module/srfi/srfi-37.scm#n51


Well, using short-option with optional-argument is not recommended by
POSIX, neither GNU (if I understand well)

https://pubs.opengroup.org/onlinepubs/007904975/basedefs/xbd_chap12.html#ta=
g_12_02
https://www.gnu.org/software/libc/manual/html_node/Argument-Syntax.html


Therefore, it deserves to document it, IMHO.




Information forwarded to bug-guix@HIDDEN:
bug#40549; Package guix. Full text available.

Message received at 40549 <at> debbugs.gnu.org:


Received: (at 40549) by debbugs.gnu.org; 12 May 2020 13:03:36 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue May 12 09:03:36 2020
Received: from localhost ([127.0.0.1]:54541 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1jYUZJ-0007Mf-17
	for submit <at> debbugs.gnu.org; Tue, 12 May 2020 09:03:36 -0400
Received: from mail-qt1-f175.google.com ([209.85.160.175]:35401)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <zimon.toutoune@HIDDEN>) id 1jYUZH-0007MR-2X
 for 40549 <at> debbugs.gnu.org; Tue, 12 May 2020 09:03:31 -0400
Received: by mail-qt1-f175.google.com with SMTP id x8so10801521qtr.2
 for <40549 <at> debbugs.gnu.org>; Tue, 12 May 2020 06:03:31 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
 h=mime-version:from:date:message-id:subject:to:cc
 :content-transfer-encoding;
 bh=JHDIHVTlqc4ijzORcdVJZSXIK0VSQL2BVm5GyRQUD6M=;
 b=NEiXKKMt7Ng4tsv58XTxumJo/2LJXHWJlnmfJwSsVKCQn8lK4iDSAZ/76RYOrI1Oe9
 Zjqk+5fbu+UhwkKDhhMp2bn3QKld3pSbOO1P6G3kuSObuLo2dpUx1RxkZps4n11K9GrM
 e+XAIHzFHFvT+1Ih8Ej5p3Rnig1D3qIoXJba/zwWvztsnlE8mQ/Kzv+ZiGdKlmg8YZmd
 e9f8uf8SLA9ibqtsAWC15lUU20m/b+HEOMiXuUP+p1ViCRRtU0YNytyu+NdzFOKy40o5
 fldjN59Fz8D0RKdYQVHnxcGcm8WJBuA2vbLPCnsmOHwRAz2sneCZxzvJBISELLeTp2ow
 3dxw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:mime-version:from:date:message-id:subject:to:cc
 :content-transfer-encoding;
 bh=JHDIHVTlqc4ijzORcdVJZSXIK0VSQL2BVm5GyRQUD6M=;
 b=Jyi/D+XhTyzuaPARMme0q4wvZwtPCfv/VGOoy9ipTs3aOPasAESvCYMpkT6jaFT8eS
 MNNZzvoEIwHu+7CtcuKWrpFBGbZ7Aj2kpmC1V3dWuy3Z5e94zrBS0wRAlffQySu6fGEC
 6Gd7vaKkZvJEMiXtlhGTnqU8npNaPQO5mv/ZNis8P6jWGR8YEdDHltvYH3JlHbzUlOyJ
 ZLk+tgLFwYIM1MZfzTuPmyHxbS2NTI4A69xmwWncQRtXhDeNLxlf85sXIYgAcmkLXRcc
 2v2yL0sWRMz9QupFSKbIQfa0g1B/MBrZ9m5BxeZisJMYq0sT2I0zmxBlJmd2T4yId2EA
 1oeQ==
X-Gm-Message-State: AGi0PuaXZ0YhZLHghe921J0kSvrw5WfaYZ1lp2eCuSPowjAwpb8tZGrB
 fP0ztZVP0iV6P750ka30QPge5Oz0XaaBvs5x+oujHY2I
X-Google-Smtp-Source: APiQypI2ilctpUh3XYQmEfwurmNkv5XAZ2TL00oYSo1vHLxNVvYE6eJNrSfJM8GOCijds5M3cp2XPgRtFD1GJPxJYos=
X-Received: by 2002:ac8:5047:: with SMTP id h7mr16915721qtm.186.1589288605292; 
 Tue, 12 May 2020 06:03:25 -0700 (PDT)
MIME-Version: 1.0
From: zimoun <zimon.toutoune@HIDDEN>
Date: Tue, 12 May 2020 15:03:14 +0200
Message-ID: <CAJ3okZ1C1RkAGCBX-pjYmVyuM6YaZKWQQYCM9iyCWoFiQmEMPw@HIDDEN>
Subject: proposal for 'process-actions'
To: 40549 <at> debbugs.gnu.org
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 40549
Cc: =?UTF-8?Q?Ludovic_Court=C3=A8s?= <ludo@HIDDEN>, Tom <tomz@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

Hi again, :-)

On Tue, 12 May 2020 at 12:38, zimoun <zimon.toutoune@HIDDEN> wrote:

> > We=E2=80=99ll need to check exactly what will behave differently.  If t=
he tests
> > don=E2=80=99t catch anything, I think we=E2=80=99re fine.  Most likely,=
 we=E2=80=99re talking
> > about corner cases like =E2=80=98-S x -d y=E2=80=99, which probably ver=
y few people
> > tried.
>
> Ok, on this light, let first point the corner cases.

The only corner cases are the '%actions' (roll-back,
delete-generation, switch-generation).  There are processed in
reversed order as they appear on the command-line -- because
'for-each' and 'assoc-ref'.

However, the transaction plan is always the same:
 step0 process %actions
 step1 remove
 step2 install
 step3 manifest

Therefore, I propose to split the 'for-each' on '%actions' into fixed
steps, such as the transaction always happens using this plan:

 1. roll-back
 2. switch-generation
 3. delete-generation
 4. remove
 5. install
 6 manifest

On one hand, it reduces the "power" of combining '-S', '-d' and
'--roll-back'.  On the other hand, it enforces commutativity which is
somehow what we want a transaction to be.

If yes, I can come up with a patch.


All the best,
simon




Information forwarded to bug-guix@HIDDEN:
bug#40549; Package guix. Full text available.

Message received at 40549 <at> debbugs.gnu.org:


Received: (at 40549) by debbugs.gnu.org; 12 May 2020 11:35:23 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue May 12 07:35:23 2020
Received: from localhost ([127.0.0.1]:54415 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1jYTBz-0002xU-At
	for submit <at> debbugs.gnu.org; Tue, 12 May 2020 07:35:23 -0400
Received: from mail-qk1-f195.google.com ([209.85.222.195]:36339)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <zimon.toutoune@HIDDEN>) id 1jYTBx-0002xD-3T
 for 40549 <at> debbugs.gnu.org; Tue, 12 May 2020 07:35:22 -0400
Received: by mail-qk1-f195.google.com with SMTP id y22so488106qki.3
 for <40549 <at> debbugs.gnu.org>; Tue, 12 May 2020 04:35:21 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
 h=mime-version:references:in-reply-to:from:date:message-id:subject:to
 :cc; bh=5CdjpwHg0akNOKPYxAZVBC/fBhTl6iZfT6OTU9uOnC0=;
 b=NbcTSv7tSKvF1sYHLVT28Jt2Ly90MmMUcdJCIC6RvVsU/zamE0EpH5oxEX0wODTM6X
 qyt9Z67ZQG5t2iGQyEwIq2dmVA1UwKBryfggRhI1nfugpRiImMivFXPTSptAm/jOFzFZ
 2hmiffsHhKLl5XhJzxrkk4cgG4ZaK9PFCFqZnrjsbUO1n4tyBgqKT619smzFY3Cc+77U
 1l0wQBYg6ShYFGNJEo9o6QQ1LHqO/XT+EqWVvwKGZ01lM3xlUu3hM27l9IEk9emRm9p6
 1hUWbvEgzjPA9CAx4XDQxQnNV84RO2Ydgl5qK90awdT2iDKnKxHJ3tDy3bZd+kpixFs2
 w0zQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:mime-version:references:in-reply-to:from:date
 :message-id:subject:to:cc;
 bh=5CdjpwHg0akNOKPYxAZVBC/fBhTl6iZfT6OTU9uOnC0=;
 b=ruR+SlsCDXWKMCRxhcfrS/oIp4SI+iNzonm2xKVDyuO/HQZWHOUAkWiVOjq4sJxkhi
 5DIz9S4a0R24lNHFkd13Y1L5SG8BmaZPjIzhOUjOKZHjSy0a5hXPNNTu0jPgOf6TDbTI
 hezktQgNP+mxcp+yEyldIyoDHnUx96/1bgTtTFg/t9USBLFk5rdDk7nkOO+tueDyhoJP
 kjJy15kM2muirKAJ4Tkh5/c3VOYVgHBwy8IlGv9iFUP7Ri3CxzQgUahjBt0LdVpLHn7S
 5pLWN+ykZIsuuKMJxzxx5mfXETtBW1v5qG9iCSP0K5Ed41wQWHXFnX0MagIPWQUYOa+G
 8uJA==
X-Gm-Message-State: AGi0Puag0GOUagofr/jTMHPzFSdvrufvNh8w/x2nv5A5UClBCbkX63Wj
 MjC97BUxBCtSOkjtWNYsIHFNS7d/XK7BbVGihll4oKgg
X-Google-Smtp-Source: APiQypKrMUkf/r6YBUhes2t8NHRGNu55+x+igjxv5nXT3qnoLdta0cU5x4kjeuzIL3aE+8cQoYiBw/Lq8UQwZq/jNyw=
X-Received: by 2002:a37:96c4:: with SMTP id
 y187mr20795382qkd.126.1589283315465; 
 Tue, 12 May 2020 04:35:15 -0700 (PDT)
MIME-Version: 1.0
References: <6171889.DvuYhMxLoT@cherry>
 <CAJ3okZ1QTgOB5Dqn4qR8A-Jrz0_Zkx5rJ247RFh5S6M6g06qbg@HIDDEN>
 <87mu6dcz8v.fsf@HIDDEN> <5652466.lOV4Wx5bFT@cherry>
In-Reply-To: <5652466.lOV4Wx5bFT@cherry>
From: zimoun <zimon.toutoune@HIDDEN>
Date: Tue, 12 May 2020 13:35:04 +0200
Message-ID: <CAJ3okZ0wZTqKAoC8ZJt=G67Mm0zBRE=n08B9r71irYkYLfnDWg@HIDDEN>
Subject: Re: bug#40549: More usability issues:
To: Tom Zander <tomz@HIDDEN>
Content-Type: text/plain; charset="UTF-8"
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 40549
Cc: 40549 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

On Tue, 12 May 2020 at 11:55, Tom Zander via Bug reports for GNU Guix
<bug-guix@HIDDEN> wrote:

> the bugreport is a usability bug which stems from the fact that the command
> line parser behaves differently from every single other commandline parser
> average people like me have ever used.
>
> A near 100% of the command line tools on your Gnu/Linux box will behave
> differently than guix does now.
>
> C apps using libc, python apps using their parser, even C++ apps using the Qt
> commandline classes, all are generally compatible with regards to behavior.
>
> Only Guix is different.

Could you provide concrete examples?  Other than "guix package"?
And other than short-option with optional argument?




Information forwarded to bug-guix@HIDDEN:
bug#40549; Package guix. Full text available.

Message received at 40549 <at> debbugs.gnu.org:


Received: (at 40549) by debbugs.gnu.org; 12 May 2020 10:39:09 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue May 12 06:39:09 2020
Received: from localhost ([127.0.0.1]:54333 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1jYSJY-0007rr-Qg
	for submit <at> debbugs.gnu.org; Tue, 12 May 2020 06:39:09 -0400
Received: from mail-qv1-f47.google.com ([209.85.219.47]:40048)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <zimon.toutoune@HIDDEN>) id 1jYSJX-0007rV-KG
 for 40549 <at> debbugs.gnu.org; Tue, 12 May 2020 06:39:08 -0400
Received: by mail-qv1-f47.google.com with SMTP id l3so763752qvo.7
 for <40549 <at> debbugs.gnu.org>; Tue, 12 May 2020 03:39:07 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
 h=mime-version:references:in-reply-to:from:date:message-id:subject:to
 :cc:content-transfer-encoding;
 bh=8gLfvs8yvVe7J5uZEX4iYAdHPqkjKOGLrgAXy40Pvy0=;
 b=M1ko82jVJvQd3xbf/mxfkF3wj/kvAk4zi0x0csG4AMKs866SftlPwgfMe6QOMfGgXy
 1Bf2QsjE2v4ZVKR9JzX8drz5C4UvbBGhxuhaLRHnRq1J2g8QbPKU6cv538lIjsYxYUTx
 i2062S7zZ7a0Y68kXBCapiUWhoJsA0xt0Y/jU3i6v9XEU9EM9QGBBsmMFzYXt1kHDtH9
 IEShkNEwDzjI9Yu562NiwPB8xtNI4rI1BjUP7juPhrB005/HEgeruY+lUtCvuIH8igjC
 sRg7DkB/Hgd5GTaepXVEbNdylnm+YjruX3NkSaxWCBA3Ynm7bAFG5hxxepm/EGsmkqdA
 fXAQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:mime-version:references:in-reply-to:from:date
 :message-id:subject:to:cc:content-transfer-encoding;
 bh=8gLfvs8yvVe7J5uZEX4iYAdHPqkjKOGLrgAXy40Pvy0=;
 b=TC2gKFf/QMCFSyr6OSDFqkMUwFoBS/56tJLXdMy7CR9aA7Slxv7WLuUZvzMKOIYfe1
 zYtUgb0jBXZCePOYut9Pq2rIMN0Eyjug+OuIFdGqcd5JW8R9pBEecMoq6EFwzOyIcWsY
 5bmRRbF4dR2YQVtWStH4B5ApFiButy4EZ0g5bxahNS9AfT4oU4VLGa8BISV6rytUjyit
 GjrvblDqqUg+0/wktMbkwIn/7aN8HdUiqQkTXujNqrJXJzUkQMAX+MqoHSpu/OveOJuh
 Z2Fg3xz+dA0X3crNGU//R/W1hBJyty8mvPL1tezGgLljT8HRKiTDWjmZX9UtKRK6lPoL
 df6w==
X-Gm-Message-State: AGi0PuYV7wxeWs9Jna5dCkgEk3/h2uRMAYu7JvXvs97AmszzWWZ4O4Y+
 5b3qMB3hmmMsfx0nw9hix0+ehfsh/p7r8gt0F3E=
X-Google-Smtp-Source: APiQypLuy+0u3WQnSf9iuF4BswervZ7kSt30EzHH8DyNjAs7W5lIBupRIUeXiwcFiv/rkcYAbaKCdz8wyEPW+4uIwFs=
X-Received: by 2002:ad4:4c92:: with SMTP id bs18mr20177778qvb.67.1589279941747; 
 Tue, 12 May 2020 03:39:01 -0700 (PDT)
MIME-Version: 1.0
References: <6171889.DvuYhMxLoT@cherry> <3827671.e9J7NaK4W3@peach>
 <CAJ3okZ1AH-yJC1t634YiNUR09LVdv_dfmjnM+W9mZmd_0hkYTg@HIDDEN>
 <CAJ3okZ1QTgOB5Dqn4qR8A-Jrz0_Zkx5rJ247RFh5S6M6g06qbg@HIDDEN>
 <87mu6dcz8v.fsf@HIDDEN>
In-Reply-To: <87mu6dcz8v.fsf@HIDDEN>
From: zimoun <zimon.toutoune@HIDDEN>
Date: Tue, 12 May 2020 12:38:50 +0200
Message-ID: <CAJ3okZ3=Qk6Xa9ZBC70mo=62b-KGnu9DnzNC8QqW-fxJW8rSoQ@HIDDEN>
Subject: Re: bug#40549: More usability issues:
To: =?UTF-8?Q?Ludovic_Court=C3=A8s?= <ludo@HIDDEN>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 40549
Cc: 40549 <at> debbugs.gnu.org, Tom <tomz@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

Hi Ludo,

Sorry, I am not compliant and reorder your quotes to ease the
discussion -- from my point of view. :-)


On Tue, 12 May 2020 at 10:51, Ludovic Court=C3=A8s <ludo@HIDDEN> wrote:

> However (srfi srfi-37) does it as we see it now.  Fixing it would mean
> implementing a different option parser.

Yes or add a lot of complexity.
Both appears to me wrong.  Such corner cases do not deserve one or the othe=
r.


> I think there are option parsers that =E2=80=9Ccorrectly=E2=80=9D deal wi=
th the
> ambiguity that arises for instance with =E2=80=9C-I -p foo=E2=80=9D (is =
=E2=80=98-p=E2=80=99 the
> argument to =E2=80=98-I=E2=80=99 or something else?).  Perhaps libc=E2=80=
=99s argp does it
> right.

I have never deeply dove into srfi-37 and 'option' but from my
understanding, it is not possible.  Somehow, the issue comes from
srfi-37 and srfi-37 should consider that if an argument starts with
dash, then it is not an argument and turn it into an option.


> Nothing new here, and everything is properly documented.

I am not sure.  The manual says, for example:

--8<---------------cut here---------------start------------->8---
=E2=80=98--list-installed[=3DREGEXP]=E2=80=99
=E2=80=98-I [REGEXP]=E2=80=99
     List the currently installed packages in the specified profile,
     with the most recently installed packages shown last.  When REGEXP
     is specified, list only installed packages whose name matches
     REGEXP.
--8<---------------cut here---------------end--------------->8---

which is somehow inaccurate.  The REGEXP is not optional for the short
option '-I'.  And that's true for all the short options with optional
argument, if I understand correctly.  For example, "guix package -d -p
/path/to/profile" fails.


Moreover, the distinction between 'action' and 'query' is already
stated so why not underline that composing actions make sense
(transaction) but composing query not?


> > However, main of us are used to read from left to right so it seems
> > more natural to write:
> >
> >     guix package --action1 --action2  # (a)
> > than
> >     guix package --action2 --action1  # (b)
> >
> > in other words, the fix should be to simply 'reverse opts' and the CLI
> > will read (a) instead of the current (b).  My only concern is about
> > backward compatibility.
>
> We=E2=80=99ll need to check exactly what will behave differently.  If the=
 tests
> don=E2=80=99t catch anything, I think we=E2=80=99re fine.  Most likely, w=
e=E2=80=99re talking
> about corner cases like =E2=80=98-S x -d y=E2=80=99, which probably very =
few people
> tried.

Ok, on this light, let first point the corner cases.


All the best,
simon




Information forwarded to bug-guix@HIDDEN:
bug#40549; Package guix. Full text available.

Message received at 40549 <at> debbugs.gnu.org:


Received: (at 40549) by debbugs.gnu.org; 12 May 2020 09:54:40 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue May 12 05:54:40 2020
Received: from localhost ([127.0.0.1]:54296 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1jYRcV-0006bw-W8
	for submit <at> debbugs.gnu.org; Tue, 12 May 2020 05:54:40 -0400
Received: from mx.kolabnow.com ([95.128.36.40]:25544)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <tomz@HIDDEN>) id 1jYRcU-0006bX-6Q
 for 40549 <at> debbugs.gnu.org; Tue, 12 May 2020 05:54:39 -0400
Received: from localhost (unknown [127.0.0.1])
 by ext-mx-out003.mykolab.com (Postfix) with ESMTP id B59D8404BC
 for <40549 <at> debbugs.gnu.org>; Tue, 12 May 2020 11:54:31 +0200 (CEST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freedommail.ch;
 h=content-type:content-type:content-transfer-encoding
 :mime-version:references:in-reply-to:message-id:date:date
 :subject:subject:from:from:received:received:received; s=
 dkim20160331; t=1589277271; x=1591091672; bh=QvkIXp1Zq+LXGRriMrh
 XiETs/HWXX60ghHlzgJqCscM=; b=uQs+magaHNNtdTEp0KDDqIwkhSMuonm+Di7
 Rp8v7N2241TO3nRSPzrazv6NpdCwXENzBJtI9kPVMJKxejfreJl3oY/5i/2ePAhv
 EZyOXgWo+VIq9JNEjk9d74orHCv40Hm1podHo42gGggxFDJwSXc5ouaqDgV+8p3c
 oN906kRefaQyndQRjZS525MP3HELOa1Vn11oV+Qo/nUOiHwt19kx0SXQ/b2kBPW+
 qu2DrvfKkbFHZ4HkhW9Pd7/Zg/eFtIci1NjeV+XGFfGHEPV655xDZIcaQImkW3/b
 Leq0M+GznTjnP3Jwgd4mWBoCEPHbZJE1DnoOC2pc/S6PwTgoSM0p0ceNXlwitvby
 vHGnsczSYpSbQhRK0GZmw5ADktcJ3wZyqc1i3QfV9vzwM1NfeBsDVdCzTCZGlf6F
 S+z0/njZWbpTGa7FDdglPEStqDxxHDr1hpUVr+8ICpOf41Tnv6VYIefvG6GBZZ1I
 EmNbq4UQKfQM/jN1Rdombc4OVRpOv5xs5Su+TUZ6IoCbUo5O5i/AUmQo+B2X+lAG
 9xdxJtY86OqxDWxtKf9aM++aW+un+BgF+FS1ELFK/6voxse5jM4fyfr2CMa847IK
 4nP273EmgmqxQACLlq7XqE0wvTWqM8lav3tlFksTetYq5MGBrqmUkTcGdGBOKy2I
 vkXXSQv4=
X-Virus-Scanned: amavisd-new at mykolab.com
X-Spam-Flag: NO
X-Spam-Score: -1.9
X-Spam-Level: 
X-Spam-Status: No, score=-1.9 tagged_above=-10 required=5
 tests=[BAYES_00=-1.9] autolearn=ham autolearn_force=no
Received: from mx.kolabnow.com ([127.0.0.1])
 by localhost (ext-mx-out003.mykolab.com [127.0.0.1]) (amavisd-new, port 10024)
 with ESMTP id Vsdo8mlkN2EY for <40549 <at> debbugs.gnu.org>;
 Tue, 12 May 2020 11:54:31 +0200 (CEST)
Received: from int-mx001.mykolab.com (unknown [10.9.13.1])
 by ext-mx-out003.mykolab.com (Postfix) with ESMTPS id 4483940439
 for <40549 <at> debbugs.gnu.org>; Tue, 12 May 2020 11:54:31 +0200 (CEST)
Received: from ext-subm003.mykolab.com (unknown [10.9.6.3])
 by int-mx001.mykolab.com (Postfix) with ESMTPS id 02AB2216
 for <40549 <at> debbugs.gnu.org>; Tue, 12 May 2020 11:54:30 +0200 (CEST)
From: Tom Zander <tomz@HIDDEN>
To: 40549 <at> debbugs.gnu.org
Subject: Re: bug#40549: More usability issues:
Date: Tue, 12 May 2020 11:54:29 +0200
Message-ID: <5652466.lOV4Wx5bFT@cherry>
In-Reply-To: <87mu6dcz8v.fsf@HIDDEN>
References: <6171889.DvuYhMxLoT@cherry>
 <CAJ3okZ1QTgOB5Dqn4qR8A-Jrz0_Zkx5rJ247RFh5S6M6g06qbg@HIDDEN>
 <87mu6dcz8v.fsf@HIDDEN>
MIME-Version: 1.0
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain; charset="iso-8859-1"
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 40549
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

On dinsdag 12 mei 2020 10:51:28 CEST Ludovic Court=E8s wrote:
> Nothing new here, and everything is properly documented.

The bugreport was not about a disconnect between documentation and the tool,

the bugreport is a usability bug which stems from the fact that the command=
=20
line parser behaves differently from every single other commandline parser=
=20
average people like me have ever used.

A near 100% of the command line tools on your Gnu/Linux box will behave=20
differently than guix does now.

C apps using libc, python apps using their parser, even C++ apps using the =
Qt=20
commandline classes, all are generally compatible with regards to behavior.

Only Guix is different.

> However (srfi srfi-37) does it as we see it now.  Fixing it would mean
> implementing a different option parser.

Then fix that parser. It is inconsistent with the rest of the world and as =
long=20
as it is end-user-facing this inconsistency is a usability bug. A rather=20
massive one, I might say as this is about as core to the user-interaction o=
f=20
the platform as it can get.

=2D-=20
Tom Zander






Information forwarded to bug-guix@HIDDEN:
bug#40549; Package guix. Full text available.

Message received at 40549 <at> debbugs.gnu.org:


Received: (at 40549) by debbugs.gnu.org; 12 May 2020 08:51:38 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue May 12 04:51:38 2020
Received: from localhost ([127.0.0.1]:54119 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1jYQdV-0004qC-Sq
	for submit <at> debbugs.gnu.org; Tue, 12 May 2020 04:51:38 -0400
Received: from eggs.gnu.org ([209.51.188.92]:33712)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <ludo@HIDDEN>) id 1jYQdU-0004px-ER
 for 40549 <at> debbugs.gnu.org; Tue, 12 May 2020 04:51:36 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e]:36066)
 by eggs.gnu.org with esmtp (Exim 4.90_1)
 (envelope-from <ludo@HIDDEN>)
 id 1jYQdO-0003de-By; Tue, 12 May 2020 04:51:30 -0400
Received: from [2a01:e0a:1d:7270:af76:b9b:ca24:c465] (port=40928 helo=ribbon)
 by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256)
 (Exim 4.82) (envelope-from <ludo@HIDDEN>)
 id 1jYQdO-0005qk-0q; Tue, 12 May 2020 04:51:30 -0400
From: =?utf-8?Q?Ludovic_Court=C3=A8s?= <ludo@HIDDEN>
To: zimoun <zimon.toutoune@HIDDEN>
Subject: Re: bug#40549: More usability issues:
References: <6171889.DvuYhMxLoT@cherry> <3827671.e9J7NaK4W3@peach>
 <CAJ3okZ1AH-yJC1t634YiNUR09LVdv_dfmjnM+W9mZmd_0hkYTg@HIDDEN>
 <CAJ3okZ1QTgOB5Dqn4qR8A-Jrz0_Zkx5rJ247RFh5S6M6g06qbg@HIDDEN>
X-URL: http://www.fdn.fr/~lcourtes/
X-Revolutionary-Date: 24 =?utf-8?Q?Flor=C3=A9al?= an 228 de la =?utf-8?Q?R?=
 =?utf-8?Q?=C3=A9volution?=
X-PGP-Key-ID: 0x090B11993D9AEBB5
X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc
X-PGP-Fingerprint: 3CE4 6455 8A84 FDC6 9DB4  0CFB 090B 1199 3D9A EBB5
X-OS: x86_64-pc-linux-gnu
Date: Tue, 12 May 2020 10:51:28 +0200
In-Reply-To: <CAJ3okZ1QTgOB5Dqn4qR8A-Jrz0_Zkx5rJ247RFh5S6M6g06qbg@HIDDEN>
 (zimoun's message of "Tue, 12 May 2020 02:27:03 +0200")
Message-ID: <87mu6dcz8v.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 40549
Cc: 40549 <at> debbugs.gnu.org, Tom <tomz@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

Hi,

zimoun <zimon.toutoune@HIDDEN> skribis:

>> --8<---------------cut here---------------start------------->8---> # OK
>>  guix package --list-generations -p /path/to/profile
>>  guix package --list-installed -p /path/to/profile
>>
>> # KO
>>  guix package -l -p /path/to/profile
>>  guix package -I -p /path/to/profile
>>
>> # OK
>>  guix package -p /path/to/profile -l
>>  guix package -p /path/to/profile -I
>>
>> # KO
>>  guix package -l --profile=3D/path/to/profile
>>
>> # Do nothing
>>  guix package -I --profile=3D/path/to/profile
>>
>> # OK
>>  guix package -l --profile=3D/path/to/profile -l
>>  guix package -I --profile=3D/path/to/profile -I
>> --8<---------------cut here---------------end--------------->8---
>
> All are expected too.
> Same reason.  And the long option works because no argument is
> provided by '=3D' so it fallback to the default one "".
> Short options expect an argument so read the next characters as the
> value or fallback to the default one "" when there is no next
> character.
>
> Fixing this will add complexity on parsing 'args' when building
> 'opts'.  Basically, "guix package -I -p /path/tp/profile" returns an
> error because the short option '-I' expect only one argument, read
> '-p' and then Guix cannot deals with the option '/path/to/profile' and
> so raises an error. See the dance with 'handle-argument' and
> 'arg-handler'.  And "guix package -I '' -p /path/to/profile' works,
> obviously.  Well, the extra quotes ('') is annoying but I am not
> convince that better could be done for short options -- regardless the
> order of CLI arguments.

Nothing new here, and everything is properly documented.

I think there are option parsers that =E2=80=9Ccorrectly=E2=80=9D deal with=
 the
ambiguity that arises for instance with =E2=80=9C-I -p foo=E2=80=9D (is =E2=
=80=98-p=E2=80=99 the
argument to =E2=80=98-I=E2=80=99 or something else?).  Perhaps libc=E2=80=
=99s argp does it
right.

However (srfi srfi-37) does it as we see it now.  Fixing it would mean
implementing a different option parser.

> Why (a) works and (b) not?  Because the command-line is transformed
> into an alist.  And this alist is built reading the command-line from
> right to left.  Therefore, if you are on the generation 18 and you try
> to delete it, Guix raises an error which seems expected.  The second
> one (b) works because first you switch and then you delete.
>
> Well, that's said, IMHO, two options:
>
>  1) the order of CLI does not matter;
>  2) the order of CLI matters.
>
> Well, the order of 'actions' necessary matters as it is seen with this
> example: "switch and then delete" does not end in the same state than
> "delete and then switch".  Welcome in the classical mess of imperative
> package manager. ;-)
> Therefore, I am not convinced that something should be fixed.  It
> comes from the very nature of 'actions': actions is not always
> commutative.  Otherwise the best is to forbid to provide several
> actions with the same transaction; which seems a bad idea -- at least
> for me.

Right, but at least we could reverse the list returned by =E2=80=98args-fol=
d=E2=80=99.

> However, main of us are used to read from left to right so it seems
> more natural to write:
>
>     guix package --action1 --action2  # (a)
> than
>     guix package --action2 --action1  # (b)
>
> in other words, the fix should be to simply 'reverse opts' and the CLI
> will read (a) instead of the current (b).  My only concern is about
> backward compatibility.

We=E2=80=99ll need to check exactly what will behave differently.  If the t=
ests
don=E2=80=99t catch anything, I think we=E2=80=99re fine.  Most likely, we=
=E2=80=99re talking
about corner cases like =E2=80=98-S x -d y=E2=80=99, which probably very fe=
w people
tried.

Thanks,
Ludo=E2=80=99.




Information forwarded to bug-guix@HIDDEN:
bug#40549; Package guix. Full text available.

Message received at 40549 <at> debbugs.gnu.org:


Received: (at 40549) by debbugs.gnu.org; 12 May 2020 00:27:21 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon May 11 20:27:21 2020
Received: from localhost ([127.0.0.1]:53674 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1jYIlU-00006A-L8
	for submit <at> debbugs.gnu.org; Mon, 11 May 2020 20:27:21 -0400
Received: from mail-qv1-f52.google.com ([209.85.219.52]:33489)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <zimon.toutoune@HIDDEN>) id 1jYIlT-00005w-R7
 for 40549 <at> debbugs.gnu.org; Mon, 11 May 2020 20:27:20 -0400
Received: by mail-qv1-f52.google.com with SMTP id ep1so5617618qvb.0
 for <40549 <at> debbugs.gnu.org>; Mon, 11 May 2020 17:27:19 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
 h=mime-version:references:in-reply-to:from:date:message-id:subject:to
 :cc; bh=Pa25E2TMPyz/EKsc+RnmouzavvgSICXxQh+FY8h6K1U=;
 b=qmzi4im56pKJSCsLdLzj+uHaMNwt4MNHhaPgNkMjwxtq2YUftblIuSm2wLpnTFpcqh
 6roVXozGHwg6q6PfgDTYxtcif+3ouuQib/2M0w4RtiuLNeZ6UkmNusNaqd89+pV0jhmf
 uRekAFQOZ5KMBq6K8QqcBnALlG4b0N3xnXNHCxG0lIgDhe7v04Jo2V/koDJc+6dM8szU
 sUH66K87+IPZtebmZ1lJPb1o+8KJsp8i0+mgkonzDxtjym+UE1UL8LcUVvmmQd6vhWVo
 FIzsryAhbzMNvI/hMsHe0z9VmUD1AcCF7rcz8q3WCzBnVyb9nOYud7jQglykBUkzyjZE
 F4Rw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:mime-version:references:in-reply-to:from:date
 :message-id:subject:to:cc;
 bh=Pa25E2TMPyz/EKsc+RnmouzavvgSICXxQh+FY8h6K1U=;
 b=Xk2i3UEE/Oo6ORjDVc/iiJmHnH7nsx2z8il2FPgu/7YZwfMAmIY4DMZD+E6m0cj4gb
 qTsLDzRQ+2iuYXgl526AstFafR2Y0xzitCQH4qUJ0cx/J7+SqqPZSj1nc3bBiCq7BAWo
 ubEIM59aLupREiSfjNcSI1I3UWPo04zUyTdnsHrLjsvL33GQkyjxhHpv1Ix2QhmP/2WK
 OgIOGGfDPUcnEGWmB9Jt6veGN4D5oY6CR8VndaFM86rO6VYncljASYqG1LI6z0ue9GL7
 et+/5NDJ08XKGgStzkqMs2A6G1IlRT4cNqt6NoAxA3derAKwCAjSf8jbyFsM2OzBQKEC
 QlaA==
X-Gm-Message-State: AGi0PuZfeGIWYFNV4YmAPcBBDSr1TAuYVmV8e7ZUWqfvjf5sPPBDBQUj
 kkrIHJ/JxE9MJTxkf6TUPlJOLISyf24tZAbn+2s=
X-Google-Smtp-Source: APiQypITibiLiewIGG8A+sW/0P7x6mTTBl3oxq2WPGfMQia0NWoUbpuU9RjEM9gxIiewRtLclZIGZkqjp8YGEv2XEpc=
X-Received: by 2002:ad4:4c92:: with SMTP id bs18mr18403353qvb.67.1589243234209; 
 Mon, 11 May 2020 17:27:14 -0700 (PDT)
MIME-Version: 1.0
References: <6171889.DvuYhMxLoT@cherry> <3827671.e9J7NaK4W3@peach>
 <CAJ3okZ1AH-yJC1t634YiNUR09LVdv_dfmjnM+W9mZmd_0hkYTg@HIDDEN>
In-Reply-To: <CAJ3okZ1AH-yJC1t634YiNUR09LVdv_dfmjnM+W9mZmd_0hkYTg@HIDDEN>
From: zimoun <zimon.toutoune@HIDDEN>
Date: Tue, 12 May 2020 02:27:03 +0200
Message-ID: <CAJ3okZ1QTgOB5Dqn4qR8A-Jrz0_Zkx5rJ247RFh5S6M6g06qbg@HIDDEN>
Subject: Re: bug#40549: More usability issues:
To: Tom <tomz@HIDDEN>
Content-Type: text/plain; charset="UTF-8"
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 40549
Cc: =?UTF-8?Q?Ludovic_Court=C3=A8s?= <ludo@HIDDEN>, 40549 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

TLDR: there is no "real" bug. :-)
Just a choice to do and document it.


On Fri, 24 Apr 2020 at 10:28, zimoun <zimon.toutoune@HIDDEN> wrote:

>   guix package -I -A # does nothing
>   guix package -A -I # list available

Expected.

First line, -I -A' means that '-A' is seen as an argument for '-I'.
Idem for the second line '-A -I', i.e., '-I' is seen as an argument for '-A'.

> --8<---------------cut here---------------start------------->8---> # OK
>  guix package --list-generations -p /path/to/profile
>  guix package --list-installed -p /path/to/profile
>
> # KO
>  guix package -l -p /path/to/profile
>  guix package -I -p /path/to/profile
>
> # OK
>  guix package -p /path/to/profile -l
>  guix package -p /path/to/profile -I
>
> # KO
>  guix package -l --profile=/path/to/profile
>
> # Do nothing
>  guix package -I --profile=/path/to/profile
>
> # OK
>  guix package -l --profile=/path/to/profile -l
>  guix package -I --profile=/path/to/profile -I
> --8<---------------cut here---------------end--------------->8---

All are expected too.
Same reason.  And the long option works because no argument is
provided by '=' so it fallback to the default one "".
Short options expect an argument so read the next characters as the
value or fallback to the default one "" when there is no next
character.

Fixing this will add complexity on parsing 'args' when building
'opts'.  Basically, "guix package -I -p /path/tp/profile" returns an
error because the short option '-I' expect only one argument, read
'-p' and then Guix cannot deals with the option '/path/to/profile' and
so raises an error. See the dance with 'handle-argument' and
'arg-handler'.  And "guix package -I '' -p /path/to/profile' works,
obviously.  Well, the extra quotes ('') is annoying but I am not
convince that better could be done for short options -- regardless the
order of CLI arguments.

One solution should be add short options as '-AA' or '-II' for such
cases.  But I am not convince that such "weird" combination deserves
such attention. :-)


Back to the initial report:

 (a) guix package -S 17 -d 18 # KO
 (b) guix package -d 18 -S 17 # OK

This is not the same issue than the one described previously.  Here
the culprit is 'process-actions'.  And composing "action" seems more
than legitimate (composing "query" is questionable).

Why (a) works and (b) not?  Because the command-line is transformed
into an alist.  And this alist is built reading the command-line from
right to left.  Therefore, if you are on the generation 18 and you try
to delete it, Guix raises an error which seems expected.  The second
one (b) works because first you switch and then you delete.

Well, that's said, IMHO, two options:

 1) the order of CLI does not matter;
 2) the order of CLI matters.

Well, the order of 'actions' necessary matters as it is seen with this
example: "switch and then delete" does not end in the same state than
"delete and then switch".  Welcome in the classical mess of imperative
package manager. ;-)
Therefore, I am not convinced that something should be fixed.  It
comes from the very nature of 'actions': actions is not always
commutative.  Otherwise the best is to forbid to provide several
actions with the same transaction; which seems a bad idea -- at least
for me.


However, main of us are used to read from left to right so it seems
more natural to write:

    guix package --action1 --action2  # (a)
than
    guix package --action2 --action1  # (b)

in other words, the fix should be to simply 'reverse opts' and the CLI
will read (a) instead of the current (b).  My only concern is about
backward compatibility.


My opinion based on backward compatibility argument is: let as it is
and document it in the manual.

WDYT?


All the best,
simon




Information forwarded to bug-guix@HIDDEN:
bug#40549; Package guix. Full text available.

Message received at 40549 <at> debbugs.gnu.org:


Received: (at 40549) by debbugs.gnu.org; 24 Apr 2020 08:29:09 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Apr 24 04:29:09 2020
Received: from localhost ([127.0.0.1]:56399 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1jRtht-0003GI-6S
	for submit <at> debbugs.gnu.org; Fri, 24 Apr 2020 04:29:09 -0400
Received: from mail-qt1-f172.google.com ([209.85.160.172]:37014)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <zimon.toutoune@HIDDEN>) id 1jRthq-0003Fs-Sh
 for 40549 <at> debbugs.gnu.org; Fri, 24 Apr 2020 04:29:07 -0400
Received: by mail-qt1-f172.google.com with SMTP id k12so7268587qtm.4
 for <40549 <at> debbugs.gnu.org>; Fri, 24 Apr 2020 01:29:06 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
 h=mime-version:references:in-reply-to:from:date:message-id:subject:to
 :cc; bh=6NAh66rDgaz386jxrdL1SvKM2xP8ixndDd0LudsX8jA=;
 b=Dpehmchfqv0q1kvuImU4saWzEqLTiFCmtabp5HBVrDLmb4B8d7Z+V3fcuDCdRn5tVU
 5TiVeuOvakdACQgudxOsG4eJNmIa/GyRY/OXZBIYAhfVy7KgX8b5qUpbBZZkNEsp91b0
 +p4fAppxA9rxlL/CCc/U2upHyB5T0vcj2o/LRK3xH3j9pDGHKLhN9RV372dfEKmGwAZ5
 WpHqezbW4EGn9REbpPc+ieqTrmbXNEh13cZgx/r0jOTe+RetSYSl/BEw1jL1gHYAA6nP
 1nY/y1uarD48fyZIsdUH7HBKNSPqZyFA+Y8r3ddUGcaPSS5cdkeqAWZYvPoPfs4n8QBb
 umWA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:mime-version:references:in-reply-to:from:date
 :message-id:subject:to:cc;
 bh=6NAh66rDgaz386jxrdL1SvKM2xP8ixndDd0LudsX8jA=;
 b=e+GwSmH4KPolFTocApZVDMkc56yNM8Q6VRoGJxgjXSGXm729ks0OYamQg+wtFWnLXc
 zkO5jjvJJeLjf1uKAgD4mfVAk8qW+N57uAnFCIzDUK981eiC0ZVZqEupnz9OU8Mou3R/
 QBr7nzTiePbmsXCzDf015hqP/Kap7DGW9FBP7t5c8V5aypq+/kGjochzOxFt0Qe9+R0O
 RPi2oVyEqhnHsvjxLdXb4Kqb27yCQ6wRhsoO7ZrdoMFcvJCyCOlEH1jMWSYreYpUC0Gf
 J0nr+eMWZKp2DL7Izu+uSM60LzXQrCiYq6lTVngDqV/6yLh3dFxXXstsRoMA7DpxUScA
 QfKQ==
X-Gm-Message-State: AGi0PuYBqHpcUT0ouZ7ybtFy0sr0hr6MFPLgz1FPUrOPlQDo70bu2htn
 S46uvBGmoPZdF1N9Vbui/lW+OZriDzKMt374vlIs/fEg
X-Google-Smtp-Source: APiQypIm3lxg3Qy8saCD/j5/r8gQIJCiqVb6kP6VsJMc0hIQ78hxv+QTQ6DQuwNN7KirUb4GaKH8zRLiJTtiCvkdN4Y=
X-Received: by 2002:ac8:4e0f:: with SMTP id c15mr7894523qtw.211.1587716941154; 
 Fri, 24 Apr 2020 01:29:01 -0700 (PDT)
MIME-Version: 1.0
References: <6171889.DvuYhMxLoT@cherry> <3827671.e9J7NaK4W3@peach>
In-Reply-To: <3827671.e9J7NaK4W3@peach>
From: zimoun <zimon.toutoune@HIDDEN>
Date: Fri, 24 Apr 2020 10:28:50 +0200
Message-ID: <CAJ3okZ1AH-yJC1t634YiNUR09LVdv_dfmjnM+W9mZmd_0hkYTg@HIDDEN>
Subject: Re: bug#40549: More usability issues:
To: Tom <tomz@HIDDEN>
Content-Type: text/plain; charset="UTF-8"
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 40549
Cc: 40549 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

On Thu, 23 Apr 2020 at 21:52, Tom via Bug reports for GNU Guix
<bug-guix@HIDDEN> wrote:
>
> To add detail here:
>
> Doing `guix package -d 18 -S 17` actually works.
>
> This gives me the impression that the order of arguments is relevant to the
> processing of them.

It is known and cumbersome: a feature? ;-)

Other examples:

  guix package -I -A # does nothing
  guix package -A -I # list available


> Another, similar, example is:
>
>    guix package -l --profile=a
>
> this doesn't work. But the most curious thing is that this does:
>
>    guix package --list-installed --profile=a

It is worse than that.

--8<---------------cut here---------------start------------->8---
# OK
 guix package --list-generations -p /path/to/profile
 guix package --list-installed -p /path/to/profile

# KO
 guix package -l -p /path/to/profile
 guix package -I -p /path/to/profile

# OK
 guix package -p /path/to/profile -l
 guix package -p /path/to/profile -I

# KO
 guix package -l --profile=/path/to/profile

# Do nothing
 guix package -I --profile=/path/to/profile

# OK
 guix package -l --profile=/path/to/profile -l
 guix package -I --profile=/path/to/profile -I
--8<---------------cut here---------------end--------------->8---


Well, it seems there is a bug. :-)

Back to the first examples:

--8<---------------cut here---------------start------------->8---
# Do something
 guix package --list-installed -A

# Do nothing
 guix package -I -A
--8<---------------cut here---------------end--------------->8---


Thanks for reporting.

All the best,
simon




Information forwarded to bug-guix@HIDDEN:
bug#40549; Package guix. Full text available.

Message received at 40549 <at> debbugs.gnu.org:


Received: (at 40549) by debbugs.gnu.org; 23 Apr 2020 19:51:48 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Apr 23 15:51:48 2020
Received: from localhost ([127.0.0.1]:55864 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1jRhsy-00078i-39
	for submit <at> debbugs.gnu.org; Thu, 23 Apr 2020 15:51:48 -0400
Received: from mx.kolabnow.com ([95.128.36.42]:52790)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <tomz@HIDDEN>) id 1jRhsv-00078T-EN
 for 40549 <at> debbugs.gnu.org; Thu, 23 Apr 2020 15:51:46 -0400
Received: from localhost (unknown [127.0.0.1])
 by ext-mx-out002.mykolab.com (Postfix) with ESMTP id 3C82E64D
 for <40549 <at> debbugs.gnu.org>; Thu, 23 Apr 2020 21:51:39 +0200 (CEST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freedommail.ch;
 h=content-type:content-type:content-transfer-encoding
 :mime-version:message-id:date:date:subject:subject:from:from
 :received:received:received; s=dkim20160331; t=1587671498; x=
 1589485899; bh=U/D6txxl6jbL2j+U/Lg0PZPK7BWh12P6ZaLYyFKDtwc=; b=Q
 onhVjOQ4bdBBCw/y8We0245acw1CJ8PU0h5LqUqT4RZNlVlG4/YNei+BXHdlgt9M
 BIkUj+VovnUwkbO8nu7dmjdl0uMu8+1DW9dloFbu429LjJn1pgXPDrZyYId7Qu1F
 Wx09pPTnAI/yl9+4JbrT0PZWMMRlZcL+rjz6SiT+znfFxr+8dm6DG4K7f2uMzxU2
 CUzVEQjJbnUXTqXFKqd6rArtNxaVS9FsBlW9TWWId2KMvVdR3dGlRHqQqmPPZn/j
 dWU4kHzEzx0AIgesgeXkaKLNScqNkkWYQOPDdGLaMKGzw180a9YU0T7LfkxJLnPT
 6bZLVEDqEsSFdIk4iCOAEQJhxbLWJU5e6izroYndc8xlK5BvJdkVjABBfHg5oYYz
 nkYv/nCoIq86PuMGL3dg6Tk8Wwc3kHTvFIL/cbXWSIiWkvaWq7E/3OiJY8LHM+LD
 Eh7DnUx+Y7UJiiYSon49yammCRf1AKyyM36qcgJWyKbuwO5ND23CArZWh/pItxvM
 oJwnuEFocAudToyM4JrB91e1naaFQvvxGKKbknQ7fHOhS+HtQnhHXKvbdFzp56Sg
 lIhBBnE5NBUG/HU+TCn71BG6pCy2FZS1safL/5y7EebxBycchIaFDyYDf9N692Gp
 YhKbVy08cWrRofeSXNcms1k/ISX1pi5+VXP1YEBcGQ=
X-Virus-Scanned: amavisd-new at mykolab.com
X-Spam-Flag: NO
X-Spam-Score: -1.9
X-Spam-Level: 
X-Spam-Status: No, score=-1.9 tagged_above=-10 required=5
 tests=[BAYES_00=-1.9] autolearn=ham autolearn_force=no
Received: from mx.kolabnow.com ([127.0.0.1])
 by localhost (ext-mx-out002.mykolab.com [127.0.0.1]) (amavisd-new, port 10024)
 with ESMTP id NulROKvNTbeM for <40549 <at> debbugs.gnu.org>;
 Thu, 23 Apr 2020 21:51:38 +0200 (CEST)
Received: from int-mx001.mykolab.com (unknown [10.9.13.1])
 by ext-mx-out002.mykolab.com (Postfix) with ESMTPS id BA25345E
 for <40549 <at> debbugs.gnu.org>; Thu, 23 Apr 2020 21:51:38 +0200 (CEST)
Received: from ext-subm001.mykolab.com (unknown [10.9.6.1])
 by int-mx001.mykolab.com (Postfix) with ESMTPS id 6DE2A39E
 for <40549 <at> debbugs.gnu.org>; Thu, 23 Apr 2020 21:51:38 +0200 (CEST)
From: Tom <tomz@HIDDEN>
To: 40549 <at> debbugs.gnu.org
Subject: More usability issues:
Date: Thu, 23 Apr 2020 21:51:36 +0200
Message-ID: <3827671.e9J7NaK4W3@peach>
MIME-Version: 1.0
Content-Transfer-Encoding: 7Bit
Content-Type: text/plain; charset="us-ascii"
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 40549
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

To add detail here:

Doing `guix package -d 18 -S 17` actually works.

This gives me the impression that the order of arguments is relevant to the 
processing of them.
This sounds like a bad idea because that is quite unlike the normal gnu 
command line parsers behavior (and generally any command line parsers, unless 
in very rare cases).

The 'package' subcommand should likely always try to do things in-order. First 
Switch, reject any second Switch argument.
Then delete (which can be repeated).
Etc.

That would be much more predicable and UX friendly.


Another, similar, example is:

   guix package -l --profile=a

this doesn't work. But the most curious thing is that this does:

   guix package --list-installed --profile=a

and this too:

   guix package --profile=a -l

and this too;

   guix package -l --profile=a -l

The things that DONT work are confusingly similar to the things that do, and 
the things don't make sense (having -l twice) work just fine without errors.

As said, this is a UX gem to fix. Please take some time to make command line 
parting usable by humans!






Information forwarded to bug-guix@HIDDEN:
bug#40549; Package guix. Full text available.

Message received at 40549 <at> debbugs.gnu.org:


Received: (at 40549) by debbugs.gnu.org; 23 Apr 2020 19:37:34 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Apr 23 15:37:34 2020
Received: from localhost ([127.0.0.1]:55859 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1jRhfB-0006nm-Om
	for submit <at> debbugs.gnu.org; Thu, 23 Apr 2020 15:37:34 -0400
Received: from eggs.gnu.org ([209.51.188.92]:41652)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <ludo@HIDDEN>) id 1jRhfA-0006nZ-8l
 for 40549 <at> debbugs.gnu.org; Thu, 23 Apr 2020 15:37:32 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e]:54348)
 by eggs.gnu.org with esmtp (Exim 4.90_1)
 (envelope-from <ludo@HIDDEN>)
 id 1jRhf4-0002Pj-Mu; Thu, 23 Apr 2020 15:37:26 -0400
Received: from [2a01:e0a:1d:7270:af76:b9b:ca24:c465] (port=42068 helo=ribbon)
 by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256)
 (Exim 4.82) (envelope-from <ludo@HIDDEN>)
 id 1jRhf4-0005yn-70; Thu, 23 Apr 2020 15:37:26 -0400
From: =?utf-8?Q?Ludovic_Court=C3=A8s?= <ludo@HIDDEN>
To: Tom Zander <tomz@HIDDEN>
Subject: Re: bug#40549: [usability] revert last generation
References: <6171889.DvuYhMxLoT@cherry>
Date: Thu, 23 Apr 2020 21:37:23 +0200
In-Reply-To: <6171889.DvuYhMxLoT@cherry> (Tom Zander's message of "Sat, 11 Apr
 2020 11:23:52 +0200")
Message-ID: <87wo66ngcs.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 40549
Cc: 40549 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

Hi,

Tom Zander <tomz@HIDDEN> skribis:

> This could be nicer:
>
> I just installed something and want to revert this last generation, as se=
en in=20
> `guix package -l`.
>
> Doing a single call like `guix package -S 17 -d 18`   does not work, and =
I'd=20
> like it to work.

Oh indeed.  In practice I=E2=80=99d simply run =E2=80=9Cguix package --roll=
-back=E2=80=9D in
such a case so I think the example above is a bit convoluted, but I
agree that it=E2=80=99d be nice if it behaved like you describe.

Thanks,
Ludo=E2=80=99.




Information forwarded to bug-guix@HIDDEN:
bug#40549; Package guix. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 11 Apr 2020 09:24:04 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Apr 11 05:24:04 2020
Received: from localhost ([127.0.0.1]:56164 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1jNCMu-0003i5-MI
	for submit <at> debbugs.gnu.org; Sat, 11 Apr 2020 05:24:04 -0400
Received: from lists.gnu.org ([209.51.188.17]:56091)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <tomz@HIDDEN>) id 1jNCMt-0003hy-I8
 for submit <at> debbugs.gnu.org; Sat, 11 Apr 2020 05:24:03 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:39051)
 by lists.gnu.org with esmtp (Exim 4.90_1)
 (envelope-from <tomz@HIDDEN>) id 1jNCMs-0004kq-7f
 for bug-guix@HIDDEN; Sat, 11 Apr 2020 05:24:03 -0400
X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org
X-Spam-Level: 
X-Spam-Status: No, score=0.0 required=5.0 tests=BAYES_40,RCVD_IN_DNSWL_NONE,
 URIBL_BLOCKED autolearn=disabled version=3.3.2
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <tomz@HIDDEN>) id 1jNCMr-0002DN-0Y
 for bug-guix@HIDDEN; Sat, 11 Apr 2020 05:24:01 -0400
Received: from mx.kolabnow.com ([95.128.36.40]:46538)
 by eggs.gnu.org with esmtp (Exim 4.71)
 (envelope-from <tomz@HIDDEN>) id 1jNCMq-0002CS-Ek
 for bug-guix@HIDDEN; Sat, 11 Apr 2020 05:24:00 -0400
Received: from localhost (unknown [127.0.0.1])
 by ext-mx-out003.mykolab.com (Postfix) with ESMTP id 4DDAF40D30
 for <bug-guix@HIDDEN>; Sat, 11 Apr 2020 11:23:57 +0200 (CEST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freedommail.ch;
 h=content-type:content-type:content-transfer-encoding
 :mime-version:message-id:date:date:subject:subject:from:from
 :received:received:received; s=dkim20160331; t=1586597037; x=
 1588411438; bh=Z7dmqT1Z0EY8yPcQhdVQ1p+RDyPkaGezjuBIgYCAtIE=; b=J
 w0UecXsJEUlpGan4W80+A6jbpEqvjac5Hsglo86mFjenP9JgKjdCTSuBLv4/n8Q4
 yNO1D+AEd8jCepIESramvjiElR9WVOc7QfQAdKQ+9aX7RMq8+vg9bAb1ZOX+5Om7
 YK76QwUp++iBYzzwu4CVyXxJMSiYO1XCmBFVCaVcKNvO63O2ZCCv8Hl00dVtol0B
 5QZYOhS3XZPe9LgnfIHHvolEbvHp/KBLbJnUuklkmDn1Pcfldz237Za34BJuDuT0
 3MEX3OS4jyzLJwKrcbGUhzdyOFDnr3sVQXfoHt2Ixn5gCXNKj6vMuOsmrFjQq7C6
 sX9N7Blmh+xYnl9D2eGCGT3H+bCeSSoXHefhCSxTieA4V+/rJJTcvTRLYoxqoVdA
 F/2c3V7eHt3u1+8isFqBbHOIftuU3oZm8Fbll1JZEb3GZTMRUPgviSgIpe/zvw6W
 Kf+o0LvH2040hfN5c/MNQ2l41bOYMT1hyfWUQsap/c8j7Lc3BQFj/qukLoV3nty0
 bqk75hk58V4modue4R+ccT4dDPPeYn8eN8ivfMstlCvRo0C+aBwlOPEzLItlhTUC
 zreKab9R1a0atzq1LLB7IjBM9JcXSyG0G114GNR4CUUxuS+u//La3yzIa3tLkpJl
 Tu6XauRbqA8aOaW3lK9Hi0nBLb/nEJOB6/rUrUQcvU=
X-Virus-Scanned: amavisd-new at mykolab.com
Received: from mx.kolabnow.com ([127.0.0.1])
 by localhost (ext-mx-out003.mykolab.com [127.0.0.1]) (amavisd-new, port 10024)
 with ESMTP id X006GfGyfwpu for <bug-guix@HIDDEN>;
 Sat, 11 Apr 2020 11:23:57 +0200 (CEST)
Received: from int-mx001.mykolab.com (unknown [10.9.13.1])
 by ext-mx-out003.mykolab.com (Postfix) with ESMTPS id CF2C3404CE
 for <bug-guix@HIDDEN>; Sat, 11 Apr 2020 11:23:56 +0200 (CEST)
Received: from ext-subm003.mykolab.com (unknown [10.9.6.3])
 by int-mx001.mykolab.com (Postfix) with ESMTPS id 8989A557
 for <bug-guix@HIDDEN>; Sat, 11 Apr 2020 11:23:56 +0200 (CEST)
From: Tom Zander <tomz@HIDDEN>
To: bug-guix@HIDDEN
Subject: [usability] revert last generation
Date: Sat, 11 Apr 2020 11:23:52 +0200
Message-ID: <6171889.DvuYhMxLoT@cherry>
MIME-Version: 1.0
Content-Transfer-Encoding: 7Bit
Content-Type: text/plain; charset="us-ascii"
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]
 [fuzzy]
X-Received-From: 95.128.36.40
X-Spam-Score: 0.2 (/)
X-Debbugs-Envelope-To: submit
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.8 (/)

This could be nicer:

I just installed something and want to revert this last generation, as seen in 
`guix package -l`.

Doing a single call like `guix package -S 17 -d 18`   does not work, and I'd 
like it to work.

What it does is that it notices I'm currently on generation 18 and thus it 
can't delete that one. As such it just errors out and returns.

What I expect to happen (regardless of order of arguments) is that it switches 
to the 17th generation and then deletes generation 18.

-- 
Tom Zander






Acknowledgement sent to Tom Zander <tomz@HIDDEN>:
New bug report received and forwarded. Copy sent to bug-guix@HIDDEN. Full text available.
Report forwarded to bug-guix@HIDDEN:
bug#40549; Package guix. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Thu, 14 May 2020 08:30:02 UTC

GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997 nCipher Corporation Ltd, 1994-97 Ian Jackson.