[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: How to see the raw line endings in a file?
From: |
Stefan Monnier |
Subject: |
Re: How to see the raw line endings in a file? |
Date: |
Sun, 31 Mar 2019 16:08:39 -0400 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) |
>> 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
So your input file is using Unix line-endings and apparently the command
you run copies some of the input with those (LF) line-endings to the
output and also outputs some of its own text with its own (CRLF)
line-endings line-endings, hence a mix of the two in the output.
You can probably circumvent the problem either by tweaking the command
so that it uses LF line-endings for its own text, or changing the input
so that it uses CRLF line-endings.
Stefan
RE: How to see the raw line endings in a file?, Drew Adams, 2019/03/31