From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: hans bennekop Newsgroups: gmane.emacs.help Subject: Emacs on Windows: How to save line breaks in Unix style in undecided buffers by default. Date: Sun, 25 Jan 2009 13:59:08 +0100 Message-ID: <4c6bcfae0901250459v6ab06cf0o1dfc02f0d21fe9d2@mail.gmail.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1232899342 847 80.91.229.12 (25 Jan 2009 16:02:22 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 25 Jan 2009 16:02:22 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sun Jan 25 17:03:34 2009 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1LR7RI-0005XD-Rq for geh-help-gnu-emacs@m.gmane.org; Sun, 25 Jan 2009 17:02:25 +0100 Original-Received: from localhost ([127.0.0.1]:42017 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LR7Q1-0002Ig-Cq for geh-help-gnu-emacs@m.gmane.org; Sun, 25 Jan 2009 11:01:05 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LR4a0-0007pL-C7 for help-gnu-emacs@gnu.org; Sun, 25 Jan 2009 07:59:12 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LR4Zy-0007nQ-MM for help-gnu-emacs@gnu.org; Sun, 25 Jan 2009 07:59:11 -0500 Original-Received: from [199.232.76.173] (port=41157 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LR4Zy-0007n5-Ih for help-gnu-emacs@gnu.org; Sun, 25 Jan 2009 07:59:10 -0500 Original-Received: from fk-out-0910.google.com ([209.85.128.188]:20722) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1LR4Zy-0007US-0s for help-gnu-emacs@gnu.org; Sun, 25 Jan 2009 07:59:10 -0500 Original-Received: by fk-out-0910.google.com with SMTP id 19so2143526fkr.10 for ; Sun, 25 Jan 2009 04:59:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:mime-version:received:date:message-id:subject :from:to:content-type:content-transfer-encoding; bh=AMoIjwZpuFibu4VipL61ACOhNtkLHa0RYuwEy0SF7C8=; b=Z7Pbr6b4mqkgRgnGJZ2p8hc6Lmbzq4IJoOQFDmhyYy8A+/HDIpWJ77dJV8yWAg+gzT /ECkNInQku7mkt17WP8cKreewthVM3k7IdCYVkUD7lQD4XolSGpJMdln/cv7F7QpPIQX NtBfzsUieb8/yX62qNXMUwpXdX74dtvdz4sSw= DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type :content-transfer-encoding; b=E7HdxVynkgVF79QWPcUnw6EZi/n+B6ySea72n+jce/vU7QAeYa/iokzKFBh8DZa6KF Ugud3i8aCM+NmfOO6lzLMkYwjRrWhS+btlMb4r9Q/gSvW+xkItgL9L8Va/HI3IXu6osI ahoINgQr+1xjTHsi4kJcbOlkD5XWUYMp0OpKA= Original-Received: by 10.103.117.9 with SMTP id u9mr566817mum.55.1232888348053; Sun, 25 Jan 2009 04:59:08 -0800 (PST) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2) X-Mailman-Approved-At: Sun, 25 Jan 2009 10:59:24 -0500 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:61622 Archived-At: In unsaved buffers that are not linked to a file the end-of-line style is 'undecided'. In this case Emacs saves line breaks in DOS style (crlf) on Windows. How can I set it up to use Unix line breaks (lf) by default? Calling (prefer-coding-system 'utf-8-unix) or setting "" in file-coding-system-alist to 'undecided-unix works as a quick fix, but also causes DOS style files to be opened as Unix style files, which is rather annoying. Thank you! Hans