From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: "Eli Zaretskii" Newsgroups: gmane.emacs.help Subject: Re: Can I change the way emacs saves text files? Date: Sat, 21 Feb 2004 11:38:23 +0200 Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Message-ID: <7137-Sat21Feb2004113823+0200-eliz@elta.co.il> References: Reply-To: Eli Zaretskii NNTP-Posting-Host: deer.gmane.org X-Trace: sea.gmane.org 1077356505 10388 80.91.224.253 (21 Feb 2004 09:41:45 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sat, 21 Feb 2004 09:41:45 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sat Feb 21 10:41:39 2004 Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1AuTdj-0005YW-00 for ; Sat, 21 Feb 2004 10:41:39 +0100 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.30) id 1AuTcD-0008Tu-0D for geh-help-gnu-emacs@m.gmane.org; Sat, 21 Feb 2004 04:40:05 -0500 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.30) id 1AuTbT-0008Or-1b for help-gnu-emacs@gnu.org; Sat, 21 Feb 2004 04:39:19 -0500 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.30) id 1AuTas-0007ww-Nu for help-gnu-emacs@gnu.org; Sat, 21 Feb 2004 04:39:14 -0500 Original-Received: from [192.114.186.18] (helo=bilbo.inter.net.il) by monty-python.gnu.org with esmtp (Exim 4.30) id 1AuTas-0007w7-1H for help-gnu-emacs@gnu.org; Sat, 21 Feb 2004 04:38:42 -0500 Original-Received: from zaretski (pns03-202-138.inter.net.il [80.230.202.138]) by bilbo.inter.net.il (MOS 3.4.4-GR) with ESMTP id CMO31583; Sat, 21 Feb 2004 11:38:36 +0200 (IST) Original-To: help-gnu-emacs@gnu.org X-Mailer: emacs 21.3.50 (via feedmail 8 I) and Blat ver 1.8.9 In-reply-to: (mikas493_no_s_p_a_m_@student.liu.se) X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.2 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: main.gmane.org gmane.emacs.help:17042 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:17042 > From: "William Payne" > 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.