Like you said though, it doesn’t only appear in Nautilus. It outright aggravates me when I see it in Nautilus, but it also bothers me to a lesser extent when I see it in, as you pointed out that it’s used in, LibreOffice. And it bothers me in PureBrowser. And it bothers me in the image viewers that do it. And it bothers me in other applications that list files.
You mention wanting the option to enable this sorting behaviour in certain circumstances. I am absolutely in favour of making this an option and being able to enable or disable it wherever we please. But for me, that only helps if that ability to enable/disable it is accepted into some project that I’m getting the software from. It it was accepted upstream by the GNOME project - which the GNOME team has made clear isn’t happening - I could disable the feature without editing the source and recompiling. If it was accepted as a distribution-specific patch in either Debian or PureOS, I again wouldn’t need to run a custom version of the software specific to my machine.
However, if I’m editing the source code and running a version custom to me specifically, there is absolutely zero advantage in limiting myself to disabling this only in certain places. It takes a lot more effort to edit it out of each and every package individually, and on my system, this behaviour is unwanted in any place whatsoever. This is never the sorting algorithm I would choose. I find it very difficult to work with in a few cases, and a mild nuisance in all the rest. I understand that for some people and for some use cases, this obnoxious sorting algorithm can actually provide value, which is why I would love to have it as an optional feature instead of having it patched out of the upstream source code entirely. But if I have to patch the source code and recompile for my local machine, there’s no reason not to completely purge my system of this algorithm.
If upstream - any of the three points I know of upstream from me, really (GNOME, Debian, or PureOS) - implemented the wrapper and configuration option you mentioned, that would be absolutely fantastic. It’d be sad to see it only in Nautilus, but that’d be far better than the current situation. I have no idea how to write code for that myself though. I still can’t get the algorithm to do custom work for me yet, let alone have it check user settings and other more-complex tasks. That said, if upstream hasn’t fixed this by the time I’ve managed to replace this algorithm with one that not only stops the stupid digit-handling, but also enforces case sensitivity in applications that redundantly apply case insensitivity, I’ll be patching all my future copies of glib too. At that point, I’ll have the knowledge I need to force all applications that use g_utf8_collate_key_for_filename() to sort files in Unicode point order, even the ones that lack configuration options, and I’m not going to want to give that proper filename sorting up again. Having this as a per-application configuration option would be nice, but no application I know of that uses g_utf8_collate_key_for_filename() even offers the option to turn it off at all. They all just sort of assume that the user is going to be okay with certain characters being treated as somehow special and different from other characters.
This obnoxious sorting algorithm has been the bane of my computing existence for years. The entire reason I switched to LXDE on my other machine was just to rid the file manager of this mess. Otherwise, I’d still be on Xfce. In fact, now that I’ve got a working method here, I’ve switched the other laptop back to Xfce. I like that desktop a lot better. The sorting algorithm still showed up in other applications, such as Firefox and the LibreOffice suite, but while I put up with it in these places, it was never ideal. I brought it up here in the PureOS forums because now I’m on a PureOS machine and PureOS is GNOME-centric, but if it weren’t for this machine coming with PureOS and my desire to at least make an honest attempt to get PureOS to be a functional system, I wouldn’t even use GNOME at all. Even without this problem, GNOME3 isn’t something I particularly like, but the rest, I can at least tolerate.
I feel like I’ve made a lot of progress here. With this algorithm patched out, PureOS is definitely something I can get used to and even enjoy using. I still have a few other issues I’d like to bring up in the forum when I have time, but they’re all minor issues, and even if I can’t get them fixed, it’ll be plenty easy to just deal with them.