Hi Guys,
I am wondering if there is a way to have to temporaly not displaying the ^M characters in a file. I don't want to remove them I just want to not displaying them.
Cheers,
Hi Guys,
I am wondering if there is a way to have to temporaly not displaying the ^M characters in a file. I don't want to remove them I just want to not displaying them.
Cheers,
At least with emacs 22.3 this seems to be an issue only if your file has a combination of newline styles, say from editing with a "non-enlightened" editor under both windows unix.
If the lines are consistently terminated w/ ^M modern emacs will note at the bottom that it's [dos] mode and not show the ^M. It's then smart enough to place ^M in the file when you save.
If you've got some odd combination you can try running
$ unix2dos FILE
to get to a good state, after which hopefully you can keep it in DOS mode.
I note that my xemacs 21.4 doesn't have this feature, alas.
There's a discussion here: http://groups.google.com/group/gnu.emacs.help/browse_thread/thread/676113e90825d4e7
I use the following function (forgot where I found it):
(defun hide-ctrl-M ()
"Hides the disturbing '^M' showing up in files containing mixed UNIX and DOS line endings."
(interactive)
(setq buffer-display-table (make-display-table))
(aset buffer-display-table ?\^M []))