;;; sort by different criterias (defun dired-sort-criteria (criteria) "sort-dired by different criteria by Robert Gloeckner " (interactive (list (or (completing-read "criteria [name]: " '("size(S)" "extension(X)" "creation-time(ct)" "access-time(ut)" "time(t)" "name()")) ""))) (string-match ".*(\\(.*\\))" criteria) (dired-sort-other (concat dired-listing-switches (match-string 1 criteria))))