[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: modern regexes in emacs
From: |
Juri Linkov |
Subject: |
Re: modern regexes in emacs |
Date: |
Sun, 17 Feb 2019 22:01:45 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (x86_64-pc-linux-gnu) |
> 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.
This would be really trivial to do when we'll have a function that
will convert an extended regexp string into rx form like what
the xr package does, i.e. like the function ‘xr’, a new function
‘exr’ could convert an extended regexp - as opposed to basic regexp
as noted in https://www.regular-expressions.info/gnu.html
Then similarly to ‘isearch-symbol-regexp’, the implementation will be just
4 lines:
(isearch-define-mode-toggle extended "\\" isearch-extended-regexp "\
Turning on extended regexp search turns off basic regexp mode.")
(defun isearch-extended-regexp (string)
(rx (exr string)))
that will also automatically support extended regexp interactively in
occur, query-replace-regexp...
- Re: modern regexes in emacs, (continued)
- 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
- Re: modern regexes in emacs, Richard Stallman, 2019/02/26
- Re: modern regexes in emacs, Elias Mårtenson, 2019/02/25
- Re: modern regexes in emacs, Mattias Engdegård, 2019/02/26
- Re: modern regexes in emacs, Perry E. Metzger, 2019/02/15
- Re: modern regexes in emacs,
Juri Linkov <=
- Re: modern regexes in emacs, Stefan Monnier, 2019/02/17
- Re: modern regexes in emacs, Clément Pit-Claudel, 2019/02/15
- Re: modern regexes in emacs, Eli Zaretskii, 2019/02/15
- Re: modern regexes in emacs, Clément Pit-Claudel, 2019/02/15
- Re: modern regexes in emacs, Alan Mackenzie, 2019/02/15
- Re: modern regexes in emacs, Eli Zaretskii, 2019/02/15
- Re: modern regexes in emacs, Alan Mackenzie, 2019/02/15
- Re: modern regexes in emacs, Perry E. Metzger, 2019/02/15
- Re: modern regexes in emacs, Clément Pit-Claudel, 2019/02/15
- Re: modern regexes in emacs, Stefan Monnier, 2019/02/15