From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Giorgos Keramidas Newsgroups: gmane.emacs.help Subject: Re: elisp to change line endings for new remote file Date: Tue, 07 Oct 2008 02:50:50 +0300 Organization: SunSITE.dk - Supporting Open source Message-ID: <87prmd1dwl.fsf@kobe.laptop> References: <06d7be73-e1e2-4640-b32f-4d5bd9103cd8@k36g2000pri.googlegroups.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1223340049 9258 80.91.229.12 (7 Oct 2008 00:40:49 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 7 Oct 2008 00:40:49 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Tue Oct 07 02:41:46 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 1Kn0e0-0007WZ-Mq for geh-help-gnu-emacs@m.gmane.org; Tue, 07 Oct 2008 02:41:44 +0200 Original-Received: from localhost ([127.0.0.1]:40961 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Kn0cu-00055Y-P1 for geh-help-gnu-emacs@m.gmane.org; Mon, 06 Oct 2008 20:40:36 -0400 Original-Path: news.stanford.edu!headwall.stanford.edu!newshub.sdsu.edu!feeder.erje.net!newsfeed.straub-nv.de!news-out1.kabelfoon.nl!newsfeed.kabelfoon.nl!xindi.nntp.kabelfoon.nl!news.banetele.no!dotsrc.org!filter.dotsrc.org!news.dotsrc.org!not-for-mail Original-Newsgroups: gnu.emacs.help User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (berkeley-unix) Cancel-Lock: sha1:y/LLQ1sSb/auXW6+795gxmatk3s= Original-Lines: 18 Original-NNTP-Posting-Host: 77.49.131.204 Original-X-Trace: news.sunsite.dk DXC=U5Lch=Zf]=b`; IS0i7S8TaYSB=nbEKnkkf2; 89Q0P2=bL^MjgbH?lJH1TkjlAXZ>Mdf0oWmn167V=Fn=hc Original-X-Complaints-To: staff@sunsite.dk Original-Xref: news.stanford.edu gnu.emacs.help:163111 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:58452 Archived-At: On Mon, 6 Oct 2008 10:07:50 -0700 (PDT), yary wrote: > Hello, > Hoping someone can write a line or two of elisp for my .emacs file > that will set the line endings to Unix for any new file opened via > tramp. 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. If you've already solved this in your setup, > please share. You can change teh line endings later. Type `C-x RET f' and then, at the prompt for a coding system, type the name of a coding system with the "-dos" or "-unix" suffix. For example, to convert a remote file to UTF-8 with Unix-style line endings, you can visit the file in a buffer and type: C-x RET f utf-8-unix RET