From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Michael Heerdegen Newsgroups: gmane.emacs.help Subject: Re: How to get rid of annoying ^M lineendings Date: Fri, 18 Jul 2014 07:53:11 +0200 Message-ID: <87lhrr5i2g.fsf@web.de> References: <227a76ea-99a0-44cd-bb5f-e6c7b328e347@e67g2000hsa.googlegroups.com> <877ieoa5kz.fsf@xsteve.at> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1405662840 32148 80.91.229.3 (18 Jul 2014 05:54:00 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 18 Jul 2014 05:54:00 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Fri Jul 18 07:53:53 2014 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1X8179-0001cw-DS for geh-help-gnu-emacs@m.gmane.org; Fri, 18 Jul 2014 07:53:51 +0200 Original-Received: from localhost ([::1]:48128 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X8179-0007Sa-4U for geh-help-gnu-emacs@m.gmane.org; Fri, 18 Jul 2014 01:53:51 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:51077) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X816q-0007KG-V0 for help-gnu-emacs@gnu.org; Fri, 18 Jul 2014 01:53:40 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1X816j-0006GP-F2 for help-gnu-emacs@gnu.org; Fri, 18 Jul 2014 01:53:32 -0400 Original-Received: from plane.gmane.org ([80.91.229.3]:33285) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X816j-0006GF-7R for help-gnu-emacs@gnu.org; Fri, 18 Jul 2014 01:53:25 -0400 Original-Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1X816i-0001Vt-JO for help-gnu-emacs@gnu.org; Fri, 18 Jul 2014 07:53:24 +0200 Original-Received: from dslb-094-217-127-201.pools.arcor-ip.net ([94.217.127.201]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 18 Jul 2014 07:53:24 +0200 Original-Received: from michael_heerdegen by dslb-094-217-127-201.pools.arcor-ip.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 18 Jul 2014 07:53:24 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 18 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: dslb-094-217-127-201.pools.arcor-ip.net User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.92 (gnu/linux) Cancel-Lock: sha1:gEND8+Bmh4At/EuEHmO5vQTZByg= X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 80.91.229.3 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 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 Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:98738 Archived-At: scott.althoff@gmail.com writes: > Is there a way to execute this every time emacs starts? Why do you want to do this? Emacs handles different file encodings automatically (the line end convention is part of the coding system). Normally you don't need to do such things unless your files are garbled wrt encoding. If you always open files with the correct encoding - if Emacs guesses the wrong encoding, you can force the right one: (info "(emacs) Specify Coding") - then you don't ever need to perform any replacements in your files. Michael.