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

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

Re: How to see the raw line endings in a file?


From: Eli Zaretskii
Subject: Re: How to see the raw line endings in a file?
Date: Sun, 31 Mar 2019 20:44:55 +0300

> From: Steinar Bang <address@hidden>
> Date: Sun, 31 Mar 2019 19:33:53 +0200
> 
> > Emacs never hides CRLF EOLs unless it says "DOS" in the mode line.  If
> > your file has mixed EOL format, then either you will see "DOS" in the
> > mode line or some of the lines will have ^M characters at their end.
> 
> This is what I have been trusting to be happening for many years.
>  1. I see no "DOS" in the mode line before running the commands
>  2. I see a mix of lines with and without ^M after running the commands

Then why are you saying that Emacs hides CR characters from you?  It
does show them as those ^Ms.

In general, when a  file has mixed EOLs,
what will show in the mode line and what in the buffer is determined
by sheer luck, because Emacs examines only a small portion of the file
to determine the EOL format, and depending on where you have CRLF and
where just LF you can end up with either "DOS" or ^M characters.



reply via email to

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