>From 891f788408de3620e006ff3f2347be5383130f75 Mon Sep 17 00:00:00 2001 From: Michael Albinus Date: Sat, 21 May 2011 19:06:48 +0200 Subject: [PATCH 1/2] Sort "ls" output by time, descending. --- tramp-adb.el | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) diff --git a/tramp-adb.el b/tramp-adb.el index bfbddb4..8d005a7 100644 --- a/tramp-adb.el +++ b/tramp-adb.el @@ -219,14 +219,16 @@ pass to the OPERATION." (insert " " (mapconcat 'identity sorted-lines "\n "))))) (defun tramp-adb-ls-output-time-less-p (a b) + "Sort \"ls\" output by time, descending." (let (time-a time-b) (string-match tramp-adb-ls-date-regexp a) (setq time-a (apply 'encode-time (parse-time-string (match-string 0 a)))) (string-match tramp-adb-ls-date-regexp b) (setq time-b (apply 'encode-time (parse-time-string (match-string 0 b)))) - (time-less-p time-a time-b))) + (time-less-p time-b time-a))) (defun tramp-adb-ls-output-name-less-p (a b) + "Sort \"ls\" output by name, ascending." (let (posa posb) (string-match dired-move-to-filename-regexp a) (setq posa (match-end 0)) -- 1.7.4.1