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: David Kastrup
Subject: Re: mac/dos/unix newline conversion without specify from
Date: Wed, 05 Dec 2007 17:25:35 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.50 (gnu/linux)

Xah Lee <address@hidden> writes:

> Xah Lee wrote:
> <<Carbon Emacs 22 and also Aquamacs (launched with -q), does not open a
> file with classic Mac OS line endings properly? (i.e.  EOL shows up as
> ^M)>>
>
> David Kastrup:
> <<More likely than not, you have a file with inconsistent line end
> characters.  In that case, Emacs has to choose "-unix" line encoding
> or it would change the file when writing it back to disk.>>
>
> jackpot :)

Huh?  Inconsistent with what you write now:

> 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.

It does switch to Mac endings here in this case.  Just tried it.

> given the current situation, how to instruct emacs (as a user) to open
> a file with CR as EOL?

You can always do something like C-x RET c latin-1-mac RET C-x C-f file RET
but again: this should not be necessary at all.

-- 
David Kastrup, Kriemhildstr. 15, 44793 Bochum


reply via email to

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