M2 icon indicating copy to clipboard operation
M2 copied to clipboard

Case (in)sensitive files in macOS

Open mahrud opened this issue 1 year ago • 7 comments

M2 shouldn't confused a file in the same directory named elimination.m2 with the package Elimination.m2, even if it's running on macOS. This causes too many head scratching confusions for people.

mahrud avatar Feb 27 '24 02:02 mahrud

The mac os x filesystem is case-ionsensitive. There's no way to tell.

Users of mac os x are aware of that.

DanGrayson avatar Feb 27 '24 21:02 DanGrayson

Here is the top link on google: https://stackoverflow.com/a/69828765/14107885

mahrud avatar Feb 27 '24 23:02 mahrud

This would be nice to implement. I thought we could not find easily this information. We are now using c++17, so we should be able to use this.

mikestillman avatar Feb 28 '24 01:02 mikestillman

Even without this solution, somehow macOS can show you your files with the correct capitalization when you open a file browser or type ls, right? Then you can also get the filename with correct capitalization as a string and compare the strings in M2 before you decide to load the file or look in the next directory on path.

mahrud avatar Feb 28 '24 02:02 mahrud

One has to be a bit careful:

bash-3.2$ ls
lecture.m2
bash-3.2$ ls LecTure.m2
LecTure.m2

But it is true that emacs on MacOS is mostly case sensitive (i.e. if you do ^X^F and give a filename to open, if it is the wrong capitalization, it fixes it for you.

mikestillman avatar Feb 28 '24 02:02 mikestillman