M2
M2 copied to clipboard
Case (in)sensitive files in macOS
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.
The mac os x filesystem is case-ionsensitive. There's no way to tell.
Users of mac os x are aware of that.
Here is the top link on google: https://stackoverflow.com/a/69828765/14107885
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.
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.
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.