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

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

Re: Can I change the way emacs saves text files?


From: Eli Zaretskii
Subject: Re: Can I change the way emacs saves text files?
Date: Sat, 21 Feb 2004 11:38:23 +0200

> From: "William Payne" <mikas493_no_s_p_a_m_@student.liu.se>
> Newsgroups: gnu.emacs.help
> Date: Fri, 20 Feb 2004 21:55:58 +0100
> 
> Well, if I do C-x C-f and "open" a file that doesn't exist I would like to
> be able to specify how it should be saved (windows or *nix style line
> breaks). I am using Emacs for Windows (I compiled Emacs from source myself)
> under Cygwin, and I want to save all files I create from within Emacs as
> unix files instead of Windows files as it is doing now.

Read the section in the on-line manual about text and binary files
(the node name is "Text and Binary").  It describes the
untranslated-file-system feature that does exactly what you want, and
allows to control this on a filesystem or directory basis.  That is,
you can tell Emacs that files created on a certain Windows drive or in
a certain directory and all its subdirectories should have Unix
end-of-line (EOL) format.

For an individual file, typing "C-x RET f unix RET" will cause it to
be saved in the Unix EOL format.  Likewise, "C-x RET f dos RET" will
cause it to be saved in the DOS/Windows EOL format.




reply via email to

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