benma / visual-regexp.el

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

Trouble with backslash #5

Closed EliasC closed 11 years ago

EliasC commented 11 years ago

There seems to be an issue with handling backslashes properly in vr/query-replace. In this text:

Lorem \textit{ipsum} dolor

running vr/query-replace with

\textit -> \textbf

gives the error "Invalid use of `\' in replacement text" and changes nothing, even though the preview looks correct before going into the queries. Running the replacement

\textit -> \\textbf

gives the text

Lorem \textbf{ipsum} dolor

(as expected) but shows the suggestion

\textit -> \textbf

during query. I do not have the same issues when running vr/replace. The problem appears on MacOS X 10.8.3 running Emacs 24.3.

benma commented 11 years ago

Thanks for the report. I just pushed a fix, it should arrive on melpa soon.

EliasC commented 11 years ago

Works like a charm! Thanks!