I had another of these annoying mixed-mode DOS/Unix text files that suffered from being edited in text editors that didn't agree which line ending mode they should use. Unfortunately Emacs defaults to Unix text mode in this case so I had an already ugly file that wasn't exactly prettified by random ^M characters all over the place.

I also don't have the cygwin tools on the machine that I was seeing this problem on, I couldn't just run unix2dos or dos2unix over the file and be done with it, but at least I had emacs on that machine. So, emacs to the rescue again...

First, I used query-replace to get rid of the ^Ms in so the file was turned into a "proper" Unix text file. The trick here is that you need to use control-Q to quote the control character. In my case on a Windows box, the key sequence was M-Shift-% Control-Q Control-M and then use the empty string as a replacement value. Job done, we've now got a proper Unix mode text file. Well, after almost wearing out the 'Y' key but of course you can use replace-string instead.

In order to turn the Unix mode text file into a Dos mode one, run the command set-buffer-file-coding-system with the parameter undecided-dos and save the resulting file. Job done.

SE-Radio interviews Ron Lichty, must listen for development managers

The [Software Engineering Radio](http://www.se-radio.net/) podcast has just published an episode with an interview with Ron Lichty.If you...… Continue reading

Emacs 25.3 released

Published on September 14, 2017