[OS X Emacs] Re: opening old mac files (CR end of line char)

Bill Rising brising at mac.com
Wed Dec 5 17:14:02 EST 2007


On Dec 5, 2007, at 11:46 , Edward O'Connor wrote:

> Bill Rising wrote:
>
>> When the ^M's show up:
>> 1. Make a text file with the default unix eols.
>> 2. Change eols using M-x replace-string
>> C-q C-j RET C-q C-m RET.
>> 3. Save the file.
>> 4. Open the file.
>> Result: Instead of the file being opened as a Mac file, it is opened
>> with encoding nil and shows ^Ms.
>
> What do you have `require-final-newline' set to? If it's non-null, at
> step 3 a ^J might be inserted at the end of the file, thus throwing  
> off
> Emacs' EOL detection in step 4.

True enough. One of those things that get set secretly by various modes.

Thanks.

Bill
  



More information about the MacOSX-Emacs mailing list