help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: mac/dos/unix newline conversion without specify from


From: Stefan Monnier
Subject: Re: mac/dos/unix newline conversion without specify from
Date: Fri, 07 Dec 2007 17:30:45 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.50 (gnu/linux)

> what you described wouldn't work if the file is not opened correctly.

It also doesn't work if you want to cook an egg.  But that's not very
relevant, is it?  As you can see in the text I quoted, I was replying to
method that starts with "Open a unix file, ...".


        Stefan


> in particular, open a file with CR as line return but containing a LF
> as the last char. Then, open it in emacs and emacs will show ^M. At
> this point, changing the encoding as you described only changes the
> last char.

>  Xah

> On Dec 7, 8:27 am, Stefan Monnier <address@hidden> wrote:
>> > Open a unix file, do replace-string from LF to CR. Save the file. Then
>> > start emacs with -q, open the file. It doesn't interprete the file as
>> > a mac os classic file but instead display newline char as ^M.
>> 
>> That's a good method if you like to get into trouble.
>> 
>> For those who prefer to do things right, then you can C-x RET f mac RET
>> and then C-x C-s, or alternatively just click twice on the ":" in the
>> left part of the mode line (the first time makes it change from unix to
>> dos, the second from dos to mac).
>> 
>> Stefan



reply via email to

[Prev in Thread] Current Thread [Next in Thread]