benma / visual-regexp.el

A regexp/replace command for Emacs with interactive visual feedback
392 stars 28 forks source link

Support all query-replace-regexp interactions #73

Open PhilHudson opened 8 months ago

PhilHudson commented 8 months ago

Surprised to find that C-w did not do what it does in query-replace-regexp (delete the current match and enter recursive edit). Instead it aborts the search and does what C-w normally does at the top level.

Looking at the code, I see that vr--perform-query-replace notes that it is an ad-hoc replacement for the original perform-replace. I imagine it has got out of sync with the original over time.

benma commented 8 months ago

Hi

I just tried it on Emacs 28 and C-w simply killed the match and stops the query-replace-regexp command. Did you mean C-r? I see that C-r works for query-replace-regexp but not for visual-regexp.

Unfortunately I don't have the time to work on this package. Pull requests are welcome though.

PhilHudson commented 8 months ago

Your observed behavior is confirmation of the bug I'm reporting (failure to enter recursive edit). See (info "(emacs) Query Replace") for the expected behaviors.