calancha / dired-du

Dired with recursive directory sizes
GNU General Public License v3.0
9 stars 3 forks source link

Sort by size #2

Closed Ambrevar closed 5 years ago

Ambrevar commented 6 years ago

Is it possible to the dired entries by size? Using the -S flag in dired-sort-toggle-or-edit does not work because it uses the results of ls, not du.

Ambrevar commented 6 years ago

@calancha Any idea?

Ambrevar commented 6 years ago

Since I don't see a way around dired, I'll go ahead and implement my own ncdu-like Emacs package. I'm thinking of using something like tabulated list.

Ambrevar commented 5 years ago

Done: https://gitlab.com/ambrevar/emacs-disk-usage

calancha commented 5 years ago

As you mentioned in a previous commit, the library relies upon the external binary ls to do the sorting, which is not aware of the sizes returned by du. If the user is not using an external ls, then the sorting is made with elisp, so we get control on it. I have added support for sorting by space in the case the user is using ls-lisp without external ls, i.e., with ls-lisp-use-insert-directory-program set nil.

Ambrevar commented 5 years ago

That's great, thanks!