SiteMap Search ElispArea HowTo Glossary RecentChanges News Problems Suggestions

DiredSortCriterias

Last edit

Changed:

<

to

> ;;; sort by different criterias


Download

;;; 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))))