I would like to get dired list the directories first. I set the variable
dired-listing-switsches accordingly:
(setq dired-listing-switches "-la --group-directories-first")
but C-x d then results in:
Listing directory failed
I would be very appreciative for any help.
Regards
Rolf
Rolf> I would like to get dired list the directories first. I set the
Rolf> variable dired-listing-switsches accordingly:
Rolf> (setq dired-listing-switches "-la --group-directories-first")
Rolf> but C-x d then results in:
Rolf> Listing directory failed
Unfortunately the current version of dired in the xemacs package tree
doesn't support long options to ls and since group-directories-first
doesn't seem to be available as a short option I'm afraid there isn't
a real clean solution.
From the dirty solutions I suggest you could either define you own ls
program, by constructing a script that wraps ls and sets the
--group-directories-first option or you could change the internals
slightly in dired-mode by using advice. This should do the trick:
(defadvice dired-insert-directory (before my-dired-insert-directory
(dir-or-list switches &optional wildcard full-p))
(setq switches (concat switches " --group-directories-first")))
(ad-activate 'dired-insert-directory)
Yours
--
%% Mats
Hi,
GNU-Emacs has ls-lisp.el which provides an option ls-lisp-dirs-first.
Don't know if it's possible, to use it within X-Emacs.
Martin
Martin> GNU-Emacs has ls-lisp.el which provides an option
Martin> ls-lisp-dirs-first. Don't know if it's possible, to use it
Martin> within X-Emacs.
Unfortunately that has not been synced into the dired version in the
XEmacs Package Tree. So it is not possible to use that out of the box
I'm afraid.
Yours
--
%% Mats