[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Problem with UNIX/DOS issue on Emacs for Windows
From: |
Jason Rumney |
Subject: |
Re: Problem with UNIX/DOS issue on Emacs for Windows |
Date: |
Thu, 28 Jul 2005 22:38:08 +0100 |
User-agent: |
Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (windows-nt) |
exits funnel <exitsfunnel@yahoo.com> writes:
> So, what's going on? On what does emacs base the
> determination that the one file is a unix file while
> hte other is not?
The line ends are inconsistent. Or there is a ^M in the middle
of a line somewhere. If this is deliberate (part of a string maybe),
you should probably use "\x0d" instead.
> How can I fix it?
There may be better ways, but usually I use the following method to
repair such files (do not type any spaces, they are just seperating
keystrokes for clarity):
Keystrokes Explanation
M-< Ensure you are starting at the beginning of the file.
M-% C-q C-m RET RET Replace all ^M characters with nothing.
C-x RET f d o s RET Set the file to DOS mode.
C-x C-s Save the repaired file.
You can omit the third step if you don't mind the file having Unix line
ends.