How to replacing a string with another string with newline in Emacs? For example, to replace:good editor withgood editor: Emacs What you need is actually to input a newline in Emacs:C-q C-j C-q is for quoted-insert, and C-j is a newline (0xa).Related posts:Replacing tabs with spaces in Emacs How to remove newline characters from a string in C++? How to convert between dos and unix file coding in Emacs? Emacs highlighting part of lines that go over 80 chars Making Emacs Start Up Faster Emacs Tips and Howtos How to make Emacs run in command line by default? How to print the name of the current file being edited in Emacs?