[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Changing file end-of-line style
From: |
Jambunathan K |
Subject: |
Re: Changing file end-of-line style |
Date: |
Mon, 05 Nov 2012 18:38:31 +0530 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/23.2 (gnu/linux) |
Suvayu Ali <fatkasuvayu+linux@gmail.com> writes:
> Hi,
>
> I sometimes have to deal with files created on Windows or Mac OSX. When
> using emacs with X windows, I can click on the `(Mac)' or `(MS-DOS)'
> marker on the bottom left corner of the frame to switch to whichever
> style I want at the moment.
>
> How do I do this when running emacs as `emacs -nw'? I tried looking for
> end-of-line with apropos, but could not find anything that seemed
> relevant. Any ideas?
>From (info "(emacs) Text and Binary")
,----
| To visit a file and specify whether it uses DOS-style or Unix-style
| end-of-line, specify a coding system (*note Text Coding::). For
| example, `C-x <RET> c unix <RET> C-x C-f foobar.txt' visits the file
| `foobar.txt' without converting the EOLs; if some line ends with a
| carriage-return linefeed pair, Emacs will display `^M' at the end of
| that line. Similarly, you can direct Emacs to save a buffer in a
| specified EOL format with the `C-x <RET> f' command. For example, to
| save a buffer with Unix EOL format, type `C-x <RET> f unix <RET> C-x
| C-s'. If you visit a file with DOS EOL conversion, then save it with
| Unix EOL format, that effectively converts the file to Unix EOL style,
| like `dos2unix'.
`----
>
> Thanks,
--