GNU bug report logs -
#60196
29.0.60; re-builder should read all forms for the rx syntax
Previous Next
To reply to this bug, email your comments to 60196 AT debbugs.gnu.org.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#60196
; Package
emacs
.
(Mon, 19 Dec 2022 09:03:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Kai Ma <justksqsf <at> gmail.com>
:
New bug report received and forwarded. Copy sent to
bug-gnu-emacs <at> gnu.org
.
(Mon, 19 Dec 2022 09:03:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
Severity: wishlist
re-builder (rx syntax) currently cannot read multiple forms. This
results in suboptimal user experience. For example, even though
(rx "<i>" (group (*? anychar)) "</i>")
is perfectly fine, but in re-builder, one has to write it as follows:
'(and "<i>" (group (*? anychar)) "</i>")
Ideally, re-builder should allow users to simply write
"<i>" (group (*? anychar)) "</i>"
(The relevant function seems to be 'reb-cook-regexp'.)
Kai
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#60196
; Package
emacs
.
(Fri, 30 Dec 2022 12:29:02 GMT)
Full text and
rfc822 format available.
Message #8 received at 60196 <at> debbugs.gnu.org (full text, mbox):
The handling of rx input in re-builder is indeed unsatisfactory. We could adopt your proposed solution:
> Ideally, re-builder should allow users to simply write
>
> "<i>" (group (*? anychar)) "</i>"
which would be a definite improvement. We could also accept a Lisp expression that is evaluated, so that you'd write
(rx "<i>" (group (*? anychar)) "</i>")
On the surface this looks more verbose, but since re-builder itself would provide the `(rx )` boilerplate, there wouldn't actually be any more typing. The main advantage would be that regexps could be built up from smaller pieces:
(rx-let ((spaces (* " "))
(identifier (: alpha (* alnum))))
(rx identifier spaces "->" spaces identifier))
Either would be a definite improvement to the current rather strange re-builder behaviour with respect to rx input. Any preference?
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#60196
; Package
emacs
.
(Fri, 30 Dec 2022 13:46:02 GMT)
Full text and
rfc822 format available.
Message #11 received at 60196 <at> debbugs.gnu.org (full text, mbox):
> On Dec 30, 2022, at 20:28, Mattias Engdegård <mattiase <at> acm.org> wrote:
>
> The handling of rx input in re-builder is indeed unsatisfactory. We could adopt your proposed solution:
>
>> Ideally, re-builder should allow users to simply write
>>
>> "<i>" (group (*? anychar)) "</i>"
>
> which would be a definite improvement. We could also accept a Lisp expression that is evaluated, so that you'd write
>
> (rx "<i>" (group (*? anychar)) "</i>")
>
> On the surface this looks more verbose, but since re-builder itself would provide the `(rx )` boilerplate, there wouldn't actually be any more typing.
Good point! And it is much easier to copy a whole Sexpr.
> The main advantage would be that regexps could be built up from smaller pieces:
>
> (rx-let ((spaces (* " "))
> (identifier (: alpha (* alnum))))
> (rx identifier spaces "->" spaces identifier))
>
> Either would be a definite improvement to the current rather strange re-builder behaviour with respect to rx input. Any preference?
I like your proposal better! :-)
Forcibly Merged 60196 63918.
Request was from
Mattias Engdegård <mattias.engdegard <at> gmail.com>
to
control <at> debbugs.gnu.org
.
(Tue, 06 Jun 2023 13:08:02 GMT)
Full text and
rfc822 format available.
This bug report was last modified 2 years and 11 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.