Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Removing those pesky carriage returns (^M)

0 views
Skip to first unread message

Samuel Thomas

unread,
Apr 20, 2001, 9:30:02 AM4/20/01
to
Does anyone know the emacs command to remove these things?
I've heard that one exists.

thanks,
sam



Kai Großjohann

unread,
Apr 20, 2001, 9:47:22 AM4/20/01
to
On 20 Apr 2001, Samuel Thomas wrote:

> Does anyone know the emacs command to remove these things?
> I've heard that one exists.

Query-replace: M-% C-q C-m RET RET
C-q C-m allows you to enter a literal C-m character.

Tell Emacs to save the file in Unix format: C-x C-m f undecided-unix
RET C-x C-s
C-x C-m f tells Emacs to set the coding system for the buffer, which
is used on the next save.

Normally, Emacs should recognize files with DOS line endings, tell you
about it in the mode line (with `(DOS)') and save the files again.

You can use file-coding-system-alist to tell Emacs which coding
systems to use for reading and writing files based on the file name.

kai
--
The passive voice should never be used.

Jörg Wulkau

unread,
Apr 20, 2001, 3:52:33 PM4/20/01
to
You can replace (<Ctrl><Alt>%) this string with an empty string

Samuel Thomas schrieb:

0 new messages