help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Sort directories then files in Dired.


From: Tim X
Subject: Re: Sort directories then files in Dired.
Date: Wed, 08 Dec 2010 15:27:38 -0000
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux)

Oleksandr Gavenko <gavenkoa@gmail.com> writes:

> ls have option --group-directories-first. But then I set
> 'dired-listing-switches' to '-al --group-directories-first'
> output seems damaged:
>
>   e:/home/devel/autorpg:
>   total used in directory 1 available 13039040
>       281474976729852  0drwxrwxrwx  1 sasha Отсутствует 0 2007-09-05  ..
>      1407374883569819  0drwxrwxrwx  1 sasha Отсутствует 0 2009-08-24  .
>      1125899906859437  0drwxrwxrwx  1 sasha Отсутствует 0 2009-08-24  .hg
>      2533274790412740  1-rw-rw-rw-  1 sasha Отсутствует 209 2009-08-24 README
>       562949953438149  0drwxrwxrwx  1 sasha Отсутствует 0 2009-08-24
> very-dumb-game

You could use the ls-lisp package, which comes with emacs and set
ls-lisp-dirs-first to have the directories listed first in dired. You
may need to add (require 'ls-lisp) to your .emacs

,----[ C-h v ls-lisp-dirs-first RET ]
| ls-lisp-dirs-first is a variable defined in `ls-lisp.el'.
| Its value is t
| 
| Documentation:
| Non-nil causes ls-lisp to sort directories first in any ordering.
| (Or last if it is reversed.)  Follows Microsoft Windows Explorer.
| 
| You can customize this variable.
| 
| [back]
`----

Tim

-- 
tcross (at) rapttech dot com dot au


reply via email to

[Prev in Thread] Current Thread [Next in Thread]