Mercurial > emacs
changeset 37184:c3a6aff62832
(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 <eggert@twinsun.com>.
author | Eli Zaretskii <eliz@gnu.org> |
---|---|
date | Wed, 04 Apr 2001 11:18:31 +0000 |
parents | 5a753a7265d5 |
children | 3e72f4cf2d4a |
files | lisp/dired.el |
diffstat | 1 files changed, 11 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/dired.el Wed Apr 04 09:58:56 2001 +0000 +++ b/lisp/dired.el Wed Apr 04 11:18:31 2001 +0000 @@ -1502,7 +1502,7 @@ ;; 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 @@ ;;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 @@ ;; 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.")