GNU bug report logs - #50845
Color capturing groups in query replace regexp

Previous Next

Package: emacs;

Reported by: ndame <laszlomail <at> protonmail.com>

Date: Mon, 27 Sep 2021 12:56:02 UTC

Severity: normal

Fixed in version 28.1

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


Message #19 received at 50845 <at> debbugs.gnu.org (full text, mbox):

From: Drew Adams <drew.adams <at> oracle.com>
To: ndame <laszlomail <at> protonmail.com>, "50845 <at> debbugs.gnu.org"
 <50845 <at> debbugs.gnu.org>
Subject: RE: [External] : bug#50845: Color capturing groups in query replace
 regexp
Date: Mon, 27 Sep 2021 16:08:54 +0000
> When doing some complex capturing and replacing it could be helpful to
> see what each of the groups captured.
> 
> So instead of coloring the match with a single color when query
> replacing, the part captured by the first parens
> has one color, the second capturing group a different color, etc. and
> after replacing if the user used a
> comma to replace but not move point to the next match, the same colors
> indicate the replacement texts for the
> corresponding groups.
> 
> And the matching parts outside of parens can have the same face which
> qrr currently uses.

FWIW, together, my libraries `isearch+.el' and
`replace+.el' do that.  (The former does it
also for Isearch.)

Each regexp group match is highlighted in the
currently search hit, and in other hits than the
current one the odd and even group matches are
highlighted (odd and even faces).

IMO, this feature is really helpful.  Regexp
matches should be shown this way, in general.
(Of course, it's optional for users.)

https://www.emacswiki.org/emacs/download/isearch%2b.el

https://www.emacswiki.org/emacs/download/replace%2b.el



This bug report was last modified 3 years and 300 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.