[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: modern regexes in emacs
From: |
Richard Stallman |
Subject: |
Re: modern regexes in emacs |
Date: |
Sat, 16 Feb 2019 22:17:37 -0500 |
[[[ To any NSA and FBI agents reading my email: please consider ]]]
[[[ whether defending the US Constitution against all enemies, ]]]
[[[ foreign or domestic, requires you to follow Snowden's example. ]]]
> > If I read the petitioners correctly, they want a global setting that
> > permits them to type a(b|c) instead of a\(b\|c\) in
> > isearch-forward-regexp and all other interactive commands.
> That is not going to happen any time soon, because it will break gobs
> of Emacs code. I don't see anyone proposing that, because they all
> understand the impossible implications.
That's true, of course. But I wonder if some other interface could
make it possible to offer optional use of egrep syntax in a compatible
way that would not break anything.
A text property on the string could specify this. We could make a
convenient function to add that text property -- that's how users
would specify "new syntax".
> If I read the petitioners correctly, they want a global setting
> that permits them to type a(b|c) instead of a\(b\|c\) in
> isearch-forward-regexp and all other interactive commands.
The incremental search commands are a separate issue -- having a flag
to control what syntax they use wouldn't break Lisp code.
If we create a new letter in interactive specs to read a regexp,
we could have a global variable specify that those should be
treated as "new syntax". Arg reading would convert them to old syntax,
or add the text property; after that, they could be simply passed along.
--
Dr Richard Stallman
President, Free Software Foundation (https://gnu.org, https://fsf.org)
Internet Hall-of-Famer (https://internethalloffame.org)
- Re: modern regexes in emacs, (continued)
- Re: modern regexes in emacs, Perry E. Metzger, 2019/02/15
- Re: modern regexes in emacs, Alan Mackenzie, 2019/02/15
- RE: modern regexes in emacs, Drew Adams, 2019/02/15
- Re: modern regexes in emacs, Perry E. Metzger, 2019/02/15
- Re: modern regexes in emacs, Jay Kamat, 2019/02/15
- Re: modern regexes in emacs, Perry E. Metzger, 2019/02/15
- Re: modern regexes in emacs, Jay Kamat, 2019/02/15
- Re: modern regexes in emacs, Eli Zaretskii, 2019/02/15
- Re: modern regexes in emacs, Mattias Engdegård, 2019/02/15
- Re: modern regexes in emacs, Eli Zaretskii, 2019/02/15
- Re: modern regexes in emacs,
Richard Stallman <=
- Re: modern regexes in emacs, Lars Ingebrigtsen, 2019/02/25
- Re: modern regexes in emacs, Clément Pit-Claudel, 2019/02/25
- Re: modern regexes in emacs, Richard Stallman, 2019/02/25
- Re: modern regexes in emacs, Lars Ingebrigtsen, 2019/02/26
- Re: modern regexes in emacs, Troy Hinckley, 2019/02/26
- Re: modern regexes in emacs, Lars Ingebrigtsen, 2019/02/26
- Re: modern regexes in emacs, Andreas Schwab, 2019/02/26
- Re: modern regexes in emacs, Mattias Engdegård, 2019/02/27
- Re: modern regexes in emacs, Daniel Pittman, 2019/02/27
- Re: modern regexes in emacs, Eli Zaretskii, 2019/02/26