spyder-ide / spyder

Official repository for Spyder - The Scientific Python Development Environment
https://www.spyder-ide.org
MIT License
8.21k stars 1.59k forks source link

Make "Sort files according to full path" case-insensitive on Windows #2785

Open cmeeren opened 8 years ago

cmeeren commented 8 years ago

Description

What steps will reproduce the problem?

I don't really know how I managed it, but I opened a file where the path ended up all lowercase (in reality the path contained mixed case). This file was not sorted adjacent to other files from the same folder.

What is the expected output? What do you see instead?

I expect files from the same folder to be shown adjacent to each other in the tab bar, regardless of the case shown in the title of the Editor pane (on Windows).

Please provide any additional information below

Version and main components

pyflakes >=0.5.0   :  0.8.1 (OK)
pep8 >=0.6         :  1.6.2 (OK)
pygments >=1.6     :  2.0.2 (OK)
IPython >=1.0      :  3.0.0 (OK)
zmq >=2.1.11       :  14.5.0 (OK)
pandas >=0.13.1    :  0.16.1 (OK)
sphinx >=0.6.6     :  1.2.3 (OK)
rope >=0.9.2       :  0.9.4 (OK)
jedi >=0.8.1;<0.9.0:  0.8.1 (OK)
matplotlib >=1.0   :  1.4.2 (OK)
sympy >=0.7.3      :  0.7.6 (OK)
pylint >=0.25      :  1.4.1 (OK)
Nodd commented 8 years ago

It should be the case on Linux too, case shouldn't change the alphabetical order.

cmeeren commented 8 years ago

@Nodd, file names on Linux are (to my knowledge) case sensitive, so different cases would actually mean different paths. For example, you can have three files called foo, Foo and FoO in the same folder. You can't on Windows.

Nodd commented 8 years ago

Yes, I understand, but I would still like to see bar/foo.py and Baz/foo.py not far from each other. The path are different but should be sorted with insensitive case. Also it's quite common to search for a directory without remembering if there was a capital letter or not. So it's needed on Window, and it's useful on Linux !

cmeeren commented 8 years ago

So for sorting on Linux, you'd like case-sensitive ordering but according to AaBbCc instead of ABCabc?

Nodd commented 8 years ago

Initially I thought about having the same case-insensitive ordering on all platforms, but there are subtle differences with AaBbCc. For example the ordering of A/a.py, a/b.py, A/c.py would be wrong on Linux with case-insensitive ordering.

cmeeren commented 8 years ago

What I meant by AaBbCc would apply to the full path, so it would be A/a.py, A/c.py, a/b.py.

Anyhow, case insensitive sorting on Linux is more a feature request than a bug report, whereas on Windows it's more of a bug since Windows paths/filenames are case insensitive. I suggest we stick to Windows in this issue.