GNU bug report logs - #30920
doc: Inconsistent parentheses in "(guile) sxml-match"

Previous Next

Package: guile;

Reported by: Arun Isaac <arunisaac <at> systemreboot.net>

Date: Sat, 24 Mar 2018 05:16:02 UTC

Severity: normal

Done: Ludovic Courtès <ludo <at> gnu.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 30920 in the body.
You can then email your comments to 30920 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-guile <at> gnu.org:
bug#30920; Package guile. (Sat, 24 Mar 2018 05:16:04 GMT) Full text and rfc822 format available.

Acknowledgement sent to Arun Isaac <arunisaac <at> systemreboot.net>:
New bug report received and forwarded. Copy sent to bug-guile <at> gnu.org. (Sat, 24 Mar 2018 05:16:04 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Arun Isaac <arunisaac <at> systemreboot.net>
To: bug-guile <at> gnu.org
Subject: doc: Inconsistent parentheses in "(guile) sxml-match"
Date: Sat, 24 Mar 2018 10:44:46 +0530
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.




Information forwarded to bug-guile <at> gnu.org:
bug#30920; Package guile. (Sat, 21 Mar 2020 21:35:01 GMT) Full text and rfc822 format available.

Message #8 received at 30920 <at> debbugs.gnu.org (full text, mbox):

From: Ludovic Courtès <ludo <at> gnu.org>
To: Arun Isaac <arunisaac <at> systemreboot.net>
Cc: 30920 <at> debbugs.gnu.org
Subject: Re: bug#30920: doc: Inconsistent parentheses in "(guile) sxml-match"
Date: Sat, 21 Mar 2020 22:34:35 +0100
Hi Arun,

Arun Isaac <arunisaac <at> systemreboot.net> skribis:

> 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’.




Information forwarded to bug-guile <at> gnu.org:
bug#30920; Package guile. (Mon, 23 Mar 2020 20:31:01 GMT) Full text and rfc822 format available.

Message #11 received at 30920 <at> debbugs.gnu.org (full text, mbox):

From: Arun Isaac <arunisaac <at> systemreboot.net>
To: Ludovic Courtès <ludo <at> gnu.org>
Cc: 30920 <at> debbugs.gnu.org
Subject: Re: bug#30920: doc: Inconsistent parentheses in "(guile) sxml-match"
Date: Tue, 24 Mar 2020 02:00:05 +0530
[Message part 1 (text/plain, inline)]
Hi,

> 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!

[0001-doc-Replace-square-brackets-with-round-brackets.patch (text/x-patch, attachment)]
[signature.asc (application/pgp-signature, inline)]

Reply sent to Ludovic Courtès <ludo <at> gnu.org>:
You have taken responsibility. (Wed, 25 Mar 2020 21:55:01 GMT) Full text and rfc822 format available.

Notification sent to Arun Isaac <arunisaac <at> systemreboot.net>:
bug acknowledged by developer. (Wed, 25 Mar 2020 21:55:01 GMT) Full text and rfc822 format available.

Message #16 received at 30920-done <at> debbugs.gnu.org (full text, mbox):

From: Ludovic Courtès <ludo <at> gnu.org>
To: Arun Isaac <arunisaac <at> systemreboot.net>
Cc: 30920-done <at> debbugs.gnu.org
Subject: Re: bug#30920: doc: Inconsistent parentheses in "(guile) sxml-match"
Date: Wed, 25 Mar 2020 22:54:15 +0100
Hi Arun,

Arun Isaac <arunisaac <at> systemreboot.net> skribis:

> 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.

> From 6e31e3fe1fd2b537d4a02dbcfccbb03e0d20e804 Mon Sep 17 00:00:00 2001
> From: Arun Isaac <arunisaac <at> 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’.




Information forwarded to bug-guile <at> gnu.org:
bug#30920; Package guile. (Thu, 26 Mar 2020 08:22:02 GMT) Full text and rfc822 format available.

Message #19 received at 30920 <at> debbugs.gnu.org (full text, mbox):

From: Arun Isaac <arunisaac <at> systemreboot.net>
To: Ludovic Courtès <ludo <at> gnu.org>
Cc: 30920 <at> debbugs.gnu.org
Subject: Re: bug#30920: closed (Re: bug#30920: doc: Inconsistent parentheses
 in "(guile) sxml-match")
Date: Thu, 26 Mar 2020 13:50:46 +0530
[Message part 1 (text/plain, inline)]
>> These snippets fail to evaluate. Could you check?
>
> I can confirm.  Would be worth fixing.

I have opened a separate bug report
https://debbugs.gnu.org/cgi/bugreport.cgi?bug=40235 for this.

> Applied, thanks!

Thanks!
[signature.asc (application/pgp-signature, inline)]

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Thu, 23 Apr 2020 11:24:04 GMT) Full text and rfc822 format available.

This bug report was last modified 3 years and 340 days ago.

Previous Next


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