In a Cygwin Emacs on Windows, in Dired, if I try to sort by time (for example), I get the error:
insert-directory: Listing directory failed but `access-file' worked
In a Windows Emacs binary on Windows, I do not have any problem, but Emacs uses its own implementation of ls
IIUC.
What I don't understand is that Cygwin ls
DOES understand options such as --dired
and -t
(to sort by modification time).
My current config:
;; Switches passed to `ls' for Dired.
(setq dired-listing-switches
(cond ((eq system-type 'windows-nt) ; Native Windows version of Emacs.
"-a -F -l")
(t ; Cygwin version of Emacs or ...
"-a -F --group-directories-first -l --time-style=long-iso")))