From: "Mattias Engdegård" <mattiase@acm.org>
To: Kai Ma <justksqsf@gmail.com>
Cc: 60196@debbugs.gnu.org
Subject: bug#60196: 29.0.60; re-builder should read all forms for the rx syntax
Date: Fri, 30 Dec 2022 13:28:14 +0100 [thread overview]
Message-ID: <64E4056A-0167-4B41-BB44-60A47C7FA6A5@acm.org> (raw)
In-Reply-To: <m2y1r36a1o.fsf@gmail.com>
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?
next prev parent reply other threads:[~2022-12-30 12:28 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-12-19 9:02 bug#60196: 29.0.60; re-builder should read all forms for the rx syntax Kai Ma
2022-12-30 12:28 ` Mattias Engdegård [this message]
2022-12-30 13:45 ` Kai Ma
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=64E4056A-0167-4B41-BB44-60A47C7FA6A5@acm.org \
--to=mattiase@acm.org \
--cc=60196@debbugs.gnu.org \
--cc=justksqsf@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).