Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!brutus.cs.uiuc.edu!apple!bbn!gateway!dsys.ncsl.nist.GOV!rbj From: rbj@dsys.ncsl.nist.GOV (Root Boy Jim) Newsgroups: comp.emacs Subject: dired sorting by date Message-ID: <8908282221.AA19574@dsys.ncsl.nist.gov> Date: 28 Aug 89 22:21:23 GMT Sender: news@bbn.COM Organization: National Institute of Standards and Technology formerly National Bureau of Standards Lines: 29 ? From: News system owner ID ? any suggestions for how to sort a dired buffer by _date_? ? Sean Boisen -- sboisen@bbn.com ? BBN Systems and Technologies Corporation, Cambridge MA ? Disclaimer: these opinions void where prohibited by lawyers. ? Sean Put the following in your .emacs: (setq dired-mode-hook 'dired-mode-hook) (defun dired-mode-hook () "Define dired extensions" (setq case-fold-search t) ; Why is this not done? (define-key dired-mode-map "t" 'dired-sort-by-time) (setq dired-mode-hook nil)) (defun dired-sort-by-time (arg) ; t "Reread directory and sort by time. Reverse sort with prefix." (interactive "P") (let ((dired-listing-switches (concat dired-listing-switches "t" (and arg "r")))) (revert-buffer))) Root Boy Jim Have GNU, Will Travel.