Say I want to replace all the new lines in my emacs buffer with the character k (wait for the -1, read the rest! :) ). I know I can type M-x replace-string RET C-q C-j RET k.
It works fine.
My problem is that the new line character, i.e. ^J is not displayed in the replace query, I just get a new line in the query string. Instead if I try to type C-q C-<another_char> I get ^<another_char>.
As I said, it works fine, but it is annoying, because it is not compact and not easily readable. Is this the default behavior in emacs? Does anybody know how to change it?
^Jafter you accept the search string, right? At least, mine looks like:Replace string ^J with:so you'll at least see it afterward. – Nicholas Riley Jul 23 '11 at 21:06