doc: Inconsistent parentheses in "(guile) sxml-match"

  • Done
  • quality assurance status badge
Details
2 participants
  • Arun Isaac
  • Ludovic Courtès
Owner
unassigned
Submitted by
Arun Isaac
Severity
normal
A
A
Arun Isaac wrote on 24 Mar 2018 06:14
(address . bug-guile@gnu.org)
cu71sgaf41l.fsf@systemreboot.net
All examples in "(guile) sxml-match" use square parentheses around each
match clause. However, in the subsection "Guards in Patterns" alone, the
example has round parentheses. I think it would be nice to use round
parentheses consistently in all examples so that sxml-match and match
have the same syntax. But, I have no strong opinions. If you can
recommend which way to go, I can provide a patch for the same.
L
L
Ludovic Courtès wrote on 21 Mar 2020 22:34
(name . Arun Isaac)(address . arunisaac@systemreboot.net)(address . 30920@debbugs.gnu.org)
87d095xuhg.fsf@gnu.org
Hi Arun,

Arun Isaac <arunisaac@systemreboot.net> skribis:

Toggle quote (7 lines)
> All examples in "(guile) sxml-match" use square parentheses around each
> match clause. However, in the subsection "Guards in Patterns" alone, the
> example has round parentheses. I think it would be nice to use round
> parentheses consistently in all examples so that sxml-match and match
> have the same syntax. But, I have no strong opinions. If you can
> recommend which way to go, I can provide a patch for the same.

That documentation comes from Racket-land IIRC, hence the style.

I agree with you that consistency would be nice and a patch in that
direction would be welcome!

Ludo’.
A
A
Arun Isaac wrote on 23 Mar 2020 21:30
(name . Ludovic Courtès)(address . ludo@gnu.org)(address . 30920@debbugs.gnu.org)
cu7sghyvmpe.fsf@systemreboot.net
Hi,

Toggle quote (3 lines)
> I agree with you that consistency would be nice and a patch in that
> direction would be welcome!

Please find attached a patch.

While working on this patch, I found that two of the code snippets don't
work. They work neither with square brackets nor with round
brackets. The two snippets are

* The first snippet in the "Matching the Unmatched Attributes" subsection

@lisp
(sxml-match '(a (@@ (z 1) (y 2) (x 3)) 4 5 6)
((a (@@ (y ,www) . ,qqq) ,t ,u ,v)
(list www qqq t u v)))
@end lisp

* The snippet in the "Default Values in Attribute Patterns" subsection

@lisp
(sxml-match '(e 3 4 5)
((e (@@ (z (,d 1))) ,a ,b ,c) (list d a b c)))
@end lisp

These snippets fail to evaluate. Could you check?

Thanks!
-----BEGIN PGP SIGNATURE-----

iQEzBAEBCAAdFiEEf3MDQ/Lwnzx3v3nTLiXui2GAK7MFAl55HE0ACgkQLiXui2GA
K7Ms2wgAnG6r5RMPW7dO84qDLkpSM+k6jWbOMVabrbnOBTebKz4CrW4DueHSysmH
ihHYQDG0LDWlKiyxaa2ijDzLzwO3DM0JNQNzi3jREzSzVeq/B22mzums/crx/vtZ
XjB9NnZXq7c8YbGhbk4za0hKFO7ZdVgCBIjgX0No+Yp1w3Yw1lXSjP66DEEAHjGB
6eEN4+acgiO+wK8AFKxtCCf9HEaWrNAKj9StbKwtGKoXomkINaGI47MutmJO7NLl
Lu1m2/7w2muC29FE0up0wdq5Ewt7leu7zyAkNgtden4cP/6S65CP+Dg/M/8v0m3G
4GMvxOXp/WJQPDXSRLgsX3b/tcRPfw==
=0W0i
-----END PGP SIGNATURE-----

L
L
Ludovic Courtès wrote on 25 Mar 2020 22:54
(name . Arun Isaac)(address . arunisaac@systemreboot.net)(address . 30920-done@debbugs.gnu.org)
871rpggkxk.fsf@gnu.org
Hi Arun,

Arun Isaac <arunisaac@systemreboot.net> skribis:

Toggle quote (21 lines)
> While working on this patch, I found that two of the code snippets don't
> work. They work neither with square brackets nor with round
> brackets. The two snippets are
>
> * The first snippet in the "Matching the Unmatched Attributes" subsection
>
> @lisp
> (sxml-match '(a (@@ (z 1) (y 2) (x 3)) 4 5 6)
> ((a (@@ (y ,www) . ,qqq) ,t ,u ,v)
> (list www qqq t u v)))
> @end lisp
>
> * The snippet in the "Default Values in Attribute Patterns" subsection
>
> @lisp
> (sxml-match '(e 3 4 5)
> ((e (@@ (z (,d 1))) ,a ,b ,c) (list d a b c)))
> @end lisp
>
> These snippets fail to evaluate. Could you check?

I can confirm. Would be worth fixing.

Toggle quote (8 lines)
> From 6e31e3fe1fd2b537d4a02dbcfccbb03e0d20e804 Mon Sep 17 00:00:00 2001
> From: Arun Isaac <arunisaac@systemreboot.net>
> Date: Tue, 24 Mar 2020 01:45:32 +0530
> Subject: [PATCH] doc: Replace square brackets with round brackets.
>
> * doc/ref/sxml-match.texi: Replace all square brackets with round
> brackets in order to be consistent with the rest of the documentation.

Applied, thanks!

Ludo’.
Closed
A
A
Arun Isaac wrote on 26 Mar 2020 09:20
Re: bug#30920: closed (Re: bug#30920: doc: Inconsistent parentheses in "(guile) sxml-match")
(name . Ludovic Courtès)(address . ludo@gnu.org)(address . 30920@debbugs.gnu.org)
cu7lfnnttlt.fsf@systemreboot.net
Toggle quote (4 lines)
>> These snippets fail to evaluate. Could you check?
>
> I can confirm. Would be worth fixing.

I have opened a separate bug report

Toggle quote (2 lines)
> Applied, thanks!

Thanks!
-----BEGIN PGP SIGNATURE-----

iQEzBAEBCAAdFiEEf3MDQ/Lwnzx3v3nTLiXui2GAK7MFAl58Zd8ACgkQLiXui2GA
K7OOTQf5AYaj3jCYSHvsUO6jqv5mtGcdsy+KBXDHrXCzwwsIYllnEVngfggDVcDA
Q9KuJzaGkZJ7x4Ft4oFTiYkqpjP4keNQwGZ2f8Ultysk72JR1H7jRUbaH0wFfK5M
nLu4y6pHsWihim63siN/sVpkByHzcT0q8zhZEcHaGrd60mnMMR10vI0wSl3X8FUf
vs9RDxG7WocGXMvZ8Ql1er/C6I5w/HUTgGfMtNPI0qa1XpyAWAY4uG/5vJKzUu8q
1yILIW1EUcbk4+4ratX6grPmSxezybDl5CKihej9hfgd7mY79FIYFOuejNz2j71n
QkIBlumfGbyvK+U3mc9VduVn0lUCRg==
=Pc0P
-----END PGP SIGNATURE-----

?