Subject: Re: bug#52384: [External] : bug#52384: 26.3; dired buffer navigation tweak

From: Juri Linkov <[email-masked]>
Date: Sun, 12 Dec 2021 21:28:29 +0200

>> Maybe then like there is a user option `ls-lisp-dirs-first'
>> for ls-lisp.el, a similar option should be added to dired as well,
>> so users won't need to manually add "--group-directories-first"
>> to `dired-listing-switches'.  Do you agree?
>
> After I posted my comment to Drew, I realized later, that
> '--group-directories-first' does not exist in all 'ls' implementations. Bsd ls
> does not seem to have it, correct me if I am wrong, so I am not sure it can be a
> default for Emacs.

Maybe such 'ls' implementations could be detected using something like
'grep-probe'?

> Unless Emacs defaults to ls-lisp.el on all platforms but gnu/Linux?

Dired defaults to ls-lisp.el on ms-dos and windows-nt, and
'ls-lisp-dirs-first' default to t when 'ls-lisp-emulation' is 'MS-Windows'.