Closed CyberShadow closed 8 years ago
Unfortunately, I can't reproduce this.
What I did:
In the scratch buffer, I used vr/replace
. The search string I used:
evaluation\.
;;
The replace string:
TEST
The replacement worked fine. Repeating vr/replace
and going back in history one step, the minibuffer shows:
evaluation\.^J;; → TEST
Where the ^J
are treated as one character (I couldn't put the point in the middle of it). The replacement worked fine for a 2nd, and 3rd time.
Please try it again and if it does not work, explain in greater detail what you did. Please also post your emacs and visual-regexp version.
I can reproduce the problem, including your example steps, on GNU Emacs 24.5.1 (x86_64-unknown-linux-gnu, GTK+ Version 3.20.6) with visual-regexp 20160806.610. The problem is reproducible when running emacs
with -q
and loading only visual-regexp
.
Can you reproduce the problem on Emacs 25.1? I am tempted to only support the latest version of Emacs, as the previous round of Emacs 24 incompatibilities incurred quiet a bit of work, and I'd like to avoid doing more work for it.
I will accept simple pull requests though for emacs 24, if that helps.
Not reproducible with Emacs 25.1.
This fixes the problem for me, but a lot of distributions will remain on Emacs 24 for a while.
Thanks.
After performing a replace where the search expression contains a literal newline (inserted e.g. via
C-q C-j
), when attempting to repeat the replace, the newline character in the query default is replaced with^J
. However, even though they're formatted as a special character, they are two distinct characters (^
andJ
). As such, they will no longer match a newline. Attempting to repeat the replace a third time will remove the highlighting.