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

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

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


From: David Starks-Browning
Subject: [h-e-w] Whoops that was supposed to be a Unix file
Date: Fri, 14 Jun 2002 18:31:07 +0100

On Friday 14 Jun 02, Peter Fraser writes:
> How do I get Emacs running on Win XP to write a
> file out as a unix file not a dos file?

For new buffers to be created with UNIX endings instead of
DOS endings, I have this in my ~/.emacs:

    (setq-default buffer-file-coding-system 'undecided-unix)

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

For that, I recommend Francis Wright's excellent "eol-conversion.el"
which you can find at <http://centaur.maths.qmw.ac.uk/Emacs/>

> Also I would like to know the inverse as
> well. How do I read a file in without
> having the ^M deleted?

They're probably not deleted, rather just not shown.

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

eol-conversion will do that for you too.

Have fun.

Regards,
David




reply via email to

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