From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Peter Dyballa Newsgroups: gmane.emacs.help Subject: Re: elisp to change line endings for new remote file Date: Tue, 7 Oct 2008 11:43:31 +0200 Message-ID: References: <06d7be73-e1e2-4640-b32f-4d5bd9103cd8@k36g2000pri.googlegroups.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 (Apple Message framework v753.1) Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1223372965 26314 80.91.229.12 (7 Oct 2008 09:49:25 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 7 Oct 2008 09:49:25 +0000 (UTC) Cc: help-gnu-emacs@gnu.org To: yary Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Tue Oct 07 11:50:22 2008 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 1Kn9A1-0007Bw-LB for geh-help-gnu-emacs@m.gmane.org; Tue, 07 Oct 2008 11:47:21 +0200 Original-Received: from localhost ([127.0.0.1]:48262 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Kn98y-0006UI-2D for geh-help-gnu-emacs@m.gmane.org; Tue, 07 Oct 2008 05:46:16 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Kn97G-000642-Mt for help-gnu-emacs@gnu.org; Tue, 07 Oct 2008 05:44:30 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Kn97F-00063S-6v for help-gnu-emacs@gnu.org; Tue, 07 Oct 2008 05:44:30 -0400 Original-Received: from [199.232.76.173] (port=45755 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Kn97E-00063L-Qk for help-gnu-emacs@gnu.org; Tue, 07 Oct 2008 05:44:29 -0400 Original-Received: from fmmailgate03.web.de ([217.72.192.234]:57376) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Kn97E-0006q5-KZ for help-gnu-emacs@gnu.org; Tue, 07 Oct 2008 05:44:28 -0400 Original-Received: from smtp08.web.de (fmsmtp08.dlan.cinetic.de [172.20.5.216]) by fmmailgate03.web.de (Postfix) with ESMTP id 36CADEF2E763; Tue, 7 Oct 2008 11:43:38 +0200 (CEST) Original-Received: from [91.35.220.104] (helo=[192.168.1.2]) by smtp08.web.de with asmtp (TLSv1:AES128-SHA:128) (WEB.DE 4.109 #226) id 1Kn96Q-0003F4-00; Tue, 07 Oct 2008 11:43:38 +0200 In-Reply-To: <06d7be73-e1e2-4640-b32f-4d5bd9103cd8@k36g2000pri.googlegroups.com> X-Mailer: Apple Mail (2.753.1) X-Sender: Peter_Dyballa@web.de X-Provags-ID: V01U2FsdGVkX1+A8L1lovdqLR04lc0zKyh8Ut0cBSngD76oJD8k JmqeTme2gzI9HaGih0xMZwKUg4rTBvQXZuO2QqjCkIchxTi/v7 dK2Rlk25sjVWOhqEyF7A== X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.4-2.6 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:58473 Archived-At: Am 06.10.2008 um 19:07 schrieb yary: > I'm using GNU Emacs 23.0.60.1 on Windows, often creating Unix > files via plink, and usually forgetting to change the line endings > from DOS when I do. There is before-save-hook. It could be (time-stamp). You could add (via the customisation interface) another function that changes from DOS to UNIX file endings, (set-buffer-file-coding-system coding- system &optional force nomodify). Another option is to put into your init file: (prefer-coding-system 'utf-8-unix) although I doubt that this would change *existing* line endings. Can't plink be taught to prefer UNIX style line endings? If it's so dumb than you should learn to prefer GNU Emacs and TRAMP ... -- Greetings Pete Upgraded, adj.: Didn't work the first time.