From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.help Subject: Re: How to get rid of ^M at end of line Date: Sat, 10 Oct 2009 20:13:52 +0200 Message-ID: <83hbu7jevz.fsf@gnu.org> References: NNTP-Posting-Host: lo.gmane.org X-Trace: ger.gmane.org 1255198355 30730 80.91.229.12 (10 Oct 2009 18:12:35 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 10 Oct 2009 18:12:35 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sat Oct 10 20:12:26 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 1MwgQb-0004tw-Vg for geh-help-gnu-emacs@m.gmane.org; Sat, 10 Oct 2009 20:12:26 +0200 Original-Received: from localhost ([127.0.0.1]:36239 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MwgQa-00050i-PJ for geh-help-gnu-emacs@m.gmane.org; Sat, 10 Oct 2009 14:12:24 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MwgQC-00050R-KI for help-gnu-emacs@gnu.org; Sat, 10 Oct 2009 14:12:00 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MwgQB-000504-Pu for help-gnu-emacs@gnu.org; Sat, 10 Oct 2009 14:12:00 -0400 Original-Received: from [199.232.76.173] (port=53939 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MwgQB-000500-Mv for help-gnu-emacs@gnu.org; Sat, 10 Oct 2009 14:11:59 -0400 Original-Received: from mtaout5.012.net.il ([84.95.2.13]:35984) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MwgQB-0003rR-CM for help-gnu-emacs@gnu.org; Sat, 10 Oct 2009 14:11:59 -0400 Original-Received: from conversion-daemon.i_mtaout5.012.net.il by i_mtaout5.012.net.il (HyperSendmail v2004.12) id <0KRB0010092SIB00@i_mtaout5.012.net.il> for help-gnu-emacs@gnu.org; Sat, 10 Oct 2009 20:11:58 +0200 (IST) Original-Received: from HOME-C4E4A596F7 ([87.70.84.229]) by i_mtaout5.012.net.il (HyperSendmail v2004.12) with ESMTPA id <0KRB00A9U97V7L50@i_mtaout5.012.net.il> for help-gnu-emacs@gnu.org; Sat, 10 Oct 2009 20:11:56 +0200 (IST) In-reply-to: X-012-Sender: halo1@inter.net.il X-detected-operating-system: by monty-python.gnu.org: Solaris 9.1 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:68815 Archived-At: > Date: Sat, 10 Oct 2009 19:14:52 +0200 > From: bar tomas > > I'm working on windows xp, and I get ^M characters at the end of each > line- In fact, every time I open the document I get an additional ^M > at the end of each line. I've tried to use Replace '^M', but it > doesn't work (replaces nothing) > I've noticed that Ctrl end-of-line is set to Unix when I start Emacs, Does this (the "Unix" EOL mode-line indicator and the ^M characters) happen to you in "emacs -Q"? (They shouldn't.) If in "emacs -Q" the problem goes away, something in your .emacs init file causes this. > What should I write in my emacs init file to set Ctrl end-of-line > permanently to DOS (if this is the problem)? It's rather what you should NOT write in the init file, I think. Emacs by default preserves the EOL format of existing files, so it should set EOL to -dos when it visits a file automatically.