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: Xah Lee
Subject: Re: mac/dos/unix newline conversion without specify from
Date: Wed, 5 Dec 2007 08:16:14 -0800 (PST)
User-agent: G2/1.0

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 :)

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.

If i open the file in TextWrangler, TextEdit, Xcode, they open fine
and indicate that mac os line ending are used.

-----------------

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

(am interested in this answer for my emacs tutorial)

  Xah
  xah@xahlee.org
\xAD\xF4 http://xahlee.org/

On Dec 5, 7:05 am, David Kastrup <d...@gnu.org> wrote:
> XahLee<x...@xahlee.org> writes:
> >XahLeewrote:
>
> > David Reitter wrote:
> > <<I just tried it and it works for me (Aquamacs from CVS). The coding
> > shows up as "Mac" in the mode-line.>>
>
> > I was able to reproduce this 100% on Carbon emacs and aquamacs without
> > customization (emacs -q).
>
> 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.
>
> --
> David Kastrup, Kriemhildstr. 15, 44793 Bochum



reply via email to

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