all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: help-gnu-emacs@gnu.org
Subject: Re: How to see the raw line endings in a file?
Date: Sun, 31 Mar 2019 20:44:55 +0300	[thread overview]
Message-ID: <83o95rgcq0.fsf@gnu.org> (raw)
In-Reply-To: <86wokfgd8e.fsf@dod.no> (message from Steinar Bang on Sun, 31 Mar 2019 19:33:53 +0200)

> From: Steinar Bang <sb@dod.no>
> 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	other threads:[~2019-03-31 17:44 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-31 16:47 How to see the raw line endings in a file? Steinar Bang
2019-03-31 17:18 ` Eli Zaretskii
2019-03-31 17:33   ` Steinar Bang
2019-03-31 17:44     ` Eli Zaretskii [this message]
2019-03-31 18:57       ` Steinar Bang
2019-03-31 19:09         ` Steinar Bang
2019-03-31 20:17           ` Eli Zaretskii
2019-03-31 19:10         ` Eli Zaretskii
2019-03-31 20:08     ` Stefan Monnier
2019-03-31 19:20 ` Drew Adams

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=83o95rgcq0.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=help-gnu-emacs@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.