From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.help Subject: Re: How to see the raw line endings in a file? Date: Sun, 31 Mar 2019 20:18:52 +0300 Message-ID: <83r2angdxf.fsf@gnu.org> References: <865zrzhtya.fsf@dod.no> Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="194987"; mail-complaints-to="usenet@blaine.gmane.org" To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sun Mar 31 19:19:00 2019 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hAe6m-000oaX-6W for geh-help-gnu-emacs@m.gmane.org; Sun, 31 Mar 2019 19:19:00 +0200 Original-Received: from localhost ([127.0.0.1]:52455 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hAe6l-0006zM-2H for geh-help-gnu-emacs@m.gmane.org; Sun, 31 Mar 2019 13:18:59 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:41848) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hAe6Z-0006z5-Vw for help-gnu-emacs@gnu.org; Sun, 31 Mar 2019 13:18:48 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:58312) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hAe6Y-0004K1-9V for help-gnu-emacs@gnu.org; Sun, 31 Mar 2019 13:18:47 -0400 Original-Received: from [176.228.60.248] (port=3058 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1hAe6X-0000ZK-E5 for help-gnu-emacs@gnu.org; Sun, 31 Mar 2019 13:18:46 -0400 In-reply-to: <865zrzhtya.fsf@dod.no> (message from Steinar Bang on Sun, 31 Mar 2019 18:47:25 +0200) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.org gmane.emacs.help:119795 Archived-At: > From: Steinar Bang > 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) > https://github.com/steinarb/authservice > 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.