GNU bug report logs -
#36237
Support (rx (and (regexp EXPR) (regexp-quote EXPR)))
Previous Next
Reported by: Noam Postavsky <npostavs <at> gmail.com>
Date: Sat, 15 Jun 2019 23:44:02 UTC
Severity: wishlist
Tags: fixed, patch
Merged with 6985
Fixed in version 27.1
Done: Noam Postavsky <npostavs <at> gmail.com>
Bug is archived. No further changes may be made.
Full log
Message #59 received at 36237 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Mattias EngdegÄrd <mattiase <at> acm.org> writes:
> -;; (rx (and line-start (eval something-else))), statically or
> -;; (rx-to-string '(and line-start ,something-else)), dynamically.
> +;; (rx (seq line-start (regexp something-else)))
>
> You can actually drop the `seq' form entirely, since it's implicit in `rx'.
> It was only needed for `rx-to-string' which is now gone.
Yeah, that applies to most of the examples actually. Updated (and I
found a couple of mistakes in them).
> +`(literal STRING)'
> + matches STRING literally, where STRING is any lisp
> + expression that evaluates to a string.
>
> It's better to name the metavariable EXPR, STRING-EXPR or LISP-EXPR to
> make it clear that it's an arbitrary lisp expression, especially since
> STRING is used for a constant string just above.
Sure.
> The same goes for `regexp', since it can now be a lisp expression;
> this should be mentioned in the describing paragraph, using a similar
> phrasing. The `literal' item should probably be moved next to
> `regexp', since they are closely related.
Yeah, I wasn't entirely sure whether `literal' should be considered more
related to `regexp' or STRING. I guess since I've added a mention of
`literal' and `regexp' in the paragraphs above it makes sense to put
them at the end together.
> The paragraph on `eval' uses FORM, which is too generic
No, it's not generic, see (info "(elisp) Intro Eval"):
A Lisp object that is intended for evaluation is called a "form" or
"expression"(1).
[0001-Support-rx-and-regexp-EXPR-literal-EXPR-Bug-36237.patch (text/plain, attachment)]
This bug report was last modified 5 years and 326 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.