GNU bug report logs - #53181
Live preview of regexp replace

Previous Next

Package: emacs;

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

Date: Tue, 11 Jan 2022 06:43:02 UTC

Severity: normal

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

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 53181 in the body.
You can then email your comments to 53181 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#53181; Package emacs. (Tue, 11 Jan 2022 06:43:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to ndame <laszlomail <at> protonmail.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Tue, 11 Jan 2022 06:43:02 GMT) Full text and rfc822 format available.

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

From: ndame <laszlomail <at> protonmail.com>
To: "Bug reports for GNU Emacs,
 the Swiss army knife of text editors" <bug-gnu-emacs <at> gnu.org>
Subject: Live preview of regexp replace
Date: Tue, 11 Jan 2022 06:41:50 +0000
[Message part 1 (text/plain, inline)]
I've been using the visual regexp package for a while and it's really useful:

https://github.com/benma/visual-regexp.el

It would improve the core emacs experience if the built in regexp replace did this as well. When constructing a regexp replace it's really useful to see the match and the capturing groups instantly in the buffer, and also the resulting text on the fly when typing the replacement. It spares you from doing several test-fix cycles until you get the regexp replacement right, because you have an instant live preview of everything in the target buffer.

Adding this feature would benefit the default regexp replace experience a lot.
[Message part 2 (text/html, inline)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#53181; Package emacs. (Tue, 11 Jan 2022 09:15:02 GMT) Full text and rfc822 format available.

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

From: Juri Linkov <juri <at> linkov.net>
To: ndame <laszlomail <at> protonmail.com>
Cc: 53181 <at> debbugs.gnu.org, Augusto Stoffel <arstoffel <at> gmail.com>
Subject: Re: bug#53181: Live preview of regexp replace
Date: Tue, 11 Jan 2022 11:04:16 +0200
> I've been using the visual regexp package for a while and it's really
> useful:
>
> https://github.com/benma/visual-regexp.el
>
> It would improve the core emacs experience if the built in regexp replace
> did this as well.  When constructing a regexp replace it's really useful to
> see the match and the capturing groups instantly in the buffer, and also
> the resulting text on the fly when typing the replacement.  It spares you
> from doing several test-fix cycles until you get the regexp replacement
> right, because you have an instant live preview of everything in the target
> buffer.
>
> Adding this feature would benefit the default regexp replace experience a lot.

This is exactly what Augusto is currently doing in bug#53126.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#53181; Package emacs. (Tue, 11 Jan 2022 13:30:02 GMT) Full text and rfc822 format available.

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

From: ndame <laszlomail <at> protonmail.com>
To: Juri Linkov <juri <at> linkov.net>
Cc: 53181 <at> debbugs.gnu.org, Augusto Stoffel <arstoffel <at> gmail.com>
Subject: Re: bug#53181: Live preview of regexp replace
Date: Tue, 11 Jan 2022 13:28:54 +0000
> This is exactly what Augusto is currently doing in bug#53126.

I checked it and it's not the same. It says:

" the highlighting and count of matches as one types a regexp or string to
replace in `query-replace{-regexp}'."

So it may do the first part, the highlighting of the regexp pattern while typing,
but it does not seem to do the second part, that is showing the replacement effects
in the buffer immediately as the user types the replacement text or pattern.

The second part is just as important, because that shows if the actual replacement
is correct or it needs some tweaking before starting replacing.





Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#53181; Package emacs. (Tue, 11 Jan 2022 18:00:02 GMT) Full text and rfc822 format available.

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

From: Juri Linkov <juri <at> linkov.net>
To: ndame <laszlomail <at> protonmail.com>
Cc: 53181 <at> debbugs.gnu.org, Augusto Stoffel <arstoffel <at> gmail.com>
Subject: Re: bug#53181: Live preview of regexp replace
Date: Tue, 11 Jan 2022 19:58:40 +0200
>> This is exactly what Augusto is currently doing in bug#53126.
>
> I checked it and it's not the same. It says:
>
> " the highlighting and count of matches as one types a regexp or string to
> replace in `query-replace{-regexp}'."
>
> So it may do the first part, the highlighting of the regexp pattern while typing,
> but it does not seem to do the second part, that is showing the replacement effects
> in the buffer immediately as the user types the replacement text or pattern.
>
> The second part is just as important, because that shows if the actual replacement
> is correct or it needs some tweaking before starting replacing.

Augusto is porting the package anzu to the core, and anzu implemented
the second part that shows the replacement effects immediately:

https://github.com/emacsorphanage/anzu.git




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#53181; Package emacs. (Tue, 11 Jan 2022 18:28:02 GMT) Full text and rfc822 format available.

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

From: ndame <laszlomail <at> protonmail.com>
To: Juri Linkov <juri <at> linkov.net>
Cc: 53181 <at> debbugs.gnu.org, Augusto Stoffel <arstoffel <at> gmail.com>
Subject: Re: bug#53181: Live preview of regexp replace
Date: Tue, 11 Jan 2022 18:27:38 +0000
> Augusto is porting the package anzu to the core, and anzu implemented
> the second part that shows the replacement effects immediately:

That's great. Though, hopefully he'll take a look at visual-regexp too,
to see what options it provides.

E.g. showing both the orignal string and the replacement string in the
buffer preview (A -> B) vs showing only the replacement, that is the
outcome (vr/default-replace-preview).





Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#53181; Package emacs. (Thu, 13 Jan 2022 07:24:01 GMT) Full text and rfc822 format available.

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

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Juri Linkov <juri <at> linkov.net>
Cc: ndame <laszlomail <at> protonmail.com>, 53181 <at> debbugs.gnu.org,
 Augusto Stoffel <arstoffel <at> gmail.com>
Subject: Re: bug#53181: Live preview of regexp replace
Date: Thu, 13 Jan 2022 08:23:11 +0100
Juri Linkov <juri <at> linkov.net> writes:

>>> This is exactly what Augusto is currently doing in bug#53126.

[...]

> Augusto is porting the package anzu to the core, and anzu implemented
> the second part that shows the replacement effects immediately:
>
> https://github.com/emacsorphanage/anzu.git

So altogether, it seems like this is being handled elsewhere, and I'm
therefore closing this bug report.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




bug closed, send any further explanations to 53181 <at> debbugs.gnu.org and ndame <laszlomail <at> protonmail.com> Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Thu, 13 Jan 2022 07:24:02 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Thu, 10 Feb 2022 12:24:10 GMT) Full text and rfc822 format available.

This bug report was last modified 2 years and 74 days ago.

Previous Next


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