GNU bug report logs -
#52558
Option for easier typing of regexps
Previous Next
Reported by: ndame <laszlomail <at> protonmail.com>
Date: Thu, 16 Dec 2021 17:42:01 UTC
Severity: wishlist
Tags: moreinfo
Fixed in version 29.0.50
Done: Juri Linkov <juri <at> linkov.net>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
On 12/19/2021 3:56 AM, Lars Ingebrigtsen wrote:
> I think it would be really confusing to have a different regexp syntax
> when prompting interactively to when you're writing code, so I don't
> think this would be a good idea. Anybody else have a different opinion?
I think this depends on how people use Emacs. While there's definitely
some potential for confusion if you switch between entering Emacs
regexps interactively or by writing Elisp, there's also potential for
confusion if you often write regexps for external tools from Emacs. For
example, if you use one of the "modern" recursive grep-like tools (ack,
ag, ripgrep, etc), most of them use PCRE syntax (or something close to
PCRE). It's easy to forget that Isearch uses BRE but your preferred
rgrep-like tool uses ERE/PCRE.
I've attempted to resolve this issue in the other direction in
Urgrep[1], which provides a unified way of running all these recursive
grep-like tools. Specifically, it defaults to accepting BRE syntax and
then, if the tool only accepts ERE/PCRE, it converts the BRE input into
ERE/PCRE. That's not perfect either since then you end up in a situation
where to use PCRE features, you have to enter them in a BRE-like syntax,
which I find pretty confusing too. (This behavior is customizable in
Urgrep, so if you like ERE/PCRE, you can set those as the input syntax.)
I'm not sure this makes the decision about what to do any easier though.
In fact, it probably just muddies the waters further. :)
[1] https://github.com/jimporter/urgrep
This bug report was last modified 3 years and 117 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.