[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Aw: Re: Default line endings on Mac

From: Markus Mützel
Subject: Aw: Re: Default line endings on Mac
Date: Thu, 10 Jan 2019 20:21:11 +0100

Am Donnerstag, 10. Januar 2019 um 19:57 Uhr schrieb "John W. Eaton":
> On 1/10/19 12:54 PM, Andrew Janke wrote:
> > Hi, Octave maintainers,
> > 
> > On macOS, at least with a Qt build, the default EOL mode for Octave as 
> > of 4.4.1 is "Mac (CR)".
> > 
> > I think this might be an archaism: "Mac" (\r) EOL mode text files were 
> > used by pre-OS X Mac OSes like Mac OS 9. Since the switch to the 
> > Unix-based OS X, Mac programs generally default to Unix style (\n) line 
> > endings. You can verify this by opening TextEdit and creating a new 
> > plain text file: it uses \n EOLs.
> > 
> > Having files created in legacy Mac (\r) mode makes it a bit harder to 
> > use Unix command line tools and stuff like GitHub with those files.
> > 
> > Can/should Octave be changed to default to Unix (\n) EOLs on macOS?
> If that is what is currently used by default on macos by other 
> applications then I think we should switch.  We would, of course, still 
> support files with CR line endings, but create new files with LF.

The attached patch should change the default EOL to LF for Mac.
But I don't have a Mac to check if it actually works.

> Do we currently detect the line endings in the file and try to match the 
> usage?  If not, should we?  How difficult would it be?

I believe such a check is already done in file_editor_tab::detect_eol_mode.

> Now, if Windows would just abandon CRLF in favor of LF only...

I hear you. And UTF-8 as a working encoding. Or better yet the default...


Attachment: EOL_Mac.patch
Description: Binary data

reply via email to

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