From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: joakim.verona@visualwireless.com Newsgroups: gmane.emacs.bugs Subject: follow up to bug report with ls on redhat 9 Date: Mon, 19 May 2003 14:16:18 +0200 (GMT+02:00) Sender: bug-gnu-emacs-bounces+gnu-bug-gnu-emacs=m.gmane.org@gnu.org Message-ID: <1562150.1053346578901.JavaMail.viswadm@paploo> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: main.gmane.org 1053349600 24161 80.91.224.249 (19 May 2003 13:06:40 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Mon, 19 May 2003 13:06:40 +0000 (UTC) Original-X-From: bug-gnu-emacs-bounces+gnu-bug-gnu-emacs=m.gmane.org@gnu.org Mon May 19 15:06:37 2003 Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 19HkLd-0006HD-00 for ; Mon, 19 May 2003 15:06:37 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.10.13) id 19HjQt-0005Tx-01 for gnu-bug-gnu-emacs@m.gmane.org; Mon, 19 May 2003 08:07:59 -0400 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13) id 19HjQl-0005Tb-00 for bug-gnu-emacs@gnu.org; Mon, 19 May 2003 08:07:51 -0400 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13) id 19HjQj-0005St-00 for bug-gnu-emacs@gnu.org; Mon, 19 May 2003 08:07:49 -0400 Original-Received: from host-66.visualwireless.com ([62.20.91.66]) by monty-python.gnu.org with smtp (Exim 4.10.13) id 19HjQi-0005SM-00 for bug-gnu-emacs@gnu.org; Mon, 19 May 2003 08:07:48 -0400 Original-Received: from paploo.visualwireless.com by host-66.visualwireless.com via smtpd (for mail.gnu.org [199.232.76.166]) with SMTP; 19 May 2003 12:16:30 UT X-SMTP-Sending-IP: 127.0.0.1 Original-Received: from paploo by visualwireless.com ; 19 May 2003 14:16:20 +0200 Original-Received: from [127.0.0.1]:2382 (helo paploo)6.0.34 Release) with SMTP; Mon, 19 May 2003 12:16:18 -0000 Original-To: bug-gnu-emacs@gnu.org X-Priority: 3 (Normal) X-WebMail-Sending-IP: 192.168.15.11 X-WebMail-Sending-Host: chewbacca.visualwireless.com X-BeenThere: bug-gnu-emacs@gnu.org X-Mailman-Version: 2.1b5 Precedence: list List-Id: Bug reports for GNU Emacs, the Swiss army knife of text editors List-Help: List-Post: List-Subscribe: , List-Archive: List-Unsubscribe: , Errors-To: bug-gnu-emacs-bounces+gnu-bug-gnu-emacs=m.gmane.org@gnu.org Xref: main.gmane.org gmane.emacs.bugs:5107 X-Report-Spam: http://spam.gmane.org/gmane.emacs.bugs:5107 hello, i tried fixing the bug in dired and found the real cause. it has nothing to= do with the month names, but rather with that the swedish locale uses "." = rather than ":"(at least on redhat, im unshure about the proper rules for s= wedish time). i tried the code below in a scratch buffer and it works.=20 all i did was add dot as a possibility for hour/minute separator. hope this helps, please l=F6et me know if you need additional information. /joakim (setq dired-move-to-filename-regexp (let* ((l "\\([A-Za-z]\\|[^\0-\177]\\)") =09 ;; In some locales, month abbreviations are as short as 2 letters, =09 ;; and they can be padded on the right with spaces. =09 ;; weiand: changed: month ends potentially with . or , or ., ;;old=09 (month (concat l l "+ *")) =09 (month (concat l l "+[.]?,? *")) =09 ;; Recognize any non-ASCII character. =09 ;; The purpose is to match a Kanji character. =09 (k "[^\0-\177]") =09 ;; (k "[^\x00-\x7f\x80-\xff]") =09 (s " ") =09 (yyyy "[0-9][0-9][0-9][0-9]") =09 (mm "[ 0-1]?[0-9]") ;;old=09 (dd "[ 0-3][0-9]") =09 (dd "[ 0-3][0-9][.]?") =09 (HH:MM "[ 0-2][0-9][:\\.][0-5][0-9]") =09 (seconds "[0-6][0-9]\\([.,][0-9]+\\)?") =09 (zone "[-+][0-2][0-9][0-5][0-9]") =09 (iso-mm-dd "[01][0-9]-[0-3][0-9]") =09 (iso-time (concat HH:MM "\\(:" seconds "\\( ?" zone "\\)?\\)?")) =09 (iso (concat "\\(\\(" yyyy "-\\)?" iso-mm-dd "[ T]" iso-time =09=09 "\\|" yyyy "-" iso-mm-dd " ?\\)")) =09 (western (concat "\\(" month s dd "\\|" dd s month "\\)" ;; weiand: changed: year potentially unaligned ;;old=09=09=09 s "\\(" HH:MM "\\|" s yyyy "\\|" yyyy s "\\)")) =09=09=09 s "\\(" HH:MM =09=09=09 "\\|" yyyy s s "?" =09=09=09 "\\|" s "?" yyyy =09=09=09 "\\)")) =09 (japanese =09 (concat mm k "?" s dd k "?" s "+" =09=09 "\\(" HH:MM "\\|" yyyy k "?" "\\)"))) =09 ;; The "[0-9]" below requires the previous column to end in a digit. =09 ;; This avoids recognizing `1 may 1997' as a date in the line: =09 ;; -r--r--r-- 1 may 1997 1168 Oct 19 16:49 README =09 ;; The "[kMGTPEZY]?" below supports "ls -alh" output. =09 ;; The ".*" below finds the last match if there are multiple matches. =09 ;; This avoids recognizing `jservice 10 1024' as a date in the line: =09 ;; drwxr-xr-x 3 jservice 10 1024 Jul 2 1997 esg-host (concat ".*[0-9][kMGTPEZY]?"=20 =09 s "\\(" western "\\|" japanese "\\|" iso "\\)" s)) )