Removing Control-M with emacs
Facts - Editor: emacs
Sunday, 21 December 2008 09:44

Files can get corrupted with line breaks, especially after transferring files from one computer to the other. These line breaks display as "^M" after each line when opening such a file with emacs. You can remove them using the command replace-string : "Alt-x replace-string". Type the string to replace as "Ctrl-Q Ctrl-M" and press enter when prompted for the string to replace with.