[Top][All Lists]

[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:18:52 +0300

> From: Steinar Bang <address@hidden>
> Date: Sun, 31 Mar 2019 18:47:25 +0200
> Is there a way in emacs where I can be sure that I see that the files
> have line endings of a particular form? 
> Ie. DOS style cr lf or unix-ish style with just lf?
> I'm normally looking for emacs telling me with a "DOS" in the status
> line, that a file actually has cr lf line endings.
> But now I have some files with no "DOS" in the status line where weird
> stuff is happening:
>  1. Everytime I do something with the maven-release-plugin on this
>     project, line endings are messed up (most of the lines, but not all,
>     get cr lf)
>  2. When I have googled I haven't found any relevant matches.  The only
>     matches have been when trying to run releases on Windows, where one
>     of the suggestions have been "do the release in a GNU/linux VM"
>  3. However, I do the releases on debian GNU/linux
> My conclusion from that is that there is something weird with the line
> endings on my project's pom.xml files.  However, if that is the case,
> then emacs is hiding the issues from me.

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.

If you see neither of these, then it isn't Emacs that converts some
lines to DOS CRLF format, it's some other program.  And you didn't
describe in enough detail what you do to try guessing more.

reply via email to

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