unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* How to delete ^M
@ 2003-05-12  5:45 Wang, Zhu
  0 siblings, 0 replies; 8+ messages in thread
From: Wang, Zhu @ 2003-05-12  5:45 UTC (permalink / raw)


Hello,

I am frustrated by a probably very simple problem:

Each line of a file ended by ^M. I think this is caused by 'ENTER'. How can I delete them simultaneously?

Thanks for your help.

Zhu Wang

Southern Methodist University

^ permalink raw reply	[flat|nested] 8+ messages in thread
[parent not found: <mailman.5996.1052718263.21513.help-gnu-emacs@gnu.org>]
* RE: How to delete ^M
@ 2003-05-13  2:53 Wang, Zhu
  0 siblings, 0 replies; 8+ messages in thread
From: Wang, Zhu @ 2003-05-13  2:53 UTC (permalink / raw)


[-- Attachment #1: Type: text/plain, Size: 951 bytes --]

Thanks,
 
Zhu Wang

	-----Original Message----- 
	From: Eric Hanchrow [mailto:offby1@blarg.net] 
	Sent: Mon 5/12/2003 5:59 PM 
	To: help-gnu-emacs@gnu.org 
	Cc: 
	Subject: Re: How to delete ^M
	
	


	    Each line of a file ended by ^M. I think this is caused by
	    'ENTER'. How can I delete them simultaneously?
	
	Here's what I use:
	
	    (defun strip ()
	      "Ensures that when the current buffer is saved, lines will not end
	    with carriage returns.  Does so by setting the coding system to
	    raw-text-unix."
	      (interactive)
	      (set-buffer-file-coding-system 'raw-text-unix))
	
	--
	
	      |\      _,,,---,,_
	ZZZzz /,`.-'`'    -.  ;-;;,_
	     |,4-  ) )-,_. ,\ (  `'-'
	    '---''(_/--'  `-'\_) fL
	        -- Igor Pechtchanski
	_______________________________________________
	Help-gnu-emacs mailing list
	Help-gnu-emacs@gnu.org
	http://mail.gnu.org/mailman/listinfo/help-gnu-emacs
	


[-- Attachment #2: Type: text/plain, Size: 151 bytes --]

_______________________________________________
Help-gnu-emacs mailing list
Help-gnu-emacs@gnu.org
http://mail.gnu.org/mailman/listinfo/help-gnu-emacs

^ permalink raw reply	[flat|nested] 8+ messages in thread
* RE: How to delete ^M
@ 2003-05-13  2:54 Wang, Zhu
  0 siblings, 0 replies; 8+ messages in thread
From: Wang, Zhu @ 2003-05-13  2:54 UTC (permalink / raw)


[-- Attachment #1: Type: text/plain, Size: 837 bytes --]

Thanks,
 
Zhu Wang

	-----Original Message----- 
	From: Joe Fineman [mailto:jcf@TheWorld.com] 
	Sent: Mon 5/12/2003 5:20 PM 
	To: help-gnu-emacs@gnu.org 
	Cc: 
	Subject: Re: How to delete ^M
	
	

	"Wang, Zhu" <zhuw@mail.smu.edu> 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.  ||
	_______________________________________________
	Help-gnu-emacs mailing list
	Help-gnu-emacs@gnu.org
	http://mail.gnu.org/mailman/listinfo/help-gnu-emacs
	


[-- Attachment #2: Type: text/plain, Size: 151 bytes --]

_______________________________________________
Help-gnu-emacs mailing list
Help-gnu-emacs@gnu.org
http://mail.gnu.org/mailman/listinfo/help-gnu-emacs

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2003-05-13  2:54 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-05-12  5:45 How to delete ^M Wang, Zhu
     [not found] <mailman.5996.1052718263.21513.help-gnu-emacs@gnu.org>
2003-05-12  6:16 ` Roodwriter
2003-05-12  6:24   ` Stein A. Stromme
2003-05-12  6:39     ` Roodwriter
2003-05-12 22:20 ` Joe Fineman
2003-05-12 22:59 ` Eric Hanchrow
  -- strict thread matches above, loose matches on Subject: below --
2003-05-13  2:53 Wang, Zhu
2003-05-13  2:54 Wang, Zhu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).