Re: Linux vs win32 emacs
Syd Bauman <[email protected]> Mon, 19 Jul 2004 10:19:46 -0400
| Newsgroups | gmane.emacs.psgml.user |
|---|---|
| Message-ID | <[email protected]> |
> > http://home.xnet.com/~efflandt/pub/dos2unix.pl Heh-heh. All that script really does is perl -p -i -e's/\r//g;' (although it also adds making sure the file permissions of the output file are the same as the input file, and lets you control whether the input file is deleted afterwards by setting $rm_bak in the script). The "-i" switch is what goes about making a ".bak" file of the original for you, which I generally don't bother with. But more importantly than touting perl one-liners, I figured out how to do this in Emacs (took all of 2 minutes). C-x C-f my_DOS_file.txt RET # note that "(DOS)" appears in left side of mode line C-x RET f utf-8-unix RET # note that "u:" now appears in left side of mode line, # and that buffer has been modified, even if it's R/O C-x s There are lots of other possible encodings besides "utf-8", to which "-mac", "-unix", or (ick!) "-dos" can be appended. ------------------------------------------------------- This SF.Net email is sponsored by BEA Weblogic Workshop FREE Java Enterprise J2EE developer tools! Get your free copy of BEA WebLogic Workshop 8.1 today. http://ads.osdn.com/?ad_id=4721&alloc_id=10040&op=click