From: Eli Zaretskii Date: Wed, 4 Apr 2001 11:18:59 +0000 (+0000) Subject: (dired-move-to-filename-regexp): Support file sizes in X-Git-Tag: emacs-pretest-21.0.101~13 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=32df8b472ad3d7886f95d74bd499ae0aee24fe2b;p=emacs.git (dired-move-to-filename-regexp): Support file sizes in ``human-readable'' format produced by GNU `ls'. (dired-move-to-filename-regexp): Recognize ISO format dates. From Paul Eggert . --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index de934eb769d..8bfbd354d79 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,10 @@ +2001-04-04 Eli Zaretskii + + * dired.el (dired-move-to-filename-regexp): Support file sizes in + ``human-readable'' format produced by GNU `ls'. + (dired-move-to-filename-regexp): Recognize ISO format dates. From + Paul Eggert . + 2001-04-04 Gerd Moellmann * emacs-lisp/lisp-mnt.el (lm-keywords-list, lm-keywords-finder-p): diff --git a/lisp/dired.el b/lisp/dired.el index 03d1cf405ee..6ef7990084d 100644 --- a/lisp/dired.el +++ b/lisp/dired.el @@ -1502,7 +1502,7 @@ DIR must be a directory name, not a file name." ;; weiand: changed: month ends potentially with . or , or ., ;;old (month (concat l l "+ *")) (month (concat l l "+[.]?,? *")) - ;; Recognize any non-ASCII character. + ;; Recognize any non-ASCII character. ;; The purpose is to match a Kanji character. (k "[^\0-\177]") ;; (k "[^\x00-\x7f\x80-\xff]") @@ -1512,10 +1512,16 @@ DIR must be a directory name, not a file name." ;;old (dd "[ 0-3][0-9]") (dd "[ 0-3][0-9][.]?") (HH:MM "[ 0-2][0-9]:[0-5][0-9]") + (seconds "[0-6][0-9]\\([.,][0-9]+\\)?") + (zone "[-+][0-2][0-9][0-5][0-9]") + (iso-mm-dd "[01][0-9]-[0-3][0-9]") + (iso-time (concat HH:MM "\\(:" seconds "\\( ?" zone "\\)?\\)?")) + (iso (concat "\\(\\(" yyyy "-\\)?" iso-mm-dd "[ T]" iso-time + "\\|" yyyy "-" iso-mm-dd " ?\\)")) (western (concat "\\(" month s dd "\\|" dd s month "\\)" ;; weiand: changed: year potentially unaligned ;;old s "\\(" HH:MM "\\|" s yyyy "\\|" yyyy s "\\)")) - s "\\(" HH:MM + s "\\(" HH:MM "\\|" yyyy s s "?" "\\|" s "?" yyyy "\\)")) @@ -1524,10 +1530,12 @@ DIR must be a directory name, not a file name." ;; The "[0-9]" below requires the previous column to end in a digit. ;; This avoids recognizing `1 may 1997' as a date in the line: ;; -r--r--r-- 1 may 1997 1168 Oct 19 16:49 README + ;; The "[kMGTPEZY]?" below supports "ls -alh" output. ;; The ".*" below finds the last match if there are multiple matches. ;; This avoids recognizing `jservice 10 1024' as a date in the line: ;; drwxr-xr-x 3 jservice 10 1024 Jul 2 1997 esg-host - (concat ".*[0-9]" s "\\(" western "\\|" japanese "\\)" s)) + (concat ".*[0-9][kMGTPEZY]?" + s "\\(" western "\\|" japanese "\\|" iso "\\)" s)) "Regular expression to match up to the file name in a directory listing. The default value is designed to recognize dates and times regardless of the language.")