From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Joe Fineman Newsgroups: gmane.emacs.help Subject: Re: How to delete ^M Date: 12 May 2003 18:20:14 -0400 Organization: The World : www.TheWorld.com : Since 1989 Sender: help-gnu-emacs-bounces+gnu-help-gnu-emacs=m.gmane.org@gnu.org Message-ID: References: NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: main.gmane.org 1052778281 3553 80.91.224.249 (12 May 2003 22:24:41 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Mon, 12 May 2003 22:24:41 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+gnu-help-gnu-emacs=m.gmane.org@gnu.org Tue May 13 00:24:40 2003 Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 19FLiq-0000v9-00 for ; Tue, 13 May 2003 00:24:40 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.10.13) id 19FLfN-0006T5-03 for gnu-help-gnu-emacs@m.gmane.org; Mon, 12 May 2003 18:21:05 -0400 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!newsfeed.icl.net!newsfeed.fjserv.net!out.nntp.be!propagator2-sterling!news-in-sterling.newsfeed.com!news-out.visi.com!petbe.visi.com!uunet!ash.uu.net!nntp.TheWorld.com!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 17 Original-NNTP-Posting-Host: ppp0c036.std.com Original-X-Trace: pcls3.std.com 1052777972 14341 208.192.102.36 (12 May 2003 22:19:32 GMT) Original-X-Complaints-To: abuse@TheWorld.com Original-NNTP-Posting-Date: Mon, 12 May 2003 22:19:32 +0000 (UTC) User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.1 Original-Xref: shelby.stanford.edu gnu.emacs.help:113137 Original-To: help-gnu-emacs@gnu.org X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1b5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Help: List-Post: List-Subscribe: , List-Archive: List-Unsubscribe: , Errors-To: help-gnu-emacs-bounces+gnu-help-gnu-emacs=m.gmane.org@gnu.org Xref: main.gmane.org gmane.emacs.help:9633 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:9633 "Wang, Zhu" writes: > Each line of a file ended by ^M. I think this is caused by > 'ENTER'. How can I delete them simultaneously? I have found the following tool useful: (defun ridm () "Remove intrusive CTRL-Ms from the buffer" (interactive) (save-excursion (goto-char (point-min)) (replace-string "\C-m\C-j" "\C-j"))) -- --- Joe Fineman jcf@TheWorld.com ||: Be inobviously tuitive. ||