unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: Steinar Bang <sb@dod.no>
To: help-gnu-emacs@gnu.org
Subject: Re: How to see the raw line endings in a file?
Date: Sun, 31 Mar 2019 21:09:52 +0200	[thread overview]
Message-ID: <86o95qhncv.fsf@dod.no> (raw)
In-Reply-To: <86sgv2hnws.fsf@dod.no> (Steinar Bang's message of "Sun, 31 Mar 2019 20:57:55 +0200")

>>>>> Steinar Bang <sb@dod.no>:
>>>>> Eli Zaretskii <eliz@gnu.org>:

>> 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.

> Hm... so, if the is not detected as "DOS" and I mainly look at the
> start of the file, then it looks like a unix file, but could have an
> CR further down...?

> Ok, thanks for the info.  I will investigate further and report back.

Hm... looks like existing cr's are not the cause, I grepped the source
and this is all that was found:
 sb@lorenzo:~/workspaces/ws03/authservice$ grep -r $'\r' * | grep -v node_modules | grep -v target
 Binary file authservice.web.security/src/main/resources/web/favicon.ico matches
 Binary file authservice.web.users.frontend/src/main/frontend/public/favicon.ico matches
 sb@lorenzo:~/workspaces/ws03/authservice$

(the node_modules and target directories I'm excluding, contains
downloaded files and/or files created by the maven build process)

Thanks for your help!



  reply	other threads:[~2019-03-31 19:09 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
2019-03-31 18:57       ` Steinar Bang
2019-03-31 19:09         ` Steinar Bang [this message]
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

  List information: https://www.gnu.org/software/emacs/

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

  git send-email \
    --in-reply-to=86o95qhncv.fsf@dod.no \
    --to=sb@dod.no \
    --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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).