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

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

Re: [h-e-w] Whoops that was supposed to be a Unix file


From: Dr Francis J. Wright
Subject: Re: [h-e-w] Whoops that was supposed to be a Unix file
Date: Fri, 14 Jun 2002 18:33:06 +0100

From: "Peter Fraser" <address@hidden>
To: <address@hidden>
Sent: Friday, June 14, 2002 6:17 PM
Subject: [h-e-w] Whoops that was supposed to be a Unix file


> How do I get Emacs running on Win XP to write a
> file out as a unix file not a dos file?
> I normally find my self in this position
> when the file has had ^M's added to it
> and I now need the ^M's removed.
>
> Also I would like to know the inverse as
> well. How do I read a file in without
> having the ^M deleted?
>
> Or the other possibility, Emacs has decided
> that I have a UNIX file and I want a dos
> file. (I know I can just add a ^M at the
> end of each line and just write the file
> for this case).

Emacs doesn't add or remove ^Ms automatically, but it hides them in a DOS
file, so it preserves the DOS or UNIX nature whilst also preserving
readability.  (A file with inconsistent line endings is usually assumed to
be a UNIX file that contains some ^Ms.  I find such files are generated
sometimes when several processes write to the same file in sequence and they
don't all behave the same way.)  If you want to change explicitly between
DOS and UNIX (and Mac if you really want) you can do it using the coding
system.  Since I can never remember the appropriate invocation, I wrote some
menu support (eol-conversion.el), which you can get from my web site.

Francis

---

Dr Francis J. Wright
School of Mathematical Sciences, Queen Mary
University of London, Mile End Road, London E1 4NS, UK
Tel: 020 7882 5453 (direct);  Fax: 020 8981 9587 (dept.)
address@hidden;  http://centaur.maths.qmul.ac.uk/





reply via email to

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