From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Joe Fineman Newsgroups: gmane.emacs.help Subject: Re: Removing control M Date: Fri, 28 Feb 2014 18:02:23 -0500 Organization: A noiseless patient Spider Message-ID: <841tymlu2o.fsf@verizon.net> References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1393628716 29245 80.91.229.3 (28 Feb 2014 23:05:16 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 28 Feb 2014 23:05:16 +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 Mar 01 00:05:25 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 1WJWUc-0000r0-Ab for geh-help-gnu-emacs@m.gmane.org; Sat, 01 Mar 2014 00:05:22 +0100 Original-Received: from localhost ([::1]:53536 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WJWUb-0006TO-Sr for geh-help-gnu-emacs@m.gmane.org; Fri, 28 Feb 2014 18:05:21 -0500 Original-Path: usenet.stanford.edu!news.kjsl.com!feeder.erje.net!eu.feeder.erje.net!eternal-september.org!feeder.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 18 Injection-Info: mx05.eternal-september.org; posting-host="685da96b411be29c8310b51a98f3cb4a"; logging-data="9167"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/Z9YAA5lgPZWUlfuy7deaj" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (windows-nt) Cancel-Lock: sha1:2xRxZjRTsZnBlXResQ7g5fCwNSo= sha1:UeqyrYKQjzeM1MGK+5Hu4EoDlKc= Original-Xref: usenet.stanford.edu gnu.emacs.help:203963 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:96232 Archived-At: peaches20 writes: > I've transferred several dos files to unix. I now have the control M > at tne end of the line. How does one remove this globally. I tried > the dos2unis but that is not in my emacs commands. I wrote this little utility some years ago & have used it ever since: (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 joe_f@verizon.net ||: Sexual morality is properly a department of hospitality. :||