I wrote a bad bit of elisp when trying to do a query-replace-regexp
.
The text to replace was like this:
* list item
And I wanted it to be
* List item
My query-replace-regexp match was written as:
^\* \([a-z]\{1\}\)
And the match, where I used the wrong elisp, was:
* \,(upcase-word \1) ;; should have been * \,(capitalize \1)
I get this error: Wrong type argument: number-or-marker-p, replace-eval-replacement
If I try to run query-replace-regexp
again, I get the same error and cannot edit the replacement text. All I can do is exit Emacs and restart it. I assume there must be some way to clear the history, but I can't find it.
Suggested on twitter was (setq regexp-history nil)
but no luck.
This is Emacs 25.0.50.
query-replace-regexp
again, you can scroll through your history (eg, with the arrow keys) to select and edit the regexp and the to-string.M-x query-replace-regexp
again, it lets me scroll through the history with no problem. Do you get the same behavior with no init file (emacs -Q
)?