When using ido-find-file (
C-x C-f) to navigate through directories, directories that have a hyphen in the name are listed before shorter matches with no hyphen. For example, if directories named "dir1" and "dir1-backup" are present, "dir1-backup" is selected first.
I could just customize
ido-ignore-directories to ignore names with -backup in them, but I'd like to understand why this is occurring in the first place. It seems like the shorter name should be listed first in general.
This seems to only be a problem if I'm using the variable
ido-file-extensions-order, but I don't see what file extensions have to do with directory names.
(setq ido-file-extensions-order '(".org" ".txt" ".py")) and dir1-backup is listed first.
(setq ido-file-extensions-order nil) and dir1 is listed first.
What is causing dir1-backup to be listed first?