help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to get rid of annoying ^M lineendings


From: Eli Zaretskii
Subject: Re: How to get rid of annoying ^M lineendings
Date: Wed, 23 Apr 2008 07:59:19 +0300

> From: olgo <Ola.Gook@gmail.com>
> Date: Tue, 22 Apr 2008 06:50:49 -0700 (PDT)
> 
> I keep reading solutions to this problem by means of substituting the
> line endings with a global replace but this is not what I need.
> I need for the files to be kept as they are, with all kinds of line
> endings, but I don't want to see it in the editor.
> 
> Thus, my question is:
> Is there a way to tell emacs not to show the ^M character altogether?

This should happen automatically, unless you have a file with
inconsistent lineendings: some with ^M, others without.  Typing "C-x
RET c dos RET" immediately before "C-x C-f" that you use to visit the
file will cause Emacs to not display any ^M characters, even if the
lineendings are inconsistent, but if you edit that file and save it,
Emacs will add a ^M character to each line when it saves the file,
which might not be what you want in this case.

IOW, Emacs cannot remember whether there should be a ^M character on a
line by line basis, only for the whole file.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]