emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Ugly regexps


From: Mattias Engdegård
Subject: Re: Ugly regexps
Date: Thu, 4 Mar 2021 12:25:48 +0100

4 mars 2021 kl. 11.49 skrev Lars Ingebrigtsen <larsi@gnus.org>:

> I think users will be very happy to be able to use the regexp syntax
> they know (instead of the special Emacs regexp variants) in their .emacs
> files.

Unfortunately it isn't the regexp syntax they know; it's a new variant, with 
subtle differences from what they may think it is. False friends include [] \d 
\s \w . ^ $ and so on: constructs that look like something they know well from 
other software but  that have slightly (or completely) different meaning in 
Emacs.

This doesn't mean that `ere` wouldn't be a useful addition, but that it should 
not be presented as "Regexps just like in Python (etc)! No Emacs quirks to 
worry about!" but exactly for what it is: a way to toggle the requirement for 
backslash-escaping (){}|, no more and no less. Someone who wants to write or 
understand an `ere` regexp has to read the Emacs regexp docs, then the `ere` 
documentation, and then mentally combine the two.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]